aclocal.m4 revision 3e72ca8c
13e72ca8cSmrg# generated automatically by aclocal 1.12.2 -*- Autoconf -*- 23e72ca8cSmrg 33e72ca8cSmrg# Copyright (C) 1996-2012 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 14ee3138f1Smrgm4_ifndef([AC_AUTOCONF_VERSION], 15ee3138f1Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 163e72ca8cSmrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, 173e72ca8cSmrg[m4_warning([this file was generated for autoconf 2.69. 18ee3138f1SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 19ee3138f1SmrgIf you have problems, you may need to regenerate the build system entirely. 203e72ca8cSmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])]) 21ee3138f1Smrg 223e72ca8cSmrg# Copyright (C) 2002-2012 Free Software Foundation, Inc. 2334977a2fSmrg# 243e72ca8cSmrg# This file is free software; the Free Software Foundation 253e72ca8cSmrg# gives unlimited permission to copy and/or distribute it, 263e72ca8cSmrg# with or without modifications, as long as this notice is preserved. 273e72ca8cSmrg 283e72ca8cSmrg# serial 8 293e72ca8cSmrg 303e72ca8cSmrg# AM_AUTOMAKE_VERSION(VERSION) 313e72ca8cSmrg# ---------------------------- 323e72ca8cSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 333e72ca8cSmrg# generated from the m4 files accompanying Automake X.Y. 343e72ca8cSmrg# (This private macro should not be called outside this file.) 353e72ca8cSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 363e72ca8cSmrg[am__api_version='1.12' 373e72ca8cSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 383e72ca8cSmrgdnl require some minimum version. Point them to the right macro. 393e72ca8cSmrgm4_if([$1], [1.12.2], [], 403e72ca8cSmrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 413e72ca8cSmrg]) 423e72ca8cSmrg 433e72ca8cSmrg# _AM_AUTOCONF_VERSION(VERSION) 443e72ca8cSmrg# ----------------------------- 453e72ca8cSmrg# aclocal traces this macro to find the Autoconf version. 463e72ca8cSmrg# This is a private macro too. Using m4_define simplifies 473e72ca8cSmrg# the logic in aclocal, which can simply ignore this definition. 483e72ca8cSmrgm4_define([_AM_AUTOCONF_VERSION], []) 493e72ca8cSmrg 503e72ca8cSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION 513e72ca8cSmrg# ------------------------------- 523e72ca8cSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 533e72ca8cSmrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 543e72ca8cSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 553e72ca8cSmrg[AM_AUTOMAKE_VERSION([1.12.2])dnl 563e72ca8cSmrgm4_ifndef([AC_AUTOCONF_VERSION], 573e72ca8cSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 583e72ca8cSmrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 593e72ca8cSmrg 603e72ca8cSmrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 613e72ca8cSmrg 623e72ca8cSmrg# Copyright (C) 2001-2012 Free Software Foundation, Inc. 6334977a2fSmrg# 643e72ca8cSmrg# This file is free software; the Free Software Foundation 653e72ca8cSmrg# gives unlimited permission to copy and/or distribute it, 663e72ca8cSmrg# with or without modifications, as long as this notice is preserved. 6734977a2fSmrg 683e72ca8cSmrg# serial 2 693e72ca8cSmrg 703e72ca8cSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 713e72ca8cSmrg# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 723e72ca8cSmrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 7334977a2fSmrg# 743e72ca8cSmrg# Of course, Automake must honor this variable whenever it calls a 753e72ca8cSmrg# tool from the auxiliary directory. The problem is that $srcdir (and 763e72ca8cSmrg# therefore $ac_aux_dir as well) can be either absolute or relative, 773e72ca8cSmrg# depending on how configure is run. This is pretty annoying, since 783e72ca8cSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 793e72ca8cSmrg# source directory, any form will work fine, but in subdirectories a 803e72ca8cSmrg# relative path needs to be adjusted first. 8134977a2fSmrg# 823e72ca8cSmrg# $ac_aux_dir/missing 833e72ca8cSmrg# fails when called from a subdirectory if $ac_aux_dir is relative 843e72ca8cSmrg# $top_srcdir/$ac_aux_dir/missing 853e72ca8cSmrg# fails if $ac_aux_dir is absolute, 863e72ca8cSmrg# fails when called from a subdirectory in a VPATH build with 873e72ca8cSmrg# a relative $ac_aux_dir 8834977a2fSmrg# 893e72ca8cSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 903e72ca8cSmrg# are both prefixed by $srcdir. In an in-source build this is usually 913e72ca8cSmrg# harmless because $srcdir is '.', but things will broke when you 923e72ca8cSmrg# start a VPATH build or use an absolute $srcdir. 9334977a2fSmrg# 943e72ca8cSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 953e72ca8cSmrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 963e72ca8cSmrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 973e72ca8cSmrg# and then we would define $MISSING as 983e72ca8cSmrg# MISSING="\${SHELL} $am_aux_dir/missing" 993e72ca8cSmrg# This will work as long as MISSING is not called from configure, because 1003e72ca8cSmrg# unfortunately $(top_srcdir) has no meaning in configure. 1013e72ca8cSmrg# However there are other variables, like CC, which are often used in 1023e72ca8cSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 10334977a2fSmrg# 1043e72ca8cSmrg# Another solution, used here, is to always expand $ac_aux_dir to an 1053e72ca8cSmrg# absolute PATH. The drawback is that using absolute paths prevent a 1063e72ca8cSmrg# configured tree to be moved without reconfiguration. 107ee3138f1Smrg 1083e72ca8cSmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 1093e72ca8cSmrg[dnl Rely on autoconf to set up CDPATH properly. 1103e72ca8cSmrgAC_PREREQ([2.50])dnl 1113e72ca8cSmrg# expand $ac_aux_dir to an absolute path 1123e72ca8cSmrgam_aux_dir=`cd $ac_aux_dir && pwd` 113a1ed278cSmrg]) 11434977a2fSmrg 1153e72ca8cSmrg# AM_CONDITIONAL -*- Autoconf -*- 11634977a2fSmrg 1173e72ca8cSmrg# Copyright (C) 1997-2012 Free Software Foundation, Inc. 1183e72ca8cSmrg# 1193e72ca8cSmrg# This file is free software; the Free Software Foundation 1203e72ca8cSmrg# gives unlimited permission to copy and/or distribute it, 1213e72ca8cSmrg# with or without modifications, as long as this notice is preserved. 12234977a2fSmrg 1233e72ca8cSmrg# serial 10 12434977a2fSmrg 1253e72ca8cSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 1263e72ca8cSmrg# ------------------------------------- 1273e72ca8cSmrg# Define a conditional. 1283e72ca8cSmrgAC_DEFUN([AM_CONDITIONAL], 1293e72ca8cSmrg[AC_PREREQ([2.52])dnl 1303e72ca8cSmrg m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 1313e72ca8cSmrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 1323e72ca8cSmrgAC_SUBST([$1_TRUE])dnl 1333e72ca8cSmrgAC_SUBST([$1_FALSE])dnl 1343e72ca8cSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 1353e72ca8cSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 1363e72ca8cSmrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 1373e72ca8cSmrgif $2; then 1383e72ca8cSmrg $1_TRUE= 1393e72ca8cSmrg $1_FALSE='#' 1403e72ca8cSmrgelse 1413e72ca8cSmrg $1_TRUE='#' 1423e72ca8cSmrg $1_FALSE= 1433e72ca8cSmrgfi 1443e72ca8cSmrgAC_CONFIG_COMMANDS_PRE( 1453e72ca8cSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 1463e72ca8cSmrg AC_MSG_ERROR([[conditional "$1" was never defined. 1473e72ca8cSmrgUsually this means the macro was only invoked conditionally.]]) 1483e72ca8cSmrgfi])]) 14934977a2fSmrg 1503e72ca8cSmrg# Copyright (C) 1999-2012 Free Software Foundation, Inc. 1513e72ca8cSmrg# 1523e72ca8cSmrg# This file is free software; the Free Software Foundation 1533e72ca8cSmrg# gives unlimited permission to copy and/or distribute it, 1543e72ca8cSmrg# with or without modifications, as long as this notice is preserved. 15534977a2fSmrg 1563e72ca8cSmrg# serial 17 157ee3138f1Smrg 1583e72ca8cSmrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 1593e72ca8cSmrg# written in clear, in which case automake, when reading aclocal.m4, 1603e72ca8cSmrg# will think it sees a *use*, and therefore will trigger all it's 1613e72ca8cSmrg# C support machinery. Also note that it means that autoscan, seeing 1623e72ca8cSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 163ee3138f1Smrg 164ee3138f1Smrg 1653e72ca8cSmrg# _AM_DEPENDENCIES(NAME) 1663e72ca8cSmrg# ---------------------- 1673e72ca8cSmrg# See how the compiler implements dependency checking. 1683e72ca8cSmrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 1693e72ca8cSmrg# We try a few techniques and use that to set a single cache variable. 1703e72ca8cSmrg# 1713e72ca8cSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 1723e72ca8cSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 1733e72ca8cSmrg# dependency, and given that the user is not expected to run this macro, 1743e72ca8cSmrg# just rely on AC_PROG_CC. 1753e72ca8cSmrgAC_DEFUN([_AM_DEPENDENCIES], 1763e72ca8cSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 1773e72ca8cSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 1783e72ca8cSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 1793e72ca8cSmrgAC_REQUIRE([AM_DEP_TRACK])dnl 18079a8a9c6Smrg 1813e72ca8cSmrgm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 1823e72ca8cSmrg [$1], [CXX], [depcc="$CXX" am_compiler_list=], 1833e72ca8cSmrg [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 1843e72ca8cSmrg [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 1853e72ca8cSmrg [$1], [UPC], [depcc="$UPC" am_compiler_list=], 1863e72ca8cSmrg [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 1873e72ca8cSmrg [depcc="$$1" am_compiler_list=]) 188ee3138f1Smrg 1893e72ca8cSmrgAC_CACHE_CHECK([dependency style of $depcc], 1903e72ca8cSmrg [am_cv_$1_dependencies_compiler_type], 1913e72ca8cSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 1923e72ca8cSmrg # We make a subdir and do the tests there. Otherwise we can end up 1933e72ca8cSmrg # making bogus files that we don't know about and never remove. For 1943e72ca8cSmrg # instance it was reported that on HP-UX the gcc test will end up 1953e72ca8cSmrg # making a dummy file named 'D' -- because '-MD' means "put the output 1963e72ca8cSmrg # in D". 1973e72ca8cSmrg rm -rf conftest.dir 1983e72ca8cSmrg mkdir conftest.dir 1993e72ca8cSmrg # Copy depcomp to subdir because otherwise we won't find it if we're 2003e72ca8cSmrg # using a relative directory. 2013e72ca8cSmrg cp "$am_depcomp" conftest.dir 2023e72ca8cSmrg cd conftest.dir 2033e72ca8cSmrg # We will build objects and dependencies in a subdirectory because 2043e72ca8cSmrg # it helps to detect inapplicable dependency modes. For instance 2053e72ca8cSmrg # both Tru64's cc and ICC support -MD to output dependencies as a 2063e72ca8cSmrg # side effect of compilation, but ICC will put the dependencies in 2073e72ca8cSmrg # the current directory while Tru64 will put them in the object 2083e72ca8cSmrg # directory. 2093e72ca8cSmrg mkdir sub 210ee3138f1Smrg 2113e72ca8cSmrg am_cv_$1_dependencies_compiler_type=none 2123e72ca8cSmrg if test "$am_compiler_list" = ""; then 2133e72ca8cSmrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 2143e72ca8cSmrg fi 2153e72ca8cSmrg am__universal=false 2163e72ca8cSmrg m4_case([$1], [CC], 2173e72ca8cSmrg [case " $depcc " in #( 2183e72ca8cSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 2193e72ca8cSmrg esac], 2203e72ca8cSmrg [CXX], 2213e72ca8cSmrg [case " $depcc " in #( 2223e72ca8cSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 2233e72ca8cSmrg esac]) 224ee3138f1Smrg 2253e72ca8cSmrg for depmode in $am_compiler_list; do 2263e72ca8cSmrg # Setup a source with many dependencies, because some compilers 2273e72ca8cSmrg # like to wrap large dependency lists on column 80 (with \), and 2283e72ca8cSmrg # we should not choose a depcomp mode which is confused by this. 2293e72ca8cSmrg # 2303e72ca8cSmrg # We need to recreate these files for each test, as the compiler may 2313e72ca8cSmrg # overwrite some of them when testing with obscure command lines. 2323e72ca8cSmrg # This happens at least with the AIX C compiler. 2333e72ca8cSmrg : > sub/conftest.c 2343e72ca8cSmrg for i in 1 2 3 4 5 6; do 2353e72ca8cSmrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 2363e72ca8cSmrg # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 2373e72ca8cSmrg # Solaris 10 /bin/sh. 2383e72ca8cSmrg echo '/* dummy */' > sub/conftst$i.h 2393e72ca8cSmrg done 2403e72ca8cSmrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 24134977a2fSmrg 2423e72ca8cSmrg # We check with '-c' and '-o' for the sake of the "dashmstdout" 2433e72ca8cSmrg # mode. It turns out that the SunPro C++ compiler does not properly 2443e72ca8cSmrg # handle '-M -o', and we need to detect this. Also, some Intel 2453e72ca8cSmrg # versions had trouble with output in subdirs. 2463e72ca8cSmrg am__obj=sub/conftest.${OBJEXT-o} 2473e72ca8cSmrg am__minus_obj="-o $am__obj" 2483e72ca8cSmrg case $depmode in 2493e72ca8cSmrg gcc) 2503e72ca8cSmrg # This depmode causes a compiler race in universal mode. 2513e72ca8cSmrg test "$am__universal" = false || continue 2523e72ca8cSmrg ;; 2533e72ca8cSmrg nosideeffect) 2543e72ca8cSmrg # After this tag, mechanisms are not by side-effect, so they'll 2553e72ca8cSmrg # only be used when explicitly requested. 2563e72ca8cSmrg if test "x$enable_dependency_tracking" = xyes; then 2573e72ca8cSmrg continue 2583e72ca8cSmrg else 2593e72ca8cSmrg break 2603e72ca8cSmrg fi 2613e72ca8cSmrg ;; 2623e72ca8cSmrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 2633e72ca8cSmrg # This compiler won't grok '-c -o', but also, the minuso test has 2643e72ca8cSmrg # not run yet. These depmodes are late enough in the game, and 2653e72ca8cSmrg # so weak that their functioning should not be impacted. 2663e72ca8cSmrg am__obj=conftest.${OBJEXT-o} 2673e72ca8cSmrg am__minus_obj= 2683e72ca8cSmrg ;; 2693e72ca8cSmrg none) break ;; 2703e72ca8cSmrg esac 2713e72ca8cSmrg if depmode=$depmode \ 2723e72ca8cSmrg source=sub/conftest.c object=$am__obj \ 2733e72ca8cSmrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 2743e72ca8cSmrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 2753e72ca8cSmrg >/dev/null 2>conftest.err && 2763e72ca8cSmrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 2773e72ca8cSmrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 2783e72ca8cSmrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 2793e72ca8cSmrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 2803e72ca8cSmrg # icc doesn't choke on unknown options, it will just issue warnings 2813e72ca8cSmrg # or remarks (even with -Werror). So we grep stderr for any message 2823e72ca8cSmrg # that says an option was ignored or not supported. 2833e72ca8cSmrg # When given -MP, icc 7.0 and 7.1 complain thusly: 2843e72ca8cSmrg # icc: Command line warning: ignoring option '-M'; no argument required 2853e72ca8cSmrg # The diagnosis changed in icc 8.0: 2863e72ca8cSmrg # icc: Command line remark: option '-MP' not supported 2873e72ca8cSmrg if (grep 'ignoring option' conftest.err || 2883e72ca8cSmrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 2893e72ca8cSmrg am_cv_$1_dependencies_compiler_type=$depmode 2903e72ca8cSmrg break 2913e72ca8cSmrg fi 2923e72ca8cSmrg fi 2933e72ca8cSmrg done 29434977a2fSmrg 2953e72ca8cSmrg cd .. 2963e72ca8cSmrg rm -rf conftest.dir 2973e72ca8cSmrgelse 2983e72ca8cSmrg am_cv_$1_dependencies_compiler_type=none 2993e72ca8cSmrgfi 3003e72ca8cSmrg]) 3013e72ca8cSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 3023e72ca8cSmrgAM_CONDITIONAL([am__fastdep$1], [ 3033e72ca8cSmrg test "x$enable_dependency_tracking" != xno \ 3043e72ca8cSmrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 3053e72ca8cSmrg]) 30634977a2fSmrg 30734977a2fSmrg 3083e72ca8cSmrg# AM_SET_DEPDIR 3093e72ca8cSmrg# ------------- 3103e72ca8cSmrg# Choose a directory name for dependency files. 3113e72ca8cSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 3123e72ca8cSmrgAC_DEFUN([AM_SET_DEPDIR], 3133e72ca8cSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 3143e72ca8cSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 315b425557eSmrg]) 31634977a2fSmrg 31734977a2fSmrg 3183e72ca8cSmrg# AM_DEP_TRACK 3193e72ca8cSmrg# ------------ 3203e72ca8cSmrgAC_DEFUN([AM_DEP_TRACK], 3213e72ca8cSmrg[AC_ARG_ENABLE([dependency-tracking], [dnl 3223e72ca8cSmrgAS_HELP_STRING( 3233e72ca8cSmrg [--enable-dependency-tracking], 3243e72ca8cSmrg [do not reject slow dependency extractors]) 3253e72ca8cSmrgAS_HELP_STRING( 3263e72ca8cSmrg [--disable-dependency-tracking], 3273e72ca8cSmrg [speeds up one-time build])]) 3283e72ca8cSmrgif test "x$enable_dependency_tracking" != xno; then 3293e72ca8cSmrg am_depcomp="$ac_aux_dir/depcomp" 3303e72ca8cSmrg AMDEPBACKSLASH='\' 3313e72ca8cSmrg am__nodep='_no' 3323e72ca8cSmrgfi 3333e72ca8cSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 3343e72ca8cSmrgAC_SUBST([AMDEPBACKSLASH])dnl 3353e72ca8cSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 3363e72ca8cSmrgAC_SUBST([am__nodep])dnl 3373e72ca8cSmrg_AM_SUBST_NOTMAKE([am__nodep])dnl 3383e72ca8cSmrg]) 33934977a2fSmrg 3403e72ca8cSmrg# Generate code to set up dependency tracking. -*- Autoconf -*- 34134977a2fSmrg 3423e72ca8cSmrg# Copyright (C) 1999-2012 Free Software Foundation, Inc. 3433e72ca8cSmrg# 3443e72ca8cSmrg# This file is free software; the Free Software Foundation 3453e72ca8cSmrg# gives unlimited permission to copy and/or distribute it, 3463e72ca8cSmrg# with or without modifications, as long as this notice is preserved. 34734977a2fSmrg 3483e72ca8cSmrg# serial 6 34934977a2fSmrg 3503e72ca8cSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 3513e72ca8cSmrg# ------------------------------ 3523e72ca8cSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 3533e72ca8cSmrg[{ 3543e72ca8cSmrg # Autoconf 2.62 quotes --file arguments for eval, but not when files 3553e72ca8cSmrg # are listed without --file. Let's play safe and only enable the eval 3563e72ca8cSmrg # if we detect the quoting. 3573e72ca8cSmrg case $CONFIG_FILES in 3583e72ca8cSmrg *\'*) eval set x "$CONFIG_FILES" ;; 3593e72ca8cSmrg *) set x $CONFIG_FILES ;; 3603e72ca8cSmrg esac 3613e72ca8cSmrg shift 3623e72ca8cSmrg for mf 3633e72ca8cSmrg do 3643e72ca8cSmrg # Strip MF so we end up with the name of the file. 3653e72ca8cSmrg mf=`echo "$mf" | sed -e 's/:.*$//'` 3663e72ca8cSmrg # Check whether this is an Automake generated Makefile or not. 3673e72ca8cSmrg # We used to match only the files named 'Makefile.in', but 3683e72ca8cSmrg # some people rename them; so instead we look at the file content. 3693e72ca8cSmrg # Grep'ing the first line is not enough: some people post-process 3703e72ca8cSmrg # each Makefile.in and add a new line on top of each file to say so. 3713e72ca8cSmrg # Grep'ing the whole file is not good either: AIX grep has a line 3723e72ca8cSmrg # limit of 2048, but all sed's we know have understand at least 4000. 3733e72ca8cSmrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 3743e72ca8cSmrg dirpart=`AS_DIRNAME("$mf")` 3753e72ca8cSmrg else 3763e72ca8cSmrg continue 3773e72ca8cSmrg fi 3783e72ca8cSmrg # Extract the definition of DEPDIR, am__include, and am__quote 3793e72ca8cSmrg # from the Makefile without running 'make'. 3803e72ca8cSmrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 3813e72ca8cSmrg test -z "$DEPDIR" && continue 3823e72ca8cSmrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 3833e72ca8cSmrg test -z "am__include" && continue 3843e72ca8cSmrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 3853e72ca8cSmrg # Find all dependency output files, they are included files with 3863e72ca8cSmrg # $(DEPDIR) in their names. We invoke sed twice because it is the 3873e72ca8cSmrg # simplest approach to changing $(DEPDIR) to its actual value in the 3883e72ca8cSmrg # expansion. 3893e72ca8cSmrg for file in `sed -n " 3903e72ca8cSmrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 3913e72ca8cSmrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do 3923e72ca8cSmrg # Make sure the directory exists. 3933e72ca8cSmrg test -f "$dirpart/$file" && continue 3943e72ca8cSmrg fdir=`AS_DIRNAME(["$file"])` 3953e72ca8cSmrg AS_MKDIR_P([$dirpart/$fdir]) 3963e72ca8cSmrg # echo "creating $dirpart/$file" 3973e72ca8cSmrg echo '# dummy' > "$dirpart/$file" 3983e72ca8cSmrg done 3993e72ca8cSmrg done 4003e72ca8cSmrg} 4013e72ca8cSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 402a1ed278cSmrg 403a1ed278cSmrg 4043e72ca8cSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS 4053e72ca8cSmrg# ----------------------------- 4063e72ca8cSmrg# This macro should only be invoked once -- use via AC_REQUIRE. 4073e72ca8cSmrg# 4083e72ca8cSmrg# This code is only required when automatic dependency tracking 4093e72ca8cSmrg# is enabled. FIXME. This creates each '.P' file that we will 4103e72ca8cSmrg# need in order to bootstrap the dependency handling code. 4113e72ca8cSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 4123e72ca8cSmrg[AC_CONFIG_COMMANDS([depfiles], 4133e72ca8cSmrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 4143e72ca8cSmrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 4153e72ca8cSmrg]) 416a1ed278cSmrg 4173e72ca8cSmrg# Do all the work for Automake. -*- Autoconf -*- 418a1ed278cSmrg 4193e72ca8cSmrg# Copyright (C) 1996-2012 Free Software Foundation, Inc. 4203e72ca8cSmrg# 4213e72ca8cSmrg# This file is free software; the Free Software Foundation 4223e72ca8cSmrg# gives unlimited permission to copy and/or distribute it, 4233e72ca8cSmrg# with or without modifications, as long as this notice is preserved. 42434977a2fSmrg 4253e72ca8cSmrg# serial 19 42634977a2fSmrg 4273e72ca8cSmrg# This macro actually does too much. Some checks are only needed if 4283e72ca8cSmrg# your package does certain things. But this isn't really a big deal. 42934977a2fSmrg 4303e72ca8cSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 4313e72ca8cSmrg# AM_INIT_AUTOMAKE([OPTIONS]) 4323e72ca8cSmrg# ----------------------------------------------- 4333e72ca8cSmrg# The call with PACKAGE and VERSION arguments is the old style 4343e72ca8cSmrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 4353e72ca8cSmrg# and VERSION should now be passed to AC_INIT and removed from 4363e72ca8cSmrg# the call to AM_INIT_AUTOMAKE. 4373e72ca8cSmrg# We support both call styles for the transition. After 4383e72ca8cSmrg# the next Automake release, Autoconf can make the AC_INIT 4393e72ca8cSmrg# arguments mandatory, and then we can depend on a new Autoconf 4403e72ca8cSmrg# release and drop the old call support. 4413e72ca8cSmrgAC_DEFUN([AM_INIT_AUTOMAKE], 4423e72ca8cSmrg[AC_PREREQ([2.62])dnl 4433e72ca8cSmrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 4443e72ca8cSmrgdnl the ones we care about. 4453e72ca8cSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 4463e72ca8cSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 4473e72ca8cSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 4483e72ca8cSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 4493e72ca8cSmrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 4503e72ca8cSmrg # is not polluted with repeated "-I." 4513e72ca8cSmrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 4523e72ca8cSmrg # test to see if srcdir already configured 4533e72ca8cSmrg if test -f $srcdir/config.status; then 4543e72ca8cSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 4553e72ca8cSmrg fi 4563e72ca8cSmrgfi 45734977a2fSmrg 4583e72ca8cSmrg# test whether we have cygpath 4593e72ca8cSmrgif test -z "$CYGPATH_W"; then 4603e72ca8cSmrg if (cygpath --version) >/dev/null 2>/dev/null; then 4613e72ca8cSmrg CYGPATH_W='cygpath -w' 4623e72ca8cSmrg else 4633e72ca8cSmrg CYGPATH_W=echo 4643e72ca8cSmrg fi 4653e72ca8cSmrgfi 4663e72ca8cSmrgAC_SUBST([CYGPATH_W]) 46734977a2fSmrg 4683e72ca8cSmrg# Define the identity of the package. 4693e72ca8cSmrgdnl Distinguish between old-style and new-style calls. 4703e72ca8cSmrgm4_ifval([$2], 4713e72ca8cSmrg[AC_DIAGNOSE([obsolete], 4723e72ca8cSmrg[$0: two- and three-arguments forms are deprecated. For more info, see: 4733e72ca8cSmrghttp://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_INIT_AUTOMAKE-invocation]) 4743e72ca8cSmrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 4753e72ca8cSmrg AC_SUBST([PACKAGE], [$1])dnl 4763e72ca8cSmrg AC_SUBST([VERSION], [$2])], 4773e72ca8cSmrg[_AM_SET_OPTIONS([$1])dnl 4783e72ca8cSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 4793e72ca8cSmrgm4_if( 4803e72ca8cSmrg m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), 4813e72ca8cSmrg [ok:ok],, 4823e72ca8cSmrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 4833e72ca8cSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 4843e72ca8cSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 48534977a2fSmrg 4863e72ca8cSmrg_AM_IF_OPTION([no-define],, 4873e72ca8cSmrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 4883e72ca8cSmrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 48934977a2fSmrg 4903e72ca8cSmrg# Some tools Automake needs. 4913e72ca8cSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 4923e72ca8cSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 4933e72ca8cSmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 4943e72ca8cSmrgAM_MISSING_PROG([AUTOCONF], [autoconf]) 4953e72ca8cSmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 4963e72ca8cSmrgAM_MISSING_PROG([AUTOHEADER], [autoheader]) 4973e72ca8cSmrgAM_MISSING_PROG([MAKEINFO], [makeinfo]) 4983e72ca8cSmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 4993e72ca8cSmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 5003e72ca8cSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 5013e72ca8cSmrg# For better backward compatibility. To be removed once Automake 1.9.x 5023e72ca8cSmrg# dies out for good. For more background, see: 5033e72ca8cSmrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 5043e72ca8cSmrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 5053e72ca8cSmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 5063e72ca8cSmrg# We need awk for the "check" target. The system "awk" is bad on 5073e72ca8cSmrg# some platforms. 5083e72ca8cSmrgAC_REQUIRE([AC_PROG_AWK])dnl 5093e72ca8cSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 5103e72ca8cSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 5113e72ca8cSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 5123e72ca8cSmrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 5133e72ca8cSmrg [_AM_PROG_TAR([v7])])]) 5143e72ca8cSmrg_AM_IF_OPTION([no-dependencies],, 5153e72ca8cSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 5163e72ca8cSmrg [_AM_DEPENDENCIES([CC])], 5173e72ca8cSmrg [m4_define([AC_PROG_CC], 5183e72ca8cSmrg m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 5193e72ca8cSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 5203e72ca8cSmrg [_AM_DEPENDENCIES([CXX])], 5213e72ca8cSmrg [m4_define([AC_PROG_CXX], 5223e72ca8cSmrg m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 5233e72ca8cSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 5243e72ca8cSmrg [_AM_DEPENDENCIES([OBJC])], 5253e72ca8cSmrg [m4_define([AC_PROG_OBJC], 5263e72ca8cSmrg m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 5273e72ca8cSmrgdnl Support for Objective C++ was only introduced in Autoconf 2.65, 5283e72ca8cSmrgdnl but we still cater to Autoconf 2.62. 5293e72ca8cSmrgm4_ifdef([AC_PROG_OBJCXX], 5303e72ca8cSmrg[AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 5313e72ca8cSmrg [_AM_DEPENDENCIES([OBJCXX])], 5323e72ca8cSmrg [m4_define([AC_PROG_OBJCXX], 5333e72ca8cSmrg m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])])dnl 5343e72ca8cSmrg]) 5353e72ca8cSmrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 5363e72ca8cSmrgdnl The 'parallel-tests' driver may need to know about EXEEXT, so add the 5373e72ca8cSmrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 5383e72ca8cSmrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 5393e72ca8cSmrgAC_CONFIG_COMMANDS_PRE(dnl 5403e72ca8cSmrg[m4_provide_if([_AM_COMPILER_EXEEXT], 5413e72ca8cSmrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 542a1ed278cSmrg]) 54334977a2fSmrg 5443e72ca8cSmrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 5453e72ca8cSmrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 5463e72ca8cSmrgdnl mangled by Autoconf and run in a shell conditional statement. 5473e72ca8cSmrgm4_define([_AC_COMPILER_EXEEXT], 5483e72ca8cSmrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 54934977a2fSmrg 55034977a2fSmrg 5513e72ca8cSmrg# When config.status generates a header, we must update the stamp-h file. 5523e72ca8cSmrg# This file resides in the same directory as the config header 5533e72ca8cSmrg# that is generated. The stamp files are numbered to have different names. 554ee3138f1Smrg 5553e72ca8cSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 5563e72ca8cSmrg# loop where config.status creates the headers, so we can generate 5573e72ca8cSmrg# our stamp files there. 5583e72ca8cSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 5593e72ca8cSmrg[# Compute $1's index in $config_headers. 5603e72ca8cSmrg_am_arg=$1 5613e72ca8cSmrg_am_stamp_count=1 5623e72ca8cSmrgfor _am_header in $config_headers :; do 5633e72ca8cSmrg case $_am_header in 5643e72ca8cSmrg $_am_arg | $_am_arg:* ) 5653e72ca8cSmrg break ;; 5663e72ca8cSmrg * ) 5673e72ca8cSmrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 5683e72ca8cSmrg esac 5693e72ca8cSmrgdone 5703e72ca8cSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 571ee3138f1Smrg 5723e72ca8cSmrg# Copyright (C) 2001-2012 Free Software Foundation, Inc. 5733e72ca8cSmrg# 5743e72ca8cSmrg# This file is free software; the Free Software Foundation 5753e72ca8cSmrg# gives unlimited permission to copy and/or distribute it, 5763e72ca8cSmrg# with or without modifications, as long as this notice is preserved. 57734977a2fSmrg 5783e72ca8cSmrg# serial 8 57934977a2fSmrg 5803e72ca8cSmrg# AM_PROG_INSTALL_SH 5813e72ca8cSmrg# ------------------ 5823e72ca8cSmrg# Define $install_sh. 5833e72ca8cSmrgAC_DEFUN([AM_PROG_INSTALL_SH], 5843e72ca8cSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 5853e72ca8cSmrgif test x"${install_sh}" != xset; then 5863e72ca8cSmrg case $am_aux_dir in 5873e72ca8cSmrg *\ * | *\ *) 5883e72ca8cSmrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 5893e72ca8cSmrg *) 5903e72ca8cSmrg install_sh="\${SHELL} $am_aux_dir/install-sh" 5913e72ca8cSmrg esac 5923e72ca8cSmrgfi 5933e72ca8cSmrgAC_SUBST([install_sh])]) 59434977a2fSmrg 5953e72ca8cSmrg# Copyright (C) 2003-2012 Free Software Foundation, Inc. 5963e72ca8cSmrg# 5973e72ca8cSmrg# This file is free software; the Free Software Foundation 5983e72ca8cSmrg# gives unlimited permission to copy and/or distribute it, 5993e72ca8cSmrg# with or without modifications, as long as this notice is preserved. 60034977a2fSmrg 6013e72ca8cSmrg# serial 2 60234977a2fSmrg 6033e72ca8cSmrg# Check whether the underlying file-system supports filenames 6043e72ca8cSmrg# with a leading dot. For instance MS-DOS doesn't. 6053e72ca8cSmrgAC_DEFUN([AM_SET_LEADING_DOT], 6063e72ca8cSmrg[rm -rf .tst 2>/dev/null 6073e72ca8cSmrgmkdir .tst 2>/dev/null 6083e72ca8cSmrgif test -d .tst; then 6093e72ca8cSmrg am__leading_dot=. 6103e72ca8cSmrgelse 6113e72ca8cSmrg am__leading_dot=_ 6123e72ca8cSmrgfi 6133e72ca8cSmrgrmdir .tst 2>/dev/null 6143e72ca8cSmrgAC_SUBST([am__leading_dot])]) 61534977a2fSmrg 6163e72ca8cSmrg# Check to see how 'make' treats includes. -*- Autoconf -*- 61734977a2fSmrg 6183e72ca8cSmrg# Copyright (C) 2001-2012 Free Software Foundation, Inc. 6193e72ca8cSmrg# 6203e72ca8cSmrg# This file is free software; the Free Software Foundation 6213e72ca8cSmrg# gives unlimited permission to copy and/or distribute it, 6223e72ca8cSmrg# with or without modifications, as long as this notice is preserved. 62334977a2fSmrg 6243e72ca8cSmrg# serial 5 62534977a2fSmrg 6263e72ca8cSmrg# AM_MAKE_INCLUDE() 6273e72ca8cSmrg# ----------------- 6283e72ca8cSmrg# Check to see how make treats includes. 6293e72ca8cSmrgAC_DEFUN([AM_MAKE_INCLUDE], 6303e72ca8cSmrg[am_make=${MAKE-make} 6313e72ca8cSmrgcat > confinc << 'END' 6323e72ca8cSmrgam__doit: 6333e72ca8cSmrg @echo this is the am__doit target 6343e72ca8cSmrg.PHONY: am__doit 6353e72ca8cSmrgEND 6363e72ca8cSmrg# If we don't find an include directive, just comment out the code. 6373e72ca8cSmrgAC_MSG_CHECKING([for style of include used by $am_make]) 6383e72ca8cSmrgam__include="#" 6393e72ca8cSmrgam__quote= 6403e72ca8cSmrg_am_result=none 6413e72ca8cSmrg# First try GNU make style include. 6423e72ca8cSmrgecho "include confinc" > confmf 6433e72ca8cSmrg# Ignore all kinds of additional output from 'make'. 6443e72ca8cSmrgcase `$am_make -s -f confmf 2> /dev/null` in #( 6453e72ca8cSmrg*the\ am__doit\ target*) 6463e72ca8cSmrg am__include=include 6473e72ca8cSmrg am__quote= 6483e72ca8cSmrg _am_result=GNU 6493e72ca8cSmrg ;; 6503e72ca8cSmrgesac 6513e72ca8cSmrg# Now try BSD make style include. 6523e72ca8cSmrgif test "$am__include" = "#"; then 6533e72ca8cSmrg echo '.include "confinc"' > confmf 6543e72ca8cSmrg case `$am_make -s -f confmf 2> /dev/null` in #( 6553e72ca8cSmrg *the\ am__doit\ target*) 6563e72ca8cSmrg am__include=.include 6573e72ca8cSmrg am__quote="\"" 6583e72ca8cSmrg _am_result=BSD 6593e72ca8cSmrg ;; 6603e72ca8cSmrg esac 6613e72ca8cSmrgfi 6623e72ca8cSmrgAC_SUBST([am__include]) 6633e72ca8cSmrgAC_SUBST([am__quote]) 6643e72ca8cSmrgAC_MSG_RESULT([$_am_result]) 6653e72ca8cSmrgrm -f confinc confmf 6663e72ca8cSmrg]) 66734977a2fSmrg 6683e72ca8cSmrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 66934977a2fSmrg 6703e72ca8cSmrg# Copyright (C) 1997-2012 Free Software Foundation, Inc. 6713e72ca8cSmrg# 6723e72ca8cSmrg# This file is free software; the Free Software Foundation 6733e72ca8cSmrg# gives unlimited permission to copy and/or distribute it, 6743e72ca8cSmrg# with or without modifications, as long as this notice is preserved. 67534977a2fSmrg 6763e72ca8cSmrg# serial 7 67734977a2fSmrg 6783e72ca8cSmrg# AM_MISSING_PROG(NAME, PROGRAM) 6793e72ca8cSmrg# ------------------------------ 6803e72ca8cSmrgAC_DEFUN([AM_MISSING_PROG], 6813e72ca8cSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 6823e72ca8cSmrg$1=${$1-"${am_missing_run}$2"} 6833e72ca8cSmrgAC_SUBST($1)]) 68434977a2fSmrg 6853e72ca8cSmrg 6863e72ca8cSmrg# AM_MISSING_HAS_RUN 6873e72ca8cSmrg# ------------------ 6883e72ca8cSmrg# Define MISSING if not defined so far and test if it supports --run. 6893e72ca8cSmrg# If it does, set am_missing_run to use it, otherwise, to nothing. 6903e72ca8cSmrgAC_DEFUN([AM_MISSING_HAS_RUN], 6913e72ca8cSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 6923e72ca8cSmrgAC_REQUIRE_AUX_FILE([missing])dnl 6933e72ca8cSmrgif test x"${MISSING+set}" != xset; then 6943e72ca8cSmrg case $am_aux_dir in 6953e72ca8cSmrg *\ * | *\ *) 6963e72ca8cSmrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 6973e72ca8cSmrg *) 6983e72ca8cSmrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 6993e72ca8cSmrg esac 7003e72ca8cSmrgfi 7013e72ca8cSmrg# Use eval to expand $SHELL 7023e72ca8cSmrgif eval "$MISSING --run true"; then 7033e72ca8cSmrg am_missing_run="$MISSING --run " 7043e72ca8cSmrgelse 7053e72ca8cSmrg am_missing_run= 7063e72ca8cSmrg AC_MSG_WARN(['missing' script is too old or missing]) 7073e72ca8cSmrgfi 70834977a2fSmrg]) 70934977a2fSmrg 7103e72ca8cSmrg# Helper functions for option handling. -*- Autoconf -*- 71134977a2fSmrg 7123e72ca8cSmrg# Copyright (C) 2001-2012 Free Software Foundation, Inc. 7133e72ca8cSmrg# 7143e72ca8cSmrg# This file is free software; the Free Software Foundation 7153e72ca8cSmrg# gives unlimited permission to copy and/or distribute it, 7163e72ca8cSmrg# with or without modifications, as long as this notice is preserved. 71734977a2fSmrg 7183e72ca8cSmrg# serial 6 71934977a2fSmrg 7203e72ca8cSmrg# _AM_MANGLE_OPTION(NAME) 7213e72ca8cSmrg# ----------------------- 7223e72ca8cSmrgAC_DEFUN([_AM_MANGLE_OPTION], 7233e72ca8cSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 72434977a2fSmrg 7253e72ca8cSmrg# _AM_SET_OPTION(NAME) 7263e72ca8cSmrg# -------------------- 7273e72ca8cSmrg# Set option NAME. Presently that only means defining a flag for this option. 7283e72ca8cSmrgAC_DEFUN([_AM_SET_OPTION], 7293e72ca8cSmrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 73034977a2fSmrg 7313e72ca8cSmrg# _AM_SET_OPTIONS(OPTIONS) 7323e72ca8cSmrg# ------------------------ 7333e72ca8cSmrg# OPTIONS is a space-separated list of Automake options. 7343e72ca8cSmrgAC_DEFUN([_AM_SET_OPTIONS], 7353e72ca8cSmrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 73634977a2fSmrg 7373e72ca8cSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 7383e72ca8cSmrg# ------------------------------------------- 7393e72ca8cSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 7403e72ca8cSmrgAC_DEFUN([_AM_IF_OPTION], 7413e72ca8cSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 74234977a2fSmrg 7433e72ca8cSmrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 74434977a2fSmrg 7453e72ca8cSmrg# Copyright (C) 1996-2012 Free Software Foundation, Inc. 7463e72ca8cSmrg# 7473e72ca8cSmrg# This file is free software; the Free Software Foundation 7483e72ca8cSmrg# gives unlimited permission to copy and/or distribute it, 7493e72ca8cSmrg# with or without modifications, as long as this notice is preserved. 75034977a2fSmrg 7513e72ca8cSmrg# serial 9 75234977a2fSmrg 7533e72ca8cSmrg# AM_SANITY_CHECK 7543e72ca8cSmrg# --------------- 7553e72ca8cSmrgAC_DEFUN([AM_SANITY_CHECK], 7563e72ca8cSmrg[AC_MSG_CHECKING([whether build environment is sane]) 7573e72ca8cSmrg# Reject unsafe characters in $srcdir or the absolute working directory 7583e72ca8cSmrg# name. Accept space and tab only in the latter. 7593e72ca8cSmrgam_lf=' 7603e72ca8cSmrg' 7613e72ca8cSmrgcase `pwd` in 7623e72ca8cSmrg *[[\\\"\#\$\&\'\`$am_lf]]*) 7633e72ca8cSmrg AC_MSG_ERROR([unsafe absolute working directory name]);; 7643e72ca8cSmrgesac 7653e72ca8cSmrgcase $srcdir in 7663e72ca8cSmrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 7673e72ca8cSmrg AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 7683e72ca8cSmrgesac 76934977a2fSmrg 7703e72ca8cSmrg# Do 'set' in a subshell so we don't clobber the current shell's 7713e72ca8cSmrg# arguments. Must try -L first in case configure is actually a 7723e72ca8cSmrg# symlink; some systems play weird games with the mod time of symlinks 7733e72ca8cSmrg# (eg FreeBSD returns the mod time of the symlink's containing 7743e72ca8cSmrg# directory). 7753e72ca8cSmrgif ( 7763e72ca8cSmrg am_has_slept=no 7773e72ca8cSmrg for am_try in 1 2; do 7783e72ca8cSmrg echo "timestamp, slept: $am_has_slept" > conftest.file 7793e72ca8cSmrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 7803e72ca8cSmrg if test "$[*]" = "X"; then 7813e72ca8cSmrg # -L didn't work. 7823e72ca8cSmrg set X `ls -t "$srcdir/configure" conftest.file` 7833e72ca8cSmrg fi 7843e72ca8cSmrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 7853e72ca8cSmrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 7863e72ca8cSmrg 7873e72ca8cSmrg # If neither matched, then we have a broken ls. This can happen 7883e72ca8cSmrg # if, for instance, CONFIG_SHELL is bash and it inherits a 7893e72ca8cSmrg # broken ls alias from the environment. This has actually 7903e72ca8cSmrg # happened. Such a system could not be considered "sane". 7913e72ca8cSmrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 7923e72ca8cSmrg alias in your environment]) 7933e72ca8cSmrg fi 7943e72ca8cSmrg if test "$[2]" = conftest.file || test $am_try -eq 2; then 7953e72ca8cSmrg break 7963e72ca8cSmrg fi 7973e72ca8cSmrg # Just in case. 7983e72ca8cSmrg sleep 1 7993e72ca8cSmrg am_has_slept=yes 8003e72ca8cSmrg done 8013e72ca8cSmrg test "$[2]" = conftest.file 8023e72ca8cSmrg ) 8033e72ca8cSmrgthen 8043e72ca8cSmrg # Ok. 8053e72ca8cSmrg : 8063e72ca8cSmrgelse 8073e72ca8cSmrg AC_MSG_ERROR([newly created file is older than distributed files! 8083e72ca8cSmrgCheck your system clock]) 8093e72ca8cSmrgfi 8103e72ca8cSmrgAC_MSG_RESULT([yes]) 8113e72ca8cSmrg# If we didn't sleep, we still need to ensure time stamps of config.status and 8123e72ca8cSmrg# generated files are strictly newer. 8133e72ca8cSmrgam_sleep_pid= 8143e72ca8cSmrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then 8153e72ca8cSmrg ( sleep 1 ) & 8163e72ca8cSmrg am_sleep_pid=$! 8173e72ca8cSmrgfi 8183e72ca8cSmrgAC_CONFIG_COMMANDS_PRE( 8193e72ca8cSmrg [AC_MSG_CHECKING([that generated files are newer than configure]) 8203e72ca8cSmrg if test -n "$am_sleep_pid"; then 8213e72ca8cSmrg # Hide warnings about reused PIDs. 8223e72ca8cSmrg wait $am_sleep_pid 2>/dev/null 8233e72ca8cSmrg fi 8243e72ca8cSmrg AC_MSG_RESULT([done])]) 8253e72ca8cSmrgrm -f conftest.file 8263e72ca8cSmrg]) 82734977a2fSmrg 8283e72ca8cSmrg# Copyright (C) 2009-2012 Free Software Foundation, Inc. 8293e72ca8cSmrg# 8303e72ca8cSmrg# This file is free software; the Free Software Foundation 8313e72ca8cSmrg# gives unlimited permission to copy and/or distribute it, 8323e72ca8cSmrg# with or without modifications, as long as this notice is preserved. 83334977a2fSmrg 8343e72ca8cSmrg# serial 3 8353e72ca8cSmrg 8363e72ca8cSmrg# AM_SILENT_RULES([DEFAULT]) 8373e72ca8cSmrg# -------------------------- 8383e72ca8cSmrg# Enable less verbose build rules; with the default set to DEFAULT 8393e72ca8cSmrg# ("yes" being less verbose, "no" or empty being verbose). 8403e72ca8cSmrgAC_DEFUN([AM_SILENT_RULES], 8413e72ca8cSmrg[AC_ARG_ENABLE([silent-rules], [dnl 8423e72ca8cSmrgAS_HELP_STRING( 8433e72ca8cSmrg [--enable-silent-rules], 8443e72ca8cSmrg [less verbose build output (undo: "make V=1")]) 8453e72ca8cSmrgAS_HELP_STRING( 8463e72ca8cSmrg [--disable-silent-rules], 8473e72ca8cSmrg [verbose build output (undo: "make V=0")])dnl 848a1ed278cSmrg]) 8493e72ca8cSmrgcase $enable_silent_rules in @%:@ ((( 8503e72ca8cSmrg yes) AM_DEFAULT_VERBOSITY=0;; 8513e72ca8cSmrg no) AM_DEFAULT_VERBOSITY=1;; 8523e72ca8cSmrg *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 8533e72ca8cSmrgesac 8543e72ca8cSmrgdnl 8553e72ca8cSmrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 8563e72ca8cSmrgdnl do not support nested variable expansions. 8573e72ca8cSmrgdnl See automake bug#9928 and bug#10237. 8583e72ca8cSmrgam_make=${MAKE-make} 8593e72ca8cSmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 8603e72ca8cSmrg [am_cv_make_support_nested_variables], 8613e72ca8cSmrg [if AS_ECHO([['TRUE=$(BAR$(V)) 8623e72ca8cSmrgBAR0=false 8633e72ca8cSmrgBAR1=true 8643e72ca8cSmrgV=1 8653e72ca8cSmrgam__doit: 8663e72ca8cSmrg @$(TRUE) 8673e72ca8cSmrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 8683e72ca8cSmrg am_cv_make_support_nested_variables=yes 8693e72ca8cSmrgelse 8703e72ca8cSmrg am_cv_make_support_nested_variables=no 8713e72ca8cSmrgfi]) 8723e72ca8cSmrgif test $am_cv_make_support_nested_variables = yes; then 8733e72ca8cSmrg dnl Using '$V' instead of '$(V)' breaks IRIX make. 8743e72ca8cSmrg AM_V='$(V)' 8753e72ca8cSmrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 8763e72ca8cSmrgelse 8773e72ca8cSmrg AM_V=$AM_DEFAULT_VERBOSITY 8783e72ca8cSmrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 8793e72ca8cSmrgfi 8803e72ca8cSmrgAC_SUBST([AM_V])dnl 8813e72ca8cSmrgAM_SUBST_NOTMAKE([AM_V])dnl 8823e72ca8cSmrgAC_SUBST([AM_DEFAULT_V])dnl 8833e72ca8cSmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 8843e72ca8cSmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 8853e72ca8cSmrgAM_BACKSLASH='\' 8863e72ca8cSmrgAC_SUBST([AM_BACKSLASH])dnl 8873e72ca8cSmrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 888a1ed278cSmrg]) 88934977a2fSmrg 8903e72ca8cSmrg# Copyright (C) 2001-2012 Free Software Foundation, Inc. 8913e72ca8cSmrg# 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# serial 2 89734977a2fSmrg 8983e72ca8cSmrg# AM_PROG_INSTALL_STRIP 8993e72ca8cSmrg# --------------------- 9003e72ca8cSmrg# One issue with vendor 'install' (even GNU) is that you can't 9013e72ca8cSmrg# specify the program used to strip binaries. This is especially 9023e72ca8cSmrg# annoying in cross-compiling environments, where the build's strip 9033e72ca8cSmrg# is unlikely to handle the host's binaries. 9043e72ca8cSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we 9053e72ca8cSmrg# always use install-sh in "make install-strip", and initialize 9063e72ca8cSmrg# STRIPPROG with the value of the STRIP variable (set by the user). 9073e72ca8cSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 9083e72ca8cSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 9093e72ca8cSmrg# Installed binaries are usually stripped using 'strip' when the user 9103e72ca8cSmrg# run "make install-strip". However 'strip' might not be the right 9113e72ca8cSmrg# tool to use in cross-compilation environments, therefore Automake 9123e72ca8cSmrg# will honor the 'STRIP' environment variable to overrule this program. 9133e72ca8cSmrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 9143e72ca8cSmrgif test "$cross_compiling" != no; then 9153e72ca8cSmrg AC_CHECK_TOOL([STRIP], [strip], :) 9163e72ca8cSmrgfi 9173e72ca8cSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 9183e72ca8cSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 91934977a2fSmrg 9203e72ca8cSmrg# Copyright (C) 2006-2012 Free Software Foundation, Inc. 92134977a2fSmrg# 9223e72ca8cSmrg# This file is free software; the Free Software Foundation 9233e72ca8cSmrg# gives unlimited permission to copy and/or distribute it, 9243e72ca8cSmrg# with or without modifications, as long as this notice is preserved. 92534977a2fSmrg 9263e72ca8cSmrg# serial 3 92734977a2fSmrg 9283e72ca8cSmrg# _AM_SUBST_NOTMAKE(VARIABLE) 9293e72ca8cSmrg# --------------------------- 9303e72ca8cSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 9313e72ca8cSmrg# This macro is traced by Automake. 9323e72ca8cSmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 93334977a2fSmrg 9343e72ca8cSmrg# AM_SUBST_NOTMAKE(VARIABLE) 9353e72ca8cSmrg# -------------------------- 9363e72ca8cSmrg# Public sister of _AM_SUBST_NOTMAKE. 9373e72ca8cSmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 93834977a2fSmrg 9393e72ca8cSmrg# Check how to create a tarball. -*- Autoconf -*- 94034977a2fSmrg 9413e72ca8cSmrg# Copyright (C) 2004-2012 Free Software Foundation, Inc. 9423e72ca8cSmrg# 9433e72ca8cSmrg# This file is free software; the Free Software Foundation 9443e72ca8cSmrg# gives unlimited permission to copy and/or distribute it, 9453e72ca8cSmrg# with or without modifications, as long as this notice is preserved. 94634977a2fSmrg 9473e72ca8cSmrg# serial 3 94834977a2fSmrg 9493e72ca8cSmrg# _AM_PROG_TAR(FORMAT) 9503e72ca8cSmrg# -------------------- 9513e72ca8cSmrg# Check how to create a tarball in format FORMAT. 9523e72ca8cSmrg# FORMAT should be one of 'v7', 'ustar', or 'pax'. 9533e72ca8cSmrg# 9543e72ca8cSmrg# Substitute a variable $(am__tar) that is a command 9553e72ca8cSmrg# writing to stdout a FORMAT-tarball containing the directory 9563e72ca8cSmrg# $tardir. 9573e72ca8cSmrg# tardir=directory && $(am__tar) > result.tar 9583e72ca8cSmrg# 9593e72ca8cSmrg# Substitute a variable $(am__untar) that extract such 9603e72ca8cSmrg# a tarball read from stdin. 9613e72ca8cSmrg# $(am__untar) < result.tar 9623e72ca8cSmrgAC_DEFUN([_AM_PROG_TAR], 9633e72ca8cSmrg[# Always define AMTAR for backward compatibility. Yes, it's still used 9643e72ca8cSmrg# in the wild :-( We should find a proper way to deprecate it ... 9653e72ca8cSmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 9663e72ca8cSmrgm4_if([$1], [v7], 9673e72ca8cSmrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 9683e72ca8cSmrg [m4_case([$1], [ustar],, [pax],, 9693e72ca8cSmrg [m4_fatal([Unknown tar format])]) 9703e72ca8cSmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 9713e72ca8cSmrg# Loop over all known methods to create a tar archive until one works. 9723e72ca8cSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 9733e72ca8cSmrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 9743e72ca8cSmrg# Do not fold the above two line into one, because Tru64 sh and 9753e72ca8cSmrg# Solaris sh will not grok spaces in the rhs of '-'. 9763e72ca8cSmrgfor _am_tool in $_am_tools 9773e72ca8cSmrgdo 9783e72ca8cSmrg case $_am_tool in 9793e72ca8cSmrg gnutar) 9803e72ca8cSmrg for _am_tar in tar gnutar gtar; 9813e72ca8cSmrg do 9823e72ca8cSmrg AM_RUN_LOG([$_am_tar --version]) && break 9833e72ca8cSmrg done 9843e72ca8cSmrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 9853e72ca8cSmrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 9863e72ca8cSmrg am__untar="$_am_tar -xf -" 9873e72ca8cSmrg ;; 9883e72ca8cSmrg plaintar) 9893e72ca8cSmrg # Must skip GNU tar: if it does not support --format= it doesn't create 9903e72ca8cSmrg # ustar tarball either. 9913e72ca8cSmrg (tar --version) >/dev/null 2>&1 && continue 9923e72ca8cSmrg am__tar='tar chf - "$$tardir"' 9933e72ca8cSmrg am__tar_='tar chf - "$tardir"' 9943e72ca8cSmrg am__untar='tar xf -' 9953e72ca8cSmrg ;; 9963e72ca8cSmrg pax) 9973e72ca8cSmrg am__tar='pax -L -x $1 -w "$$tardir"' 9983e72ca8cSmrg am__tar_='pax -L -x $1 -w "$tardir"' 9993e72ca8cSmrg am__untar='pax -r' 10003e72ca8cSmrg ;; 10013e72ca8cSmrg cpio) 10023e72ca8cSmrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 10033e72ca8cSmrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 10043e72ca8cSmrg am__untar='cpio -i -H $1 -d' 10053e72ca8cSmrg ;; 10063e72ca8cSmrg none) 10073e72ca8cSmrg am__tar=false 10083e72ca8cSmrg am__tar_=false 10093e72ca8cSmrg am__untar=false 10103e72ca8cSmrg ;; 10113e72ca8cSmrg esac 101234977a2fSmrg 10133e72ca8cSmrg # If the value was cached, stop now. We just wanted to have am__tar 10143e72ca8cSmrg # and am__untar set. 10153e72ca8cSmrg test -n "${am_cv_prog_tar_$1}" && break 101634977a2fSmrg 10173e72ca8cSmrg # tar/untar a dummy directory, and stop if the command works 10183e72ca8cSmrg rm -rf conftest.dir 10193e72ca8cSmrg mkdir conftest.dir 10203e72ca8cSmrg echo GrepMe > conftest.dir/file 10213e72ca8cSmrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 10223e72ca8cSmrg rm -rf conftest.dir 10233e72ca8cSmrg if test -s conftest.tar; then 10243e72ca8cSmrg AM_RUN_LOG([$am__untar <conftest.tar]) 10253e72ca8cSmrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 10263e72ca8cSmrg fi 10273e72ca8cSmrgdone 10283e72ca8cSmrgrm -rf conftest.dir 102934977a2fSmrg 10303e72ca8cSmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 10313e72ca8cSmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 10323e72ca8cSmrgAC_SUBST([am__tar]) 10333e72ca8cSmrgAC_SUBST([am__untar]) 10343e72ca8cSmrg]) # _AM_PROG_TAR 103534977a2fSmrg 10363e72ca8cSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 10373e72ca8cSmrg# 10383e72ca8cSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 10393e72ca8cSmrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 10403e72ca8cSmrg# Foundation, Inc. 10413e72ca8cSmrg# Written by Gordon Matzigkeit, 1996 10423e72ca8cSmrg# 10433e72ca8cSmrg# This file is free software; the Free Software Foundation gives 10443e72ca8cSmrg# unlimited permission to copy and/or distribute it, with or without 10453e72ca8cSmrg# modifications, as long as this notice is preserved. 104634977a2fSmrg 10473e72ca8cSmrgm4_define([_LT_COPYING], [dnl 10483e72ca8cSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 10493e72ca8cSmrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 10503e72ca8cSmrg# Foundation, Inc. 10513e72ca8cSmrg# Written by Gordon Matzigkeit, 1996 10523e72ca8cSmrg# 10533e72ca8cSmrg# This file is part of GNU Libtool. 10543e72ca8cSmrg# 10553e72ca8cSmrg# GNU Libtool is free software; you can redistribute it and/or 10563e72ca8cSmrg# modify it under the terms of the GNU General Public License as 10573e72ca8cSmrg# published by the Free Software Foundation; either version 2 of 10583e72ca8cSmrg# the License, or (at your option) any later version. 10593e72ca8cSmrg# 10603e72ca8cSmrg# As a special exception to the GNU General Public License, 10613e72ca8cSmrg# if you distribute this file as part of a program or library that 10623e72ca8cSmrg# is built using GNU Libtool, you may include this file under the 10633e72ca8cSmrg# same distribution terms that you use for the rest of that program. 10643e72ca8cSmrg# 10653e72ca8cSmrg# GNU Libtool is distributed in the hope that it will be useful, 10663e72ca8cSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 10673e72ca8cSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10683e72ca8cSmrg# GNU General Public License for more details. 10693e72ca8cSmrg# 10703e72ca8cSmrg# You should have received a copy of the GNU General Public License 10713e72ca8cSmrg# along with GNU Libtool; see the file COPYING. If not, a copy 10723e72ca8cSmrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 10733e72ca8cSmrg# obtained by writing to the Free Software Foundation, Inc., 10743e72ca8cSmrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 10753e72ca8cSmrg]) 107634977a2fSmrg 10773e72ca8cSmrg# serial 57 LT_INIT 1078ee3138f1Smrg 107934977a2fSmrg 10803e72ca8cSmrg# LT_PREREQ(VERSION) 10813e72ca8cSmrg# ------------------ 10823e72ca8cSmrg# Complain and exit if this libtool version is less that VERSION. 10833e72ca8cSmrgm4_defun([LT_PREREQ], 10843e72ca8cSmrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 10853e72ca8cSmrg [m4_default([$3], 10863e72ca8cSmrg [m4_fatal([Libtool version $1 or higher is required], 10873e72ca8cSmrg 63)])], 10883e72ca8cSmrg [$2])]) 1089ee3138f1Smrg 1090ee3138f1Smrg 10913e72ca8cSmrg# _LT_CHECK_BUILDDIR 10923e72ca8cSmrg# ------------------ 10933e72ca8cSmrg# Complain if the absolute build directory name contains unusual characters 10943e72ca8cSmrgm4_defun([_LT_CHECK_BUILDDIR], 10953e72ca8cSmrg[case `pwd` in 10963e72ca8cSmrg *\ * | *\ *) 10973e72ca8cSmrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 10983e72ca8cSmrgesac 1099a1ed278cSmrg]) 1100ee3138f1Smrg 1101ee3138f1Smrg 11023e72ca8cSmrg# LT_INIT([OPTIONS]) 11033e72ca8cSmrg# ------------------ 11043e72ca8cSmrgAC_DEFUN([LT_INIT], 11053e72ca8cSmrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 11063e72ca8cSmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 11073e72ca8cSmrgAC_BEFORE([$0], [LT_LANG])dnl 11083e72ca8cSmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 11093e72ca8cSmrgAC_BEFORE([$0], [LTDL_INIT])dnl 11103e72ca8cSmrgm4_require([_LT_CHECK_BUILDDIR])dnl 1111b425557eSmrg 11123e72ca8cSmrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 11133e72ca8cSmrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 11143e72ca8cSmrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 11153e72ca8cSmrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 11163e72ca8cSmrgdnl unless we require an AC_DEFUNed macro: 11173e72ca8cSmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 11183e72ca8cSmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 11193e72ca8cSmrgAC_REQUIRE([LTVERSION_VERSION])dnl 11203e72ca8cSmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 11213e72ca8cSmrgm4_require([_LT_PROG_LTMAIN])dnl 1122b425557eSmrg 11233e72ca8cSmrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 1124b425557eSmrg 11253e72ca8cSmrgdnl Parse OPTIONS 11263e72ca8cSmrg_LT_SET_OPTIONS([$0], [$1]) 1127ee3138f1Smrg 11283e72ca8cSmrg# This can be used to rebuild libtool when needed 11293e72ca8cSmrgLIBTOOL_DEPS="$ltmain" 1130ee3138f1Smrg 11313e72ca8cSmrg# Always use our own libtool. 11323e72ca8cSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 11333e72ca8cSmrgAC_SUBST(LIBTOOL)dnl 1134ee3138f1Smrg 11353e72ca8cSmrg_LT_SETUP 113679a8a9c6Smrg 11373e72ca8cSmrg# Only expand once: 11383e72ca8cSmrgm4_define([LT_INIT]) 11393e72ca8cSmrg])# LT_INIT 114034977a2fSmrg 11413e72ca8cSmrg# Old names: 11423e72ca8cSmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 11433e72ca8cSmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 11443e72ca8cSmrgdnl aclocal-1.4 backwards compatibility: 11453e72ca8cSmrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 11463e72ca8cSmrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 1147ee3138f1Smrg 1148ee3138f1Smrg 11493e72ca8cSmrg# _LT_CC_BASENAME(CC) 11503e72ca8cSmrg# ------------------- 11513e72ca8cSmrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 11523e72ca8cSmrgm4_defun([_LT_CC_BASENAME], 11533e72ca8cSmrg[for cc_temp in $1""; do 11543e72ca8cSmrg case $cc_temp in 11553e72ca8cSmrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 11563e72ca8cSmrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 11573e72ca8cSmrg \-*) ;; 11583e72ca8cSmrg *) break;; 1159a1ed278cSmrg esac 1160a1ed278cSmrgdone 11613e72ca8cSmrgcc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 11623e72ca8cSmrg]) 1163ee3138f1Smrg 1164ee3138f1Smrg 11653e72ca8cSmrg# _LT_FILEUTILS_DEFAULTS 11663e72ca8cSmrg# ---------------------- 11673e72ca8cSmrg# It is okay to use these file commands and assume they have been set 11683e72ca8cSmrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 11693e72ca8cSmrgm4_defun([_LT_FILEUTILS_DEFAULTS], 11703e72ca8cSmrg[: ${CP="cp -f"} 11713e72ca8cSmrg: ${MV="mv -f"} 11723e72ca8cSmrg: ${RM="rm -f"} 11733e72ca8cSmrg])# _LT_FILEUTILS_DEFAULTS 1174ee3138f1Smrg 1175ee3138f1Smrg 11763e72ca8cSmrg# _LT_SETUP 11773e72ca8cSmrg# --------- 11783e72ca8cSmrgm4_defun([_LT_SETUP], 11793e72ca8cSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 11803e72ca8cSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 11813e72ca8cSmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 11823e72ca8cSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 1183ee3138f1Smrg 11843e72ca8cSmrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 11853e72ca8cSmrgdnl 11863e72ca8cSmrg_LT_DECL([], [host_alias], [0], [The host system])dnl 11873e72ca8cSmrg_LT_DECL([], [host], [0])dnl 11883e72ca8cSmrg_LT_DECL([], [host_os], [0])dnl 11893e72ca8cSmrgdnl 11903e72ca8cSmrg_LT_DECL([], [build_alias], [0], [The build system])dnl 11913e72ca8cSmrg_LT_DECL([], [build], [0])dnl 11923e72ca8cSmrg_LT_DECL([], [build_os], [0])dnl 11933e72ca8cSmrgdnl 11943e72ca8cSmrgAC_REQUIRE([AC_PROG_CC])dnl 11953e72ca8cSmrgAC_REQUIRE([LT_PATH_LD])dnl 11963e72ca8cSmrgAC_REQUIRE([LT_PATH_NM])dnl 11973e72ca8cSmrgdnl 11983e72ca8cSmrgAC_REQUIRE([AC_PROG_LN_S])dnl 11993e72ca8cSmrgtest -z "$LN_S" && LN_S="ln -s" 12003e72ca8cSmrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 12013e72ca8cSmrgdnl 12023e72ca8cSmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 12033e72ca8cSmrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 12043e72ca8cSmrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 12053e72ca8cSmrgdnl 12063e72ca8cSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 12073e72ca8cSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 12083e72ca8cSmrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 12093e72ca8cSmrgm4_require([_LT_CMD_RELOAD])dnl 12103e72ca8cSmrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 12113e72ca8cSmrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 12123e72ca8cSmrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 12133e72ca8cSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 12143e72ca8cSmrgm4_require([_LT_WITH_SYSROOT])dnl 1215ee3138f1Smrg 12163e72ca8cSmrg_LT_CONFIG_LIBTOOL_INIT([ 12173e72ca8cSmrg# See if we are running on zsh, and set the options which allow our 12183e72ca8cSmrg# commands through without removal of \ escapes INIT. 12193e72ca8cSmrgif test -n "\${ZSH_VERSION+set}" ; then 12203e72ca8cSmrg setopt NO_GLOB_SUBST 12213e72ca8cSmrgfi 12223e72ca8cSmrg]) 12233e72ca8cSmrgif test -n "${ZSH_VERSION+set}" ; then 12243e72ca8cSmrg setopt NO_GLOB_SUBST 12253e72ca8cSmrgfi 1226ee3138f1Smrg 12273e72ca8cSmrg_LT_CHECK_OBJDIR 1228ee3138f1Smrg 12293e72ca8cSmrgm4_require([_LT_TAG_COMPILER])dnl 1230ee3138f1Smrg 12313e72ca8cSmrgcase $host_os in 12323e72ca8cSmrgaix3*) 12333e72ca8cSmrg # AIX sometimes has problems with the GCC collect2 program. For some 12343e72ca8cSmrg # reason, if we set the COLLECT_NAMES environment variable, the problems 12353e72ca8cSmrg # vanish in a puff of smoke. 12363e72ca8cSmrg if test "X${COLLECT_NAMES+set}" != Xset; then 12373e72ca8cSmrg COLLECT_NAMES= 12383e72ca8cSmrg export COLLECT_NAMES 12393e72ca8cSmrg fi 12403e72ca8cSmrg ;; 12413e72ca8cSmrgesac 1242ee3138f1Smrg 12433e72ca8cSmrg# Global variables: 12443e72ca8cSmrgofile=libtool 12453e72ca8cSmrgcan_build_shared=yes 1246ee3138f1Smrg 12473e72ca8cSmrg# All known linkers require a `.a' archive for static linking (except MSVC, 12483e72ca8cSmrg# which needs '.lib'). 12493e72ca8cSmrglibext=a 1250ee3138f1Smrg 12513e72ca8cSmrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 1252ee3138f1Smrg 12533e72ca8cSmrgold_CC="$CC" 12543e72ca8cSmrgold_CFLAGS="$CFLAGS" 1255ee3138f1Smrg 12563e72ca8cSmrg# Set sane defaults for various variables 12573e72ca8cSmrgtest -z "$CC" && CC=cc 12583e72ca8cSmrgtest -z "$LTCC" && LTCC=$CC 12593e72ca8cSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 12603e72ca8cSmrgtest -z "$LD" && LD=ld 12613e72ca8cSmrgtest -z "$ac_objext" && ac_objext=o 1262ee3138f1Smrg 12633e72ca8cSmrg_LT_CC_BASENAME([$compiler]) 1264ee3138f1Smrg 12653e72ca8cSmrg# Only perform the check for file, if the check method requires it 12663e72ca8cSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 12673e72ca8cSmrgcase $deplibs_check_method in 12683e72ca8cSmrgfile_magic*) 12693e72ca8cSmrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 12703e72ca8cSmrg _LT_PATH_MAGIC 12713e72ca8cSmrg fi 12723e72ca8cSmrg ;; 12733e72ca8cSmrgesac 1274b425557eSmrg 12753e72ca8cSmrg# Use C for the default configuration in the libtool script 12763e72ca8cSmrgLT_SUPPORTED_TAG([CC]) 12773e72ca8cSmrg_LT_LANG_C_CONFIG 12783e72ca8cSmrg_LT_LANG_DEFAULT_CONFIG 12793e72ca8cSmrg_LT_CONFIG_COMMANDS 12803e72ca8cSmrg])# _LT_SETUP 128134977a2fSmrg 128234977a2fSmrg 12833e72ca8cSmrg# _LT_PREPARE_SED_QUOTE_VARS 12843e72ca8cSmrg# -------------------------- 12853e72ca8cSmrg# Define a few sed substitution that help us do robust quoting. 12863e72ca8cSmrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 12873e72ca8cSmrg[# Backslashify metacharacters that are still active within 12883e72ca8cSmrg# double-quoted strings. 12893e72ca8cSmrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 1290b425557eSmrg 12913e72ca8cSmrg# Same as above, but do not quote variable references. 12923e72ca8cSmrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 1293b425557eSmrg 12943e72ca8cSmrg# Sed substitution to delay expansion of an escaped shell variable in a 12953e72ca8cSmrg# double_quote_subst'ed string. 12963e72ca8cSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 129734977a2fSmrg 12983e72ca8cSmrg# Sed substitution to delay expansion of an escaped single quote. 12993e72ca8cSmrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 1300b425557eSmrg 13013e72ca8cSmrg# Sed substitution to avoid accidental globbing in evaled expressions 13023e72ca8cSmrgno_glob_subst='s/\*/\\\*/g' 13033e72ca8cSmrg]) 130434977a2fSmrg 13053e72ca8cSmrg# _LT_PROG_LTMAIN 13063e72ca8cSmrg# --------------- 13073e72ca8cSmrg# Note that this code is called both from `configure', and `config.status' 13083e72ca8cSmrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 13093e72ca8cSmrg# `config.status' has no value for ac_aux_dir unless we are using Automake, 13103e72ca8cSmrg# so we pass a copy along to make sure it has a sensible value anyway. 13113e72ca8cSmrgm4_defun([_LT_PROG_LTMAIN], 13123e72ca8cSmrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 13133e72ca8cSmrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 13143e72ca8cSmrgltmain="$ac_aux_dir/ltmain.sh" 13153e72ca8cSmrg])# _LT_PROG_LTMAIN 1316b425557eSmrg 131734977a2fSmrg 1318ee3138f1Smrg 13193e72ca8cSmrg# So that we can recreate a full libtool script including additional 13203e72ca8cSmrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 13213e72ca8cSmrg# in macros and then make a single call at the end using the `libtool' 13223e72ca8cSmrg# label. 1323ee3138f1Smrg 1324ee3138f1Smrg 13253e72ca8cSmrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 13263e72ca8cSmrg# ---------------------------------------- 13273e72ca8cSmrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 13283e72ca8cSmrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 13293e72ca8cSmrg[m4_ifval([$1], 13303e72ca8cSmrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 13313e72ca8cSmrg [$1 13323e72ca8cSmrg])])]) 1333b425557eSmrg 13343e72ca8cSmrg# Initialize. 13353e72ca8cSmrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 1336ee3138f1Smrg 1337b425557eSmrg 13383e72ca8cSmrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 13393e72ca8cSmrg# ------------------------------ 13403e72ca8cSmrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 13413e72ca8cSmrgm4_define([_LT_CONFIG_LIBTOOL], 13423e72ca8cSmrg[m4_ifval([$1], 13433e72ca8cSmrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 13443e72ca8cSmrg [$1 13453e72ca8cSmrg])])]) 1346ee3138f1Smrg 13473e72ca8cSmrg# Initialize. 13483e72ca8cSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 1349a1ed278cSmrg 1350a1ed278cSmrg 13513e72ca8cSmrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 13523e72ca8cSmrg# ----------------------------------------------------- 13533e72ca8cSmrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 13543e72ca8cSmrg[_LT_CONFIG_LIBTOOL([$1]) 13553e72ca8cSmrg_LT_CONFIG_LIBTOOL_INIT([$2]) 13563e72ca8cSmrg]) 1357ee3138f1Smrg 1358ee3138f1Smrg 13593e72ca8cSmrg# _LT_FORMAT_COMMENT([COMMENT]) 13603e72ca8cSmrg# ----------------------------- 13613e72ca8cSmrg# Add leading comment marks to the start of each line, and a trailing 13623e72ca8cSmrg# full-stop to the whole comment if one is not present already. 13633e72ca8cSmrgm4_define([_LT_FORMAT_COMMENT], 13643e72ca8cSmrg[m4_ifval([$1], [ 13653e72ca8cSmrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 13663e72ca8cSmrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 13673e72ca8cSmrg)]) 1368ee3138f1Smrg 1369ee3138f1Smrg 1370ee3138f1Smrg 1371ee3138f1Smrg 1372ee3138f1Smrg 13733e72ca8cSmrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 13743e72ca8cSmrg# ------------------------------------------------------------------- 13753e72ca8cSmrg# CONFIGNAME is the name given to the value in the libtool script. 13763e72ca8cSmrg# VARNAME is the (base) name used in the configure script. 13773e72ca8cSmrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 13783e72ca8cSmrg# VARNAME. Any other value will be used directly. 13793e72ca8cSmrgm4_define([_LT_DECL], 13803e72ca8cSmrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 13813e72ca8cSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 13823e72ca8cSmrg [m4_ifval([$1], [$1], [$2])]) 13833e72ca8cSmrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 13843e72ca8cSmrg m4_ifval([$4], 13853e72ca8cSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 13863e72ca8cSmrg lt_dict_add_subkey([lt_decl_dict], [$2], 13873e72ca8cSmrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 13883e72ca8cSmrg]) 1389ee3138f1Smrg 139034977a2fSmrg 13913e72ca8cSmrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 13923e72ca8cSmrg# -------------------------------------------------------- 13933e72ca8cSmrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 1394ee3138f1Smrg 1395ee3138f1Smrg 13963e72ca8cSmrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 13973e72ca8cSmrg# ------------------------------------------------ 13983e72ca8cSmrgm4_define([lt_decl_tag_varnames], 13993e72ca8cSmrg[_lt_decl_filter([tagged?], [yes], $@)]) 1400ee3138f1Smrg 14013e72ca8cSmrg 14023e72ca8cSmrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 14033e72ca8cSmrg# --------------------------------------------------------- 14043e72ca8cSmrgm4_define([_lt_decl_filter], 14053e72ca8cSmrg[m4_case([$#], 14063e72ca8cSmrg [0], [m4_fatal([$0: too few arguments: $#])], 14073e72ca8cSmrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 14083e72ca8cSmrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 14093e72ca8cSmrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 14103e72ca8cSmrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 1411a1ed278cSmrg]) 1412ee3138f1Smrg 1413ee3138f1Smrg 14143e72ca8cSmrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 14153e72ca8cSmrg# -------------------------------------------------- 14163e72ca8cSmrgm4_define([lt_decl_quote_varnames], 14173e72ca8cSmrg[_lt_decl_filter([value], [1], $@)]) 1418ee3138f1Smrg 1419ee3138f1Smrg 14203e72ca8cSmrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 14213e72ca8cSmrg# --------------------------------------------------- 14223e72ca8cSmrgm4_define([lt_decl_dquote_varnames], 14233e72ca8cSmrg[_lt_decl_filter([value], [2], $@)]) 1424a1ed278cSmrg 1425a1ed278cSmrg 14263e72ca8cSmrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 14273e72ca8cSmrg# --------------------------------------------------- 14283e72ca8cSmrgm4_define([lt_decl_varnames_tagged], 14293e72ca8cSmrg[m4_assert([$# <= 2])dnl 14303e72ca8cSmrg_$0(m4_quote(m4_default([$1], [[, ]])), 14313e72ca8cSmrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 14323e72ca8cSmrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 14333e72ca8cSmrgm4_define([_lt_decl_varnames_tagged], 14343e72ca8cSmrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 1435ee3138f1Smrg 1436ee3138f1Smrg 14373e72ca8cSmrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 14383e72ca8cSmrg# ------------------------------------------------ 14393e72ca8cSmrgm4_define([lt_decl_all_varnames], 14403e72ca8cSmrg[_$0(m4_quote(m4_default([$1], [[, ]])), 14413e72ca8cSmrg m4_if([$2], [], 14423e72ca8cSmrg m4_quote(lt_decl_varnames), 14433e72ca8cSmrg m4_quote(m4_shift($@))))[]dnl 14443e72ca8cSmrg]) 14453e72ca8cSmrgm4_define([_lt_decl_all_varnames], 14463e72ca8cSmrg[lt_join($@, lt_decl_varnames_tagged([$1], 14473e72ca8cSmrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 14483e72ca8cSmrg]) 1449ee3138f1Smrg 1450ee3138f1Smrg 14513e72ca8cSmrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 14523e72ca8cSmrg# ------------------------------------ 14533e72ca8cSmrg# Quote a variable value, and forward it to `config.status' so that its 14543e72ca8cSmrg# declaration there will have the same value as in `configure'. VARNAME 14553e72ca8cSmrg# must have a single quote delimited value for this to work. 14563e72ca8cSmrgm4_define([_LT_CONFIG_STATUS_DECLARE], 14573e72ca8cSmrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 1458ee3138f1Smrg 1459ee3138f1Smrg 14603e72ca8cSmrg# _LT_CONFIG_STATUS_DECLARATIONS 14613e72ca8cSmrg# ------------------------------ 14623e72ca8cSmrg# We delimit libtool config variables with single quotes, so when 14633e72ca8cSmrg# we write them to config.status, we have to be sure to quote all 14643e72ca8cSmrg# embedded single quotes properly. In configure, this macro expands 14653e72ca8cSmrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 14663e72ca8cSmrg# 14673e72ca8cSmrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 14683e72ca8cSmrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 14693e72ca8cSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 14703e72ca8cSmrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 1471ee3138f1Smrg 1472ee3138f1Smrg 14733e72ca8cSmrg# _LT_LIBTOOL_TAGS 14743e72ca8cSmrg# ---------------- 14753e72ca8cSmrg# Output comment and list of tags supported by the script 14763e72ca8cSmrgm4_defun([_LT_LIBTOOL_TAGS], 14773e72ca8cSmrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 14783e72ca8cSmrgavailable_tags="_LT_TAGS"dnl 14793e72ca8cSmrg]) 1480ee3138f1Smrg 1481ee3138f1Smrg 14823e72ca8cSmrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 14833e72ca8cSmrg# ----------------------------------- 14843e72ca8cSmrg# Extract the dictionary values for VARNAME (optionally with TAG) and 14853e72ca8cSmrg# expand to a commented shell variable setting: 14863e72ca8cSmrg# 14873e72ca8cSmrg# # Some comment about what VAR is for. 14883e72ca8cSmrg# visible_name=$lt_internal_name 14893e72ca8cSmrgm4_define([_LT_LIBTOOL_DECLARE], 14903e72ca8cSmrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 14913e72ca8cSmrg [description])))[]dnl 14923e72ca8cSmrgm4_pushdef([_libtool_name], 14933e72ca8cSmrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 14943e72ca8cSmrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 14953e72ca8cSmrg [0], [_libtool_name=[$]$1], 14963e72ca8cSmrg [1], [_libtool_name=$lt_[]$1], 14973e72ca8cSmrg [2], [_libtool_name=$lt_[]$1], 14983e72ca8cSmrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 14993e72ca8cSmrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 15003e72ca8cSmrg]) 1501ee3138f1Smrg 1502ee3138f1Smrg 15033e72ca8cSmrg# _LT_LIBTOOL_CONFIG_VARS 15043e72ca8cSmrg# ----------------------- 15053e72ca8cSmrg# Produce commented declarations of non-tagged libtool config variables 15063e72ca8cSmrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 15073e72ca8cSmrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 15083e72ca8cSmrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 15093e72ca8cSmrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 15103e72ca8cSmrg[m4_foreach([_lt_var], 15113e72ca8cSmrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 15123e72ca8cSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 151334977a2fSmrg 1514ee3138f1Smrg 15153e72ca8cSmrg# _LT_LIBTOOL_TAG_VARS(TAG) 15163e72ca8cSmrg# ------------------------- 15173e72ca8cSmrgm4_define([_LT_LIBTOOL_TAG_VARS], 15183e72ca8cSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 15193e72ca8cSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 1520ee3138f1Smrg 1521ee3138f1Smrg 15223e72ca8cSmrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 15233e72ca8cSmrg# ------------------------------ 15243e72ca8cSmrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 1525ee3138f1Smrg 1526b425557eSmrg 15273e72ca8cSmrg# _LT_CONFIG_COMMANDS 15283e72ca8cSmrg# ------------------- 15293e72ca8cSmrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 15303e72ca8cSmrg# variables for single and double quote escaping we saved from calls 15313e72ca8cSmrg# to _LT_DECL, we can put quote escaped variables declarations 15323e72ca8cSmrg# into `config.status', and then the shell code to quote escape them in 15333e72ca8cSmrg# for loops in `config.status'. Finally, any additional code accumulated 15343e72ca8cSmrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 15353e72ca8cSmrgm4_defun([_LT_CONFIG_COMMANDS], 15363e72ca8cSmrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 15373e72ca8cSmrg dnl If the libtool generation code has been placed in $CONFIG_LT, 15383e72ca8cSmrg dnl instead of duplicating it all over again into config.status, 15393e72ca8cSmrg dnl then we will have config.status run $CONFIG_LT later, so it 15403e72ca8cSmrg dnl needs to know what name is stored there: 15413e72ca8cSmrg [AC_CONFIG_COMMANDS([libtool], 15423e72ca8cSmrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 15433e72ca8cSmrg dnl If the libtool generation code is destined for config.status, 15443e72ca8cSmrg dnl expand the accumulated commands and init code now: 15453e72ca8cSmrg [AC_CONFIG_COMMANDS([libtool], 15463e72ca8cSmrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 15473e72ca8cSmrg])#_LT_CONFIG_COMMANDS 1548ee3138f1Smrg 1549ee3138f1Smrg 15503e72ca8cSmrg# Initialize. 15513e72ca8cSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 15523e72ca8cSmrg[ 1553ee3138f1Smrg 15543e72ca8cSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 15553e72ca8cSmrg# if CDPATH is set. 15563e72ca8cSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 1557ee3138f1Smrg 15583e72ca8cSmrgsed_quote_subst='$sed_quote_subst' 15593e72ca8cSmrgdouble_quote_subst='$double_quote_subst' 15603e72ca8cSmrgdelay_variable_subst='$delay_variable_subst' 15613e72ca8cSmrg_LT_CONFIG_STATUS_DECLARATIONS 15623e72ca8cSmrgLTCC='$LTCC' 15633e72ca8cSmrgLTCFLAGS='$LTCFLAGS' 15643e72ca8cSmrgcompiler='$compiler_DEFAULT' 1565ee3138f1Smrg 15663e72ca8cSmrg# A function that is used when there is no print builtin or printf. 15673e72ca8cSmrgfunc_fallback_echo () 15683e72ca8cSmrg{ 15693e72ca8cSmrg eval 'cat <<_LTECHO_EOF 15703e72ca8cSmrg\$[]1 15713e72ca8cSmrg_LTECHO_EOF' 15723e72ca8cSmrg} 1573ee3138f1Smrg 15743e72ca8cSmrg# Quote evaled strings. 15753e72ca8cSmrgfor var in lt_decl_all_varnames([[ \ 15763e72ca8cSmrg]], lt_decl_quote_varnames); do 15773e72ca8cSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 15783e72ca8cSmrg *[[\\\\\\\`\\"\\\$]]*) 15793e72ca8cSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 15803e72ca8cSmrg ;; 15813e72ca8cSmrg *) 15823e72ca8cSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 15833e72ca8cSmrg ;; 15843e72ca8cSmrg esac 15853e72ca8cSmrgdone 15863e72ca8cSmrg 15873e72ca8cSmrg# Double-quote double-evaled strings. 15883e72ca8cSmrgfor var in lt_decl_all_varnames([[ \ 15893e72ca8cSmrg]], lt_decl_dquote_varnames); do 15903e72ca8cSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 15913e72ca8cSmrg *[[\\\\\\\`\\"\\\$]]*) 15923e72ca8cSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 15933e72ca8cSmrg ;; 15943e72ca8cSmrg *) 15953e72ca8cSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 15963e72ca8cSmrg ;; 15973e72ca8cSmrg esac 15983e72ca8cSmrgdone 15993e72ca8cSmrg 16003e72ca8cSmrg_LT_OUTPUT_LIBTOOL_INIT 1601b425557eSmrg]) 1602ee3138f1Smrg 16033e72ca8cSmrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 16043e72ca8cSmrg# ------------------------------------ 16053e72ca8cSmrg# Generate a child script FILE with all initialization necessary to 16063e72ca8cSmrg# reuse the environment learned by the parent script, and make the 16073e72ca8cSmrg# file executable. If COMMENT is supplied, it is inserted after the 16083e72ca8cSmrg# `#!' sequence but before initialization text begins. After this 16093e72ca8cSmrg# macro, additional text can be appended to FILE to form the body of 16103e72ca8cSmrg# the child script. The macro ends with non-zero status if the 16113e72ca8cSmrg# file could not be fully written (such as if the disk is full). 16123e72ca8cSmrgm4_ifdef([AS_INIT_GENERATED], 16133e72ca8cSmrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 16143e72ca8cSmrg[m4_defun([_LT_GENERATED_FILE_INIT], 16153e72ca8cSmrg[m4_require([AS_PREPARE])]dnl 16163e72ca8cSmrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 16173e72ca8cSmrg[lt_write_fail=0 16183e72ca8cSmrgcat >$1 <<_ASEOF || lt_write_fail=1 16193e72ca8cSmrg#! $SHELL 16203e72ca8cSmrg# Generated by $as_me. 16213e72ca8cSmrg$2 16223e72ca8cSmrgSHELL=\${CONFIG_SHELL-$SHELL} 16233e72ca8cSmrgexport SHELL 16243e72ca8cSmrg_ASEOF 16253e72ca8cSmrgcat >>$1 <<\_ASEOF || lt_write_fail=1 16263e72ca8cSmrgAS_SHELL_SANITIZE 16273e72ca8cSmrg_AS_PREPARE 16283e72ca8cSmrgexec AS_MESSAGE_FD>&1 16293e72ca8cSmrg_ASEOF 16303e72ca8cSmrgtest $lt_write_fail = 0 && chmod +x $1[]dnl 16313e72ca8cSmrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 1632b425557eSmrg 16333e72ca8cSmrg# LT_OUTPUT 16343e72ca8cSmrg# --------- 16353e72ca8cSmrg# This macro allows early generation of the libtool script (before 16363e72ca8cSmrg# AC_OUTPUT is called), incase it is used in configure for compilation 16373e72ca8cSmrg# tests. 16383e72ca8cSmrgAC_DEFUN([LT_OUTPUT], 16393e72ca8cSmrg[: ${CONFIG_LT=./config.lt} 16403e72ca8cSmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 16413e72ca8cSmrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 16423e72ca8cSmrg[# Run this file to recreate a libtool stub with the current configuration.]) 1643b425557eSmrg 16443e72ca8cSmrgcat >>"$CONFIG_LT" <<\_LTEOF 16453e72ca8cSmrglt_cl_silent=false 16463e72ca8cSmrgexec AS_MESSAGE_LOG_FD>>config.log 16473e72ca8cSmrg{ 16483e72ca8cSmrg echo 16493e72ca8cSmrg AS_BOX([Running $as_me.]) 16503e72ca8cSmrg} >&AS_MESSAGE_LOG_FD 1651b425557eSmrg 16523e72ca8cSmrglt_cl_help="\ 16533e72ca8cSmrg\`$as_me' creates a local libtool stub from the current configuration, 16543e72ca8cSmrgfor use in further configure time tests before the real libtool is 16553e72ca8cSmrggenerated. 1656b425557eSmrg 16573e72ca8cSmrgUsage: $[0] [[OPTIONS]] 1658b425557eSmrg 16593e72ca8cSmrg -h, --help print this help, then exit 16603e72ca8cSmrg -V, --version print version number, then exit 16613e72ca8cSmrg -q, --quiet do not print progress messages 16623e72ca8cSmrg -d, --debug don't remove temporary files 1663b425557eSmrg 16643e72ca8cSmrgReport bugs to <bug-libtool@gnu.org>." 1665b425557eSmrg 16663e72ca8cSmrglt_cl_version="\ 16673e72ca8cSmrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 16683e72ca8cSmrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 16693e72ca8cSmrgconfigured by $[0], generated by m4_PACKAGE_STRING. 1670b425557eSmrg 16713e72ca8cSmrgCopyright (C) 2011 Free Software Foundation, Inc. 16723e72ca8cSmrgThis config.lt script is free software; the Free Software Foundation 16733e72ca8cSmrggives unlimited permision to copy, distribute and modify it." 1674b425557eSmrg 16753e72ca8cSmrgwhile test $[#] != 0 16763e72ca8cSmrgdo 16773e72ca8cSmrg case $[1] in 16783e72ca8cSmrg --version | --v* | -V ) 16793e72ca8cSmrg echo "$lt_cl_version"; exit 0 ;; 16803e72ca8cSmrg --help | --h* | -h ) 16813e72ca8cSmrg echo "$lt_cl_help"; exit 0 ;; 16823e72ca8cSmrg --debug | --d* | -d ) 16833e72ca8cSmrg debug=: ;; 16843e72ca8cSmrg --quiet | --q* | --silent | --s* | -q ) 16853e72ca8cSmrg lt_cl_silent=: ;; 1686b425557eSmrg 16873e72ca8cSmrg -*) AC_MSG_ERROR([unrecognized option: $[1] 16883e72ca8cSmrgTry \`$[0] --help' for more information.]) ;; 1689b425557eSmrg 16903e72ca8cSmrg *) AC_MSG_ERROR([unrecognized argument: $[1] 16913e72ca8cSmrgTry \`$[0] --help' for more information.]) ;; 1692ee3138f1Smrg esac 16933e72ca8cSmrg shift 16943e72ca8cSmrgdone 1695b425557eSmrg 16963e72ca8cSmrgif $lt_cl_silent; then 16973e72ca8cSmrg exec AS_MESSAGE_FD>/dev/null 16983e72ca8cSmrgfi 16993e72ca8cSmrg_LTEOF 1700b425557eSmrg 17013e72ca8cSmrgcat >>"$CONFIG_LT" <<_LTEOF 17023e72ca8cSmrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 17033e72ca8cSmrg_LTEOF 1704b425557eSmrg 17053e72ca8cSmrgcat >>"$CONFIG_LT" <<\_LTEOF 17063e72ca8cSmrgAC_MSG_NOTICE([creating $ofile]) 17073e72ca8cSmrg_LT_OUTPUT_LIBTOOL_COMMANDS 17083e72ca8cSmrgAS_EXIT(0) 17093e72ca8cSmrg_LTEOF 17103e72ca8cSmrgchmod +x "$CONFIG_LT" 1711ee3138f1Smrg 17123e72ca8cSmrg# configure is writing to config.log, but config.lt does its own redirection, 17133e72ca8cSmrg# appending to config.log, which fails on DOS, as config.log is still kept 17143e72ca8cSmrg# open by configure. Here we exec the FD to /dev/null, effectively closing 17153e72ca8cSmrg# config.log, so it can be properly (re)opened and appended to by config.lt. 17163e72ca8cSmrglt_cl_success=: 17173e72ca8cSmrgtest "$silent" = yes && 17183e72ca8cSmrg lt_config_lt_args="$lt_config_lt_args --quiet" 17193e72ca8cSmrgexec AS_MESSAGE_LOG_FD>/dev/null 17203e72ca8cSmrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 17213e72ca8cSmrgexec AS_MESSAGE_LOG_FD>>config.log 17223e72ca8cSmrg$lt_cl_success || AS_EXIT(1) 17233e72ca8cSmrg])# LT_OUTPUT 1724ee3138f1Smrg 1725ee3138f1Smrg 17263e72ca8cSmrg# _LT_CONFIG(TAG) 17273e72ca8cSmrg# --------------- 17283e72ca8cSmrg# If TAG is the built-in tag, create an initial libtool script with a 17293e72ca8cSmrg# default configuration from the untagged config vars. Otherwise add code 17303e72ca8cSmrg# to config.status for appending the configuration named by TAG from the 17313e72ca8cSmrg# matching tagged config vars. 17323e72ca8cSmrgm4_defun([_LT_CONFIG], 17333e72ca8cSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 17343e72ca8cSmrg_LT_CONFIG_SAVE_COMMANDS([ 17353e72ca8cSmrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 17363e72ca8cSmrg m4_if(_LT_TAG, [C], [ 17373e72ca8cSmrg # See if we are running on zsh, and set the options which allow our 17383e72ca8cSmrg # commands through without removal of \ escapes. 17393e72ca8cSmrg if test -n "${ZSH_VERSION+set}" ; then 17403e72ca8cSmrg setopt NO_GLOB_SUBST 17413e72ca8cSmrg fi 1742ee3138f1Smrg 17433e72ca8cSmrg cfgfile="${ofile}T" 17443e72ca8cSmrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 17453e72ca8cSmrg $RM "$cfgfile" 1746ee3138f1Smrg 17473e72ca8cSmrg cat <<_LT_EOF >> "$cfgfile" 17483e72ca8cSmrg#! $SHELL 1749ee3138f1Smrg 17503e72ca8cSmrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 17513e72ca8cSmrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 17523e72ca8cSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 17533e72ca8cSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 17543e72ca8cSmrg# 17553e72ca8cSmrg_LT_COPYING 17563e72ca8cSmrg_LT_LIBTOOL_TAGS 1757ee3138f1Smrg 17583e72ca8cSmrg# ### BEGIN LIBTOOL CONFIG 17593e72ca8cSmrg_LT_LIBTOOL_CONFIG_VARS 17603e72ca8cSmrg_LT_LIBTOOL_TAG_VARS 17613e72ca8cSmrg# ### END LIBTOOL CONFIG 1762ee3138f1Smrg 1763a1ed278cSmrg_LT_EOF 17643e72ca8cSmrg 17653e72ca8cSmrg case $host_os in 17663e72ca8cSmrg aix3*) 17673e72ca8cSmrg cat <<\_LT_EOF >> "$cfgfile" 17683e72ca8cSmrg# AIX sometimes has problems with the GCC collect2 program. For some 17693e72ca8cSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems 17703e72ca8cSmrg# vanish in a puff of smoke. 17713e72ca8cSmrgif test "X${COLLECT_NAMES+set}" != Xset; then 17723e72ca8cSmrg COLLECT_NAMES= 17733e72ca8cSmrg export COLLECT_NAMES 1774a1ed278cSmrgfi 17753e72ca8cSmrg_LT_EOF 17763e72ca8cSmrg ;; 17773e72ca8cSmrg esac 1778ee3138f1Smrg 17793e72ca8cSmrg _LT_PROG_LTMAIN 1780ee3138f1Smrg 17813e72ca8cSmrg # We use sed instead of cat because bash on DJGPP gets confused if 17823e72ca8cSmrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 17833e72ca8cSmrg # text mode, it properly converts lines to CR/LF. This bash problem 17843e72ca8cSmrg # is reportedly fixed, but why not run on old versions too? 17853e72ca8cSmrg sed '$q' "$ltmain" >> "$cfgfile" \ 17863e72ca8cSmrg || (rm -f "$cfgfile"; exit 1) 1787ee3138f1Smrg 17883e72ca8cSmrg _LT_PROG_REPLACE_SHELLFNS 1789ee3138f1Smrg 17903e72ca8cSmrg mv -f "$cfgfile" "$ofile" || 17913e72ca8cSmrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 17923e72ca8cSmrg chmod +x "$ofile" 17933e72ca8cSmrg], 17943e72ca8cSmrg[cat <<_LT_EOF >> "$ofile" 1795ee3138f1Smrg 17963e72ca8cSmrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 17973e72ca8cSmrgdnl in a comment (ie after a #). 17983e72ca8cSmrg# ### BEGIN LIBTOOL TAG CONFIG: $1 17993e72ca8cSmrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 18003e72ca8cSmrg# ### END LIBTOOL TAG CONFIG: $1 18013e72ca8cSmrg_LT_EOF 18023e72ca8cSmrg])dnl /m4_if 18033e72ca8cSmrg], 18043e72ca8cSmrg[m4_if([$1], [], [ 18053e72ca8cSmrg PACKAGE='$PACKAGE' 18063e72ca8cSmrg VERSION='$VERSION' 18073e72ca8cSmrg TIMESTAMP='$TIMESTAMP' 18083e72ca8cSmrg RM='$RM' 18093e72ca8cSmrg ofile='$ofile'], []) 18103e72ca8cSmrg])dnl /_LT_CONFIG_SAVE_COMMANDS 18113e72ca8cSmrg])# _LT_CONFIG 1812ee3138f1Smrg 1813ee3138f1Smrg 18143e72ca8cSmrg# LT_SUPPORTED_TAG(TAG) 18153e72ca8cSmrg# --------------------- 18163e72ca8cSmrg# Trace this macro to discover what tags are supported by the libtool 18173e72ca8cSmrg# --tag option, using: 18183e72ca8cSmrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 18193e72ca8cSmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 1820ee3138f1Smrg 1821ee3138f1Smrg 18223e72ca8cSmrg# C support is built-in for now 18233e72ca8cSmrgm4_define([_LT_LANG_C_enabled], []) 18243e72ca8cSmrgm4_define([_LT_TAGS], []) 182534977a2fSmrg 182679a8a9c6Smrg 18273e72ca8cSmrg# LT_LANG(LANG) 18283e72ca8cSmrg# ------------- 18293e72ca8cSmrg# Enable libtool support for the given language if not already enabled. 18303e72ca8cSmrgAC_DEFUN([LT_LANG], 18313e72ca8cSmrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 18323e72ca8cSmrgm4_case([$1], 18333e72ca8cSmrg [C], [_LT_LANG(C)], 18343e72ca8cSmrg [C++], [_LT_LANG(CXX)], 18353e72ca8cSmrg [Go], [_LT_LANG(GO)], 18363e72ca8cSmrg [Java], [_LT_LANG(GCJ)], 18373e72ca8cSmrg [Fortran 77], [_LT_LANG(F77)], 18383e72ca8cSmrg [Fortran], [_LT_LANG(FC)], 18393e72ca8cSmrg [Windows Resource], [_LT_LANG(RC)], 18403e72ca8cSmrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 18413e72ca8cSmrg [_LT_LANG($1)], 18423e72ca8cSmrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 18433e72ca8cSmrg])# LT_LANG 1844ee3138f1Smrg 1845ee3138f1Smrg 18463e72ca8cSmrg# _LT_LANG(LANGNAME) 18473e72ca8cSmrg# ------------------ 18483e72ca8cSmrgm4_defun([_LT_LANG], 18493e72ca8cSmrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 18503e72ca8cSmrg [LT_SUPPORTED_TAG([$1])dnl 18513e72ca8cSmrg m4_append([_LT_TAGS], [$1 ])dnl 18523e72ca8cSmrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 18533e72ca8cSmrg _LT_LANG_$1_CONFIG($1)])dnl 18543e72ca8cSmrg])# _LT_LANG 1855ee3138f1Smrg 1856ee3138f1Smrg 18573e72ca8cSmrgm4_ifndef([AC_PROG_GO], [ 18583e72ca8cSmrg# NOTE: This macro has been submitted for inclusion into # 18593e72ca8cSmrg# GNU Autoconf as AC_PROG_GO. When it is available in # 18603e72ca8cSmrg# a released version of Autoconf we should remove this # 18613e72ca8cSmrg# macro and use it instead. # 18623e72ca8cSmrgm4_defun([AC_PROG_GO], 18633e72ca8cSmrg[AC_LANG_PUSH(Go)dnl 18643e72ca8cSmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 18653e72ca8cSmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 18663e72ca8cSmrg_AC_ARG_VAR_LDFLAGS()dnl 18673e72ca8cSmrgAC_CHECK_TOOL(GOC, gccgo) 18683e72ca8cSmrgif test -z "$GOC"; then 18693e72ca8cSmrg if test -n "$ac_tool_prefix"; then 18703e72ca8cSmrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 18713e72ca8cSmrg fi 1872a1ed278cSmrgfi 18733e72ca8cSmrgif test -z "$GOC"; then 18743e72ca8cSmrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 18753e72ca8cSmrgfi 18763e72ca8cSmrg])#m4_defun 18773e72ca8cSmrg])#m4_ifndef 1878ee3138f1Smrg 1879ee3138f1Smrg 18803e72ca8cSmrg# _LT_LANG_DEFAULT_CONFIG 18813e72ca8cSmrg# ----------------------- 18823e72ca8cSmrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 18833e72ca8cSmrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 18843e72ca8cSmrg [LT_LANG(CXX)], 18853e72ca8cSmrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 1886ee3138f1Smrg 18873e72ca8cSmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 18883e72ca8cSmrg [LT_LANG(F77)], 18893e72ca8cSmrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 1890ee3138f1Smrg 18913e72ca8cSmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 18923e72ca8cSmrg [LT_LANG(FC)], 18933e72ca8cSmrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 1894ee3138f1Smrg 18953e72ca8cSmrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 18963e72ca8cSmrgdnl pulling things in needlessly. 18973e72ca8cSmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 18983e72ca8cSmrg [LT_LANG(GCJ)], 18993e72ca8cSmrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 19003e72ca8cSmrg [LT_LANG(GCJ)], 19013e72ca8cSmrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 19023e72ca8cSmrg [LT_LANG(GCJ)], 19033e72ca8cSmrg [m4_ifdef([AC_PROG_GCJ], 19043e72ca8cSmrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 19053e72ca8cSmrg m4_ifdef([A][M_PROG_GCJ], 19063e72ca8cSmrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 19073e72ca8cSmrg m4_ifdef([LT_PROG_GCJ], 19083e72ca8cSmrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 1909ee3138f1Smrg 19103e72ca8cSmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 19113e72ca8cSmrg [LT_LANG(GO)], 19123e72ca8cSmrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 1913ee3138f1Smrg 19143e72ca8cSmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 19153e72ca8cSmrg [LT_LANG(RC)], 19163e72ca8cSmrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 19173e72ca8cSmrg])# _LT_LANG_DEFAULT_CONFIG 1918ee3138f1Smrg 19193e72ca8cSmrg# Obsolete macros: 19203e72ca8cSmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 19213e72ca8cSmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 19223e72ca8cSmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 19233e72ca8cSmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 19243e72ca8cSmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 19253e72ca8cSmrgdnl aclocal-1.4 backwards compatibility: 19263e72ca8cSmrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 19273e72ca8cSmrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 19283e72ca8cSmrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 19293e72ca8cSmrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 19303e72ca8cSmrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 1931ee3138f1Smrg 193234977a2fSmrg 19333e72ca8cSmrg# _LT_TAG_COMPILER 19343e72ca8cSmrg# ---------------- 19353e72ca8cSmrgm4_defun([_LT_TAG_COMPILER], 19363e72ca8cSmrg[AC_REQUIRE([AC_PROG_CC])dnl 1937ee3138f1Smrg 19383e72ca8cSmrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 19393e72ca8cSmrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 19403e72ca8cSmrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 19413e72ca8cSmrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 1942ee3138f1Smrg 19433e72ca8cSmrg# If no C compiler was specified, use CC. 19443e72ca8cSmrgLTCC=${LTCC-"$CC"} 1945ee3138f1Smrg 19463e72ca8cSmrg# If no C compiler flags were specified, use CFLAGS. 19473e72ca8cSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 1948ee3138f1Smrg 19493e72ca8cSmrg# Allow CC to be a program name with arguments. 19503e72ca8cSmrgcompiler=$CC 19513e72ca8cSmrg])# _LT_TAG_COMPILER 195234977a2fSmrg 19533e72ca8cSmrg 19543e72ca8cSmrg# _LT_COMPILER_BOILERPLATE 19553e72ca8cSmrg# ------------------------ 19563e72ca8cSmrg# Check for compiler boilerplate output or warnings with 19573e72ca8cSmrg# the simple compiler test code. 19583e72ca8cSmrgm4_defun([_LT_COMPILER_BOILERPLATE], 19593e72ca8cSmrg[m4_require([_LT_DECL_SED])dnl 19603e72ca8cSmrgac_outfile=conftest.$ac_objext 19613e72ca8cSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 19623e72ca8cSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 19633e72ca8cSmrg_lt_compiler_boilerplate=`cat conftest.err` 19643e72ca8cSmrg$RM conftest* 19653e72ca8cSmrg])# _LT_COMPILER_BOILERPLATE 19663e72ca8cSmrg 19673e72ca8cSmrg 19683e72ca8cSmrg# _LT_LINKER_BOILERPLATE 19693e72ca8cSmrg# ---------------------- 19703e72ca8cSmrg# Check for linker boilerplate output or warnings with 19713e72ca8cSmrg# the simple link test code. 19723e72ca8cSmrgm4_defun([_LT_LINKER_BOILERPLATE], 19733e72ca8cSmrg[m4_require([_LT_DECL_SED])dnl 19743e72ca8cSmrgac_outfile=conftest.$ac_objext 19753e72ca8cSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 19763e72ca8cSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 19773e72ca8cSmrg_lt_linker_boilerplate=`cat conftest.err` 19783e72ca8cSmrg$RM -r conftest* 19793e72ca8cSmrg])# _LT_LINKER_BOILERPLATE 19803e72ca8cSmrg 19813e72ca8cSmrg# _LT_REQUIRED_DARWIN_CHECKS 19823e72ca8cSmrg# ------------------------- 19833e72ca8cSmrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 1984a1ed278cSmrg case $host_os in 19853e72ca8cSmrg rhapsody* | darwin*) 19863e72ca8cSmrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 19873e72ca8cSmrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 19883e72ca8cSmrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 19893e72ca8cSmrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 19903e72ca8cSmrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 19913e72ca8cSmrg _LT_DECL([], [DSYMUTIL], [1], 19923e72ca8cSmrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 19933e72ca8cSmrg _LT_DECL([], [NMEDIT], [1], 19943e72ca8cSmrg [Tool to change global to local symbols on Mac OS X]) 19953e72ca8cSmrg _LT_DECL([], [LIPO], [1], 19963e72ca8cSmrg [Tool to manipulate fat objects and archives on Mac OS X]) 19973e72ca8cSmrg _LT_DECL([], [OTOOL], [1], 19983e72ca8cSmrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 19993e72ca8cSmrg _LT_DECL([], [OTOOL64], [1], 20003e72ca8cSmrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 20013e72ca8cSmrg 20023e72ca8cSmrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 20033e72ca8cSmrg [lt_cv_apple_cc_single_mod=no 20043e72ca8cSmrg if test -z "${LT_MULTI_MODULE}"; then 20053e72ca8cSmrg # By default we will add the -single_module flag. You can override 20063e72ca8cSmrg # by either setting the environment variable LT_MULTI_MODULE 20073e72ca8cSmrg # non-empty at configure time, or by adding -multi_module to the 20083e72ca8cSmrg # link flags. 20093e72ca8cSmrg rm -rf libconftest.dylib* 20103e72ca8cSmrg echo "int foo(void){return 1;}" > conftest.c 20113e72ca8cSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 20123e72ca8cSmrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 20133e72ca8cSmrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 20143e72ca8cSmrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 20153e72ca8cSmrg _lt_result=$? 20163e72ca8cSmrg # If there is a non-empty error log, and "single_module" 20173e72ca8cSmrg # appears in it, assume the flag caused a linker warning 20183e72ca8cSmrg if test -s conftest.err && $GREP single_module conftest.err; then 20193e72ca8cSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 20203e72ca8cSmrg # Otherwise, if the output was created with a 0 exit code from 20213e72ca8cSmrg # the compiler, it worked. 20223e72ca8cSmrg elif test -f libconftest.dylib && test $_lt_result -eq 0; then 20233e72ca8cSmrg lt_cv_apple_cc_single_mod=yes 20243e72ca8cSmrg else 20253e72ca8cSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 20263e72ca8cSmrg fi 20273e72ca8cSmrg rm -rf libconftest.dylib* 20283e72ca8cSmrg rm -f conftest.* 20293e72ca8cSmrg fi]) 20303e72ca8cSmrg 20313e72ca8cSmrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 20323e72ca8cSmrg [lt_cv_ld_exported_symbols_list], 20333e72ca8cSmrg [lt_cv_ld_exported_symbols_list=no 20343e72ca8cSmrg save_LDFLAGS=$LDFLAGS 20353e72ca8cSmrg echo "_main" > conftest.sym 20363e72ca8cSmrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 20373e72ca8cSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 20383e72ca8cSmrg [lt_cv_ld_exported_symbols_list=yes], 20393e72ca8cSmrg [lt_cv_ld_exported_symbols_list=no]) 20403e72ca8cSmrg LDFLAGS="$save_LDFLAGS" 20413e72ca8cSmrg ]) 20423e72ca8cSmrg 20433e72ca8cSmrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 20443e72ca8cSmrg [lt_cv_ld_force_load=no 20453e72ca8cSmrg cat > conftest.c << _LT_EOF 20463e72ca8cSmrgint forced_loaded() { return 2;} 20473e72ca8cSmrg_LT_EOF 20483e72ca8cSmrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 20493e72ca8cSmrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 20503e72ca8cSmrg echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 20513e72ca8cSmrg $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 20523e72ca8cSmrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 20533e72ca8cSmrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 20543e72ca8cSmrg cat > conftest.c << _LT_EOF 20553e72ca8cSmrgint main() { return 0;} 20563e72ca8cSmrg_LT_EOF 20573e72ca8cSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 20583e72ca8cSmrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 20593e72ca8cSmrg _lt_result=$? 20603e72ca8cSmrg if test -s conftest.err && $GREP force_load conftest.err; then 20613e72ca8cSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 20623e72ca8cSmrg elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then 20633e72ca8cSmrg lt_cv_ld_force_load=yes 20643e72ca8cSmrg else 20653e72ca8cSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 20663e72ca8cSmrg fi 20673e72ca8cSmrg rm -f conftest.err libconftest.a conftest conftest.c 20683e72ca8cSmrg rm -rf conftest.dSYM 20693e72ca8cSmrg ]) 20703e72ca8cSmrg case $host_os in 20713e72ca8cSmrg rhapsody* | darwin1.[[012]]) 20723e72ca8cSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 20733e72ca8cSmrg darwin1.*) 20743e72ca8cSmrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 20753e72ca8cSmrg darwin*) # darwin 5.x on 20763e72ca8cSmrg # if running on 10.5 or later, the deployment target defaults 20773e72ca8cSmrg # to the OS version, if on x86, and 10.4, the deployment 20783e72ca8cSmrg # target defaults to 10.4. Don't you love it? 20793e72ca8cSmrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 20803e72ca8cSmrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 20813e72ca8cSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 20823e72ca8cSmrg 10.[[012]]*) 20833e72ca8cSmrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 20843e72ca8cSmrg 10.*) 20853e72ca8cSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 20863e72ca8cSmrg esac 20873e72ca8cSmrg ;; 20883e72ca8cSmrg esac 20893e72ca8cSmrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 20903e72ca8cSmrg _lt_dar_single_mod='$single_module' 20913e72ca8cSmrg fi 20923e72ca8cSmrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 20933e72ca8cSmrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 2094a1ed278cSmrg else 20953e72ca8cSmrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 20963e72ca8cSmrg fi 20973e72ca8cSmrg if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then 20983e72ca8cSmrg _lt_dsymutil='~$DSYMUTIL $lib || :' 20993e72ca8cSmrg else 21003e72ca8cSmrg _lt_dsymutil= 2101a1ed278cSmrg fi 2102a1ed278cSmrg ;; 2103a1ed278cSmrg esac 21043e72ca8cSmrg]) 2105ee3138f1Smrg 2106ee3138f1Smrg 21073e72ca8cSmrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 21083e72ca8cSmrg# --------------------------------- 21093e72ca8cSmrg# Checks for linker and compiler features on darwin 21103e72ca8cSmrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 21113e72ca8cSmrg[ 21123e72ca8cSmrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 21133e72ca8cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 21143e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=no 21153e72ca8cSmrg _LT_TAGVAR(hardcode_automatic, $1)=yes 21163e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 21173e72ca8cSmrg if test "$lt_cv_ld_force_load" = "yes"; then 21183e72ca8cSmrg _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\"`' 21193e72ca8cSmrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 21203e72ca8cSmrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 21213e72ca8cSmrg else 21223e72ca8cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 21233e72ca8cSmrg fi 21243e72ca8cSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 21253e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 21263e72ca8cSmrg case $cc_basename in 21273e72ca8cSmrg ifort*) _lt_dar_can_shared=yes ;; 21283e72ca8cSmrg *) _lt_dar_can_shared=$GCC ;; 2129a1ed278cSmrg esac 21303e72ca8cSmrg if test "$_lt_dar_can_shared" = "yes"; then 21313e72ca8cSmrg output_verbose_link_cmd=func_echo_all 21323e72ca8cSmrg _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}" 21333e72ca8cSmrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 21343e72ca8cSmrg _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}" 21353e72ca8cSmrg _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}" 21363e72ca8cSmrg m4_if([$1], [CXX], 21373e72ca8cSmrg[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 21383e72ca8cSmrg _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}" 21393e72ca8cSmrg _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}" 2140a1ed278cSmrg fi 21413e72ca8cSmrg],[]) 21423e72ca8cSmrg else 21433e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 21443e72ca8cSmrg fi 21453e72ca8cSmrg]) 21463e72ca8cSmrg 21473e72ca8cSmrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 21483e72ca8cSmrg# ---------------------------------- 21493e72ca8cSmrg# Links a minimal program and checks the executable 21503e72ca8cSmrg# for the system default hardcoded library path. In most cases, 21513e72ca8cSmrg# this is /usr/lib:/lib, but when the MPI compilers are used 21523e72ca8cSmrg# the location of the communication and MPI libs are included too. 21533e72ca8cSmrg# If we don't find anything, use the default library path according 21543e72ca8cSmrg# to the aix ld manual. 21553e72ca8cSmrg# Store the results from the different compilers for each TAGNAME. 21563e72ca8cSmrg# Allow to override them for all tags through lt_cv_aix_libpath. 21573e72ca8cSmrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 21583e72ca8cSmrg[m4_require([_LT_DECL_SED])dnl 21593e72ca8cSmrgif test "${lt_cv_aix_libpath+set}" = set; then 21603e72ca8cSmrg aix_libpath=$lt_cv_aix_libpath 2161a1ed278cSmrgelse 21623e72ca8cSmrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 21633e72ca8cSmrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 21643e72ca8cSmrg lt_aix_libpath_sed='[ 21653e72ca8cSmrg /Import File Strings/,/^$/ { 21663e72ca8cSmrg /^0/ { 21673e72ca8cSmrg s/^0 *\([^ ]*\) *$/\1/ 21683e72ca8cSmrg p 21693e72ca8cSmrg } 21703e72ca8cSmrg }]' 21713e72ca8cSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 21723e72ca8cSmrg # Check for a 64-bit object if we didn't find anything. 21733e72ca8cSmrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 21743e72ca8cSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 21753e72ca8cSmrg fi],[]) 21763e72ca8cSmrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 21773e72ca8cSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" 21783e72ca8cSmrg fi 21793e72ca8cSmrg ]) 21803e72ca8cSmrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 21813e72ca8cSmrgfi 21823e72ca8cSmrg])# _LT_SYS_MODULE_PATH_AIX 2183ee3138f1Smrg 218434977a2fSmrg 21853e72ca8cSmrg# _LT_SHELL_INIT(ARG) 21863e72ca8cSmrg# ------------------- 21873e72ca8cSmrgm4_define([_LT_SHELL_INIT], 21883e72ca8cSmrg[m4_divert_text([M4SH-INIT], [$1 21893e72ca8cSmrg])])# _LT_SHELL_INIT 2190ee3138f1Smrg 2191ee3138f1Smrg 219234977a2fSmrg 21933e72ca8cSmrg# _LT_PROG_ECHO_BACKSLASH 21943e72ca8cSmrg# ----------------------- 21953e72ca8cSmrg# Find how we can fake an echo command that does not interpret backslash. 21963e72ca8cSmrg# In particular, with Autoconf 2.60 or later we add some code to the start 21973e72ca8cSmrg# of the generated configure script which will find a shell with a builtin 21983e72ca8cSmrg# printf (which we can use as an echo command). 21993e72ca8cSmrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 22003e72ca8cSmrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 22013e72ca8cSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 22023e72ca8cSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 220334977a2fSmrg 22043e72ca8cSmrgAC_MSG_CHECKING([how to print strings]) 22053e72ca8cSmrg# Test print first, because it will be a builtin if present. 22063e72ca8cSmrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 22073e72ca8cSmrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 22083e72ca8cSmrg ECHO='print -r --' 22093e72ca8cSmrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 22103e72ca8cSmrg ECHO='printf %s\n' 22113e72ca8cSmrgelse 22123e72ca8cSmrg # Use this function as a fallback that always works. 22133e72ca8cSmrg func_fallback_echo () 22143e72ca8cSmrg { 22153e72ca8cSmrg eval 'cat <<_LTECHO_EOF 22163e72ca8cSmrg$[]1 22173e72ca8cSmrg_LTECHO_EOF' 22183e72ca8cSmrg } 22193e72ca8cSmrg ECHO='func_fallback_echo' 22203e72ca8cSmrgfi 2221ee3138f1Smrg 22223e72ca8cSmrg# func_echo_all arg... 22233e72ca8cSmrg# Invoke $ECHO with all args, space-separated. 22243e72ca8cSmrgfunc_echo_all () 22253e72ca8cSmrg{ 22263e72ca8cSmrg $ECHO "$*" 22273e72ca8cSmrg} 2228ee3138f1Smrg 22293e72ca8cSmrgcase "$ECHO" in 22303e72ca8cSmrg printf*) AC_MSG_RESULT([printf]) ;; 22313e72ca8cSmrg print*) AC_MSG_RESULT([print -r]) ;; 22323e72ca8cSmrg *) AC_MSG_RESULT([cat]) ;; 22333e72ca8cSmrgesac 223434977a2fSmrg 22353e72ca8cSmrgm4_ifdef([_AS_DETECT_SUGGESTED], 22363e72ca8cSmrg[_AS_DETECT_SUGGESTED([ 22373e72ca8cSmrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 22383e72ca8cSmrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 22393e72ca8cSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 22403e72ca8cSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 22413e72ca8cSmrg PATH=/empty FPATH=/empty; export PATH FPATH 22423e72ca8cSmrg test "X`printf %s $ECHO`" = "X$ECHO" \ 22433e72ca8cSmrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 2244ee3138f1Smrg 22453e72ca8cSmrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 22463e72ca8cSmrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 22473e72ca8cSmrg])# _LT_PROG_ECHO_BACKSLASH 2248ee3138f1Smrg 2249ee3138f1Smrg 22503e72ca8cSmrg# _LT_WITH_SYSROOT 22513e72ca8cSmrg# ---------------- 22523e72ca8cSmrgAC_DEFUN([_LT_WITH_SYSROOT], 22533e72ca8cSmrg[AC_MSG_CHECKING([for sysroot]) 22543e72ca8cSmrgAC_ARG_WITH([sysroot], 22553e72ca8cSmrg[ --with-sysroot[=DIR] Search for dependent libraries within DIR 22563e72ca8cSmrg (or the compiler's sysroot if not specified).], 22573e72ca8cSmrg[], [with_sysroot=no]) 22583e72ca8cSmrg 22593e72ca8cSmrgdnl lt_sysroot will always be passed unquoted. We quote it here 22603e72ca8cSmrgdnl in case the user passed a directory name. 22613e72ca8cSmrglt_sysroot= 22623e72ca8cSmrgcase ${with_sysroot} in #( 22633e72ca8cSmrg yes) 22643e72ca8cSmrg if test "$GCC" = yes; then 22653e72ca8cSmrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 22663e72ca8cSmrg fi 22673e72ca8cSmrg ;; #( 22683e72ca8cSmrg /*) 22693e72ca8cSmrg lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 22703e72ca8cSmrg ;; #( 22713e72ca8cSmrg no|'') 22723e72ca8cSmrg ;; #( 22733e72ca8cSmrg *) 22743e72ca8cSmrg AC_MSG_RESULT([${with_sysroot}]) 22753e72ca8cSmrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 22763e72ca8cSmrg ;; 22773e72ca8cSmrgesac 2278ee3138f1Smrg 22793e72ca8cSmrg AC_MSG_RESULT([${lt_sysroot:-no}]) 22803e72ca8cSmrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 22813e72ca8cSmrg[dependent libraries, and in which our libraries should be installed.])]) 2282ee3138f1Smrg 22833e72ca8cSmrg# _LT_ENABLE_LOCK 22843e72ca8cSmrg# --------------- 22853e72ca8cSmrgm4_defun([_LT_ENABLE_LOCK], 22863e72ca8cSmrg[AC_ARG_ENABLE([libtool-lock], 22873e72ca8cSmrg [AS_HELP_STRING([--disable-libtool-lock], 22883e72ca8cSmrg [avoid locking (might break parallel builds)])]) 22893e72ca8cSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 2290ee3138f1Smrg 22913e72ca8cSmrg# Some flags need to be propagated to the compiler or linker for good 22923e72ca8cSmrg# libtool support. 22933e72ca8cSmrgcase $host in 22943e72ca8cSmrgia64-*-hpux*) 22953e72ca8cSmrg # Find out which ABI we are using. 22963e72ca8cSmrg echo 'int i;' > conftest.$ac_ext 22973e72ca8cSmrg if AC_TRY_EVAL(ac_compile); then 22983e72ca8cSmrg case `/usr/bin/file conftest.$ac_objext` in 22993e72ca8cSmrg *ELF-32*) 23003e72ca8cSmrg HPUX_IA64_MODE="32" 23013e72ca8cSmrg ;; 23023e72ca8cSmrg *ELF-64*) 23033e72ca8cSmrg HPUX_IA64_MODE="64" 23043e72ca8cSmrg ;; 2305b425557eSmrg esac 2306a1ed278cSmrg fi 23073e72ca8cSmrg rm -rf conftest* 23083e72ca8cSmrg ;; 23093e72ca8cSmrg*-*-irix6*) 23103e72ca8cSmrg # Find out which ABI we are using. 23113e72ca8cSmrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 23123e72ca8cSmrg if AC_TRY_EVAL(ac_compile); then 23133e72ca8cSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 23143e72ca8cSmrg case `/usr/bin/file conftest.$ac_objext` in 23153e72ca8cSmrg *32-bit*) 23163e72ca8cSmrg LD="${LD-ld} -melf32bsmip" 23173e72ca8cSmrg ;; 23183e72ca8cSmrg *N32*) 23193e72ca8cSmrg LD="${LD-ld} -melf32bmipn32" 23203e72ca8cSmrg ;; 23213e72ca8cSmrg *64-bit*) 23223e72ca8cSmrg LD="${LD-ld} -melf64bmip" 23233e72ca8cSmrg ;; 23243e72ca8cSmrg esac 23253e72ca8cSmrg else 23263e72ca8cSmrg case `/usr/bin/file conftest.$ac_objext` in 23273e72ca8cSmrg *32-bit*) 23283e72ca8cSmrg LD="${LD-ld} -32" 23293e72ca8cSmrg ;; 23303e72ca8cSmrg *N32*) 23313e72ca8cSmrg LD="${LD-ld} -n32" 23323e72ca8cSmrg ;; 23333e72ca8cSmrg *64-bit*) 23343e72ca8cSmrg LD="${LD-ld} -64" 23353e72ca8cSmrg ;; 23363e72ca8cSmrg esac 23373e72ca8cSmrg fi 23383e72ca8cSmrg fi 23393e72ca8cSmrg rm -rf conftest* 2340a1ed278cSmrg ;; 2341ee3138f1Smrg 23423e72ca8cSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 23433e72ca8cSmrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 23443e72ca8cSmrg # Find out which ABI we are using. 23453e72ca8cSmrg echo 'int i;' > conftest.$ac_ext 23463e72ca8cSmrg if AC_TRY_EVAL(ac_compile); then 23473e72ca8cSmrg case `/usr/bin/file conftest.o` in 23483e72ca8cSmrg *32-bit*) 23493e72ca8cSmrg case $host in 23503e72ca8cSmrg x86_64-*kfreebsd*-gnu) 23513e72ca8cSmrg LD="${LD-ld} -m elf_i386_fbsd" 23523e72ca8cSmrg ;; 23533e72ca8cSmrg x86_64-*linux*) 23543e72ca8cSmrg LD="${LD-ld} -m elf_i386" 23553e72ca8cSmrg ;; 23563e72ca8cSmrg ppc64-*linux*|powerpc64-*linux*) 23573e72ca8cSmrg LD="${LD-ld} -m elf32ppclinux" 23583e72ca8cSmrg ;; 23593e72ca8cSmrg s390x-*linux*) 23603e72ca8cSmrg LD="${LD-ld} -m elf_s390" 23613e72ca8cSmrg ;; 23623e72ca8cSmrg sparc64-*linux*) 23633e72ca8cSmrg LD="${LD-ld} -m elf32_sparc" 23643e72ca8cSmrg ;; 23653e72ca8cSmrg esac 23663e72ca8cSmrg ;; 23673e72ca8cSmrg *64-bit*) 23683e72ca8cSmrg case $host in 23693e72ca8cSmrg x86_64-*kfreebsd*-gnu) 23703e72ca8cSmrg LD="${LD-ld} -m elf_x86_64_fbsd" 23713e72ca8cSmrg ;; 23723e72ca8cSmrg x86_64-*linux*) 23733e72ca8cSmrg LD="${LD-ld} -m elf_x86_64" 23743e72ca8cSmrg ;; 23753e72ca8cSmrg ppc*-*linux*|powerpc*-*linux*) 23763e72ca8cSmrg LD="${LD-ld} -m elf64ppc" 23773e72ca8cSmrg ;; 23783e72ca8cSmrg s390*-*linux*|s390*-*tpf*) 23793e72ca8cSmrg LD="${LD-ld} -m elf64_s390" 23803e72ca8cSmrg ;; 23813e72ca8cSmrg sparc*-*linux*) 23823e72ca8cSmrg LD="${LD-ld} -m elf64_sparc" 23833e72ca8cSmrg ;; 23843e72ca8cSmrg esac 23853e72ca8cSmrg ;; 23863e72ca8cSmrg esac 23873e72ca8cSmrg fi 23883e72ca8cSmrg rm -rf conftest* 2389a1ed278cSmrg ;; 2390ee3138f1Smrg 23913e72ca8cSmrg*-*-sco3.2v5*) 23923e72ca8cSmrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 23933e72ca8cSmrg SAVE_CFLAGS="$CFLAGS" 23943e72ca8cSmrg CFLAGS="$CFLAGS -belf" 23953e72ca8cSmrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 23963e72ca8cSmrg [AC_LANG_PUSH(C) 23973e72ca8cSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 23983e72ca8cSmrg AC_LANG_POP]) 23993e72ca8cSmrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 24003e72ca8cSmrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 24013e72ca8cSmrg CFLAGS="$SAVE_CFLAGS" 24023e72ca8cSmrg fi 24033e72ca8cSmrg ;; 24043e72ca8cSmrg*-*solaris*) 24053e72ca8cSmrg # Find out which ABI we are using. 24063e72ca8cSmrg echo 'int i;' > conftest.$ac_ext 24073e72ca8cSmrg if AC_TRY_EVAL(ac_compile); then 24083e72ca8cSmrg case `/usr/bin/file conftest.o` in 24093e72ca8cSmrg *64-bit*) 24103e72ca8cSmrg case $lt_cv_prog_gnu_ld in 24113e72ca8cSmrg yes*) 24123e72ca8cSmrg case $host in 24133e72ca8cSmrg i?86-*-solaris*) 24143e72ca8cSmrg LD="${LD-ld} -m elf_x86_64" 24153e72ca8cSmrg ;; 24163e72ca8cSmrg sparc*-*-solaris*) 24173e72ca8cSmrg LD="${LD-ld} -m elf64_sparc" 24183e72ca8cSmrg ;; 24193e72ca8cSmrg esac 24203e72ca8cSmrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 24213e72ca8cSmrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 24223e72ca8cSmrg LD="${LD-ld}_sol2" 24233e72ca8cSmrg fi 24243e72ca8cSmrg ;; 24253e72ca8cSmrg *) 24263e72ca8cSmrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 24273e72ca8cSmrg LD="${LD-ld} -64" 24283e72ca8cSmrg fi 24293e72ca8cSmrg ;; 24303e72ca8cSmrg esac 24313e72ca8cSmrg ;; 24323e72ca8cSmrg esac 24333e72ca8cSmrg fi 24343e72ca8cSmrg rm -rf conftest* 2435a1ed278cSmrg ;; 24363e72ca8cSmrgesac 2437ee3138f1Smrg 24383e72ca8cSmrgneed_locks="$enable_libtool_lock" 24393e72ca8cSmrg])# _LT_ENABLE_LOCK 2440ee3138f1Smrg 2441ee3138f1Smrg 24423e72ca8cSmrg# _LT_PROG_AR 24433e72ca8cSmrg# ----------- 24443e72ca8cSmrgm4_defun([_LT_PROG_AR], 24453e72ca8cSmrg[AC_CHECK_TOOLS(AR, [ar], false) 24463e72ca8cSmrg: ${AR=ar} 24473e72ca8cSmrg: ${AR_FLAGS=cru} 24483e72ca8cSmrg_LT_DECL([], [AR], [1], [The archiver]) 24493e72ca8cSmrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 24503e72ca8cSmrg 24513e72ca8cSmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 24523e72ca8cSmrg [lt_cv_ar_at_file=no 24533e72ca8cSmrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 24543e72ca8cSmrg [echo conftest.$ac_objext > conftest.lst 24553e72ca8cSmrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 24563e72ca8cSmrg AC_TRY_EVAL([lt_ar_try]) 24573e72ca8cSmrg if test "$ac_status" -eq 0; then 24583e72ca8cSmrg # Ensure the archiver fails upon bogus file names. 24593e72ca8cSmrg rm -f conftest.$ac_objext libconftest.a 24603e72ca8cSmrg AC_TRY_EVAL([lt_ar_try]) 24613e72ca8cSmrg if test "$ac_status" -ne 0; then 24623e72ca8cSmrg lt_cv_ar_at_file=@ 24633e72ca8cSmrg fi 24643e72ca8cSmrg fi 24653e72ca8cSmrg rm -f conftest.* libconftest.a 24663e72ca8cSmrg ]) 24673e72ca8cSmrg ]) 24683e72ca8cSmrg 24693e72ca8cSmrgif test "x$lt_cv_ar_at_file" = xno; then 24703e72ca8cSmrg archiver_list_spec= 24713e72ca8cSmrgelse 24723e72ca8cSmrg archiver_list_spec=$lt_cv_ar_at_file 24733e72ca8cSmrgfi 24743e72ca8cSmrg_LT_DECL([], [archiver_list_spec], [1], 24753e72ca8cSmrg [How to feed a file listing to the archiver]) 24763e72ca8cSmrg])# _LT_PROG_AR 24773e72ca8cSmrg 24783e72ca8cSmrg 24793e72ca8cSmrg# _LT_CMD_OLD_ARCHIVE 24803e72ca8cSmrg# ------------------- 24813e72ca8cSmrgm4_defun([_LT_CMD_OLD_ARCHIVE], 24823e72ca8cSmrg[_LT_PROG_AR 24833e72ca8cSmrg 24843e72ca8cSmrgAC_CHECK_TOOL(STRIP, strip, :) 24853e72ca8cSmrgtest -z "$STRIP" && STRIP=: 24863e72ca8cSmrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 24873e72ca8cSmrg 24883e72ca8cSmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 24893e72ca8cSmrgtest -z "$RANLIB" && RANLIB=: 24903e72ca8cSmrg_LT_DECL([], [RANLIB], [1], 24913e72ca8cSmrg [Commands used to install an old-style archive]) 24923e72ca8cSmrg 24933e72ca8cSmrg# Determine commands to create old-style static archives. 24943e72ca8cSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 24953e72ca8cSmrgold_postinstall_cmds='chmod 644 $oldlib' 24963e72ca8cSmrgold_postuninstall_cmds= 24973e72ca8cSmrg 24983e72ca8cSmrgif test -n "$RANLIB"; then 2499a1ed278cSmrg case $host_os in 25003e72ca8cSmrg openbsd*) 25013e72ca8cSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 2502a1ed278cSmrg ;; 2503a1ed278cSmrg *) 25043e72ca8cSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 2505a1ed278cSmrg ;; 2506a1ed278cSmrg esac 25073e72ca8cSmrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 25083e72ca8cSmrgfi 2509ee3138f1Smrg 25103e72ca8cSmrgcase $host_os in 25113e72ca8cSmrg darwin*) 25123e72ca8cSmrg lock_old_archive_extraction=yes ;; 25133e72ca8cSmrg *) 25143e72ca8cSmrg lock_old_archive_extraction=no ;; 25153e72ca8cSmrgesac 25163e72ca8cSmrg_LT_DECL([], [old_postinstall_cmds], [2]) 25173e72ca8cSmrg_LT_DECL([], [old_postuninstall_cmds], [2]) 25183e72ca8cSmrg_LT_TAGDECL([], [old_archive_cmds], [2], 25193e72ca8cSmrg [Commands used to build an old-style archive]) 25203e72ca8cSmrg_LT_DECL([], [lock_old_archive_extraction], [0], 25213e72ca8cSmrg [Whether to use a lock for old archive extraction]) 25223e72ca8cSmrg])# _LT_CMD_OLD_ARCHIVE 2523ee3138f1Smrg 252434977a2fSmrg 25253e72ca8cSmrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 25263e72ca8cSmrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 25273e72ca8cSmrg# ---------------------------------------------------------------- 25283e72ca8cSmrg# Check whether the given compiler option works 25293e72ca8cSmrgAC_DEFUN([_LT_COMPILER_OPTION], 25303e72ca8cSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 25313e72ca8cSmrgm4_require([_LT_DECL_SED])dnl 25323e72ca8cSmrgAC_CACHE_CHECK([$1], [$2], 25333e72ca8cSmrg [$2=no 25343e72ca8cSmrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 25353e72ca8cSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 25363e72ca8cSmrg lt_compiler_flag="$3" 25373e72ca8cSmrg # Insert the option either (1) after the last *FLAGS variable, or 25383e72ca8cSmrg # (2) before a word containing "conftest.", or (3) at the end. 25393e72ca8cSmrg # Note that $ac_compile itself does not contain backslashes and begins 25403e72ca8cSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 25413e72ca8cSmrg # The option is referenced via a variable to avoid confusing sed. 25423e72ca8cSmrg lt_compile=`echo "$ac_compile" | $SED \ 25433e72ca8cSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 25443e72ca8cSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 25453e72ca8cSmrg -e 's:$: $lt_compiler_flag:'` 25463e72ca8cSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 25473e72ca8cSmrg (eval "$lt_compile" 2>conftest.err) 25483e72ca8cSmrg ac_status=$? 25493e72ca8cSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 25503e72ca8cSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 25513e72ca8cSmrg if (exit $ac_status) && test -s "$ac_outfile"; then 25523e72ca8cSmrg # The compiler can only warn and ignore the option if not recognized 25533e72ca8cSmrg # So say no if there are warnings other than the usual output. 25543e72ca8cSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 25553e72ca8cSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 25563e72ca8cSmrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 25573e72ca8cSmrg $2=yes 25583e72ca8cSmrg fi 25593e72ca8cSmrg fi 25603e72ca8cSmrg $RM conftest* 25613e72ca8cSmrg]) 2562ee3138f1Smrg 25633e72ca8cSmrgif test x"[$]$2" = xyes; then 25643e72ca8cSmrg m4_if([$5], , :, [$5]) 25653e72ca8cSmrgelse 25663e72ca8cSmrg m4_if([$6], , :, [$6]) 25673e72ca8cSmrgfi 25683e72ca8cSmrg])# _LT_COMPILER_OPTION 2569ee3138f1Smrg 25703e72ca8cSmrg# Old name: 25713e72ca8cSmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 25723e72ca8cSmrgdnl aclocal-1.4 backwards compatibility: 25733e72ca8cSmrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 2574b425557eSmrg 2575ee3138f1Smrg 25763e72ca8cSmrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 25773e72ca8cSmrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 25783e72ca8cSmrg# ---------------------------------------------------- 25793e72ca8cSmrg# Check whether the given linker option works 25803e72ca8cSmrgAC_DEFUN([_LT_LINKER_OPTION], 25813e72ca8cSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 25823e72ca8cSmrgm4_require([_LT_DECL_SED])dnl 25833e72ca8cSmrgAC_CACHE_CHECK([$1], [$2], 25843e72ca8cSmrg [$2=no 25853e72ca8cSmrg save_LDFLAGS="$LDFLAGS" 25863e72ca8cSmrg LDFLAGS="$LDFLAGS $3" 25873e72ca8cSmrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 25883e72ca8cSmrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 25893e72ca8cSmrg # The linker can only warn and ignore the option if not recognized 25903e72ca8cSmrg # So say no if there are warnings 25913e72ca8cSmrg if test -s conftest.err; then 25923e72ca8cSmrg # Append any errors to the config.log. 25933e72ca8cSmrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 25943e72ca8cSmrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 25953e72ca8cSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 25963e72ca8cSmrg if diff conftest.exp conftest.er2 >/dev/null; then 25973e72ca8cSmrg $2=yes 25983e72ca8cSmrg fi 25993e72ca8cSmrg else 26003e72ca8cSmrg $2=yes 26013e72ca8cSmrg fi 26023e72ca8cSmrg fi 26033e72ca8cSmrg $RM -r conftest* 26043e72ca8cSmrg LDFLAGS="$save_LDFLAGS" 26053e72ca8cSmrg]) 260634977a2fSmrg 26073e72ca8cSmrgif test x"[$]$2" = xyes; then 26083e72ca8cSmrg m4_if([$4], , :, [$4]) 26093e72ca8cSmrgelse 26103e72ca8cSmrg m4_if([$5], , :, [$5]) 26113e72ca8cSmrgfi 26123e72ca8cSmrg])# _LT_LINKER_OPTION 2613b425557eSmrg 26143e72ca8cSmrg# Old name: 26153e72ca8cSmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 26163e72ca8cSmrgdnl aclocal-1.4 backwards compatibility: 26173e72ca8cSmrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 261834977a2fSmrg 261934977a2fSmrg 26203e72ca8cSmrg# LT_CMD_MAX_LEN 26213e72ca8cSmrg#--------------- 26223e72ca8cSmrgAC_DEFUN([LT_CMD_MAX_LEN], 26233e72ca8cSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 26243e72ca8cSmrg# find the maximum length of command line arguments 26253e72ca8cSmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 26263e72ca8cSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 26273e72ca8cSmrg i=0 26283e72ca8cSmrg teststring="ABCD" 2629ee3138f1Smrg 26303e72ca8cSmrg case $build_os in 26313e72ca8cSmrg msdosdjgpp*) 26323e72ca8cSmrg # On DJGPP, this test can blow up pretty badly due to problems in libc 26333e72ca8cSmrg # (any single argument exceeding 2000 bytes causes a buffer overrun 26343e72ca8cSmrg # during glob expansion). Even if it were fixed, the result of this 26353e72ca8cSmrg # check would be larger than it should be. 26363e72ca8cSmrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 26373e72ca8cSmrg ;; 2638ee3138f1Smrg 26393e72ca8cSmrg gnu*) 26403e72ca8cSmrg # Under GNU Hurd, this test is not required because there is 26413e72ca8cSmrg # no limit to the length of command line arguments. 26423e72ca8cSmrg # Libtool will interpret -1 as no limit whatsoever 26433e72ca8cSmrg lt_cv_sys_max_cmd_len=-1; 26443e72ca8cSmrg ;; 2645ee3138f1Smrg 26463e72ca8cSmrg cygwin* | mingw* | cegcc*) 26473e72ca8cSmrg # On Win9x/ME, this test blows up -- it succeeds, but takes 26483e72ca8cSmrg # about 5 minutes as the teststring grows exponentially. 26493e72ca8cSmrg # Worse, since 9x/ME are not pre-emptively multitasking, 26503e72ca8cSmrg # you end up with a "frozen" computer, even though with patience 26513e72ca8cSmrg # the test eventually succeeds (with a max line length of 256k). 26523e72ca8cSmrg # Instead, let's just punt: use the minimum linelength reported by 26533e72ca8cSmrg # all of the supported platforms: 8192 (on NT/2K/XP). 26543e72ca8cSmrg lt_cv_sys_max_cmd_len=8192; 26553e72ca8cSmrg ;; 2656ee3138f1Smrg 26573e72ca8cSmrg mint*) 26583e72ca8cSmrg # On MiNT this can take a long time and run out of memory. 26593e72ca8cSmrg lt_cv_sys_max_cmd_len=8192; 26603e72ca8cSmrg ;; 2661ee3138f1Smrg 26623e72ca8cSmrg amigaos*) 26633e72ca8cSmrg # On AmigaOS with pdksh, this test takes hours, literally. 26643e72ca8cSmrg # So we just punt and use a minimum line length of 8192. 26653e72ca8cSmrg lt_cv_sys_max_cmd_len=8192; 26663e72ca8cSmrg ;; 2667ee3138f1Smrg 26683e72ca8cSmrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 26693e72ca8cSmrg # This has been around since 386BSD, at least. Likely further. 26703e72ca8cSmrg if test -x /sbin/sysctl; then 26713e72ca8cSmrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 26723e72ca8cSmrg elif test -x /usr/sbin/sysctl; then 26733e72ca8cSmrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 26743e72ca8cSmrg else 26753e72ca8cSmrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 26763e72ca8cSmrg fi 26773e72ca8cSmrg # And add a safety zone 26783e72ca8cSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 26793e72ca8cSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 26803e72ca8cSmrg ;; 2681b425557eSmrg 26823e72ca8cSmrg interix*) 26833e72ca8cSmrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 26843e72ca8cSmrg lt_cv_sys_max_cmd_len=196608 26853e72ca8cSmrg ;; 26863e72ca8cSmrg 26873e72ca8cSmrg os2*) 26883e72ca8cSmrg # The test takes a long time on OS/2. 26893e72ca8cSmrg lt_cv_sys_max_cmd_len=8192 26903e72ca8cSmrg ;; 26913e72ca8cSmrg 26923e72ca8cSmrg osf*) 26933e72ca8cSmrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 26943e72ca8cSmrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 26953e72ca8cSmrg # nice to cause kernel panics so lets avoid the loop below. 26963e72ca8cSmrg # First set a reasonable default. 26973e72ca8cSmrg lt_cv_sys_max_cmd_len=16384 26983e72ca8cSmrg # 26993e72ca8cSmrg if test -x /sbin/sysconfig; then 27003e72ca8cSmrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 27013e72ca8cSmrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 27023e72ca8cSmrg esac 27033e72ca8cSmrg fi 27043e72ca8cSmrg ;; 27053e72ca8cSmrg sco3.2v5*) 27063e72ca8cSmrg lt_cv_sys_max_cmd_len=102400 27073e72ca8cSmrg ;; 27083e72ca8cSmrg sysv5* | sco5v6* | sysv4.2uw2*) 27093e72ca8cSmrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 27103e72ca8cSmrg if test -n "$kargmax"; then 27113e72ca8cSmrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 27123e72ca8cSmrg else 27133e72ca8cSmrg lt_cv_sys_max_cmd_len=32768 27143e72ca8cSmrg fi 27153e72ca8cSmrg ;; 27163e72ca8cSmrg *) 27173e72ca8cSmrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 27183e72ca8cSmrg if test -n "$lt_cv_sys_max_cmd_len"; then 27193e72ca8cSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 27203e72ca8cSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 27213e72ca8cSmrg else 27223e72ca8cSmrg # Make teststring a little bigger before we do anything with it. 27233e72ca8cSmrg # a 1K string should be a reasonable start. 27243e72ca8cSmrg for i in 1 2 3 4 5 6 7 8 ; do 27253e72ca8cSmrg teststring=$teststring$teststring 27263e72ca8cSmrg done 27273e72ca8cSmrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 27283e72ca8cSmrg # If test is not a shell built-in, we'll probably end up computing a 27293e72ca8cSmrg # maximum length that is only half of the actual maximum length, but 27303e72ca8cSmrg # we can't tell. 27313e72ca8cSmrg while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ 27323e72ca8cSmrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 27333e72ca8cSmrg test $i != 17 # 1/2 MB should be enough 27343e72ca8cSmrg do 27353e72ca8cSmrg i=`expr $i + 1` 27363e72ca8cSmrg teststring=$teststring$teststring 27373e72ca8cSmrg done 27383e72ca8cSmrg # Only check the string length outside the loop. 27393e72ca8cSmrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 27403e72ca8cSmrg teststring= 27413e72ca8cSmrg # Add a significant safety factor because C++ compilers can tack on 27423e72ca8cSmrg # massive amounts of additional arguments before passing them to the 27433e72ca8cSmrg # linker. It appears as though 1/2 is a usable value. 27443e72ca8cSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 27453e72ca8cSmrg fi 27463e72ca8cSmrg ;; 2747b425557eSmrg esac 27483e72ca8cSmrg]) 27493e72ca8cSmrgif test -n $lt_cv_sys_max_cmd_len ; then 27503e72ca8cSmrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 27513e72ca8cSmrgelse 27523e72ca8cSmrg AC_MSG_RESULT(none) 27533e72ca8cSmrgfi 27543e72ca8cSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len 27553e72ca8cSmrg_LT_DECL([], [max_cmd_len], [0], 27563e72ca8cSmrg [What is the maximum length of a command?]) 27573e72ca8cSmrg])# LT_CMD_MAX_LEN 2758ee3138f1Smrg 27593e72ca8cSmrg# Old name: 27603e72ca8cSmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 27613e72ca8cSmrgdnl aclocal-1.4 backwards compatibility: 27623e72ca8cSmrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 2763ee3138f1Smrg 2764ee3138f1Smrg 27653e72ca8cSmrg# _LT_HEADER_DLFCN 27663e72ca8cSmrg# ---------------- 27673e72ca8cSmrgm4_defun([_LT_HEADER_DLFCN], 27683e72ca8cSmrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 27693e72ca8cSmrg])# _LT_HEADER_DLFCN 2770ee3138f1Smrg 2771ee3138f1Smrg 27723e72ca8cSmrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 27733e72ca8cSmrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 27743e72ca8cSmrg# ---------------------------------------------------------------- 27753e72ca8cSmrgm4_defun([_LT_TRY_DLOPEN_SELF], 27763e72ca8cSmrg[m4_require([_LT_HEADER_DLFCN])dnl 27773e72ca8cSmrgif test "$cross_compiling" = yes; then : 27783e72ca8cSmrg [$4] 27793e72ca8cSmrgelse 27803e72ca8cSmrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 27813e72ca8cSmrg lt_status=$lt_dlunknown 27823e72ca8cSmrg cat > conftest.$ac_ext <<_LT_EOF 27833e72ca8cSmrg[#line $LINENO "configure" 27843e72ca8cSmrg#include "confdefs.h" 2785ee3138f1Smrg 27863e72ca8cSmrg#if HAVE_DLFCN_H 27873e72ca8cSmrg#include <dlfcn.h> 27883e72ca8cSmrg#endif 2789ee3138f1Smrg 27903e72ca8cSmrg#include <stdio.h> 2791ee3138f1Smrg 27923e72ca8cSmrg#ifdef RTLD_GLOBAL 27933e72ca8cSmrg# define LT_DLGLOBAL RTLD_GLOBAL 27943e72ca8cSmrg#else 27953e72ca8cSmrg# ifdef DL_GLOBAL 27963e72ca8cSmrg# define LT_DLGLOBAL DL_GLOBAL 27973e72ca8cSmrg# else 27983e72ca8cSmrg# define LT_DLGLOBAL 0 27993e72ca8cSmrg# endif 28003e72ca8cSmrg#endif 2801ee3138f1Smrg 28023e72ca8cSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 28033e72ca8cSmrg find out it does not work in some platform. */ 28043e72ca8cSmrg#ifndef LT_DLLAZY_OR_NOW 28053e72ca8cSmrg# ifdef RTLD_LAZY 28063e72ca8cSmrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 28073e72ca8cSmrg# else 28083e72ca8cSmrg# ifdef DL_LAZY 28093e72ca8cSmrg# define LT_DLLAZY_OR_NOW DL_LAZY 28103e72ca8cSmrg# else 28113e72ca8cSmrg# ifdef RTLD_NOW 28123e72ca8cSmrg# define LT_DLLAZY_OR_NOW RTLD_NOW 28133e72ca8cSmrg# else 28143e72ca8cSmrg# ifdef DL_NOW 28153e72ca8cSmrg# define LT_DLLAZY_OR_NOW DL_NOW 28163e72ca8cSmrg# else 28173e72ca8cSmrg# define LT_DLLAZY_OR_NOW 0 28183e72ca8cSmrg# endif 28193e72ca8cSmrg# endif 28203e72ca8cSmrg# endif 28213e72ca8cSmrg# endif 28223e72ca8cSmrg#endif 2823ee3138f1Smrg 28243e72ca8cSmrg/* When -fvisbility=hidden is used, assume the code has been annotated 28253e72ca8cSmrg correspondingly for the symbols needed. */ 28263e72ca8cSmrg#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 28273e72ca8cSmrgint fnord () __attribute__((visibility("default"))); 28283e72ca8cSmrg#endif 2829b425557eSmrg 28303e72ca8cSmrgint fnord () { return 42; } 28313e72ca8cSmrgint main () 28323e72ca8cSmrg{ 28333e72ca8cSmrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 28343e72ca8cSmrg int status = $lt_dlunknown; 2835b425557eSmrg 28363e72ca8cSmrg if (self) 28373e72ca8cSmrg { 28383e72ca8cSmrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 28393e72ca8cSmrg else 28403e72ca8cSmrg { 28413e72ca8cSmrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 28423e72ca8cSmrg else puts (dlerror ()); 28433e72ca8cSmrg } 28443e72ca8cSmrg /* dlclose (self); */ 28453e72ca8cSmrg } 2846a1ed278cSmrg else 28473e72ca8cSmrg puts (dlerror ()); 28483e72ca8cSmrg 28493e72ca8cSmrg return status; 28503e72ca8cSmrg}] 28513e72ca8cSmrg_LT_EOF 28523e72ca8cSmrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 28533e72ca8cSmrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 28543e72ca8cSmrg lt_status=$? 28553e72ca8cSmrg case x$lt_status in 28563e72ca8cSmrg x$lt_dlno_uscore) $1 ;; 28573e72ca8cSmrg x$lt_dlneed_uscore) $2 ;; 28583e72ca8cSmrg x$lt_dlunknown|x*) $3 ;; 28593e72ca8cSmrg esac 28603e72ca8cSmrg else : 28613e72ca8cSmrg # compilation failed 28623e72ca8cSmrg $3 2863a1ed278cSmrg fi 2864a1ed278cSmrgfi 28653e72ca8cSmrgrm -fr conftest* 28663e72ca8cSmrg])# _LT_TRY_DLOPEN_SELF 2867b425557eSmrg 2868b425557eSmrg 28693e72ca8cSmrg# LT_SYS_DLOPEN_SELF 28703e72ca8cSmrg# ------------------ 28713e72ca8cSmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 28723e72ca8cSmrg[m4_require([_LT_HEADER_DLFCN])dnl 28733e72ca8cSmrgif test "x$enable_dlopen" != xyes; then 28743e72ca8cSmrg enable_dlopen=unknown 28753e72ca8cSmrg enable_dlopen_self=unknown 28763e72ca8cSmrg enable_dlopen_self_static=unknown 28773e72ca8cSmrgelse 28783e72ca8cSmrg lt_cv_dlopen=no 28793e72ca8cSmrg lt_cv_dlopen_libs= 2880b425557eSmrg 28813e72ca8cSmrg case $host_os in 28823e72ca8cSmrg beos*) 28833e72ca8cSmrg lt_cv_dlopen="load_add_on" 28843e72ca8cSmrg lt_cv_dlopen_libs= 28853e72ca8cSmrg lt_cv_dlopen_self=yes 28863e72ca8cSmrg ;; 2887b425557eSmrg 28883e72ca8cSmrg mingw* | pw32* | cegcc*) 28893e72ca8cSmrg lt_cv_dlopen="LoadLibrary" 28903e72ca8cSmrg lt_cv_dlopen_libs= 28913e72ca8cSmrg ;; 28923e72ca8cSmrg 28933e72ca8cSmrg cygwin*) 28943e72ca8cSmrg lt_cv_dlopen="dlopen" 28953e72ca8cSmrg lt_cv_dlopen_libs= 28963e72ca8cSmrg ;; 28973e72ca8cSmrg 28983e72ca8cSmrg darwin*) 28993e72ca8cSmrg # if libdl is installed we need to link against it 29003e72ca8cSmrg AC_CHECK_LIB([dl], [dlopen], 29013e72ca8cSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 29023e72ca8cSmrg lt_cv_dlopen="dyld" 29033e72ca8cSmrg lt_cv_dlopen_libs= 29043e72ca8cSmrg lt_cv_dlopen_self=yes 29053e72ca8cSmrg ]) 2906a1ed278cSmrg ;; 29073e72ca8cSmrg 2908a1ed278cSmrg *) 29093e72ca8cSmrg AC_CHECK_FUNC([shl_load], 29103e72ca8cSmrg [lt_cv_dlopen="shl_load"], 29113e72ca8cSmrg [AC_CHECK_LIB([dld], [shl_load], 29123e72ca8cSmrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 29133e72ca8cSmrg [AC_CHECK_FUNC([dlopen], 29143e72ca8cSmrg [lt_cv_dlopen="dlopen"], 29153e72ca8cSmrg [AC_CHECK_LIB([dl], [dlopen], 29163e72ca8cSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 29173e72ca8cSmrg [AC_CHECK_LIB([svld], [dlopen], 29183e72ca8cSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 29193e72ca8cSmrg [AC_CHECK_LIB([dld], [dld_link], 29203e72ca8cSmrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 29213e72ca8cSmrg ]) 29223e72ca8cSmrg ]) 29233e72ca8cSmrg ]) 29243e72ca8cSmrg ]) 29253e72ca8cSmrg ]) 2926b425557eSmrg ;; 2927b425557eSmrg esac 2928ee3138f1Smrg 29293e72ca8cSmrg if test "x$lt_cv_dlopen" != xno; then 29303e72ca8cSmrg enable_dlopen=yes 29313e72ca8cSmrg else 29323e72ca8cSmrg enable_dlopen=no 29333e72ca8cSmrg fi 2934ee3138f1Smrg 29353e72ca8cSmrg case $lt_cv_dlopen in 29363e72ca8cSmrg dlopen) 29373e72ca8cSmrg save_CPPFLAGS="$CPPFLAGS" 29383e72ca8cSmrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 2939ee3138f1Smrg 29403e72ca8cSmrg save_LDFLAGS="$LDFLAGS" 29413e72ca8cSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 2942ee3138f1Smrg 29433e72ca8cSmrg save_LIBS="$LIBS" 29443e72ca8cSmrg LIBS="$lt_cv_dlopen_libs $LIBS" 2945ee3138f1Smrg 29463e72ca8cSmrg AC_CACHE_CHECK([whether a program can dlopen itself], 29473e72ca8cSmrg lt_cv_dlopen_self, [dnl 29483e72ca8cSmrg _LT_TRY_DLOPEN_SELF( 29493e72ca8cSmrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 29503e72ca8cSmrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 29513e72ca8cSmrg ]) 2952b425557eSmrg 29533e72ca8cSmrg if test "x$lt_cv_dlopen_self" = xyes; then 29543e72ca8cSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 29553e72ca8cSmrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 29563e72ca8cSmrg lt_cv_dlopen_self_static, [dnl 29573e72ca8cSmrg _LT_TRY_DLOPEN_SELF( 29583e72ca8cSmrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 29593e72ca8cSmrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 29603e72ca8cSmrg ]) 2961a1ed278cSmrg fi 29623e72ca8cSmrg 29633e72ca8cSmrg CPPFLAGS="$save_CPPFLAGS" 29643e72ca8cSmrg LDFLAGS="$save_LDFLAGS" 29653e72ca8cSmrg LIBS="$save_LIBS" 2966a1ed278cSmrg ;; 29673e72ca8cSmrg esac 2968b425557eSmrg 29693e72ca8cSmrg case $lt_cv_dlopen_self in 29703e72ca8cSmrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 29713e72ca8cSmrg *) enable_dlopen_self=unknown ;; 29723e72ca8cSmrg esac 2973b425557eSmrg 29743e72ca8cSmrg case $lt_cv_dlopen_self_static in 29753e72ca8cSmrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 29763e72ca8cSmrg *) enable_dlopen_self_static=unknown ;; 29773e72ca8cSmrg esac 29783e72ca8cSmrgfi 29793e72ca8cSmrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 29803e72ca8cSmrg [Whether dlopen is supported]) 29813e72ca8cSmrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 29823e72ca8cSmrg [Whether dlopen of programs is supported]) 29833e72ca8cSmrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 29843e72ca8cSmrg [Whether dlopen of statically linked programs is supported]) 29853e72ca8cSmrg])# LT_SYS_DLOPEN_SELF 2986b425557eSmrg 29873e72ca8cSmrg# Old name: 29883e72ca8cSmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 29893e72ca8cSmrgdnl aclocal-1.4 backwards compatibility: 29903e72ca8cSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 2991b425557eSmrg 2992b425557eSmrg 29933e72ca8cSmrg# _LT_COMPILER_C_O([TAGNAME]) 29943e72ca8cSmrg# --------------------------- 29953e72ca8cSmrg# Check to see if options -c and -o are simultaneously supported by compiler. 29963e72ca8cSmrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 29973e72ca8cSmrgm4_defun([_LT_COMPILER_C_O], 29983e72ca8cSmrg[m4_require([_LT_DECL_SED])dnl 29993e72ca8cSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 30003e72ca8cSmrgm4_require([_LT_TAG_COMPILER])dnl 30013e72ca8cSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 30023e72ca8cSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 30033e72ca8cSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 30043e72ca8cSmrg $RM -r conftest 2>/dev/null 30053e72ca8cSmrg mkdir conftest 30063e72ca8cSmrg cd conftest 30073e72ca8cSmrg mkdir out 30083e72ca8cSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 3009a1ed278cSmrg 30103e72ca8cSmrg lt_compiler_flag="-o out/conftest2.$ac_objext" 30113e72ca8cSmrg # Insert the option either (1) after the last *FLAGS variable, or 30123e72ca8cSmrg # (2) before a word containing "conftest.", or (3) at the end. 30133e72ca8cSmrg # Note that $ac_compile itself does not contain backslashes and begins 30143e72ca8cSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 30153e72ca8cSmrg lt_compile=`echo "$ac_compile" | $SED \ 30163e72ca8cSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 30173e72ca8cSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 30183e72ca8cSmrg -e 's:$: $lt_compiler_flag:'` 30193e72ca8cSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 30203e72ca8cSmrg (eval "$lt_compile" 2>out/conftest.err) 30213e72ca8cSmrg ac_status=$? 30223e72ca8cSmrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 30233e72ca8cSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 30243e72ca8cSmrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 30253e72ca8cSmrg then 30263e72ca8cSmrg # The compiler can only warn and ignore the option if not recognized 30273e72ca8cSmrg # So say no if there are warnings 30283e72ca8cSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 30293e72ca8cSmrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 30303e72ca8cSmrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 30313e72ca8cSmrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 30323e72ca8cSmrg fi 30333e72ca8cSmrg fi 30343e72ca8cSmrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 30353e72ca8cSmrg $RM conftest* 30363e72ca8cSmrg # SGI C++ compiler will create directory out/ii_files/ for 30373e72ca8cSmrg # template instantiation 30383e72ca8cSmrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 30393e72ca8cSmrg $RM out/* && rmdir out 30403e72ca8cSmrg cd .. 30413e72ca8cSmrg $RM -r conftest 30423e72ca8cSmrg $RM conftest* 30433e72ca8cSmrg]) 30443e72ca8cSmrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 30453e72ca8cSmrg [Does compiler simultaneously support -c and -o options?]) 30463e72ca8cSmrg])# _LT_COMPILER_C_O 3047a1ed278cSmrg 30483e72ca8cSmrg 30493e72ca8cSmrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 30503e72ca8cSmrg# ---------------------------------- 30513e72ca8cSmrg# Check to see if we can do hard links to lock some files if needed 30523e72ca8cSmrgm4_defun([_LT_COMPILER_FILE_LOCKS], 30533e72ca8cSmrg[m4_require([_LT_ENABLE_LOCK])dnl 30543e72ca8cSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 30553e72ca8cSmrg_LT_COMPILER_C_O([$1]) 30563e72ca8cSmrg 30573e72ca8cSmrghard_links="nottested" 30583e72ca8cSmrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 30593e72ca8cSmrg # do not overwrite the value of need_locks provided by the user 30603e72ca8cSmrg AC_MSG_CHECKING([if we can lock with hard links]) 30613e72ca8cSmrg hard_links=yes 30623e72ca8cSmrg $RM conftest* 30633e72ca8cSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 30643e72ca8cSmrg touch conftest.a 30653e72ca8cSmrg ln conftest.a conftest.b 2>&5 || hard_links=no 30663e72ca8cSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 30673e72ca8cSmrg AC_MSG_RESULT([$hard_links]) 30683e72ca8cSmrg if test "$hard_links" = no; then 30693e72ca8cSmrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 30703e72ca8cSmrg need_locks=warn 3071b425557eSmrg fi 30723e72ca8cSmrgelse 30733e72ca8cSmrg need_locks=no 30743e72ca8cSmrgfi 30753e72ca8cSmrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 30763e72ca8cSmrg])# _LT_COMPILER_FILE_LOCKS 3077b425557eSmrg 3078a1ed278cSmrg 30793e72ca8cSmrg# _LT_CHECK_OBJDIR 30803e72ca8cSmrg# ---------------- 30813e72ca8cSmrgm4_defun([_LT_CHECK_OBJDIR], 30823e72ca8cSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 30833e72ca8cSmrg[rm -f .libs 2>/dev/null 30843e72ca8cSmrgmkdir .libs 2>/dev/null 30853e72ca8cSmrgif test -d .libs; then 30863e72ca8cSmrg lt_cv_objdir=.libs 30873e72ca8cSmrgelse 30883e72ca8cSmrg # MS-DOS does not allow filenames that begin with a dot. 30893e72ca8cSmrg lt_cv_objdir=_libs 30903e72ca8cSmrgfi 30913e72ca8cSmrgrmdir .libs 2>/dev/null]) 30923e72ca8cSmrgobjdir=$lt_cv_objdir 30933e72ca8cSmrg_LT_DECL([], [objdir], [0], 30943e72ca8cSmrg [The name of the directory that contains temporary libtool files])dnl 30953e72ca8cSmrgm4_pattern_allow([LT_OBJDIR])dnl 30963e72ca8cSmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 30973e72ca8cSmrg [Define to the sub-directory in which libtool stores uninstalled libraries.]) 30983e72ca8cSmrg])# _LT_CHECK_OBJDIR 3099a1ed278cSmrg 31003e72ca8cSmrg 31013e72ca8cSmrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 31023e72ca8cSmrg# -------------------------------------- 31033e72ca8cSmrg# Check hardcoding attributes. 31043e72ca8cSmrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 31053e72ca8cSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 31063e72ca8cSmrg_LT_TAGVAR(hardcode_action, $1)= 31073e72ca8cSmrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 31083e72ca8cSmrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 31093e72ca8cSmrg test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 31103e72ca8cSmrg 31113e72ca8cSmrg # We can hardcode non-existent directories. 31123e72ca8cSmrg if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 31133e72ca8cSmrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 31143e72ca8cSmrg # have to relink, otherwise we might link with an installed library 31153e72ca8cSmrg # when we should be linking with a yet-to-be-installed one 31163e72ca8cSmrg ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 31173e72ca8cSmrg test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 31183e72ca8cSmrg # Linking always hardcodes the temporary library directory. 31193e72ca8cSmrg _LT_TAGVAR(hardcode_action, $1)=relink 3120a1ed278cSmrg else 31213e72ca8cSmrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 31223e72ca8cSmrg _LT_TAGVAR(hardcode_action, $1)=immediate 312334977a2fSmrg fi 31243e72ca8cSmrgelse 31253e72ca8cSmrg # We cannot hardcode anything, or else we can only hardcode existing 31263e72ca8cSmrg # directories. 31273e72ca8cSmrg _LT_TAGVAR(hardcode_action, $1)=unsupported 31283e72ca8cSmrgfi 31293e72ca8cSmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 313034977a2fSmrg 31313e72ca8cSmrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 31323e72ca8cSmrg test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 31333e72ca8cSmrg # Fast installation is not supported 31343e72ca8cSmrg enable_fast_install=no 31353e72ca8cSmrgelif test "$shlibpath_overrides_runpath" = yes || 31363e72ca8cSmrg test "$enable_shared" = no; then 31373e72ca8cSmrg # Fast installation is not necessary 31383e72ca8cSmrg enable_fast_install=needless 31393e72ca8cSmrgfi 31403e72ca8cSmrg_LT_TAGDECL([], [hardcode_action], [0], 31413e72ca8cSmrg [How to hardcode a shared library path into an executable]) 31423e72ca8cSmrg])# _LT_LINKER_HARDCODE_LIBPATH 314334977a2fSmrg 314434977a2fSmrg 31453e72ca8cSmrg# _LT_CMD_STRIPLIB 31463e72ca8cSmrg# ---------------- 31473e72ca8cSmrgm4_defun([_LT_CMD_STRIPLIB], 31483e72ca8cSmrg[m4_require([_LT_DECL_EGREP]) 31493e72ca8cSmrgstriplib= 31503e72ca8cSmrgold_striplib= 31513e72ca8cSmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 31523e72ca8cSmrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 31533e72ca8cSmrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 31543e72ca8cSmrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 31553e72ca8cSmrg AC_MSG_RESULT([yes]) 31563e72ca8cSmrgelse 31573e72ca8cSmrg# FIXME - insert some real tests, host_os isn't really good enough 31583e72ca8cSmrg case $host_os in 31593e72ca8cSmrg darwin*) 31603e72ca8cSmrg if test -n "$STRIP" ; then 31613e72ca8cSmrg striplib="$STRIP -x" 31623e72ca8cSmrg old_striplib="$STRIP -S" 31633e72ca8cSmrg AC_MSG_RESULT([yes]) 31643e72ca8cSmrg else 31653e72ca8cSmrg AC_MSG_RESULT([no]) 31663e72ca8cSmrg fi 3167b425557eSmrg ;; 3168b425557eSmrg *) 31693e72ca8cSmrg AC_MSG_RESULT([no]) 3170b425557eSmrg ;; 3171b425557eSmrg esac 31723e72ca8cSmrgfi 31733e72ca8cSmrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 31743e72ca8cSmrg_LT_DECL([], [striplib], [1]) 31753e72ca8cSmrg])# _LT_CMD_STRIPLIB 317634977a2fSmrg 3177ee3138f1Smrg 31783e72ca8cSmrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 31793e72ca8cSmrg# ----------------------------- 31803e72ca8cSmrg# PORTME Fill in your ld.so characteristics 31813e72ca8cSmrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 31823e72ca8cSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 31833e72ca8cSmrgm4_require([_LT_DECL_EGREP])dnl 31843e72ca8cSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 31853e72ca8cSmrgm4_require([_LT_DECL_OBJDUMP])dnl 31863e72ca8cSmrgm4_require([_LT_DECL_SED])dnl 31873e72ca8cSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 31883e72ca8cSmrgAC_MSG_CHECKING([dynamic linker characteristics]) 31893e72ca8cSmrgm4_if([$1], 31903e72ca8cSmrg [], [ 31913e72ca8cSmrgif test "$GCC" = yes; then 31923e72ca8cSmrg case $host_os in 31933e72ca8cSmrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 31943e72ca8cSmrg *) lt_awk_arg="/^libraries:/" ;; 3195a1ed278cSmrg esac 31963e72ca8cSmrg case $host_os in 31973e72ca8cSmrg mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 31983e72ca8cSmrg *) lt_sed_strip_eq="s,=/,/,g" ;; 31993e72ca8cSmrg esac 32003e72ca8cSmrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 32013e72ca8cSmrg case $lt_search_path_spec in 32023e72ca8cSmrg *\;*) 32033e72ca8cSmrg # if the path contains ";" then we assume it to be the separator 32043e72ca8cSmrg # otherwise default to the standard path separator (i.e. ":") - it is 32053e72ca8cSmrg # assumed that no part of a normal pathname contains ";" but that should 32063e72ca8cSmrg # okay in the real world where ";" in dirpaths is itself problematic. 32073e72ca8cSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 32083e72ca8cSmrg ;; 32093e72ca8cSmrg *) 32103e72ca8cSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 32113e72ca8cSmrg ;; 32123e72ca8cSmrg esac 32133e72ca8cSmrg # Ok, now we have the path, separated by spaces, we can step through it 32143e72ca8cSmrg # and add multilib dir if necessary. 32153e72ca8cSmrg lt_tmp_lt_search_path_spec= 32163e72ca8cSmrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 32173e72ca8cSmrg for lt_sys_path in $lt_search_path_spec; do 32183e72ca8cSmrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 32193e72ca8cSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 32203e72ca8cSmrg else 32213e72ca8cSmrg test -d "$lt_sys_path" && \ 32223e72ca8cSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 32233e72ca8cSmrg fi 32243e72ca8cSmrg done 32253e72ca8cSmrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 32263e72ca8cSmrgBEGIN {RS=" "; FS="/|\n";} { 32273e72ca8cSmrg lt_foo=""; 32283e72ca8cSmrg lt_count=0; 32293e72ca8cSmrg for (lt_i = NF; lt_i > 0; lt_i--) { 32303e72ca8cSmrg if ($lt_i != "" && $lt_i != ".") { 32313e72ca8cSmrg if ($lt_i == "..") { 32323e72ca8cSmrg lt_count++; 32333e72ca8cSmrg } else { 32343e72ca8cSmrg if (lt_count == 0) { 32353e72ca8cSmrg lt_foo="/" $lt_i lt_foo; 32363e72ca8cSmrg } else { 32373e72ca8cSmrg lt_count--; 32383e72ca8cSmrg } 32393e72ca8cSmrg } 32403e72ca8cSmrg } 32413e72ca8cSmrg } 32423e72ca8cSmrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 32433e72ca8cSmrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 32443e72ca8cSmrg}'` 32453e72ca8cSmrg # AWK program above erroneously prepends '/' to C:/dos/paths 32463e72ca8cSmrg # for these hosts. 32473e72ca8cSmrg case $host_os in 32483e72ca8cSmrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 32493e72ca8cSmrg $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 32503e72ca8cSmrg esac 32513e72ca8cSmrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 32523e72ca8cSmrgelse 32533e72ca8cSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 32543e72ca8cSmrgfi]) 32553e72ca8cSmrglibrary_names_spec= 32563e72ca8cSmrglibname_spec='lib$name' 32573e72ca8cSmrgsoname_spec= 32583e72ca8cSmrgshrext_cmds=".so" 32593e72ca8cSmrgpostinstall_cmds= 32603e72ca8cSmrgpostuninstall_cmds= 32613e72ca8cSmrgfinish_cmds= 32623e72ca8cSmrgfinish_eval= 32633e72ca8cSmrgshlibpath_var= 32643e72ca8cSmrgshlibpath_overrides_runpath=unknown 32653e72ca8cSmrgversion_type=none 32663e72ca8cSmrgdynamic_linker="$host_os ld.so" 32673e72ca8cSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 32683e72ca8cSmrgneed_lib_prefix=unknown 32693e72ca8cSmrghardcode_into_libs=no 3270ee3138f1Smrg 32713e72ca8cSmrg# when you set need_version to no, make sure it does not cause -set_version 32723e72ca8cSmrg# flags to be left without arguments 32733e72ca8cSmrgneed_version=unknown 3274ee3138f1Smrg 32753e72ca8cSmrgcase $host_os in 32763e72ca8cSmrgaix3*) 32773e72ca8cSmrg version_type=linux # correct to gnu/linux during the next big refactor 32783e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 32793e72ca8cSmrg shlibpath_var=LIBPATH 3280ee3138f1Smrg 32813e72ca8cSmrg # AIX 3 has no versioning support, so we append a major version to the name. 32823e72ca8cSmrg soname_spec='${libname}${release}${shared_ext}$major' 3283a1ed278cSmrg ;; 3284ee3138f1Smrg 32853e72ca8cSmrgaix[[4-9]]*) 32863e72ca8cSmrg version_type=linux # correct to gnu/linux during the next big refactor 32873e72ca8cSmrg need_lib_prefix=no 32883e72ca8cSmrg need_version=no 32893e72ca8cSmrg hardcode_into_libs=yes 32903e72ca8cSmrg if test "$host_cpu" = ia64; then 32913e72ca8cSmrg # AIX 5 supports IA64 32923e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 32933e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 3294a1ed278cSmrg else 32953e72ca8cSmrg # With GCC up to 2.95.x, collect2 would create an import file 32963e72ca8cSmrg # for dependence libraries. The import file would start with 32973e72ca8cSmrg # the line `#! .'. This would cause the generated library to 32983e72ca8cSmrg # depend on `.', always an invalid library. This was fixed in 32993e72ca8cSmrg # development snapshots of GCC prior to 3.0. 33003e72ca8cSmrg case $host_os in 33013e72ca8cSmrg aix4 | aix4.[[01]] | aix4.[[01]].*) 33023e72ca8cSmrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 33033e72ca8cSmrg echo ' yes ' 33043e72ca8cSmrg echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 33053e72ca8cSmrg : 33063e72ca8cSmrg else 33073e72ca8cSmrg can_build_shared=no 33083e72ca8cSmrg fi 33093e72ca8cSmrg ;; 33103e72ca8cSmrg esac 33113e72ca8cSmrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 33123e72ca8cSmrg # soname into executable. Probably we can add versioning support to 33133e72ca8cSmrg # collect2, so additional links can be useful in future. 33143e72ca8cSmrg if test "$aix_use_runtimelinking" = yes; then 33153e72ca8cSmrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 33163e72ca8cSmrg # instead of lib<name>.a to let people know that these are not 33173e72ca8cSmrg # typical AIX shared libraries. 33183e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 33193e72ca8cSmrg else 33203e72ca8cSmrg # We preserve .a as extension for shared libraries through AIX4.2 33213e72ca8cSmrg # and later when we are not doing run time linking. 33223e72ca8cSmrg library_names_spec='${libname}${release}.a $libname.a' 33233e72ca8cSmrg soname_spec='${libname}${release}${shared_ext}$major' 33243e72ca8cSmrg fi 33253e72ca8cSmrg shlibpath_var=LIBPATH 3326a1ed278cSmrg fi 3327a1ed278cSmrg ;; 3328ee3138f1Smrg 33293e72ca8cSmrgamigaos*) 33303e72ca8cSmrg case $host_cpu in 33313e72ca8cSmrg powerpc) 33323e72ca8cSmrg # Since July 2007 AmigaOS4 officially supports .so libraries. 33333e72ca8cSmrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 33343e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 33353e72ca8cSmrg ;; 33363e72ca8cSmrg m68k) 33373e72ca8cSmrg library_names_spec='$libname.ixlibrary $libname.a' 33383e72ca8cSmrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 33393e72ca8cSmrg 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' 33403e72ca8cSmrg ;; 33413e72ca8cSmrg esac 3342a1ed278cSmrg ;; 3343ee3138f1Smrg 33443e72ca8cSmrgbeos*) 33453e72ca8cSmrg library_names_spec='${libname}${shared_ext}' 33463e72ca8cSmrg dynamic_linker="$host_os ld.so" 33473e72ca8cSmrg shlibpath_var=LIBRARY_PATH 3348a1ed278cSmrg ;; 3349ee3138f1Smrg 33503e72ca8cSmrgbsdi[[45]]*) 33513e72ca8cSmrg version_type=linux # correct to gnu/linux during the next big refactor 33523e72ca8cSmrg need_version=no 33533e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 33543e72ca8cSmrg soname_spec='${libname}${release}${shared_ext}$major' 33553e72ca8cSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 33563e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 33573e72ca8cSmrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 33583e72ca8cSmrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 33593e72ca8cSmrg # the default ld.so.conf also contains /usr/contrib/lib and 33603e72ca8cSmrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 33613e72ca8cSmrg # libtool to hard-code these into programs 3362a1ed278cSmrg ;; 3363ee3138f1Smrg 33643e72ca8cSmrgcygwin* | mingw* | pw32* | cegcc*) 33653e72ca8cSmrg version_type=windows 33663e72ca8cSmrg shrext_cmds=".dll" 33673e72ca8cSmrg need_version=no 33683e72ca8cSmrg need_lib_prefix=no 3369ee3138f1Smrg 33703e72ca8cSmrg case $GCC,$cc_basename in 33713e72ca8cSmrg yes,*) 33723e72ca8cSmrg # gcc 33733e72ca8cSmrg library_names_spec='$libname.dll.a' 33743e72ca8cSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 33753e72ca8cSmrg postinstall_cmds='base_file=`basename \${file}`~ 33763e72ca8cSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 33773e72ca8cSmrg dldir=$destdir/`dirname \$dlpath`~ 33783e72ca8cSmrg test -d \$dldir || mkdir -p \$dldir~ 33793e72ca8cSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 33803e72ca8cSmrg chmod a+x \$dldir/$dlname~ 33813e72ca8cSmrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 33823e72ca8cSmrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 33833e72ca8cSmrg fi' 33843e72ca8cSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 33853e72ca8cSmrg dlpath=$dir/\$dldll~ 33863e72ca8cSmrg $RM \$dlpath' 33873e72ca8cSmrg shlibpath_overrides_runpath=yes 33883e72ca8cSmrg 33893e72ca8cSmrg case $host_os in 33903e72ca8cSmrg cygwin*) 33913e72ca8cSmrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 33923e72ca8cSmrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 33933e72ca8cSmrgm4_if([$1], [],[ 33943e72ca8cSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 33953e72ca8cSmrg ;; 33963e72ca8cSmrg mingw* | cegcc*) 33973e72ca8cSmrg # MinGW DLLs use traditional 'lib' prefix 33983e72ca8cSmrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 33993e72ca8cSmrg ;; 34003e72ca8cSmrg pw32*) 34013e72ca8cSmrg # pw32 DLLs use 'pw' prefix rather than 'lib' 34023e72ca8cSmrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 34033e72ca8cSmrg ;; 34043e72ca8cSmrg esac 34053e72ca8cSmrg dynamic_linker='Win32 ld.exe' 3406b425557eSmrg ;; 34073e72ca8cSmrg 34083e72ca8cSmrg *,cl*) 34093e72ca8cSmrg # Native MSVC 34103e72ca8cSmrg libname_spec='$name' 34113e72ca8cSmrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 34123e72ca8cSmrg library_names_spec='${libname}.dll.lib' 34133e72ca8cSmrg 34143e72ca8cSmrg case $build_os in 34153e72ca8cSmrg mingw*) 34163e72ca8cSmrg sys_lib_search_path_spec= 34173e72ca8cSmrg lt_save_ifs=$IFS 34183e72ca8cSmrg IFS=';' 34193e72ca8cSmrg for lt_path in $LIB 34203e72ca8cSmrg do 34213e72ca8cSmrg IFS=$lt_save_ifs 34223e72ca8cSmrg # Let DOS variable expansion print the short 8.3 style file name. 34233e72ca8cSmrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 34243e72ca8cSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 34253e72ca8cSmrg done 34263e72ca8cSmrg IFS=$lt_save_ifs 34273e72ca8cSmrg # Convert to MSYS style. 34283e72ca8cSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 34293e72ca8cSmrg ;; 34303e72ca8cSmrg cygwin*) 34313e72ca8cSmrg # Convert to unix form, then to dos form, then back to unix form 34323e72ca8cSmrg # but this time dos style (no spaces!) so that the unix form looks 34333e72ca8cSmrg # like /cygdrive/c/PROGRA~1:/cygdr... 34343e72ca8cSmrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 34353e72ca8cSmrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 34363e72ca8cSmrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 34373e72ca8cSmrg ;; 34383e72ca8cSmrg *) 34393e72ca8cSmrg sys_lib_search_path_spec="$LIB" 34403e72ca8cSmrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 34413e72ca8cSmrg # It is most probably a Windows format PATH. 34423e72ca8cSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 34433e72ca8cSmrg else 34443e72ca8cSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 34453e72ca8cSmrg fi 34463e72ca8cSmrg # FIXME: find the short name or the path components, as spaces are 34473e72ca8cSmrg # common. (e.g. "Program Files" -> "PROGRA~1") 34483e72ca8cSmrg ;; 34493e72ca8cSmrg esac 34503e72ca8cSmrg 34513e72ca8cSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 34523e72ca8cSmrg postinstall_cmds='base_file=`basename \${file}`~ 34533e72ca8cSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 34543e72ca8cSmrg dldir=$destdir/`dirname \$dlpath`~ 34553e72ca8cSmrg test -d \$dldir || mkdir -p \$dldir~ 34563e72ca8cSmrg $install_prog $dir/$dlname \$dldir/$dlname' 34573e72ca8cSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 34583e72ca8cSmrg dlpath=$dir/\$dldll~ 34593e72ca8cSmrg $RM \$dlpath' 34603e72ca8cSmrg shlibpath_overrides_runpath=yes 34613e72ca8cSmrg dynamic_linker='Win32 link.exe' 3462b425557eSmrg ;; 34633e72ca8cSmrg 34643e72ca8cSmrg *) 34653e72ca8cSmrg # Assume MSVC wrapper 34663e72ca8cSmrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 34673e72ca8cSmrg dynamic_linker='Win32 ld.exe' 346834977a2fSmrg ;; 3469ee3138f1Smrg esac 34703e72ca8cSmrg # FIXME: first we should search . and the directory the executable is in 34713e72ca8cSmrg shlibpath_var=PATH 3472a1ed278cSmrg ;; 3473ee3138f1Smrg 34743e72ca8cSmrgdarwin* | rhapsody*) 34753e72ca8cSmrg dynamic_linker="$host_os dyld" 34763e72ca8cSmrg version_type=darwin 34773e72ca8cSmrg need_lib_prefix=no 34783e72ca8cSmrg need_version=no 34793e72ca8cSmrg library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 34803e72ca8cSmrg soname_spec='${libname}${release}${major}$shared_ext' 34813e72ca8cSmrg shlibpath_overrides_runpath=yes 34823e72ca8cSmrg shlibpath_var=DYLD_LIBRARY_PATH 34833e72ca8cSmrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 34843e72ca8cSmrgm4_if([$1], [],[ 34853e72ca8cSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 34863e72ca8cSmrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 3487a1ed278cSmrg ;; 3488ee3138f1Smrg 34893e72ca8cSmrgdgux*) 34903e72ca8cSmrg version_type=linux # correct to gnu/linux during the next big refactor 34913e72ca8cSmrg need_lib_prefix=no 34923e72ca8cSmrg need_version=no 34933e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 34943e72ca8cSmrg soname_spec='${libname}${release}${shared_ext}$major' 34953e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 34963e72ca8cSmrg ;; 3497ee3138f1Smrg 34983e72ca8cSmrgfreebsd* | dragonfly*) 34993e72ca8cSmrg # DragonFly does not have aout. When/if they implement a new 35003e72ca8cSmrg # versioning mechanism, adjust this. 35013e72ca8cSmrg if test -x /usr/bin/objformat; then 35023e72ca8cSmrg objformat=`/usr/bin/objformat` 3503a1ed278cSmrg else 35043e72ca8cSmrg case $host_os in 35053e72ca8cSmrg freebsd[[23]].*) objformat=aout ;; 35063e72ca8cSmrg *) objformat=elf ;; 3507a1ed278cSmrg esac 3508a1ed278cSmrg fi 35093e72ca8cSmrg version_type=freebsd-$objformat 35103e72ca8cSmrg case $version_type in 35113e72ca8cSmrg freebsd-elf*) 35123e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 35133e72ca8cSmrg need_version=no 35143e72ca8cSmrg need_lib_prefix=no 35153e72ca8cSmrg ;; 35163e72ca8cSmrg freebsd-*) 35173e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 35183e72ca8cSmrg need_version=yes 35193e72ca8cSmrg ;; 35203e72ca8cSmrg esac 35213e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 35223e72ca8cSmrg case $host_os in 35233e72ca8cSmrg freebsd2.*) 35243e72ca8cSmrg shlibpath_overrides_runpath=yes 35253e72ca8cSmrg ;; 35263e72ca8cSmrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 35273e72ca8cSmrg shlibpath_overrides_runpath=yes 35283e72ca8cSmrg hardcode_into_libs=yes 35293e72ca8cSmrg ;; 35303e72ca8cSmrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 35313e72ca8cSmrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 35323e72ca8cSmrg shlibpath_overrides_runpath=no 35333e72ca8cSmrg hardcode_into_libs=yes 35343e72ca8cSmrg ;; 35353e72ca8cSmrg *) # from 4.6 on, and DragonFly 35363e72ca8cSmrg shlibpath_overrides_runpath=yes 35373e72ca8cSmrg hardcode_into_libs=yes 35383e72ca8cSmrg ;; 3539a1ed278cSmrg esac 35403e72ca8cSmrg ;; 3541ee3138f1Smrg 35423e72ca8cSmrggnu*) 35433e72ca8cSmrg version_type=linux # correct to gnu/linux during the next big refactor 35443e72ca8cSmrg need_lib_prefix=no 35453e72ca8cSmrg need_version=no 35463e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 35473e72ca8cSmrg soname_spec='${libname}${release}${shared_ext}$major' 35483e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 35493e72ca8cSmrg shlibpath_overrides_runpath=no 35503e72ca8cSmrg hardcode_into_libs=yes 35513e72ca8cSmrg ;; 3552ee3138f1Smrg 35533e72ca8cSmrghaiku*) 35543e72ca8cSmrg version_type=linux # correct to gnu/linux during the next big refactor 35553e72ca8cSmrg need_lib_prefix=no 35563e72ca8cSmrg need_version=no 35573e72ca8cSmrg dynamic_linker="$host_os runtime_loader" 35583e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 35593e72ca8cSmrg soname_spec='${libname}${release}${shared_ext}$major' 35603e72ca8cSmrg shlibpath_var=LIBRARY_PATH 35613e72ca8cSmrg shlibpath_overrides_runpath=yes 35623e72ca8cSmrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 35633e72ca8cSmrg hardcode_into_libs=yes 35643e72ca8cSmrg ;; 3565ee3138f1Smrg 35663e72ca8cSmrghpux9* | hpux10* | hpux11*) 35673e72ca8cSmrg # Give a soname corresponding to the major version so that dld.sl refuses to 35683e72ca8cSmrg # link against other versions. 35693e72ca8cSmrg version_type=sunos 35703e72ca8cSmrg need_lib_prefix=no 35713e72ca8cSmrg need_version=no 35723e72ca8cSmrg case $host_cpu in 35733e72ca8cSmrg ia64*) 35743e72ca8cSmrg shrext_cmds='.so' 35753e72ca8cSmrg hardcode_into_libs=yes 35763e72ca8cSmrg dynamic_linker="$host_os dld.so" 35773e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 35783e72ca8cSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 35793e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 35803e72ca8cSmrg soname_spec='${libname}${release}${shared_ext}$major' 35813e72ca8cSmrg if test "X$HPUX_IA64_MODE" = X32; then 35823e72ca8cSmrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 35833e72ca8cSmrg else 35843e72ca8cSmrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 35853e72ca8cSmrg fi 35863e72ca8cSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 35873e72ca8cSmrg ;; 35883e72ca8cSmrg hppa*64*) 35893e72ca8cSmrg shrext_cmds='.sl' 35903e72ca8cSmrg hardcode_into_libs=yes 35913e72ca8cSmrg dynamic_linker="$host_os dld.sl" 35923e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 35933e72ca8cSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 35943e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 35953e72ca8cSmrg soname_spec='${libname}${release}${shared_ext}$major' 35963e72ca8cSmrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 35973e72ca8cSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 35983e72ca8cSmrg ;; 35993e72ca8cSmrg *) 36003e72ca8cSmrg shrext_cmds='.sl' 36013e72ca8cSmrg dynamic_linker="$host_os dld.sl" 36023e72ca8cSmrg shlibpath_var=SHLIB_PATH 36033e72ca8cSmrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 36043e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 36053e72ca8cSmrg soname_spec='${libname}${release}${shared_ext}$major' 36063e72ca8cSmrg ;; 36073e72ca8cSmrg esac 36083e72ca8cSmrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 36093e72ca8cSmrg postinstall_cmds='chmod 555 $lib' 36103e72ca8cSmrg # or fails outright, so override atomically: 36113e72ca8cSmrg install_override_mode=555 3612a1ed278cSmrg ;; 36133e72ca8cSmrg 36143e72ca8cSmrginterix[[3-9]]*) 36153e72ca8cSmrg version_type=linux # correct to gnu/linux during the next big refactor 36163e72ca8cSmrg need_lib_prefix=no 36173e72ca8cSmrg need_version=no 36183e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 36193e72ca8cSmrg soname_spec='${libname}${release}${shared_ext}$major' 36203e72ca8cSmrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 36213e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 36223e72ca8cSmrg shlibpath_overrides_runpath=no 36233e72ca8cSmrg hardcode_into_libs=yes 3624a1ed278cSmrg ;; 36253e72ca8cSmrg 36263e72ca8cSmrgirix5* | irix6* | nonstopux*) 36273e72ca8cSmrg case $host_os in 36283e72ca8cSmrg nonstopux*) version_type=nonstopux ;; 36293e72ca8cSmrg *) 36303e72ca8cSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 36313e72ca8cSmrg version_type=linux # correct to gnu/linux during the next big refactor 36323e72ca8cSmrg else 36333e72ca8cSmrg version_type=irix 36343e72ca8cSmrg fi ;; 36353e72ca8cSmrg esac 36363e72ca8cSmrg need_lib_prefix=no 36373e72ca8cSmrg need_version=no 36383e72ca8cSmrg soname_spec='${libname}${release}${shared_ext}$major' 36393e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 36403e72ca8cSmrg case $host_os in 36413e72ca8cSmrg irix5* | nonstopux*) 36423e72ca8cSmrg libsuff= shlibsuff= 36433e72ca8cSmrg ;; 36443e72ca8cSmrg *) 36453e72ca8cSmrg case $LD in # libtool.m4 will add one of these switches to LD 36463e72ca8cSmrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 36473e72ca8cSmrg libsuff= shlibsuff= libmagic=32-bit;; 36483e72ca8cSmrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 36493e72ca8cSmrg libsuff=32 shlibsuff=N32 libmagic=N32;; 36503e72ca8cSmrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 36513e72ca8cSmrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 36523e72ca8cSmrg *) libsuff= shlibsuff= libmagic=never-match;; 36533e72ca8cSmrg esac 36543e72ca8cSmrg ;; 36553e72ca8cSmrg esac 36563e72ca8cSmrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 36573e72ca8cSmrg shlibpath_overrides_runpath=no 36583e72ca8cSmrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 36593e72ca8cSmrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 36603e72ca8cSmrg hardcode_into_libs=yes 3661a1ed278cSmrg ;; 36623e72ca8cSmrg 36633e72ca8cSmrg# No shared lib support for Linux oldld, aout, or coff. 36643e72ca8cSmrglinux*oldld* | linux*aout* | linux*coff*) 36653e72ca8cSmrg dynamic_linker=no 3666a1ed278cSmrg ;; 3667ee3138f1Smrg 36683e72ca8cSmrg# This must be glibc/ELF. 36693e72ca8cSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 36703e72ca8cSmrg version_type=linux # correct to gnu/linux during the next big refactor 36713e72ca8cSmrg need_lib_prefix=no 36723e72ca8cSmrg need_version=no 36733e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 36743e72ca8cSmrg soname_spec='${libname}${release}${shared_ext}$major' 36753e72ca8cSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 36763e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 36773e72ca8cSmrg shlibpath_overrides_runpath=no 3678ee3138f1Smrg 36793e72ca8cSmrg # Some binutils ld are patched to set DT_RUNPATH 36803e72ca8cSmrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 36813e72ca8cSmrg [lt_cv_shlibpath_overrides_runpath=no 36823e72ca8cSmrg save_LDFLAGS=$LDFLAGS 36833e72ca8cSmrg save_libdir=$libdir 36843e72ca8cSmrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 36853e72ca8cSmrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 36863e72ca8cSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 36873e72ca8cSmrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 36883e72ca8cSmrg [lt_cv_shlibpath_overrides_runpath=yes])]) 36893e72ca8cSmrg LDFLAGS=$save_LDFLAGS 36903e72ca8cSmrg libdir=$save_libdir 36913e72ca8cSmrg ]) 36923e72ca8cSmrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 369334977a2fSmrg 36943e72ca8cSmrg # This implies no fast_install, which is unacceptable. 36953e72ca8cSmrg # Some rework will be needed to allow for fast_install 36963e72ca8cSmrg # before this can be enabled. 36973e72ca8cSmrg hardcode_into_libs=yes 3698ee3138f1Smrg 36993e72ca8cSmrg # Add ABI-specific directories to the system library path. 37003e72ca8cSmrg sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" 3701ee3138f1Smrg 37023e72ca8cSmrg # Append ld.so.conf contents to the search path 37033e72ca8cSmrg if test -f /etc/ld.so.conf; then 37043e72ca8cSmrg 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' ' '` 37053e72ca8cSmrg sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" 3706ee3138f1Smrg 37073e72ca8cSmrg fi 3708ee3138f1Smrg 37093e72ca8cSmrg # We used to test for /lib/ld.so.1 and disable shared libraries on 37103e72ca8cSmrg # powerpc, because MkLinux only supported shared libraries with the 37113e72ca8cSmrg # GNU dynamic linker. Since this was broken with cross compilers, 37123e72ca8cSmrg # most powerpc-linux boxes support dynamic linking these days and 37133e72ca8cSmrg # people can always --disable-shared, the test was removed, and we 37143e72ca8cSmrg # assume the GNU/Linux dynamic linker is in use. 37153e72ca8cSmrg dynamic_linker='GNU/Linux ld.so' 37163e72ca8cSmrg ;; 37173e72ca8cSmrg 37183e72ca8cSmrgnetbsd*) 37193e72ca8cSmrg version_type=sunos 37203e72ca8cSmrg need_lib_prefix=no 37213e72ca8cSmrg need_version=no 37223e72ca8cSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 37233e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 37243e72ca8cSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 37253e72ca8cSmrg dynamic_linker='NetBSD (a.out) ld.so' 3726a1ed278cSmrg else 37273e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 37283e72ca8cSmrg soname_spec='${libname}${release}${shared_ext}$major' 37293e72ca8cSmrg dynamic_linker='NetBSD ld.elf_so' 3730a1ed278cSmrg fi 37313e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 37323e72ca8cSmrg shlibpath_overrides_runpath=yes 37333e72ca8cSmrg hardcode_into_libs=yes 37343e72ca8cSmrg ;; 3735ee3138f1Smrg 37363e72ca8cSmrgnewsos6) 37373e72ca8cSmrg version_type=linux # correct to gnu/linux during the next big refactor 37383e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 37393e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 37403e72ca8cSmrg shlibpath_overrides_runpath=yes 37413e72ca8cSmrg ;; 3742ee3138f1Smrg 37433e72ca8cSmrg*nto* | *qnx*) 37443e72ca8cSmrg version_type=qnx 37453e72ca8cSmrg need_lib_prefix=no 37463e72ca8cSmrg need_version=no 37473e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 37483e72ca8cSmrg soname_spec='${libname}${release}${shared_ext}$major' 37493e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 37503e72ca8cSmrg shlibpath_overrides_runpath=no 37513e72ca8cSmrg hardcode_into_libs=yes 37523e72ca8cSmrg dynamic_linker='ldqnx.so' 37533e72ca8cSmrg ;; 3754ee3138f1Smrg 37553e72ca8cSmrgopenbsd*) 37563e72ca8cSmrg version_type=sunos 37573e72ca8cSmrg sys_lib_dlsearch_path_spec="/usr/lib" 37583e72ca8cSmrg need_lib_prefix=no 37593e72ca8cSmrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 37603e72ca8cSmrg case $host_os in 37613e72ca8cSmrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 37623e72ca8cSmrg *) need_version=no ;; 37633e72ca8cSmrg esac 37643e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 37653e72ca8cSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 37663e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 37673e72ca8cSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 37683e72ca8cSmrg case $host_os in 37693e72ca8cSmrg openbsd2.[[89]] | openbsd2.[[89]].*) 37703e72ca8cSmrg shlibpath_overrides_runpath=no 37713e72ca8cSmrg ;; 37723e72ca8cSmrg *) 37733e72ca8cSmrg shlibpath_overrides_runpath=yes 37743e72ca8cSmrg ;; 37753e72ca8cSmrg esac 37763e72ca8cSmrg else 37773e72ca8cSmrg shlibpath_overrides_runpath=yes 37783e72ca8cSmrg fi 37793e72ca8cSmrg ;; 3780ee3138f1Smrg 37813e72ca8cSmrgos2*) 37823e72ca8cSmrg libname_spec='$name' 37833e72ca8cSmrg shrext_cmds=".dll" 37843e72ca8cSmrg need_lib_prefix=no 37853e72ca8cSmrg library_names_spec='$libname${shared_ext} $libname.a' 37863e72ca8cSmrg dynamic_linker='OS/2 ld.exe' 37873e72ca8cSmrg shlibpath_var=LIBPATH 37883e72ca8cSmrg ;; 3789ee3138f1Smrg 37903e72ca8cSmrgosf3* | osf4* | osf5*) 37913e72ca8cSmrg version_type=osf 37923e72ca8cSmrg need_lib_prefix=no 37933e72ca8cSmrg need_version=no 37943e72ca8cSmrg soname_spec='${libname}${release}${shared_ext}$major' 37953e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 37963e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 37973e72ca8cSmrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 37983e72ca8cSmrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 37993e72ca8cSmrg ;; 3800ee3138f1Smrg 38013e72ca8cSmrgrdos*) 38023e72ca8cSmrg dynamic_linker=no 38033e72ca8cSmrg ;; 3804ee3138f1Smrg 38053e72ca8cSmrgsolaris*) 38063e72ca8cSmrg version_type=linux # correct to gnu/linux during the next big refactor 38073e72ca8cSmrg need_lib_prefix=no 38083e72ca8cSmrg need_version=no 38093e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 38103e72ca8cSmrg soname_spec='${libname}${release}${shared_ext}$major' 38113e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 38123e72ca8cSmrg shlibpath_overrides_runpath=yes 38133e72ca8cSmrg hardcode_into_libs=yes 38143e72ca8cSmrg # ldd complains unless libraries are executable 38153e72ca8cSmrg postinstall_cmds='chmod +x $lib' 38163e72ca8cSmrg ;; 3817a1ed278cSmrg 38183e72ca8cSmrgsunos4*) 38193e72ca8cSmrg version_type=sunos 38203e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 38213e72ca8cSmrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 38223e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 38233e72ca8cSmrg shlibpath_overrides_runpath=yes 38243e72ca8cSmrg if test "$with_gnu_ld" = yes; then 38253e72ca8cSmrg need_lib_prefix=no 38263e72ca8cSmrg fi 38273e72ca8cSmrg need_version=yes 38283e72ca8cSmrg ;; 3829a1ed278cSmrg 38303e72ca8cSmrgsysv4 | sysv4.3*) 38313e72ca8cSmrg version_type=linux # correct to gnu/linux during the next big refactor 38323e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 38333e72ca8cSmrg soname_spec='${libname}${release}${shared_ext}$major' 38343e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 38353e72ca8cSmrg case $host_vendor in 38363e72ca8cSmrg sni) 38373e72ca8cSmrg shlibpath_overrides_runpath=no 38383e72ca8cSmrg need_lib_prefix=no 38393e72ca8cSmrg runpath_var=LD_RUN_PATH 38403e72ca8cSmrg ;; 38413e72ca8cSmrg siemens) 38423e72ca8cSmrg need_lib_prefix=no 38433e72ca8cSmrg ;; 38443e72ca8cSmrg motorola) 38453e72ca8cSmrg need_lib_prefix=no 38463e72ca8cSmrg need_version=no 38473e72ca8cSmrg shlibpath_overrides_runpath=no 38483e72ca8cSmrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 38493e72ca8cSmrg ;; 38503e72ca8cSmrg esac 38513e72ca8cSmrg ;; 38523e72ca8cSmrg 38533e72ca8cSmrgsysv4*MP*) 38543e72ca8cSmrg if test -d /usr/nec ;then 38553e72ca8cSmrg version_type=linux # correct to gnu/linux during the next big refactor 38563e72ca8cSmrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 38573e72ca8cSmrg soname_spec='$libname${shared_ext}.$major' 38583e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 3859a1ed278cSmrg fi 38603e72ca8cSmrg ;; 3861a1ed278cSmrg 38623e72ca8cSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 38633e72ca8cSmrg version_type=freebsd-elf 38643e72ca8cSmrg need_lib_prefix=no 38653e72ca8cSmrg need_version=no 38663e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 38673e72ca8cSmrg soname_spec='${libname}${release}${shared_ext}$major' 38683e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 38693e72ca8cSmrg shlibpath_overrides_runpath=yes 38703e72ca8cSmrg hardcode_into_libs=yes 38713e72ca8cSmrg if test "$with_gnu_ld" = yes; then 38723e72ca8cSmrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 3873a1ed278cSmrg else 38743e72ca8cSmrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 38753e72ca8cSmrg case $host_os in 38763e72ca8cSmrg sco3.2v5*) 38773e72ca8cSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 38783e72ca8cSmrg ;; 38793e72ca8cSmrg esac 3880b425557eSmrg fi 38813e72ca8cSmrg sys_lib_dlsearch_path_spec='/usr/lib' 38823e72ca8cSmrg ;; 3883ee3138f1Smrg 38843e72ca8cSmrgtpf*) 38853e72ca8cSmrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 38863e72ca8cSmrg version_type=linux # correct to gnu/linux during the next big refactor 38873e72ca8cSmrg need_lib_prefix=no 38883e72ca8cSmrg need_version=no 38893e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 38903e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 38913e72ca8cSmrg shlibpath_overrides_runpath=no 38923e72ca8cSmrg hardcode_into_libs=yes 38933e72ca8cSmrg ;; 3894ee3138f1Smrg 38953e72ca8cSmrguts4*) 38963e72ca8cSmrg version_type=linux # correct to gnu/linux during the next big refactor 38973e72ca8cSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 38983e72ca8cSmrg soname_spec='${libname}${release}${shared_ext}$major' 38993e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 39003e72ca8cSmrg ;; 3901ee3138f1Smrg 39023e72ca8cSmrg*) 39033e72ca8cSmrg dynamic_linker=no 39043e72ca8cSmrg ;; 39053e72ca8cSmrgesac 39063e72ca8cSmrgAC_MSG_RESULT([$dynamic_linker]) 39073e72ca8cSmrgtest "$dynamic_linker" = no && can_build_shared=no 3908b425557eSmrg 39093e72ca8cSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 39103e72ca8cSmrgif test "$GCC" = yes; then 39113e72ca8cSmrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 39123e72ca8cSmrgfi 3913b425557eSmrg 39143e72ca8cSmrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 39153e72ca8cSmrg sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 39163e72ca8cSmrgfi 39173e72ca8cSmrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 39183e72ca8cSmrg sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 3919a1ed278cSmrgfi 3920ee3138f1Smrg 39213e72ca8cSmrg_LT_DECL([], [variables_saved_for_relink], [1], 39223e72ca8cSmrg [Variables whose values should be saved in libtool wrapper scripts and 39233e72ca8cSmrg restored at link time]) 39243e72ca8cSmrg_LT_DECL([], [need_lib_prefix], [0], 39253e72ca8cSmrg [Do we need the "lib" prefix for modules?]) 39263e72ca8cSmrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 39273e72ca8cSmrg_LT_DECL([], [version_type], [0], [Library versioning type]) 39283e72ca8cSmrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 39293e72ca8cSmrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 39303e72ca8cSmrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 39313e72ca8cSmrg [Is shlibpath searched before the hard-coded library search path?]) 39323e72ca8cSmrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 39333e72ca8cSmrg_LT_DECL([], [library_names_spec], [1], 39343e72ca8cSmrg [[List of archive names. First name is the real one, the rest are links. 39353e72ca8cSmrg The last name is the one that the linker finds with -lNAME]]) 39363e72ca8cSmrg_LT_DECL([], [soname_spec], [1], 39373e72ca8cSmrg [[The coded name of the library, if different from the real name]]) 39383e72ca8cSmrg_LT_DECL([], [install_override_mode], [1], 39393e72ca8cSmrg [Permission mode override for installation of shared libraries]) 39403e72ca8cSmrg_LT_DECL([], [postinstall_cmds], [2], 39413e72ca8cSmrg [Command to use after installation of a shared archive]) 39423e72ca8cSmrg_LT_DECL([], [postuninstall_cmds], [2], 39433e72ca8cSmrg [Command to use after uninstallation of a shared archive]) 39443e72ca8cSmrg_LT_DECL([], [finish_cmds], [2], 39453e72ca8cSmrg [Commands used to finish a libtool library installation in a directory]) 39463e72ca8cSmrg_LT_DECL([], [finish_eval], [1], 39473e72ca8cSmrg [[As "finish_cmds", except a single script fragment to be evaled but 39483e72ca8cSmrg not shown]]) 39493e72ca8cSmrg_LT_DECL([], [hardcode_into_libs], [0], 39503e72ca8cSmrg [Whether we should hardcode library paths into libraries]) 39513e72ca8cSmrg_LT_DECL([], [sys_lib_search_path_spec], [2], 39523e72ca8cSmrg [Compile-time system search path for libraries]) 39533e72ca8cSmrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 39543e72ca8cSmrg [Run-time system search path for libraries]) 39553e72ca8cSmrg])# _LT_SYS_DYNAMIC_LINKER 3956ee3138f1Smrg 3957ee3138f1Smrg 39583e72ca8cSmrg# _LT_PATH_TOOL_PREFIX(TOOL) 39593e72ca8cSmrg# -------------------------- 39603e72ca8cSmrg# find a file program which can recognize shared library 39613e72ca8cSmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 39623e72ca8cSmrg[m4_require([_LT_DECL_EGREP])dnl 39633e72ca8cSmrgAC_MSG_CHECKING([for $1]) 39643e72ca8cSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 39653e72ca8cSmrg[case $MAGIC_CMD in 39663e72ca8cSmrg[[\\/*] | ?:[\\/]*]) 39673e72ca8cSmrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 3968a1ed278cSmrg ;; 39693e72ca8cSmrg*) 39703e72ca8cSmrg lt_save_MAGIC_CMD="$MAGIC_CMD" 39713e72ca8cSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 39723e72ca8cSmrgdnl $ac_dummy forces splitting on constant user-supplied paths. 39733e72ca8cSmrgdnl POSIX.2 word splitting is done only on the output of word expansions, 39743e72ca8cSmrgdnl not every word. This closes a longstanding sh security hole. 39753e72ca8cSmrg ac_dummy="m4_if([$2], , $PATH, [$2])" 39763e72ca8cSmrg for ac_dir in $ac_dummy; do 39773e72ca8cSmrg IFS="$lt_save_ifs" 39783e72ca8cSmrg test -z "$ac_dir" && ac_dir=. 39793e72ca8cSmrg if test -f $ac_dir/$1; then 39803e72ca8cSmrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 39813e72ca8cSmrg if test -n "$file_magic_test_file"; then 39823e72ca8cSmrg case $deplibs_check_method in 39833e72ca8cSmrg "file_magic "*) 39843e72ca8cSmrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 39853e72ca8cSmrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 39863e72ca8cSmrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 39873e72ca8cSmrg $EGREP "$file_magic_regex" > /dev/null; then 39883e72ca8cSmrg : 39893e72ca8cSmrg else 39903e72ca8cSmrg cat <<_LT_EOF 1>&2 3991ee3138f1Smrg 39923e72ca8cSmrg*** Warning: the command libtool uses to detect shared libraries, 39933e72ca8cSmrg*** $file_magic_cmd, produces output that libtool cannot recognize. 39943e72ca8cSmrg*** The result is that libtool may fail to recognize shared libraries 39953e72ca8cSmrg*** as such. This will affect the creation of libtool libraries that 39963e72ca8cSmrg*** depend on shared libraries, but programs linked with such libtool 39973e72ca8cSmrg*** libraries will work regardless of this problem. Nevertheless, you 39983e72ca8cSmrg*** may want to report the problem to your system manager and/or to 39993e72ca8cSmrg*** bug-libtool@gnu.org 4000ee3138f1Smrg 40013e72ca8cSmrg_LT_EOF 40023e72ca8cSmrg fi ;; 4003a1ed278cSmrg esac 40043e72ca8cSmrg fi 40053e72ca8cSmrg break 4006a1ed278cSmrg fi 40073e72ca8cSmrg done 40083e72ca8cSmrg IFS="$lt_save_ifs" 40093e72ca8cSmrg MAGIC_CMD="$lt_save_MAGIC_CMD" 40103e72ca8cSmrg ;; 40113e72ca8cSmrgesac]) 40123e72ca8cSmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 40133e72ca8cSmrgif test -n "$MAGIC_CMD"; then 40143e72ca8cSmrg AC_MSG_RESULT($MAGIC_CMD) 40153e72ca8cSmrgelse 40163e72ca8cSmrg AC_MSG_RESULT(no) 40173e72ca8cSmrgfi 40183e72ca8cSmrg_LT_DECL([], [MAGIC_CMD], [0], 40193e72ca8cSmrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 40203e72ca8cSmrg])# _LT_PATH_TOOL_PREFIX 4021ee3138f1Smrg 40223e72ca8cSmrg# Old name: 40233e72ca8cSmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 40243e72ca8cSmrgdnl aclocal-1.4 backwards compatibility: 40253e72ca8cSmrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 402634977a2fSmrg 4027ee3138f1Smrg 40283e72ca8cSmrg# _LT_PATH_MAGIC 40293e72ca8cSmrg# -------------- 40303e72ca8cSmrg# find a file program which can recognize a shared library 40313e72ca8cSmrgm4_defun([_LT_PATH_MAGIC], 40323e72ca8cSmrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 40333e72ca8cSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then 40343e72ca8cSmrg if test -n "$ac_tool_prefix"; then 40353e72ca8cSmrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 40363e72ca8cSmrg else 40373e72ca8cSmrg MAGIC_CMD=: 40383e72ca8cSmrg fi 40393e72ca8cSmrgfi 40403e72ca8cSmrg])# _LT_PATH_MAGIC 40413e72ca8cSmrg 4042ee3138f1Smrg 40433e72ca8cSmrg# LT_PATH_LD 40443e72ca8cSmrg# ---------- 40453e72ca8cSmrg# find the pathname to the GNU or non-GNU linker 40463e72ca8cSmrgAC_DEFUN([LT_PATH_LD], 40473e72ca8cSmrg[AC_REQUIRE([AC_PROG_CC])dnl 40483e72ca8cSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 40493e72ca8cSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 40503e72ca8cSmrgm4_require([_LT_DECL_SED])dnl 40513e72ca8cSmrgm4_require([_LT_DECL_EGREP])dnl 40523e72ca8cSmrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 405334977a2fSmrg 40543e72ca8cSmrgAC_ARG_WITH([gnu-ld], 40553e72ca8cSmrg [AS_HELP_STRING([--with-gnu-ld], 40563e72ca8cSmrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 40573e72ca8cSmrg [test "$withval" = no || with_gnu_ld=yes], 40583e72ca8cSmrg [with_gnu_ld=no])dnl 40593e72ca8cSmrg 40603e72ca8cSmrgac_prog=ld 40613e72ca8cSmrgif test "$GCC" = yes; then 40623e72ca8cSmrg # Check if gcc -print-prog-name=ld gives a path. 40633e72ca8cSmrg AC_MSG_CHECKING([for ld used by $CC]) 40643e72ca8cSmrg case $host in 40653e72ca8cSmrg *-*-mingw*) 40663e72ca8cSmrg # gcc leaves a trailing carriage return which upsets mingw 40673e72ca8cSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 40683e72ca8cSmrg *) 40693e72ca8cSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 40703e72ca8cSmrg esac 40713e72ca8cSmrg case $ac_prog in 40723e72ca8cSmrg # Accept absolute paths. 40733e72ca8cSmrg [[\\/]]* | ?:[[\\/]]*) 40743e72ca8cSmrg re_direlt='/[[^/]][[^/]]*/\.\./' 40753e72ca8cSmrg # Canonicalize the pathname of ld 40763e72ca8cSmrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 40773e72ca8cSmrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 40783e72ca8cSmrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 40793e72ca8cSmrg done 40803e72ca8cSmrg test -z "$LD" && LD="$ac_prog" 4081a1ed278cSmrg ;; 40823e72ca8cSmrg "") 40833e72ca8cSmrg # If it fails, then pretend we aren't using GCC. 40843e72ca8cSmrg ac_prog=ld 40853e72ca8cSmrg ;; 40863e72ca8cSmrg *) 40873e72ca8cSmrg # If it is relative, then search for the first ld in PATH. 40883e72ca8cSmrg with_gnu_ld=unknown 40893e72ca8cSmrg ;; 40903e72ca8cSmrg esac 40913e72ca8cSmrgelif test "$with_gnu_ld" = yes; then 40923e72ca8cSmrg AC_MSG_CHECKING([for GNU ld]) 40933e72ca8cSmrgelse 40943e72ca8cSmrg AC_MSG_CHECKING([for non-GNU ld]) 40953e72ca8cSmrgfi 40963e72ca8cSmrgAC_CACHE_VAL(lt_cv_path_LD, 40973e72ca8cSmrg[if test -z "$LD"; then 40983e72ca8cSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 40993e72ca8cSmrg for ac_dir in $PATH; do 41003e72ca8cSmrg IFS="$lt_save_ifs" 41013e72ca8cSmrg test -z "$ac_dir" && ac_dir=. 41023e72ca8cSmrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 41033e72ca8cSmrg lt_cv_path_LD="$ac_dir/$ac_prog" 41043e72ca8cSmrg # Check to see if the program is GNU ld. I'd rather use --version, 41053e72ca8cSmrg # but apparently some variants of GNU ld only accept -v. 41063e72ca8cSmrg # Break only if it was the GNU/non-GNU ld that we prefer. 41073e72ca8cSmrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 41083e72ca8cSmrg *GNU* | *'with BFD'*) 41093e72ca8cSmrg test "$with_gnu_ld" != no && break 41103e72ca8cSmrg ;; 41113e72ca8cSmrg *) 41123e72ca8cSmrg test "$with_gnu_ld" != yes && break 41133e72ca8cSmrg ;; 41143e72ca8cSmrg esac 41153e72ca8cSmrg fi 41163e72ca8cSmrg done 41173e72ca8cSmrg IFS="$lt_save_ifs" 41183e72ca8cSmrgelse 41193e72ca8cSmrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 41203e72ca8cSmrgfi]) 41213e72ca8cSmrgLD="$lt_cv_path_LD" 41223e72ca8cSmrgif test -n "$LD"; then 41233e72ca8cSmrg AC_MSG_RESULT($LD) 41243e72ca8cSmrgelse 41253e72ca8cSmrg AC_MSG_RESULT(no) 41263e72ca8cSmrgfi 41273e72ca8cSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 41283e72ca8cSmrg_LT_PATH_LD_GNU 41293e72ca8cSmrgAC_SUBST([LD]) 413034977a2fSmrg 41313e72ca8cSmrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 41323e72ca8cSmrg])# LT_PATH_LD 413334977a2fSmrg 41343e72ca8cSmrg# Old names: 41353e72ca8cSmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 41363e72ca8cSmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 41373e72ca8cSmrgdnl aclocal-1.4 backwards compatibility: 41383e72ca8cSmrgdnl AC_DEFUN([AM_PROG_LD], []) 41393e72ca8cSmrgdnl AC_DEFUN([AC_PROG_LD], []) 414034977a2fSmrg 414134977a2fSmrg 41423e72ca8cSmrg# _LT_PATH_LD_GNU 41433e72ca8cSmrg#- -------------- 41443e72ca8cSmrgm4_defun([_LT_PATH_LD_GNU], 41453e72ca8cSmrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 41463e72ca8cSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 41473e72ca8cSmrgcase `$LD -v 2>&1 </dev/null` in 41483e72ca8cSmrg*GNU* | *'with BFD'*) 41493e72ca8cSmrg lt_cv_prog_gnu_ld=yes 41503e72ca8cSmrg ;; 41513e72ca8cSmrg*) 41523e72ca8cSmrg lt_cv_prog_gnu_ld=no 41533e72ca8cSmrg ;; 41543e72ca8cSmrgesac]) 41553e72ca8cSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 41563e72ca8cSmrg])# _LT_PATH_LD_GNU 4157ee3138f1Smrg 4158ee3138f1Smrg 41593e72ca8cSmrg# _LT_CMD_RELOAD 41603e72ca8cSmrg# -------------- 41613e72ca8cSmrg# find reload flag for linker 41623e72ca8cSmrg# -- PORTME Some linkers may need a different reload flag. 41633e72ca8cSmrgm4_defun([_LT_CMD_RELOAD], 41643e72ca8cSmrg[AC_CACHE_CHECK([for $LD option to reload object files], 41653e72ca8cSmrg lt_cv_ld_reload_flag, 41663e72ca8cSmrg [lt_cv_ld_reload_flag='-r']) 41673e72ca8cSmrgreload_flag=$lt_cv_ld_reload_flag 41683e72ca8cSmrgcase $reload_flag in 41693e72ca8cSmrg"" | " "*) ;; 41703e72ca8cSmrg*) reload_flag=" $reload_flag" ;; 41713e72ca8cSmrgesac 41723e72ca8cSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 41733e72ca8cSmrgcase $host_os in 41743e72ca8cSmrg cygwin* | mingw* | pw32* | cegcc*) 41753e72ca8cSmrg if test "$GCC" != yes; then 41763e72ca8cSmrg reload_cmds=false 41773e72ca8cSmrg fi 41783e72ca8cSmrg ;; 41793e72ca8cSmrg darwin*) 41803e72ca8cSmrg if test "$GCC" = yes; then 41813e72ca8cSmrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 41823e72ca8cSmrg else 41833e72ca8cSmrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 41843e72ca8cSmrg fi 41853e72ca8cSmrg ;; 41863e72ca8cSmrgesac 41873e72ca8cSmrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 41883e72ca8cSmrg_LT_TAGDECL([], [reload_cmds], [2])dnl 41893e72ca8cSmrg])# _LT_CMD_RELOAD 4190ee3138f1Smrg 4191ee3138f1Smrg 41923e72ca8cSmrg# _LT_CHECK_MAGIC_METHOD 41933e72ca8cSmrg# ---------------------- 41943e72ca8cSmrg# how to check for library dependencies 41953e72ca8cSmrg# -- PORTME fill in with the dynamic library characteristics 41963e72ca8cSmrgm4_defun([_LT_CHECK_MAGIC_METHOD], 41973e72ca8cSmrg[m4_require([_LT_DECL_EGREP]) 41983e72ca8cSmrgm4_require([_LT_DECL_OBJDUMP]) 41993e72ca8cSmrgAC_CACHE_CHECK([how to recognize dependent libraries], 42003e72ca8cSmrglt_cv_deplibs_check_method, 42013e72ca8cSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 42023e72ca8cSmrglt_cv_file_magic_test_file= 42033e72ca8cSmrglt_cv_deplibs_check_method='unknown' 42043e72ca8cSmrg# Need to set the preceding variable on all platforms that support 42053e72ca8cSmrg# interlibrary dependencies. 42063e72ca8cSmrg# 'none' -- dependencies not supported. 42073e72ca8cSmrg# `unknown' -- same as none, but documents that we really don't know. 42083e72ca8cSmrg# 'pass_all' -- all dependencies passed with no checks. 42093e72ca8cSmrg# 'test_compile' -- check by making test program. 42103e72ca8cSmrg# 'file_magic [[regex]]' -- check by looking for files in library path 42113e72ca8cSmrg# which responds to the $file_magic_cmd with a given extended regex. 42123e72ca8cSmrg# If you have `file' or equivalent on your system and you're not sure 42133e72ca8cSmrg# whether `pass_all' will *always* work, you probably want this one. 4214ee3138f1Smrg 42153e72ca8cSmrgcase $host_os in 42163e72ca8cSmrgaix[[4-9]]*) 42173e72ca8cSmrg lt_cv_deplibs_check_method=pass_all 42183e72ca8cSmrg ;; 4219ee3138f1Smrg 42203e72ca8cSmrgbeos*) 42213e72ca8cSmrg lt_cv_deplibs_check_method=pass_all 42223e72ca8cSmrg ;; 4223b425557eSmrg 42243e72ca8cSmrgbsdi[[45]]*) 42253e72ca8cSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 42263e72ca8cSmrg lt_cv_file_magic_cmd='/usr/bin/file -L' 42273e72ca8cSmrg lt_cv_file_magic_test_file=/shlib/libc.so 42283e72ca8cSmrg ;; 4229b425557eSmrg 42303e72ca8cSmrgcygwin*) 42313e72ca8cSmrg # func_win32_libid is a shell function defined in ltmain.sh 42323e72ca8cSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 42333e72ca8cSmrg lt_cv_file_magic_cmd='func_win32_libid' 42343e72ca8cSmrg ;; 4235a1ed278cSmrg 42363e72ca8cSmrgmingw* | pw32*) 42373e72ca8cSmrg # Base MSYS/MinGW do not provide the 'file' command needed by 42383e72ca8cSmrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 42393e72ca8cSmrg # unless we find 'file', for example because we are cross-compiling. 42403e72ca8cSmrg # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 42413e72ca8cSmrg if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 42423e72ca8cSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 42433e72ca8cSmrg lt_cv_file_magic_cmd='func_win32_libid' 42443e72ca8cSmrg else 42453e72ca8cSmrg # Keep this pattern in sync with the one in func_win32_libid. 42463e72ca8cSmrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 42473e72ca8cSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 42483e72ca8cSmrg fi 42493e72ca8cSmrg ;; 4250ee3138f1Smrg 42513e72ca8cSmrgcegcc*) 42523e72ca8cSmrg # use the weaker test based on 'objdump'. See mingw*. 42533e72ca8cSmrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 42543e72ca8cSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 42553e72ca8cSmrg ;; 4256a1ed278cSmrg 42573e72ca8cSmrgdarwin* | rhapsody*) 42583e72ca8cSmrg lt_cv_deplibs_check_method=pass_all 42593e72ca8cSmrg ;; 4260a1ed278cSmrg 42613e72ca8cSmrgfreebsd* | dragonfly*) 42623e72ca8cSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 42633e72ca8cSmrg case $host_cpu in 42643e72ca8cSmrg i*86 ) 42653e72ca8cSmrg # Not sure whether the presence of OpenBSD here was a mistake. 42663e72ca8cSmrg # Let's accept both of them until this is cleared up. 42673e72ca8cSmrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 42683e72ca8cSmrg lt_cv_file_magic_cmd=/usr/bin/file 42693e72ca8cSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 4270a1ed278cSmrg ;; 4271a1ed278cSmrg esac 42723e72ca8cSmrg else 42733e72ca8cSmrg lt_cv_deplibs_check_method=pass_all 42743e72ca8cSmrg fi 42753e72ca8cSmrg ;; 4276a1ed278cSmrg 42773e72ca8cSmrggnu*) 42783e72ca8cSmrg lt_cv_deplibs_check_method=pass_all 42793e72ca8cSmrg ;; 42803e72ca8cSmrg 42813e72ca8cSmrghaiku*) 42823e72ca8cSmrg lt_cv_deplibs_check_method=pass_all 42833e72ca8cSmrg ;; 42843e72ca8cSmrg 42853e72ca8cSmrghpux10.20* | hpux11*) 42863e72ca8cSmrg lt_cv_file_magic_cmd=/usr/bin/file 42873e72ca8cSmrg case $host_cpu in 42883e72ca8cSmrg ia64*) 42893e72ca8cSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 42903e72ca8cSmrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 42913e72ca8cSmrg ;; 42923e72ca8cSmrg hppa*64*) 42933e72ca8cSmrg [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]'] 42943e72ca8cSmrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 42953e72ca8cSmrg ;; 42963e72ca8cSmrg *) 42973e72ca8cSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 42983e72ca8cSmrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 42993e72ca8cSmrg ;; 43003e72ca8cSmrg esac 43013e72ca8cSmrg ;; 43023e72ca8cSmrg 43033e72ca8cSmrginterix[[3-9]]*) 43043e72ca8cSmrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 43053e72ca8cSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 43063e72ca8cSmrg ;; 43073e72ca8cSmrg 43083e72ca8cSmrgirix5* | irix6* | nonstopux*) 43093e72ca8cSmrg case $LD in 43103e72ca8cSmrg *-32|*"-32 ") libmagic=32-bit;; 43113e72ca8cSmrg *-n32|*"-n32 ") libmagic=N32;; 43123e72ca8cSmrg *-64|*"-64 ") libmagic=64-bit;; 43133e72ca8cSmrg *) libmagic=never-match;; 43143e72ca8cSmrg esac 43153e72ca8cSmrg lt_cv_deplibs_check_method=pass_all 43163e72ca8cSmrg ;; 43173e72ca8cSmrg 43183e72ca8cSmrg# This must be glibc/ELF. 43193e72ca8cSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 43203e72ca8cSmrg lt_cv_deplibs_check_method=pass_all 43213e72ca8cSmrg ;; 43223e72ca8cSmrg 43233e72ca8cSmrgnetbsd*) 43243e72ca8cSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 43253e72ca8cSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 4326b425557eSmrg else 43273e72ca8cSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 43283e72ca8cSmrg fi 43293e72ca8cSmrg ;; 4330ee3138f1Smrg 43313e72ca8cSmrgnewos6*) 43323e72ca8cSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 43333e72ca8cSmrg lt_cv_file_magic_cmd=/usr/bin/file 43343e72ca8cSmrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 43353e72ca8cSmrg ;; 43363e72ca8cSmrg 43373e72ca8cSmrg*nto* | *qnx*) 43383e72ca8cSmrg lt_cv_deplibs_check_method=pass_all 43393e72ca8cSmrg ;; 43403e72ca8cSmrg 43413e72ca8cSmrgopenbsd*) 43423e72ca8cSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 43433e72ca8cSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 43443e72ca8cSmrg else 43453e72ca8cSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 43463e72ca8cSmrg fi 43473e72ca8cSmrg ;; 4348ee3138f1Smrg 43493e72ca8cSmrgosf3* | osf4* | osf5*) 43503e72ca8cSmrg lt_cv_deplibs_check_method=pass_all 43513e72ca8cSmrg ;; 4352ee3138f1Smrg 43533e72ca8cSmrgrdos*) 43543e72ca8cSmrg lt_cv_deplibs_check_method=pass_all 43553e72ca8cSmrg ;; 435634977a2fSmrg 43573e72ca8cSmrgsolaris*) 43583e72ca8cSmrg lt_cv_deplibs_check_method=pass_all 43593e72ca8cSmrg ;; 436034977a2fSmrg 43613e72ca8cSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 43623e72ca8cSmrg lt_cv_deplibs_check_method=pass_all 43633e72ca8cSmrg ;; 4364ee3138f1Smrg 43653e72ca8cSmrgsysv4 | sysv4.3*) 43663e72ca8cSmrg case $host_vendor in 43673e72ca8cSmrg motorola) 43683e72ca8cSmrg 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]]' 43693e72ca8cSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 43703e72ca8cSmrg ;; 43713e72ca8cSmrg ncr) 43723e72ca8cSmrg lt_cv_deplibs_check_method=pass_all 43733e72ca8cSmrg ;; 43743e72ca8cSmrg sequent) 43753e72ca8cSmrg lt_cv_file_magic_cmd='/bin/file' 43763e72ca8cSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 43773e72ca8cSmrg ;; 43783e72ca8cSmrg sni) 43793e72ca8cSmrg lt_cv_file_magic_cmd='/bin/file' 43803e72ca8cSmrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 43813e72ca8cSmrg lt_cv_file_magic_test_file=/lib/libc.so 43823e72ca8cSmrg ;; 43833e72ca8cSmrg siemens) 43843e72ca8cSmrg lt_cv_deplibs_check_method=pass_all 43853e72ca8cSmrg ;; 43863e72ca8cSmrg pc) 43873e72ca8cSmrg lt_cv_deplibs_check_method=pass_all 43883e72ca8cSmrg ;; 43893e72ca8cSmrg esac 43903e72ca8cSmrg ;; 4391a1ed278cSmrg 43923e72ca8cSmrgtpf*) 43933e72ca8cSmrg lt_cv_deplibs_check_method=pass_all 43943e72ca8cSmrg ;; 43953e72ca8cSmrgesac 43963e72ca8cSmrg]) 439734977a2fSmrg 43983e72ca8cSmrgfile_magic_glob= 43993e72ca8cSmrgwant_nocaseglob=no 44003e72ca8cSmrgif test "$build" = "$host"; then 44013e72ca8cSmrg case $host_os in 44023e72ca8cSmrg mingw* | pw32*) 44033e72ca8cSmrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 44043e72ca8cSmrg want_nocaseglob=yes 44053e72ca8cSmrg else 44063e72ca8cSmrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 44073e72ca8cSmrg fi 44083e72ca8cSmrg ;; 44093e72ca8cSmrg esac 44103e72ca8cSmrgfi 4411ee3138f1Smrg 44123e72ca8cSmrgfile_magic_cmd=$lt_cv_file_magic_cmd 44133e72ca8cSmrgdeplibs_check_method=$lt_cv_deplibs_check_method 44143e72ca8cSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 4415a1ed278cSmrg 44163e72ca8cSmrg_LT_DECL([], [deplibs_check_method], [1], 44173e72ca8cSmrg [Method to check whether dependent libraries are shared objects]) 44183e72ca8cSmrg_LT_DECL([], [file_magic_cmd], [1], 44193e72ca8cSmrg [Command to use when deplibs_check_method = "file_magic"]) 44203e72ca8cSmrg_LT_DECL([], [file_magic_glob], [1], 44213e72ca8cSmrg [How to find potential files when deplibs_check_method = "file_magic"]) 44223e72ca8cSmrg_LT_DECL([], [want_nocaseglob], [1], 44233e72ca8cSmrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 44243e72ca8cSmrg])# _LT_CHECK_MAGIC_METHOD 4425a1ed278cSmrg 4426a1ed278cSmrg 44273e72ca8cSmrg# LT_PATH_NM 44283e72ca8cSmrg# ---------- 44293e72ca8cSmrg# find the pathname to a BSD- or MS-compatible name lister 44303e72ca8cSmrgAC_DEFUN([LT_PATH_NM], 44313e72ca8cSmrg[AC_REQUIRE([AC_PROG_CC])dnl 44323e72ca8cSmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 44333e72ca8cSmrg[if test -n "$NM"; then 44343e72ca8cSmrg # Let the user override the test. 44353e72ca8cSmrg lt_cv_path_NM="$NM" 44363e72ca8cSmrgelse 44373e72ca8cSmrg lt_nm_to_check="${ac_tool_prefix}nm" 44383e72ca8cSmrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 44393e72ca8cSmrg lt_nm_to_check="$lt_nm_to_check nm" 44403e72ca8cSmrg fi 44413e72ca8cSmrg for lt_tmp_nm in $lt_nm_to_check; do 44423e72ca8cSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 44433e72ca8cSmrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 44443e72ca8cSmrg IFS="$lt_save_ifs" 44453e72ca8cSmrg test -z "$ac_dir" && ac_dir=. 44463e72ca8cSmrg tmp_nm="$ac_dir/$lt_tmp_nm" 44473e72ca8cSmrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 44483e72ca8cSmrg # Check to see if the nm accepts a BSD-compat flag. 44493e72ca8cSmrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 44503e72ca8cSmrg # nm: unknown option "B" ignored 44513e72ca8cSmrg # Tru64's nm complains that /dev/null is an invalid object file 44523e72ca8cSmrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 44533e72ca8cSmrg */dev/null* | *'Invalid file or object type'*) 44543e72ca8cSmrg lt_cv_path_NM="$tmp_nm -B" 44553e72ca8cSmrg break 44563e72ca8cSmrg ;; 44573e72ca8cSmrg *) 44583e72ca8cSmrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 44593e72ca8cSmrg */dev/null*) 44603e72ca8cSmrg lt_cv_path_NM="$tmp_nm -p" 44613e72ca8cSmrg break 44623e72ca8cSmrg ;; 44633e72ca8cSmrg *) 44643e72ca8cSmrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 44653e72ca8cSmrg continue # so that we can try to find one that supports BSD flags 44663e72ca8cSmrg ;; 44673e72ca8cSmrg esac 44683e72ca8cSmrg ;; 44693e72ca8cSmrg esac 44703e72ca8cSmrg fi 44713e72ca8cSmrg done 44723e72ca8cSmrg IFS="$lt_save_ifs" 44733e72ca8cSmrg done 44743e72ca8cSmrg : ${lt_cv_path_NM=no} 44753e72ca8cSmrgfi]) 44763e72ca8cSmrgif test "$lt_cv_path_NM" != "no"; then 44773e72ca8cSmrg NM="$lt_cv_path_NM" 44783e72ca8cSmrgelse 44793e72ca8cSmrg # Didn't find any BSD compatible name lister, look for dumpbin. 44803e72ca8cSmrg if test -n "$DUMPBIN"; then : 44813e72ca8cSmrg # Let the user override the test. 44823e72ca8cSmrg else 44833e72ca8cSmrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 44843e72ca8cSmrg case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 44853e72ca8cSmrg *COFF*) 44863e72ca8cSmrg DUMPBIN="$DUMPBIN -symbols" 4487b425557eSmrg ;; 44883e72ca8cSmrg *) 44893e72ca8cSmrg DUMPBIN=: 4490b425557eSmrg ;; 44913e72ca8cSmrg esac 44923e72ca8cSmrg fi 44933e72ca8cSmrg AC_SUBST([DUMPBIN]) 44943e72ca8cSmrg if test "$DUMPBIN" != ":"; then 44953e72ca8cSmrg NM="$DUMPBIN" 44963e72ca8cSmrg fi 44973e72ca8cSmrgfi 44983e72ca8cSmrgtest -z "$NM" && NM=nm 44993e72ca8cSmrgAC_SUBST([NM]) 45003e72ca8cSmrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 4501a1ed278cSmrg 45023e72ca8cSmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 45033e72ca8cSmrg [lt_cv_nm_interface="BSD nm" 45043e72ca8cSmrg echo "int some_variable = 0;" > conftest.$ac_ext 45053e72ca8cSmrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 45063e72ca8cSmrg (eval "$ac_compile" 2>conftest.err) 45073e72ca8cSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 45083e72ca8cSmrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 45093e72ca8cSmrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 45103e72ca8cSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 45113e72ca8cSmrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 45123e72ca8cSmrg cat conftest.out >&AS_MESSAGE_LOG_FD 45133e72ca8cSmrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 45143e72ca8cSmrg lt_cv_nm_interface="MS dumpbin" 45153e72ca8cSmrg fi 45163e72ca8cSmrg rm -f conftest*]) 45173e72ca8cSmrg])# LT_PATH_NM 4518a1ed278cSmrg 45193e72ca8cSmrg# Old names: 45203e72ca8cSmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 45213e72ca8cSmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 45223e72ca8cSmrgdnl aclocal-1.4 backwards compatibility: 45233e72ca8cSmrgdnl AC_DEFUN([AM_PROG_NM], []) 45243e72ca8cSmrgdnl AC_DEFUN([AC_PROG_NM], []) 4525a1ed278cSmrg 45263e72ca8cSmrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 45273e72ca8cSmrg# -------------------------------- 45283e72ca8cSmrg# how to determine the name of the shared library 45293e72ca8cSmrg# associated with a specific link library. 45303e72ca8cSmrg# -- PORTME fill in with the dynamic library characteristics 45313e72ca8cSmrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 45323e72ca8cSmrg[m4_require([_LT_DECL_EGREP]) 45333e72ca8cSmrgm4_require([_LT_DECL_OBJDUMP]) 45343e72ca8cSmrgm4_require([_LT_DECL_DLLTOOL]) 45353e72ca8cSmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 45363e72ca8cSmrglt_cv_sharedlib_from_linklib_cmd, 45373e72ca8cSmrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 4538a1ed278cSmrg 45393e72ca8cSmrgcase $host_os in 45403e72ca8cSmrgcygwin* | mingw* | pw32* | cegcc*) 45413e72ca8cSmrg # two different shell functions defined in ltmain.sh 45423e72ca8cSmrg # decide which to use based on capabilities of $DLLTOOL 45433e72ca8cSmrg case `$DLLTOOL --help 2>&1` in 45443e72ca8cSmrg *--identify-strict*) 45453e72ca8cSmrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 45463e72ca8cSmrg ;; 45473e72ca8cSmrg *) 45483e72ca8cSmrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 45493e72ca8cSmrg ;; 45503e72ca8cSmrg esac 45513e72ca8cSmrg ;; 45523e72ca8cSmrg*) 45533e72ca8cSmrg # fallback: assume linklib IS sharedlib 45543e72ca8cSmrg lt_cv_sharedlib_from_linklib_cmd="$ECHO" 45553e72ca8cSmrg ;; 45563e72ca8cSmrgesac 45573e72ca8cSmrg]) 45583e72ca8cSmrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 45593e72ca8cSmrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 4560a1ed278cSmrg 45613e72ca8cSmrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 45623e72ca8cSmrg [Command to associate shared and link libraries]) 45633e72ca8cSmrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 4564a1ed278cSmrg 4565a1ed278cSmrg 45663e72ca8cSmrg# _LT_PATH_MANIFEST_TOOL 45673e72ca8cSmrg# ---------------------- 45683e72ca8cSmrg# locate the manifest tool 45693e72ca8cSmrgm4_defun([_LT_PATH_MANIFEST_TOOL], 45703e72ca8cSmrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 45713e72ca8cSmrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 45723e72ca8cSmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 45733e72ca8cSmrg [lt_cv_path_mainfest_tool=no 45743e72ca8cSmrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 45753e72ca8cSmrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 45763e72ca8cSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 45773e72ca8cSmrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 45783e72ca8cSmrg lt_cv_path_mainfest_tool=yes 45793e72ca8cSmrg fi 45803e72ca8cSmrg rm -f conftest*]) 45813e72ca8cSmrgif test "x$lt_cv_path_mainfest_tool" != xyes; then 45823e72ca8cSmrg MANIFEST_TOOL=: 45833e72ca8cSmrgfi 45843e72ca8cSmrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 45853e72ca8cSmrg])# _LT_PATH_MANIFEST_TOOL 4586a1ed278cSmrg 4587a1ed278cSmrg 45883e72ca8cSmrg# LT_LIB_M 45893e72ca8cSmrg# -------- 45903e72ca8cSmrg# check for math library 45913e72ca8cSmrgAC_DEFUN([LT_LIB_M], 45923e72ca8cSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 45933e72ca8cSmrgLIBM= 45943e72ca8cSmrgcase $host in 45953e72ca8cSmrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 45963e72ca8cSmrg # These system don't have libm, or don't need it 45973e72ca8cSmrg ;; 45983e72ca8cSmrg*-ncr-sysv4.3*) 45993e72ca8cSmrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 46003e72ca8cSmrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 46013e72ca8cSmrg ;; 46023e72ca8cSmrg*) 46033e72ca8cSmrg AC_CHECK_LIB(m, cos, LIBM="-lm") 46043e72ca8cSmrg ;; 46053e72ca8cSmrgesac 46063e72ca8cSmrgAC_SUBST([LIBM]) 46073e72ca8cSmrg])# LT_LIB_M 4608a1ed278cSmrg 46093e72ca8cSmrg# Old name: 46103e72ca8cSmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 46113e72ca8cSmrgdnl aclocal-1.4 backwards compatibility: 46123e72ca8cSmrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 4613a1ed278cSmrg 4614a1ed278cSmrg 46153e72ca8cSmrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 46163e72ca8cSmrg# ------------------------------- 46173e72ca8cSmrgm4_defun([_LT_COMPILER_NO_RTTI], 46183e72ca8cSmrg[m4_require([_LT_TAG_COMPILER])dnl 4619a1ed278cSmrg 46203e72ca8cSmrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 4621a1ed278cSmrg 46223e72ca8cSmrgif test "$GCC" = yes; then 46233e72ca8cSmrg case $cc_basename in 46243e72ca8cSmrg nvcc*) 46253e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 46263e72ca8cSmrg *) 46273e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 46283e72ca8cSmrg esac 46293e72ca8cSmrg 46303e72ca8cSmrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 46313e72ca8cSmrg lt_cv_prog_compiler_rtti_exceptions, 46323e72ca8cSmrg [-fno-rtti -fno-exceptions], [], 46333e72ca8cSmrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 46343e72ca8cSmrgfi 46353e72ca8cSmrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 46363e72ca8cSmrg [Compiler flag to turn off builtin functions]) 46373e72ca8cSmrg])# _LT_COMPILER_NO_RTTI 4638a1ed278cSmrg 4639a1ed278cSmrg 46403e72ca8cSmrg# _LT_CMD_GLOBAL_SYMBOLS 46413e72ca8cSmrg# ---------------------- 46423e72ca8cSmrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 46433e72ca8cSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 46443e72ca8cSmrgAC_REQUIRE([AC_PROG_CC])dnl 46453e72ca8cSmrgAC_REQUIRE([AC_PROG_AWK])dnl 46463e72ca8cSmrgAC_REQUIRE([LT_PATH_NM])dnl 46473e72ca8cSmrgAC_REQUIRE([LT_PATH_LD])dnl 46483e72ca8cSmrgm4_require([_LT_DECL_SED])dnl 46493e72ca8cSmrgm4_require([_LT_DECL_EGREP])dnl 46503e72ca8cSmrgm4_require([_LT_TAG_COMPILER])dnl 4651a1ed278cSmrg 46523e72ca8cSmrg# Check for command to grab the raw symbol name followed by C symbol from nm. 46533e72ca8cSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 46543e72ca8cSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 46553e72ca8cSmrg[ 46563e72ca8cSmrg# These are sane defaults that work on at least a few old systems. 46573e72ca8cSmrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 4658a1ed278cSmrg 46593e72ca8cSmrg# Character class describing NM global symbol codes. 46603e72ca8cSmrgsymcode='[[BCDEGRST]]' 4661a1ed278cSmrg 46623e72ca8cSmrg# Regexp to match symbols that can be accessed directly from C. 46633e72ca8cSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 4664a1ed278cSmrg 46653e72ca8cSmrg# Define system-specific variables. 46663e72ca8cSmrgcase $host_os in 46673e72ca8cSmrgaix*) 46683e72ca8cSmrg symcode='[[BCDT]]' 46693e72ca8cSmrg ;; 46703e72ca8cSmrgcygwin* | mingw* | pw32* | cegcc*) 46713e72ca8cSmrg symcode='[[ABCDGISTW]]' 46723e72ca8cSmrg ;; 46733e72ca8cSmrghpux*) 46743e72ca8cSmrg if test "$host_cpu" = ia64; then 46753e72ca8cSmrg symcode='[[ABCDEGRST]]' 46763e72ca8cSmrg fi 46773e72ca8cSmrg ;; 46783e72ca8cSmrgirix* | nonstopux*) 46793e72ca8cSmrg symcode='[[BCDEGRST]]' 46803e72ca8cSmrg ;; 46813e72ca8cSmrgosf*) 46823e72ca8cSmrg symcode='[[BCDEGQRST]]' 46833e72ca8cSmrg ;; 46843e72ca8cSmrgsolaris*) 46853e72ca8cSmrg symcode='[[BDRT]]' 46863e72ca8cSmrg ;; 46873e72ca8cSmrgsco3.2v5*) 46883e72ca8cSmrg symcode='[[DT]]' 46893e72ca8cSmrg ;; 46903e72ca8cSmrgsysv4.2uw2*) 46913e72ca8cSmrg symcode='[[DT]]' 46923e72ca8cSmrg ;; 46933e72ca8cSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 46943e72ca8cSmrg symcode='[[ABDT]]' 46953e72ca8cSmrg ;; 46963e72ca8cSmrgsysv4) 46973e72ca8cSmrg symcode='[[DFNSTU]]' 46983e72ca8cSmrg ;; 46993e72ca8cSmrgesac 4700a1ed278cSmrg 47013e72ca8cSmrg# If we're using GNU nm, then use its standard symbol codes. 47023e72ca8cSmrgcase `$NM -V 2>&1` in 47033e72ca8cSmrg*GNU* | *'with BFD'*) 47043e72ca8cSmrg symcode='[[ABCDGIRSTW]]' ;; 47053e72ca8cSmrgesac 4706a1ed278cSmrg 47073e72ca8cSmrg# Transform an extracted symbol line into a proper C declaration. 47083e72ca8cSmrg# Some systems (esp. on ia64) link data and code symbols differently, 47093e72ca8cSmrg# so use this general approach. 47103e72ca8cSmrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 4711a1ed278cSmrg 47123e72ca8cSmrg# Transform an extracted symbol line into symbol name and symbol address 47133e72ca8cSmrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 47143e72ca8cSmrglt_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'" 4715a1ed278cSmrg 47163e72ca8cSmrg# Handle CRLF in mingw tool chain 47173e72ca8cSmrgopt_cr= 47183e72ca8cSmrgcase $build_os in 47193e72ca8cSmrgmingw*) 47203e72ca8cSmrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 47213e72ca8cSmrg ;; 47223e72ca8cSmrgesac 4723a1ed278cSmrg 47243e72ca8cSmrg# Try without a prefix underscore, then with it. 47253e72ca8cSmrgfor ac_symprfx in "" "_"; do 4726a1ed278cSmrg 47273e72ca8cSmrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 47283e72ca8cSmrg symxfrm="\\1 $ac_symprfx\\2 \\2" 47293e72ca8cSmrg 47303e72ca8cSmrg # Write the raw and C identifiers. 47313e72ca8cSmrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 47323e72ca8cSmrg # Fake it for dumpbin and say T for any non-static function 47333e72ca8cSmrg # and D for any global variable. 47343e72ca8cSmrg # Also find C++ and __fastcall symbols from MSVC++, 47353e72ca8cSmrg # which start with @ or ?. 47363e72ca8cSmrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 47373e72ca8cSmrg" {last_section=section; section=\$ 3};"\ 47383e72ca8cSmrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 47393e72ca8cSmrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 47403e72ca8cSmrg" \$ 0!~/External *\|/{next};"\ 47413e72ca8cSmrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 47423e72ca8cSmrg" {if(hide[section]) next};"\ 47433e72ca8cSmrg" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 47443e72ca8cSmrg" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 47453e72ca8cSmrg" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 47463e72ca8cSmrg" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 47473e72ca8cSmrg" ' prfx=^$ac_symprfx]" 47483e72ca8cSmrg else 47493e72ca8cSmrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 47503e72ca8cSmrg fi 47513e72ca8cSmrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 4752a1ed278cSmrg 47533e72ca8cSmrg # Check to see that the pipe works correctly. 47543e72ca8cSmrg pipe_works=no 47553e72ca8cSmrg 47563e72ca8cSmrg rm -f conftest* 47573e72ca8cSmrg cat > conftest.$ac_ext <<_LT_EOF 47583e72ca8cSmrg#ifdef __cplusplus 47593e72ca8cSmrgextern "C" { 47603e72ca8cSmrg#endif 47613e72ca8cSmrgchar nm_test_var; 47623e72ca8cSmrgvoid nm_test_func(void); 47633e72ca8cSmrgvoid nm_test_func(void){} 47643e72ca8cSmrg#ifdef __cplusplus 47653e72ca8cSmrg} 47663e72ca8cSmrg#endif 47673e72ca8cSmrgint main(){nm_test_var='a';nm_test_func();return(0);} 47683e72ca8cSmrg_LT_EOF 47693e72ca8cSmrg 47703e72ca8cSmrg if AC_TRY_EVAL(ac_compile); then 47713e72ca8cSmrg # Now try to grab the symbols. 47723e72ca8cSmrg nlist=conftest.nm 47733e72ca8cSmrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 47743e72ca8cSmrg # Try sorting and uniquifying the output. 47753e72ca8cSmrg if sort "$nlist" | uniq > "$nlist"T; then 47763e72ca8cSmrg mv -f "$nlist"T "$nlist" 4777a1ed278cSmrg else 47783e72ca8cSmrg rm -f "$nlist"T 4779a1ed278cSmrg fi 4780a1ed278cSmrg 47813e72ca8cSmrg # Make sure that we snagged all the symbols we need. 47823e72ca8cSmrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 47833e72ca8cSmrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 47843e72ca8cSmrg cat <<_LT_EOF > conftest.$ac_ext 47853e72ca8cSmrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 47863e72ca8cSmrg#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) 47873e72ca8cSmrg/* DATA imports from DLLs on WIN32 con't be const, because runtime 47883e72ca8cSmrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 47893e72ca8cSmrg# define LT@&t@_DLSYM_CONST 47903e72ca8cSmrg#elif defined(__osf__) 47913e72ca8cSmrg/* This system does not cope well with relocations in const data. */ 47923e72ca8cSmrg# define LT@&t@_DLSYM_CONST 47933e72ca8cSmrg#else 47943e72ca8cSmrg# define LT@&t@_DLSYM_CONST const 47953e72ca8cSmrg#endif 4796a1ed278cSmrg 47973e72ca8cSmrg#ifdef __cplusplus 47983e72ca8cSmrgextern "C" { 47993e72ca8cSmrg#endif 4800a1ed278cSmrg 48013e72ca8cSmrg_LT_EOF 48023e72ca8cSmrg # Now generate the symbol file. 48033e72ca8cSmrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 4804a1ed278cSmrg 48053e72ca8cSmrg cat <<_LT_EOF >> conftest.$ac_ext 4806a1ed278cSmrg 48073e72ca8cSmrg/* The mapping between symbol names and symbols. */ 48083e72ca8cSmrgLT@&t@_DLSYM_CONST struct { 48093e72ca8cSmrg const char *name; 48103e72ca8cSmrg void *address; 48113e72ca8cSmrg} 48123e72ca8cSmrglt__PROGRAM__LTX_preloaded_symbols[[]] = 48133e72ca8cSmrg{ 48143e72ca8cSmrg { "@PROGRAM@", (void *) 0 }, 48153e72ca8cSmrg_LT_EOF 48163e72ca8cSmrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 48173e72ca8cSmrg cat <<\_LT_EOF >> conftest.$ac_ext 48183e72ca8cSmrg {0, (void *) 0} 48193e72ca8cSmrg}; 4820a1ed278cSmrg 48213e72ca8cSmrg/* This works around a problem in FreeBSD linker */ 48223e72ca8cSmrg#ifdef FREEBSD_WORKAROUND 48233e72ca8cSmrgstatic const void *lt_preloaded_setup() { 48243e72ca8cSmrg return lt__PROGRAM__LTX_preloaded_symbols; 48253e72ca8cSmrg} 48263e72ca8cSmrg#endif 4827a1ed278cSmrg 48283e72ca8cSmrg#ifdef __cplusplus 48293e72ca8cSmrg} 48303e72ca8cSmrg#endif 48313e72ca8cSmrg_LT_EOF 48323e72ca8cSmrg # Now try linking the two files. 48333e72ca8cSmrg mv conftest.$ac_objext conftstm.$ac_objext 48343e72ca8cSmrg lt_globsym_save_LIBS=$LIBS 48353e72ca8cSmrg lt_globsym_save_CFLAGS=$CFLAGS 48363e72ca8cSmrg LIBS="conftstm.$ac_objext" 48373e72ca8cSmrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 48383e72ca8cSmrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 48393e72ca8cSmrg pipe_works=yes 4840a1ed278cSmrg fi 48413e72ca8cSmrg LIBS=$lt_globsym_save_LIBS 48423e72ca8cSmrg CFLAGS=$lt_globsym_save_CFLAGS 4843a1ed278cSmrg else 48443e72ca8cSmrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 4845a1ed278cSmrg fi 48463e72ca8cSmrg else 48473e72ca8cSmrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 48483e72ca8cSmrg fi 48493e72ca8cSmrg else 48503e72ca8cSmrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 48513e72ca8cSmrg fi 48523e72ca8cSmrg else 48533e72ca8cSmrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 48543e72ca8cSmrg cat conftest.$ac_ext >&5 4855b425557eSmrg fi 48563e72ca8cSmrg rm -rf conftest* conftst* 485734977a2fSmrg 48583e72ca8cSmrg # Do not use the global_symbol_pipe unless it works. 48593e72ca8cSmrg if test "$pipe_works" = yes; then 48603e72ca8cSmrg break 48613e72ca8cSmrg else 48623e72ca8cSmrg lt_cv_sys_global_symbol_pipe= 48633e72ca8cSmrg fi 48643e72ca8cSmrgdone 48653e72ca8cSmrg]) 48663e72ca8cSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 48673e72ca8cSmrg lt_cv_sys_global_symbol_to_cdecl= 48683e72ca8cSmrgfi 48693e72ca8cSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 48703e72ca8cSmrg AC_MSG_RESULT(failed) 48713e72ca8cSmrgelse 48723e72ca8cSmrg AC_MSG_RESULT(ok) 48733e72ca8cSmrgfi 487434977a2fSmrg 48753e72ca8cSmrg# Response file support. 48763e72ca8cSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 48773e72ca8cSmrg nm_file_list_spec='@' 48783e72ca8cSmrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 48793e72ca8cSmrg nm_file_list_spec='@' 48803e72ca8cSmrgfi 4881ee3138f1Smrg 48823e72ca8cSmrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 48833e72ca8cSmrg [Take the output of nm and produce a listing of raw symbols and C names]) 48843e72ca8cSmrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 48853e72ca8cSmrg [Transform the output of nm in a proper C declaration]) 48863e72ca8cSmrg_LT_DECL([global_symbol_to_c_name_address], 48873e72ca8cSmrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 48883e72ca8cSmrg [Transform the output of nm in a C name address pair]) 48893e72ca8cSmrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 48903e72ca8cSmrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 48913e72ca8cSmrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 48923e72ca8cSmrg_LT_DECL([], [nm_file_list_spec], [1], 48933e72ca8cSmrg [Specify filename containing input files for $NM]) 48943e72ca8cSmrg]) # _LT_CMD_GLOBAL_SYMBOLS 4895ee3138f1Smrg 4896ee3138f1Smrg 48973e72ca8cSmrg# _LT_COMPILER_PIC([TAGNAME]) 48983e72ca8cSmrg# --------------------------- 48993e72ca8cSmrgm4_defun([_LT_COMPILER_PIC], 49003e72ca8cSmrg[m4_require([_LT_TAG_COMPILER])dnl 49013e72ca8cSmrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 49023e72ca8cSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 49033e72ca8cSmrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 490434977a2fSmrg 49053e72ca8cSmrgm4_if([$1], [CXX], [ 49063e72ca8cSmrg # C++ specific cases for pic, static, wl, etc. 49073e72ca8cSmrg if test "$GXX" = yes; then 49083e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 49093e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4910ee3138f1Smrg 49113e72ca8cSmrg case $host_os in 49123e72ca8cSmrg aix*) 49133e72ca8cSmrg # All AIX code is PIC. 49143e72ca8cSmrg if test "$host_cpu" = ia64; then 49153e72ca8cSmrg # AIX 5 now supports IA64 processor 49163e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 49173e72ca8cSmrg fi 49183e72ca8cSmrg ;; 4919a1ed278cSmrg 49203e72ca8cSmrg amigaos*) 49213e72ca8cSmrg case $host_cpu in 49223e72ca8cSmrg powerpc) 49233e72ca8cSmrg # see comment about AmigaOS4 .so support 49243e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 49253e72ca8cSmrg ;; 49263e72ca8cSmrg m68k) 49273e72ca8cSmrg # FIXME: we need at least 68020 code to build shared libraries, but 49283e72ca8cSmrg # adding the `-m68020' flag to GCC prevents building anything better, 49293e72ca8cSmrg # like `-m68040'. 49303e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 49313e72ca8cSmrg ;; 49323e72ca8cSmrg esac 49333e72ca8cSmrg ;; 4934a1ed278cSmrg 49353e72ca8cSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 49363e72ca8cSmrg # PIC is the default for these OSes. 49373e72ca8cSmrg ;; 49383e72ca8cSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 49393e72ca8cSmrg # This hack is so that the source file can tell whether it is being 49403e72ca8cSmrg # built for inclusion in a dll (and should export symbols for example). 49413e72ca8cSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 49423e72ca8cSmrg # (--disable-auto-import) libraries 49433e72ca8cSmrg m4_if([$1], [GCJ], [], 49443e72ca8cSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 49453e72ca8cSmrg ;; 49463e72ca8cSmrg darwin* | rhapsody*) 49473e72ca8cSmrg # PIC is the default on this platform 49483e72ca8cSmrg # Common symbols not allowed in MH_DYLIB files 49493e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 49503e72ca8cSmrg ;; 49513e72ca8cSmrg *djgpp*) 49523e72ca8cSmrg # DJGPP does not support shared libraries at all 49533e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 49543e72ca8cSmrg ;; 49553e72ca8cSmrg haiku*) 49563e72ca8cSmrg # PIC is the default for Haiku. 49573e72ca8cSmrg # The "-static" flag exists, but is broken. 49583e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 49593e72ca8cSmrg ;; 49603e72ca8cSmrg interix[[3-9]]*) 49613e72ca8cSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 49623e72ca8cSmrg # Instead, we relocate shared libraries at runtime. 49633e72ca8cSmrg ;; 49643e72ca8cSmrg sysv4*MP*) 49653e72ca8cSmrg if test -d /usr/nec; then 49663e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 49673e72ca8cSmrg fi 49683e72ca8cSmrg ;; 49693e72ca8cSmrg hpux*) 49703e72ca8cSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 49713e72ca8cSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 49723e72ca8cSmrg # sets the default TLS model and affects inlining. 49733e72ca8cSmrg case $host_cpu in 49743e72ca8cSmrg hppa*64*) 49753e72ca8cSmrg ;; 49763e72ca8cSmrg *) 49773e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 49783e72ca8cSmrg ;; 49793e72ca8cSmrg esac 49803e72ca8cSmrg ;; 49813e72ca8cSmrg *qnx* | *nto*) 49823e72ca8cSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 49833e72ca8cSmrg # it will coredump. 49843e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 49853e72ca8cSmrg ;; 49863e72ca8cSmrg *) 49873e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 49883e72ca8cSmrg ;; 49893e72ca8cSmrg esac 49903e72ca8cSmrg else 49913e72ca8cSmrg case $host_os in 49923e72ca8cSmrg aix[[4-9]]*) 49933e72ca8cSmrg # All AIX code is PIC. 49943e72ca8cSmrg if test "$host_cpu" = ia64; then 49953e72ca8cSmrg # AIX 5 now supports IA64 processor 49963e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 49973e72ca8cSmrg else 49983e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 49993e72ca8cSmrg fi 50003e72ca8cSmrg ;; 50013e72ca8cSmrg chorus*) 50023e72ca8cSmrg case $cc_basename in 50033e72ca8cSmrg cxch68*) 50043e72ca8cSmrg # Green Hills C++ Compiler 50053e72ca8cSmrg # _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" 50063e72ca8cSmrg ;; 50073e72ca8cSmrg esac 50083e72ca8cSmrg ;; 50093e72ca8cSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 50103e72ca8cSmrg # This hack is so that the source file can tell whether it is being 50113e72ca8cSmrg # built for inclusion in a dll (and should export symbols for example). 50123e72ca8cSmrg m4_if([$1], [GCJ], [], 50133e72ca8cSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 50143e72ca8cSmrg ;; 50153e72ca8cSmrg dgux*) 50163e72ca8cSmrg case $cc_basename in 50173e72ca8cSmrg ec++*) 50183e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 50193e72ca8cSmrg ;; 50203e72ca8cSmrg ghcx*) 50213e72ca8cSmrg # Green Hills C++ Compiler 50223e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 50233e72ca8cSmrg ;; 50243e72ca8cSmrg *) 50253e72ca8cSmrg ;; 50263e72ca8cSmrg esac 50273e72ca8cSmrg ;; 50283e72ca8cSmrg freebsd* | dragonfly*) 50293e72ca8cSmrg # FreeBSD uses GNU C++ 50303e72ca8cSmrg ;; 50313e72ca8cSmrg hpux9* | hpux10* | hpux11*) 50323e72ca8cSmrg case $cc_basename in 50333e72ca8cSmrg CC*) 50343e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 50353e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 50363e72ca8cSmrg if test "$host_cpu" != ia64; then 50373e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 50383e72ca8cSmrg fi 50393e72ca8cSmrg ;; 50403e72ca8cSmrg aCC*) 50413e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 50423e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 50433e72ca8cSmrg case $host_cpu in 50443e72ca8cSmrg hppa*64*|ia64*) 50453e72ca8cSmrg # +Z the default 50463e72ca8cSmrg ;; 50473e72ca8cSmrg *) 50483e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 50493e72ca8cSmrg ;; 50503e72ca8cSmrg esac 50513e72ca8cSmrg ;; 50523e72ca8cSmrg *) 50533e72ca8cSmrg ;; 50543e72ca8cSmrg esac 50553e72ca8cSmrg ;; 50563e72ca8cSmrg interix*) 50573e72ca8cSmrg # This is c89, which is MS Visual C++ (no shared libs) 50583e72ca8cSmrg # Anyone wants to do a port? 50593e72ca8cSmrg ;; 50603e72ca8cSmrg irix5* | irix6* | nonstopux*) 50613e72ca8cSmrg case $cc_basename in 50623e72ca8cSmrg CC*) 50633e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 50643e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 50653e72ca8cSmrg # CC pic flag -KPIC is the default. 50663e72ca8cSmrg ;; 50673e72ca8cSmrg *) 50683e72ca8cSmrg ;; 50693e72ca8cSmrg esac 50703e72ca8cSmrg ;; 50713e72ca8cSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 50723e72ca8cSmrg case $cc_basename in 50733e72ca8cSmrg KCC*) 50743e72ca8cSmrg # KAI C++ Compiler 50753e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 50763e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 50773e72ca8cSmrg ;; 50783e72ca8cSmrg ecpc* ) 50793e72ca8cSmrg # old Intel C++ for x86_64 which still supported -KPIC. 50803e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 50813e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 50823e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 50833e72ca8cSmrg ;; 50843e72ca8cSmrg icpc* ) 50853e72ca8cSmrg # Intel C++, used to be incompatible with GCC. 50863e72ca8cSmrg # ICC 10 doesn't accept -KPIC any more. 50873e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 50883e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 50893e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 50903e72ca8cSmrg ;; 50913e72ca8cSmrg pgCC* | pgcpp*) 50923e72ca8cSmrg # Portland Group C++ compiler 50933e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 50943e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 50953e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 50963e72ca8cSmrg ;; 50973e72ca8cSmrg cxx*) 50983e72ca8cSmrg # Compaq C++ 50993e72ca8cSmrg # Make sure the PIC flag is empty. It appears that all Alpha 51003e72ca8cSmrg # Linux and Compaq Tru64 Unix objects are PIC. 51013e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 51023e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 51033e72ca8cSmrg ;; 51043e72ca8cSmrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 51053e72ca8cSmrg # IBM XL 8.0, 9.0 on PPC and BlueGene 51063e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51073e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 51083e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 51093e72ca8cSmrg ;; 51103e72ca8cSmrg *) 51113e72ca8cSmrg case `$CC -V 2>&1 | sed 5q` in 51123e72ca8cSmrg *Sun\ C*) 51133e72ca8cSmrg # Sun C++ 5.9 51143e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 51153e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 51163e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 51173e72ca8cSmrg ;; 51183e72ca8cSmrg esac 51193e72ca8cSmrg ;; 51203e72ca8cSmrg esac 51213e72ca8cSmrg ;; 51223e72ca8cSmrg lynxos*) 51233e72ca8cSmrg ;; 51243e72ca8cSmrg m88k*) 51253e72ca8cSmrg ;; 51263e72ca8cSmrg mvs*) 51273e72ca8cSmrg case $cc_basename in 51283e72ca8cSmrg cxx*) 51293e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 51303e72ca8cSmrg ;; 51313e72ca8cSmrg *) 51323e72ca8cSmrg ;; 51333e72ca8cSmrg esac 51343e72ca8cSmrg ;; 51353e72ca8cSmrg netbsd*) 51363e72ca8cSmrg ;; 51373e72ca8cSmrg *qnx* | *nto*) 51383e72ca8cSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 51393e72ca8cSmrg # it will coredump. 51403e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 51413e72ca8cSmrg ;; 51423e72ca8cSmrg osf3* | osf4* | osf5*) 51433e72ca8cSmrg case $cc_basename in 51443e72ca8cSmrg KCC*) 51453e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 51463e72ca8cSmrg ;; 51473e72ca8cSmrg RCC*) 51483e72ca8cSmrg # Rational C++ 2.4.1 51493e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 51503e72ca8cSmrg ;; 51513e72ca8cSmrg cxx*) 51523e72ca8cSmrg # Digital/Compaq C++ 51533e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51543e72ca8cSmrg # Make sure the PIC flag is empty. It appears that all Alpha 51553e72ca8cSmrg # Linux and Compaq Tru64 Unix objects are PIC. 51563e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 51573e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 51583e72ca8cSmrg ;; 51593e72ca8cSmrg *) 51603e72ca8cSmrg ;; 51613e72ca8cSmrg esac 51623e72ca8cSmrg ;; 51633e72ca8cSmrg psos*) 51643e72ca8cSmrg ;; 51653e72ca8cSmrg solaris*) 51663e72ca8cSmrg case $cc_basename in 51673e72ca8cSmrg CC* | sunCC*) 51683e72ca8cSmrg # Sun C++ 4.2, 5.x and Centerline C++ 51693e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 51703e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 51713e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 51723e72ca8cSmrg ;; 51733e72ca8cSmrg gcx*) 51743e72ca8cSmrg # Green Hills C++ Compiler 51753e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 51763e72ca8cSmrg ;; 51773e72ca8cSmrg *) 51783e72ca8cSmrg ;; 51793e72ca8cSmrg esac 51803e72ca8cSmrg ;; 51813e72ca8cSmrg sunos4*) 51823e72ca8cSmrg case $cc_basename in 51833e72ca8cSmrg CC*) 51843e72ca8cSmrg # Sun C++ 4.x 51853e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 51863e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 51873e72ca8cSmrg ;; 51883e72ca8cSmrg lcc*) 51893e72ca8cSmrg # Lucid 51903e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 51913e72ca8cSmrg ;; 51923e72ca8cSmrg *) 51933e72ca8cSmrg ;; 51943e72ca8cSmrg esac 51953e72ca8cSmrg ;; 51963e72ca8cSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 51973e72ca8cSmrg case $cc_basename in 51983e72ca8cSmrg CC*) 51993e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 52003e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 52013e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 52023e72ca8cSmrg ;; 52033e72ca8cSmrg esac 52043e72ca8cSmrg ;; 52053e72ca8cSmrg tandem*) 52063e72ca8cSmrg case $cc_basename in 52073e72ca8cSmrg NCC*) 52083e72ca8cSmrg # NonStop-UX NCC 3.20 52093e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 52103e72ca8cSmrg ;; 52113e72ca8cSmrg *) 52123e72ca8cSmrg ;; 52133e72ca8cSmrg esac 52143e72ca8cSmrg ;; 52153e72ca8cSmrg vxworks*) 52163e72ca8cSmrg ;; 52173e72ca8cSmrg *) 52183e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 52193e72ca8cSmrg ;; 52203e72ca8cSmrg esac 52213e72ca8cSmrg fi 52223e72ca8cSmrg], 52233e72ca8cSmrg[ 52243e72ca8cSmrg if test "$GCC" = yes; then 52253e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 52263e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5227a1ed278cSmrg 52283e72ca8cSmrg case $host_os in 52293e72ca8cSmrg aix*) 52303e72ca8cSmrg # All AIX code is PIC. 52313e72ca8cSmrg if test "$host_cpu" = ia64; then 52323e72ca8cSmrg # AIX 5 now supports IA64 processor 52333e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 52343e72ca8cSmrg fi 52353e72ca8cSmrg ;; 5236a1ed278cSmrg 52373e72ca8cSmrg amigaos*) 52383e72ca8cSmrg case $host_cpu in 52393e72ca8cSmrg powerpc) 52403e72ca8cSmrg # see comment about AmigaOS4 .so support 52413e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 52423e72ca8cSmrg ;; 52433e72ca8cSmrg m68k) 52443e72ca8cSmrg # FIXME: we need at least 68020 code to build shared libraries, but 52453e72ca8cSmrg # adding the `-m68020' flag to GCC prevents building anything better, 52463e72ca8cSmrg # like `-m68040'. 52473e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 52483e72ca8cSmrg ;; 52493e72ca8cSmrg esac 52503e72ca8cSmrg ;; 5251a1ed278cSmrg 52523e72ca8cSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 52533e72ca8cSmrg # PIC is the default for these OSes. 52543e72ca8cSmrg ;; 5255a1ed278cSmrg 52563e72ca8cSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 52573e72ca8cSmrg # This hack is so that the source file can tell whether it is being 52583e72ca8cSmrg # built for inclusion in a dll (and should export symbols for example). 52593e72ca8cSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 52603e72ca8cSmrg # (--disable-auto-import) libraries 52613e72ca8cSmrg m4_if([$1], [GCJ], [], 52623e72ca8cSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 52633e72ca8cSmrg ;; 5264a1ed278cSmrg 52653e72ca8cSmrg darwin* | rhapsody*) 52663e72ca8cSmrg # PIC is the default on this platform 52673e72ca8cSmrg # Common symbols not allowed in MH_DYLIB files 52683e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 52693e72ca8cSmrg ;; 5270a1ed278cSmrg 52713e72ca8cSmrg haiku*) 52723e72ca8cSmrg # PIC is the default for Haiku. 52733e72ca8cSmrg # The "-static" flag exists, but is broken. 52743e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 52753e72ca8cSmrg ;; 5276a1ed278cSmrg 52773e72ca8cSmrg hpux*) 52783e72ca8cSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 52793e72ca8cSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 52803e72ca8cSmrg # sets the default TLS model and affects inlining. 52813e72ca8cSmrg case $host_cpu in 52823e72ca8cSmrg hppa*64*) 52833e72ca8cSmrg # +Z the default 52843e72ca8cSmrg ;; 52853e72ca8cSmrg *) 52863e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 52873e72ca8cSmrg ;; 52883e72ca8cSmrg esac 52893e72ca8cSmrg ;; 5290a1ed278cSmrg 52913e72ca8cSmrg interix[[3-9]]*) 52923e72ca8cSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 52933e72ca8cSmrg # Instead, we relocate shared libraries at runtime. 52943e72ca8cSmrg ;; 5295a1ed278cSmrg 52963e72ca8cSmrg msdosdjgpp*) 52973e72ca8cSmrg # Just because we use GCC doesn't mean we suddenly get shared libraries 52983e72ca8cSmrg # on systems that don't support them. 52993e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 53003e72ca8cSmrg enable_shared=no 53013e72ca8cSmrg ;; 5302a1ed278cSmrg 53033e72ca8cSmrg *nto* | *qnx*) 53043e72ca8cSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 53053e72ca8cSmrg # it will coredump. 53063e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 53073e72ca8cSmrg ;; 5308a1ed278cSmrg 53093e72ca8cSmrg sysv4*MP*) 53103e72ca8cSmrg if test -d /usr/nec; then 53113e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 53123e72ca8cSmrg fi 53133e72ca8cSmrg ;; 5314a1ed278cSmrg 53153e72ca8cSmrg *) 53163e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 53173e72ca8cSmrg ;; 53183e72ca8cSmrg esac 5319a1ed278cSmrg 53203e72ca8cSmrg case $cc_basename in 53213e72ca8cSmrg nvcc*) # Cuda Compiler Driver 2.2 53223e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 53233e72ca8cSmrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 53243e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 53253e72ca8cSmrg fi 53263e72ca8cSmrg ;; 53273e72ca8cSmrg esac 5328a1ed278cSmrg else 53293e72ca8cSmrg # PORTME Check for flag to pass linker flags through the system compiler. 53303e72ca8cSmrg case $host_os in 53313e72ca8cSmrg aix*) 53323e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 53333e72ca8cSmrg if test "$host_cpu" = ia64; then 53343e72ca8cSmrg # AIX 5 now supports IA64 processor 53353e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 53363e72ca8cSmrg else 53373e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 53383e72ca8cSmrg fi 53393e72ca8cSmrg ;; 5340ee3138f1Smrg 53413e72ca8cSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 53423e72ca8cSmrg # This hack is so that the source file can tell whether it is being 53433e72ca8cSmrg # built for inclusion in a dll (and should export symbols for example). 53443e72ca8cSmrg m4_if([$1], [GCJ], [], 53453e72ca8cSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 53463e72ca8cSmrg ;; 5347ee3138f1Smrg 53483e72ca8cSmrg hpux9* | hpux10* | hpux11*) 53493e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 53503e72ca8cSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 53513e72ca8cSmrg # not for PA HP-UX. 53523e72ca8cSmrg case $host_cpu in 53533e72ca8cSmrg hppa*64*|ia64*) 53543e72ca8cSmrg # +Z the default 53553e72ca8cSmrg ;; 53563e72ca8cSmrg *) 53573e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 53583e72ca8cSmrg ;; 53593e72ca8cSmrg esac 53603e72ca8cSmrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 53613e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 53623e72ca8cSmrg ;; 536334977a2fSmrg 53643e72ca8cSmrg irix5* | irix6* | nonstopux*) 53653e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 53663e72ca8cSmrg # PIC (with -KPIC) is the default. 53673e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 53683e72ca8cSmrg ;; 536934977a2fSmrg 53703e72ca8cSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 53713e72ca8cSmrg case $cc_basename in 53723e72ca8cSmrg # old Intel for x86_64 which still supported -KPIC. 53733e72ca8cSmrg ecc*) 53743e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 53753e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 53763e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 53773e72ca8cSmrg ;; 53783e72ca8cSmrg # icc used to be incompatible with GCC. 53793e72ca8cSmrg # ICC 10 doesn't accept -KPIC any more. 53803e72ca8cSmrg icc* | ifort*) 53813e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 53823e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 53833e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 53843e72ca8cSmrg ;; 53853e72ca8cSmrg # Lahey Fortran 8.1. 53863e72ca8cSmrg lf95*) 53873e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 53883e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 53893e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 53903e72ca8cSmrg ;; 53913e72ca8cSmrg nagfor*) 53923e72ca8cSmrg # NAG Fortran compiler 53933e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 53943e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 53953e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 53963e72ca8cSmrg ;; 53973e72ca8cSmrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 53983e72ca8cSmrg # Portland Group compilers (*not* the Pentium gcc compiler, 53993e72ca8cSmrg # which looks to be a dead project) 54003e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54013e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 54023e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54033e72ca8cSmrg ;; 54043e72ca8cSmrg ccc*) 54053e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54063e72ca8cSmrg # All Alpha code is PIC. 54073e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 54083e72ca8cSmrg ;; 54093e72ca8cSmrg xl* | bgxl* | bgf* | mpixl*) 54103e72ca8cSmrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 54113e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54123e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 54133e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 54143e72ca8cSmrg ;; 54153e72ca8cSmrg *) 54163e72ca8cSmrg case `$CC -V 2>&1 | sed 5q` in 54173e72ca8cSmrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 54183e72ca8cSmrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 54193e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 54203e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54213e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 54223e72ca8cSmrg ;; 54233e72ca8cSmrg *Sun\ F* | *Sun*Fortran*) 54243e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 54253e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54263e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 54273e72ca8cSmrg ;; 54283e72ca8cSmrg *Sun\ C*) 54293e72ca8cSmrg # Sun C 5.9 54303e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 54313e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54323e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54333e72ca8cSmrg ;; 54343e72ca8cSmrg *Intel*\ [[CF]]*Compiler*) 54353e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54363e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 54373e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 54383e72ca8cSmrg ;; 54393e72ca8cSmrg *Portland\ Group*) 54403e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54413e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 54423e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54433e72ca8cSmrg ;; 54443e72ca8cSmrg esac 54453e72ca8cSmrg ;; 54463e72ca8cSmrg esac 54473e72ca8cSmrg ;; 544834977a2fSmrg 54493e72ca8cSmrg newsos6) 54503e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 54513e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54523e72ca8cSmrg ;; 5453ee3138f1Smrg 54543e72ca8cSmrg *nto* | *qnx*) 54553e72ca8cSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 54563e72ca8cSmrg # it will coredump. 54573e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 54583e72ca8cSmrg ;; 5459ee3138f1Smrg 54603e72ca8cSmrg osf3* | osf4* | osf5*) 54613e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54623e72ca8cSmrg # All OSF/1 code is PIC. 54633e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 54643e72ca8cSmrg ;; 5465ee3138f1Smrg 54663e72ca8cSmrg rdos*) 54673e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 54683e72ca8cSmrg ;; 5469ee3138f1Smrg 54703e72ca8cSmrg solaris*) 54713e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 54723e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54733e72ca8cSmrg case $cc_basename in 54743e72ca8cSmrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 54753e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 54763e72ca8cSmrg *) 54773e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 54783e72ca8cSmrg esac 54793e72ca8cSmrg ;; 5480ee3138f1Smrg 54813e72ca8cSmrg sunos4*) 54823e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 54833e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 54843e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54853e72ca8cSmrg ;; 5486ee3138f1Smrg 54873e72ca8cSmrg sysv4 | sysv4.2uw2* | sysv4.3*) 54883e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54893e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 54903e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54913e72ca8cSmrg ;; 54923e72ca8cSmrg 54933e72ca8cSmrg sysv4*MP*) 54943e72ca8cSmrg if test -d /usr/nec ;then 54953e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 54963e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54973e72ca8cSmrg fi 54983e72ca8cSmrg ;; 54993e72ca8cSmrg 55003e72ca8cSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 55013e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 55023e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 55033e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55043e72ca8cSmrg ;; 5505b425557eSmrg 55063e72ca8cSmrg unicos*) 55073e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 55083e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 55093e72ca8cSmrg ;; 5510b425557eSmrg 55113e72ca8cSmrg uts4*) 55123e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 55133e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55143e72ca8cSmrg ;; 5515b425557eSmrg 55163e72ca8cSmrg *) 55173e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 55183e72ca8cSmrg ;; 55193e72ca8cSmrg esac 55203e72ca8cSmrg fi 55213e72ca8cSmrg]) 55223e72ca8cSmrgcase $host_os in 55233e72ca8cSmrg # For platforms which do not support PIC, -DPIC is meaningless: 55243e72ca8cSmrg *djgpp*) 55253e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 55263e72ca8cSmrg ;; 55273e72ca8cSmrg *) 55283e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 55293e72ca8cSmrg ;; 55303e72ca8cSmrgesac 5531b425557eSmrg 55323e72ca8cSmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 55333e72ca8cSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 55343e72ca8cSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 55353e72ca8cSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 5536b425557eSmrg 55373e72ca8cSmrg# 55383e72ca8cSmrg# Check to make sure the PIC flag actually works. 55393e72ca8cSmrg# 55403e72ca8cSmrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 55413e72ca8cSmrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 55423e72ca8cSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 55433e72ca8cSmrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 55443e72ca8cSmrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 55453e72ca8cSmrg "" | " "*) ;; 55463e72ca8cSmrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 55473e72ca8cSmrg esac], 55483e72ca8cSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 55493e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 55503e72ca8cSmrgfi 55513e72ca8cSmrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 55523e72ca8cSmrg [Additional compiler flags for building library objects]) 5553b425557eSmrg 55543e72ca8cSmrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 55553e72ca8cSmrg [How to pass a linker flag through the compiler]) 55563e72ca8cSmrg# 55573e72ca8cSmrg# Check to make sure the static flag actually works. 55583e72ca8cSmrg# 55593e72ca8cSmrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 55603e72ca8cSmrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 55613e72ca8cSmrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 55623e72ca8cSmrg $lt_tmp_static_flag, 55633e72ca8cSmrg [], 55643e72ca8cSmrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 55653e72ca8cSmrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 55663e72ca8cSmrg [Compiler flag to prevent dynamic linking]) 55673e72ca8cSmrg])# _LT_COMPILER_PIC 5568b425557eSmrg 5569ee3138f1Smrg 55703e72ca8cSmrg# _LT_LINKER_SHLIBS([TAGNAME]) 55713e72ca8cSmrg# ---------------------------- 55723e72ca8cSmrg# See if the linker supports building shared libraries. 55733e72ca8cSmrgm4_defun([_LT_LINKER_SHLIBS], 55743e72ca8cSmrg[AC_REQUIRE([LT_PATH_LD])dnl 55753e72ca8cSmrgAC_REQUIRE([LT_PATH_NM])dnl 55763e72ca8cSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 55773e72ca8cSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 55783e72ca8cSmrgm4_require([_LT_DECL_EGREP])dnl 55793e72ca8cSmrgm4_require([_LT_DECL_SED])dnl 55803e72ca8cSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 55813e72ca8cSmrgm4_require([_LT_TAG_COMPILER])dnl 55823e72ca8cSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 55833e72ca8cSmrgm4_if([$1], [CXX], [ 55843e72ca8cSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 55853e72ca8cSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 55863e72ca8cSmrg case $host_os in 55873e72ca8cSmrg aix[[4-9]]*) 55883e72ca8cSmrg # If we're using GNU nm, then we don't want the "-C" option. 55893e72ca8cSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 55903e72ca8cSmrg # Also, AIX nm treats weak defined symbols like other global defined 55913e72ca8cSmrg # symbols, whereas GNU nm marks them as "W". 55923e72ca8cSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 55933e72ca8cSmrg _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' 55943e72ca8cSmrg else 55953e72ca8cSmrg _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' 55963e72ca8cSmrg fi 55973e72ca8cSmrg ;; 55983e72ca8cSmrg pw32*) 55993e72ca8cSmrg _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 56003e72ca8cSmrg ;; 56013e72ca8cSmrg cygwin* | mingw* | cegcc*) 56023e72ca8cSmrg case $cc_basename in 56033e72ca8cSmrg cl*) 56043e72ca8cSmrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 56053e72ca8cSmrg ;; 56063e72ca8cSmrg *) 56073e72ca8cSmrg _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' 56083e72ca8cSmrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 56093e72ca8cSmrg ;; 56103e72ca8cSmrg esac 56113e72ca8cSmrg ;; 56123e72ca8cSmrg *) 56133e72ca8cSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 56143e72ca8cSmrg ;; 56153e72ca8cSmrg esac 56163e72ca8cSmrg], [ 56173e72ca8cSmrg runpath_var= 56183e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 56193e72ca8cSmrg _LT_TAGVAR(always_export_symbols, $1)=no 56203e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)= 56213e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)= 56223e72ca8cSmrg _LT_TAGVAR(compiler_needs_object, $1)=no 56233e72ca8cSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 56243e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 56253e72ca8cSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 56263e72ca8cSmrg _LT_TAGVAR(hardcode_automatic, $1)=no 56273e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=no 56283e72ca8cSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 56293e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 56303e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 56313e72ca8cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=no 56323e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 56333e72ca8cSmrg _LT_TAGVAR(inherit_rpath, $1)=no 56343e72ca8cSmrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 56353e72ca8cSmrg _LT_TAGVAR(module_cmds, $1)= 56363e72ca8cSmrg _LT_TAGVAR(module_expsym_cmds, $1)= 56373e72ca8cSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 56383e72ca8cSmrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 56393e72ca8cSmrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 56403e72ca8cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 56413e72ca8cSmrg # include_expsyms should be a list of space-separated symbols to be *always* 56423e72ca8cSmrg # included in the symbol list 56433e72ca8cSmrg _LT_TAGVAR(include_expsyms, $1)= 56443e72ca8cSmrg # exclude_expsyms can be an extended regexp of symbols to exclude 56453e72ca8cSmrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 56463e72ca8cSmrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 56473e72ca8cSmrg # as well as any symbol that contains `d'. 56483e72ca8cSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 56493e72ca8cSmrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 56503e72ca8cSmrg # platforms (ab)use it in PIC code, but their linkers get confused if 56513e72ca8cSmrg # the symbol is explicitly referenced. Since portable code cannot 56523e72ca8cSmrg # rely on this symbol name, it's probably fine to never include it in 56533e72ca8cSmrg # preloaded symbol tables. 56543e72ca8cSmrg # Exclude shared library initialization/finalization symbols. 56553e72ca8cSmrgdnl Note also adjust exclude_expsyms for C++ above. 56563e72ca8cSmrg extract_expsyms_cmds= 5657ee3138f1Smrg 56583e72ca8cSmrg case $host_os in 56593e72ca8cSmrg cygwin* | mingw* | pw32* | cegcc*) 56603e72ca8cSmrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 56613e72ca8cSmrg # When not using gcc, we currently assume that we are using 56623e72ca8cSmrg # Microsoft Visual C++. 56633e72ca8cSmrg if test "$GCC" != yes; then 56643e72ca8cSmrg with_gnu_ld=no 56653e72ca8cSmrg fi 56663e72ca8cSmrg ;; 56673e72ca8cSmrg interix*) 56683e72ca8cSmrg # we just hope/assume this is gcc and not c89 (= MSVC++) 56693e72ca8cSmrg with_gnu_ld=yes 56703e72ca8cSmrg ;; 56713e72ca8cSmrg openbsd*) 56723e72ca8cSmrg with_gnu_ld=no 56733e72ca8cSmrg ;; 56743e72ca8cSmrg esac 567534977a2fSmrg 56763e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 567734977a2fSmrg 56783e72ca8cSmrg # On some targets, GNU ld is compatible enough with the native linker 56793e72ca8cSmrg # that we're better off using the native interface for both. 56803e72ca8cSmrg lt_use_gnu_ld_interface=no 56813e72ca8cSmrg if test "$with_gnu_ld" = yes; then 56823e72ca8cSmrg case $host_os in 56833e72ca8cSmrg aix*) 56843e72ca8cSmrg # The AIX port of GNU ld has always aspired to compatibility 56853e72ca8cSmrg # with the native linker. However, as the warning in the GNU ld 56863e72ca8cSmrg # block says, versions before 2.19.5* couldn't really create working 56873e72ca8cSmrg # shared libraries, regardless of the interface used. 56883e72ca8cSmrg case `$LD -v 2>&1` in 56893e72ca8cSmrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 56903e72ca8cSmrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 56913e72ca8cSmrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 56923e72ca8cSmrg *) 56933e72ca8cSmrg lt_use_gnu_ld_interface=yes 5694a1ed278cSmrg ;; 56953e72ca8cSmrg esac 56963e72ca8cSmrg ;; 56973e72ca8cSmrg *) 56983e72ca8cSmrg lt_use_gnu_ld_interface=yes 56993e72ca8cSmrg ;; 57003e72ca8cSmrg esac 57013e72ca8cSmrg fi 5702a1ed278cSmrg 57033e72ca8cSmrg if test "$lt_use_gnu_ld_interface" = yes; then 57043e72ca8cSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 57053e72ca8cSmrg wlarc='${wl}' 5706a1ed278cSmrg 57073e72ca8cSmrg # Set some defaults for GNU ld with shared library support. These 57083e72ca8cSmrg # are reset later if shared libraries are not supported. Putting them 57093e72ca8cSmrg # here allows them to be overridden if necessary. 57103e72ca8cSmrg runpath_var=LD_RUN_PATH 57113e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 57123e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 57133e72ca8cSmrg # ancient GNU ld didn't support --whole-archive et. al. 57143e72ca8cSmrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 57153e72ca8cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 57163e72ca8cSmrg else 57173e72ca8cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 57183e72ca8cSmrg fi 57193e72ca8cSmrg supports_anon_versioning=no 57203e72ca8cSmrg case `$LD -v 2>&1` in 57213e72ca8cSmrg *GNU\ gold*) supports_anon_versioning=yes ;; 57223e72ca8cSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 57233e72ca8cSmrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 57243e72ca8cSmrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 57253e72ca8cSmrg *\ 2.11.*) ;; # other 2.11 versions 57263e72ca8cSmrg *) supports_anon_versioning=yes ;; 57273e72ca8cSmrg esac 5728a1ed278cSmrg 57293e72ca8cSmrg # See if GNU ld supports shared libraries. 57303e72ca8cSmrg case $host_os in 57313e72ca8cSmrg aix[[3-9]]*) 57323e72ca8cSmrg # On AIX/PPC, the GNU linker is very broken 57333e72ca8cSmrg if test "$host_cpu" != ia64; then 57343e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 57353e72ca8cSmrg cat <<_LT_EOF 1>&2 5736a1ed278cSmrg 57373e72ca8cSmrg*** Warning: the GNU linker, at least up to release 2.19, is reported 57383e72ca8cSmrg*** to be unable to reliably create shared libraries on AIX. 57393e72ca8cSmrg*** Therefore, libtool is disabling shared libraries support. If you 57403e72ca8cSmrg*** really care for shared libraries, you may want to install binutils 57413e72ca8cSmrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 57423e72ca8cSmrg*** You will then need to restart the configuration process. 5743a1ed278cSmrg 57443e72ca8cSmrg_LT_EOF 57453e72ca8cSmrg fi 57463e72ca8cSmrg ;; 5747ee3138f1Smrg 57483e72ca8cSmrg amigaos*) 57493e72ca8cSmrg case $host_cpu in 57503e72ca8cSmrg powerpc) 57513e72ca8cSmrg # see comment about AmigaOS4 .so support 57523e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 57533e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 57543e72ca8cSmrg ;; 57553e72ca8cSmrg m68k) 57563e72ca8cSmrg _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)' 57573e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 57583e72ca8cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 57593e72ca8cSmrg ;; 57603e72ca8cSmrg esac 57613e72ca8cSmrg ;; 5762ee3138f1Smrg 57633e72ca8cSmrg beos*) 57643e72ca8cSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 57653e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 57663e72ca8cSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 57673e72ca8cSmrg # support --undefined. This deserves some investigation. FIXME 57683e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 57693e72ca8cSmrg else 57703e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 57713e72ca8cSmrg fi 57723e72ca8cSmrg ;; 5773ee3138f1Smrg 57743e72ca8cSmrg cygwin* | mingw* | pw32* | cegcc*) 57753e72ca8cSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 57763e72ca8cSmrg # as there is no search path for DLLs. 57773e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 57783e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 57793e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 57803e72ca8cSmrg _LT_TAGVAR(always_export_symbols, $1)=no 57813e72ca8cSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 57823e72ca8cSmrg _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' 57833e72ca8cSmrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 5784ee3138f1Smrg 57853e72ca8cSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 57863e72ca8cSmrg _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' 57873e72ca8cSmrg # If the export-symbols file already is a .def file (1st line 57883e72ca8cSmrg # is EXPORTS), use it as is; otherwise, prepend... 57893e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 57903e72ca8cSmrg cp $export_symbols $output_objdir/$soname.def; 57913e72ca8cSmrg else 57923e72ca8cSmrg echo EXPORTS > $output_objdir/$soname.def; 57933e72ca8cSmrg cat $export_symbols >> $output_objdir/$soname.def; 57943e72ca8cSmrg fi~ 57953e72ca8cSmrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 57963e72ca8cSmrg else 57973e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 57983e72ca8cSmrg fi 57993e72ca8cSmrg ;; 5800ee3138f1Smrg 58013e72ca8cSmrg haiku*) 58023e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 58033e72ca8cSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 58043e72ca8cSmrg ;; 5805ee3138f1Smrg 58063e72ca8cSmrg interix[[3-9]]*) 58073e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=no 58083e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 58093e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 58103e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 58113e72ca8cSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 58123e72ca8cSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 58133e72ca8cSmrg # default) and relocated if they conflict, which is a slow very memory 58143e72ca8cSmrg # consuming and fragmenting process. To avoid this, we pick a random, 58153e72ca8cSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 58163e72ca8cSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 58173e72ca8cSmrg _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' 58183e72ca8cSmrg _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' 58193e72ca8cSmrg ;; 5820ee3138f1Smrg 58213e72ca8cSmrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 58223e72ca8cSmrg tmp_diet=no 58233e72ca8cSmrg if test "$host_os" = linux-dietlibc; then 58243e72ca8cSmrg case $cc_basename in 58253e72ca8cSmrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 58263e72ca8cSmrg esac 58273e72ca8cSmrg fi 58283e72ca8cSmrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 58293e72ca8cSmrg && test "$tmp_diet" = no 58303e72ca8cSmrg then 58313e72ca8cSmrg tmp_addflag=' $pic_flag' 58323e72ca8cSmrg tmp_sharedflag='-shared' 58333e72ca8cSmrg case $cc_basename,$host_cpu in 58343e72ca8cSmrg pgcc*) # Portland Group C compiler 58353e72ca8cSmrg _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' 58363e72ca8cSmrg tmp_addflag=' $pic_flag' 58373e72ca8cSmrg ;; 58383e72ca8cSmrg pgf77* | pgf90* | pgf95* | pgfortran*) 58393e72ca8cSmrg # Portland Group f77 and f90 compilers 58403e72ca8cSmrg _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' 58413e72ca8cSmrg tmp_addflag=' $pic_flag -Mnomain' ;; 58423e72ca8cSmrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 58433e72ca8cSmrg tmp_addflag=' -i_dynamic' ;; 58443e72ca8cSmrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 58453e72ca8cSmrg tmp_addflag=' -i_dynamic -nofor_main' ;; 58463e72ca8cSmrg ifc* | ifort*) # Intel Fortran compiler 58473e72ca8cSmrg tmp_addflag=' -nofor_main' ;; 58483e72ca8cSmrg lf95*) # Lahey Fortran 8.1 58493e72ca8cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 58503e72ca8cSmrg tmp_sharedflag='--shared' ;; 58513e72ca8cSmrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 58523e72ca8cSmrg tmp_sharedflag='-qmkshrobj' 58533e72ca8cSmrg tmp_addflag= ;; 58543e72ca8cSmrg nvcc*) # Cuda Compiler Driver 2.2 58553e72ca8cSmrg _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' 58563e72ca8cSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 58573e72ca8cSmrg ;; 58583e72ca8cSmrg esac 58593e72ca8cSmrg case `$CC -V 2>&1 | sed 5q` in 58603e72ca8cSmrg *Sun\ C*) # Sun C 5.9 58613e72ca8cSmrg _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' 58623e72ca8cSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 58633e72ca8cSmrg tmp_sharedflag='-G' ;; 58643e72ca8cSmrg *Sun\ F*) # Sun Fortran 8.3 58653e72ca8cSmrg tmp_sharedflag='-G' ;; 58663e72ca8cSmrg esac 58673e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5868ee3138f1Smrg 58693e72ca8cSmrg if test "x$supports_anon_versioning" = xyes; then 58703e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 58713e72ca8cSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 58723e72ca8cSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 58733e72ca8cSmrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 58743e72ca8cSmrg fi 5875ee3138f1Smrg 58763e72ca8cSmrg case $cc_basename in 58773e72ca8cSmrg xlf* | bgf* | bgxlf* | mpixlf*) 58783e72ca8cSmrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 58793e72ca8cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 58803e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 58813e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 58823e72ca8cSmrg if test "x$supports_anon_versioning" = xyes; then 58833e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 58843e72ca8cSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 58853e72ca8cSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 58863e72ca8cSmrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 58873e72ca8cSmrg fi 58883e72ca8cSmrg ;; 5889b425557eSmrg esac 58903e72ca8cSmrg else 58913e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 58923e72ca8cSmrg fi 58933e72ca8cSmrg ;; 5894ee3138f1Smrg 58953e72ca8cSmrg netbsd*) 58963e72ca8cSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 58973e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 58983e72ca8cSmrg wlarc= 58993e72ca8cSmrg else 59003e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 59013e72ca8cSmrg _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' 59023e72ca8cSmrg fi 59033e72ca8cSmrg ;; 59043e72ca8cSmrg 59053e72ca8cSmrg solaris*) 59063e72ca8cSmrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 5907a1ed278cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 59083e72ca8cSmrg cat <<_LT_EOF 1>&2 5909ee3138f1Smrg 59103e72ca8cSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 59113e72ca8cSmrg*** create shared libraries on Solaris systems. Therefore, libtool 59123e72ca8cSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 59133e72ca8cSmrg*** binutils to release 2.9.1 or newer. Another option is to modify 59143e72ca8cSmrg*** your PATH or compiler configuration so that the native linker is 59153e72ca8cSmrg*** used, and then restart. 5916ee3138f1Smrg 59173e72ca8cSmrg_LT_EOF 59183e72ca8cSmrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 59193e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 59203e72ca8cSmrg _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' 59213e72ca8cSmrg else 59223e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 59233e72ca8cSmrg fi 59243e72ca8cSmrg ;; 5925ee3138f1Smrg 59263e72ca8cSmrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 59273e72ca8cSmrg case `$LD -v 2>&1` in 59283e72ca8cSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 59293e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 59303e72ca8cSmrg cat <<_LT_EOF 1>&2 5931ee3138f1Smrg 59323e72ca8cSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 59333e72ca8cSmrg*** reliably create shared libraries on SCO systems. Therefore, libtool 59343e72ca8cSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 59353e72ca8cSmrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 59363e72ca8cSmrg*** your PATH or compiler configuration so that the native linker is 59373e72ca8cSmrg*** used, and then restart. 593834977a2fSmrg 59393e72ca8cSmrg_LT_EOF 5940a1ed278cSmrg ;; 59413e72ca8cSmrg *) 59423e72ca8cSmrg # For security reasons, it is highly recommended that you always 59433e72ca8cSmrg # use absolute paths for naming shared libraries, and exclude the 59443e72ca8cSmrg # DT_RUNPATH tag from executables and libraries. But doing so 59453e72ca8cSmrg # requires that you compile everything twice, which is a pain. 59463e72ca8cSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 59473e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 59483e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 59493e72ca8cSmrg _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' 59503e72ca8cSmrg else 59513e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5952a1ed278cSmrg fi 5953a1ed278cSmrg ;; 59543e72ca8cSmrg esac 59553e72ca8cSmrg ;; 5956ee3138f1Smrg 59573e72ca8cSmrg sunos4*) 59583e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 59593e72ca8cSmrg wlarc= 59603e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 59613e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 59623e72ca8cSmrg ;; 5963a1ed278cSmrg 59643e72ca8cSmrg *) 59653e72ca8cSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 59663e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 59673e72ca8cSmrg _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' 59683e72ca8cSmrg else 59693e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 59703e72ca8cSmrg fi 59713e72ca8cSmrg ;; 59723e72ca8cSmrg esac 5973ee3138f1Smrg 59743e72ca8cSmrg if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 59753e72ca8cSmrg runpath_var= 59763e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 59773e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 59783e72ca8cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 59793e72ca8cSmrg fi 59803e72ca8cSmrg else 59813e72ca8cSmrg # PORTME fill in a description of your system's linker (not GNU ld) 59823e72ca8cSmrg case $host_os in 59833e72ca8cSmrg aix3*) 59843e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 59853e72ca8cSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 59863e72ca8cSmrg _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' 59873e72ca8cSmrg # Note: this linker hardcodes the directories in LIBPATH if there 59883e72ca8cSmrg # are no directories specified by -L. 59893e72ca8cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 59903e72ca8cSmrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 59913e72ca8cSmrg # Neither direct hardcoding nor static linking is supported with a 59923e72ca8cSmrg # broken collect2. 59933e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 59943e72ca8cSmrg fi 59953e72ca8cSmrg ;; 5996a1ed278cSmrg 59973e72ca8cSmrg aix[[4-9]]*) 59983e72ca8cSmrg if test "$host_cpu" = ia64; then 59993e72ca8cSmrg # On IA64, the linker does run time linking by default, so we don't 60003e72ca8cSmrg # have to do anything special. 60013e72ca8cSmrg aix_use_runtimelinking=no 60023e72ca8cSmrg exp_sym_flag='-Bexport' 60033e72ca8cSmrg no_entry_flag="" 60043e72ca8cSmrg else 60053e72ca8cSmrg # If we're using GNU nm, then we don't want the "-C" option. 60063e72ca8cSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 60073e72ca8cSmrg # Also, AIX nm treats weak defined symbols like other global 60083e72ca8cSmrg # defined symbols, whereas GNU nm marks them as "W". 60093e72ca8cSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 60103e72ca8cSmrg _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' 60113e72ca8cSmrg else 60123e72ca8cSmrg _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' 60133e72ca8cSmrg fi 60143e72ca8cSmrg aix_use_runtimelinking=no 6015a1ed278cSmrg 60163e72ca8cSmrg # Test if we are trying to use run time linking or normal 60173e72ca8cSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 60183e72ca8cSmrg # need to do runtime linking. 60193e72ca8cSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 60203e72ca8cSmrg for ld_flag in $LDFLAGS; do 60213e72ca8cSmrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 60223e72ca8cSmrg aix_use_runtimelinking=yes 60233e72ca8cSmrg break 60243e72ca8cSmrg fi 60253e72ca8cSmrg done 60263e72ca8cSmrg ;; 60273e72ca8cSmrg esac 6028a1ed278cSmrg 60293e72ca8cSmrg exp_sym_flag='-bexport' 60303e72ca8cSmrg no_entry_flag='-bnoentry' 60313e72ca8cSmrg fi 6032a1ed278cSmrg 60333e72ca8cSmrg # When large executables or shared objects are built, AIX ld can 60343e72ca8cSmrg # have problems creating the table of contents. If linking a library 60353e72ca8cSmrg # or program results in "error TOC overflow" add -mminimal-toc to 60363e72ca8cSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 60373e72ca8cSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 6038a1ed278cSmrg 60393e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='' 60403e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 60413e72ca8cSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 60423e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 60433e72ca8cSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 60443e72ca8cSmrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 6045a1ed278cSmrg 60463e72ca8cSmrg if test "$GCC" = yes; then 60473e72ca8cSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 60483e72ca8cSmrg # We only want to do this on AIX 4.2 and lower, the check 60493e72ca8cSmrg # below for broken collect2 doesn't work under 4.3+ 60503e72ca8cSmrg collect2name=`${CC} -print-prog-name=collect2` 60513e72ca8cSmrg if test -f "$collect2name" && 60523e72ca8cSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 60533e72ca8cSmrg then 60543e72ca8cSmrg # We have reworked collect2 60553e72ca8cSmrg : 60563e72ca8cSmrg else 60573e72ca8cSmrg # We have old collect2 60583e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 60593e72ca8cSmrg # It fails to find uninstalled libraries when the uninstalled 60603e72ca8cSmrg # path is not listed in the libpath. Setting hardcode_minus_L 60613e72ca8cSmrg # to unsupported forces relinking 60623e72ca8cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 60633e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 60643e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 60653e72ca8cSmrg fi 60663e72ca8cSmrg ;; 60673e72ca8cSmrg esac 60683e72ca8cSmrg shared_flag='-shared' 60693e72ca8cSmrg if test "$aix_use_runtimelinking" = yes; then 60703e72ca8cSmrg shared_flag="$shared_flag "'${wl}-G' 60713e72ca8cSmrg fi 60723e72ca8cSmrg else 60733e72ca8cSmrg # not using gcc 60743e72ca8cSmrg if test "$host_cpu" = ia64; then 60753e72ca8cSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 60763e72ca8cSmrg # chokes on -Wl,-G. The following line is correct: 60773e72ca8cSmrg shared_flag='-G' 60783e72ca8cSmrg else 60793e72ca8cSmrg if test "$aix_use_runtimelinking" = yes; then 60803e72ca8cSmrg shared_flag='${wl}-G' 60813e72ca8cSmrg else 60823e72ca8cSmrg shared_flag='${wl}-bM:SRE' 60833e72ca8cSmrg fi 60843e72ca8cSmrg fi 60853e72ca8cSmrg fi 6086a1ed278cSmrg 60873e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 60883e72ca8cSmrg # It seems that -bexpall does not export symbols beginning with 60893e72ca8cSmrg # underscore (_), so it is better to generate a list of symbols to export. 60903e72ca8cSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 60913e72ca8cSmrg if test "$aix_use_runtimelinking" = yes; then 60923e72ca8cSmrg # Warning - without using the other runtime loading flags (-brtl), 60933e72ca8cSmrg # -berok will link without error, but may produce a broken library. 60943e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 60953e72ca8cSmrg # Determine the default libpath from the value encoded in an 60963e72ca8cSmrg # empty executable. 60973e72ca8cSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 60983e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 60993e72ca8cSmrg _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" 61003e72ca8cSmrg else 61013e72ca8cSmrg if test "$host_cpu" = ia64; then 61023e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 61033e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 61043e72ca8cSmrg _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" 61053e72ca8cSmrg else 61063e72ca8cSmrg # Determine the default libpath from the value encoded in an 61073e72ca8cSmrg # empty executable. 61083e72ca8cSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 61093e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 61103e72ca8cSmrg # Warning - without using the other run time loading flags, 61113e72ca8cSmrg # -berok will link without error, but may produce a broken library. 61123e72ca8cSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 61133e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 61143e72ca8cSmrg if test "$with_gnu_ld" = yes; then 61153e72ca8cSmrg # We only use this code for GNU lds that support --whole-archive. 61163e72ca8cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 61173e72ca8cSmrg else 61183e72ca8cSmrg # Exported symbols can be pulled into shared objects from archives 61193e72ca8cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 61203e72ca8cSmrg fi 61213e72ca8cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 61223e72ca8cSmrg # This is similar to how AIX traditionally builds its shared libraries. 61233e72ca8cSmrg _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' 61243e72ca8cSmrg fi 61253e72ca8cSmrg fi 61263e72ca8cSmrg ;; 6127a1ed278cSmrg 61283e72ca8cSmrg amigaos*) 61293e72ca8cSmrg case $host_cpu in 61303e72ca8cSmrg powerpc) 61313e72ca8cSmrg # see comment about AmigaOS4 .so support 61323e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 61333e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 61343e72ca8cSmrg ;; 61353e72ca8cSmrg m68k) 61363e72ca8cSmrg _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)' 61373e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 61383e72ca8cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 61393e72ca8cSmrg ;; 61403e72ca8cSmrg esac 61413e72ca8cSmrg ;; 6142ee3138f1Smrg 61433e72ca8cSmrg bsdi[[45]]*) 61443e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 61453e72ca8cSmrg ;; 6146ee3138f1Smrg 61473e72ca8cSmrg cygwin* | mingw* | pw32* | cegcc*) 61483e72ca8cSmrg # When not using gcc, we currently assume that we are using 61493e72ca8cSmrg # Microsoft Visual C++. 61503e72ca8cSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 61513e72ca8cSmrg # no search path for DLLs. 61523e72ca8cSmrg case $cc_basename in 61533e72ca8cSmrg cl*) 61543e72ca8cSmrg # Native MSVC 61553e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 61563e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 61573e72ca8cSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 61583e72ca8cSmrg _LT_TAGVAR(file_list_spec, $1)='@' 61593e72ca8cSmrg # Tell ltmain to make .lib files, not .a files. 61603e72ca8cSmrg libext=lib 61613e72ca8cSmrg # Tell ltmain to make .dll files, not .so files. 61623e72ca8cSmrg shrext_cmds=".dll" 61633e72ca8cSmrg # FIXME: Setting linknames here is a bad hack. 61643e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 61653e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 61663e72ca8cSmrg sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 61673e72ca8cSmrg else 61683e72ca8cSmrg sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 61693e72ca8cSmrg fi~ 61703e72ca8cSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 61713e72ca8cSmrg linknames=' 61723e72ca8cSmrg # The linker will not automatically build a static lib if we build a DLL. 61733e72ca8cSmrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 61743e72ca8cSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 61753e72ca8cSmrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 61763e72ca8cSmrg _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' 61773e72ca8cSmrg # Don't use ranlib 61783e72ca8cSmrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 61793e72ca8cSmrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 61803e72ca8cSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 61813e72ca8cSmrg case $lt_outputfile in 61823e72ca8cSmrg *.exe|*.EXE) ;; 61833e72ca8cSmrg *) 61843e72ca8cSmrg lt_outputfile="$lt_outputfile.exe" 61853e72ca8cSmrg lt_tool_outputfile="$lt_tool_outputfile.exe" 61863e72ca8cSmrg ;; 61873e72ca8cSmrg esac~ 61883e72ca8cSmrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 61893e72ca8cSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 61903e72ca8cSmrg $RM "$lt_outputfile.manifest"; 61913e72ca8cSmrg fi' 61923e72ca8cSmrg ;; 61933e72ca8cSmrg *) 61943e72ca8cSmrg # Assume MSVC wrapper 61953e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 61963e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 61973e72ca8cSmrg # Tell ltmain to make .lib files, not .a files. 61983e72ca8cSmrg libext=lib 61993e72ca8cSmrg # Tell ltmain to make .dll files, not .so files. 62003e72ca8cSmrg shrext_cmds=".dll" 62013e72ca8cSmrg # FIXME: Setting linknames here is a bad hack. 62023e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 62033e72ca8cSmrg # The linker will automatically build a .lib file if we build a DLL. 62043e72ca8cSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 62053e72ca8cSmrg # FIXME: Should let the user specify the lib program. 62063e72ca8cSmrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 62073e72ca8cSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 62083e72ca8cSmrg ;; 62093e72ca8cSmrg esac 62103e72ca8cSmrg ;; 6211ee3138f1Smrg 62123e72ca8cSmrg darwin* | rhapsody*) 62133e72ca8cSmrg _LT_DARWIN_LINKER_FEATURES($1) 62143e72ca8cSmrg ;; 621534977a2fSmrg 62163e72ca8cSmrg dgux*) 62173e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 62183e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 62193e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 62203e72ca8cSmrg ;; 6221ee3138f1Smrg 62223e72ca8cSmrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 62233e72ca8cSmrg # support. Future versions do this automatically, but an explicit c++rt0.o 62243e72ca8cSmrg # does not break anything, and helps significantly (at the cost of a little 62253e72ca8cSmrg # extra space). 62263e72ca8cSmrg freebsd2.2*) 62273e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 62283e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 62293e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 62303e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 62313e72ca8cSmrg ;; 6232ee3138f1Smrg 62333e72ca8cSmrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 62343e72ca8cSmrg freebsd2.*) 62353e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 62363e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 62373e72ca8cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 62383e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 62393e72ca8cSmrg ;; 6240ee3138f1Smrg 62413e72ca8cSmrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 62423e72ca8cSmrg freebsd* | dragonfly*) 62433e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 62443e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 62453e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6246a1ed278cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 62473e72ca8cSmrg ;; 6248ee3138f1Smrg 62493e72ca8cSmrg hpux9*) 62503e72ca8cSmrg if test "$GCC" = yes; then 62513e72ca8cSmrg _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' 62523e72ca8cSmrg else 62533e72ca8cSmrg _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' 62543e72ca8cSmrg fi 62553e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 62563e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 62573e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 62583e72ca8cSmrg 62593e72ca8cSmrg # hardcode_minus_L: Not really in the search PATH, 62603e72ca8cSmrg # but as the default location of the library. 62613e72ca8cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 62623e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 62633e72ca8cSmrg ;; 62643e72ca8cSmrg 62653e72ca8cSmrg hpux10*) 62663e72ca8cSmrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 62673e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 62683e72ca8cSmrg else 62693e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 62703e72ca8cSmrg fi 62713e72ca8cSmrg if test "$with_gnu_ld" = no; then 62723e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 62733e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 62743e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 62753e72ca8cSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 62763e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 62773e72ca8cSmrg # hardcode_minus_L: Not really in the search PATH, 62783e72ca8cSmrg # but as the default location of the library. 62793e72ca8cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 62803e72ca8cSmrg fi 62813e72ca8cSmrg ;; 62823e72ca8cSmrg 62833e72ca8cSmrg hpux11*) 62843e72ca8cSmrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 62853e72ca8cSmrg case $host_cpu in 62863e72ca8cSmrg hppa*64*) 62873e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 62883e72ca8cSmrg ;; 62893e72ca8cSmrg ia64*) 62903e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 6291b425557eSmrg ;; 6292a1ed278cSmrg *) 62933e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 6294a1ed278cSmrg ;; 62953e72ca8cSmrg esac 62963e72ca8cSmrg else 62973e72ca8cSmrg case $host_cpu in 62983e72ca8cSmrg hppa*64*) 62993e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 63003e72ca8cSmrg ;; 63013e72ca8cSmrg ia64*) 63023e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 63033e72ca8cSmrg ;; 63043e72ca8cSmrg *) 63053e72ca8cSmrg m4_if($1, [], [ 63063e72ca8cSmrg # Older versions of the 11.00 compiler do not understand -b yet 63073e72ca8cSmrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 63083e72ca8cSmrg _LT_LINKER_OPTION([if $CC understands -b], 63093e72ca8cSmrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 63103e72ca8cSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 63113e72ca8cSmrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 63123e72ca8cSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 63133e72ca8cSmrg ;; 63143e72ca8cSmrg esac 63153e72ca8cSmrg fi 63163e72ca8cSmrg if test "$with_gnu_ld" = no; then 63173e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 63183e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6319ee3138f1Smrg 63203e72ca8cSmrg case $host_cpu in 63213e72ca8cSmrg hppa*64*|ia64*) 63223e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=no 63233e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 63243e72ca8cSmrg ;; 63253e72ca8cSmrg *) 63263e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 63273e72ca8cSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 63283e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6329a1ed278cSmrg 63303e72ca8cSmrg # hardcode_minus_L: Not really in the search PATH, 63313e72ca8cSmrg # but as the default location of the library. 63323e72ca8cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 63333e72ca8cSmrg ;; 6334a1ed278cSmrg esac 63353e72ca8cSmrg fi 6336b425557eSmrg ;; 6337ee3138f1Smrg 63383e72ca8cSmrg irix5* | irix6* | nonstopux*) 63393e72ca8cSmrg if test "$GCC" = yes; then 63403e72ca8cSmrg _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' 63413e72ca8cSmrg # Try to use the -exported_symbol ld option, if it does not 63423e72ca8cSmrg # work, assume that -exports_file does not work either and 63433e72ca8cSmrg # implicitly export all symbols. 63443e72ca8cSmrg # This should be the same for all languages, so no per-tag cache variable. 63453e72ca8cSmrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 63463e72ca8cSmrg [lt_cv_irix_exported_symbol], 63473e72ca8cSmrg [save_LDFLAGS="$LDFLAGS" 63483e72ca8cSmrg LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 63493e72ca8cSmrg AC_LINK_IFELSE( 63503e72ca8cSmrg [AC_LANG_SOURCE( 63513e72ca8cSmrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 63523e72ca8cSmrg [C++], [[int foo (void) { return 0; }]], 63533e72ca8cSmrg [Fortran 77], [[ 63543e72ca8cSmrg subroutine foo 63553e72ca8cSmrg end]], 63563e72ca8cSmrg [Fortran], [[ 63573e72ca8cSmrg subroutine foo 63583e72ca8cSmrg end]])])], 63593e72ca8cSmrg [lt_cv_irix_exported_symbol=yes], 63603e72ca8cSmrg [lt_cv_irix_exported_symbol=no]) 63613e72ca8cSmrg LDFLAGS="$save_LDFLAGS"]) 63623e72ca8cSmrg if test "$lt_cv_irix_exported_symbol" = yes; then 63633e72ca8cSmrg _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' 63643e72ca8cSmrg fi 63653e72ca8cSmrg else 63663e72ca8cSmrg _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' 63673e72ca8cSmrg _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' 63683e72ca8cSmrg fi 63693e72ca8cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 63703e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 63713e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 63723e72ca8cSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 63733e72ca8cSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 63743e72ca8cSmrg ;; 6375a1ed278cSmrg 63763e72ca8cSmrg netbsd*) 63773e72ca8cSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 63783e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 63793e72ca8cSmrg else 63803e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 63813e72ca8cSmrg fi 63823e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 63833e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 63843e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 63853e72ca8cSmrg ;; 6386a1ed278cSmrg 63873e72ca8cSmrg newsos6) 63883e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 63893e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 63903e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 63913e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 63923e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 63933e72ca8cSmrg ;; 639434977a2fSmrg 63953e72ca8cSmrg *nto* | *qnx*) 63963e72ca8cSmrg ;; 6397ee3138f1Smrg 63983e72ca8cSmrg openbsd*) 63993e72ca8cSmrg if test -f /usr/libexec/ld.so; then 64003e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 64013e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 64023e72ca8cSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 64033e72ca8cSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 64043e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 64053e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 64063e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 64073e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 64083e72ca8cSmrg else 64093e72ca8cSmrg case $host_os in 64103e72ca8cSmrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 64113e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 64123e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 64133e72ca8cSmrg ;; 64143e72ca8cSmrg *) 64153e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 64163e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 64173e72ca8cSmrg ;; 64183e72ca8cSmrg esac 64193e72ca8cSmrg fi 64203e72ca8cSmrg else 64213e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 64223e72ca8cSmrg fi 64233e72ca8cSmrg ;; 6424ee3138f1Smrg 64253e72ca8cSmrg os2*) 64263e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 64273e72ca8cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 64283e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 64293e72ca8cSmrg _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' 64303e72ca8cSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 64313e72ca8cSmrg ;; 6432ee3138f1Smrg 64333e72ca8cSmrg osf3*) 64343e72ca8cSmrg if test "$GCC" = yes; then 64353e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 64363e72ca8cSmrg _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' 64373e72ca8cSmrg else 64383e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 64393e72ca8cSmrg _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' 64403e72ca8cSmrg fi 64413e72ca8cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 64423e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 64433e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 64443e72ca8cSmrg ;; 6445ee3138f1Smrg 64463e72ca8cSmrg osf4* | osf5*) # as osf3* with the addition of -msym flag 64473e72ca8cSmrg if test "$GCC" = yes; then 64483e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 64493e72ca8cSmrg _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' 64503e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 64513e72ca8cSmrg else 64523e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 64533e72ca8cSmrg _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' 64543e72ca8cSmrg _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~ 64553e72ca8cSmrg $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' 6456ee3138f1Smrg 64573e72ca8cSmrg # Both c and cxx compiler support -rpath directly 64583e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 64593e72ca8cSmrg fi 64603e72ca8cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 64613e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 64623e72ca8cSmrg ;; 6463ee3138f1Smrg 64643e72ca8cSmrg solaris*) 64653e72ca8cSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 64663e72ca8cSmrg if test "$GCC" = yes; then 64673e72ca8cSmrg wlarc='${wl}' 64683e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 64693e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 64703e72ca8cSmrg $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' 64713e72ca8cSmrg else 64723e72ca8cSmrg case `$CC -V 2>&1` in 64733e72ca8cSmrg *"Compilers 5.0"*) 64743e72ca8cSmrg wlarc='' 64753e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 64763e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 64773e72ca8cSmrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 64783e72ca8cSmrg ;; 64793e72ca8cSmrg *) 64803e72ca8cSmrg wlarc='${wl}' 64813e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 64823e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 64833e72ca8cSmrg $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 64843e72ca8cSmrg ;; 64853e72ca8cSmrg esac 64863e72ca8cSmrg fi 64873e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 64883e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 64893e72ca8cSmrg case $host_os in 64903e72ca8cSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 64913e72ca8cSmrg *) 64923e72ca8cSmrg # The compiler driver will combine and reorder linker options, 64933e72ca8cSmrg # but understands `-z linker_flag'. GCC discards it without `$wl', 64943e72ca8cSmrg # but is careful enough not to reorder. 64953e72ca8cSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 64963e72ca8cSmrg if test "$GCC" = yes; then 64973e72ca8cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 64983e72ca8cSmrg else 64993e72ca8cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 65003e72ca8cSmrg fi 65013e72ca8cSmrg ;; 65023e72ca8cSmrg esac 65033e72ca8cSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 65043e72ca8cSmrg ;; 650534977a2fSmrg 65063e72ca8cSmrg sunos4*) 65073e72ca8cSmrg if test "x$host_vendor" = xsequent; then 65083e72ca8cSmrg # Use $CC to link under sequent, because it throws in some extra .o 65093e72ca8cSmrg # files that make .init and .fini sections work. 65103e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 65113e72ca8cSmrg else 65123e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 65133e72ca8cSmrg fi 65143e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 65153e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 65163e72ca8cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 65173e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 65183e72ca8cSmrg ;; 651934977a2fSmrg 65203e72ca8cSmrg sysv4) 65213e72ca8cSmrg case $host_vendor in 65223e72ca8cSmrg sni) 65233e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 65243e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 65253e72ca8cSmrg ;; 65263e72ca8cSmrg siemens) 65273e72ca8cSmrg ## LD is ld it makes a PLAMLIB 65283e72ca8cSmrg ## CC just makes a GrossModule. 65293e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 65303e72ca8cSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 65313e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=no 65323e72ca8cSmrg ;; 65333e72ca8cSmrg motorola) 65343e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 65353e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 65363e72ca8cSmrg ;; 65373e72ca8cSmrg esac 65383e72ca8cSmrg runpath_var='LD_RUN_PATH' 65393e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 65403e72ca8cSmrg ;; 6541a1ed278cSmrg 65423e72ca8cSmrg sysv4.3*) 65433e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 65443e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 65453e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 65463e72ca8cSmrg ;; 6547a1ed278cSmrg 65483e72ca8cSmrg sysv4*MP*) 65493e72ca8cSmrg if test -d /usr/nec; then 65503e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 65513e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 65523e72ca8cSmrg runpath_var=LD_RUN_PATH 65533e72ca8cSmrg hardcode_runpath_var=yes 65543e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 65553e72ca8cSmrg fi 65563e72ca8cSmrg ;; 6557a1ed278cSmrg 65583e72ca8cSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 65593e72ca8cSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 65603e72ca8cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 65613e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 65623e72ca8cSmrg runpath_var='LD_RUN_PATH' 6563a1ed278cSmrg 65643e72ca8cSmrg if test "$GCC" = yes; then 65653e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 65663e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 65673e72ca8cSmrg else 65683e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 65693e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 65703e72ca8cSmrg fi 65713e72ca8cSmrg ;; 6572a1ed278cSmrg 65733e72ca8cSmrg sysv5* | sco3.2v5* | sco5v6*) 65743e72ca8cSmrg # Note: We can NOT use -z defs as we might desire, because we do not 65753e72ca8cSmrg # link with -lc, and that would cause any symbols used from libc to 65763e72ca8cSmrg # always be unresolved, which means just about no library would 65773e72ca8cSmrg # ever link correctly. If we're not using GNU ld we use -z text 65783e72ca8cSmrg # though, which does catch some bad symbols but isn't as heavy-handed 65793e72ca8cSmrg # as -z defs. 65803e72ca8cSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 65813e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 65823e72ca8cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 65833e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 65843e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 65853e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 65863e72ca8cSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 65873e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 65883e72ca8cSmrg runpath_var='LD_RUN_PATH' 6589a1ed278cSmrg 65903e72ca8cSmrg if test "$GCC" = yes; then 65913e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 65923e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 65933e72ca8cSmrg else 65943e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 65953e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 65963e72ca8cSmrg fi 65973e72ca8cSmrg ;; 659834977a2fSmrg 65993e72ca8cSmrg uts4*) 66003e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 66013e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 66023e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 66033e72ca8cSmrg ;; 660434977a2fSmrg 66053e72ca8cSmrg *) 66063e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 66073e72ca8cSmrg ;; 6608a1ed278cSmrg esac 6609ee3138f1Smrg 66103e72ca8cSmrg if test x$host_vendor = xsni; then 66113e72ca8cSmrg case $host in 66123e72ca8cSmrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 66133e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 66143e72ca8cSmrg ;; 66153e72ca8cSmrg esac 66163e72ca8cSmrg fi 66173e72ca8cSmrg fi 66183e72ca8cSmrg]) 66193e72ca8cSmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 66203e72ca8cSmrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 6621ee3138f1Smrg 66223e72ca8cSmrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 6623ee3138f1Smrg 66243e72ca8cSmrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 66253e72ca8cSmrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 66263e72ca8cSmrg_LT_DECL([], [extract_expsyms_cmds], [2], 66273e72ca8cSmrg [The commands to extract the exported symbol list from a shared archive]) 6628ee3138f1Smrg 66293e72ca8cSmrg# 66303e72ca8cSmrg# Do we need to explicitly link libc? 66313e72ca8cSmrg# 66323e72ca8cSmrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 66333e72ca8cSmrgx|xyes) 66343e72ca8cSmrg # Assume -lc should be added 66353e72ca8cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 663634977a2fSmrg 66373e72ca8cSmrg if test "$enable_shared" = yes && test "$GCC" = yes; then 66383e72ca8cSmrg case $_LT_TAGVAR(archive_cmds, $1) in 66393e72ca8cSmrg *'~'*) 66403e72ca8cSmrg # FIXME: we may have to deal with multi-command sequences. 6641b425557eSmrg ;; 66423e72ca8cSmrg '$CC '*) 66433e72ca8cSmrg # Test whether the compiler implicitly links with -lc since on some 66443e72ca8cSmrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 66453e72ca8cSmrg # to ld, don't add -lc before -lgcc. 66463e72ca8cSmrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 66473e72ca8cSmrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 66483e72ca8cSmrg [$RM conftest* 66493e72ca8cSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 6650ee3138f1Smrg 66513e72ca8cSmrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 66523e72ca8cSmrg soname=conftest 66533e72ca8cSmrg lib=conftest 66543e72ca8cSmrg libobjs=conftest.$ac_objext 66553e72ca8cSmrg deplibs= 66563e72ca8cSmrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 66573e72ca8cSmrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 66583e72ca8cSmrg compiler_flags=-v 66593e72ca8cSmrg linker_flags=-v 66603e72ca8cSmrg verstring= 66613e72ca8cSmrg output_objdir=. 66623e72ca8cSmrg libname=conftest 66633e72ca8cSmrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 66643e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 66653e72ca8cSmrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 66663e72ca8cSmrg then 66673e72ca8cSmrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 66683e72ca8cSmrg else 66693e72ca8cSmrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 66703e72ca8cSmrg fi 66713e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 66723e72ca8cSmrg else 66733e72ca8cSmrg cat conftest.err 1>&5 66743e72ca8cSmrg fi 66753e72ca8cSmrg $RM conftest* 66763e72ca8cSmrg ]) 66773e72ca8cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 6678b425557eSmrg ;; 6679a1ed278cSmrg esac 66803e72ca8cSmrg fi 6681a1ed278cSmrg ;; 6682a1ed278cSmrgesac 6683a1ed278cSmrg 66843e72ca8cSmrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 66853e72ca8cSmrg [Whether or not to add -lc for building shared libraries]) 66863e72ca8cSmrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 66873e72ca8cSmrg [enable_shared_with_static_runtimes], [0], 66883e72ca8cSmrg [Whether or not to disallow shared libs when runtime libs are static]) 66893e72ca8cSmrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 66903e72ca8cSmrg [Compiler flag to allow reflexive dlopens]) 66913e72ca8cSmrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 66923e72ca8cSmrg [Compiler flag to generate shared objects directly from archives]) 66933e72ca8cSmrg_LT_TAGDECL([], [compiler_needs_object], [1], 66943e72ca8cSmrg [Whether the compiler copes with passing no objects directly]) 66953e72ca8cSmrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 66963e72ca8cSmrg [Create an old-style archive from a shared archive]) 66973e72ca8cSmrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 66983e72ca8cSmrg [Create a temporary old-style archive to link instead of a shared archive]) 66993e72ca8cSmrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 67003e72ca8cSmrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 67013e72ca8cSmrg_LT_TAGDECL([], [module_cmds], [2], 67023e72ca8cSmrg [Commands used to build a loadable module if different from building 67033e72ca8cSmrg a shared archive.]) 67043e72ca8cSmrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 67053e72ca8cSmrg_LT_TAGDECL([], [with_gnu_ld], [1], 67063e72ca8cSmrg [Whether we are building with GNU ld or not]) 67073e72ca8cSmrg_LT_TAGDECL([], [allow_undefined_flag], [1], 67083e72ca8cSmrg [Flag that allows shared libraries with undefined symbols to be built]) 67093e72ca8cSmrg_LT_TAGDECL([], [no_undefined_flag], [1], 67103e72ca8cSmrg [Flag that enforces no undefined symbols]) 67113e72ca8cSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 67123e72ca8cSmrg [Flag to hardcode $libdir into a binary during linking. 67133e72ca8cSmrg This must work even if $libdir does not exist]) 67143e72ca8cSmrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 67153e72ca8cSmrg [Whether we need a single "-rpath" flag with a separated argument]) 67163e72ca8cSmrg_LT_TAGDECL([], [hardcode_direct], [0], 67173e72ca8cSmrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 67183e72ca8cSmrg DIR into the resulting binary]) 67193e72ca8cSmrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 67203e72ca8cSmrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 67213e72ca8cSmrg DIR into the resulting binary and the resulting library dependency is 67223e72ca8cSmrg "absolute", i.e impossible to change by setting ${shlibpath_var} if the 67233e72ca8cSmrg library is relocated]) 67243e72ca8cSmrg_LT_TAGDECL([], [hardcode_minus_L], [0], 67253e72ca8cSmrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 67263e72ca8cSmrg into the resulting binary]) 67273e72ca8cSmrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 67283e72ca8cSmrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 67293e72ca8cSmrg into the resulting binary]) 67303e72ca8cSmrg_LT_TAGDECL([], [hardcode_automatic], [0], 67313e72ca8cSmrg [Set to "yes" if building a shared library automatically hardcodes DIR 67323e72ca8cSmrg into the library and all subsequent libraries and executables linked 67333e72ca8cSmrg against it]) 67343e72ca8cSmrg_LT_TAGDECL([], [inherit_rpath], [0], 67353e72ca8cSmrg [Set to yes if linker adds runtime paths of dependent libraries 67363e72ca8cSmrg to runtime path list]) 67373e72ca8cSmrg_LT_TAGDECL([], [link_all_deplibs], [0], 67383e72ca8cSmrg [Whether libtool must link a program against all its dependency libraries]) 67393e72ca8cSmrg_LT_TAGDECL([], [always_export_symbols], [0], 67403e72ca8cSmrg [Set to "yes" if exported symbols are required]) 67413e72ca8cSmrg_LT_TAGDECL([], [export_symbols_cmds], [2], 67423e72ca8cSmrg [The commands to list exported symbols]) 67433e72ca8cSmrg_LT_TAGDECL([], [exclude_expsyms], [1], 67443e72ca8cSmrg [Symbols that should not be listed in the preloaded symbols]) 67453e72ca8cSmrg_LT_TAGDECL([], [include_expsyms], [1], 67463e72ca8cSmrg [Symbols that must always be exported]) 67473e72ca8cSmrg_LT_TAGDECL([], [prelink_cmds], [2], 67483e72ca8cSmrg [Commands necessary for linking programs (against libraries) with templates]) 67493e72ca8cSmrg_LT_TAGDECL([], [postlink_cmds], [2], 67503e72ca8cSmrg [Commands necessary for finishing linking programs]) 67513e72ca8cSmrg_LT_TAGDECL([], [file_list_spec], [1], 67523e72ca8cSmrg [Specify filename containing input files]) 67533e72ca8cSmrgdnl FIXME: Not yet implemented 67543e72ca8cSmrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 67553e72ca8cSmrgdnl [Compiler flag to generate thread safe objects]) 67563e72ca8cSmrg])# _LT_LINKER_SHLIBS 6757a1ed278cSmrg 6758a1ed278cSmrg 67593e72ca8cSmrg# _LT_LANG_C_CONFIG([TAG]) 67603e72ca8cSmrg# ------------------------ 67613e72ca8cSmrg# Ensure that the configuration variables for a C compiler are suitably 67623e72ca8cSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 67633e72ca8cSmrg# the compiler configuration to `libtool'. 67643e72ca8cSmrgm4_defun([_LT_LANG_C_CONFIG], 67653e72ca8cSmrg[m4_require([_LT_DECL_EGREP])dnl 67663e72ca8cSmrglt_save_CC="$CC" 67673e72ca8cSmrgAC_LANG_PUSH(C) 6768a1ed278cSmrg 67693e72ca8cSmrg# Source file extension for C test sources. 67703e72ca8cSmrgac_ext=c 677134977a2fSmrg 67723e72ca8cSmrg# Object file extension for compiled C test sources. 6773a1ed278cSmrgobjext=o 6774a1ed278cSmrg_LT_TAGVAR(objext, $1)=$objext 677534977a2fSmrg 67763e72ca8cSmrg# Code to be used in simple compile tests 67773e72ca8cSmrglt_simple_compile_test_code="int some_variable = 0;" 677834977a2fSmrg 67793e72ca8cSmrg# Code to be used in simple link tests 67803e72ca8cSmrglt_simple_link_test_code='int main(){return(0);}' 6781ee3138f1Smrg 67823e72ca8cSmrg_LT_TAG_COMPILER 67833e72ca8cSmrg# Save the default compiler, since it gets overwritten when the other 67843e72ca8cSmrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 67853e72ca8cSmrgcompiler_DEFAULT=$CC 6786ee3138f1Smrg 67873e72ca8cSmrg# save warnings/boilerplate of simple test code 67883e72ca8cSmrg_LT_COMPILER_BOILERPLATE 67893e72ca8cSmrg_LT_LINKER_BOILERPLATE 6790a1ed278cSmrg 67913e72ca8cSmrgif test -n "$compiler"; then 67923e72ca8cSmrg _LT_COMPILER_NO_RTTI($1) 67933e72ca8cSmrg _LT_COMPILER_PIC($1) 67943e72ca8cSmrg _LT_COMPILER_C_O($1) 67953e72ca8cSmrg _LT_COMPILER_FILE_LOCKS($1) 67963e72ca8cSmrg _LT_LINKER_SHLIBS($1) 67973e72ca8cSmrg _LT_SYS_DYNAMIC_LINKER($1) 67983e72ca8cSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 67993e72ca8cSmrg LT_SYS_DLOPEN_SELF 68003e72ca8cSmrg _LT_CMD_STRIPLIB 6801ee3138f1Smrg 68023e72ca8cSmrg # Report which library types will actually be built 68033e72ca8cSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 68043e72ca8cSmrg AC_MSG_RESULT([$can_build_shared]) 6805ee3138f1Smrg 68063e72ca8cSmrg AC_MSG_CHECKING([whether to build shared libraries]) 68073e72ca8cSmrg test "$can_build_shared" = "no" && enable_shared=no 6808ee3138f1Smrg 68093e72ca8cSmrg # On AIX, shared libraries and static libraries use the same namespace, and 68103e72ca8cSmrg # are all built from PIC. 68113e72ca8cSmrg case $host_os in 68123e72ca8cSmrg aix3*) 68133e72ca8cSmrg test "$enable_shared" = yes && enable_static=no 68143e72ca8cSmrg if test -n "$RANLIB"; then 68153e72ca8cSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 68163e72ca8cSmrg postinstall_cmds='$RANLIB $lib' 68173e72ca8cSmrg fi 68183e72ca8cSmrg ;; 6819ee3138f1Smrg 68203e72ca8cSmrg aix[[4-9]]*) 68213e72ca8cSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 68223e72ca8cSmrg test "$enable_shared" = yes && enable_static=no 68233e72ca8cSmrg fi 68243e72ca8cSmrg ;; 68253e72ca8cSmrg esac 68263e72ca8cSmrg AC_MSG_RESULT([$enable_shared]) 6827ee3138f1Smrg 68283e72ca8cSmrg AC_MSG_CHECKING([whether to build static libraries]) 68293e72ca8cSmrg # Make sure either enable_shared or enable_static is yes. 68303e72ca8cSmrg test "$enable_shared" = yes || enable_static=yes 68313e72ca8cSmrg AC_MSG_RESULT([$enable_static]) 6832a1ed278cSmrg 68333e72ca8cSmrg _LT_CONFIG($1) 68343e72ca8cSmrgfi 6835a1ed278cSmrgAC_LANG_POP 68363e72ca8cSmrgCC="$lt_save_CC" 68373e72ca8cSmrg])# _LT_LANG_C_CONFIG 6838a1ed278cSmrg 6839a1ed278cSmrg 68403e72ca8cSmrg# _LT_LANG_CXX_CONFIG([TAG]) 68413e72ca8cSmrg# -------------------------- 68423e72ca8cSmrg# Ensure that the configuration variables for a C++ compiler are suitably 68433e72ca8cSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 68443e72ca8cSmrg# the compiler configuration to `libtool'. 68453e72ca8cSmrgm4_defun([_LT_LANG_CXX_CONFIG], 68463e72ca8cSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 68473e72ca8cSmrgm4_require([_LT_DECL_EGREP])dnl 68483e72ca8cSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 68493e72ca8cSmrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 68503e72ca8cSmrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 68513e72ca8cSmrg (test "X$CXX" != "Xg++"))) ; then 68523e72ca8cSmrg AC_PROG_CXXCPP 68533e72ca8cSmrgelse 68543e72ca8cSmrg _lt_caught_CXX_error=yes 6855a1ed278cSmrgfi 6856a1ed278cSmrg 68573e72ca8cSmrgAC_LANG_PUSH(C++) 6858a1ed278cSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6859a1ed278cSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 6860a1ed278cSmrg_LT_TAGVAR(always_export_symbols, $1)=no 6861a1ed278cSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 68623e72ca8cSmrg_LT_TAGVAR(compiler_needs_object, $1)=no 6863a1ed278cSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 6864a1ed278cSmrg_LT_TAGVAR(hardcode_direct, $1)=no 6865a1ed278cSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 6866a1ed278cSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6867a1ed278cSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 6868a1ed278cSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 68693e72ca8cSmrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 6870a1ed278cSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 6871a1ed278cSmrg_LT_TAGVAR(inherit_rpath, $1)=no 6872a1ed278cSmrg_LT_TAGVAR(module_cmds, $1)= 6873a1ed278cSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 6874a1ed278cSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 6875a1ed278cSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 6876a1ed278cSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 6877a1ed278cSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 6878a1ed278cSmrg_LT_TAGVAR(no_undefined_flag, $1)= 6879a1ed278cSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 6880a1ed278cSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6881ee3138f1Smrg 68823e72ca8cSmrg# Source file extension for C++ test sources. 68833e72ca8cSmrgac_ext=cpp 688434977a2fSmrg 68853e72ca8cSmrg# Object file extension for compiled C++ test sources. 6886a1ed278cSmrgobjext=o 6887a1ed278cSmrg_LT_TAGVAR(objext, $1)=$objext 688834977a2fSmrg 6889a1ed278cSmrg# No sense in running all these tests if we already determined that 68903e72ca8cSmrg# the CXX compiler isn't working. Some variables (like enable_shared) 6891a1ed278cSmrg# are currently assumed to apply to all compilers on this platform, 6892a1ed278cSmrg# and will be corrupted by setting them based on a non-working compiler. 68933e72ca8cSmrgif test "$_lt_caught_CXX_error" != yes; then 6894a1ed278cSmrg # Code to be used in simple compile tests 68953e72ca8cSmrg lt_simple_compile_test_code="int some_variable = 0;" 689634977a2fSmrg 6897a1ed278cSmrg # Code to be used in simple link tests 68983e72ca8cSmrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 689934977a2fSmrg 6900a1ed278cSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 6901a1ed278cSmrg _LT_TAG_COMPILER 690234977a2fSmrg 6903a1ed278cSmrg # save warnings/boilerplate of simple test code 6904a1ed278cSmrg _LT_COMPILER_BOILERPLATE 6905a1ed278cSmrg _LT_LINKER_BOILERPLATE 690634977a2fSmrg 6907a1ed278cSmrg # Allow CC to be a program name with arguments. 69083e72ca8cSmrg lt_save_CC=$CC 69093e72ca8cSmrg lt_save_CFLAGS=$CFLAGS 69103e72ca8cSmrg lt_save_LD=$LD 6911a1ed278cSmrg lt_save_GCC=$GCC 69123e72ca8cSmrg GCC=$GXX 69133e72ca8cSmrg lt_save_with_gnu_ld=$with_gnu_ld 69143e72ca8cSmrg lt_save_path_LD=$lt_cv_path_LD 69153e72ca8cSmrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 69163e72ca8cSmrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 69173e72ca8cSmrg else 69183e72ca8cSmrg $as_unset lt_cv_prog_gnu_ld 69193e72ca8cSmrg fi 69203e72ca8cSmrg if test -n "${lt_cv_path_LDCXX+set}"; then 69213e72ca8cSmrg lt_cv_path_LD=$lt_cv_path_LDCXX 69223e72ca8cSmrg else 69233e72ca8cSmrg $as_unset lt_cv_path_LD 69243e72ca8cSmrg fi 69253e72ca8cSmrg test -z "${LDCXX+set}" || LD=$LDCXX 69263e72ca8cSmrg CC=${CXX-"c++"} 69273e72ca8cSmrg CFLAGS=$CXXFLAGS 6928a1ed278cSmrg compiler=$CC 6929a1ed278cSmrg _LT_TAGVAR(compiler, $1)=$CC 6930a1ed278cSmrg _LT_CC_BASENAME([$compiler]) 6931b425557eSmrg 6932a1ed278cSmrg if test -n "$compiler"; then 69333e72ca8cSmrg # We don't want -fno-exception when compiling C++ code, so set the 69343e72ca8cSmrg # no_builtin_flag separately 69353e72ca8cSmrg if test "$GXX" = yes; then 69363e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 69373e72ca8cSmrg else 69383e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 69393e72ca8cSmrg fi 69403e72ca8cSmrg 69413e72ca8cSmrg if test "$GXX" = yes; then 69423e72ca8cSmrg # Set up default GNU C++ configuration 69433e72ca8cSmrg 69443e72ca8cSmrg LT_PATH_LD 69453e72ca8cSmrg 69463e72ca8cSmrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 69473e72ca8cSmrg # archiving commands below assume that GNU ld is being used. 69483e72ca8cSmrg if test "$with_gnu_ld" = yes; then 69493e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 69503e72ca8cSmrg _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' 69513e72ca8cSmrg 69523e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 69533e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 69543e72ca8cSmrg 69553e72ca8cSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 69563e72ca8cSmrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 69573e72ca8cSmrg # investigate it a little bit more. (MM) 69583e72ca8cSmrg wlarc='${wl}' 69593e72ca8cSmrg 69603e72ca8cSmrg # ancient GNU ld didn't support --whole-archive et. al. 69613e72ca8cSmrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 69623e72ca8cSmrg $GREP 'no-whole-archive' > /dev/null; then 69633e72ca8cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 69643e72ca8cSmrg else 69653e72ca8cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 69663e72ca8cSmrg fi 69673e72ca8cSmrg else 69683e72ca8cSmrg with_gnu_ld=no 69693e72ca8cSmrg wlarc= 69703e72ca8cSmrg 69713e72ca8cSmrg # A generic and very simple default shared library creation 69723e72ca8cSmrg # command for GNU C++ for the case where it uses the native 69733e72ca8cSmrg # linker, instead of GNU ld. If possible, this setting should 69743e72ca8cSmrg # overridden to take advantage of the native linker features on 69753e72ca8cSmrg # the platform it is being used on. 69763e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 69773e72ca8cSmrg fi 69783e72ca8cSmrg 69793e72ca8cSmrg # Commands to make compiler produce verbose output that lists 69803e72ca8cSmrg # what "hidden" libraries, object files and flags are used when 69813e72ca8cSmrg # linking a shared library. 69823e72ca8cSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6983a1ed278cSmrg 69843e72ca8cSmrg else 69853e72ca8cSmrg GXX=no 69863e72ca8cSmrg with_gnu_ld=no 69873e72ca8cSmrg wlarc= 69883e72ca8cSmrg fi 6989a1ed278cSmrg 69903e72ca8cSmrg # PORTME: fill in a description of your system's C++ link characteristics 69913e72ca8cSmrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 69923e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 6993a1ed278cSmrg case $host_os in 6994a1ed278cSmrg aix3*) 69953e72ca8cSmrg # FIXME: insert proper C++ library support 69963e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6997a1ed278cSmrg ;; 6998a1ed278cSmrg aix[[4-9]]*) 69993e72ca8cSmrg if test "$host_cpu" = ia64; then 70003e72ca8cSmrg # On IA64, the linker does run time linking by default, so we don't 70013e72ca8cSmrg # have to do anything special. 70023e72ca8cSmrg aix_use_runtimelinking=no 70033e72ca8cSmrg exp_sym_flag='-Bexport' 70043e72ca8cSmrg no_entry_flag="" 70053e72ca8cSmrg else 70063e72ca8cSmrg aix_use_runtimelinking=no 700734977a2fSmrg 70083e72ca8cSmrg # Test if we are trying to use run time linking or normal 70093e72ca8cSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 70103e72ca8cSmrg # need to do runtime linking. 70113e72ca8cSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 70123e72ca8cSmrg for ld_flag in $LDFLAGS; do 70133e72ca8cSmrg case $ld_flag in 70143e72ca8cSmrg *-brtl*) 70153e72ca8cSmrg aix_use_runtimelinking=yes 70163e72ca8cSmrg break 70173e72ca8cSmrg ;; 70183e72ca8cSmrg esac 70193e72ca8cSmrg done 70203e72ca8cSmrg ;; 70213e72ca8cSmrg esac 7022ee3138f1Smrg 70233e72ca8cSmrg exp_sym_flag='-bexport' 70243e72ca8cSmrg no_entry_flag='-bnoentry' 70253e72ca8cSmrg fi 7026ee3138f1Smrg 70273e72ca8cSmrg # When large executables or shared objects are built, AIX ld can 70283e72ca8cSmrg # have problems creating the table of contents. If linking a library 70293e72ca8cSmrg # or program results in "error TOC overflow" add -mminimal-toc to 70303e72ca8cSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 70313e72ca8cSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 7032a1ed278cSmrg 70333e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='' 70343e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 70353e72ca8cSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 70363e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 70373e72ca8cSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 70383e72ca8cSmrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 7039a1ed278cSmrg 70403e72ca8cSmrg if test "$GXX" = yes; then 70413e72ca8cSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 70423e72ca8cSmrg # We only want to do this on AIX 4.2 and lower, the check 70433e72ca8cSmrg # below for broken collect2 doesn't work under 4.3+ 70443e72ca8cSmrg collect2name=`${CC} -print-prog-name=collect2` 70453e72ca8cSmrg if test -f "$collect2name" && 70463e72ca8cSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 70473e72ca8cSmrg then 70483e72ca8cSmrg # We have reworked collect2 70493e72ca8cSmrg : 70503e72ca8cSmrg else 70513e72ca8cSmrg # We have old collect2 70523e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 70533e72ca8cSmrg # It fails to find uninstalled libraries when the uninstalled 70543e72ca8cSmrg # path is not listed in the libpath. Setting hardcode_minus_L 70553e72ca8cSmrg # to unsupported forces relinking 70563e72ca8cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 70573e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 70583e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 70593e72ca8cSmrg fi 70603e72ca8cSmrg esac 70613e72ca8cSmrg shared_flag='-shared' 70623e72ca8cSmrg if test "$aix_use_runtimelinking" = yes; then 70633e72ca8cSmrg shared_flag="$shared_flag "'${wl}-G' 70643e72ca8cSmrg fi 70653e72ca8cSmrg else 70663e72ca8cSmrg # not using gcc 70673e72ca8cSmrg if test "$host_cpu" = ia64; then 70683e72ca8cSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 70693e72ca8cSmrg # chokes on -Wl,-G. The following line is correct: 70703e72ca8cSmrg shared_flag='-G' 70713e72ca8cSmrg else 70723e72ca8cSmrg if test "$aix_use_runtimelinking" = yes; then 70733e72ca8cSmrg shared_flag='${wl}-G' 70743e72ca8cSmrg else 70753e72ca8cSmrg shared_flag='${wl}-bM:SRE' 70763e72ca8cSmrg fi 70773e72ca8cSmrg fi 70783e72ca8cSmrg fi 7079ee3138f1Smrg 70803e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 70813e72ca8cSmrg # It seems that -bexpall does not export symbols beginning with 70823e72ca8cSmrg # underscore (_), so it is better to generate a list of symbols to 70833e72ca8cSmrg # export. 70843e72ca8cSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 70853e72ca8cSmrg if test "$aix_use_runtimelinking" = yes; then 70863e72ca8cSmrg # Warning - without using the other runtime loading flags (-brtl), 70873e72ca8cSmrg # -berok will link without error, but may produce a broken library. 70883e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 70893e72ca8cSmrg # Determine the default libpath from the value encoded in an empty 70903e72ca8cSmrg # executable. 70913e72ca8cSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 70923e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 7093ee3138f1Smrg 70943e72ca8cSmrg _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" 70953e72ca8cSmrg else 70963e72ca8cSmrg if test "$host_cpu" = ia64; then 70973e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 70983e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 70993e72ca8cSmrg _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" 71003e72ca8cSmrg else 71013e72ca8cSmrg # Determine the default libpath from the value encoded in an 71023e72ca8cSmrg # empty executable. 71033e72ca8cSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 71043e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 71053e72ca8cSmrg # Warning - without using the other run time loading flags, 71063e72ca8cSmrg # -berok will link without error, but may produce a broken library. 71073e72ca8cSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 71083e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 71093e72ca8cSmrg if test "$with_gnu_ld" = yes; then 71103e72ca8cSmrg # We only use this code for GNU lds that support --whole-archive. 71113e72ca8cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 71123e72ca8cSmrg else 71133e72ca8cSmrg # Exported symbols can be pulled into shared objects from archives 71143e72ca8cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 71153e72ca8cSmrg fi 71163e72ca8cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 71173e72ca8cSmrg # This is similar to how AIX traditionally builds its shared 71183e72ca8cSmrg # libraries. 71193e72ca8cSmrg _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' 71203e72ca8cSmrg fi 71213e72ca8cSmrg fi 71223e72ca8cSmrg ;; 7123a1ed278cSmrg 71243e72ca8cSmrg beos*) 71253e72ca8cSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 71263e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 71273e72ca8cSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 71283e72ca8cSmrg # support --undefined. This deserves some investigation. FIXME 71293e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 71303e72ca8cSmrg else 71313e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 71323e72ca8cSmrg fi 71333e72ca8cSmrg ;; 7134a1ed278cSmrg 71353e72ca8cSmrg chorus*) 71363e72ca8cSmrg case $cc_basename in 71373e72ca8cSmrg *) 71383e72ca8cSmrg # FIXME: insert proper C++ library support 71393e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 71403e72ca8cSmrg ;; 71413e72ca8cSmrg esac 71423e72ca8cSmrg ;; 7143a1ed278cSmrg 71443e72ca8cSmrg cygwin* | mingw* | pw32* | cegcc*) 71453e72ca8cSmrg case $GXX,$cc_basename in 71463e72ca8cSmrg ,cl* | no,cl*) 71473e72ca8cSmrg # Native MSVC 71483e72ca8cSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 71493e72ca8cSmrg # no search path for DLLs. 71503e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 71513e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 71523e72ca8cSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 71533e72ca8cSmrg _LT_TAGVAR(file_list_spec, $1)='@' 71543e72ca8cSmrg # Tell ltmain to make .lib files, not .a files. 71553e72ca8cSmrg libext=lib 71563e72ca8cSmrg # Tell ltmain to make .dll files, not .so files. 71573e72ca8cSmrg shrext_cmds=".dll" 71583e72ca8cSmrg # FIXME: Setting linknames here is a bad hack. 71593e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 71603e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 71613e72ca8cSmrg $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 71623e72ca8cSmrg else 71633e72ca8cSmrg $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 71643e72ca8cSmrg fi~ 71653e72ca8cSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 71663e72ca8cSmrg linknames=' 71673e72ca8cSmrg # The linker will not automatically build a static lib if we build a DLL. 71683e72ca8cSmrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 71693e72ca8cSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 71703e72ca8cSmrg # Don't use ranlib 71713e72ca8cSmrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 71723e72ca8cSmrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 71733e72ca8cSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 71743e72ca8cSmrg case $lt_outputfile in 71753e72ca8cSmrg *.exe|*.EXE) ;; 71763e72ca8cSmrg *) 71773e72ca8cSmrg lt_outputfile="$lt_outputfile.exe" 71783e72ca8cSmrg lt_tool_outputfile="$lt_tool_outputfile.exe" 71793e72ca8cSmrg ;; 71803e72ca8cSmrg esac~ 71813e72ca8cSmrg func_to_tool_file "$lt_outputfile"~ 71823e72ca8cSmrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 71833e72ca8cSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 71843e72ca8cSmrg $RM "$lt_outputfile.manifest"; 71853e72ca8cSmrg fi' 71863e72ca8cSmrg ;; 71873e72ca8cSmrg *) 71883e72ca8cSmrg # g++ 71893e72ca8cSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 71903e72ca8cSmrg # as there is no search path for DLLs. 71913e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 71923e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 71933e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 71943e72ca8cSmrg _LT_TAGVAR(always_export_symbols, $1)=no 71953e72ca8cSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 71963e72ca8cSmrg 71973e72ca8cSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 71983e72ca8cSmrg _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' 71993e72ca8cSmrg # If the export-symbols file already is a .def file (1st line 72003e72ca8cSmrg # is EXPORTS), use it as is; otherwise, prepend... 72013e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 72023e72ca8cSmrg cp $export_symbols $output_objdir/$soname.def; 72033e72ca8cSmrg else 72043e72ca8cSmrg echo EXPORTS > $output_objdir/$soname.def; 72053e72ca8cSmrg cat $export_symbols >> $output_objdir/$soname.def; 72063e72ca8cSmrg fi~ 72073e72ca8cSmrg $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' 72083e72ca8cSmrg else 72093e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 72103e72ca8cSmrg fi 72113e72ca8cSmrg ;; 72123e72ca8cSmrg esac 72133e72ca8cSmrg ;; 72143e72ca8cSmrg darwin* | rhapsody*) 72153e72ca8cSmrg _LT_DARWIN_LINKER_FEATURES($1) 72163e72ca8cSmrg ;; 7217ee3138f1Smrg 72183e72ca8cSmrg dgux*) 72193e72ca8cSmrg case $cc_basename in 72203e72ca8cSmrg ec++*) 72213e72ca8cSmrg # FIXME: insert proper C++ library support 72223e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 72233e72ca8cSmrg ;; 72243e72ca8cSmrg ghcx*) 72253e72ca8cSmrg # Green Hills C++ Compiler 72263e72ca8cSmrg # FIXME: insert proper C++ library support 72273e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 72283e72ca8cSmrg ;; 72293e72ca8cSmrg *) 72303e72ca8cSmrg # FIXME: insert proper C++ library support 72313e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 72323e72ca8cSmrg ;; 72333e72ca8cSmrg esac 72343e72ca8cSmrg ;; 7235ee3138f1Smrg 72363e72ca8cSmrg freebsd2.*) 72373e72ca8cSmrg # C++ shared libraries reported to be fairly broken before 72383e72ca8cSmrg # switch to ELF 72393e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 72403e72ca8cSmrg ;; 72413e72ca8cSmrg 72423e72ca8cSmrg freebsd-elf*) 72433e72ca8cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 72443e72ca8cSmrg ;; 72453e72ca8cSmrg 72463e72ca8cSmrg freebsd* | dragonfly*) 72473e72ca8cSmrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 72483e72ca8cSmrg # conventions 72493e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 72503e72ca8cSmrg ;; 72513e72ca8cSmrg 72523e72ca8cSmrg gnu*) 72533e72ca8cSmrg ;; 72543e72ca8cSmrg 72553e72ca8cSmrg haiku*) 72563e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 72573e72ca8cSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 72583e72ca8cSmrg ;; 7259ee3138f1Smrg 72603e72ca8cSmrg hpux9*) 72613e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 72623e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 72633e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 72643e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 72653e72ca8cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 72663e72ca8cSmrg # but as the default 72673e72ca8cSmrg # location of the library. 7268ee3138f1Smrg 72693e72ca8cSmrg case $cc_basename in 72703e72ca8cSmrg CC*) 72713e72ca8cSmrg # FIXME: insert proper C++ library support 72723e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 72733e72ca8cSmrg ;; 72743e72ca8cSmrg aCC*) 72753e72ca8cSmrg _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' 72763e72ca8cSmrg # Commands to make compiler produce verbose output that lists 72773e72ca8cSmrg # what "hidden" libraries, object files and flags are used when 72783e72ca8cSmrg # linking a shared library. 72793e72ca8cSmrg # 72803e72ca8cSmrg # There doesn't appear to be a way to prevent this compiler from 72813e72ca8cSmrg # explicitly linking system object files so we need to strip them 72823e72ca8cSmrg # from the output so that they don't get included in the library 72833e72ca8cSmrg # dependencies. 72843e72ca8cSmrg 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"' 72853e72ca8cSmrg ;; 72863e72ca8cSmrg *) 72873e72ca8cSmrg if test "$GXX" = yes; then 72883e72ca8cSmrg _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' 72893e72ca8cSmrg else 72903e72ca8cSmrg # FIXME: insert proper C++ library support 72913e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 72923e72ca8cSmrg fi 72933e72ca8cSmrg ;; 72943e72ca8cSmrg esac 72953e72ca8cSmrg ;; 7296ee3138f1Smrg 72973e72ca8cSmrg hpux10*|hpux11*) 72983e72ca8cSmrg if test $with_gnu_ld = no; then 72993e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 73003e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7301a1ed278cSmrg 73023e72ca8cSmrg case $host_cpu in 73033e72ca8cSmrg hppa*64*|ia64*) 73043e72ca8cSmrg ;; 73053e72ca8cSmrg *) 73063e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 73073e72ca8cSmrg ;; 73083e72ca8cSmrg esac 73093e72ca8cSmrg fi 73103e72ca8cSmrg case $host_cpu in 73113e72ca8cSmrg hppa*64*|ia64*) 73123e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=no 73133e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 73143e72ca8cSmrg ;; 73153e72ca8cSmrg *) 73163e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 73173e72ca8cSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 73183e72ca8cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 73193e72ca8cSmrg # but as the default 73203e72ca8cSmrg # location of the library. 73213e72ca8cSmrg ;; 73223e72ca8cSmrg esac 7323a1ed278cSmrg 73243e72ca8cSmrg case $cc_basename in 73253e72ca8cSmrg CC*) 73263e72ca8cSmrg # FIXME: insert proper C++ library support 73273e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 73283e72ca8cSmrg ;; 73293e72ca8cSmrg aCC*) 73303e72ca8cSmrg case $host_cpu in 73313e72ca8cSmrg hppa*64*) 73323e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 73333e72ca8cSmrg ;; 73343e72ca8cSmrg ia64*) 73353e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 73363e72ca8cSmrg ;; 73373e72ca8cSmrg *) 73383e72ca8cSmrg _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' 73393e72ca8cSmrg ;; 73403e72ca8cSmrg esac 73413e72ca8cSmrg # Commands to make compiler produce verbose output that lists 73423e72ca8cSmrg # what "hidden" libraries, object files and flags are used when 73433e72ca8cSmrg # linking a shared library. 73443e72ca8cSmrg # 73453e72ca8cSmrg # There doesn't appear to be a way to prevent this compiler from 73463e72ca8cSmrg # explicitly linking system object files so we need to strip them 73473e72ca8cSmrg # from the output so that they don't get included in the library 73483e72ca8cSmrg # dependencies. 73493e72ca8cSmrg 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"' 73503e72ca8cSmrg ;; 73513e72ca8cSmrg *) 73523e72ca8cSmrg if test "$GXX" = yes; then 73533e72ca8cSmrg if test $with_gnu_ld = no; then 73543e72ca8cSmrg case $host_cpu in 73553e72ca8cSmrg hppa*64*) 73563e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 73573e72ca8cSmrg ;; 73583e72ca8cSmrg ia64*) 73593e72ca8cSmrg _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' 73603e72ca8cSmrg ;; 73613e72ca8cSmrg *) 73623e72ca8cSmrg _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' 73633e72ca8cSmrg ;; 73643e72ca8cSmrg esac 73653e72ca8cSmrg fi 73663e72ca8cSmrg else 73673e72ca8cSmrg # FIXME: insert proper C++ library support 73683e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 73693e72ca8cSmrg fi 73703e72ca8cSmrg ;; 73713e72ca8cSmrg esac 73723e72ca8cSmrg ;; 7373a1ed278cSmrg 73743e72ca8cSmrg interix[[3-9]]*) 73753e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=no 73763e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 73773e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 73783e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 73793e72ca8cSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 73803e72ca8cSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 73813e72ca8cSmrg # default) and relocated if they conflict, which is a slow very memory 73823e72ca8cSmrg # consuming and fragmenting process. To avoid this, we pick a random, 73833e72ca8cSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 73843e72ca8cSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 73853e72ca8cSmrg _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' 73863e72ca8cSmrg _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' 73873e72ca8cSmrg ;; 73883e72ca8cSmrg irix5* | irix6*) 73893e72ca8cSmrg case $cc_basename in 73903e72ca8cSmrg CC*) 73913e72ca8cSmrg # SGI C++ 73923e72ca8cSmrg _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' 7393ee3138f1Smrg 73943e72ca8cSmrg # Archives containing C++ object files must be created using 73953e72ca8cSmrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 73963e72ca8cSmrg # necessary to make sure instantiated templates are included 73973e72ca8cSmrg # in the archive. 73983e72ca8cSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 73993e72ca8cSmrg ;; 74003e72ca8cSmrg *) 74013e72ca8cSmrg if test "$GXX" = yes; then 74023e72ca8cSmrg if test "$with_gnu_ld" = no; then 74033e72ca8cSmrg _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' 74043e72ca8cSmrg else 74053e72ca8cSmrg _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' 74063e72ca8cSmrg fi 74073e72ca8cSmrg fi 74083e72ca8cSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 74093e72ca8cSmrg ;; 74103e72ca8cSmrg esac 74113e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 74123e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 74133e72ca8cSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 74143e72ca8cSmrg ;; 741534977a2fSmrg 74163e72ca8cSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 74173e72ca8cSmrg case $cc_basename in 74183e72ca8cSmrg KCC*) 74193e72ca8cSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 742034977a2fSmrg 74213e72ca8cSmrg # KCC will only create a shared library if the output file 74223e72ca8cSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 74233e72ca8cSmrg # to its proper name (with version) after linking. 74243e72ca8cSmrg _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' 74253e72ca8cSmrg _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' 74263e72ca8cSmrg # Commands to make compiler produce verbose output that lists 74273e72ca8cSmrg # what "hidden" libraries, object files and flags are used when 74283e72ca8cSmrg # linking a shared library. 74293e72ca8cSmrg # 74303e72ca8cSmrg # There doesn't appear to be a way to prevent this compiler from 74313e72ca8cSmrg # explicitly linking system object files so we need to strip them 74323e72ca8cSmrg # from the output so that they don't get included in the library 74333e72ca8cSmrg # dependencies. 74343e72ca8cSmrg 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"' 743534977a2fSmrg 74363e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 74373e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7438a1ed278cSmrg 74393e72ca8cSmrg # Archives containing C++ object files must be created using 74403e72ca8cSmrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 74413e72ca8cSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 74423e72ca8cSmrg ;; 74433e72ca8cSmrg icpc* | ecpc* ) 74443e72ca8cSmrg # Intel C++ 74453e72ca8cSmrg with_gnu_ld=yes 74463e72ca8cSmrg # version 8.0 and above of icpc choke on multiply defined symbols 74473e72ca8cSmrg # if we add $predep_objects and $postdep_objects, however 7.1 and 74483e72ca8cSmrg # earlier do not add the objects themselves. 74493e72ca8cSmrg case `$CC -V 2>&1` in 74503e72ca8cSmrg *"Version 7."*) 74513e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 74523e72ca8cSmrg _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' 74533e72ca8cSmrg ;; 74543e72ca8cSmrg *) # Version 8.0 or newer 74553e72ca8cSmrg tmp_idyn= 74563e72ca8cSmrg case $host_cpu in 74573e72ca8cSmrg ia64*) tmp_idyn=' -i_dynamic';; 74583e72ca8cSmrg esac 74593e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 74603e72ca8cSmrg _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' 74613e72ca8cSmrg ;; 74623e72ca8cSmrg esac 74633e72ca8cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 74643e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 74653e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 74663e72ca8cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 74673e72ca8cSmrg ;; 74683e72ca8cSmrg pgCC* | pgcpp*) 74693e72ca8cSmrg # Portland Group C++ compiler 74703e72ca8cSmrg case `$CC -V` in 74713e72ca8cSmrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 74723e72ca8cSmrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 74733e72ca8cSmrg rm -rf $tpldir~ 74743e72ca8cSmrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 74753e72ca8cSmrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 74763e72ca8cSmrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 74773e72ca8cSmrg rm -rf $tpldir~ 74783e72ca8cSmrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 74793e72ca8cSmrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 74803e72ca8cSmrg $RANLIB $oldlib' 74813e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 74823e72ca8cSmrg rm -rf $tpldir~ 74833e72ca8cSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 74843e72ca8cSmrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 74853e72ca8cSmrg _LT_TAGVAR(archive_expsym_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 ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' 74893e72ca8cSmrg ;; 74903e72ca8cSmrg *) # Version 6 and above use weak symbols 74913e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 74923e72ca8cSmrg _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' 74933e72ca8cSmrg ;; 74943e72ca8cSmrg esac 7495a1ed278cSmrg 74963e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 74973e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 74983e72ca8cSmrg _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' 74993e72ca8cSmrg ;; 75003e72ca8cSmrg cxx*) 75013e72ca8cSmrg # Compaq C++ 75023e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 75033e72ca8cSmrg _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' 7504a1ed278cSmrg 75053e72ca8cSmrg runpath_var=LD_RUN_PATH 75063e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 75073e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7508a1ed278cSmrg 75093e72ca8cSmrg # Commands to make compiler produce verbose output that lists 75103e72ca8cSmrg # what "hidden" libraries, object files and flags are used when 75113e72ca8cSmrg # linking a shared library. 75123e72ca8cSmrg # 75133e72ca8cSmrg # There doesn't appear to be a way to prevent this compiler from 75143e72ca8cSmrg # explicitly linking system object files so we need to strip them 75153e72ca8cSmrg # from the output so that they don't get included in the library 75163e72ca8cSmrg # dependencies. 75173e72ca8cSmrg 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' 75183e72ca8cSmrg ;; 75193e72ca8cSmrg xl* | mpixl* | bgxl*) 75203e72ca8cSmrg # IBM XL 8.0 on PPC, with GNU ld 75213e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 75223e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 75233e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 75243e72ca8cSmrg if test "x$supports_anon_versioning" = xyes; then 75253e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 75263e72ca8cSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 75273e72ca8cSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 75283e72ca8cSmrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 75293e72ca8cSmrg fi 75303e72ca8cSmrg ;; 75313e72ca8cSmrg *) 75323e72ca8cSmrg case `$CC -V 2>&1 | sed 5q` in 75333e72ca8cSmrg *Sun\ C*) 75343e72ca8cSmrg # Sun C++ 5.9 75353e72ca8cSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 75363e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 75373e72ca8cSmrg _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' 75383e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 75393e72ca8cSmrg _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' 75403e72ca8cSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 7541a1ed278cSmrg 75423e72ca8cSmrg # Not sure whether something based on 75433e72ca8cSmrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 75443e72ca8cSmrg # would be better. 75453e72ca8cSmrg output_verbose_link_cmd='func_echo_all' 7546a1ed278cSmrg 75473e72ca8cSmrg # Archives containing C++ object files must be created using 75483e72ca8cSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 75493e72ca8cSmrg # necessary to make sure instantiated templates are included 75503e72ca8cSmrg # in the archive. 75513e72ca8cSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 75523e72ca8cSmrg ;; 75533e72ca8cSmrg esac 75543e72ca8cSmrg ;; 75553e72ca8cSmrg esac 75563e72ca8cSmrg ;; 7557a1ed278cSmrg 75583e72ca8cSmrg lynxos*) 75593e72ca8cSmrg # FIXME: insert proper C++ library support 75603e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 75613e72ca8cSmrg ;; 7562a1ed278cSmrg 75633e72ca8cSmrg m88k*) 75643e72ca8cSmrg # FIXME: insert proper C++ library support 75653e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 75663e72ca8cSmrg ;; 7567a1ed278cSmrg 75683e72ca8cSmrg mvs*) 75693e72ca8cSmrg case $cc_basename in 75703e72ca8cSmrg cxx*) 75713e72ca8cSmrg # FIXME: insert proper C++ library support 75723e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 75733e72ca8cSmrg ;; 75743e72ca8cSmrg *) 75753e72ca8cSmrg # FIXME: insert proper C++ library support 75763e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 75773e72ca8cSmrg ;; 75783e72ca8cSmrg esac 75793e72ca8cSmrg ;; 7580a1ed278cSmrg 75813e72ca8cSmrg netbsd*) 75823e72ca8cSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 75833e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 75843e72ca8cSmrg wlarc= 75853e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 75863e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 75873e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 75883e72ca8cSmrg fi 75893e72ca8cSmrg # Workaround some broken pre-1.5 toolchains 75903e72ca8cSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 75913e72ca8cSmrg ;; 7592a1ed278cSmrg 75933e72ca8cSmrg *nto* | *qnx*) 75943e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 75953e72ca8cSmrg ;; 7596a1ed278cSmrg 75973e72ca8cSmrg openbsd2*) 75983e72ca8cSmrg # C++ shared libraries are fairly broken 75993e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 76003e72ca8cSmrg ;; 7601a1ed278cSmrg 76023e72ca8cSmrg openbsd*) 76033e72ca8cSmrg if test -f /usr/libexec/ld.so; then 76043e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 76053e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 76063e72ca8cSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 76073e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 76083e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 76093e72ca8cSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 76103e72ca8cSmrg _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' 76113e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 76123e72ca8cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 76133e72ca8cSmrg fi 76143e72ca8cSmrg output_verbose_link_cmd=func_echo_all 76153e72ca8cSmrg else 76163e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 76173e72ca8cSmrg fi 76183e72ca8cSmrg ;; 7619a1ed278cSmrg 76203e72ca8cSmrg osf3* | osf4* | osf5*) 76213e72ca8cSmrg case $cc_basename in 76223e72ca8cSmrg KCC*) 76233e72ca8cSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 7624a1ed278cSmrg 76253e72ca8cSmrg # KCC will only create a shared library if the output file 76263e72ca8cSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 76273e72ca8cSmrg # to its proper name (with version) after linking. 76283e72ca8cSmrg _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' 7629a1ed278cSmrg 76303e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 76313e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7632a1ed278cSmrg 76333e72ca8cSmrg # Archives containing C++ object files must be created using 76343e72ca8cSmrg # the KAI C++ compiler. 76353e72ca8cSmrg case $host in 76363e72ca8cSmrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 76373e72ca8cSmrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 76383e72ca8cSmrg esac 76393e72ca8cSmrg ;; 76403e72ca8cSmrg RCC*) 76413e72ca8cSmrg # Rational C++ 2.4.1 76423e72ca8cSmrg # FIXME: insert proper C++ library support 76433e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 76443e72ca8cSmrg ;; 76453e72ca8cSmrg cxx*) 76463e72ca8cSmrg case $host in 76473e72ca8cSmrg osf3*) 76483e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 76493e72ca8cSmrg _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' 76503e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 76513e72ca8cSmrg ;; 76523e72ca8cSmrg *) 76533e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 76543e72ca8cSmrg _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' 76553e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 76563e72ca8cSmrg echo "-hidden">> $lib.exp~ 76573e72ca8cSmrg $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~ 76583e72ca8cSmrg $RM $lib.exp' 76593e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 76603e72ca8cSmrg ;; 76613e72ca8cSmrg esac 7662a1ed278cSmrg 76633e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7664a1ed278cSmrg 76653e72ca8cSmrg # Commands to make compiler produce verbose output that lists 76663e72ca8cSmrg # what "hidden" libraries, object files and flags are used when 76673e72ca8cSmrg # linking a shared library. 76683e72ca8cSmrg # 76693e72ca8cSmrg # There doesn't appear to be a way to prevent this compiler from 76703e72ca8cSmrg # explicitly linking system object files so we need to strip them 76713e72ca8cSmrg # from the output so that they don't get included in the library 76723e72ca8cSmrg # dependencies. 76733e72ca8cSmrg 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"' 76743e72ca8cSmrg ;; 76753e72ca8cSmrg *) 76763e72ca8cSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 76773e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 76783e72ca8cSmrg case $host in 76793e72ca8cSmrg osf3*) 76803e72ca8cSmrg _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' 76813e72ca8cSmrg ;; 76823e72ca8cSmrg *) 76833e72ca8cSmrg _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' 76843e72ca8cSmrg ;; 76853e72ca8cSmrg esac 7686a1ed278cSmrg 76873e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 76883e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7689a1ed278cSmrg 76903e72ca8cSmrg # Commands to make compiler produce verbose output that lists 76913e72ca8cSmrg # what "hidden" libraries, object files and flags are used when 76923e72ca8cSmrg # linking a shared library. 76933e72ca8cSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7694a1ed278cSmrg 76953e72ca8cSmrg else 76963e72ca8cSmrg # FIXME: insert proper C++ library support 76973e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 76983e72ca8cSmrg fi 76993e72ca8cSmrg ;; 77003e72ca8cSmrg esac 77013e72ca8cSmrg ;; 7702a1ed278cSmrg 77033e72ca8cSmrg psos*) 77043e72ca8cSmrg # FIXME: insert proper C++ library support 77053e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 77063e72ca8cSmrg ;; 7707a1ed278cSmrg 77083e72ca8cSmrg sunos4*) 77093e72ca8cSmrg case $cc_basename in 77103e72ca8cSmrg CC*) 77113e72ca8cSmrg # Sun C++ 4.x 77123e72ca8cSmrg # FIXME: insert proper C++ library support 77133e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 77143e72ca8cSmrg ;; 77153e72ca8cSmrg lcc*) 77163e72ca8cSmrg # Lucid 77173e72ca8cSmrg # FIXME: insert proper C++ library support 77183e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 77193e72ca8cSmrg ;; 77203e72ca8cSmrg *) 77213e72ca8cSmrg # FIXME: insert proper C++ library support 77223e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 77233e72ca8cSmrg ;; 77243e72ca8cSmrg esac 77253e72ca8cSmrg ;; 7726b425557eSmrg 77273e72ca8cSmrg solaris*) 77283e72ca8cSmrg case $cc_basename in 77293e72ca8cSmrg CC* | sunCC*) 77303e72ca8cSmrg # Sun C++ 4.2, 5.x and Centerline C++ 77313e72ca8cSmrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 77323e72ca8cSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 77333e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 77343e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 77353e72ca8cSmrg $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' 77363e72ca8cSmrg 77373e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 77383e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 77393e72ca8cSmrg case $host_os in 77403e72ca8cSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 77413e72ca8cSmrg *) 77423e72ca8cSmrg # The compiler driver will combine and reorder linker options, 77433e72ca8cSmrg # but understands `-z linker_flag'. 77443e72ca8cSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 77453e72ca8cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 77463e72ca8cSmrg ;; 77473e72ca8cSmrg esac 77483e72ca8cSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7749ee3138f1Smrg 77503e72ca8cSmrg output_verbose_link_cmd='func_echo_all' 7751ee3138f1Smrg 77523e72ca8cSmrg # Archives containing C++ object files must be created using 77533e72ca8cSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 77543e72ca8cSmrg # necessary to make sure instantiated templates are included 77553e72ca8cSmrg # in the archive. 77563e72ca8cSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 77573e72ca8cSmrg ;; 77583e72ca8cSmrg gcx*) 77593e72ca8cSmrg # Green Hills C++ Compiler 77603e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 7761ee3138f1Smrg 77623e72ca8cSmrg # The C++ compiler must be used to create the archive. 77633e72ca8cSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 77643e72ca8cSmrg ;; 77653e72ca8cSmrg *) 77663e72ca8cSmrg # GNU C++ compiler with Solaris linker 77673e72ca8cSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 77683e72ca8cSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 77693e72ca8cSmrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 77703e72ca8cSmrg _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' 77713e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 77723e72ca8cSmrg $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 7773a1ed278cSmrg 77743e72ca8cSmrg # Commands to make compiler produce verbose output that lists 77753e72ca8cSmrg # what "hidden" libraries, object files and flags are used when 77763e72ca8cSmrg # linking a shared library. 77773e72ca8cSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 77783e72ca8cSmrg else 77793e72ca8cSmrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 77803e72ca8cSmrg # platform. 77813e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 77823e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 77833e72ca8cSmrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 7784ee3138f1Smrg 77853e72ca8cSmrg # Commands to make compiler produce verbose output that lists 77863e72ca8cSmrg # what "hidden" libraries, object files and flags are used when 77873e72ca8cSmrg # linking a shared library. 77883e72ca8cSmrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 77893e72ca8cSmrg fi 7790ee3138f1Smrg 77913e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 77923e72ca8cSmrg case $host_os in 77933e72ca8cSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 77943e72ca8cSmrg *) 77953e72ca8cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 77963e72ca8cSmrg ;; 77973e72ca8cSmrg esac 77983e72ca8cSmrg fi 77993e72ca8cSmrg ;; 78003e72ca8cSmrg esac 78013e72ca8cSmrg ;; 7802ee3138f1Smrg 78033e72ca8cSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 78043e72ca8cSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 78053e72ca8cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 78063e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 78073e72ca8cSmrg runpath_var='LD_RUN_PATH' 7808ee3138f1Smrg 78093e72ca8cSmrg case $cc_basename in 78103e72ca8cSmrg CC*) 78113e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 78123e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 78133e72ca8cSmrg ;; 78143e72ca8cSmrg *) 78153e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 78163e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 78173e72ca8cSmrg ;; 78183e72ca8cSmrg esac 78193e72ca8cSmrg ;; 78203e72ca8cSmrg 78213e72ca8cSmrg sysv5* | sco3.2v5* | sco5v6*) 78223e72ca8cSmrg # Note: We can NOT use -z defs as we might desire, because we do not 78233e72ca8cSmrg # link with -lc, and that would cause any symbols used from libc to 78243e72ca8cSmrg # always be unresolved, which means just about no library would 78253e72ca8cSmrg # ever link correctly. If we're not using GNU ld we use -z text 78263e72ca8cSmrg # though, which does catch some bad symbols but isn't as heavy-handed 78273e72ca8cSmrg # as -z defs. 78283e72ca8cSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 78293e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 78303e72ca8cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 78313e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 78323e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 78333e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 78343e72ca8cSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 78353e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 78363e72ca8cSmrg runpath_var='LD_RUN_PATH' 7837ee3138f1Smrg 78383e72ca8cSmrg case $cc_basename in 78393e72ca8cSmrg CC*) 78403e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 78413e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 78423e72ca8cSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 78433e72ca8cSmrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 78443e72ca8cSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 78453e72ca8cSmrg '"$_LT_TAGVAR(reload_cmds, $1)" 78463e72ca8cSmrg ;; 78473e72ca8cSmrg *) 78483e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 78493e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 78503e72ca8cSmrg ;; 78513e72ca8cSmrg esac 78523e72ca8cSmrg ;; 7853ee3138f1Smrg 78543e72ca8cSmrg tandem*) 78553e72ca8cSmrg case $cc_basename in 78563e72ca8cSmrg NCC*) 78573e72ca8cSmrg # NonStop-UX NCC 3.20 78583e72ca8cSmrg # FIXME: insert proper C++ library support 78593e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 78603e72ca8cSmrg ;; 78613e72ca8cSmrg *) 78623e72ca8cSmrg # FIXME: insert proper C++ library support 78633e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 78643e72ca8cSmrg ;; 78653e72ca8cSmrg esac 78663e72ca8cSmrg ;; 7867ee3138f1Smrg 78683e72ca8cSmrg vxworks*) 78693e72ca8cSmrg # FIXME: insert proper C++ library support 78703e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 78713e72ca8cSmrg ;; 7872ee3138f1Smrg 78733e72ca8cSmrg *) 78743e72ca8cSmrg # FIXME: insert proper C++ library support 78753e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 78763e72ca8cSmrg ;; 78773e72ca8cSmrg esac 7878ee3138f1Smrg 78793e72ca8cSmrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 78803e72ca8cSmrg test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 7881b425557eSmrg 78823e72ca8cSmrg _LT_TAGVAR(GCC, $1)="$GXX" 78833e72ca8cSmrg _LT_TAGVAR(LD, $1)="$LD" 7884ee3138f1Smrg 78853e72ca8cSmrg ## CAVEAT EMPTOR: 78863e72ca8cSmrg ## There is no encapsulation within the following macros, do not change 78873e72ca8cSmrg ## the running order or otherwise move them around unless you know exactly 78883e72ca8cSmrg ## what you are doing... 78893e72ca8cSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 78903e72ca8cSmrg _LT_COMPILER_PIC($1) 78913e72ca8cSmrg _LT_COMPILER_C_O($1) 78923e72ca8cSmrg _LT_COMPILER_FILE_LOCKS($1) 78933e72ca8cSmrg _LT_LINKER_SHLIBS($1) 78943e72ca8cSmrg _LT_SYS_DYNAMIC_LINKER($1) 78953e72ca8cSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 7896ee3138f1Smrg 78973e72ca8cSmrg _LT_CONFIG($1) 78983e72ca8cSmrg fi # test -n "$compiler" 7899ee3138f1Smrg 79003e72ca8cSmrg CC=$lt_save_CC 79013e72ca8cSmrg CFLAGS=$lt_save_CFLAGS 79023e72ca8cSmrg LDCXX=$LD 79033e72ca8cSmrg LD=$lt_save_LD 79043e72ca8cSmrg GCC=$lt_save_GCC 79053e72ca8cSmrg with_gnu_ld=$lt_save_with_gnu_ld 79063e72ca8cSmrg lt_cv_path_LDCXX=$lt_cv_path_LD 79073e72ca8cSmrg lt_cv_path_LD=$lt_save_path_LD 79083e72ca8cSmrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 79093e72ca8cSmrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 79103e72ca8cSmrgfi # test "$_lt_caught_CXX_error" != yes 7911ee3138f1Smrg 79123e72ca8cSmrgAC_LANG_POP 79133e72ca8cSmrg])# _LT_LANG_CXX_CONFIG 7914ee3138f1Smrg 7915ee3138f1Smrg 79163e72ca8cSmrg# _LT_FUNC_STRIPNAME_CNF 79173e72ca8cSmrg# ---------------------- 79183e72ca8cSmrg# func_stripname_cnf prefix suffix name 7919a1ed278cSmrg# strip PREFIX and SUFFIX off of NAME. 7920a1ed278cSmrg# PREFIX and SUFFIX must not contain globbing or regex special 7921a1ed278cSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading 7922a1ed278cSmrg# dot (in which case that matches only a dot). 79233e72ca8cSmrg# 79243e72ca8cSmrg# This function is identical to the (non-XSI) version of func_stripname, 79253e72ca8cSmrg# except this one can be used by m4 code that may be executed by configure, 79263e72ca8cSmrg# rather than the libtool script. 79273e72ca8cSmrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 79283e72ca8cSmrgAC_REQUIRE([_LT_DECL_SED]) 79293e72ca8cSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 79303e72ca8cSmrgfunc_stripname_cnf () 7931a1ed278cSmrg{ 7932a1ed278cSmrg case ${2} in 79333e72ca8cSmrg .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 79343e72ca8cSmrg *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 7935a1ed278cSmrg esac 79363e72ca8cSmrg} # func_stripname_cnf 79373e72ca8cSmrg])# _LT_FUNC_STRIPNAME_CNF 7938ee3138f1Smrg 79393e72ca8cSmrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 79403e72ca8cSmrg# --------------------------------- 79413e72ca8cSmrg# Figure out "hidden" library dependencies from verbose 79423e72ca8cSmrg# compiler output when linking a shared library. 79433e72ca8cSmrg# Parse the compiler output and extract the necessary 79443e72ca8cSmrg# objects, libraries and library flags. 79453e72ca8cSmrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 79463e72ca8cSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 79473e72ca8cSmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 79483e72ca8cSmrg# Dependencies to place before and after the object being linked: 79493e72ca8cSmrg_LT_TAGVAR(predep_objects, $1)= 79503e72ca8cSmrg_LT_TAGVAR(postdep_objects, $1)= 79513e72ca8cSmrg_LT_TAGVAR(predeps, $1)= 79523e72ca8cSmrg_LT_TAGVAR(postdeps, $1)= 79533e72ca8cSmrg_LT_TAGVAR(compiler_lib_search_path, $1)= 7954ee3138f1Smrg 79553e72ca8cSmrgdnl we can't use the lt_simple_compile_test_code here, 79563e72ca8cSmrgdnl because it contains code intended for an executable, 79573e72ca8cSmrgdnl not a library. It's possible we should let each 79583e72ca8cSmrgdnl tag define a new lt_????_link_test_code variable, 79593e72ca8cSmrgdnl but it's only used here... 79603e72ca8cSmrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 79613e72ca8cSmrgint a; 79623e72ca8cSmrgvoid foo (void) { a = 0; } 7963a1ed278cSmrg_LT_EOF 79643e72ca8cSmrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 79653e72ca8cSmrgclass Foo 7966a1ed278cSmrg{ 79673e72ca8cSmrgpublic: 79683e72ca8cSmrg Foo (void) { a = 0; } 79693e72ca8cSmrgprivate: 79703e72ca8cSmrg int a; 79713e72ca8cSmrg}; 7972a1ed278cSmrg_LT_EOF 79733e72ca8cSmrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 79743e72ca8cSmrg subroutine foo 79753e72ca8cSmrg implicit none 79763e72ca8cSmrg integer*4 a 79773e72ca8cSmrg a=0 79783e72ca8cSmrg return 79793e72ca8cSmrg end 7980a1ed278cSmrg_LT_EOF 79813e72ca8cSmrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 79823e72ca8cSmrg subroutine foo 79833e72ca8cSmrg implicit none 79843e72ca8cSmrg integer a 79853e72ca8cSmrg a=0 79863e72ca8cSmrg return 79873e72ca8cSmrg end 79883e72ca8cSmrg_LT_EOF 79893e72ca8cSmrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 79903e72ca8cSmrgpublic class foo { 79913e72ca8cSmrg private int a; 79923e72ca8cSmrg public void bar (void) { 79933e72ca8cSmrg a = 0; 79943e72ca8cSmrg } 79953e72ca8cSmrg}; 79963e72ca8cSmrg_LT_EOF 79973e72ca8cSmrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 79983e72ca8cSmrgpackage foo 79993e72ca8cSmrgfunc foo() { 80003e72ca8cSmrg} 80013e72ca8cSmrg_LT_EOF 80023e72ca8cSmrg]) 8003ee3138f1Smrg 80043e72ca8cSmrg_lt_libdeps_save_CFLAGS=$CFLAGS 80053e72ca8cSmrgcase "$CC $CFLAGS " in #( 80063e72ca8cSmrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 80073e72ca8cSmrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 80083e72ca8cSmrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 80093e72ca8cSmrgesac 8010ee3138f1Smrg 80113e72ca8cSmrgdnl Parse the compiler output and extract the necessary 80123e72ca8cSmrgdnl objects, libraries and library flags. 80133e72ca8cSmrgif AC_TRY_EVAL(ac_compile); then 80143e72ca8cSmrg # Parse the compiler output and extract the necessary 80153e72ca8cSmrg # objects, libraries and library flags. 8016ee3138f1Smrg 80173e72ca8cSmrg # Sentinel used to keep track of whether or not we are before 80183e72ca8cSmrg # the conftest object file. 80193e72ca8cSmrg pre_test_object_deps_done=no 8020ee3138f1Smrg 80213e72ca8cSmrg for p in `eval "$output_verbose_link_cmd"`; do 80223e72ca8cSmrg case ${prev}${p} in 8023ee3138f1Smrg 80243e72ca8cSmrg -L* | -R* | -l*) 80253e72ca8cSmrg # Some compilers place space between "-{L,R}" and the path. 80263e72ca8cSmrg # Remove the space. 80273e72ca8cSmrg if test $p = "-L" || 80283e72ca8cSmrg test $p = "-R"; then 80293e72ca8cSmrg prev=$p 80303e72ca8cSmrg continue 80313e72ca8cSmrg fi 8032ee3138f1Smrg 80333e72ca8cSmrg # Expand the sysroot to ease extracting the directories later. 80343e72ca8cSmrg if test -z "$prev"; then 80353e72ca8cSmrg case $p in 80363e72ca8cSmrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 80373e72ca8cSmrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 80383e72ca8cSmrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 80393e72ca8cSmrg esac 80403e72ca8cSmrg fi 80413e72ca8cSmrg case $p in 80423e72ca8cSmrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 80433e72ca8cSmrg esac 80443e72ca8cSmrg if test "$pre_test_object_deps_done" = no; then 80453e72ca8cSmrg case ${prev} in 80463e72ca8cSmrg -L | -R) 80473e72ca8cSmrg # Internal compiler library paths should come after those 80483e72ca8cSmrg # provided the user. The postdeps already come after the 80493e72ca8cSmrg # user supplied libs so there is no need to process them. 80503e72ca8cSmrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 80513e72ca8cSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 80523e72ca8cSmrg else 80533e72ca8cSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 80543e72ca8cSmrg fi 80553e72ca8cSmrg ;; 80563e72ca8cSmrg # The "-l" case would never come before the object being 80573e72ca8cSmrg # linked, so don't bother handling this case. 80583e72ca8cSmrg esac 80593e72ca8cSmrg else 80603e72ca8cSmrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 80613e72ca8cSmrg _LT_TAGVAR(postdeps, $1)="${prev}${p}" 80623e72ca8cSmrg else 80633e72ca8cSmrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 80643e72ca8cSmrg fi 80653e72ca8cSmrg fi 80663e72ca8cSmrg prev= 80673e72ca8cSmrg ;; 8068ee3138f1Smrg 80693e72ca8cSmrg *.lto.$objext) ;; # Ignore GCC LTO objects 80703e72ca8cSmrg *.$objext) 80713e72ca8cSmrg # This assumes that the test object file only shows up 80723e72ca8cSmrg # once in the compiler output. 80733e72ca8cSmrg if test "$p" = "conftest.$objext"; then 80743e72ca8cSmrg pre_test_object_deps_done=yes 80753e72ca8cSmrg continue 80763e72ca8cSmrg fi 8077ee3138f1Smrg 80783e72ca8cSmrg if test "$pre_test_object_deps_done" = no; then 80793e72ca8cSmrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 80803e72ca8cSmrg _LT_TAGVAR(predep_objects, $1)="$p" 80813e72ca8cSmrg else 80823e72ca8cSmrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 80833e72ca8cSmrg fi 80843e72ca8cSmrg else 80853e72ca8cSmrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 80863e72ca8cSmrg _LT_TAGVAR(postdep_objects, $1)="$p" 80873e72ca8cSmrg else 80883e72ca8cSmrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 80893e72ca8cSmrg fi 80903e72ca8cSmrg fi 80913e72ca8cSmrg ;; 8092ee3138f1Smrg 80933e72ca8cSmrg *) ;; # Ignore the rest. 80943e72ca8cSmrg 80953e72ca8cSmrg esac 80963e72ca8cSmrg done 8097ee3138f1Smrg 80983e72ca8cSmrg # Clean up. 80993e72ca8cSmrg rm -f a.out a.exe 81003e72ca8cSmrgelse 81013e72ca8cSmrg echo "libtool.m4: error: problem compiling $1 test program" 81023e72ca8cSmrgfi 810334977a2fSmrg 81043e72ca8cSmrg$RM -f confest.$objext 81053e72ca8cSmrgCFLAGS=$_lt_libdeps_save_CFLAGS 810634977a2fSmrg 81073e72ca8cSmrg# PORTME: override above test on systems where it is broken 81083e72ca8cSmrgm4_if([$1], [CXX], 81093e72ca8cSmrg[case $host_os in 81103e72ca8cSmrginterix[[3-9]]*) 81113e72ca8cSmrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 81123e72ca8cSmrg # hack all around it, let's just trust "g++" to DTRT. 81133e72ca8cSmrg _LT_TAGVAR(predep_objects,$1)= 81143e72ca8cSmrg _LT_TAGVAR(postdep_objects,$1)= 81153e72ca8cSmrg _LT_TAGVAR(postdeps,$1)= 8116a1ed278cSmrg ;; 811734977a2fSmrg 81183e72ca8cSmrglinux*) 81193e72ca8cSmrg case `$CC -V 2>&1 | sed 5q` in 81203e72ca8cSmrg *Sun\ C*) 81213e72ca8cSmrg # Sun C++ 5.9 8122a1ed278cSmrg 81233e72ca8cSmrg # The more standards-conforming stlport4 library is 81243e72ca8cSmrg # incompatible with the Cstd library. Avoid specifying 81253e72ca8cSmrg # it if it's in CXXFLAGS. Ignore libCrun as 81263e72ca8cSmrg # -library=stlport4 depends on it. 81273e72ca8cSmrg case " $CXX $CXXFLAGS " in 81283e72ca8cSmrg *" -library=stlport4 "*) 81293e72ca8cSmrg solaris_use_stlport4=yes 81303e72ca8cSmrg ;; 81313e72ca8cSmrg esac 813234977a2fSmrg 81333e72ca8cSmrg if test "$solaris_use_stlport4" != yes; then 81343e72ca8cSmrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 81353e72ca8cSmrg fi 81363e72ca8cSmrg ;; 81373e72ca8cSmrg esac 81383e72ca8cSmrg ;; 813934977a2fSmrg 81403e72ca8cSmrgsolaris*) 81413e72ca8cSmrg case $cc_basename in 81423e72ca8cSmrg CC* | sunCC*) 81433e72ca8cSmrg # The more standards-conforming stlport4 library is 81443e72ca8cSmrg # incompatible with the Cstd library. Avoid specifying 81453e72ca8cSmrg # it if it's in CXXFLAGS. Ignore libCrun as 81463e72ca8cSmrg # -library=stlport4 depends on it. 81473e72ca8cSmrg case " $CXX $CXXFLAGS " in 81483e72ca8cSmrg *" -library=stlport4 "*) 81493e72ca8cSmrg solaris_use_stlport4=yes 81503e72ca8cSmrg ;; 81513e72ca8cSmrg esac 81523e72ca8cSmrg 81533e72ca8cSmrg # Adding this requires a known-good setup of shared libraries for 81543e72ca8cSmrg # Sun compiler versions before 5.6, else PIC objects from an old 81553e72ca8cSmrg # archive will be linked into the output, leading to subtle bugs. 81563e72ca8cSmrg if test "$solaris_use_stlport4" != yes; then 81573e72ca8cSmrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 81583e72ca8cSmrg fi 81593e72ca8cSmrg ;; 81603e72ca8cSmrg esac 81613e72ca8cSmrg ;; 81623e72ca8cSmrgesac 8163a1ed278cSmrg]) 816434977a2fSmrg 81653e72ca8cSmrgcase " $_LT_TAGVAR(postdeps, $1) " in 81663e72ca8cSmrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 81673e72ca8cSmrgesac 81683e72ca8cSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 81693e72ca8cSmrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 81703e72ca8cSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 81713e72ca8cSmrgfi 81723e72ca8cSmrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 81733e72ca8cSmrg [The directories searched by this compiler when creating a shared library]) 81743e72ca8cSmrg_LT_TAGDECL([], [predep_objects], [1], 81753e72ca8cSmrg [Dependencies to place before and after the objects being linked to 81763e72ca8cSmrg create a shared library]) 81773e72ca8cSmrg_LT_TAGDECL([], [postdep_objects], [1]) 81783e72ca8cSmrg_LT_TAGDECL([], [predeps], [1]) 81793e72ca8cSmrg_LT_TAGDECL([], [postdeps], [1]) 81803e72ca8cSmrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 81813e72ca8cSmrg [The library search path used internally by the compiler when linking 81823e72ca8cSmrg a shared library]) 81833e72ca8cSmrg])# _LT_SYS_HIDDEN_LIBDEPS 8184ee3138f1Smrg 818534977a2fSmrg 81863e72ca8cSmrg# _LT_LANG_F77_CONFIG([TAG]) 81873e72ca8cSmrg# -------------------------- 81883e72ca8cSmrg# Ensure that the configuration variables for a Fortran 77 compiler are 81893e72ca8cSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 81903e72ca8cSmrg# to write the compiler configuration to `libtool'. 81913e72ca8cSmrgm4_defun([_LT_LANG_F77_CONFIG], 81923e72ca8cSmrg[AC_LANG_PUSH(Fortran 77) 81933e72ca8cSmrgif test -z "$F77" || test "X$F77" = "Xno"; then 81943e72ca8cSmrg _lt_disable_F77=yes 81953e72ca8cSmrgfi 81963e72ca8cSmrg 81973e72ca8cSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 81983e72ca8cSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 81993e72ca8cSmrg_LT_TAGVAR(always_export_symbols, $1)=no 82003e72ca8cSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 82013e72ca8cSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 82023e72ca8cSmrg_LT_TAGVAR(hardcode_direct, $1)=no 82033e72ca8cSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 82043e72ca8cSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 82053e72ca8cSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 82063e72ca8cSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 82073e72ca8cSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 82083e72ca8cSmrg_LT_TAGVAR(inherit_rpath, $1)=no 82093e72ca8cSmrg_LT_TAGVAR(module_cmds, $1)= 82103e72ca8cSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 82113e72ca8cSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 82123e72ca8cSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 82133e72ca8cSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 82143e72ca8cSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 82153e72ca8cSmrg_LT_TAGVAR(no_undefined_flag, $1)= 82163e72ca8cSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 82173e72ca8cSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 821834977a2fSmrg 82193e72ca8cSmrg# Source file extension for f77 test sources. 82203e72ca8cSmrgac_ext=f 822134977a2fSmrg 82223e72ca8cSmrg# Object file extension for compiled f77 test sources. 82233e72ca8cSmrgobjext=o 82243e72ca8cSmrg_LT_TAGVAR(objext, $1)=$objext 822534977a2fSmrg 82263e72ca8cSmrg# No sense in running all these tests if we already determined that 82273e72ca8cSmrg# the F77 compiler isn't working. Some variables (like enable_shared) 82283e72ca8cSmrg# are currently assumed to apply to all compilers on this platform, 82293e72ca8cSmrg# and will be corrupted by setting them based on a non-working compiler. 82303e72ca8cSmrgif test "$_lt_disable_F77" != yes; then 82313e72ca8cSmrg # Code to be used in simple compile tests 82323e72ca8cSmrg lt_simple_compile_test_code="\ 82333e72ca8cSmrg subroutine t 82343e72ca8cSmrg return 82353e72ca8cSmrg end 82363e72ca8cSmrg" 823734977a2fSmrg 82383e72ca8cSmrg # Code to be used in simple link tests 82393e72ca8cSmrg lt_simple_link_test_code="\ 82403e72ca8cSmrg program t 82413e72ca8cSmrg end 82423e72ca8cSmrg" 824334977a2fSmrg 82443e72ca8cSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 82453e72ca8cSmrg _LT_TAG_COMPILER 824634977a2fSmrg 82473e72ca8cSmrg # save warnings/boilerplate of simple test code 82483e72ca8cSmrg _LT_COMPILER_BOILERPLATE 82493e72ca8cSmrg _LT_LINKER_BOILERPLATE 825034977a2fSmrg 82513e72ca8cSmrg # Allow CC to be a program name with arguments. 82523e72ca8cSmrg lt_save_CC="$CC" 82533e72ca8cSmrg lt_save_GCC=$GCC 82543e72ca8cSmrg lt_save_CFLAGS=$CFLAGS 82553e72ca8cSmrg CC=${F77-"f77"} 82563e72ca8cSmrg CFLAGS=$FFLAGS 82573e72ca8cSmrg compiler=$CC 82583e72ca8cSmrg _LT_TAGVAR(compiler, $1)=$CC 82593e72ca8cSmrg _LT_CC_BASENAME([$compiler]) 82603e72ca8cSmrg GCC=$G77 82613e72ca8cSmrg if test -n "$compiler"; then 82623e72ca8cSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 82633e72ca8cSmrg AC_MSG_RESULT([$can_build_shared]) 8264ee3138f1Smrg 82653e72ca8cSmrg AC_MSG_CHECKING([whether to build shared libraries]) 82663e72ca8cSmrg test "$can_build_shared" = "no" && enable_shared=no 8267ee3138f1Smrg 82683e72ca8cSmrg # On AIX, shared libraries and static libraries use the same namespace, and 82693e72ca8cSmrg # are all built from PIC. 82703e72ca8cSmrg case $host_os in 82713e72ca8cSmrg aix3*) 82723e72ca8cSmrg test "$enable_shared" = yes && enable_static=no 82733e72ca8cSmrg if test -n "$RANLIB"; then 82743e72ca8cSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 82753e72ca8cSmrg postinstall_cmds='$RANLIB $lib' 82763e72ca8cSmrg fi 82773e72ca8cSmrg ;; 82783e72ca8cSmrg aix[[4-9]]*) 82793e72ca8cSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 82803e72ca8cSmrg test "$enable_shared" = yes && enable_static=no 8281a1ed278cSmrg fi 82823e72ca8cSmrg ;; 82833e72ca8cSmrg esac 82843e72ca8cSmrg AC_MSG_RESULT([$enable_shared]) 8285ee3138f1Smrg 82863e72ca8cSmrg AC_MSG_CHECKING([whether to build static libraries]) 82873e72ca8cSmrg # Make sure either enable_shared or enable_static is yes. 82883e72ca8cSmrg test "$enable_shared" = yes || enable_static=yes 82893e72ca8cSmrg AC_MSG_RESULT([$enable_static]) 8290ee3138f1Smrg 82913e72ca8cSmrg _LT_TAGVAR(GCC, $1)="$G77" 82923e72ca8cSmrg _LT_TAGVAR(LD, $1)="$LD" 8293ee3138f1Smrg 82943e72ca8cSmrg ## CAVEAT EMPTOR: 82953e72ca8cSmrg ## There is no encapsulation within the following macros, do not change 82963e72ca8cSmrg ## the running order or otherwise move them around unless you know exactly 82973e72ca8cSmrg ## what you are doing... 82983e72ca8cSmrg _LT_COMPILER_PIC($1) 82993e72ca8cSmrg _LT_COMPILER_C_O($1) 83003e72ca8cSmrg _LT_COMPILER_FILE_LOCKS($1) 83013e72ca8cSmrg _LT_LINKER_SHLIBS($1) 83023e72ca8cSmrg _LT_SYS_DYNAMIC_LINKER($1) 83033e72ca8cSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 8304ee3138f1Smrg 83053e72ca8cSmrg _LT_CONFIG($1) 83063e72ca8cSmrg fi # test -n "$compiler" 8307a1ed278cSmrg 83083e72ca8cSmrg GCC=$lt_save_GCC 83093e72ca8cSmrg CC="$lt_save_CC" 83103e72ca8cSmrg CFLAGS="$lt_save_CFLAGS" 83113e72ca8cSmrgfi # test "$_lt_disable_F77" != yes 8312a1ed278cSmrg 83133e72ca8cSmrgAC_LANG_POP 83143e72ca8cSmrg])# _LT_LANG_F77_CONFIG 8315ee3138f1Smrg 8316ee3138f1Smrg 83173e72ca8cSmrg# _LT_LANG_FC_CONFIG([TAG]) 83183e72ca8cSmrg# ------------------------- 83193e72ca8cSmrg# Ensure that the configuration variables for a Fortran compiler are 83203e72ca8cSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 83213e72ca8cSmrg# to write the compiler configuration to `libtool'. 83223e72ca8cSmrgm4_defun([_LT_LANG_FC_CONFIG], 83233e72ca8cSmrg[AC_LANG_PUSH(Fortran) 8324ee3138f1Smrg 83253e72ca8cSmrgif test -z "$FC" || test "X$FC" = "Xno"; then 83263e72ca8cSmrg _lt_disable_FC=yes 83273e72ca8cSmrgfi 832834977a2fSmrg 83293e72ca8cSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 83303e72ca8cSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 83313e72ca8cSmrg_LT_TAGVAR(always_export_symbols, $1)=no 83323e72ca8cSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 83333e72ca8cSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 83343e72ca8cSmrg_LT_TAGVAR(hardcode_direct, $1)=no 83353e72ca8cSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 83363e72ca8cSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 83373e72ca8cSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 83383e72ca8cSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 83393e72ca8cSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 83403e72ca8cSmrg_LT_TAGVAR(inherit_rpath, $1)=no 83413e72ca8cSmrg_LT_TAGVAR(module_cmds, $1)= 83423e72ca8cSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 83433e72ca8cSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 83443e72ca8cSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 83453e72ca8cSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 83463e72ca8cSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 83473e72ca8cSmrg_LT_TAGVAR(no_undefined_flag, $1)= 83483e72ca8cSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 83493e72ca8cSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 835034977a2fSmrg 83513e72ca8cSmrg# Source file extension for fc test sources. 83523e72ca8cSmrgac_ext=${ac_fc_srcext-f} 8353ee3138f1Smrg 83543e72ca8cSmrg# Object file extension for compiled fc test sources. 83553e72ca8cSmrgobjext=o 83563e72ca8cSmrg_LT_TAGVAR(objext, $1)=$objext 8357ee3138f1Smrg 83583e72ca8cSmrg# No sense in running all these tests if we already determined that 83593e72ca8cSmrg# the FC compiler isn't working. Some variables (like enable_shared) 83603e72ca8cSmrg# are currently assumed to apply to all compilers on this platform, 83613e72ca8cSmrg# and will be corrupted by setting them based on a non-working compiler. 83623e72ca8cSmrgif test "$_lt_disable_FC" != yes; then 83633e72ca8cSmrg # Code to be used in simple compile tests 83643e72ca8cSmrg lt_simple_compile_test_code="\ 83653e72ca8cSmrg subroutine t 83663e72ca8cSmrg return 83673e72ca8cSmrg end 83683e72ca8cSmrg" 83693e72ca8cSmrg 83703e72ca8cSmrg # Code to be used in simple link tests 83713e72ca8cSmrg lt_simple_link_test_code="\ 83723e72ca8cSmrg program t 83733e72ca8cSmrg end 83743e72ca8cSmrg" 83753e72ca8cSmrg 83763e72ca8cSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 83773e72ca8cSmrg _LT_TAG_COMPILER 83783e72ca8cSmrg 83793e72ca8cSmrg # save warnings/boilerplate of simple test code 83803e72ca8cSmrg _LT_COMPILER_BOILERPLATE 83813e72ca8cSmrg _LT_LINKER_BOILERPLATE 83823e72ca8cSmrg 83833e72ca8cSmrg # Allow CC to be a program name with arguments. 83843e72ca8cSmrg lt_save_CC="$CC" 83853e72ca8cSmrg lt_save_GCC=$GCC 83863e72ca8cSmrg lt_save_CFLAGS=$CFLAGS 83873e72ca8cSmrg CC=${FC-"f95"} 83883e72ca8cSmrg CFLAGS=$FCFLAGS 83893e72ca8cSmrg compiler=$CC 83903e72ca8cSmrg GCC=$ac_cv_fc_compiler_gnu 8391ee3138f1Smrg 83923e72ca8cSmrg _LT_TAGVAR(compiler, $1)=$CC 83933e72ca8cSmrg _LT_CC_BASENAME([$compiler]) 8394ee3138f1Smrg 83953e72ca8cSmrg if test -n "$compiler"; then 83963e72ca8cSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 83973e72ca8cSmrg AC_MSG_RESULT([$can_build_shared]) 8398ee3138f1Smrg 83993e72ca8cSmrg AC_MSG_CHECKING([whether to build shared libraries]) 84003e72ca8cSmrg test "$can_build_shared" = "no" && enable_shared=no 840134977a2fSmrg 84023e72ca8cSmrg # On AIX, shared libraries and static libraries use the same namespace, and 84033e72ca8cSmrg # are all built from PIC. 84043e72ca8cSmrg case $host_os in 84053e72ca8cSmrg aix3*) 84063e72ca8cSmrg test "$enable_shared" = yes && enable_static=no 84073e72ca8cSmrg if test -n "$RANLIB"; then 84083e72ca8cSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 84093e72ca8cSmrg postinstall_cmds='$RANLIB $lib' 84103e72ca8cSmrg fi 84113e72ca8cSmrg ;; 84123e72ca8cSmrg aix[[4-9]]*) 84133e72ca8cSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 84143e72ca8cSmrg test "$enable_shared" = yes && enable_static=no 84153e72ca8cSmrg fi 84163e72ca8cSmrg ;; 84173e72ca8cSmrg esac 84183e72ca8cSmrg AC_MSG_RESULT([$enable_shared]) 841934977a2fSmrg 84203e72ca8cSmrg AC_MSG_CHECKING([whether to build static libraries]) 84213e72ca8cSmrg # Make sure either enable_shared or enable_static is yes. 84223e72ca8cSmrg test "$enable_shared" = yes || enable_static=yes 84233e72ca8cSmrg AC_MSG_RESULT([$enable_static]) 842434977a2fSmrg 84253e72ca8cSmrg _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 84263e72ca8cSmrg _LT_TAGVAR(LD, $1)="$LD" 842734977a2fSmrg 84283e72ca8cSmrg ## CAVEAT EMPTOR: 84293e72ca8cSmrg ## There is no encapsulation within the following macros, do not change 84303e72ca8cSmrg ## the running order or otherwise move them around unless you know exactly 84313e72ca8cSmrg ## what you are doing... 84323e72ca8cSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 84333e72ca8cSmrg _LT_COMPILER_PIC($1) 84343e72ca8cSmrg _LT_COMPILER_C_O($1) 84353e72ca8cSmrg _LT_COMPILER_FILE_LOCKS($1) 84363e72ca8cSmrg _LT_LINKER_SHLIBS($1) 84373e72ca8cSmrg _LT_SYS_DYNAMIC_LINKER($1) 84383e72ca8cSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 843934977a2fSmrg 84403e72ca8cSmrg _LT_CONFIG($1) 84413e72ca8cSmrg fi # test -n "$compiler" 844234977a2fSmrg 84433e72ca8cSmrg GCC=$lt_save_GCC 84443e72ca8cSmrg CC=$lt_save_CC 84453e72ca8cSmrg CFLAGS=$lt_save_CFLAGS 84463e72ca8cSmrgfi # test "$_lt_disable_FC" != yes 844734977a2fSmrg 84483e72ca8cSmrgAC_LANG_POP 84493e72ca8cSmrg])# _LT_LANG_FC_CONFIG 8450a1ed278cSmrg 845134977a2fSmrg 84523e72ca8cSmrg# _LT_LANG_GCJ_CONFIG([TAG]) 84533e72ca8cSmrg# -------------------------- 84543e72ca8cSmrg# Ensure that the configuration variables for the GNU Java Compiler compiler 84553e72ca8cSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 84563e72ca8cSmrg# to write the compiler configuration to `libtool'. 84573e72ca8cSmrgm4_defun([_LT_LANG_GCJ_CONFIG], 84583e72ca8cSmrg[AC_REQUIRE([LT_PROG_GCJ])dnl 84593e72ca8cSmrgAC_LANG_SAVE 846034977a2fSmrg 84613e72ca8cSmrg# Source file extension for Java test sources. 84623e72ca8cSmrgac_ext=java 846334977a2fSmrg 84643e72ca8cSmrg# Object file extension for compiled Java test sources. 84653e72ca8cSmrgobjext=o 84663e72ca8cSmrg_LT_TAGVAR(objext, $1)=$objext 84673e72ca8cSmrg 84683e72ca8cSmrg# Code to be used in simple compile tests 84693e72ca8cSmrglt_simple_compile_test_code="class foo {}" 847034977a2fSmrg 84713e72ca8cSmrg# Code to be used in simple link tests 84723e72ca8cSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 847334977a2fSmrg 84743e72ca8cSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 84753e72ca8cSmrg_LT_TAG_COMPILER 847634977a2fSmrg 84773e72ca8cSmrg# save warnings/boilerplate of simple test code 84783e72ca8cSmrg_LT_COMPILER_BOILERPLATE 84793e72ca8cSmrg_LT_LINKER_BOILERPLATE 848034977a2fSmrg 84813e72ca8cSmrg# Allow CC to be a program name with arguments. 84823e72ca8cSmrglt_save_CC=$CC 84833e72ca8cSmrglt_save_CFLAGS=$CFLAGS 84843e72ca8cSmrglt_save_GCC=$GCC 84853e72ca8cSmrgGCC=yes 84863e72ca8cSmrgCC=${GCJ-"gcj"} 84873e72ca8cSmrgCFLAGS=$GCJFLAGS 84883e72ca8cSmrgcompiler=$CC 84893e72ca8cSmrg_LT_TAGVAR(compiler, $1)=$CC 84903e72ca8cSmrg_LT_TAGVAR(LD, $1)="$LD" 84913e72ca8cSmrg_LT_CC_BASENAME([$compiler]) 849234977a2fSmrg 84933e72ca8cSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 84943e72ca8cSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8495ee3138f1Smrg 84963e72ca8cSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 84973e72ca8cSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 84983e72ca8cSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8499ee3138f1Smrg 85003e72ca8cSmrgif test -n "$compiler"; then 85013e72ca8cSmrg _LT_COMPILER_NO_RTTI($1) 85023e72ca8cSmrg _LT_COMPILER_PIC($1) 85033e72ca8cSmrg _LT_COMPILER_C_O($1) 85043e72ca8cSmrg _LT_COMPILER_FILE_LOCKS($1) 85053e72ca8cSmrg _LT_LINKER_SHLIBS($1) 85063e72ca8cSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 8507ee3138f1Smrg 85083e72ca8cSmrg _LT_CONFIG($1) 85093e72ca8cSmrgfi 8510ee3138f1Smrg 85113e72ca8cSmrgAC_LANG_RESTORE 8512ee3138f1Smrg 85133e72ca8cSmrgGCC=$lt_save_GCC 85143e72ca8cSmrgCC=$lt_save_CC 85153e72ca8cSmrgCFLAGS=$lt_save_CFLAGS 85163e72ca8cSmrg])# _LT_LANG_GCJ_CONFIG 8517ee3138f1Smrg 8518ee3138f1Smrg 85193e72ca8cSmrg# _LT_LANG_GO_CONFIG([TAG]) 85203e72ca8cSmrg# -------------------------- 85213e72ca8cSmrg# Ensure that the configuration variables for the GNU Go compiler 85223e72ca8cSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 85233e72ca8cSmrg# to write the compiler configuration to `libtool'. 85243e72ca8cSmrgm4_defun([_LT_LANG_GO_CONFIG], 85253e72ca8cSmrg[AC_REQUIRE([LT_PROG_GO])dnl 85263e72ca8cSmrgAC_LANG_SAVE 852734977a2fSmrg 85283e72ca8cSmrg# Source file extension for Go test sources. 85293e72ca8cSmrgac_ext=go 8530a1ed278cSmrg 85313e72ca8cSmrg# Object file extension for compiled Go test sources. 85323e72ca8cSmrgobjext=o 85333e72ca8cSmrg_LT_TAGVAR(objext, $1)=$objext 8534a1ed278cSmrg 85353e72ca8cSmrg# Code to be used in simple compile tests 85363e72ca8cSmrglt_simple_compile_test_code="package main; func main() { }" 8537a1ed278cSmrg 85383e72ca8cSmrg# Code to be used in simple link tests 85393e72ca8cSmrglt_simple_link_test_code='package main; func main() { }' 8540a1ed278cSmrg 85413e72ca8cSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 85423e72ca8cSmrg_LT_TAG_COMPILER 8543a1ed278cSmrg 85443e72ca8cSmrg# save warnings/boilerplate of simple test code 85453e72ca8cSmrg_LT_COMPILER_BOILERPLATE 85463e72ca8cSmrg_LT_LINKER_BOILERPLATE 8547a1ed278cSmrg 85483e72ca8cSmrg# Allow CC to be a program name with arguments. 85493e72ca8cSmrglt_save_CC=$CC 85503e72ca8cSmrglt_save_CFLAGS=$CFLAGS 85513e72ca8cSmrglt_save_GCC=$GCC 85523e72ca8cSmrgGCC=yes 85533e72ca8cSmrgCC=${GOC-"gccgo"} 85543e72ca8cSmrgCFLAGS=$GOFLAGS 85553e72ca8cSmrgcompiler=$CC 85563e72ca8cSmrg_LT_TAGVAR(compiler, $1)=$CC 85573e72ca8cSmrg_LT_TAGVAR(LD, $1)="$LD" 85583e72ca8cSmrg_LT_CC_BASENAME([$compiler]) 8559a1ed278cSmrg 85603e72ca8cSmrg# Go did not exist at the time GCC didn't implicitly link libc in. 85613e72ca8cSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8562a1ed278cSmrg 85633e72ca8cSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 85643e72ca8cSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 85653e72ca8cSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8566ee3138f1Smrg 85673e72ca8cSmrgif test -n "$compiler"; then 85683e72ca8cSmrg _LT_COMPILER_NO_RTTI($1) 85693e72ca8cSmrg _LT_COMPILER_PIC($1) 85703e72ca8cSmrg _LT_COMPILER_C_O($1) 85713e72ca8cSmrg _LT_COMPILER_FILE_LOCKS($1) 85723e72ca8cSmrg _LT_LINKER_SHLIBS($1) 85733e72ca8cSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 8574ee3138f1Smrg 85753e72ca8cSmrg _LT_CONFIG($1) 85763e72ca8cSmrgfi 8577ee3138f1Smrg 85783e72ca8cSmrgAC_LANG_RESTORE 8579b425557eSmrg 85803e72ca8cSmrgGCC=$lt_save_GCC 85813e72ca8cSmrgCC=$lt_save_CC 85823e72ca8cSmrgCFLAGS=$lt_save_CFLAGS 85833e72ca8cSmrg])# _LT_LANG_GO_CONFIG 8584ee3138f1Smrg 8585ee3138f1Smrg 85863e72ca8cSmrg# _LT_LANG_RC_CONFIG([TAG]) 85873e72ca8cSmrg# ------------------------- 85883e72ca8cSmrg# Ensure that the configuration variables for the Windows resource compiler 85893e72ca8cSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 85903e72ca8cSmrg# to write the compiler configuration to `libtool'. 85913e72ca8cSmrgm4_defun([_LT_LANG_RC_CONFIG], 85923e72ca8cSmrg[AC_REQUIRE([LT_PROG_RC])dnl 85933e72ca8cSmrgAC_LANG_SAVE 8594ee3138f1Smrg 85953e72ca8cSmrg# Source file extension for RC test sources. 85963e72ca8cSmrgac_ext=rc 859734977a2fSmrg 85983e72ca8cSmrg# Object file extension for compiled RC test sources. 85993e72ca8cSmrgobjext=o 86003e72ca8cSmrg_LT_TAGVAR(objext, $1)=$objext 860134977a2fSmrg 86023e72ca8cSmrg# Code to be used in simple compile tests 86033e72ca8cSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 860434977a2fSmrg 86053e72ca8cSmrg# Code to be used in simple link tests 86063e72ca8cSmrglt_simple_link_test_code="$lt_simple_compile_test_code" 860734977a2fSmrg 86083e72ca8cSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 86093e72ca8cSmrg_LT_TAG_COMPILER 861034977a2fSmrg 86113e72ca8cSmrg# save warnings/boilerplate of simple test code 86123e72ca8cSmrg_LT_COMPILER_BOILERPLATE 86133e72ca8cSmrg_LT_LINKER_BOILERPLATE 8614ee3138f1Smrg 86153e72ca8cSmrg# Allow CC to be a program name with arguments. 86163e72ca8cSmrglt_save_CC="$CC" 86173e72ca8cSmrglt_save_CFLAGS=$CFLAGS 86183e72ca8cSmrglt_save_GCC=$GCC 86193e72ca8cSmrgGCC= 86203e72ca8cSmrgCC=${RC-"windres"} 86213e72ca8cSmrgCFLAGS= 86223e72ca8cSmrgcompiler=$CC 86233e72ca8cSmrg_LT_TAGVAR(compiler, $1)=$CC 86243e72ca8cSmrg_LT_CC_BASENAME([$compiler]) 86253e72ca8cSmrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 86263e72ca8cSmrg 86273e72ca8cSmrgif test -n "$compiler"; then 86283e72ca8cSmrg : 86293e72ca8cSmrg _LT_CONFIG($1) 8630a1ed278cSmrgfi 8631ee3138f1Smrg 86323e72ca8cSmrgGCC=$lt_save_GCC 86333e72ca8cSmrgAC_LANG_RESTORE 86343e72ca8cSmrgCC=$lt_save_CC 86353e72ca8cSmrgCFLAGS=$lt_save_CFLAGS 86363e72ca8cSmrg])# _LT_LANG_RC_CONFIG 8637ee3138f1Smrg 8638ee3138f1Smrg 86393e72ca8cSmrg# LT_PROG_GCJ 86403e72ca8cSmrg# ----------- 86413e72ca8cSmrgAC_DEFUN([LT_PROG_GCJ], 86423e72ca8cSmrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 86433e72ca8cSmrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 86443e72ca8cSmrg [AC_CHECK_TOOL(GCJ, gcj,) 86453e72ca8cSmrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 86463e72ca8cSmrg AC_SUBST(GCJFLAGS)])])[]dnl 86473e72ca8cSmrg]) 8648ee3138f1Smrg 86493e72ca8cSmrg# Old name: 86503e72ca8cSmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 86513e72ca8cSmrgdnl aclocal-1.4 backwards compatibility: 86523e72ca8cSmrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 8653ee3138f1Smrg 8654ee3138f1Smrg 86553e72ca8cSmrg# LT_PROG_GO 86563e72ca8cSmrg# ---------- 86573e72ca8cSmrgAC_DEFUN([LT_PROG_GO], 86583e72ca8cSmrg[AC_CHECK_TOOL(GOC, gccgo,) 86593e72ca8cSmrg]) 8660ee3138f1Smrg 8661ee3138f1Smrg 86623e72ca8cSmrg# LT_PROG_RC 86633e72ca8cSmrg# ---------- 86643e72ca8cSmrgAC_DEFUN([LT_PROG_RC], 86653e72ca8cSmrg[AC_CHECK_TOOL(RC, windres,) 86663e72ca8cSmrg]) 8667ee3138f1Smrg 86683e72ca8cSmrg# Old name: 86693e72ca8cSmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 86703e72ca8cSmrgdnl aclocal-1.4 backwards compatibility: 86713e72ca8cSmrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 8672ee3138f1Smrg 8673ee3138f1Smrg 86743e72ca8cSmrg# _LT_DECL_EGREP 86753e72ca8cSmrg# -------------- 86763e72ca8cSmrg# If we don't have a new enough Autoconf to choose the best grep 86773e72ca8cSmrg# available, choose the one first in the user's PATH. 86783e72ca8cSmrgm4_defun([_LT_DECL_EGREP], 86793e72ca8cSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl 86803e72ca8cSmrgAC_REQUIRE([AC_PROG_FGREP])dnl 86813e72ca8cSmrgtest -z "$GREP" && GREP=grep 86823e72ca8cSmrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 86833e72ca8cSmrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 86843e72ca8cSmrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 86853e72ca8cSmrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 86863e72ca8cSmrgAC_SUBST([GREP]) 86873e72ca8cSmrg]) 8688ee3138f1Smrg 8689b425557eSmrg 86903e72ca8cSmrg# _LT_DECL_OBJDUMP 86913e72ca8cSmrg# -------------- 86923e72ca8cSmrg# If we don't have a new enough Autoconf to choose the best objdump 86933e72ca8cSmrg# available, choose the one first in the user's PATH. 86943e72ca8cSmrgm4_defun([_LT_DECL_OBJDUMP], 86953e72ca8cSmrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 86963e72ca8cSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 86973e72ca8cSmrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 86983e72ca8cSmrgAC_SUBST([OBJDUMP]) 86993e72ca8cSmrg]) 8700b425557eSmrg 87013e72ca8cSmrg# _LT_DECL_DLLTOOL 87023e72ca8cSmrg# ---------------- 87033e72ca8cSmrg# Ensure DLLTOOL variable is set. 87043e72ca8cSmrgm4_defun([_LT_DECL_DLLTOOL], 87053e72ca8cSmrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 87063e72ca8cSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 87073e72ca8cSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 87083e72ca8cSmrgAC_SUBST([DLLTOOL]) 87093e72ca8cSmrg]) 8710b425557eSmrg 87113e72ca8cSmrg# _LT_DECL_SED 87123e72ca8cSmrg# ------------ 87133e72ca8cSmrg# Check for a fully-functional sed program, that truncates 87143e72ca8cSmrg# as few characters as possible. Prefer GNU sed if found. 87153e72ca8cSmrgm4_defun([_LT_DECL_SED], 87163e72ca8cSmrg[AC_PROG_SED 87173e72ca8cSmrgtest -z "$SED" && SED=sed 87183e72ca8cSmrgXsed="$SED -e 1s/^X//" 87193e72ca8cSmrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 87203e72ca8cSmrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 87213e72ca8cSmrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 87223e72ca8cSmrg])# _LT_DECL_SED 8723b425557eSmrg 87243e72ca8cSmrgm4_ifndef([AC_PROG_SED], [ 87253e72ca8cSmrg# NOTE: This macro has been submitted for inclusion into # 87263e72ca8cSmrg# GNU Autoconf as AC_PROG_SED. When it is available in # 87273e72ca8cSmrg# a released version of Autoconf we should remove this # 87283e72ca8cSmrg# macro and use it instead. # 8729b425557eSmrg 87303e72ca8cSmrgm4_defun([AC_PROG_SED], 87313e72ca8cSmrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 87323e72ca8cSmrgAC_CACHE_VAL(lt_cv_path_SED, 87333e72ca8cSmrg[# Loop through the user's path and test for sed and gsed. 87343e72ca8cSmrg# Then use that list of sed's as ones to test for truncation. 87353e72ca8cSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 87363e72ca8cSmrgfor as_dir in $PATH 87373e72ca8cSmrgdo 87383e72ca8cSmrg IFS=$as_save_IFS 87393e72ca8cSmrg test -z "$as_dir" && as_dir=. 87403e72ca8cSmrg for lt_ac_prog in sed gsed; do 87413e72ca8cSmrg for ac_exec_ext in '' $ac_executable_extensions; do 87423e72ca8cSmrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 87433e72ca8cSmrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 87443e72ca8cSmrg fi 87453e72ca8cSmrg done 87463e72ca8cSmrg done 87473e72ca8cSmrgdone 87483e72ca8cSmrgIFS=$as_save_IFS 87493e72ca8cSmrglt_ac_max=0 87503e72ca8cSmrglt_ac_count=0 87513e72ca8cSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 87523e72ca8cSmrg# along with /bin/sed that truncates output. 87533e72ca8cSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 87543e72ca8cSmrg test ! -f $lt_ac_sed && continue 87553e72ca8cSmrg cat /dev/null > conftest.in 87563e72ca8cSmrg lt_ac_count=0 87573e72ca8cSmrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 87583e72ca8cSmrg # Check for GNU sed and select it if it is found. 87593e72ca8cSmrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 87603e72ca8cSmrg lt_cv_path_SED=$lt_ac_sed 87613e72ca8cSmrg break 87623e72ca8cSmrg fi 87633e72ca8cSmrg while true; do 87643e72ca8cSmrg cat conftest.in conftest.in >conftest.tmp 87653e72ca8cSmrg mv conftest.tmp conftest.in 87663e72ca8cSmrg cp conftest.in conftest.nl 87673e72ca8cSmrg echo >>conftest.nl 87683e72ca8cSmrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 87693e72ca8cSmrg cmp -s conftest.out conftest.nl || break 87703e72ca8cSmrg # 10000 chars as input seems more than enough 87713e72ca8cSmrg test $lt_ac_count -gt 10 && break 87723e72ca8cSmrg lt_ac_count=`expr $lt_ac_count + 1` 87733e72ca8cSmrg if test $lt_ac_count -gt $lt_ac_max; then 87743e72ca8cSmrg lt_ac_max=$lt_ac_count 87753e72ca8cSmrg lt_cv_path_SED=$lt_ac_sed 87763e72ca8cSmrg fi 87773e72ca8cSmrg done 87783e72ca8cSmrgdone 8779a1ed278cSmrg]) 87803e72ca8cSmrgSED=$lt_cv_path_SED 87813e72ca8cSmrgAC_SUBST([SED]) 87823e72ca8cSmrgAC_MSG_RESULT([$SED]) 87833e72ca8cSmrg])#AC_PROG_SED 87843e72ca8cSmrg])#m4_ifndef 8785b425557eSmrg 87863e72ca8cSmrg# Old name: 87873e72ca8cSmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 87883e72ca8cSmrgdnl aclocal-1.4 backwards compatibility: 87893e72ca8cSmrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 8790b425557eSmrg 8791ee3138f1Smrg 87923e72ca8cSmrg# _LT_CHECK_SHELL_FEATURES 87933e72ca8cSmrg# ------------------------ 87943e72ca8cSmrg# Find out whether the shell is Bourne or XSI compatible, 87953e72ca8cSmrg# or has some other useful features. 87963e72ca8cSmrgm4_defun([_LT_CHECK_SHELL_FEATURES], 87973e72ca8cSmrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 87983e72ca8cSmrg# Try some XSI features 87993e72ca8cSmrgxsi_shell=no 88003e72ca8cSmrg( _lt_dummy="a/b/c" 88013e72ca8cSmrg test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ 88023e72ca8cSmrg = c,a/b,b/c, \ 88033e72ca8cSmrg && eval 'test $(( 1 + 1 )) -eq 2 \ 88043e72ca8cSmrg && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 88053e72ca8cSmrg && xsi_shell=yes 88063e72ca8cSmrgAC_MSG_RESULT([$xsi_shell]) 88073e72ca8cSmrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 8808ee3138f1Smrg 88093e72ca8cSmrgAC_MSG_CHECKING([whether the shell understands "+="]) 88103e72ca8cSmrglt_shell_append=no 88113e72ca8cSmrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 88123e72ca8cSmrg >/dev/null 2>&1 \ 88133e72ca8cSmrg && lt_shell_append=yes 88143e72ca8cSmrgAC_MSG_RESULT([$lt_shell_append]) 88153e72ca8cSmrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 8816ee3138f1Smrg 88173e72ca8cSmrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 88183e72ca8cSmrg lt_unset=unset 88193e72ca8cSmrgelse 88203e72ca8cSmrg lt_unset=false 88213e72ca8cSmrgfi 88223e72ca8cSmrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 8823ee3138f1Smrg 88243e72ca8cSmrg# test EBCDIC or ASCII 88253e72ca8cSmrgcase `echo X|tr X '\101'` in 88263e72ca8cSmrg A) # ASCII based system 88273e72ca8cSmrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 88283e72ca8cSmrg lt_SP2NL='tr \040 \012' 88293e72ca8cSmrg lt_NL2SP='tr \015\012 \040\040' 88303e72ca8cSmrg ;; 88313e72ca8cSmrg *) # EBCDIC based system 88323e72ca8cSmrg lt_SP2NL='tr \100 \n' 88333e72ca8cSmrg lt_NL2SP='tr \r\n \100\100' 88343e72ca8cSmrg ;; 88353e72ca8cSmrgesac 88363e72ca8cSmrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 88373e72ca8cSmrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 88383e72ca8cSmrg])# _LT_CHECK_SHELL_FEATURES 88393e72ca8cSmrg 88403e72ca8cSmrg 88413e72ca8cSmrg# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) 88423e72ca8cSmrg# ------------------------------------------------------ 88433e72ca8cSmrg# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and 88443e72ca8cSmrg# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. 88453e72ca8cSmrgm4_defun([_LT_PROG_FUNCTION_REPLACE], 88463e72ca8cSmrg[dnl { 88473e72ca8cSmrgsed -e '/^$1 ()$/,/^} # $1 /c\ 88483e72ca8cSmrg$1 ()\ 88493e72ca8cSmrg{\ 88503e72ca8cSmrgm4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) 88513e72ca8cSmrg} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ 88523e72ca8cSmrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 88533e72ca8cSmrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 88543e72ca8cSmrgtest 0 -eq $? || _lt_function_replace_fail=: 8855a1ed278cSmrg]) 885634977a2fSmrg 885734977a2fSmrg 88583e72ca8cSmrg# _LT_PROG_REPLACE_SHELLFNS 88593e72ca8cSmrg# ------------------------- 88603e72ca8cSmrg# Replace existing portable implementations of several shell functions with 88613e72ca8cSmrg# equivalent extended shell implementations where those features are available.. 88623e72ca8cSmrgm4_defun([_LT_PROG_REPLACE_SHELLFNS], 88633e72ca8cSmrg[if test x"$xsi_shell" = xyes; then 88643e72ca8cSmrg _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl 88653e72ca8cSmrg case ${1} in 88663e72ca8cSmrg */*) func_dirname_result="${1%/*}${2}" ;; 88673e72ca8cSmrg * ) func_dirname_result="${3}" ;; 88683e72ca8cSmrg esac]) 88693e72ca8cSmrg 88703e72ca8cSmrg _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl 88713e72ca8cSmrg func_basename_result="${1##*/}"]) 88723e72ca8cSmrg 88733e72ca8cSmrg _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl 88743e72ca8cSmrg case ${1} in 88753e72ca8cSmrg */*) func_dirname_result="${1%/*}${2}" ;; 88763e72ca8cSmrg * ) func_dirname_result="${3}" ;; 88773e72ca8cSmrg esac 88783e72ca8cSmrg func_basename_result="${1##*/}"]) 887934977a2fSmrg 88803e72ca8cSmrg _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl 88813e72ca8cSmrg # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 88823e72ca8cSmrg # positional parameters, so assign one to ordinary parameter first. 88833e72ca8cSmrg func_stripname_result=${3} 88843e72ca8cSmrg func_stripname_result=${func_stripname_result#"${1}"} 88853e72ca8cSmrg func_stripname_result=${func_stripname_result%"${2}"}]) 888634977a2fSmrg 88873e72ca8cSmrg _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl 88883e72ca8cSmrg func_split_long_opt_name=${1%%=*} 88893e72ca8cSmrg func_split_long_opt_arg=${1#*=}]) 88903e72ca8cSmrg 88913e72ca8cSmrg _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl 88923e72ca8cSmrg func_split_short_opt_arg=${1#??} 88933e72ca8cSmrg func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) 88943e72ca8cSmrg 88953e72ca8cSmrg _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl 88963e72ca8cSmrg case ${1} in 88973e72ca8cSmrg *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 88983e72ca8cSmrg *) func_lo2o_result=${1} ;; 88993e72ca8cSmrg esac]) 89003e72ca8cSmrg 89013e72ca8cSmrg _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) 89023e72ca8cSmrg 89033e72ca8cSmrg _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) 89043e72ca8cSmrg 89053e72ca8cSmrg _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) 8906a1ed278cSmrgfi 890734977a2fSmrg 89083e72ca8cSmrgif test x"$lt_shell_append" = xyes; then 89093e72ca8cSmrg _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) 8910ee3138f1Smrg 89113e72ca8cSmrg _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl 89123e72ca8cSmrg func_quote_for_eval "${2}" 89133e72ca8cSmrgdnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ 89143e72ca8cSmrg eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) 8915ee3138f1Smrg 89163e72ca8cSmrg # Save a `func_append' function call where possible by direct use of '+=' 89173e72ca8cSmrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ 89183e72ca8cSmrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 89193e72ca8cSmrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 89203e72ca8cSmrg test 0 -eq $? || _lt_function_replace_fail=: 89213e72ca8cSmrgelse 89223e72ca8cSmrg # Save a `func_append' function call even when '+=' is not available 89233e72ca8cSmrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ 89243e72ca8cSmrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 89253e72ca8cSmrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 89263e72ca8cSmrg test 0 -eq $? || _lt_function_replace_fail=: 89273e72ca8cSmrgfi 8928ee3138f1Smrg 89293e72ca8cSmrgif test x"$_lt_function_replace_fail" = x":"; then 89303e72ca8cSmrg AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) 89313e72ca8cSmrgfi 89323e72ca8cSmrg]) 8933ee3138f1Smrg 89343e72ca8cSmrg# _LT_PATH_CONVERSION_FUNCTIONS 89353e72ca8cSmrg# ----------------------------- 89363e72ca8cSmrg# Determine which file name conversion functions should be used by 89373e72ca8cSmrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 89383e72ca8cSmrg# for certain cross-compile configurations and native mingw. 89393e72ca8cSmrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 89403e72ca8cSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 89413e72ca8cSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 89423e72ca8cSmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 89433e72ca8cSmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 89443e72ca8cSmrg[case $host in 89453e72ca8cSmrg *-*-mingw* ) 89463e72ca8cSmrg case $build in 89473e72ca8cSmrg *-*-mingw* ) # actually msys 89483e72ca8cSmrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 89493e72ca8cSmrg ;; 89503e72ca8cSmrg *-*-cygwin* ) 89513e72ca8cSmrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 89523e72ca8cSmrg ;; 89533e72ca8cSmrg * ) # otherwise, assume *nix 89543e72ca8cSmrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 89553e72ca8cSmrg ;; 89563e72ca8cSmrg esac 89573e72ca8cSmrg ;; 89583e72ca8cSmrg *-*-cygwin* ) 89593e72ca8cSmrg case $build in 89603e72ca8cSmrg *-*-mingw* ) # actually msys 89613e72ca8cSmrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 89623e72ca8cSmrg ;; 89633e72ca8cSmrg *-*-cygwin* ) 89643e72ca8cSmrg lt_cv_to_host_file_cmd=func_convert_file_noop 89653e72ca8cSmrg ;; 89663e72ca8cSmrg * ) # otherwise, assume *nix 89673e72ca8cSmrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 89683e72ca8cSmrg ;; 89693e72ca8cSmrg esac 89703e72ca8cSmrg ;; 89713e72ca8cSmrg * ) # unhandled hosts (and "normal" native builds) 89723e72ca8cSmrg lt_cv_to_host_file_cmd=func_convert_file_noop 89733e72ca8cSmrg ;; 89743e72ca8cSmrgesac 89753e72ca8cSmrg]) 89763e72ca8cSmrgto_host_file_cmd=$lt_cv_to_host_file_cmd 89773e72ca8cSmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 89783e72ca8cSmrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 89793e72ca8cSmrg [0], [convert $build file names to $host format])dnl 89803e72ca8cSmrg 89813e72ca8cSmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 89823e72ca8cSmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 89833e72ca8cSmrg[#assume ordinary cross tools, or native build. 89843e72ca8cSmrglt_cv_to_tool_file_cmd=func_convert_file_noop 89853e72ca8cSmrgcase $host in 89863e72ca8cSmrg *-*-mingw* ) 89873e72ca8cSmrg case $build in 89883e72ca8cSmrg *-*-mingw* ) # actually msys 89893e72ca8cSmrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 89903e72ca8cSmrg ;; 89913e72ca8cSmrg esac 89923e72ca8cSmrg ;; 89933e72ca8cSmrgesac 89943e72ca8cSmrg]) 89953e72ca8cSmrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 89963e72ca8cSmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 89973e72ca8cSmrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 89983e72ca8cSmrg [0], [convert $build files to toolchain format])dnl 89993e72ca8cSmrg])# _LT_PATH_CONVERSION_FUNCTIONS 90003e72ca8cSmrg 90013e72ca8cSmrg# Helper functions for option handling. -*- Autoconf -*- 9002a1ed278cSmrg# 90033e72ca8cSmrg# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, 90043e72ca8cSmrg# Inc. 90053e72ca8cSmrg# Written by Gary V. Vaughan, 2004 90063e72ca8cSmrg# 90073e72ca8cSmrg# This file is free software; the Free Software Foundation gives 90083e72ca8cSmrg# unlimited permission to copy and/or distribute it, with or without 90093e72ca8cSmrg# modifications, as long as this notice is preserved. 9010ee3138f1Smrg 90113e72ca8cSmrg# serial 7 ltoptions.m4 9012ee3138f1Smrg 90133e72ca8cSmrg# This is to help aclocal find these macros, as it can't see m4_define. 90143e72ca8cSmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 9015ee3138f1Smrg 9016ee3138f1Smrg 90173e72ca8cSmrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 90183e72ca8cSmrg# ------------------------------------------ 90193e72ca8cSmrgm4_define([_LT_MANGLE_OPTION], 90203e72ca8cSmrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 9021ee3138f1Smrg 9022ee3138f1Smrg 90233e72ca8cSmrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 90243e72ca8cSmrg# --------------------------------------- 90253e72ca8cSmrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 90263e72ca8cSmrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 90273e72ca8cSmrg# saved as a flag. 90283e72ca8cSmrgm4_define([_LT_SET_OPTION], 90293e72ca8cSmrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 90303e72ca8cSmrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 90313e72ca8cSmrg _LT_MANGLE_DEFUN([$1], [$2]), 90323e72ca8cSmrg [m4_warning([Unknown $1 option `$2'])])[]dnl 9033a1ed278cSmrg]) 90343e72ca8cSmrg 90353e72ca8cSmrg 90363e72ca8cSmrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 90373e72ca8cSmrg# ------------------------------------------------------------ 90383e72ca8cSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 90393e72ca8cSmrgm4_define([_LT_IF_OPTION], 90403e72ca8cSmrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 90413e72ca8cSmrg 90423e72ca8cSmrg 90433e72ca8cSmrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 90443e72ca8cSmrg# ------------------------------------------------------- 90453e72ca8cSmrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 90463e72ca8cSmrg# are set. 90473e72ca8cSmrgm4_define([_LT_UNLESS_OPTIONS], 90483e72ca8cSmrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 90493e72ca8cSmrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 90503e72ca8cSmrg [m4_define([$0_found])])])[]dnl 90513e72ca8cSmrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 90523e72ca8cSmrg])[]dnl 9053a1ed278cSmrg]) 9054ee3138f1Smrg 9055ee3138f1Smrg 90563e72ca8cSmrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 90573e72ca8cSmrg# ---------------------------------------- 90583e72ca8cSmrg# OPTION-LIST is a space-separated list of Libtool options associated 90593e72ca8cSmrg# with MACRO-NAME. If any OPTION has a matching handler declared with 90603e72ca8cSmrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 90613e72ca8cSmrg# the unknown option and exit. 90623e72ca8cSmrgm4_defun([_LT_SET_OPTIONS], 90633e72ca8cSmrg[# Set options 90643e72ca8cSmrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 90653e72ca8cSmrg [_LT_SET_OPTION([$1], _LT_Option)]) 90663e72ca8cSmrg 90673e72ca8cSmrgm4_if([$1],[LT_INIT],[ 90683e72ca8cSmrg dnl 90693e72ca8cSmrg dnl Simply set some default values (i.e off) if boolean options were not 90703e72ca8cSmrg dnl specified: 90713e72ca8cSmrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 90723e72ca8cSmrg ]) 90733e72ca8cSmrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 90743e72ca8cSmrg ]) 90753e72ca8cSmrg dnl 90763e72ca8cSmrg dnl If no reference was made to various pairs of opposing options, then 90773e72ca8cSmrg dnl we run the default mode handler for the pair. For example, if neither 90783e72ca8cSmrg dnl `shared' nor `disable-shared' was passed, we enable building of shared 90793e72ca8cSmrg dnl archives by default: 90803e72ca8cSmrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 90813e72ca8cSmrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 90823e72ca8cSmrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 90833e72ca8cSmrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 90843e72ca8cSmrg [_LT_ENABLE_FAST_INSTALL]) 90853e72ca8cSmrg ]) 90863e72ca8cSmrg])# _LT_SET_OPTIONS 9087ee3138f1Smrg 9088ee3138f1Smrg 9089ee3138f1Smrg 90903e72ca8cSmrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 90913e72ca8cSmrg# ----------------------------------------- 90923e72ca8cSmrgm4_define([_LT_MANGLE_DEFUN], 90933e72ca8cSmrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 9094b425557eSmrg 9095b425557eSmrg 90963e72ca8cSmrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 90973e72ca8cSmrg# ----------------------------------------------- 90983e72ca8cSmrgm4_define([LT_OPTION_DEFINE], 90993e72ca8cSmrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 91003e72ca8cSmrg])# LT_OPTION_DEFINE 9101ee3138f1Smrg 9102ee3138f1Smrg 91033e72ca8cSmrg# dlopen 91043e72ca8cSmrg# ------ 91053e72ca8cSmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 91063e72ca8cSmrg]) 9107ee3138f1Smrg 91083e72ca8cSmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 91093e72ca8cSmrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 91103e72ca8cSmrgAC_DIAGNOSE([obsolete], 91113e72ca8cSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 91123e72ca8cSmrgput the `dlopen' option into LT_INIT's first parameter.]) 9113b425557eSmrg]) 9114ee3138f1Smrg 91153e72ca8cSmrgdnl aclocal-1.4 backwards compatibility: 91163e72ca8cSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 9117ee3138f1Smrg 9118ee3138f1Smrg 91193e72ca8cSmrg# win32-dll 91203e72ca8cSmrg# --------- 91213e72ca8cSmrg# Declare package support for building win32 dll's. 91223e72ca8cSmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 91233e72ca8cSmrg[enable_win32_dll=yes 9124ee3138f1Smrg 91253e72ca8cSmrgcase $host in 91263e72ca8cSmrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 91273e72ca8cSmrg AC_CHECK_TOOL(AS, as, false) 91283e72ca8cSmrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 91293e72ca8cSmrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 91303e72ca8cSmrg ;; 91313e72ca8cSmrgesac 9132b425557eSmrg 91333e72ca8cSmrgtest -z "$AS" && AS=as 91343e72ca8cSmrg_LT_DECL([], [AS], [1], [Assembler program])dnl 9135ee3138f1Smrg 91363e72ca8cSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 91373e72ca8cSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 9138a1ed278cSmrg 91393e72ca8cSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 91403e72ca8cSmrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 91413e72ca8cSmrg])# win32-dll 9142a1ed278cSmrg 91433e72ca8cSmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 91443e72ca8cSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 91453e72ca8cSmrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 91463e72ca8cSmrgAC_DIAGNOSE([obsolete], 91473e72ca8cSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 91483e72ca8cSmrgput the `win32-dll' option into LT_INIT's first parameter.]) 91493e72ca8cSmrg]) 9150a1ed278cSmrg 91513e72ca8cSmrgdnl aclocal-1.4 backwards compatibility: 91523e72ca8cSmrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 91533e72ca8cSmrg 91543e72ca8cSmrg 91553e72ca8cSmrg# _LT_ENABLE_SHARED([DEFAULT]) 91563e72ca8cSmrg# ---------------------------- 91573e72ca8cSmrg# implement the --enable-shared flag, and supports the `shared' and 91583e72ca8cSmrg# `disable-shared' LT_INIT options. 91593e72ca8cSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 91603e72ca8cSmrgm4_define([_LT_ENABLE_SHARED], 91613e72ca8cSmrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 91623e72ca8cSmrgAC_ARG_ENABLE([shared], 91633e72ca8cSmrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 91643e72ca8cSmrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 91653e72ca8cSmrg [p=${PACKAGE-default} 91663e72ca8cSmrg case $enableval in 91673e72ca8cSmrg yes) enable_shared=yes ;; 91683e72ca8cSmrg no) enable_shared=no ;; 91693e72ca8cSmrg *) 91703e72ca8cSmrg enable_shared=no 91713e72ca8cSmrg # Look at the argument we got. We use all the common list separators. 91723e72ca8cSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 91733e72ca8cSmrg for pkg in $enableval; do 91743e72ca8cSmrg IFS="$lt_save_ifs" 91753e72ca8cSmrg if test "X$pkg" = "X$p"; then 91763e72ca8cSmrg enable_shared=yes 91773e72ca8cSmrg fi 91783e72ca8cSmrg done 91793e72ca8cSmrg IFS="$lt_save_ifs" 91803e72ca8cSmrg ;; 91813e72ca8cSmrg esac], 91823e72ca8cSmrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 91833e72ca8cSmrg 91843e72ca8cSmrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 91853e72ca8cSmrg [Whether or not to build shared libraries]) 91863e72ca8cSmrg])# _LT_ENABLE_SHARED 91873e72ca8cSmrg 91883e72ca8cSmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 91893e72ca8cSmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 91903e72ca8cSmrg 91913e72ca8cSmrg# Old names: 91923e72ca8cSmrgAC_DEFUN([AC_ENABLE_SHARED], 91933e72ca8cSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 9194b425557eSmrg]) 91953e72ca8cSmrg 91963e72ca8cSmrgAC_DEFUN([AC_DISABLE_SHARED], 91973e72ca8cSmrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 9198b425557eSmrg]) 9199ee3138f1Smrg 92003e72ca8cSmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 92013e72ca8cSmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 9202ee3138f1Smrg 92033e72ca8cSmrgdnl aclocal-1.4 backwards compatibility: 92043e72ca8cSmrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 92053e72ca8cSmrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 920634977a2fSmrg 920734977a2fSmrg 9208ee3138f1Smrg 92093e72ca8cSmrg# _LT_ENABLE_STATIC([DEFAULT]) 92103e72ca8cSmrg# ---------------------------- 92113e72ca8cSmrg# implement the --enable-static flag, and support the `static' and 92123e72ca8cSmrg# `disable-static' LT_INIT options. 92133e72ca8cSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 92143e72ca8cSmrgm4_define([_LT_ENABLE_STATIC], 92153e72ca8cSmrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 92163e72ca8cSmrgAC_ARG_ENABLE([static], 92173e72ca8cSmrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 92183e72ca8cSmrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 92193e72ca8cSmrg [p=${PACKAGE-default} 92203e72ca8cSmrg case $enableval in 92213e72ca8cSmrg yes) enable_static=yes ;; 92223e72ca8cSmrg no) enable_static=no ;; 92233e72ca8cSmrg *) 92243e72ca8cSmrg enable_static=no 92253e72ca8cSmrg # Look at the argument we got. We use all the common list separators. 92263e72ca8cSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 92273e72ca8cSmrg for pkg in $enableval; do 92283e72ca8cSmrg IFS="$lt_save_ifs" 92293e72ca8cSmrg if test "X$pkg" = "X$p"; then 92303e72ca8cSmrg enable_static=yes 92313e72ca8cSmrg fi 92323e72ca8cSmrg done 92333e72ca8cSmrg IFS="$lt_save_ifs" 92343e72ca8cSmrg ;; 92353e72ca8cSmrg esac], 92363e72ca8cSmrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 9237ee3138f1Smrg 92383e72ca8cSmrg _LT_DECL([build_old_libs], [enable_static], [0], 92393e72ca8cSmrg [Whether or not to build static libraries]) 92403e72ca8cSmrg])# _LT_ENABLE_STATIC 9241ee3138f1Smrg 92423e72ca8cSmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 92433e72ca8cSmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 9244ee3138f1Smrg 92453e72ca8cSmrg# Old names: 92463e72ca8cSmrgAC_DEFUN([AC_ENABLE_STATIC], 92473e72ca8cSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 92483e72ca8cSmrg]) 9249ee3138f1Smrg 92503e72ca8cSmrgAC_DEFUN([AC_DISABLE_STATIC], 92513e72ca8cSmrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 92523e72ca8cSmrg]) 9253ee3138f1Smrg 92543e72ca8cSmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 92553e72ca8cSmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 92563e72ca8cSmrg 92573e72ca8cSmrgdnl aclocal-1.4 backwards compatibility: 92583e72ca8cSmrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 92593e72ca8cSmrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 9260ee3138f1Smrg 9261ee3138f1Smrg 9262ee3138f1Smrg 92633e72ca8cSmrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 9264a1ed278cSmrg# ---------------------------------- 92653e72ca8cSmrg# implement the --enable-fast-install flag, and support the `fast-install' 92663e72ca8cSmrg# and `disable-fast-install' LT_INIT options. 92673e72ca8cSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 92683e72ca8cSmrgm4_define([_LT_ENABLE_FAST_INSTALL], 92693e72ca8cSmrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 92703e72ca8cSmrgAC_ARG_ENABLE([fast-install], 92713e72ca8cSmrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 92723e72ca8cSmrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 92733e72ca8cSmrg [p=${PACKAGE-default} 92743e72ca8cSmrg case $enableval in 92753e72ca8cSmrg yes) enable_fast_install=yes ;; 92763e72ca8cSmrg no) enable_fast_install=no ;; 92773e72ca8cSmrg *) 92783e72ca8cSmrg enable_fast_install=no 92793e72ca8cSmrg # Look at the argument we got. We use all the common list separators. 92803e72ca8cSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 92813e72ca8cSmrg for pkg in $enableval; do 92823e72ca8cSmrg IFS="$lt_save_ifs" 92833e72ca8cSmrg if test "X$pkg" = "X$p"; then 92843e72ca8cSmrg enable_fast_install=yes 92853e72ca8cSmrg fi 92863e72ca8cSmrg done 92873e72ca8cSmrg IFS="$lt_save_ifs" 92883e72ca8cSmrg ;; 92893e72ca8cSmrg esac], 92903e72ca8cSmrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 9291ee3138f1Smrg 92923e72ca8cSmrg_LT_DECL([fast_install], [enable_fast_install], [0], 92933e72ca8cSmrg [Whether or not to optimize for fast installation])dnl 92943e72ca8cSmrg])# _LT_ENABLE_FAST_INSTALL 929579a8a9c6Smrg 92963e72ca8cSmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 92973e72ca8cSmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 929879a8a9c6Smrg 92993e72ca8cSmrg# Old names: 93003e72ca8cSmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 93013e72ca8cSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 93023e72ca8cSmrgAC_DIAGNOSE([obsolete], 93033e72ca8cSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 93043e72ca8cSmrgthe `fast-install' option into LT_INIT's first parameter.]) 93053e72ca8cSmrg]) 930679a8a9c6Smrg 93073e72ca8cSmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 93083e72ca8cSmrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 93093e72ca8cSmrgAC_DIAGNOSE([obsolete], 93103e72ca8cSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 93113e72ca8cSmrgthe `disable-fast-install' option into LT_INIT's first parameter.]) 93123e72ca8cSmrg]) 931379a8a9c6Smrg 93143e72ca8cSmrgdnl aclocal-1.4 backwards compatibility: 93153e72ca8cSmrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 93163e72ca8cSmrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 93173e72ca8cSmrg 93183e72ca8cSmrg 93193e72ca8cSmrg# _LT_WITH_PIC([MODE]) 93203e72ca8cSmrg# -------------------- 93213e72ca8cSmrg# implement the --with-pic flag, and support the `pic-only' and `no-pic' 93223e72ca8cSmrg# LT_INIT options. 93233e72ca8cSmrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 93243e72ca8cSmrgm4_define([_LT_WITH_PIC], 93253e72ca8cSmrg[AC_ARG_WITH([pic], 93263e72ca8cSmrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 93273e72ca8cSmrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 93283e72ca8cSmrg [lt_p=${PACKAGE-default} 93293e72ca8cSmrg case $withval in 93303e72ca8cSmrg yes|no) pic_mode=$withval ;; 93313e72ca8cSmrg *) 93323e72ca8cSmrg pic_mode=default 93333e72ca8cSmrg # Look at the argument we got. We use all the common list separators. 93343e72ca8cSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 93353e72ca8cSmrg for lt_pkg in $withval; do 93363e72ca8cSmrg IFS="$lt_save_ifs" 93373e72ca8cSmrg if test "X$lt_pkg" = "X$lt_p"; then 93383e72ca8cSmrg pic_mode=yes 93393e72ca8cSmrg fi 93403e72ca8cSmrg done 93413e72ca8cSmrg IFS="$lt_save_ifs" 93423e72ca8cSmrg ;; 93433e72ca8cSmrg esac], 93443e72ca8cSmrg [pic_mode=default]) 93453e72ca8cSmrg 93463e72ca8cSmrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 93473e72ca8cSmrg 93483e72ca8cSmrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 93493e72ca8cSmrg])# _LT_WITH_PIC 93503e72ca8cSmrg 93513e72ca8cSmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 93523e72ca8cSmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 93533e72ca8cSmrg 93543e72ca8cSmrg# Old name: 93553e72ca8cSmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 93563e72ca8cSmrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 93573e72ca8cSmrgAC_DIAGNOSE([obsolete], 93583e72ca8cSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 93593e72ca8cSmrgput the `pic-only' option into LT_INIT's first parameter.]) 9360a1ed278cSmrg]) 9361ee3138f1Smrg 93623e72ca8cSmrgdnl aclocal-1.4 backwards compatibility: 93633e72ca8cSmrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 93643e72ca8cSmrg 93653e72ca8cSmrg 93663e72ca8cSmrgm4_define([_LTDL_MODE], []) 93673e72ca8cSmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 93683e72ca8cSmrg [m4_define([_LTDL_MODE], [nonrecursive])]) 93693e72ca8cSmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 93703e72ca8cSmrg [m4_define([_LTDL_MODE], [recursive])]) 93713e72ca8cSmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 93723e72ca8cSmrg [m4_define([_LTDL_MODE], [subproject])]) 9373ee3138f1Smrg 93743e72ca8cSmrgm4_define([_LTDL_TYPE], []) 93753e72ca8cSmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 93763e72ca8cSmrg [m4_define([_LTDL_TYPE], [installable])]) 93773e72ca8cSmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 93783e72ca8cSmrg [m4_define([_LTDL_TYPE], [convenience])]) 93793e72ca8cSmrg 93803e72ca8cSmrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 9381a1ed278cSmrg# 93823e72ca8cSmrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 93833e72ca8cSmrg# Written by Gary V. Vaughan, 2004 93843e72ca8cSmrg# 93853e72ca8cSmrg# This file is free software; the Free Software Foundation gives 93863e72ca8cSmrg# unlimited permission to copy and/or distribute it, with or without 93873e72ca8cSmrg# modifications, as long as this notice is preserved. 9388ee3138f1Smrg 93893e72ca8cSmrg# serial 6 ltsugar.m4 9390ee3138f1Smrg 93913e72ca8cSmrg# This is to help aclocal find these macros, as it can't see m4_define. 93923e72ca8cSmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 9393ee3138f1Smrg 9394ee3138f1Smrg 93953e72ca8cSmrg# lt_join(SEP, ARG1, [ARG2...]) 93963e72ca8cSmrg# ----------------------------- 93973e72ca8cSmrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 93983e72ca8cSmrg# associated separator. 93993e72ca8cSmrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 94003e72ca8cSmrg# versions in m4sugar had bugs. 94013e72ca8cSmrgm4_define([lt_join], 94023e72ca8cSmrg[m4_if([$#], [1], [], 94033e72ca8cSmrg [$#], [2], [[$2]], 94043e72ca8cSmrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 94053e72ca8cSmrgm4_define([_lt_join], 94063e72ca8cSmrg[m4_if([$#$2], [2], [], 94073e72ca8cSmrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 9408b425557eSmrg 940934977a2fSmrg 94103e72ca8cSmrg# lt_car(LIST) 94113e72ca8cSmrg# lt_cdr(LIST) 94123e72ca8cSmrg# ------------ 94133e72ca8cSmrg# Manipulate m4 lists. 94143e72ca8cSmrg# These macros are necessary as long as will still need to support 94153e72ca8cSmrg# Autoconf-2.59 which quotes differently. 94163e72ca8cSmrgm4_define([lt_car], [[$1]]) 94173e72ca8cSmrgm4_define([lt_cdr], 94183e72ca8cSmrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 94193e72ca8cSmrg [$#], 1, [], 94203e72ca8cSmrg [m4_dquote(m4_shift($@))])]) 94213e72ca8cSmrgm4_define([lt_unquote], $1) 942234977a2fSmrg 942334977a2fSmrg 94243e72ca8cSmrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 94253e72ca8cSmrg# ------------------------------------------ 94263e72ca8cSmrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 94273e72ca8cSmrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 94283e72ca8cSmrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 94293e72ca8cSmrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 94303e72ca8cSmrg# than defined and empty). 9431a1ed278cSmrg# 94323e72ca8cSmrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 94333e72ca8cSmrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 94343e72ca8cSmrgm4_define([lt_append], 94353e72ca8cSmrg[m4_define([$1], 94363e72ca8cSmrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 943734977a2fSmrg 943834977a2fSmrg 943934977a2fSmrg 94403e72ca8cSmrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 94413e72ca8cSmrg# ---------------------------------------------------------- 94423e72ca8cSmrg# Produce a SEP delimited list of all paired combinations of elements of 94433e72ca8cSmrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 94443e72ca8cSmrg# has the form PREFIXmINFIXSUFFIXn. 94453e72ca8cSmrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 94463e72ca8cSmrgm4_define([lt_combine], 94473e72ca8cSmrg[m4_if(m4_eval([$# > 3]), [1], 94483e72ca8cSmrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 94493e72ca8cSmrg[[m4_foreach([_Lt_prefix], [$2], 94503e72ca8cSmrg [m4_foreach([_Lt_suffix], 94513e72ca8cSmrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 94523e72ca8cSmrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 9453b425557eSmrg 9454b425557eSmrg 94553e72ca8cSmrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 94563e72ca8cSmrg# ----------------------------------------------------------------------- 94573e72ca8cSmrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 94583e72ca8cSmrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 94593e72ca8cSmrgm4_define([lt_if_append_uniq], 94603e72ca8cSmrg[m4_ifdef([$1], 94613e72ca8cSmrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 94623e72ca8cSmrg [lt_append([$1], [$2], [$3])$4], 94633e72ca8cSmrg [$5])], 94643e72ca8cSmrg [lt_append([$1], [$2], [$3])$4])]) 9465b425557eSmrg 946634977a2fSmrg 94673e72ca8cSmrg# lt_dict_add(DICT, KEY, VALUE) 94683e72ca8cSmrg# ----------------------------- 94693e72ca8cSmrgm4_define([lt_dict_add], 94703e72ca8cSmrg[m4_define([$1($2)], [$3])]) 947134977a2fSmrg 947234977a2fSmrg 94733e72ca8cSmrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 94743e72ca8cSmrg# -------------------------------------------- 94753e72ca8cSmrgm4_define([lt_dict_add_subkey], 94763e72ca8cSmrg[m4_define([$1($2:$3)], [$4])]) 9477a1ed278cSmrg 947834977a2fSmrg 94793e72ca8cSmrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 94803e72ca8cSmrg# ---------------------------------- 94813e72ca8cSmrgm4_define([lt_dict_fetch], 94823e72ca8cSmrg[m4_ifval([$3], 94833e72ca8cSmrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 94843e72ca8cSmrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 948534977a2fSmrg 948634977a2fSmrg 94873e72ca8cSmrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 94883e72ca8cSmrg# ----------------------------------------------------------------- 94893e72ca8cSmrgm4_define([lt_if_dict_fetch], 94903e72ca8cSmrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 94913e72ca8cSmrg [$5], 94923e72ca8cSmrg [$6])]) 9493a1ed278cSmrg 94943e72ca8cSmrg 94953e72ca8cSmrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 94963e72ca8cSmrg# -------------------------------------------------------------- 94973e72ca8cSmrgm4_define([lt_dict_filter], 94983e72ca8cSmrg[m4_if([$5], [], [], 94993e72ca8cSmrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 95003e72ca8cSmrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 95013e72ca8cSmrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 9502b425557eSmrg]) 950334977a2fSmrg 95043e72ca8cSmrg# ltversion.m4 -- version numbers -*- Autoconf -*- 9505a1ed278cSmrg# 95063e72ca8cSmrg# Copyright (C) 2004 Free Software Foundation, Inc. 95073e72ca8cSmrg# Written by Scott James Remnant, 2004 95083e72ca8cSmrg# 95093e72ca8cSmrg# This file is free software; the Free Software Foundation gives 95103e72ca8cSmrg# unlimited permission to copy and/or distribute it, with or without 95113e72ca8cSmrg# modifications, as long as this notice is preserved. 95123e72ca8cSmrg 95133e72ca8cSmrg# @configure_input@ 95143e72ca8cSmrg 95153e72ca8cSmrg# serial 3337 ltversion.m4 95163e72ca8cSmrg# This file is part of GNU Libtool 95173e72ca8cSmrg 95183e72ca8cSmrgm4_define([LT_PACKAGE_VERSION], [2.4.2]) 95193e72ca8cSmrgm4_define([LT_PACKAGE_REVISION], [1.3337]) 95203e72ca8cSmrg 95213e72ca8cSmrgAC_DEFUN([LTVERSION_VERSION], 95223e72ca8cSmrg[macro_version='2.4.2' 95233e72ca8cSmrgmacro_revision='1.3337' 95243e72ca8cSmrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 95253e72ca8cSmrg_LT_DECL(, macro_revision, 0) 95263e72ca8cSmrg]) 9527ee3138f1Smrg 95283e72ca8cSmrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 9529a1ed278cSmrg# 95303e72ca8cSmrg# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. 95313e72ca8cSmrg# Written by Scott James Remnant, 2004. 95323e72ca8cSmrg# 95333e72ca8cSmrg# This file is free software; the Free Software Foundation gives 95343e72ca8cSmrg# unlimited permission to copy and/or distribute it, with or without 95353e72ca8cSmrg# modifications, as long as this notice is preserved. 9536ee3138f1Smrg 95373e72ca8cSmrg# serial 5 lt~obsolete.m4 9538ee3138f1Smrg 95393e72ca8cSmrg# These exist entirely to fool aclocal when bootstrapping libtool. 95403e72ca8cSmrg# 95413e72ca8cSmrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 95423e72ca8cSmrg# which have later been changed to m4_define as they aren't part of the 95433e72ca8cSmrg# exported API, or moved to Autoconf or Automake where they belong. 95443e72ca8cSmrg# 95453e72ca8cSmrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 95463e72ca8cSmrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 95473e72ca8cSmrg# using a macro with the same name in our local m4/libtool.m4 it'll 95483e72ca8cSmrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 95493e72ca8cSmrg# and doesn't know about Autoconf macros at all.) 95503e72ca8cSmrg# 95513e72ca8cSmrg# So we provide this file, which has a silly filename so it's always 95523e72ca8cSmrg# included after everything else. This provides aclocal with the 95533e72ca8cSmrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 95543e72ca8cSmrg# because those macros already exist, or will be overwritten later. 95553e72ca8cSmrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 95563e72ca8cSmrg# 95573e72ca8cSmrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 95583e72ca8cSmrg# Yes, that means every name once taken will need to remain here until 95593e72ca8cSmrg# we give up compatibility with versions before 1.7, at which point 95603e72ca8cSmrg# we need to keep only those names which we still refer to. 9561ee3138f1Smrg 95623e72ca8cSmrg# This is to help aclocal find these macros, as it can't see m4_define. 95633e72ca8cSmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 956434977a2fSmrg 95653e72ca8cSmrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 95663e72ca8cSmrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 95673e72ca8cSmrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 95683e72ca8cSmrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 95693e72ca8cSmrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 95703e72ca8cSmrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 95713e72ca8cSmrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 95723e72ca8cSmrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 95733e72ca8cSmrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 95743e72ca8cSmrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 95753e72ca8cSmrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 95763e72ca8cSmrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 95773e72ca8cSmrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 95783e72ca8cSmrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 95793e72ca8cSmrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 95803e72ca8cSmrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 95813e72ca8cSmrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 95823e72ca8cSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 95833e72ca8cSmrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 95843e72ca8cSmrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 95853e72ca8cSmrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 95863e72ca8cSmrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 95873e72ca8cSmrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 95883e72ca8cSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 95893e72ca8cSmrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 95903e72ca8cSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 95913e72ca8cSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 95923e72ca8cSmrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 95933e72ca8cSmrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 95943e72ca8cSmrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 95953e72ca8cSmrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 95963e72ca8cSmrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 95973e72ca8cSmrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 95983e72ca8cSmrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 95993e72ca8cSmrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 96003e72ca8cSmrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 96013e72ca8cSmrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 96023e72ca8cSmrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 96033e72ca8cSmrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 96043e72ca8cSmrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 96053e72ca8cSmrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 96063e72ca8cSmrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 96073e72ca8cSmrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 96083e72ca8cSmrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 96093e72ca8cSmrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 96103e72ca8cSmrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 96113e72ca8cSmrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 96123e72ca8cSmrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 96133e72ca8cSmrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 96143e72ca8cSmrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 96153e72ca8cSmrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 96163e72ca8cSmrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 96173e72ca8cSmrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 96183e72ca8cSmrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 96193e72ca8cSmrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 96203e72ca8cSmrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 96213e72ca8cSmrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 96223e72ca8cSmrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 96233e72ca8cSmrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 96243e72ca8cSmrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 96253e72ca8cSmrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 9626a1ed278cSmrg 96273e72ca8cSmrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 96283e72ca8cSmrg# serial 1 (pkg-config-0.24) 96293e72ca8cSmrg# 96303e72ca8cSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 9631a1ed278cSmrg# 96323e72ca8cSmrg# This program is free software; you can redistribute it and/or modify 96333e72ca8cSmrg# it under the terms of the GNU General Public License as published by 96343e72ca8cSmrg# the Free Software Foundation; either version 2 of the License, or 96353e72ca8cSmrg# (at your option) any later version. 96363e72ca8cSmrg# 96373e72ca8cSmrg# This program is distributed in the hope that it will be useful, but 96383e72ca8cSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 96393e72ca8cSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 96403e72ca8cSmrg# General Public License for more details. 96413e72ca8cSmrg# 96423e72ca8cSmrg# You should have received a copy of the GNU General Public License 96433e72ca8cSmrg# along with this program; if not, write to the Free Software 96443e72ca8cSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 96453e72ca8cSmrg# 96463e72ca8cSmrg# As a special exception to the GNU General Public License, if you 96473e72ca8cSmrg# distribute this file as part of a program that contains a 96483e72ca8cSmrg# configuration script generated by Autoconf, you may include it under 96493e72ca8cSmrg# the same distribution terms that you use for the rest of that program. 9650a1ed278cSmrg 96513e72ca8cSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 96523e72ca8cSmrg# ---------------------------------- 96533e72ca8cSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 96543e72ca8cSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 96553e72ca8cSmrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 96563e72ca8cSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 96573e72ca8cSmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 96583e72ca8cSmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 9659b425557eSmrg 96603e72ca8cSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 96613e72ca8cSmrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 96623e72ca8cSmrgfi 96633e72ca8cSmrgif test -n "$PKG_CONFIG"; then 96643e72ca8cSmrg _pkg_min_version=m4_default([$1], [0.9.0]) 96653e72ca8cSmrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 96663e72ca8cSmrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 96673e72ca8cSmrg AC_MSG_RESULT([yes]) 96683e72ca8cSmrg else 96693e72ca8cSmrg AC_MSG_RESULT([no]) 96703e72ca8cSmrg PKG_CONFIG="" 96713e72ca8cSmrg fi 96723e72ca8cSmrgfi[]dnl 96733e72ca8cSmrg])# PKG_PROG_PKG_CONFIG 96743e72ca8cSmrg 96753e72ca8cSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 9676a1ed278cSmrg# 96773e72ca8cSmrg# Check to see whether a particular set of modules exists. Similar 96783e72ca8cSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 9679a1ed278cSmrg# 96803e72ca8cSmrg# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 96813e72ca8cSmrg# only at the first occurence in configure.ac, so if the first place 96823e72ca8cSmrg# it's called might be skipped (such as if it is within an "if", you 96833e72ca8cSmrg# have to call PKG_CHECK_EXISTS manually 96843e72ca8cSmrg# -------------------------------------------------------------- 96853e72ca8cSmrgAC_DEFUN([PKG_CHECK_EXISTS], 96863e72ca8cSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 96873e72ca8cSmrgif test -n "$PKG_CONFIG" && \ 96883e72ca8cSmrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 96893e72ca8cSmrg m4_default([$2], [:]) 96903e72ca8cSmrgm4_ifvaln([$3], [else 96913e72ca8cSmrg $3])dnl 96923e72ca8cSmrgfi]) 96933e72ca8cSmrg 96943e72ca8cSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 96953e72ca8cSmrg# --------------------------------------------- 96963e72ca8cSmrgm4_define([_PKG_CONFIG], 96973e72ca8cSmrg[if test -n "$$1"; then 96983e72ca8cSmrg pkg_cv_[]$1="$$1" 96993e72ca8cSmrg elif test -n "$PKG_CONFIG"; then 97003e72ca8cSmrg PKG_CHECK_EXISTS([$3], 97013e72ca8cSmrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 97023e72ca8cSmrg [pkg_failed=yes]) 97033e72ca8cSmrg else 97043e72ca8cSmrg pkg_failed=untried 97053e72ca8cSmrgfi[]dnl 97063e72ca8cSmrg])# _PKG_CONFIG 97073e72ca8cSmrg 97083e72ca8cSmrg# _PKG_SHORT_ERRORS_SUPPORTED 97093e72ca8cSmrg# ----------------------------- 97103e72ca8cSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 97113e72ca8cSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 97123e72ca8cSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 97133e72ca8cSmrg _pkg_short_errors_supported=yes 97143e72ca8cSmrgelse 97153e72ca8cSmrg _pkg_short_errors_supported=no 97163e72ca8cSmrgfi[]dnl 97173e72ca8cSmrg])# _PKG_SHORT_ERRORS_SUPPORTED 9718b425557eSmrg 9719b425557eSmrg 97203e72ca8cSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 97213e72ca8cSmrg# [ACTION-IF-NOT-FOUND]) 97223e72ca8cSmrg# 97233e72ca8cSmrg# 97243e72ca8cSmrg# Note that if there is a possibility the first call to 97253e72ca8cSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 97263e72ca8cSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 97273e72ca8cSmrg# 97283e72ca8cSmrg# 97293e72ca8cSmrg# -------------------------------------------------------------- 97303e72ca8cSmrgAC_DEFUN([PKG_CHECK_MODULES], 97313e72ca8cSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 97323e72ca8cSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 97333e72ca8cSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 9734b425557eSmrg 97353e72ca8cSmrgpkg_failed=no 97363e72ca8cSmrgAC_MSG_CHECKING([for $1]) 97373e72ca8cSmrg 97383e72ca8cSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 97393e72ca8cSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 97403e72ca8cSmrg 97413e72ca8cSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 97423e72ca8cSmrgand $1[]_LIBS to avoid the need to call pkg-config. 97433e72ca8cSmrgSee the pkg-config man page for more details.]) 97443e72ca8cSmrg 97453e72ca8cSmrgif test $pkg_failed = yes; then 97463e72ca8cSmrg AC_MSG_RESULT([no]) 97473e72ca8cSmrg _PKG_SHORT_ERRORS_SUPPORTED 97483e72ca8cSmrg if test $_pkg_short_errors_supported = yes; then 97493e72ca8cSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 97503e72ca8cSmrg else 97513e72ca8cSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 97523e72ca8cSmrg fi 97533e72ca8cSmrg # Put the nasty error message in config.log where it belongs 97543e72ca8cSmrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 97553e72ca8cSmrg 97563e72ca8cSmrg m4_default([$4], [AC_MSG_ERROR( 97573e72ca8cSmrg[Package requirements ($2) were not met: 97583e72ca8cSmrg 97593e72ca8cSmrg$$1_PKG_ERRORS 97603e72ca8cSmrg 97613e72ca8cSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 97623e72ca8cSmrginstalled software in a non-standard prefix. 97633e72ca8cSmrg 97643e72ca8cSmrg_PKG_TEXT]) 97653e72ca8cSmrg ]) 97663e72ca8cSmrgelif test $pkg_failed = untried; then 97673e72ca8cSmrg AC_MSG_RESULT([no]) 97683e72ca8cSmrg m4_default([$4], [AC_MSG_FAILURE( 97693e72ca8cSmrg[The pkg-config script could not be found or is too old. Make sure it 97703e72ca8cSmrgis in your PATH or set the PKG_CONFIG environment variable to the full 97713e72ca8cSmrgpath to pkg-config. 97723e72ca8cSmrg 97733e72ca8cSmrg_PKG_TEXT 97743e72ca8cSmrg 97753e72ca8cSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.]) 97763e72ca8cSmrg ]) 97773e72ca8cSmrgelse 97783e72ca8cSmrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 97793e72ca8cSmrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 97803e72ca8cSmrg AC_MSG_RESULT([yes]) 97813e72ca8cSmrg $3 97823e72ca8cSmrgfi[]dnl 97833e72ca8cSmrg])# PKG_CHECK_MODULES 9784b425557eSmrg 9785a1ed278cSmrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 9786a1ed278cSmrgdnl 9787a1ed278cSmrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 9788a1ed278cSmrgdnl 9789a1ed278cSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 9790a1ed278cSmrgdnl copy of this software and associated documentation files (the "Software"), 9791a1ed278cSmrgdnl to deal in the Software without restriction, including without limitation 9792a1ed278cSmrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 9793a1ed278cSmrgdnl and/or sell copies of the Software, and to permit persons to whom the 9794a1ed278cSmrgdnl Software is furnished to do so, subject to the following conditions: 9795a1ed278cSmrgdnl 9796a1ed278cSmrgdnl The above copyright notice and this permission notice (including the next 9797a1ed278cSmrgdnl paragraph) shall be included in all copies or substantial portions of the 9798a1ed278cSmrgdnl Software. 9799a1ed278cSmrgdnl 9800a1ed278cSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 9801a1ed278cSmrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 9802a1ed278cSmrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 9803a1ed278cSmrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 9804a1ed278cSmrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 9805a1ed278cSmrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 9806a1ed278cSmrgdnl DEALINGS IN THE SOFTWARE. 980734977a2fSmrg 9808a1ed278cSmrg# XORG_MACROS_VERSION(required-version) 9809a1ed278cSmrg# ------------------------------------- 9810a1ed278cSmrg# Minimum version: 1.1.0 9811a1ed278cSmrg# 9812a1ed278cSmrg# If you're using a macro added in Version 1.1 or newer, include this in 9813a1ed278cSmrg# your configure.ac with the minimum required version, such as: 9814a1ed278cSmrg# XORG_MACROS_VERSION(1.1) 9815a1ed278cSmrg# 9816a1ed278cSmrg# To ensure that this macro is defined, also add: 9817a1ed278cSmrg# m4_ifndef([XORG_MACROS_VERSION], 9818a1ed278cSmrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 9819a1ed278cSmrg# 9820a1ed278cSmrg# 9821a1ed278cSmrg# See the "minimum version" comment for each macro you use to see what 9822a1ed278cSmrg# version you require. 9823a1ed278cSmrgm4_defun([XORG_MACROS_VERSION],[ 98243e72ca8cSmrgm4_define([vers_have], [1.17]) 9825a1ed278cSmrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 9826a1ed278cSmrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 9827a1ed278cSmrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 9828a1ed278cSmrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 9829a1ed278cSmrgm4_if(m4_version_compare(vers_have, [$1]), -1, 9830a1ed278cSmrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 9831a1ed278cSmrgm4_undefine([vers_have]) 9832a1ed278cSmrgm4_undefine([maj_have]) 9833a1ed278cSmrgm4_undefine([maj_needed]) 9834a1ed278cSmrg]) # XORG_MACROS_VERSION 983534977a2fSmrg 9836a1ed278cSmrg# XORG_PROG_RAWCPP() 9837a1ed278cSmrg# ------------------ 9838a1ed278cSmrg# Minimum version: 1.0.0 9839a1ed278cSmrg# 9840a1ed278cSmrg# Find cpp program and necessary flags for use in pre-processing text files 9841a1ed278cSmrg# such as man pages and config files 9842a1ed278cSmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 9843a1ed278cSmrgAC_REQUIRE([AC_PROG_CPP]) 9844a1ed278cSmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 9845a1ed278cSmrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 9846ee3138f1Smrg 9847a1ed278cSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 9848a1ed278cSmrg# which is not the best choice for supporting other OS'es, but covers most 9849a1ed278cSmrg# of the ones we need for now. 9850a1ed278cSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 98513e72ca8cSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 9852a1ed278cSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9853a1ed278cSmrg AC_MSG_RESULT([no]) 9854a1ed278cSmrgelse 9855a1ed278cSmrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9856a1ed278cSmrg RAWCPPFLAGS=-undef 9857a1ed278cSmrg AC_MSG_RESULT([yes]) 9858a1ed278cSmrg # under Cygwin unix is still defined even with -undef 9859a1ed278cSmrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9860a1ed278cSmrg RAWCPPFLAGS="-undef -ansi" 9861a1ed278cSmrg AC_MSG_RESULT([yes, with -ansi]) 9862a1ed278cSmrg else 9863a1ed278cSmrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 9864a1ed278cSmrg fi 9865a1ed278cSmrgfi 9866a1ed278cSmrgrm -f conftest.$ac_ext 9867ee3138f1Smrg 9868a1ed278cSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 98693e72ca8cSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 9870a1ed278cSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 9871a1ed278cSmrg AC_MSG_RESULT([no]) 9872a1ed278cSmrgelse 9873a1ed278cSmrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 9874a1ed278cSmrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 9875a1ed278cSmrg AC_MSG_RESULT([yes]) 9876a1ed278cSmrg else 9877a1ed278cSmrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 9878a1ed278cSmrg fi 9879a1ed278cSmrgfi 9880a1ed278cSmrgrm -f conftest.$ac_ext 9881a1ed278cSmrgAC_SUBST(RAWCPPFLAGS) 9882a1ed278cSmrg]) # XORG_PROG_RAWCPP 9883ee3138f1Smrg 9884a1ed278cSmrg# XORG_MANPAGE_SECTIONS() 9885a1ed278cSmrg# ----------------------- 9886a1ed278cSmrg# Minimum version: 1.0.0 9887a1ed278cSmrg# 9888a1ed278cSmrg# Determine which sections man pages go in for the different man page types 9889a1ed278cSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 9890a1ed278cSmrg# Not sure if there's any better way than just hardcoding by OS name. 9891a1ed278cSmrg# Override default settings by setting environment variables 9892a1ed278cSmrg# Added MAN_SUBSTS in version 1.8 9893a1ed278cSmrg# Added AC_PROG_SED in version 1.8 9894b425557eSmrg 9895a1ed278cSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 9896a1ed278cSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 9897a1ed278cSmrgAC_REQUIRE([AC_PROG_SED]) 9898b425557eSmrg 9899a1ed278cSmrgif test x$APP_MAN_SUFFIX = x ; then 9900a1ed278cSmrg APP_MAN_SUFFIX=1 9901a1ed278cSmrgfi 9902a1ed278cSmrgif test x$APP_MAN_DIR = x ; then 9903a1ed278cSmrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 9904a1ed278cSmrgfi 9905ee3138f1Smrg 9906a1ed278cSmrgif test x$LIB_MAN_SUFFIX = x ; then 9907a1ed278cSmrg LIB_MAN_SUFFIX=3 9908a1ed278cSmrgfi 9909a1ed278cSmrgif test x$LIB_MAN_DIR = x ; then 9910a1ed278cSmrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 9911a1ed278cSmrgfi 9912ee3138f1Smrg 9913a1ed278cSmrgif test x$FILE_MAN_SUFFIX = x ; then 9914a1ed278cSmrg case $host_os in 9915a1ed278cSmrg solaris*) FILE_MAN_SUFFIX=4 ;; 9916a1ed278cSmrg *) FILE_MAN_SUFFIX=5 ;; 9917a1ed278cSmrg esac 9918a1ed278cSmrgfi 9919a1ed278cSmrgif test x$FILE_MAN_DIR = x ; then 9920a1ed278cSmrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 9921a1ed278cSmrgfi 9922ee3138f1Smrg 9923a1ed278cSmrgif test x$MISC_MAN_SUFFIX = x ; then 9924a1ed278cSmrg case $host_os in 9925a1ed278cSmrg solaris*) MISC_MAN_SUFFIX=5 ;; 9926a1ed278cSmrg *) MISC_MAN_SUFFIX=7 ;; 9927a1ed278cSmrg esac 9928a1ed278cSmrgfi 9929a1ed278cSmrgif test x$MISC_MAN_DIR = x ; then 9930a1ed278cSmrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 9931a1ed278cSmrgfi 9932ee3138f1Smrg 9933a1ed278cSmrgif test x$DRIVER_MAN_SUFFIX = x ; then 9934a1ed278cSmrg case $host_os in 9935a1ed278cSmrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 9936a1ed278cSmrg *) DRIVER_MAN_SUFFIX=4 ;; 9937a1ed278cSmrg esac 9938a1ed278cSmrgfi 9939a1ed278cSmrgif test x$DRIVER_MAN_DIR = x ; then 9940a1ed278cSmrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 9941a1ed278cSmrgfi 9942ee3138f1Smrg 9943a1ed278cSmrgif test x$ADMIN_MAN_SUFFIX = x ; then 9944a1ed278cSmrg case $host_os in 9945a1ed278cSmrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 9946a1ed278cSmrg *) ADMIN_MAN_SUFFIX=8 ;; 9947a1ed278cSmrg esac 9948a1ed278cSmrgfi 9949a1ed278cSmrgif test x$ADMIN_MAN_DIR = x ; then 9950a1ed278cSmrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 9951a1ed278cSmrgfi 9952ee3138f1Smrg 9953ee3138f1Smrg 9954a1ed278cSmrgAC_SUBST([APP_MAN_SUFFIX]) 9955a1ed278cSmrgAC_SUBST([LIB_MAN_SUFFIX]) 9956a1ed278cSmrgAC_SUBST([FILE_MAN_SUFFIX]) 9957a1ed278cSmrgAC_SUBST([MISC_MAN_SUFFIX]) 9958a1ed278cSmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 9959a1ed278cSmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 9960a1ed278cSmrgAC_SUBST([APP_MAN_DIR]) 9961a1ed278cSmrgAC_SUBST([LIB_MAN_DIR]) 9962a1ed278cSmrgAC_SUBST([FILE_MAN_DIR]) 9963a1ed278cSmrgAC_SUBST([MISC_MAN_DIR]) 9964a1ed278cSmrgAC_SUBST([DRIVER_MAN_DIR]) 9965a1ed278cSmrgAC_SUBST([ADMIN_MAN_DIR]) 9966ee3138f1Smrg 9967a1ed278cSmrgXORG_MAN_PAGE="X Version 11" 9968a1ed278cSmrgAC_SUBST([XORG_MAN_PAGE]) 9969a1ed278cSmrgMAN_SUBSTS="\ 9970a1ed278cSmrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 9971a1ed278cSmrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 9972a1ed278cSmrg -e 's|__xservername__|Xorg|g' \ 9973a1ed278cSmrg -e 's|__xconfigfile__|xorg.conf|g' \ 99743e72ca8cSmrg -e 's|__xorgconfdir__|xorg.conf.d|g' \ 9975a1ed278cSmrg -e 's|__projectroot__|\$(prefix)|g' \ 9976a1ed278cSmrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 9977a1ed278cSmrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 9978a1ed278cSmrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 9979a1ed278cSmrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 9980a1ed278cSmrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 9981a1ed278cSmrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 9982a1ed278cSmrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 9983a1ed278cSmrgAC_SUBST([MAN_SUBSTS]) 9984ee3138f1Smrg 9985a1ed278cSmrg]) # XORG_MANPAGE_SECTIONS 9986ee3138f1Smrg 9987a1ed278cSmrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 9988a1ed278cSmrg# ------------------------ 9989a1ed278cSmrg# Minimum version: 1.7.0 9990a1ed278cSmrg# 9991a1ed278cSmrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 9992a1ed278cSmrg# provided by xorg-sgml-doctools, if installed. 9993a1ed278cSmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 9994a1ed278cSmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 9995a1ed278cSmrgXORG_SGML_PATH= 9996a1ed278cSmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 9997a1ed278cSmrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 9998a1ed278cSmrg [m4_ifval([$1],[:], 9999a1ed278cSmrg [if test x"$cross_compiling" != x"yes" ; then 10000a1ed278cSmrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 10001a1ed278cSmrg [XORG_SGML_PATH=$prefix/share/sgml]) 10002a1ed278cSmrg fi]) 10003a1ed278cSmrg ]) 1000434977a2fSmrg 10005a1ed278cSmrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 10006a1ed278cSmrg# the path and the name of the doc stylesheet 10007a1ed278cSmrgif test "x$XORG_SGML_PATH" != "x" ; then 10008a1ed278cSmrg AC_MSG_RESULT([$XORG_SGML_PATH]) 10009a1ed278cSmrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 10010a1ed278cSmrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 10011a1ed278cSmrgelse 10012a1ed278cSmrg AC_MSG_RESULT([no]) 10013a1ed278cSmrgfi 1001434977a2fSmrg 10015a1ed278cSmrgAC_SUBST(XORG_SGML_PATH) 10016a1ed278cSmrgAC_SUBST(STYLESHEET_SRCDIR) 10017a1ed278cSmrgAC_SUBST(XSL_STYLESHEET) 10018a1ed278cSmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 10019a1ed278cSmrg]) # XORG_CHECK_SGML_DOCTOOLS 10020ee3138f1Smrg 10021a1ed278cSmrg# XORG_CHECK_LINUXDOC 10022a1ed278cSmrg# ------------------- 10023a1ed278cSmrg# Minimum version: 1.0.0 10024a1ed278cSmrg# 10025a1ed278cSmrg# Defines the variable MAKE_TEXT if the necessary tools and 10026a1ed278cSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 10027a1ed278cSmrg# Whether or not the necessary tools and files are found can be checked 10028a1ed278cSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 10029a1ed278cSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 10030a1ed278cSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 10031a1ed278cSmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 10032b425557eSmrg 10033a1ed278cSmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 10034b425557eSmrg 10035a1ed278cSmrgAC_MSG_CHECKING([whether to build documentation]) 10036b425557eSmrg 10037a1ed278cSmrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 10038a1ed278cSmrg BUILDDOC=yes 10039a1ed278cSmrgelse 10040a1ed278cSmrg BUILDDOC=no 10041a1ed278cSmrgfi 10042ee3138f1Smrg 10043a1ed278cSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 10044ee3138f1Smrg 10045a1ed278cSmrgAC_MSG_RESULT([$BUILDDOC]) 10046ee3138f1Smrg 10047a1ed278cSmrgAC_MSG_CHECKING([whether to build pdf documentation]) 10048ee3138f1Smrg 10049a1ed278cSmrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 10050a1ed278cSmrg BUILDPDFDOC=yes 10051a1ed278cSmrgelse 10052a1ed278cSmrg BUILDPDFDOC=no 10053a1ed278cSmrgfi 10054ee3138f1Smrg 10055a1ed278cSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 10056ee3138f1Smrg 10057a1ed278cSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 10058ee3138f1Smrg 10059a1ed278cSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 10060a1ed278cSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 10061a1ed278cSmrgMAKE_PDF="$PS2PDF" 10062a1ed278cSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 10063ee3138f1Smrg 10064a1ed278cSmrgAC_SUBST(MAKE_TEXT) 10065a1ed278cSmrgAC_SUBST(MAKE_PS) 10066a1ed278cSmrgAC_SUBST(MAKE_PDF) 10067a1ed278cSmrgAC_SUBST(MAKE_HTML) 10068a1ed278cSmrg]) # XORG_CHECK_LINUXDOC 10069ee3138f1Smrg 10070a1ed278cSmrg# XORG_CHECK_DOCBOOK 10071a1ed278cSmrg# ------------------- 10072a1ed278cSmrg# Minimum version: 1.0.0 10073a1ed278cSmrg# 10074a1ed278cSmrg# Checks for the ability to build output formats from SGML DocBook source. 10075a1ed278cSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 10076a1ed278cSmrg# indicates whether the necessary tools and files are found and, if set, 10077a1ed278cSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 10078a1ed278cSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 10079a1ed278cSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 10080ee3138f1Smrg 10081a1ed278cSmrgBUILDTXTDOC=no 10082a1ed278cSmrgBUILDPDFDOC=no 10083a1ed278cSmrgBUILDPSDOC=no 10084a1ed278cSmrgBUILDHTMLDOC=no 10085ee3138f1Smrg 10086a1ed278cSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 10087a1ed278cSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 10088a1ed278cSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 10089a1ed278cSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 10090ee3138f1Smrg 10091a1ed278cSmrgAC_MSG_CHECKING([whether to build text documentation]) 10092a1ed278cSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 10093a1ed278cSmrg test x$BUILD_TXTDOC != xno; then 10094a1ed278cSmrg BUILDTXTDOC=yes 10095a1ed278cSmrgfi 10096a1ed278cSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 10097a1ed278cSmrgAC_MSG_RESULT([$BUILDTXTDOC]) 10098ee3138f1Smrg 10099a1ed278cSmrgAC_MSG_CHECKING([whether to build PDF documentation]) 10100a1ed278cSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 10101a1ed278cSmrg test x$BUILD_PDFDOC != xno; then 10102a1ed278cSmrg BUILDPDFDOC=yes 10103a1ed278cSmrgfi 10104a1ed278cSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 10105a1ed278cSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 10106ee3138f1Smrg 10107a1ed278cSmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 10108a1ed278cSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 10109a1ed278cSmrg test x$BUILD_PSDOC != xno; then 10110a1ed278cSmrg BUILDPSDOC=yes 10111a1ed278cSmrgfi 10112a1ed278cSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 10113a1ed278cSmrgAC_MSG_RESULT([$BUILDPSDOC]) 10114ee3138f1Smrg 10115a1ed278cSmrgAC_MSG_CHECKING([whether to build HTML documentation]) 10116a1ed278cSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 10117a1ed278cSmrg test x$BUILD_HTMLDOC != xno; then 10118a1ed278cSmrg BUILDHTMLDOC=yes 10119a1ed278cSmrgfi 10120a1ed278cSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 10121a1ed278cSmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 10122ee3138f1Smrg 10123a1ed278cSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 10124a1ed278cSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 10125a1ed278cSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 10126a1ed278cSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 10127ee3138f1Smrg 10128a1ed278cSmrgAC_SUBST(MAKE_TEXT) 10129a1ed278cSmrgAC_SUBST(MAKE_PS) 10130a1ed278cSmrgAC_SUBST(MAKE_PDF) 10131a1ed278cSmrgAC_SUBST(MAKE_HTML) 10132a1ed278cSmrg]) # XORG_CHECK_DOCBOOK 10133ee3138f1Smrg 101343e72ca8cSmrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 10135a1ed278cSmrg# ---------------- 10136a1ed278cSmrg# Minimum version: 1.5.0 101373e72ca8cSmrg# Minimum version for optional DEFAULT argument: 1.11.0 10138a1ed278cSmrg# 10139a1ed278cSmrg# Documentation tools are not always available on all platforms and sometimes 10140a1ed278cSmrg# not at the appropriate level. This macro enables a module to test for the 10141a1ed278cSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 10142a1ed278cSmrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 101433e72ca8cSmrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 101443e72ca8cSmrg# --with-xmlto assumes 'auto'. 10145a1ed278cSmrg# 10146a1ed278cSmrg# Interface to module: 10147a1ed278cSmrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 10148a1ed278cSmrg# XMLTO: returns the path of the xmlto program found 10149a1ed278cSmrg# returns the path set by the user in the environment 10150a1ed278cSmrg# --with-xmlto: 'yes' user instructs the module to use xmlto 10151a1ed278cSmrg# 'no' user instructs the module not to use xmlto 10152a1ed278cSmrg# 10153a1ed278cSmrg# Added in version 1.10.0 10154a1ed278cSmrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 10155a1ed278cSmrg# xmlto for text output requires either lynx, links, or w3m browsers 10156a1ed278cSmrg# 10157a1ed278cSmrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 10158a1ed278cSmrg# 10159a1ed278cSmrgAC_DEFUN([XORG_WITH_XMLTO],[ 10160a1ed278cSmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 101613e72ca8cSmrgm4_define([_defopt], m4_default([$2], [auto])) 10162a1ed278cSmrgAC_ARG_WITH(xmlto, 10163a1ed278cSmrg AS_HELP_STRING([--with-xmlto], 101643e72ca8cSmrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 101653e72ca8cSmrg [use_xmlto=$withval], [use_xmlto=]_defopt) 101663e72ca8cSmrgm4_undefine([_defopt]) 10167ee3138f1Smrg 10168a1ed278cSmrgif test "x$use_xmlto" = x"auto"; then 10169a1ed278cSmrg AC_PATH_PROG([XMLTO], [xmlto]) 10170a1ed278cSmrg if test "x$XMLTO" = "x"; then 10171a1ed278cSmrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 10172a1ed278cSmrg have_xmlto=no 10173a1ed278cSmrg else 10174a1ed278cSmrg have_xmlto=yes 10175a1ed278cSmrg fi 10176a1ed278cSmrgelif test "x$use_xmlto" = x"yes" ; then 10177a1ed278cSmrg AC_PATH_PROG([XMLTO], [xmlto]) 10178a1ed278cSmrg if test "x$XMLTO" = "x"; then 10179a1ed278cSmrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 10180a1ed278cSmrg fi 10181a1ed278cSmrg have_xmlto=yes 10182a1ed278cSmrgelif test "x$use_xmlto" = x"no" ; then 10183a1ed278cSmrg if test "x$XMLTO" != "x"; then 10184a1ed278cSmrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 10185a1ed278cSmrg fi 10186a1ed278cSmrg have_xmlto=no 10187a1ed278cSmrgelse 10188a1ed278cSmrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 10189a1ed278cSmrgfi 10190ee3138f1Smrg 10191a1ed278cSmrg# Test for a minimum version of xmlto, if provided. 10192a1ed278cSmrgm4_ifval([$1], 10193a1ed278cSmrg[if test "$have_xmlto" = yes; then 10194a1ed278cSmrg # scrape the xmlto version 10195a1ed278cSmrg AC_MSG_CHECKING([the xmlto version]) 10196a1ed278cSmrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 10197a1ed278cSmrg AC_MSG_RESULT([$xmlto_version]) 10198a1ed278cSmrg AS_VERSION_COMPARE([$xmlto_version], [$1], 10199a1ed278cSmrg [if test "x$use_xmlto" = xauto; then 10200a1ed278cSmrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 10201a1ed278cSmrg have_xmlto=no 10202a1ed278cSmrg else 10203a1ed278cSmrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 10204a1ed278cSmrg fi]) 10205a1ed278cSmrgfi]) 10206ee3138f1Smrg 10207a1ed278cSmrg# Test for the ability of xmlto to generate a text target 10208a1ed278cSmrghave_xmlto_text=no 10209a1ed278cSmrgcat > conftest.xml << "EOF" 10210a1ed278cSmrgEOF 10211a1ed278cSmrgAS_IF([test "$have_xmlto" = yes], 10212a1ed278cSmrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 10213a1ed278cSmrg [have_xmlto_text=yes], 10214a1ed278cSmrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 10215a1ed278cSmrgrm -f conftest.xml 10216a1ed278cSmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 10217a1ed278cSmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 10218a1ed278cSmrg]) # XORG_WITH_XMLTO 10219ee3138f1Smrg 102203e72ca8cSmrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 102213e72ca8cSmrg# -------------------------------------------- 102223e72ca8cSmrg# Minimum version: 1.12.0 102233e72ca8cSmrg# Minimum version for optional DEFAULT argument: 1.12.0 102243e72ca8cSmrg# 102253e72ca8cSmrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 102263e72ca8cSmrg# XML-based language used for the transformation of XML documents. 102273e72ca8cSmrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 102283e72ca8cSmrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 102293e72ca8cSmrg# The XSLT processor is often used as a standalone tool for transformations. 102303e72ca8cSmrg# It should not be assumed that this tool is used only to work with documnetation. 102313e72ca8cSmrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 102323e72ca8cSmrg# 102333e72ca8cSmrg# Interface to module: 102343e72ca8cSmrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 102353e72ca8cSmrg# XSLTPROC: returns the path of the xsltproc program found 102363e72ca8cSmrg# returns the path set by the user in the environment 102373e72ca8cSmrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 102383e72ca8cSmrg# 'no' user instructs the module not to use xsltproc 102393e72ca8cSmrg# have_xsltproc: returns yes if xsltproc found in PATH or no 102403e72ca8cSmrg# 102413e72ca8cSmrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 102423e72ca8cSmrg# 102433e72ca8cSmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 102443e72ca8cSmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 102453e72ca8cSmrg# Preserves the interface, should it be implemented later 102463e72ca8cSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 102473e72ca8cSmrgm4_define([_defopt], m4_default([$2], [auto])) 102483e72ca8cSmrgAC_ARG_WITH(xsltproc, 102493e72ca8cSmrg AS_HELP_STRING([--with-xsltproc], 102503e72ca8cSmrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 102513e72ca8cSmrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 102523e72ca8cSmrgm4_undefine([_defopt]) 102533e72ca8cSmrg 102543e72ca8cSmrgif test "x$use_xsltproc" = x"auto"; then 102553e72ca8cSmrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 102563e72ca8cSmrg if test "x$XSLTPROC" = "x"; then 102573e72ca8cSmrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 102583e72ca8cSmrg have_xsltproc=no 102593e72ca8cSmrg else 102603e72ca8cSmrg have_xsltproc=yes 102613e72ca8cSmrg fi 102623e72ca8cSmrgelif test "x$use_xsltproc" = x"yes" ; then 102633e72ca8cSmrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 102643e72ca8cSmrg if test "x$XSLTPROC" = "x"; then 102653e72ca8cSmrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 102663e72ca8cSmrg fi 102673e72ca8cSmrg have_xsltproc=yes 102683e72ca8cSmrgelif test "x$use_xsltproc" = x"no" ; then 102693e72ca8cSmrg if test "x$XSLTPROC" != "x"; then 102703e72ca8cSmrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 102713e72ca8cSmrg fi 102723e72ca8cSmrg have_xsltproc=no 102733e72ca8cSmrgelse 102743e72ca8cSmrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 102753e72ca8cSmrgfi 102763e72ca8cSmrg 102773e72ca8cSmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 102783e72ca8cSmrg]) # XORG_WITH_XSLTPROC 102793e72ca8cSmrg 102803e72ca8cSmrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 102813e72ca8cSmrg# ---------------------------------------- 102823e72ca8cSmrg# Minimum version: 1.15.0 102833e72ca8cSmrg# 102843e72ca8cSmrg# PERL (Practical Extraction and Report Language) is a language optimized for 102853e72ca8cSmrg# scanning arbitrary text files, extracting information from those text files, 102863e72ca8cSmrg# and printing reports based on that information. 102873e72ca8cSmrg# 102883e72ca8cSmrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 102893e72ca8cSmrg# 102903e72ca8cSmrg# Interface to module: 102913e72ca8cSmrg# HAVE_PERL: used in makefiles to conditionally scan text files 102923e72ca8cSmrg# PERL: returns the path of the perl program found 102933e72ca8cSmrg# returns the path set by the user in the environment 102943e72ca8cSmrg# --with-perl: 'yes' user instructs the module to use perl 102953e72ca8cSmrg# 'no' user instructs the module not to use perl 102963e72ca8cSmrg# have_perl: returns yes if perl found in PATH or no 102973e72ca8cSmrg# 102983e72ca8cSmrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 102993e72ca8cSmrg# 103003e72ca8cSmrgAC_DEFUN([XORG_WITH_PERL],[ 103013e72ca8cSmrgAC_ARG_VAR([PERL], [Path to perl command]) 103023e72ca8cSmrg# Preserves the interface, should it be implemented later 103033e72ca8cSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 103043e72ca8cSmrgm4_define([_defopt], m4_default([$2], [auto])) 103053e72ca8cSmrgAC_ARG_WITH(perl, 103063e72ca8cSmrg AS_HELP_STRING([--with-perl], 103073e72ca8cSmrg [Use perl for extracting information from files (default: ]_defopt[)]), 103083e72ca8cSmrg [use_perl=$withval], [use_perl=]_defopt) 103093e72ca8cSmrgm4_undefine([_defopt]) 103103e72ca8cSmrg 103113e72ca8cSmrgif test "x$use_perl" = x"auto"; then 103123e72ca8cSmrg AC_PATH_PROG([PERL], [perl]) 103133e72ca8cSmrg if test "x$PERL" = "x"; then 103143e72ca8cSmrg AC_MSG_WARN([perl not found - cannot extract information and report]) 103153e72ca8cSmrg have_perl=no 103163e72ca8cSmrg else 103173e72ca8cSmrg have_perl=yes 103183e72ca8cSmrg fi 103193e72ca8cSmrgelif test "x$use_perl" = x"yes" ; then 103203e72ca8cSmrg AC_PATH_PROG([PERL], [perl]) 103213e72ca8cSmrg if test "x$PERL" = "x"; then 103223e72ca8cSmrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 103233e72ca8cSmrg fi 103243e72ca8cSmrg have_perl=yes 103253e72ca8cSmrgelif test "x$use_perl" = x"no" ; then 103263e72ca8cSmrg if test "x$PERL" != "x"; then 103273e72ca8cSmrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 103283e72ca8cSmrg fi 103293e72ca8cSmrg have_perl=no 103303e72ca8cSmrgelse 103313e72ca8cSmrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 103323e72ca8cSmrgfi 103333e72ca8cSmrg 103343e72ca8cSmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 103353e72ca8cSmrg]) # XORG_WITH_PERL 103363e72ca8cSmrg 103373e72ca8cSmrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 10338a1ed278cSmrg# ---------------- 10339a1ed278cSmrg# Minimum version: 1.5.0 103403e72ca8cSmrg# Minimum version for optional DEFAULT argument: 1.11.0 10341a1ed278cSmrg# 10342a1ed278cSmrg# Documentation tools are not always available on all platforms and sometimes 10343a1ed278cSmrg# not at the appropriate level. This macro enables a module to test for the 10344a1ed278cSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 10345a1ed278cSmrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 103463e72ca8cSmrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 103473e72ca8cSmrg# --with-asciidoc assumes 'auto'. 10348a1ed278cSmrg# 10349a1ed278cSmrg# Interface to module: 10350a1ed278cSmrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 10351a1ed278cSmrg# ASCIIDOC: returns the path of the asciidoc program found 10352a1ed278cSmrg# returns the path set by the user in the environment 10353a1ed278cSmrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 10354a1ed278cSmrg# 'no' user instructs the module not to use asciidoc 10355a1ed278cSmrg# 10356a1ed278cSmrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 10357a1ed278cSmrg# 10358a1ed278cSmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 10359a1ed278cSmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 103603e72ca8cSmrgm4_define([_defopt], m4_default([$2], [auto])) 10361a1ed278cSmrgAC_ARG_WITH(asciidoc, 10362a1ed278cSmrg AS_HELP_STRING([--with-asciidoc], 103633e72ca8cSmrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 103643e72ca8cSmrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 103653e72ca8cSmrgm4_undefine([_defopt]) 10366ee3138f1Smrg 10367a1ed278cSmrgif test "x$use_asciidoc" = x"auto"; then 10368a1ed278cSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 10369a1ed278cSmrg if test "x$ASCIIDOC" = "x"; then 10370a1ed278cSmrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 10371a1ed278cSmrg have_asciidoc=no 10372a1ed278cSmrg else 10373a1ed278cSmrg have_asciidoc=yes 10374a1ed278cSmrg fi 10375a1ed278cSmrgelif test "x$use_asciidoc" = x"yes" ; then 10376a1ed278cSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 10377a1ed278cSmrg if test "x$ASCIIDOC" = "x"; then 10378a1ed278cSmrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 10379a1ed278cSmrg fi 10380a1ed278cSmrg have_asciidoc=yes 10381a1ed278cSmrgelif test "x$use_asciidoc" = x"no" ; then 10382a1ed278cSmrg if test "x$ASCIIDOC" != "x"; then 10383a1ed278cSmrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 10384a1ed278cSmrg fi 10385a1ed278cSmrg have_asciidoc=no 10386a1ed278cSmrgelse 10387a1ed278cSmrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 10388a1ed278cSmrgfi 10389a1ed278cSmrgm4_ifval([$1], 10390a1ed278cSmrg[if test "$have_asciidoc" = yes; then 10391a1ed278cSmrg # scrape the asciidoc version 10392a1ed278cSmrg AC_MSG_CHECKING([the asciidoc version]) 10393a1ed278cSmrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 10394a1ed278cSmrg AC_MSG_RESULT([$asciidoc_version]) 10395a1ed278cSmrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 10396a1ed278cSmrg [if test "x$use_asciidoc" = xauto; then 10397a1ed278cSmrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 10398a1ed278cSmrg have_asciidoc=no 10399a1ed278cSmrg else 10400a1ed278cSmrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 10401a1ed278cSmrg fi]) 10402a1ed278cSmrgfi]) 10403a1ed278cSmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 10404a1ed278cSmrg]) # XORG_WITH_ASCIIDOC 10405ee3138f1Smrg 104063e72ca8cSmrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 10407a1ed278cSmrg# -------------------------------- 10408a1ed278cSmrg# Minimum version: 1.5.0 104093e72ca8cSmrg# Minimum version for optional DEFAULT argument: 1.11.0 10410a1ed278cSmrg# 10411a1ed278cSmrg# Documentation tools are not always available on all platforms and sometimes 10412a1ed278cSmrg# not at the appropriate level. This macro enables a module to test for the 10413a1ed278cSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 10414a1ed278cSmrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 104153e72ca8cSmrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 104163e72ca8cSmrg# --with-doxygen assumes 'auto'. 10417a1ed278cSmrg# 10418a1ed278cSmrg# Interface to module: 10419a1ed278cSmrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 10420a1ed278cSmrg# DOXYGEN: returns the path of the doxygen program found 10421a1ed278cSmrg# returns the path set by the user in the environment 10422a1ed278cSmrg# --with-doxygen: 'yes' user instructs the module to use doxygen 10423a1ed278cSmrg# 'no' user instructs the module not to use doxygen 10424a1ed278cSmrg# 10425a1ed278cSmrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 10426a1ed278cSmrg# 10427a1ed278cSmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 10428a1ed278cSmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 104293e72ca8cSmrgm4_define([_defopt], m4_default([$2], [auto])) 10430a1ed278cSmrgAC_ARG_WITH(doxygen, 10431a1ed278cSmrg AS_HELP_STRING([--with-doxygen], 104323e72ca8cSmrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 104333e72ca8cSmrg [use_doxygen=$withval], [use_doxygen=]_defopt) 104343e72ca8cSmrgm4_undefine([_defopt]) 10435a1ed278cSmrg 10436a1ed278cSmrgif test "x$use_doxygen" = x"auto"; then 10437a1ed278cSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 10438a1ed278cSmrg if test "x$DOXYGEN" = "x"; then 10439a1ed278cSmrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 10440a1ed278cSmrg have_doxygen=no 10441a1ed278cSmrg else 10442a1ed278cSmrg have_doxygen=yes 10443a1ed278cSmrg fi 10444a1ed278cSmrgelif test "x$use_doxygen" = x"yes" ; then 10445a1ed278cSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 10446a1ed278cSmrg if test "x$DOXYGEN" = "x"; then 10447a1ed278cSmrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 10448a1ed278cSmrg fi 10449a1ed278cSmrg have_doxygen=yes 10450a1ed278cSmrgelif test "x$use_doxygen" = x"no" ; then 10451a1ed278cSmrg if test "x$DOXYGEN" != "x"; then 10452a1ed278cSmrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 10453a1ed278cSmrg fi 10454a1ed278cSmrg have_doxygen=no 10455a1ed278cSmrgelse 10456a1ed278cSmrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 10457a1ed278cSmrgfi 10458a1ed278cSmrgm4_ifval([$1], 10459a1ed278cSmrg[if test "$have_doxygen" = yes; then 10460a1ed278cSmrg # scrape the doxygen version 10461a1ed278cSmrg AC_MSG_CHECKING([the doxygen version]) 10462a1ed278cSmrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 10463a1ed278cSmrg AC_MSG_RESULT([$doxygen_version]) 10464a1ed278cSmrg AS_VERSION_COMPARE([$doxygen_version], [$1], 10465a1ed278cSmrg [if test "x$use_doxygen" = xauto; then 10466a1ed278cSmrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 10467a1ed278cSmrg have_doxygen=no 10468a1ed278cSmrg else 10469a1ed278cSmrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 10470a1ed278cSmrg fi]) 10471a1ed278cSmrgfi]) 10472a1ed278cSmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 10473a1ed278cSmrg]) # XORG_WITH_DOXYGEN 10474ee3138f1Smrg 104753e72ca8cSmrg# XORG_WITH_GROFF([DEFAULT]) 10476a1ed278cSmrg# ---------------- 10477a1ed278cSmrg# Minimum version: 1.6.0 104783e72ca8cSmrg# Minimum version for optional DEFAULT argument: 1.11.0 10479b425557eSmrg# 10480a1ed278cSmrg# Documentation tools are not always available on all platforms and sometimes 10481a1ed278cSmrg# not at the appropriate level. This macro enables a module to test for the 10482a1ed278cSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 10483a1ed278cSmrg# the --with-groff option, it allows maximum flexibilty in making decisions 104843e72ca8cSmrg# as whether or not to use the groff package. When DEFAULT is not specified, 104853e72ca8cSmrg# --with-groff assumes 'auto'. 10486b425557eSmrg# 10487a1ed278cSmrg# Interface to module: 10488a1ed278cSmrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 10489a1ed278cSmrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 10490a1ed278cSmrg# HAVE_GROFF_MS: the -ms macros package 10491a1ed278cSmrg# GROFF: returns the path of the groff program found 10492a1ed278cSmrg# returns the path set by the user in the environment 10493a1ed278cSmrg# --with-groff: 'yes' user instructs the module to use groff 10494a1ed278cSmrg# 'no' user instructs the module not to use groff 10495a1ed278cSmrg# 10496a1ed278cSmrg# Added in version 1.9.0: 10497a1ed278cSmrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 10498a1ed278cSmrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 10499a1ed278cSmrg# psselect from the psutils package. 10500a1ed278cSmrg# the ghostcript package. Refer to the grohtml man pages 10501a1ed278cSmrg# 10502a1ed278cSmrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 10503a1ed278cSmrg# 10504a1ed278cSmrg# OS and distros often splits groff in a basic and full package, the former 10505a1ed278cSmrg# having the groff program and the later having devices, fonts and macros 10506a1ed278cSmrg# Checking for the groff executable is not enough. 10507a1ed278cSmrg# 10508a1ed278cSmrg# If macros are missing, we cannot assume that groff is useless, so we don't 10509a1ed278cSmrg# unset HAVE_GROFF or GROFF env variables. 10510a1ed278cSmrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 10511a1ed278cSmrg# 10512a1ed278cSmrgAC_DEFUN([XORG_WITH_GROFF],[ 10513a1ed278cSmrgAC_ARG_VAR([GROFF], [Path to groff command]) 105143e72ca8cSmrgm4_define([_defopt], m4_default([$1], [auto])) 10515a1ed278cSmrgAC_ARG_WITH(groff, 10516a1ed278cSmrg AS_HELP_STRING([--with-groff], 105173e72ca8cSmrg [Use groff to regenerate documentation (default: ]_defopt[)]), 105183e72ca8cSmrg [use_groff=$withval], [use_groff=]_defopt) 105193e72ca8cSmrgm4_undefine([_defopt]) 10520ee3138f1Smrg 10521a1ed278cSmrgif test "x$use_groff" = x"auto"; then 10522a1ed278cSmrg AC_PATH_PROG([GROFF], [groff]) 10523a1ed278cSmrg if test "x$GROFF" = "x"; then 10524a1ed278cSmrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 10525a1ed278cSmrg have_groff=no 10526a1ed278cSmrg else 10527a1ed278cSmrg have_groff=yes 10528a1ed278cSmrg fi 10529a1ed278cSmrgelif test "x$use_groff" = x"yes" ; then 10530a1ed278cSmrg AC_PATH_PROG([GROFF], [groff]) 10531a1ed278cSmrg if test "x$GROFF" = "x"; then 10532a1ed278cSmrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 10533a1ed278cSmrg fi 10534a1ed278cSmrg have_groff=yes 10535a1ed278cSmrgelif test "x$use_groff" = x"no" ; then 10536a1ed278cSmrg if test "x$GROFF" != "x"; then 10537a1ed278cSmrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 10538a1ed278cSmrg fi 10539a1ed278cSmrg have_groff=no 10540a1ed278cSmrgelse 10541a1ed278cSmrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 10542a1ed278cSmrgfi 10543ee3138f1Smrg 10544a1ed278cSmrg# We have groff, test for the presence of the macro packages 10545a1ed278cSmrgif test "x$have_groff" = x"yes"; then 10546a1ed278cSmrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 10547a1ed278cSmrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 10548a1ed278cSmrg groff_ms_works=yes 10549a1ed278cSmrg else 10550a1ed278cSmrg groff_ms_works=no 10551a1ed278cSmrg fi 10552a1ed278cSmrg AC_MSG_RESULT([$groff_ms_works]) 10553a1ed278cSmrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 10554a1ed278cSmrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 10555a1ed278cSmrg groff_mm_works=yes 10556a1ed278cSmrg else 10557a1ed278cSmrg groff_mm_works=no 10558a1ed278cSmrg fi 10559a1ed278cSmrg AC_MSG_RESULT([$groff_mm_works]) 10560a1ed278cSmrgfi 10561ee3138f1Smrg 10562a1ed278cSmrg# We have groff, test for HTML dependencies, one command per package 10563a1ed278cSmrgif test "x$have_groff" = x"yes"; then 10564a1ed278cSmrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 10565a1ed278cSmrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 10566a1ed278cSmrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 10567a1ed278cSmrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 10568a1ed278cSmrg have_groff_html=yes 10569a1ed278cSmrg else 10570a1ed278cSmrg have_groff_html=no 10571a1ed278cSmrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 10572a1ed278cSmrg fi 10573a1ed278cSmrgfi 10574ee3138f1Smrg 10575a1ed278cSmrg# Set Automake conditionals for Makefiles 10576a1ed278cSmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 10577a1ed278cSmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 10578a1ed278cSmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 10579a1ed278cSmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 10580a1ed278cSmrg]) # XORG_WITH_GROFF 10581ee3138f1Smrg 105823e72ca8cSmrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 105833e72ca8cSmrg# --------------------------------------- 10584a1ed278cSmrg# Minimum version: 1.6.0 105853e72ca8cSmrg# Minimum version for optional DEFAULT argument: 1.11.0 105863e72ca8cSmrg# Minimum version for optional MIN-VERSION argument: 1.15.0 10587a1ed278cSmrg# 10588a1ed278cSmrg# Documentation tools are not always available on all platforms and sometimes 10589a1ed278cSmrg# not at the appropriate level. This macro enables a module to test for the 10590a1ed278cSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 10591a1ed278cSmrg# the --with-fop option, it allows maximum flexibilty in making decisions 105923e72ca8cSmrg# as whether or not to use the fop package. When DEFAULT is not specified, 105933e72ca8cSmrg# --with-fop assumes 'auto'. 10594a1ed278cSmrg# 10595a1ed278cSmrg# Interface to module: 10596a1ed278cSmrg# HAVE_FOP: used in makefiles to conditionally generate documentation 10597a1ed278cSmrg# FOP: returns the path of the fop program found 10598a1ed278cSmrg# returns the path set by the user in the environment 10599a1ed278cSmrg# --with-fop: 'yes' user instructs the module to use fop 10600a1ed278cSmrg# 'no' user instructs the module not to use fop 10601a1ed278cSmrg# 10602a1ed278cSmrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 10603a1ed278cSmrg# 10604a1ed278cSmrgAC_DEFUN([XORG_WITH_FOP],[ 10605a1ed278cSmrgAC_ARG_VAR([FOP], [Path to fop command]) 106063e72ca8cSmrgm4_define([_defopt], m4_default([$2], [auto])) 10607a1ed278cSmrgAC_ARG_WITH(fop, 10608a1ed278cSmrg AS_HELP_STRING([--with-fop], 106093e72ca8cSmrg [Use fop to regenerate documentation (default: ]_defopt[)]), 106103e72ca8cSmrg [use_fop=$withval], [use_fop=]_defopt) 106113e72ca8cSmrgm4_undefine([_defopt]) 10612ee3138f1Smrg 10613a1ed278cSmrgif test "x$use_fop" = x"auto"; then 10614a1ed278cSmrg AC_PATH_PROG([FOP], [fop]) 10615a1ed278cSmrg if test "x$FOP" = "x"; then 10616a1ed278cSmrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 10617a1ed278cSmrg have_fop=no 10618a1ed278cSmrg else 10619a1ed278cSmrg have_fop=yes 10620a1ed278cSmrg fi 10621a1ed278cSmrgelif test "x$use_fop" = x"yes" ; then 10622a1ed278cSmrg AC_PATH_PROG([FOP], [fop]) 10623a1ed278cSmrg if test "x$FOP" = "x"; then 10624a1ed278cSmrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 10625a1ed278cSmrg fi 10626a1ed278cSmrg have_fop=yes 10627a1ed278cSmrgelif test "x$use_fop" = x"no" ; then 10628a1ed278cSmrg if test "x$FOP" != "x"; then 10629a1ed278cSmrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 10630a1ed278cSmrg fi 10631a1ed278cSmrg have_fop=no 10632a1ed278cSmrgelse 10633a1ed278cSmrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 10634a1ed278cSmrgfi 106353e72ca8cSmrg 106363e72ca8cSmrg# Test for a minimum version of fop, if provided. 106373e72ca8cSmrgm4_ifval([$1], 106383e72ca8cSmrg[if test "$have_fop" = yes; then 106393e72ca8cSmrg # scrape the fop version 106403e72ca8cSmrg AC_MSG_CHECKING([for fop minimum version]) 106413e72ca8cSmrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 106423e72ca8cSmrg AC_MSG_RESULT([$fop_version]) 106433e72ca8cSmrg AS_VERSION_COMPARE([$fop_version], [$1], 106443e72ca8cSmrg [if test "x$use_fop" = xauto; then 106453e72ca8cSmrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 106463e72ca8cSmrg have_fop=no 106473e72ca8cSmrg else 106483e72ca8cSmrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 106493e72ca8cSmrg fi]) 106503e72ca8cSmrgfi]) 10651a1ed278cSmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 10652a1ed278cSmrg]) # XORG_WITH_FOP 10653a1ed278cSmrg 106543e72ca8cSmrg# XORG_WITH_PS2PDF([DEFAULT]) 10655a1ed278cSmrg# ---------------- 10656a1ed278cSmrg# Minimum version: 1.6.0 106573e72ca8cSmrg# Minimum version for optional DEFAULT argument: 1.11.0 10658a1ed278cSmrg# 10659a1ed278cSmrg# Documentation tools are not always available on all platforms and sometimes 10660a1ed278cSmrg# not at the appropriate level. This macro enables a module to test for the 10661a1ed278cSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 10662a1ed278cSmrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 106633e72ca8cSmrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 106643e72ca8cSmrg# --with-ps2pdf assumes 'auto'. 10665a1ed278cSmrg# 10666a1ed278cSmrg# Interface to module: 10667a1ed278cSmrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 10668a1ed278cSmrg# PS2PDF: returns the path of the ps2pdf program found 10669a1ed278cSmrg# returns the path set by the user in the environment 10670a1ed278cSmrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 10671a1ed278cSmrg# 'no' user instructs the module not to use ps2pdf 10672a1ed278cSmrg# 10673a1ed278cSmrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 10674a1ed278cSmrg# 10675a1ed278cSmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 10676a1ed278cSmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 106773e72ca8cSmrgm4_define([_defopt], m4_default([$1], [auto])) 10678a1ed278cSmrgAC_ARG_WITH(ps2pdf, 10679a1ed278cSmrg AS_HELP_STRING([--with-ps2pdf], 106803e72ca8cSmrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 106813e72ca8cSmrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 106823e72ca8cSmrgm4_undefine([_defopt]) 10683ee3138f1Smrg 10684a1ed278cSmrgif test "x$use_ps2pdf" = x"auto"; then 10685a1ed278cSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 10686a1ed278cSmrg if test "x$PS2PDF" = "x"; then 10687a1ed278cSmrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 10688a1ed278cSmrg have_ps2pdf=no 10689a1ed278cSmrg else 10690a1ed278cSmrg have_ps2pdf=yes 10691a1ed278cSmrg fi 10692a1ed278cSmrgelif test "x$use_ps2pdf" = x"yes" ; then 10693a1ed278cSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 10694a1ed278cSmrg if test "x$PS2PDF" = "x"; then 10695a1ed278cSmrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 10696a1ed278cSmrg fi 10697a1ed278cSmrg have_ps2pdf=yes 10698a1ed278cSmrgelif test "x$use_ps2pdf" = x"no" ; then 10699a1ed278cSmrg if test "x$PS2PDF" != "x"; then 10700a1ed278cSmrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 10701a1ed278cSmrg fi 10702a1ed278cSmrg have_ps2pdf=no 10703a1ed278cSmrgelse 10704a1ed278cSmrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 10705a1ed278cSmrgfi 10706a1ed278cSmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 10707a1ed278cSmrg]) # XORG_WITH_PS2PDF 10708ee3138f1Smrg 10709a1ed278cSmrg# XORG_ENABLE_DOCS (enable_docs=yes) 10710a1ed278cSmrg# ---------------- 10711a1ed278cSmrg# Minimum version: 1.6.0 10712a1ed278cSmrg# 10713a1ed278cSmrg# Documentation tools are not always available on all platforms and sometimes 10714a1ed278cSmrg# not at the appropriate level. This macro enables a builder to skip all 10715a1ed278cSmrg# documentation targets except traditional man pages. 10716a1ed278cSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 10717a1ed278cSmrg# maximum flexibilty in controlling documentation building. 10718a1ed278cSmrg# Refer to: 10719a1ed278cSmrg# XORG_WITH_XMLTO --with-xmlto 10720a1ed278cSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 10721a1ed278cSmrg# XORG_WITH_DOXYGEN --with-doxygen 10722a1ed278cSmrg# XORG_WITH_FOP --with-fop 10723a1ed278cSmrg# XORG_WITH_GROFF --with-groff 10724a1ed278cSmrg# XORG_WITH_PS2PDF --with-ps2pdf 10725a1ed278cSmrg# 10726a1ed278cSmrg# Interface to module: 10727a1ed278cSmrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 10728a1ed278cSmrg# --enable-docs: 'yes' user instructs the module to generate docs 10729a1ed278cSmrg# 'no' user instructs the module not to generate docs 10730a1ed278cSmrg# parm1: specify the default value, yes or no. 10731b425557eSmrg# 10732a1ed278cSmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 107333e72ca8cSmrgm4_define([docs_default], m4_default([$1], [yes])) 10734a1ed278cSmrgAC_ARG_ENABLE(docs, 10735a1ed278cSmrg AS_HELP_STRING([--enable-docs], 107363e72ca8cSmrg [Enable building the documentation (default: ]docs_default[)]), 107373e72ca8cSmrg [build_docs=$enableval], [build_docs=]docs_default) 107383e72ca8cSmrgm4_undefine([docs_default]) 10739a1ed278cSmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 10740a1ed278cSmrgAC_MSG_CHECKING([whether to build documentation]) 10741a1ed278cSmrgAC_MSG_RESULT([$build_docs]) 10742a1ed278cSmrg]) # XORG_ENABLE_DOCS 10743ee3138f1Smrg 10744a1ed278cSmrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 10745a1ed278cSmrg# ---------------- 10746a1ed278cSmrg# Minimum version: 1.6.0 10747a1ed278cSmrg# 10748a1ed278cSmrg# This macro enables a builder to skip all developer documentation. 10749a1ed278cSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 10750a1ed278cSmrg# maximum flexibilty in controlling documentation building. 10751a1ed278cSmrg# Refer to: 10752a1ed278cSmrg# XORG_WITH_XMLTO --with-xmlto 10753a1ed278cSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 10754a1ed278cSmrg# XORG_WITH_DOXYGEN --with-doxygen 10755a1ed278cSmrg# XORG_WITH_FOP --with-fop 10756a1ed278cSmrg# XORG_WITH_GROFF --with-groff 10757a1ed278cSmrg# XORG_WITH_PS2PDF --with-ps2pdf 10758a1ed278cSmrg# 10759a1ed278cSmrg# Interface to module: 10760a1ed278cSmrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 10761a1ed278cSmrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 10762a1ed278cSmrg# 'no' user instructs the module not to generate developer docs 10763a1ed278cSmrg# parm1: specify the default value, yes or no. 10764a1ed278cSmrg# 10765a1ed278cSmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 107663e72ca8cSmrgm4_define([devel_default], m4_default([$1], [yes])) 10767a1ed278cSmrgAC_ARG_ENABLE(devel-docs, 10768a1ed278cSmrg AS_HELP_STRING([--enable-devel-docs], 107693e72ca8cSmrg [Enable building the developer documentation (default: ]devel_default[)]), 107703e72ca8cSmrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 107713e72ca8cSmrgm4_undefine([devel_default]) 10772a1ed278cSmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 10773a1ed278cSmrgAC_MSG_CHECKING([whether to build developer documentation]) 10774a1ed278cSmrgAC_MSG_RESULT([$build_devel_docs]) 10775a1ed278cSmrg]) # XORG_ENABLE_DEVEL_DOCS 10776ee3138f1Smrg 10777a1ed278cSmrg# XORG_ENABLE_SPECS (enable_specs=yes) 10778a1ed278cSmrg# ---------------- 10779a1ed278cSmrg# Minimum version: 1.6.0 10780a1ed278cSmrg# 10781a1ed278cSmrg# This macro enables a builder to skip all functional specification targets. 10782a1ed278cSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 10783a1ed278cSmrg# maximum flexibilty in controlling documentation building. 10784a1ed278cSmrg# Refer to: 10785a1ed278cSmrg# XORG_WITH_XMLTO --with-xmlto 10786a1ed278cSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 10787a1ed278cSmrg# XORG_WITH_DOXYGEN --with-doxygen 10788a1ed278cSmrg# XORG_WITH_FOP --with-fop 10789a1ed278cSmrg# XORG_WITH_GROFF --with-groff 10790a1ed278cSmrg# XORG_WITH_PS2PDF --with-ps2pdf 10791a1ed278cSmrg# 10792a1ed278cSmrg# Interface to module: 10793a1ed278cSmrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 10794a1ed278cSmrg# --enable-specs: 'yes' user instructs the module to generate specs 10795a1ed278cSmrg# 'no' user instructs the module not to generate specs 10796a1ed278cSmrg# parm1: specify the default value, yes or no. 10797a1ed278cSmrg# 10798a1ed278cSmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 107993e72ca8cSmrgm4_define([spec_default], m4_default([$1], [yes])) 10800a1ed278cSmrgAC_ARG_ENABLE(specs, 10801a1ed278cSmrg AS_HELP_STRING([--enable-specs], 108023e72ca8cSmrg [Enable building the specs (default: ]spec_default[)]), 108033e72ca8cSmrg [build_specs=$enableval], [build_specs=]spec_default) 108043e72ca8cSmrgm4_undefine([spec_default]) 10805a1ed278cSmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 10806a1ed278cSmrgAC_MSG_CHECKING([whether to build functional specifications]) 10807a1ed278cSmrgAC_MSG_RESULT([$build_specs]) 10808a1ed278cSmrg]) # XORG_ENABLE_SPECS 10809ee3138f1Smrg 108103e72ca8cSmrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 108113e72ca8cSmrg# ---------------------------------------------- 108123e72ca8cSmrg# Minimum version: 1.13.0 108133e72ca8cSmrg# 108143e72ca8cSmrg# This macro enables a builder to enable/disable unit testing 108153e72ca8cSmrg# It makes no assumption about the test cases implementation 108163e72ca8cSmrg# Test cases may or may not use Automake "Support for test suites" 108173e72ca8cSmrg# They may or may not use the software utility library GLib 108183e72ca8cSmrg# 108193e72ca8cSmrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 108203e72ca8cSmrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 108213e72ca8cSmrg# The variable enable_unit_tests is used by other macros in this file. 108223e72ca8cSmrg# 108233e72ca8cSmrg# Interface to module: 108243e72ca8cSmrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 108253e72ca8cSmrg# enable_unit_tests: used in configure.ac for additional configuration 108263e72ca8cSmrg# --enable-unit-tests: 'yes' user instructs the module to build tests 108273e72ca8cSmrg# 'no' user instructs the module not to build tests 108283e72ca8cSmrg# parm1: specify the default value, yes or no. 108293e72ca8cSmrg# 108303e72ca8cSmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 108313e72ca8cSmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 108323e72ca8cSmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 108333e72ca8cSmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 108343e72ca8cSmrgm4_define([_defopt], m4_default([$1], [auto])) 108353e72ca8cSmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 108363e72ca8cSmrg [Enable building unit test cases (default: ]_defopt[)]), 108373e72ca8cSmrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 108383e72ca8cSmrgm4_undefine([_defopt]) 108393e72ca8cSmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 108403e72ca8cSmrgAC_MSG_CHECKING([whether to build unit test cases]) 108413e72ca8cSmrgAC_MSG_RESULT([$enable_unit_tests]) 108423e72ca8cSmrg]) # XORG_ENABLE_UNIT_TESTS 108433e72ca8cSmrg 108443e72ca8cSmrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 108453e72ca8cSmrg# ------------------------------------------------------ 108463e72ca8cSmrg# Minimum version: 1.17.0 108473e72ca8cSmrg# 108483e72ca8cSmrg# This macro enables a builder to enable/disable integration testing 108493e72ca8cSmrg# It makes no assumption about the test cases' implementation 108503e72ca8cSmrg# Test cases may or may not use Automake "Support for test suites" 108513e72ca8cSmrg# 108523e72ca8cSmrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 108533e72ca8cSmrg# usually requires less dependencies and may be built and run under less 108543e72ca8cSmrg# stringent environments than integration tests. 108553e72ca8cSmrg# 108563e72ca8cSmrg# Interface to module: 108573e72ca8cSmrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 108583e72ca8cSmrg# enable_integration_tests: used in configure.ac for additional configuration 108593e72ca8cSmrg# --enable-integration-tests: 'yes' user instructs the module to build tests 108603e72ca8cSmrg# 'no' user instructs the module not to build tests 108613e72ca8cSmrg# parm1: specify the default value, yes or no. 108623e72ca8cSmrg# 108633e72ca8cSmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 108643e72ca8cSmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 108653e72ca8cSmrgm4_define([_defopt], m4_default([$1], [auto])) 108663e72ca8cSmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 108673e72ca8cSmrg [Enable building integration test cases (default: ]_defopt[)]), 108683e72ca8cSmrg [enable_integration_tests=$enableval], 108693e72ca8cSmrg [enable_integration_tests=]_defopt) 108703e72ca8cSmrgm4_undefine([_defopt]) 108713e72ca8cSmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 108723e72ca8cSmrg [test "x$enable_integration_tests" != xno]) 108733e72ca8cSmrgAC_MSG_CHECKING([whether to build unit test cases]) 108743e72ca8cSmrgAC_MSG_RESULT([$enable_integration_tests]) 108753e72ca8cSmrg]) # XORG_ENABLE_INTEGRATION_TESTS 108763e72ca8cSmrg 108773e72ca8cSmrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 108783e72ca8cSmrg# ---------------------------------------- 108793e72ca8cSmrg# Minimum version: 1.13.0 108803e72ca8cSmrg# 108813e72ca8cSmrg# GLib is a library which provides advanced data structures and functions. 108823e72ca8cSmrg# This macro enables a module to test for the presence of Glib. 108833e72ca8cSmrg# 108843e72ca8cSmrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 108853e72ca8cSmrg# Otherwise the value of $enable_unit_tests is blank. 108863e72ca8cSmrg# 108873e72ca8cSmrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 108883e72ca8cSmrg# test support usually requires less dependencies and may be built and run under 108893e72ca8cSmrg# less stringent environments than integration tests. 108903e72ca8cSmrg# 108913e72ca8cSmrg# Interface to module: 108923e72ca8cSmrg# HAVE_GLIB: used in makefiles to conditionally build targets 108933e72ca8cSmrg# with_glib: used in configure.ac to know if GLib has been found 108943e72ca8cSmrg# --with-glib: 'yes' user instructs the module to use glib 108953e72ca8cSmrg# 'no' user instructs the module not to use glib 108963e72ca8cSmrg# 108973e72ca8cSmrgAC_DEFUN([XORG_WITH_GLIB],[ 108983e72ca8cSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 108993e72ca8cSmrgm4_define([_defopt], m4_default([$2], [auto])) 109003e72ca8cSmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 109013e72ca8cSmrg [Use GLib library for unit testing (default: ]_defopt[)]), 109023e72ca8cSmrg [with_glib=$withval], [with_glib=]_defopt) 109033e72ca8cSmrgm4_undefine([_defopt]) 109043e72ca8cSmrg 109053e72ca8cSmrghave_glib=no 109063e72ca8cSmrg# Do not probe GLib if user explicitly disabled unit testing 109073e72ca8cSmrgif test "x$enable_unit_tests" != x"no"; then 109083e72ca8cSmrg # Do not probe GLib if user explicitly disabled it 109093e72ca8cSmrg if test "x$with_glib" != x"no"; then 109103e72ca8cSmrg m4_ifval( 109113e72ca8cSmrg [$1], 109123e72ca8cSmrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 109133e72ca8cSmrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 109143e72ca8cSmrg ) 109153e72ca8cSmrg fi 109163e72ca8cSmrgfi 109173e72ca8cSmrg 109183e72ca8cSmrg# Not having GLib when unit testing has been explicitly requested is an error 109193e72ca8cSmrgif test "x$enable_unit_tests" = x"yes"; then 109203e72ca8cSmrg if test "x$have_glib" = x"no"; then 109213e72ca8cSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 109223e72ca8cSmrg fi 109233e72ca8cSmrgfi 109243e72ca8cSmrg 109253e72ca8cSmrg# Having unit testing disabled when GLib has been explicitly requested is an error 109263e72ca8cSmrgif test "x$enable_unit_tests" = x"no"; then 109273e72ca8cSmrg if test "x$with_glib" = x"yes"; then 109283e72ca8cSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 109293e72ca8cSmrg fi 109303e72ca8cSmrgfi 109313e72ca8cSmrg 109323e72ca8cSmrg# Not having GLib when it has been explicitly requested is an error 109333e72ca8cSmrgif test "x$with_glib" = x"yes"; then 109343e72ca8cSmrg if test "x$have_glib" = x"no"; then 109353e72ca8cSmrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 109363e72ca8cSmrg fi 109373e72ca8cSmrgfi 109383e72ca8cSmrg 109393e72ca8cSmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 109403e72ca8cSmrg]) # XORG_WITH_GLIB 109413e72ca8cSmrg 109423e72ca8cSmrg# XORG_LD_WRAP([required|optional]) 109433e72ca8cSmrg# --------------------------------- 109443e72ca8cSmrg# Minimum version: 1.13.0 109453e72ca8cSmrg# 109463e72ca8cSmrg# Check if linker supports -wrap, passed via compiler flags 109473e72ca8cSmrg# 109483e72ca8cSmrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 109493e72ca8cSmrg# Otherwise the value of $enable_unit_tests is blank. 109503e72ca8cSmrg# 109513e72ca8cSmrg# Argument added in 1.16.0 - default is "required", to match existing behavior 109523e72ca8cSmrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 109533e72ca8cSmrg# available, an argument of "optional" allows use when some unit tests require 109543e72ca8cSmrg# ld -wrap and others do not. 109553e72ca8cSmrg# 109563e72ca8cSmrgAC_DEFUN([XORG_LD_WRAP],[ 109573e72ca8cSmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 109583e72ca8cSmrg [AC_LANG_PROGRAM([#include <stdlib.h> 109593e72ca8cSmrg void __wrap_exit(int status) { return; }], 109603e72ca8cSmrg [exit(0);])]) 109613e72ca8cSmrg# Not having ld wrap when unit testing has been explicitly requested is an error 109623e72ca8cSmrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 109633e72ca8cSmrg if test "x$have_ld_wrap" = x"no"; then 109643e72ca8cSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 109653e72ca8cSmrg fi 109663e72ca8cSmrgfi 109673e72ca8cSmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 109683e72ca8cSmrg# 109693e72ca8cSmrg]) # XORG_LD_WRAP 109703e72ca8cSmrg 109713e72ca8cSmrg# XORG_CHECK_LINKER_FLAGS 109723e72ca8cSmrg# ----------------------- 109733e72ca8cSmrg# SYNOPSIS 109743e72ca8cSmrg# 109753e72ca8cSmrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 109763e72ca8cSmrg# 109773e72ca8cSmrg# DESCRIPTION 109783e72ca8cSmrg# 109793e72ca8cSmrg# Check whether the given linker FLAGS work with the current language's 109803e72ca8cSmrg# linker, or whether they give an error. 109813e72ca8cSmrg# 109823e72ca8cSmrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 109833e72ca8cSmrg# success/failure. 109843e72ca8cSmrg# 109853e72ca8cSmrg# PROGRAM-SOURCE is the program source to link with, if needed 109863e72ca8cSmrg# 109873e72ca8cSmrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 109883e72ca8cSmrg# 109893e72ca8cSmrg# LICENSE 109903e72ca8cSmrg# 109913e72ca8cSmrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 109923e72ca8cSmrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 109933e72ca8cSmrg# Copyright (c) 2009 Matteo Frigo 109943e72ca8cSmrg# 109953e72ca8cSmrg# This program is free software: you can redistribute it and/or modify it 109963e72ca8cSmrg# under the terms of the GNU General Public License as published by the 109973e72ca8cSmrg# Free Software Foundation, either version 3 of the License, or (at your 109983e72ca8cSmrg# option) any later version. 109993e72ca8cSmrg# 110003e72ca8cSmrg# This program is distributed in the hope that it will be useful, but 110013e72ca8cSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 110023e72ca8cSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 110033e72ca8cSmrg# Public License for more details. 110043e72ca8cSmrg# 110053e72ca8cSmrg# You should have received a copy of the GNU General Public License along 110063e72ca8cSmrg# with this program. If not, see <http://www.gnu.org/licenses/>. 110073e72ca8cSmrg# 110083e72ca8cSmrg# As a special exception, the respective Autoconf Macro's copyright owner 110093e72ca8cSmrg# gives unlimited permission to copy, distribute and modify the configure 110103e72ca8cSmrg# scripts that are the output of Autoconf when processing the Macro. You 110113e72ca8cSmrg# need not follow the terms of the GNU General Public License when using 110123e72ca8cSmrg# or distributing such scripts, even though portions of the text of the 110133e72ca8cSmrg# Macro appear in them. The GNU General Public License (GPL) does govern 110143e72ca8cSmrg# all other use of the material that constitutes the Autoconf Macro. 110153e72ca8cSmrg# 110163e72ca8cSmrg# This special exception to the GPL applies to versions of the Autoconf 110173e72ca8cSmrg# Macro released by the Autoconf Archive. When you make and distribute a 110183e72ca8cSmrg# modified version of the Autoconf Macro, you may extend this special 110193e72ca8cSmrg# exception to the GPL to apply to your modified version as well.# 110203e72ca8cSmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 110213e72ca8cSmrg[AC_MSG_CHECKING([whether the linker accepts $1]) 110223e72ca8cSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 110233e72ca8cSmrgAS_LITERAL_IF([$1], 110243e72ca8cSmrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 110253e72ca8cSmrg ax_save_FLAGS=$LDFLAGS 110263e72ca8cSmrg LDFLAGS="$1" 110273e72ca8cSmrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 110283e72ca8cSmrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 110293e72ca8cSmrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 110303e72ca8cSmrg LDFLAGS=$ax_save_FLAGS])], 110313e72ca8cSmrg [ax_save_FLAGS=$LDFLAGS 110323e72ca8cSmrg LDFLAGS="$1" 110333e72ca8cSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 110343e72ca8cSmrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 110353e72ca8cSmrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 110363e72ca8cSmrg LDFLAGS=$ax_save_FLAGS]) 110373e72ca8cSmrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 110383e72ca8cSmrgAC_MSG_RESULT($xorg_check_linker_flags) 110393e72ca8cSmrgif test "x$xorg_check_linker_flags" = xyes; then 110403e72ca8cSmrg m4_default([$2], :) 110413e72ca8cSmrgelse 110423e72ca8cSmrg m4_default([$3], :) 110433e72ca8cSmrgfi 110443e72ca8cSmrg]) # XORG_CHECK_LINKER_FLAGS 110453e72ca8cSmrg 110463e72ca8cSmrg# XORG_MEMORY_CHECK_FLAGS 110473e72ca8cSmrg# ----------------------- 110483e72ca8cSmrg# Minimum version: 1.16.0 110493e72ca8cSmrg# 110503e72ca8cSmrg# This macro attempts to find appropriate memory checking functionality 110513e72ca8cSmrg# for various platforms which unit testing code may use to catch various 110523e72ca8cSmrg# forms of memory allocation and access errors in testing. 110533e72ca8cSmrg# 110543e72ca8cSmrg# Interface to module: 110553e72ca8cSmrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 110563e72ca8cSmrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 110573e72ca8cSmrg# 110583e72ca8cSmrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 110593e72ca8cSmrg# 110603e72ca8cSmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 110613e72ca8cSmrg 110623e72ca8cSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 110633e72ca8cSmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 110643e72ca8cSmrg [Environment variables to enable memory checking in tests]) 110653e72ca8cSmrg 110663e72ca8cSmrg# Check for different types of support on different platforms 110673e72ca8cSmrgcase $host_os in 110683e72ca8cSmrg solaris*) 110693e72ca8cSmrg AC_CHECK_LIB([umem], [umem_alloc], 110703e72ca8cSmrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 110713e72ca8cSmrg ;; 110723e72ca8cSmrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 110733e72ca8cSmrg # both directly and inverted, so should not be 0 or 255. 110743e72ca8cSmrg malloc_debug_env='MALLOC_PERTURB_=15' 110753e72ca8cSmrg ;; 110763e72ca8cSmrg darwin*) 110773e72ca8cSmrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 110783e72ca8cSmrg ;; 110793e72ca8cSmrg *bsd*) 110803e72ca8cSmrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 110813e72ca8cSmrg ;; 110823e72ca8cSmrgesac 110833e72ca8cSmrg 110843e72ca8cSmrg# User supplied flags override default flags 110853e72ca8cSmrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 110863e72ca8cSmrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 110873e72ca8cSmrgfi 110883e72ca8cSmrg 110893e72ca8cSmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 110903e72ca8cSmrg]) # XORG_WITH_LINT 110913e72ca8cSmrg 11092a1ed278cSmrg# XORG_CHECK_MALLOC_ZERO 11093a1ed278cSmrg# ---------------------- 11094a1ed278cSmrg# Minimum version: 1.0.0 11095a1ed278cSmrg# 11096a1ed278cSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 11097a1ed278cSmrg# malloc(0) returns NULL. Packages should add one of these cflags to 11098a1ed278cSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 11099a1ed278cSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 11100a1ed278cSmrgAC_ARG_ENABLE(malloc0returnsnull, 11101a1ed278cSmrg AS_HELP_STRING([--enable-malloc0returnsnull], 11102a1ed278cSmrg [malloc(0) returns NULL (default: auto)]), 11103a1ed278cSmrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 11104a1ed278cSmrg [MALLOC_ZERO_RETURNS_NULL=auto]) 11105ee3138f1Smrg 11106a1ed278cSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 11107a1ed278cSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 111083e72ca8cSmrg AC_RUN_IFELSE([AC_LANG_PROGRAM([ 111093e72ca8cSmrg#include <stdlib.h> 111103e72ca8cSmrg],[ 11111a1ed278cSmrg char *m0, *r0, *c0, *p; 11112a1ed278cSmrg m0 = malloc(0); 11113a1ed278cSmrg p = malloc(10); 11114a1ed278cSmrg r0 = realloc(p,0); 111153e72ca8cSmrg c0 = calloc(0,10); 111163e72ca8cSmrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 111173e72ca8cSmrg])], 11118a1ed278cSmrg [MALLOC_ZERO_RETURNS_NULL=yes], 11119a1ed278cSmrg [MALLOC_ZERO_RETURNS_NULL=no], 11120a1ed278cSmrg [MALLOC_ZERO_RETURNS_NULL=yes]) 11121a1ed278cSmrgfi 11122a1ed278cSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 11123ee3138f1Smrg 11124a1ed278cSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 11125a1ed278cSmrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 11126a1ed278cSmrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 11127a1ed278cSmrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 11128a1ed278cSmrgelse 11129a1ed278cSmrg MALLOC_ZERO_CFLAGS="" 11130a1ed278cSmrg XMALLOC_ZERO_CFLAGS="" 11131a1ed278cSmrg XTMALLOC_ZERO_CFLAGS="" 11132a1ed278cSmrgfi 11133ee3138f1Smrg 11134a1ed278cSmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 11135a1ed278cSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 11136a1ed278cSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 11137a1ed278cSmrg]) # XORG_CHECK_MALLOC_ZERO 11138ee3138f1Smrg 11139a1ed278cSmrg# XORG_WITH_LINT() 11140a1ed278cSmrg# ---------------- 11141a1ed278cSmrg# Minimum version: 1.1.0 11142a1ed278cSmrg# 11143a1ed278cSmrg# This macro enables the use of a tool that flags some suspicious and 11144a1ed278cSmrg# non-portable constructs (likely to be bugs) in C language source code. 11145a1ed278cSmrg# It will attempt to locate the tool and use appropriate options. 11146a1ed278cSmrg# There are various lint type tools on different platforms. 11147a1ed278cSmrg# 11148a1ed278cSmrg# Interface to module: 11149a1ed278cSmrg# LINT: returns the path to the tool found on the platform 11150a1ed278cSmrg# or the value set to LINT on the configure cmd line 11151a1ed278cSmrg# also an Automake conditional 11152a1ed278cSmrg# LINT_FLAGS: an Automake variable with appropriate flags 11153a1ed278cSmrg# 11154a1ed278cSmrg# --with-lint: 'yes' user instructs the module to use lint 11155a1ed278cSmrg# 'no' user instructs the module not to use lint (default) 11156a1ed278cSmrg# 11157a1ed278cSmrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 11158a1ed278cSmrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 11159a1ed278cSmrg# 11160a1ed278cSmrgAC_DEFUN([XORG_WITH_LINT],[ 11161ee3138f1Smrg 11162a1ed278cSmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 11163a1ed278cSmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 11164a1ed278cSmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 11165a1ed278cSmrg [Use a lint-style source code checker (default: disabled)])], 11166a1ed278cSmrg [use_lint=$withval], [use_lint=no]) 11167ee3138f1Smrg 11168a1ed278cSmrg# Obtain platform specific info like program name and options 11169a1ed278cSmrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 11170a1ed278cSmrgcase $host_os in 11171a1ed278cSmrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 11172a1ed278cSmrg lint_name=splint 11173a1ed278cSmrg lint_options="-badflag" 11174a1ed278cSmrg ;; 11175a1ed278cSmrg *freebsd* | *netbsd*) 11176a1ed278cSmrg lint_name=lint 11177a1ed278cSmrg lint_options="-u -b" 11178a1ed278cSmrg ;; 11179a1ed278cSmrg *solaris*) 11180a1ed278cSmrg lint_name=lint 11181a1ed278cSmrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 11182a1ed278cSmrg ;; 11183a1ed278cSmrgesac 11184ee3138f1Smrg 11185a1ed278cSmrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 11186a1ed278cSmrgif test "x$use_lint" = x"yes" ; then 11187a1ed278cSmrg AC_PATH_PROG([LINT], [$lint_name]) 11188a1ed278cSmrg if test "x$LINT" = "x"; then 11189a1ed278cSmrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 11190a1ed278cSmrg fi 11191a1ed278cSmrgelif test "x$use_lint" = x"no" ; then 11192a1ed278cSmrg if test "x$LINT" != "x"; then 11193a1ed278cSmrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 11194a1ed278cSmrg fi 11195a1ed278cSmrgelse 11196a1ed278cSmrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 11197a1ed278cSmrgfi 11198ee3138f1Smrg 11199a1ed278cSmrg# User supplied flags override default flags 11200a1ed278cSmrgif test "x$LINT_FLAGS" != "x"; then 11201a1ed278cSmrg lint_options=$LINT_FLAGS 11202a1ed278cSmrgfi 11203ee3138f1Smrg 11204a1ed278cSmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 11205a1ed278cSmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 11206ee3138f1Smrg 11207a1ed278cSmrg]) # XORG_WITH_LINT 11208ee3138f1Smrg 11209a1ed278cSmrg# XORG_LINT_LIBRARY(LIBNAME) 11210a1ed278cSmrg# -------------------------- 11211a1ed278cSmrg# Minimum version: 1.1.0 1121234977a2fSmrg# 11213a1ed278cSmrg# Sets up flags for building lint libraries for checking programs that call 11214a1ed278cSmrg# functions in the library. 1121534977a2fSmrg# 11216a1ed278cSmrg# Interface to module: 11217a1ed278cSmrg# LINTLIB - Automake variable with the name of lint library file to make 11218a1ed278cSmrg# MAKE_LINT_LIB - Automake conditional 11219a1ed278cSmrg# 11220a1ed278cSmrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 11221a1ed278cSmrg# - 'no' user instructs the module not to create a lint library (default) 11222ee3138f1Smrg 11223a1ed278cSmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 11224a1ed278cSmrgAC_REQUIRE([XORG_WITH_LINT]) 11225a1ed278cSmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 11226a1ed278cSmrg [Create lint library (default: disabled)])], 11227a1ed278cSmrg [make_lint_lib=$enableval], [make_lint_lib=no]) 1122834977a2fSmrg 11229a1ed278cSmrgif test "x$make_lint_lib" = x"yes" ; then 11230a1ed278cSmrg LINTLIB=llib-l$1.ln 11231a1ed278cSmrg if test "x$LINT" = "x"; then 11232a1ed278cSmrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 11233a1ed278cSmrg fi 11234a1ed278cSmrgelif test "x$make_lint_lib" != x"no" ; then 11235a1ed278cSmrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 11236a1ed278cSmrgfi 11237ee3138f1Smrg 11238a1ed278cSmrgAC_SUBST(LINTLIB) 11239a1ed278cSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 11240b425557eSmrg 11241a1ed278cSmrg]) # XORG_LINT_LIBRARY 11242b425557eSmrg 112433e72ca8cSmrg# XORG_COMPILER_BRAND 112443e72ca8cSmrg# ------------------- 112453e72ca8cSmrg# Minimum version: 1.14.0 112463e72ca8cSmrg# 112473e72ca8cSmrg# Checks for various brands of compilers and sets flags as appropriate: 112483e72ca8cSmrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 112493e72ca8cSmrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 112503e72ca8cSmrg# clang compiler - sets CLANGCC to "yes" 112513e72ca8cSmrg# Intel compiler - sets INTELCC to "yes" 112523e72ca8cSmrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 112533e72ca8cSmrg# 112543e72ca8cSmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 112553e72ca8cSmrgAC_LANG_CASE( 112563e72ca8cSmrg [C], [ 112573e72ca8cSmrg AC_REQUIRE([AC_PROG_CC_C99]) 112583e72ca8cSmrg ], 112593e72ca8cSmrg [C++], [ 112603e72ca8cSmrg AC_REQUIRE([AC_PROG_CXX]) 112613e72ca8cSmrg ] 112623e72ca8cSmrg) 112633e72ca8cSmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 112643e72ca8cSmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 112653e72ca8cSmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 112663e72ca8cSmrg]) # XORG_COMPILER_BRAND 112673e72ca8cSmrg 112683e72ca8cSmrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 112693e72ca8cSmrg# --------------- 112703e72ca8cSmrg# Minimum version: 1.16.0 112713e72ca8cSmrg# 112723e72ca8cSmrg# Test if the compiler works when passed the given flag as a command line argument. 112733e72ca8cSmrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 112743e72ca8cSmrg# next flag in the list until there are no more options. 112753e72ca8cSmrg# 112763e72ca8cSmrg# Note that this does not guarantee that the compiler supports the flag as some 112773e72ca8cSmrg# compilers will simply ignore arguments that they do not understand, but we do 112783e72ca8cSmrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 112793e72ca8cSmrg# -Werror=unused-command-line-argument 112803e72ca8cSmrg# 112813e72ca8cSmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 112823e72ca8cSmrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 112833e72ca8cSmrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 112843e72ca8cSmrg 112853e72ca8cSmrgAC_LANG_COMPILER_REQUIRE 112863e72ca8cSmrg 112873e72ca8cSmrgAC_LANG_CASE( 112883e72ca8cSmrg [C], [ 112893e72ca8cSmrg AC_REQUIRE([AC_PROG_CC_C99]) 112903e72ca8cSmrg define([PREFIX], [C]) 112913e72ca8cSmrg define([CACHE_PREFIX], [cc]) 112923e72ca8cSmrg define([COMPILER], [$CC]) 112933e72ca8cSmrg ], 112943e72ca8cSmrg [C++], [ 112953e72ca8cSmrg define([PREFIX], [CXX]) 112963e72ca8cSmrg define([CACHE_PREFIX], [cxx]) 112973e72ca8cSmrg define([COMPILER], [$CXX]) 112983e72ca8cSmrg ] 112993e72ca8cSmrg) 113003e72ca8cSmrg 113013e72ca8cSmrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 113023e72ca8cSmrg 113033e72ca8cSmrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 113043e72ca8cSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 113053e72ca8cSmrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 113063e72ca8cSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 113073e72ca8cSmrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 113083e72ca8cSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 113093e72ca8cSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 113103e72ca8cSmrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 113113e72ca8cSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 113123e72ca8cSmrgfi 113133e72ca8cSmrg 113143e72ca8cSmrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 113153e72ca8cSmrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 113163e72ca8cSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 113173e72ca8cSmrg fi 113183e72ca8cSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 113193e72ca8cSmrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 113203e72ca8cSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 113213e72ca8cSmrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 113223e72ca8cSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 113233e72ca8cSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 113243e72ca8cSmrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 113253e72ca8cSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 113263e72ca8cSmrgfi 113273e72ca8cSmrg 113283e72ca8cSmrgfound="no" 113293e72ca8cSmrgm4_foreach([flag], m4_cdr($@), [ 113303e72ca8cSmrg if test $found = "no" ; then 113313e72ca8cSmrg if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then 113323e72ca8cSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 113333e72ca8cSmrg fi 113343e72ca8cSmrg 113353e72ca8cSmrg if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then 113363e72ca8cSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 113373e72ca8cSmrg fi 113383e72ca8cSmrg 113393e72ca8cSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 113403e72ca8cSmrg 113413e72ca8cSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 113423e72ca8cSmrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 113433e72ca8cSmrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 113443e72ca8cSmrg AC_CACHE_VAL($cacheid, 113453e72ca8cSmrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 113463e72ca8cSmrg [eval $cacheid=yes], 113473e72ca8cSmrg [eval $cacheid=no])]) 113483e72ca8cSmrg 113493e72ca8cSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 113503e72ca8cSmrg 113513e72ca8cSmrg eval supported=\$$cacheid 113523e72ca8cSmrg AC_MSG_RESULT([$supported]) 113533e72ca8cSmrg if test "$supported" = "yes" ; then 113543e72ca8cSmrg $1="$$1 ]flag[" 113553e72ca8cSmrg found="yes" 113563e72ca8cSmrg fi 113573e72ca8cSmrg fi 113583e72ca8cSmrg]) 113593e72ca8cSmrg]) # XORG_TESTSET_CFLAG 113603e72ca8cSmrg 113613e72ca8cSmrg# XORG_COMPILER_FLAGS 113623e72ca8cSmrg# --------------- 113633e72ca8cSmrg# Minimum version: 1.16.0 113643e72ca8cSmrg# 113653e72ca8cSmrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 113663e72ca8cSmrg# arguments supported by the selected compiler which do NOT alter the generated 113673e72ca8cSmrg# code. These arguments will cause the compiler to print various warnings 113683e72ca8cSmrg# during compilation AND turn a conservative set of warnings into errors. 113693e72ca8cSmrg# 113703e72ca8cSmrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 113713e72ca8cSmrg# future versions of util-macros as options are added to new compilers. 113723e72ca8cSmrg# 113733e72ca8cSmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 113743e72ca8cSmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 113753e72ca8cSmrg 113763e72ca8cSmrgAC_ARG_ENABLE(selective-werror, 113773e72ca8cSmrg AS_HELP_STRING([--disable-selective-werror], 113783e72ca8cSmrg [Turn off selective compiler errors. (default: enabled)]), 113793e72ca8cSmrg [SELECTIVE_WERROR=$enableval], 113803e72ca8cSmrg [SELECTIVE_WERROR=yes]) 113813e72ca8cSmrg 113823e72ca8cSmrgAC_LANG_CASE( 113833e72ca8cSmrg [C], [ 113843e72ca8cSmrg define([PREFIX], [C]) 113853e72ca8cSmrg ], 113863e72ca8cSmrg [C++], [ 113873e72ca8cSmrg define([PREFIX], [CXX]) 113883e72ca8cSmrg ] 113893e72ca8cSmrg) 113903e72ca8cSmrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 113913e72ca8cSmrgif test "x$SUNCC" = "xyes"; then 113923e72ca8cSmrg [BASE_]PREFIX[FLAGS]="-v" 113933e72ca8cSmrgelse 113943e72ca8cSmrg [BASE_]PREFIX[FLAGS]="" 113953e72ca8cSmrgfi 113963e72ca8cSmrg 113973e72ca8cSmrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 113983e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 113993e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 114003e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 114013e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 114023e72ca8cSmrg 114033e72ca8cSmrgAC_LANG_CASE( 114043e72ca8cSmrg [C], [ 114053e72ca8cSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 114063e72ca8cSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 114073e72ca8cSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 114083e72ca8cSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 114093e72ca8cSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition]) 114103e72ca8cSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 114113e72ca8cSmrg ] 114123e72ca8cSmrg) 114133e72ca8cSmrg 114143e72ca8cSmrg# This chunk adds additional warnings that could catch undesired effects. 114153e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 114163e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 114173e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 114183e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 114193e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 114203e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 114213e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 114223e72ca8cSmrg 114233e72ca8cSmrg# These are currently disabled because they are noisy. They will be enabled 114243e72ca8cSmrg# in the future once the codebase is sufficiently modernized to silence 114253e72ca8cSmrg# them. For now, I don't want them to drown out the other warnings. 114263e72ca8cSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 114273e72ca8cSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 114283e72ca8cSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 114293e72ca8cSmrg 114303e72ca8cSmrg# Turn some warnings into errors, so we don't accidently get successful builds 114313e72ca8cSmrg# when there are problems that should be fixed. 114323e72ca8cSmrg 114333e72ca8cSmrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 114343e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 114353e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 114363e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 114373e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 114383e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 114393e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 114403e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 114413e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 114423e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 114433e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 114443e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 114453e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 114463e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 114473e72ca8cSmrgelse 114483e72ca8cSmrgAC_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]) 114493e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 114503e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 114513e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 114523e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 114533e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 114543e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 114553e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 114563e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 114573e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 114583e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 114593e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 114603e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 114613e72ca8cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 114623e72ca8cSmrgfi 114633e72ca8cSmrg 114643e72ca8cSmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 114653e72ca8cSmrg]) # XORG_COMPILER_FLAGS 114663e72ca8cSmrg 11467a1ed278cSmrg# XORG_CWARNFLAGS 11468a1ed278cSmrg# --------------- 11469a1ed278cSmrg# Minimum version: 1.2.0 114703e72ca8cSmrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 11471ee3138f1Smrg# 11472a1ed278cSmrg# Defines CWARNFLAGS to enable C compiler warnings. 11473ee3138f1Smrg# 114743e72ca8cSmrg# This function is deprecated because it defines -fno-strict-aliasing 114753e72ca8cSmrg# which alters the code generated by the compiler. If -fno-strict-aliasing 114763e72ca8cSmrg# is needed, then it should be added explicitly in the module when 114773e72ca8cSmrg# it is updated to use BASE_CFLAGS. 114783e72ca8cSmrg# 11479a1ed278cSmrgAC_DEFUN([XORG_CWARNFLAGS], [ 114803e72ca8cSmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 114813e72ca8cSmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 114823e72ca8cSmrgAC_LANG_CASE( 114833e72ca8cSmrg [C], [ 114843e72ca8cSmrg CWARNFLAGS="$BASE_CFLAGS" 114853e72ca8cSmrg if test "x$GCC" = xyes ; then 114863e72ca8cSmrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 114873e72ca8cSmrg fi 114883e72ca8cSmrg AC_SUBST(CWARNFLAGS) 114893e72ca8cSmrg ] 114903e72ca8cSmrg) 11491a1ed278cSmrg]) # XORG_CWARNFLAGS 11492ee3138f1Smrg 11493a1ed278cSmrg# XORG_STRICT_OPTION 11494a1ed278cSmrg# ----------------------- 11495a1ed278cSmrg# Minimum version: 1.3.0 11496a1ed278cSmrg# 114973e72ca8cSmrg# Add configure option to enable strict compilation flags, such as treating 114983e72ca8cSmrg# warnings as fatal errors. 114993e72ca8cSmrg# If --enable-strict-compilation is passed to configure, adds strict flags to 115003e72ca8cSmrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 115013e72ca8cSmrg# 115023e72ca8cSmrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 115033e72ca8cSmrg# when strict compilation is unconditionally desired. 11504a1ed278cSmrgAC_DEFUN([XORG_STRICT_OPTION], [ 11505a1ed278cSmrgAC_REQUIRE([XORG_CWARNFLAGS]) 115063e72ca8cSmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 1150734977a2fSmrg 11508a1ed278cSmrgAC_ARG_ENABLE(strict-compilation, 11509a1ed278cSmrg AS_HELP_STRING([--enable-strict-compilation], 11510a1ed278cSmrg [Enable all warnings from compiler and make them errors (default: disabled)]), 11511a1ed278cSmrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 115123e72ca8cSmrg 115133e72ca8cSmrgAC_LANG_CASE( 115143e72ca8cSmrg [C], [ 115153e72ca8cSmrg define([PREFIX], [C]) 115163e72ca8cSmrg ], 115173e72ca8cSmrg [C++], [ 115183e72ca8cSmrg define([PREFIX], [CXX]) 115193e72ca8cSmrg ] 115203e72ca8cSmrg) 115213e72ca8cSmrg 115223e72ca8cSmrg[STRICT_]PREFIX[FLAGS]="" 115233e72ca8cSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 115243e72ca8cSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 115253e72ca8cSmrg 115263e72ca8cSmrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 115273e72ca8cSmrg# activate it with -Werror, so we add it here explicitly. 115283e72ca8cSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 115293e72ca8cSmrg 11530a1ed278cSmrgif test "x$STRICT_COMPILE" = "xyes"; then 115313e72ca8cSmrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 115323e72ca8cSmrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 11533a1ed278cSmrgfi 115343e72ca8cSmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 115353e72ca8cSmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 115363e72ca8cSmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 11537a1ed278cSmrg]) # XORG_STRICT_OPTION 11538a1ed278cSmrg 11539a1ed278cSmrg# XORG_DEFAULT_OPTIONS 11540a1ed278cSmrg# -------------------- 11541a1ed278cSmrg# Minimum version: 1.3.0 11542ee3138f1Smrg# 11543a1ed278cSmrg# Defines default options for X.Org modules. 11544ee3138f1Smrg# 11545a1ed278cSmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 11546a1ed278cSmrgAC_REQUIRE([AC_PROG_INSTALL]) 115473e72ca8cSmrgXORG_COMPILER_FLAGS 11548a1ed278cSmrgXORG_CWARNFLAGS 11549a1ed278cSmrgXORG_STRICT_OPTION 11550a1ed278cSmrgXORG_RELEASE_VERSION 11551a1ed278cSmrgXORG_CHANGELOG 11552a1ed278cSmrgXORG_INSTALL 11553a1ed278cSmrgXORG_MANPAGE_SECTIONS 11554a1ed278cSmrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 11555a1ed278cSmrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 11556a1ed278cSmrg]) # XORG_DEFAULT_OPTIONS 11557a1ed278cSmrg 11558a1ed278cSmrg# XORG_INSTALL() 11559a1ed278cSmrg# ---------------- 11560a1ed278cSmrg# Minimum version: 1.4.0 1156134977a2fSmrg# 11562a1ed278cSmrg# Defines the variable INSTALL_CMD as the command to copy 11563a1ed278cSmrg# INSTALL from $prefix/share/util-macros. 11564b425557eSmrg# 11565a1ed278cSmrgAC_DEFUN([XORG_INSTALL], [ 11566a1ed278cSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 11567a1ed278cSmrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 11568a1ed278cSmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 11569a1ed278cSmrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 11570a1ed278cSmrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 11571a1ed278cSmrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 11572a1ed278cSmrgAC_SUBST([INSTALL_CMD]) 11573a1ed278cSmrg]) # XORG_INSTALL 11574a1ed278cSmrgdnl Copyright 2005 Red Hat, Inc 11575a1ed278cSmrgdnl 11576a1ed278cSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 11577a1ed278cSmrgdnl documentation for any purpose is hereby granted without fee, provided that 11578a1ed278cSmrgdnl the above copyright notice appear in all copies and that both that 11579a1ed278cSmrgdnl copyright notice and this permission notice appear in supporting 11580a1ed278cSmrgdnl documentation. 11581a1ed278cSmrgdnl 11582a1ed278cSmrgdnl The above copyright notice and this permission notice shall be included 11583a1ed278cSmrgdnl in all copies or substantial portions of the Software. 11584a1ed278cSmrgdnl 11585a1ed278cSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 11586a1ed278cSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 11587a1ed278cSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 11588a1ed278cSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 11589a1ed278cSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 11590a1ed278cSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 11591a1ed278cSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 11592a1ed278cSmrgdnl 11593a1ed278cSmrgdnl Except as contained in this notice, the name of the copyright holders shall 11594a1ed278cSmrgdnl not be used in advertising or otherwise to promote the sale, use or 11595a1ed278cSmrgdnl other dealings in this Software without prior written authorization 11596a1ed278cSmrgdnl from the copyright holders. 11597a1ed278cSmrgdnl 11598ee3138f1Smrg 11599a1ed278cSmrg# XORG_RELEASE_VERSION 11600a1ed278cSmrg# -------------------- 11601a1ed278cSmrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 11602a1ed278cSmrg 11603a1ed278cSmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 11604a1ed278cSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 11605a1ed278cSmrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 11606a1ed278cSmrg [Major version of this package]) 11607a1ed278cSmrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 11608a1ed278cSmrg if test "x$PVM" = "x"; then 11609a1ed278cSmrg PVM="0" 11610a1ed278cSmrg fi 11611a1ed278cSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 11612a1ed278cSmrg [$PVM], 11613a1ed278cSmrg [Minor version of this package]) 11614a1ed278cSmrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 11615a1ed278cSmrg if test "x$PVP" = "x"; then 11616a1ed278cSmrg PVP="0" 11617a1ed278cSmrg fi 11618a1ed278cSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 11619a1ed278cSmrg [$PVP], 11620a1ed278cSmrg [Patch version of this package]) 11621a1ed278cSmrg]) 11622ee3138f1Smrg 11623a1ed278cSmrg# XORG_CHANGELOG() 11624a1ed278cSmrg# ---------------- 11625a1ed278cSmrg# Minimum version: 1.2.0 11626a1ed278cSmrg# 11627a1ed278cSmrg# Defines the variable CHANGELOG_CMD as the command to generate 11628a1ed278cSmrg# ChangeLog from git. 11629a1ed278cSmrg# 11630a1ed278cSmrg# 11631a1ed278cSmrgAC_DEFUN([XORG_CHANGELOG], [ 11632a1ed278cSmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 11633a1ed278cSmrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 11634a1ed278cSmrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 11635a1ed278cSmrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 11636a1ed278cSmrgAC_SUBST([CHANGELOG_CMD]) 11637a1ed278cSmrg]) # XORG_CHANGELOG 11638ee3138f1Smrg 11639