11e423a8fSmrg# generated automatically by aclocal 1.16.5 -*- Autoconf -*- 2acd6767fSmrg 31e423a8fSmrg# Copyright (C) 1996-2021 Free Software Foundation, Inc. 4fe5e51b7Smrg 5fe5e51b7Smrg# This file is free software; the Free Software Foundation 6fe5e51b7Smrg# gives unlimited permission to copy and/or distribute it, 7fe5e51b7Smrg# with or without modifications, as long as this notice is preserved. 8fe5e51b7Smrg 9fe5e51b7Smrg# This program is distributed in the hope that it will be useful, 10fe5e51b7Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11fe5e51b7Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12fe5e51b7Smrg# PARTICULAR PURPOSE. 13fe5e51b7Smrg 14493f84f4Smrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 15eda3803bSmrgm4_ifndef([AC_AUTOCONF_VERSION], 16eda3803bSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 171e423a8fSmrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],, 181e423a8fSmrg[m4_warning([this file was generated for autoconf 2.71. 19eda3803bSmrgYou have another version of autoconf. It may work, but is not guaranteed to. 20eda3803bSmrgIf you have problems, you may need to regenerate the build system entirely. 21acd6767fSmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])]) 22fe5e51b7Smrg 231e423a8fSmrg# Copyright (C) 2002-2021 Free Software Foundation, Inc. 24a31a186aSmrg# 251e423a8fSmrg# This file is free software; the Free Software Foundation 261e423a8fSmrg# gives unlimited permission to copy and/or distribute it, 271e423a8fSmrg# with or without modifications, as long as this notice is preserved. 28493f84f4Smrg 291e423a8fSmrg# AM_AUTOMAKE_VERSION(VERSION) 301e423a8fSmrg# ---------------------------- 311e423a8fSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 321e423a8fSmrg# generated from the m4 files accompanying Automake X.Y. 331e423a8fSmrg# (This private macro should not be called outside this file.) 341e423a8fSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 351e423a8fSmrg[am__api_version='1.16' 361e423a8fSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 371e423a8fSmrgdnl require some minimum version. Point them to the right macro. 381e423a8fSmrgm4_if([$1], [1.16.5], [], 391e423a8fSmrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 40a31a186aSmrg]) 41fe5e51b7Smrg 421e423a8fSmrg# _AM_AUTOCONF_VERSION(VERSION) 431e423a8fSmrg# ----------------------------- 441e423a8fSmrg# aclocal traces this macro to find the Autoconf version. 451e423a8fSmrg# This is a private macro too. Using m4_define simplifies 461e423a8fSmrg# the logic in aclocal, which can simply ignore this definition. 471e423a8fSmrgm4_define([_AM_AUTOCONF_VERSION], []) 48fe5e51b7Smrg 491e423a8fSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION 501e423a8fSmrg# ------------------------------- 511e423a8fSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 521e423a8fSmrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 531e423a8fSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 541e423a8fSmrg[AM_AUTOMAKE_VERSION([1.16.5])dnl 551e423a8fSmrgm4_ifndef([AC_AUTOCONF_VERSION], 561e423a8fSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 571e423a8fSmrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 58fe5e51b7Smrg 591e423a8fSmrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 60eda3803bSmrg 611e423a8fSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 621e423a8fSmrg# 631e423a8fSmrg# This file is free software; the Free Software Foundation 641e423a8fSmrg# gives unlimited permission to copy and/or distribute it, 651e423a8fSmrg# with or without modifications, as long as this notice is preserved. 66eda3803bSmrg 671e423a8fSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 681e423a8fSmrg# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 691e423a8fSmrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 701e423a8fSmrg# 711e423a8fSmrg# Of course, Automake must honor this variable whenever it calls a 721e423a8fSmrg# tool from the auxiliary directory. The problem is that $srcdir (and 731e423a8fSmrg# therefore $ac_aux_dir as well) can be either absolute or relative, 741e423a8fSmrg# depending on how configure is run. This is pretty annoying, since 751e423a8fSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 761e423a8fSmrg# source directory, any form will work fine, but in subdirectories a 771e423a8fSmrg# relative path needs to be adjusted first. 781e423a8fSmrg# 791e423a8fSmrg# $ac_aux_dir/missing 801e423a8fSmrg# fails when called from a subdirectory if $ac_aux_dir is relative 811e423a8fSmrg# $top_srcdir/$ac_aux_dir/missing 821e423a8fSmrg# fails if $ac_aux_dir is absolute, 831e423a8fSmrg# fails when called from a subdirectory in a VPATH build with 841e423a8fSmrg# a relative $ac_aux_dir 851e423a8fSmrg# 861e423a8fSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 871e423a8fSmrg# are both prefixed by $srcdir. In an in-source build this is usually 881e423a8fSmrg# harmless because $srcdir is '.', but things will broke when you 891e423a8fSmrg# start a VPATH build or use an absolute $srcdir. 901e423a8fSmrg# 911e423a8fSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 921e423a8fSmrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 931e423a8fSmrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 941e423a8fSmrg# and then we would define $MISSING as 951e423a8fSmrg# MISSING="\${SHELL} $am_aux_dir/missing" 961e423a8fSmrg# This will work as long as MISSING is not called from configure, because 971e423a8fSmrg# unfortunately $(top_srcdir) has no meaning in configure. 981e423a8fSmrg# However there are other variables, like CC, which are often used in 991e423a8fSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 1001e423a8fSmrg# 1011e423a8fSmrg# Another solution, used here, is to always expand $ac_aux_dir to an 1021e423a8fSmrg# absolute PATH. The drawback is that using absolute paths prevent a 1031e423a8fSmrg# configured tree to be moved without reconfiguration. 1041e423a8fSmrg 1051e423a8fSmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 1061e423a8fSmrg[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 1071e423a8fSmrg# Expand $ac_aux_dir to an absolute path. 1081e423a8fSmrgam_aux_dir=`cd "$ac_aux_dir" && pwd` 109a31a186aSmrg]) 110a31a186aSmrg 1111e423a8fSmrg# AM_CONDITIONAL -*- Autoconf -*- 112a31a186aSmrg 1131e423a8fSmrg# Copyright (C) 1997-2021 Free Software Foundation, Inc. 1141e423a8fSmrg# 1151e423a8fSmrg# This file is free software; the Free Software Foundation 1161e423a8fSmrg# gives unlimited permission to copy and/or distribute it, 1171e423a8fSmrg# with or without modifications, as long as this notice is preserved. 118a31a186aSmrg 1191e423a8fSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 1201e423a8fSmrg# ------------------------------------- 1211e423a8fSmrg# Define a conditional. 1221e423a8fSmrgAC_DEFUN([AM_CONDITIONAL], 1231e423a8fSmrg[AC_PREREQ([2.52])dnl 1241e423a8fSmrg m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 1251e423a8fSmrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 1261e423a8fSmrgAC_SUBST([$1_TRUE])dnl 1271e423a8fSmrgAC_SUBST([$1_FALSE])dnl 1281e423a8fSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 1291e423a8fSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 1301e423a8fSmrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 1311e423a8fSmrgif $2; then 1321e423a8fSmrg $1_TRUE= 1331e423a8fSmrg $1_FALSE='#' 1341e423a8fSmrgelse 1351e423a8fSmrg $1_TRUE='#' 1361e423a8fSmrg $1_FALSE= 1371e423a8fSmrgfi 1381e423a8fSmrgAC_CONFIG_COMMANDS_PRE( 1391e423a8fSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 1401e423a8fSmrg AC_MSG_ERROR([[conditional "$1" was never defined. 1411e423a8fSmrgUsually this means the macro was only invoked conditionally.]]) 1421e423a8fSmrgfi])]) 143a31a186aSmrg 1441e423a8fSmrg# Copyright (C) 1999-2021 Free Software Foundation, Inc. 1451e423a8fSmrg# 1461e423a8fSmrg# This file is free software; the Free Software Foundation 1471e423a8fSmrg# gives unlimited permission to copy and/or distribute it, 1481e423a8fSmrg# with or without modifications, as long as this notice is preserved. 1490bb88ba4Smrg 150fe5e51b7Smrg 1511e423a8fSmrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 1521e423a8fSmrg# written in clear, in which case automake, when reading aclocal.m4, 1531e423a8fSmrg# will think it sees a *use*, and therefore will trigger all it's 1541e423a8fSmrg# C support machinery. Also note that it means that autoscan, seeing 1551e423a8fSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 156fe5e51b7Smrg 157fe5e51b7Smrg 1581e423a8fSmrg# _AM_DEPENDENCIES(NAME) 1591e423a8fSmrg# ---------------------- 1601e423a8fSmrg# See how the compiler implements dependency checking. 1611e423a8fSmrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 1621e423a8fSmrg# We try a few techniques and use that to set a single cache variable. 1631e423a8fSmrg# 1641e423a8fSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 1651e423a8fSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 1661e423a8fSmrg# dependency, and given that the user is not expected to run this macro, 1671e423a8fSmrg# just rely on AC_PROG_CC. 1681e423a8fSmrgAC_DEFUN([_AM_DEPENDENCIES], 1691e423a8fSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 1701e423a8fSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 1711e423a8fSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 1721e423a8fSmrgAC_REQUIRE([AM_DEP_TRACK])dnl 173eda3803bSmrg 1741e423a8fSmrgm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 1751e423a8fSmrg [$1], [CXX], [depcc="$CXX" am_compiler_list=], 1761e423a8fSmrg [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 1771e423a8fSmrg [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 1781e423a8fSmrg [$1], [UPC], [depcc="$UPC" am_compiler_list=], 1791e423a8fSmrg [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 1801e423a8fSmrg [depcc="$$1" am_compiler_list=]) 181eda3803bSmrg 1821e423a8fSmrgAC_CACHE_CHECK([dependency style of $depcc], 1831e423a8fSmrg [am_cv_$1_dependencies_compiler_type], 1841e423a8fSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 1851e423a8fSmrg # We make a subdir and do the tests there. Otherwise we can end up 1861e423a8fSmrg # making bogus files that we don't know about and never remove. For 1871e423a8fSmrg # instance it was reported that on HP-UX the gcc test will end up 1881e423a8fSmrg # making a dummy file named 'D' -- because '-MD' means "put the output 1891e423a8fSmrg # in D". 1901e423a8fSmrg rm -rf conftest.dir 1911e423a8fSmrg mkdir conftest.dir 1921e423a8fSmrg # Copy depcomp to subdir because otherwise we won't find it if we're 1931e423a8fSmrg # using a relative directory. 1941e423a8fSmrg cp "$am_depcomp" conftest.dir 1951e423a8fSmrg cd conftest.dir 1961e423a8fSmrg # We will build objects and dependencies in a subdirectory because 1971e423a8fSmrg # it helps to detect inapplicable dependency modes. For instance 1981e423a8fSmrg # both Tru64's cc and ICC support -MD to output dependencies as a 1991e423a8fSmrg # side effect of compilation, but ICC will put the dependencies in 2001e423a8fSmrg # the current directory while Tru64 will put them in the object 2011e423a8fSmrg # directory. 2021e423a8fSmrg mkdir sub 203a31a186aSmrg 2041e423a8fSmrg am_cv_$1_dependencies_compiler_type=none 2051e423a8fSmrg if test "$am_compiler_list" = ""; then 2061e423a8fSmrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 2071e423a8fSmrg fi 2081e423a8fSmrg am__universal=false 2091e423a8fSmrg m4_case([$1], [CC], 2101e423a8fSmrg [case " $depcc " in #( 2111e423a8fSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 2121e423a8fSmrg esac], 2131e423a8fSmrg [CXX], 2141e423a8fSmrg [case " $depcc " in #( 2151e423a8fSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 2161e423a8fSmrg esac]) 217a31a186aSmrg 2181e423a8fSmrg for depmode in $am_compiler_list; do 2191e423a8fSmrg # Setup a source with many dependencies, because some compilers 2201e423a8fSmrg # like to wrap large dependency lists on column 80 (with \), and 2211e423a8fSmrg # we should not choose a depcomp mode which is confused by this. 2221e423a8fSmrg # 2231e423a8fSmrg # We need to recreate these files for each test, as the compiler may 2241e423a8fSmrg # overwrite some of them when testing with obscure command lines. 2251e423a8fSmrg # This happens at least with the AIX C compiler. 2261e423a8fSmrg : > sub/conftest.c 2271e423a8fSmrg for i in 1 2 3 4 5 6; do 2281e423a8fSmrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 2291e423a8fSmrg # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 2301e423a8fSmrg # Solaris 10 /bin/sh. 2311e423a8fSmrg echo '/* dummy */' > sub/conftst$i.h 232ee82cb62Smrg done 2331e423a8fSmrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 234ee82cb62Smrg 2351e423a8fSmrg # We check with '-c' and '-o' for the sake of the "dashmstdout" 2361e423a8fSmrg # mode. It turns out that the SunPro C++ compiler does not properly 2371e423a8fSmrg # handle '-M -o', and we need to detect this. Also, some Intel 2381e423a8fSmrg # versions had trouble with output in subdirs. 2391e423a8fSmrg am__obj=sub/conftest.${OBJEXT-o} 2401e423a8fSmrg am__minus_obj="-o $am__obj" 2411e423a8fSmrg case $depmode in 2421e423a8fSmrg gcc) 2431e423a8fSmrg # This depmode causes a compiler race in universal mode. 2441e423a8fSmrg test "$am__universal" = false || continue 2451e423a8fSmrg ;; 2461e423a8fSmrg nosideeffect) 2471e423a8fSmrg # After this tag, mechanisms are not by side-effect, so they'll 2481e423a8fSmrg # only be used when explicitly requested. 2491e423a8fSmrg if test "x$enable_dependency_tracking" = xyes; then 2501e423a8fSmrg continue 2511e423a8fSmrg else 2521e423a8fSmrg break 2531e423a8fSmrg fi 2541e423a8fSmrg ;; 2551e423a8fSmrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 2561e423a8fSmrg # This compiler won't grok '-c -o', but also, the minuso test has 2571e423a8fSmrg # not run yet. These depmodes are late enough in the game, and 2581e423a8fSmrg # so weak that their functioning should not be impacted. 2591e423a8fSmrg am__obj=conftest.${OBJEXT-o} 2601e423a8fSmrg am__minus_obj= 2611e423a8fSmrg ;; 2621e423a8fSmrg none) break ;; 2631e423a8fSmrg esac 2641e423a8fSmrg if depmode=$depmode \ 2651e423a8fSmrg source=sub/conftest.c object=$am__obj \ 2661e423a8fSmrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 2671e423a8fSmrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 2681e423a8fSmrg >/dev/null 2>conftest.err && 2691e423a8fSmrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 2701e423a8fSmrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 2711e423a8fSmrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 2721e423a8fSmrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 2731e423a8fSmrg # icc doesn't choke on unknown options, it will just issue warnings 2741e423a8fSmrg # or remarks (even with -Werror). So we grep stderr for any message 2751e423a8fSmrg # that says an option was ignored or not supported. 2761e423a8fSmrg # When given -MP, icc 7.0 and 7.1 complain thusly: 2771e423a8fSmrg # icc: Command line warning: ignoring option '-M'; no argument required 2781e423a8fSmrg # The diagnosis changed in icc 8.0: 2791e423a8fSmrg # icc: Command line remark: option '-MP' not supported 2801e423a8fSmrg if (grep 'ignoring option' conftest.err || 2811e423a8fSmrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 2821e423a8fSmrg am_cv_$1_dependencies_compiler_type=$depmode 2831e423a8fSmrg break 2841e423a8fSmrg fi 2851e423a8fSmrg fi 2861e423a8fSmrg done 287ee82cb62Smrg 2881e423a8fSmrg cd .. 2891e423a8fSmrg rm -rf conftest.dir 2901e423a8fSmrgelse 2911e423a8fSmrg am_cv_$1_dependencies_compiler_type=none 2921e423a8fSmrgfi 2931e423a8fSmrg]) 2941e423a8fSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 2951e423a8fSmrgAM_CONDITIONAL([am__fastdep$1], [ 2961e423a8fSmrg test "x$enable_dependency_tracking" != xno \ 2971e423a8fSmrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 298a31a186aSmrg]) 299a31a186aSmrg 300a31a186aSmrg 3011e423a8fSmrg# AM_SET_DEPDIR 3021e423a8fSmrg# ------------- 3031e423a8fSmrg# Choose a directory name for dependency files. 3041e423a8fSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 3051e423a8fSmrgAC_DEFUN([AM_SET_DEPDIR], 3061e423a8fSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 3071e423a8fSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 3081e423a8fSmrg]) 3090bb88ba4Smrg 310a31a186aSmrg 3111e423a8fSmrg# AM_DEP_TRACK 3121e423a8fSmrg# ------------ 3131e423a8fSmrgAC_DEFUN([AM_DEP_TRACK], 3141e423a8fSmrg[AC_ARG_ENABLE([dependency-tracking], [dnl 3151e423a8fSmrgAS_HELP_STRING( 3161e423a8fSmrg [--enable-dependency-tracking], 3171e423a8fSmrg [do not reject slow dependency extractors]) 3181e423a8fSmrgAS_HELP_STRING( 3191e423a8fSmrg [--disable-dependency-tracking], 3201e423a8fSmrg [speeds up one-time build])]) 3211e423a8fSmrgif test "x$enable_dependency_tracking" != xno; then 3221e423a8fSmrg am_depcomp="$ac_aux_dir/depcomp" 3231e423a8fSmrg AMDEPBACKSLASH='\' 3241e423a8fSmrg am__nodep='_no' 325a31a186aSmrgfi 3261e423a8fSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 3271e423a8fSmrgAC_SUBST([AMDEPBACKSLASH])dnl 3281e423a8fSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 3291e423a8fSmrgAC_SUBST([am__nodep])dnl 3301e423a8fSmrg_AM_SUBST_NOTMAKE([am__nodep])dnl 331a31a186aSmrg]) 332fe5e51b7Smrg 3331e423a8fSmrg# Generate code to set up dependency tracking. -*- Autoconf -*- 334a31a186aSmrg 3351e423a8fSmrg# Copyright (C) 1999-2021 Free Software Foundation, Inc. 3361e423a8fSmrg# 3371e423a8fSmrg# This file is free software; the Free Software Foundation 3381e423a8fSmrg# gives unlimited permission to copy and/or distribute it, 3391e423a8fSmrg# with or without modifications, as long as this notice is preserved. 340fe5e51b7Smrg 3411e423a8fSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 3421e423a8fSmrg# ------------------------------ 3431e423a8fSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 3441e423a8fSmrg[{ 3451e423a8fSmrg # Older Autoconf quotes --file arguments for eval, but not when files 3461e423a8fSmrg # are listed without --file. Let's play safe and only enable the eval 3471e423a8fSmrg # if we detect the quoting. 3481e423a8fSmrg # TODO: see whether this extra hack can be removed once we start 3491e423a8fSmrg # requiring Autoconf 2.70 or later. 3501e423a8fSmrg AS_CASE([$CONFIG_FILES], 3511e423a8fSmrg [*\'*], [eval set x "$CONFIG_FILES"], 3521e423a8fSmrg [*], [set x $CONFIG_FILES]) 3531e423a8fSmrg shift 3541e423a8fSmrg # Used to flag and report bootstrapping failures. 3551e423a8fSmrg am_rc=0 3561e423a8fSmrg for am_mf 3571e423a8fSmrg do 3581e423a8fSmrg # Strip MF so we end up with the name of the file. 3591e423a8fSmrg am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` 3601e423a8fSmrg # Check whether this is an Automake generated Makefile which includes 3611e423a8fSmrg # dependency-tracking related rules and includes. 3621e423a8fSmrg # Grep'ing the whole file directly is not great: AIX grep has a line 3631e423a8fSmrg # limit of 2048, but all sed's we know have understand at least 4000. 3641e423a8fSmrg sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ 3651e423a8fSmrg || continue 3661e423a8fSmrg am_dirpart=`AS_DIRNAME(["$am_mf"])` 3671e423a8fSmrg am_filepart=`AS_BASENAME(["$am_mf"])` 3681e423a8fSmrg AM_RUN_LOG([cd "$am_dirpart" \ 3691e423a8fSmrg && sed -e '/# am--include-marker/d' "$am_filepart" \ 3701e423a8fSmrg | $MAKE -f - am--depfiles]) || am_rc=$? 3711e423a8fSmrg done 3721e423a8fSmrg if test $am_rc -ne 0; then 3731e423a8fSmrg AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments 3741e423a8fSmrg for automatic dependency tracking. If GNU make was not used, consider 3751e423a8fSmrg re-running the configure script with MAKE="gmake" (or whatever is 3761e423a8fSmrg necessary). You can also try re-running configure with the 3771e423a8fSmrg '--disable-dependency-tracking' option to at least be able to build 3781e423a8fSmrg the package (albeit without support for automatic dependency tracking).]) 379fe5e51b7Smrg fi 3801e423a8fSmrg AS_UNSET([am_dirpart]) 3811e423a8fSmrg AS_UNSET([am_filepart]) 3821e423a8fSmrg AS_UNSET([am_mf]) 3831e423a8fSmrg AS_UNSET([am_rc]) 3841e423a8fSmrg rm -f conftest-deps.mk 3851e423a8fSmrg} 3861e423a8fSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 387fe5e51b7Smrg 388fe5e51b7Smrg 3891e423a8fSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS 3901e423a8fSmrg# ----------------------------- 3911e423a8fSmrg# This macro should only be invoked once -- use via AC_REQUIRE. 3921e423a8fSmrg# 3931e423a8fSmrg# This code is only required when automatic dependency tracking is enabled. 3941e423a8fSmrg# This creates each '.Po' and '.Plo' makefile fragment that we'll need in 3951e423a8fSmrg# order to bootstrap the dependency handling code. 3961e423a8fSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 3971e423a8fSmrg[AC_CONFIG_COMMANDS([depfiles], 3981e423a8fSmrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 3991e423a8fSmrg [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) 400643b027fSmrg 4011e423a8fSmrg# Do all the work for Automake. -*- Autoconf -*- 402fe5e51b7Smrg 4031e423a8fSmrg# Copyright (C) 1996-2021 Free Software Foundation, Inc. 4041e423a8fSmrg# 4051e423a8fSmrg# This file is free software; the Free Software Foundation 4061e423a8fSmrg# gives unlimited permission to copy and/or distribute it, 4071e423a8fSmrg# with or without modifications, as long as this notice is preserved. 408fe5e51b7Smrg 4091e423a8fSmrg# This macro actually does too much. Some checks are only needed if 4101e423a8fSmrg# your package does certain things. But this isn't really a big deal. 411fe5e51b7Smrg 4121e423a8fSmrgdnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 4131e423a8fSmrgm4_define([AC_PROG_CC], 4141e423a8fSmrgm4_defn([AC_PROG_CC]) 4151e423a8fSmrg[_AM_PROG_CC_C_O 4161e423a8fSmrg]) 417fe5e51b7Smrg 4181e423a8fSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 4191e423a8fSmrg# AM_INIT_AUTOMAKE([OPTIONS]) 4201e423a8fSmrg# ----------------------------------------------- 4211e423a8fSmrg# The call with PACKAGE and VERSION arguments is the old style 4221e423a8fSmrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 4231e423a8fSmrg# and VERSION should now be passed to AC_INIT and removed from 4241e423a8fSmrg# the call to AM_INIT_AUTOMAKE. 4251e423a8fSmrg# We support both call styles for the transition. After 4261e423a8fSmrg# the next Automake release, Autoconf can make the AC_INIT 4271e423a8fSmrg# arguments mandatory, and then we can depend on a new Autoconf 4281e423a8fSmrg# release and drop the old call support. 4291e423a8fSmrgAC_DEFUN([AM_INIT_AUTOMAKE], 4301e423a8fSmrg[AC_PREREQ([2.65])dnl 4311e423a8fSmrgm4_ifdef([_$0_ALREADY_INIT], 4321e423a8fSmrg [m4_fatal([$0 expanded multiple times 4331e423a8fSmrg]m4_defn([_$0_ALREADY_INIT]))], 4341e423a8fSmrg [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl 4351e423a8fSmrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 4361e423a8fSmrgdnl the ones we care about. 4371e423a8fSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 4381e423a8fSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 4391e423a8fSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 4401e423a8fSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 4411e423a8fSmrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 4421e423a8fSmrg # is not polluted with repeated "-I." 4431e423a8fSmrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 4441e423a8fSmrg # test to see if srcdir already configured 4451e423a8fSmrg if test -f $srcdir/config.status; then 4461e423a8fSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 4471e423a8fSmrg fi 4481e423a8fSmrgfi 4490bb88ba4Smrg 4501e423a8fSmrg# test whether we have cygpath 4511e423a8fSmrgif test -z "$CYGPATH_W"; then 4521e423a8fSmrg if (cygpath --version) >/dev/null 2>/dev/null; then 4531e423a8fSmrg CYGPATH_W='cygpath -w' 4541e423a8fSmrg else 4551e423a8fSmrg CYGPATH_W=echo 4561e423a8fSmrg fi 4571e423a8fSmrgfi 4581e423a8fSmrgAC_SUBST([CYGPATH_W]) 4590bb88ba4Smrg 4601e423a8fSmrg# Define the identity of the package. 4611e423a8fSmrgdnl Distinguish between old-style and new-style calls. 4621e423a8fSmrgm4_ifval([$2], 4631e423a8fSmrg[AC_DIAGNOSE([obsolete], 4641e423a8fSmrg [$0: two- and three-arguments forms are deprecated.]) 4651e423a8fSmrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 4661e423a8fSmrg AC_SUBST([PACKAGE], [$1])dnl 4671e423a8fSmrg AC_SUBST([VERSION], [$2])], 4681e423a8fSmrg[_AM_SET_OPTIONS([$1])dnl 4691e423a8fSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 4701e423a8fSmrgm4_if( 4711e423a8fSmrg m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]), 4721e423a8fSmrg [ok:ok],, 4731e423a8fSmrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 4741e423a8fSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 4751e423a8fSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 4760bb88ba4Smrg 4771e423a8fSmrg_AM_IF_OPTION([no-define],, 4781e423a8fSmrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 4791e423a8fSmrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 4800bb88ba4Smrg 4811e423a8fSmrg# Some tools Automake needs. 4821e423a8fSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 4831e423a8fSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 4841e423a8fSmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 4851e423a8fSmrgAM_MISSING_PROG([AUTOCONF], [autoconf]) 4861e423a8fSmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 4871e423a8fSmrgAM_MISSING_PROG([AUTOHEADER], [autoheader]) 4881e423a8fSmrgAM_MISSING_PROG([MAKEINFO], [makeinfo]) 4891e423a8fSmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 4901e423a8fSmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 4911e423a8fSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 4921e423a8fSmrg# For better backward compatibility. To be removed once Automake 1.9.x 4931e423a8fSmrg# dies out for good. For more background, see: 4941e423a8fSmrg# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 4951e423a8fSmrg# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 4961e423a8fSmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 4971e423a8fSmrg# We need awk for the "check" target (and possibly the TAP driver). The 4981e423a8fSmrg# system "awk" is bad on some platforms. 4991e423a8fSmrgAC_REQUIRE([AC_PROG_AWK])dnl 5001e423a8fSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 5011e423a8fSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 5021e423a8fSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 5031e423a8fSmrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 5041e423a8fSmrg [_AM_PROG_TAR([v7])])]) 5051e423a8fSmrg_AM_IF_OPTION([no-dependencies],, 5061e423a8fSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 5071e423a8fSmrg [_AM_DEPENDENCIES([CC])], 5081e423a8fSmrg [m4_define([AC_PROG_CC], 5091e423a8fSmrg m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 5101e423a8fSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 5111e423a8fSmrg [_AM_DEPENDENCIES([CXX])], 5121e423a8fSmrg [m4_define([AC_PROG_CXX], 5131e423a8fSmrg m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 5141e423a8fSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 5151e423a8fSmrg [_AM_DEPENDENCIES([OBJC])], 5161e423a8fSmrg [m4_define([AC_PROG_OBJC], 5171e423a8fSmrg m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 5181e423a8fSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 5191e423a8fSmrg [_AM_DEPENDENCIES([OBJCXX])], 5201e423a8fSmrg [m4_define([AC_PROG_OBJCXX], 5211e423a8fSmrg m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 5220bb88ba4Smrg]) 5231e423a8fSmrg# Variables for tags utilities; see am/tags.am 5241e423a8fSmrgif test -z "$CTAGS"; then 5251e423a8fSmrg CTAGS=ctags 5261e423a8fSmrgfi 5271e423a8fSmrgAC_SUBST([CTAGS]) 5281e423a8fSmrgif test -z "$ETAGS"; then 5291e423a8fSmrg ETAGS=etags 5301e423a8fSmrgfi 5311e423a8fSmrgAC_SUBST([ETAGS]) 5321e423a8fSmrgif test -z "$CSCOPE"; then 5331e423a8fSmrg CSCOPE=cscope 5341e423a8fSmrgfi 5351e423a8fSmrgAC_SUBST([CSCOPE]) 5360bb88ba4Smrg 5371e423a8fSmrgAC_REQUIRE([AM_SILENT_RULES])dnl 5381e423a8fSmrgdnl The testsuite driver may need to know about EXEEXT, so add the 5391e423a8fSmrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 5401e423a8fSmrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 5411e423a8fSmrgAC_CONFIG_COMMANDS_PRE(dnl 5421e423a8fSmrg[m4_provide_if([_AM_COMPILER_EXEEXT], 5431e423a8fSmrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 544a31a186aSmrg 5451e423a8fSmrg# POSIX will say in a future version that running "rm -f" with no argument 5461e423a8fSmrg# is OK; and we want to be able to make that assumption in our Makefile 5471e423a8fSmrg# recipes. So use an aggressive probe to check that the usage we want is 5481e423a8fSmrg# actually supported "in the wild" to an acceptable degree. 5491e423a8fSmrg# See automake bug#10828. 5501e423a8fSmrg# To make any issue more visible, cause the running configure to be aborted 5511e423a8fSmrg# by default if the 'rm' program in use doesn't match our expectations; the 5521e423a8fSmrg# user can still override this though. 5531e423a8fSmrgif rm -f && rm -fr && rm -rf; then : OK; else 5541e423a8fSmrg cat >&2 <<'END' 5551e423a8fSmrgOops! 556a31a186aSmrg 5571e423a8fSmrgYour 'rm' program seems unable to run without file operands specified 5581e423a8fSmrgon the command line, even when the '-f' option is present. This is contrary 5591e423a8fSmrgto the behaviour of most rm programs out there, and not conforming with 5601e423a8fSmrgthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 561a31a186aSmrg 5621e423a8fSmrgPlease tell bug-automake@gnu.org about your system, including the value 5631e423a8fSmrgof your $PATH and any error possibly output before this message. This 5641e423a8fSmrgcan help us improve future automake versions. 565a31a186aSmrg 5661e423a8fSmrgEND 5671e423a8fSmrg if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 5681e423a8fSmrg echo 'Configuration will proceed anyway, since you have set the' >&2 5691e423a8fSmrg echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 5701e423a8fSmrg echo >&2 5711e423a8fSmrg else 5721e423a8fSmrg cat >&2 <<'END' 5731e423a8fSmrgAborting the configuration process, to ensure you take notice of the issue. 574a31a186aSmrg 5751e423a8fSmrgYou can download and install GNU coreutils to get an 'rm' implementation 5761e423a8fSmrgthat behaves properly: <https://www.gnu.org/software/coreutils/>. 577a31a186aSmrg 5781e423a8fSmrgIf you want to complete the configuration process using your problematic 5791e423a8fSmrg'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 5801e423a8fSmrgto "yes", and re-run configure. 581a31a186aSmrg 5821e423a8fSmrgEND 5831e423a8fSmrg AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 5841e423a8fSmrg fi 5851e423a8fSmrgfi 5861e423a8fSmrgdnl The trailing newline in this macro's definition is deliberate, for 5871e423a8fSmrgdnl backward compatibility and to allow trailing 'dnl'-style comments 5881e423a8fSmrgdnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. 589a31a186aSmrg]) 590a31a186aSmrg 5911e423a8fSmrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 5921e423a8fSmrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 5931e423a8fSmrgdnl mangled by Autoconf and run in a shell conditional statement. 5941e423a8fSmrgm4_define([_AC_COMPILER_EXEEXT], 5951e423a8fSmrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 596a31a186aSmrg 5971e423a8fSmrg# When config.status generates a header, we must update the stamp-h file. 5981e423a8fSmrg# This file resides in the same directory as the config header 5991e423a8fSmrg# that is generated. The stamp files are numbered to have different names. 600a31a186aSmrg 6011e423a8fSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 6021e423a8fSmrg# loop where config.status creates the headers, so we can generate 6031e423a8fSmrg# our stamp files there. 6041e423a8fSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 6051e423a8fSmrg[# Compute $1's index in $config_headers. 6061e423a8fSmrg_am_arg=$1 6071e423a8fSmrg_am_stamp_count=1 6081e423a8fSmrgfor _am_header in $config_headers :; do 6091e423a8fSmrg case $_am_header in 6101e423a8fSmrg $_am_arg | $_am_arg:* ) 6111e423a8fSmrg break ;; 6121e423a8fSmrg * ) 6131e423a8fSmrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 6141e423a8fSmrg esac 6151e423a8fSmrgdone 6161e423a8fSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 617a31a186aSmrg 6181e423a8fSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 6191e423a8fSmrg# 6201e423a8fSmrg# This file is free software; the Free Software Foundation 6211e423a8fSmrg# gives unlimited permission to copy and/or distribute it, 6221e423a8fSmrg# with or without modifications, as long as this notice is preserved. 623a31a186aSmrg 6241e423a8fSmrg# AM_PROG_INSTALL_SH 6251e423a8fSmrg# ------------------ 6261e423a8fSmrg# Define $install_sh. 6271e423a8fSmrgAC_DEFUN([AM_PROG_INSTALL_SH], 6281e423a8fSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 6291e423a8fSmrgif test x"${install_sh+set}" != xset; then 6301e423a8fSmrg case $am_aux_dir in 6311e423a8fSmrg *\ * | *\ *) 6321e423a8fSmrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 6331e423a8fSmrg *) 6341e423a8fSmrg install_sh="\${SHELL} $am_aux_dir/install-sh" 6351e423a8fSmrg esac 6361e423a8fSmrgfi 6371e423a8fSmrgAC_SUBST([install_sh])]) 638a31a186aSmrg 6391e423a8fSmrg# Copyright (C) 2003-2021 Free Software Foundation, Inc. 6401e423a8fSmrg# 6411e423a8fSmrg# This file is free software; the Free Software Foundation 6421e423a8fSmrg# gives unlimited permission to copy and/or distribute it, 6431e423a8fSmrg# with or without modifications, as long as this notice is preserved. 644a31a186aSmrg 6451e423a8fSmrg# Check whether the underlying file-system supports filenames 6461e423a8fSmrg# with a leading dot. For instance MS-DOS doesn't. 6471e423a8fSmrgAC_DEFUN([AM_SET_LEADING_DOT], 6481e423a8fSmrg[rm -rf .tst 2>/dev/null 6491e423a8fSmrgmkdir .tst 2>/dev/null 6501e423a8fSmrgif test -d .tst; then 6511e423a8fSmrg am__leading_dot=. 6521e423a8fSmrgelse 6531e423a8fSmrg am__leading_dot=_ 6541e423a8fSmrgfi 6551e423a8fSmrgrmdir .tst 2>/dev/null 6561e423a8fSmrgAC_SUBST([am__leading_dot])]) 657a31a186aSmrg 6581e423a8fSmrg# Check to see how 'make' treats includes. -*- Autoconf -*- 659a31a186aSmrg 6601e423a8fSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 6611e423a8fSmrg# 6621e423a8fSmrg# This file is free software; the Free Software Foundation 6631e423a8fSmrg# gives unlimited permission to copy and/or distribute it, 6641e423a8fSmrg# with or without modifications, as long as this notice is preserved. 665a31a186aSmrg 6661e423a8fSmrg# AM_MAKE_INCLUDE() 6671e423a8fSmrg# ----------------- 6681e423a8fSmrg# Check whether make has an 'include' directive that can support all 6691e423a8fSmrg# the idioms we need for our automatic dependency tracking code. 6701e423a8fSmrgAC_DEFUN([AM_MAKE_INCLUDE], 6711e423a8fSmrg[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) 6721e423a8fSmrgcat > confinc.mk << 'END' 6731e423a8fSmrgam__doit: 6741e423a8fSmrg @echo this is the am__doit target >confinc.out 6751e423a8fSmrg.PHONY: am__doit 6761e423a8fSmrgEND 6771e423a8fSmrgam__include="#" 6781e423a8fSmrgam__quote= 6791e423a8fSmrg# BSD make does it like this. 6801e423a8fSmrgecho '.include "confinc.mk" # ignored' > confmf.BSD 6811e423a8fSmrg# Other make implementations (GNU, Solaris 10, AIX) do it like this. 6821e423a8fSmrgecho 'include confinc.mk # ignored' > confmf.GNU 6831e423a8fSmrg_am_result=no 6841e423a8fSmrgfor s in GNU BSD; do 6851e423a8fSmrg AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) 6861e423a8fSmrg AS_CASE([$?:`cat confinc.out 2>/dev/null`], 6871e423a8fSmrg ['0:this is the am__doit target'], 6881e423a8fSmrg [AS_CASE([$s], 6891e423a8fSmrg [BSD], [am__include='.include' am__quote='"'], 6901e423a8fSmrg [am__include='include' am__quote=''])]) 6911e423a8fSmrg if test "$am__include" != "#"; then 6921e423a8fSmrg _am_result="yes ($s style)" 6931e423a8fSmrg break 6941e423a8fSmrg fi 6951e423a8fSmrgdone 6961e423a8fSmrgrm -f confinc.* confmf.* 6971e423a8fSmrgAC_MSG_RESULT([${_am_result}]) 6981e423a8fSmrgAC_SUBST([am__include])]) 6991e423a8fSmrgAC_SUBST([am__quote])]) 700a31a186aSmrg 7011e423a8fSmrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 702a31a186aSmrg 7031e423a8fSmrg# Copyright (C) 1997-2021 Free Software Foundation, Inc. 7041e423a8fSmrg# 7051e423a8fSmrg# This file is free software; the Free Software Foundation 7061e423a8fSmrg# gives unlimited permission to copy and/or distribute it, 7071e423a8fSmrg# with or without modifications, as long as this notice is preserved. 708a31a186aSmrg 7091e423a8fSmrg# AM_MISSING_PROG(NAME, PROGRAM) 7101e423a8fSmrg# ------------------------------ 7111e423a8fSmrgAC_DEFUN([AM_MISSING_PROG], 7121e423a8fSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 7131e423a8fSmrg$1=${$1-"${am_missing_run}$2"} 7141e423a8fSmrgAC_SUBST($1)]) 7151e423a8fSmrg 7161e423a8fSmrg# AM_MISSING_HAS_RUN 7171e423a8fSmrg# ------------------ 7181e423a8fSmrg# Define MISSING if not defined so far and test if it is modern enough. 7191e423a8fSmrg# If it is, set am_missing_run to use it, otherwise, to nothing. 7201e423a8fSmrgAC_DEFUN([AM_MISSING_HAS_RUN], 7211e423a8fSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 7221e423a8fSmrgAC_REQUIRE_AUX_FILE([missing])dnl 7231e423a8fSmrgif test x"${MISSING+set}" != xset; then 7241e423a8fSmrg MISSING="\${SHELL} '$am_aux_dir/missing'" 7251e423a8fSmrgfi 7261e423a8fSmrg# Use eval to expand $SHELL 7271e423a8fSmrgif eval "$MISSING --is-lightweight"; then 7281e423a8fSmrg am_missing_run="$MISSING " 7291e423a8fSmrgelse 7301e423a8fSmrg am_missing_run= 7311e423a8fSmrg AC_MSG_WARN(['missing' script is too old or missing]) 7321e423a8fSmrgfi 7331e423a8fSmrg]) 734a31a186aSmrg 7351e423a8fSmrg# Helper functions for option handling. -*- Autoconf -*- 736a31a186aSmrg 7371e423a8fSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 7381e423a8fSmrg# 7391e423a8fSmrg# This file is free software; the Free Software Foundation 7401e423a8fSmrg# gives unlimited permission to copy and/or distribute it, 7411e423a8fSmrg# with or without modifications, as long as this notice is preserved. 742a31a186aSmrg 7431e423a8fSmrg# _AM_MANGLE_OPTION(NAME) 7441e423a8fSmrg# ----------------------- 7451e423a8fSmrgAC_DEFUN([_AM_MANGLE_OPTION], 7461e423a8fSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 747a31a186aSmrg 7481e423a8fSmrg# _AM_SET_OPTION(NAME) 7491e423a8fSmrg# -------------------- 7501e423a8fSmrg# Set option NAME. Presently that only means defining a flag for this option. 7511e423a8fSmrgAC_DEFUN([_AM_SET_OPTION], 7521e423a8fSmrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 753a31a186aSmrg 7541e423a8fSmrg# _AM_SET_OPTIONS(OPTIONS) 7551e423a8fSmrg# ------------------------ 7561e423a8fSmrg# OPTIONS is a space-separated list of Automake options. 7571e423a8fSmrgAC_DEFUN([_AM_SET_OPTIONS], 7581e423a8fSmrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 759a31a186aSmrg 7601e423a8fSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 7611e423a8fSmrg# ------------------------------------------- 7621e423a8fSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 7631e423a8fSmrgAC_DEFUN([_AM_IF_OPTION], 7641e423a8fSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 765a31a186aSmrg 7661e423a8fSmrg# Copyright (C) 1999-2021 Free Software Foundation, Inc. 7671e423a8fSmrg# 7681e423a8fSmrg# This file is free software; the Free Software Foundation 7691e423a8fSmrg# gives unlimited permission to copy and/or distribute it, 7701e423a8fSmrg# with or without modifications, as long as this notice is preserved. 771a31a186aSmrg 7721e423a8fSmrg# _AM_PROG_CC_C_O 7731e423a8fSmrg# --------------- 7741e423a8fSmrg# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 7751e423a8fSmrg# to automatically call this. 7761e423a8fSmrgAC_DEFUN([_AM_PROG_CC_C_O], 7771e423a8fSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 7781e423a8fSmrgAC_REQUIRE_AUX_FILE([compile])dnl 7791e423a8fSmrgAC_LANG_PUSH([C])dnl 7801e423a8fSmrgAC_CACHE_CHECK( 7811e423a8fSmrg [whether $CC understands -c and -o together], 7821e423a8fSmrg [am_cv_prog_cc_c_o], 7831e423a8fSmrg [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 7841e423a8fSmrg # Make sure it works both with $CC and with simple cc. 7851e423a8fSmrg # Following AC_PROG_CC_C_O, we do the test twice because some 7861e423a8fSmrg # compilers refuse to overwrite an existing .o file with -o, 7871e423a8fSmrg # though they will create one. 7881e423a8fSmrg am_cv_prog_cc_c_o=yes 7891e423a8fSmrg for am_i in 1 2; do 7901e423a8fSmrg if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 7911e423a8fSmrg && test -f conftest2.$ac_objext; then 7921e423a8fSmrg : OK 7931e423a8fSmrg else 7941e423a8fSmrg am_cv_prog_cc_c_o=no 7951e423a8fSmrg break 7961e423a8fSmrg fi 7971e423a8fSmrg done 7981e423a8fSmrg rm -f core conftest* 7991e423a8fSmrg unset am_i]) 8001e423a8fSmrgif test "$am_cv_prog_cc_c_o" != yes; then 8011e423a8fSmrg # Losing compiler, so override with the script. 8021e423a8fSmrg # FIXME: It is wrong to rewrite CC. 8031e423a8fSmrg # But if we don't then we get into trouble of one sort or another. 8041e423a8fSmrg # A longer-term fix would be to have automake use am__CC in this case, 8051e423a8fSmrg # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 8061e423a8fSmrg CC="$am_aux_dir/compile $CC" 8071e423a8fSmrgfi 8081e423a8fSmrgAC_LANG_POP([C])]) 809a31a186aSmrg 8101e423a8fSmrg# For backward compatibility. 8111e423a8fSmrgAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 812a31a186aSmrg 8131e423a8fSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 814a31a186aSmrg# 8151e423a8fSmrg# This file is free software; the Free Software Foundation 8161e423a8fSmrg# gives unlimited permission to copy and/or distribute it, 8171e423a8fSmrg# with or without modifications, as long as this notice is preserved. 818a31a186aSmrg 8191e423a8fSmrg# AM_RUN_LOG(COMMAND) 8201e423a8fSmrg# ------------------- 8211e423a8fSmrg# Run COMMAND, save the exit status in ac_status, and log it. 8221e423a8fSmrg# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 8231e423a8fSmrgAC_DEFUN([AM_RUN_LOG], 8241e423a8fSmrg[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 8251e423a8fSmrg ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 8261e423a8fSmrg ac_status=$? 8271e423a8fSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 8281e423a8fSmrg (exit $ac_status); }]) 829a31a186aSmrg 8301e423a8fSmrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 831a31a186aSmrg 8321e423a8fSmrg# Copyright (C) 1996-2021 Free Software Foundation, Inc. 833a31a186aSmrg# 8341e423a8fSmrg# This file is free software; the Free Software Foundation 8351e423a8fSmrg# gives unlimited permission to copy and/or distribute it, 8361e423a8fSmrg# with or without modifications, as long as this notice is preserved. 837a31a186aSmrg 8381e423a8fSmrg# AM_SANITY_CHECK 8391e423a8fSmrg# --------------- 8401e423a8fSmrgAC_DEFUN([AM_SANITY_CHECK], 8411e423a8fSmrg[AC_MSG_CHECKING([whether build environment is sane]) 8421e423a8fSmrg# Reject unsafe characters in $srcdir or the absolute working directory 8431e423a8fSmrg# name. Accept space and tab only in the latter. 8441e423a8fSmrgam_lf=' 8451e423a8fSmrg' 8461e423a8fSmrgcase `pwd` in 8471e423a8fSmrg *[[\\\"\#\$\&\'\`$am_lf]]*) 8481e423a8fSmrg AC_MSG_ERROR([unsafe absolute working directory name]);; 8491e423a8fSmrgesac 8501e423a8fSmrgcase $srcdir in 8511e423a8fSmrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 8521e423a8fSmrg AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 8531e423a8fSmrgesac 854a31a186aSmrg 8551e423a8fSmrg# Do 'set' in a subshell so we don't clobber the current shell's 8561e423a8fSmrg# arguments. Must try -L first in case configure is actually a 8571e423a8fSmrg# symlink; some systems play weird games with the mod time of symlinks 8581e423a8fSmrg# (eg FreeBSD returns the mod time of the symlink's containing 8591e423a8fSmrg# directory). 8601e423a8fSmrgif ( 8611e423a8fSmrg am_has_slept=no 8621e423a8fSmrg for am_try in 1 2; do 8631e423a8fSmrg echo "timestamp, slept: $am_has_slept" > conftest.file 8641e423a8fSmrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 8651e423a8fSmrg if test "$[*]" = "X"; then 8661e423a8fSmrg # -L didn't work. 8671e423a8fSmrg set X `ls -t "$srcdir/configure" conftest.file` 8681e423a8fSmrg fi 8691e423a8fSmrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 8701e423a8fSmrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 871eda3803bSmrg 8721e423a8fSmrg # If neither matched, then we have a broken ls. This can happen 8731e423a8fSmrg # if, for instance, CONFIG_SHELL is bash and it inherits a 8741e423a8fSmrg # broken ls alias from the environment. This has actually 8751e423a8fSmrg # happened. Such a system could not be considered "sane". 8761e423a8fSmrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 8771e423a8fSmrg alias in your environment]) 8781e423a8fSmrg fi 8791e423a8fSmrg if test "$[2]" = conftest.file || test $am_try -eq 2; then 8801e423a8fSmrg break 8811e423a8fSmrg fi 8821e423a8fSmrg # Just in case. 8831e423a8fSmrg sleep 1 8841e423a8fSmrg am_has_slept=yes 8851e423a8fSmrg done 8861e423a8fSmrg test "$[2]" = conftest.file 8871e423a8fSmrg ) 8881e423a8fSmrgthen 8891e423a8fSmrg # Ok. 8901e423a8fSmrg : 8911e423a8fSmrgelse 8921e423a8fSmrg AC_MSG_ERROR([newly created file is older than distributed files! 8931e423a8fSmrgCheck your system clock]) 8941e423a8fSmrgfi 8951e423a8fSmrgAC_MSG_RESULT([yes]) 8961e423a8fSmrg# If we didn't sleep, we still need to ensure time stamps of config.status and 8971e423a8fSmrg# generated files are strictly newer. 8981e423a8fSmrgam_sleep_pid= 8991e423a8fSmrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then 9001e423a8fSmrg ( sleep 1 ) & 9011e423a8fSmrg am_sleep_pid=$! 9021e423a8fSmrgfi 9031e423a8fSmrgAC_CONFIG_COMMANDS_PRE( 9041e423a8fSmrg [AC_MSG_CHECKING([that generated files are newer than configure]) 9051e423a8fSmrg if test -n "$am_sleep_pid"; then 9061e423a8fSmrg # Hide warnings about reused PIDs. 9071e423a8fSmrg wait $am_sleep_pid 2>/dev/null 9081e423a8fSmrg fi 9091e423a8fSmrg AC_MSG_RESULT([done])]) 9101e423a8fSmrgrm -f conftest.file 9111e423a8fSmrg]) 912eda3803bSmrg 9131e423a8fSmrg# Copyright (C) 2009-2021 Free Software Foundation, Inc. 9141e423a8fSmrg# 9151e423a8fSmrg# This file is free software; the Free Software Foundation 9161e423a8fSmrg# gives unlimited permission to copy and/or distribute it, 9171e423a8fSmrg# with or without modifications, as long as this notice is preserved. 918a31a186aSmrg 9191e423a8fSmrg# AM_SILENT_RULES([DEFAULT]) 9201e423a8fSmrg# -------------------------- 9211e423a8fSmrg# Enable less verbose build rules; with the default set to DEFAULT 9221e423a8fSmrg# ("yes" being less verbose, "no" or empty being verbose). 9231e423a8fSmrgAC_DEFUN([AM_SILENT_RULES], 9241e423a8fSmrg[AC_ARG_ENABLE([silent-rules], [dnl 9251e423a8fSmrgAS_HELP_STRING( 9261e423a8fSmrg [--enable-silent-rules], 9271e423a8fSmrg [less verbose build output (undo: "make V=1")]) 9281e423a8fSmrgAS_HELP_STRING( 9291e423a8fSmrg [--disable-silent-rules], 9301e423a8fSmrg [verbose build output (undo: "make V=0")])dnl 9311e423a8fSmrg]) 9321e423a8fSmrgcase $enable_silent_rules in @%:@ ((( 9331e423a8fSmrg yes) AM_DEFAULT_VERBOSITY=0;; 9341e423a8fSmrg no) AM_DEFAULT_VERBOSITY=1;; 9351e423a8fSmrg *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 9361e423a8fSmrgesac 9371e423a8fSmrgdnl 9381e423a8fSmrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 9391e423a8fSmrgdnl do not support nested variable expansions. 9401e423a8fSmrgdnl See automake bug#9928 and bug#10237. 9411e423a8fSmrgam_make=${MAKE-make} 9421e423a8fSmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 9431e423a8fSmrg [am_cv_make_support_nested_variables], 9441e423a8fSmrg [if AS_ECHO([['TRUE=$(BAR$(V)) 9451e423a8fSmrgBAR0=false 9461e423a8fSmrgBAR1=true 9471e423a8fSmrgV=1 9481e423a8fSmrgam__doit: 9491e423a8fSmrg @$(TRUE) 9501e423a8fSmrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 9511e423a8fSmrg am_cv_make_support_nested_variables=yes 9521e423a8fSmrgelse 9531e423a8fSmrg am_cv_make_support_nested_variables=no 9541e423a8fSmrgfi]) 9551e423a8fSmrgif test $am_cv_make_support_nested_variables = yes; then 9561e423a8fSmrg dnl Using '$V' instead of '$(V)' breaks IRIX make. 9571e423a8fSmrg AM_V='$(V)' 9581e423a8fSmrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 9591e423a8fSmrgelse 9601e423a8fSmrg AM_V=$AM_DEFAULT_VERBOSITY 9611e423a8fSmrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 9621e423a8fSmrgfi 9631e423a8fSmrgAC_SUBST([AM_V])dnl 9641e423a8fSmrgAM_SUBST_NOTMAKE([AM_V])dnl 9651e423a8fSmrgAC_SUBST([AM_DEFAULT_V])dnl 9661e423a8fSmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 9671e423a8fSmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 9681e423a8fSmrgAM_BACKSLASH='\' 9691e423a8fSmrgAC_SUBST([AM_BACKSLASH])dnl 9701e423a8fSmrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 9711e423a8fSmrg]) 972a31a186aSmrg 9731e423a8fSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 9741e423a8fSmrg# 9751e423a8fSmrg# This file is free software; the Free Software Foundation 9761e423a8fSmrg# gives unlimited permission to copy and/or distribute it, 9771e423a8fSmrg# with or without modifications, as long as this notice is preserved. 978a31a186aSmrg 9791e423a8fSmrg# AM_PROG_INSTALL_STRIP 9801e423a8fSmrg# --------------------- 9811e423a8fSmrg# One issue with vendor 'install' (even GNU) is that you can't 9821e423a8fSmrg# specify the program used to strip binaries. This is especially 9831e423a8fSmrg# annoying in cross-compiling environments, where the build's strip 9841e423a8fSmrg# is unlikely to handle the host's binaries. 9851e423a8fSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we 9861e423a8fSmrg# always use install-sh in "make install-strip", and initialize 9871e423a8fSmrg# STRIPPROG with the value of the STRIP variable (set by the user). 9881e423a8fSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 9891e423a8fSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 9901e423a8fSmrg# Installed binaries are usually stripped using 'strip' when the user 9911e423a8fSmrg# run "make install-strip". However 'strip' might not be the right 9921e423a8fSmrg# tool to use in cross-compilation environments, therefore Automake 9931e423a8fSmrg# will honor the 'STRIP' environment variable to overrule this program. 9941e423a8fSmrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 9951e423a8fSmrgif test "$cross_compiling" != no; then 9961e423a8fSmrg AC_CHECK_TOOL([STRIP], [strip], :) 9971e423a8fSmrgfi 9981e423a8fSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 9991e423a8fSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 1000a31a186aSmrg 10011e423a8fSmrg# Copyright (C) 2006-2021 Free Software Foundation, Inc. 10021e423a8fSmrg# 10031e423a8fSmrg# This file is free software; the Free Software Foundation 10041e423a8fSmrg# gives unlimited permission to copy and/or distribute it, 10051e423a8fSmrg# with or without modifications, as long as this notice is preserved. 1006a31a186aSmrg 10071e423a8fSmrg# _AM_SUBST_NOTMAKE(VARIABLE) 10081e423a8fSmrg# --------------------------- 10091e423a8fSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 10101e423a8fSmrg# This macro is traced by Automake. 10111e423a8fSmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 1012a31a186aSmrg 10131e423a8fSmrg# AM_SUBST_NOTMAKE(VARIABLE) 10141e423a8fSmrg# -------------------------- 10151e423a8fSmrg# Public sister of _AM_SUBST_NOTMAKE. 10161e423a8fSmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 1017a31a186aSmrg 10181e423a8fSmrg# Check how to create a tarball. -*- Autoconf -*- 10190bb88ba4Smrg 10201e423a8fSmrg# Copyright (C) 2004-2021 Free Software Foundation, Inc. 10211e423a8fSmrg# 10221e423a8fSmrg# This file is free software; the Free Software Foundation 10231e423a8fSmrg# gives unlimited permission to copy and/or distribute it, 10241e423a8fSmrg# with or without modifications, as long as this notice is preserved. 1025a31a186aSmrg 10261e423a8fSmrg# _AM_PROG_TAR(FORMAT) 10271e423a8fSmrg# -------------------- 10281e423a8fSmrg# Check how to create a tarball in format FORMAT. 10291e423a8fSmrg# FORMAT should be one of 'v7', 'ustar', or 'pax'. 10301e423a8fSmrg# 10311e423a8fSmrg# Substitute a variable $(am__tar) that is a command 10321e423a8fSmrg# writing to stdout a FORMAT-tarball containing the directory 10331e423a8fSmrg# $tardir. 10341e423a8fSmrg# tardir=directory && $(am__tar) > result.tar 10351e423a8fSmrg# 10361e423a8fSmrg# Substitute a variable $(am__untar) that extract such 10371e423a8fSmrg# a tarball read from stdin. 10381e423a8fSmrg# $(am__untar) < result.tar 10391e423a8fSmrg# 10401e423a8fSmrgAC_DEFUN([_AM_PROG_TAR], 10411e423a8fSmrg[# Always define AMTAR for backward compatibility. Yes, it's still used 10421e423a8fSmrg# in the wild :-( We should find a proper way to deprecate it ... 10431e423a8fSmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 1044a31a186aSmrg 10451e423a8fSmrg# We'll loop over all known methods to create a tar archive until one works. 10461e423a8fSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 1047a31a186aSmrg 10481e423a8fSmrgm4_if([$1], [v7], 10491e423a8fSmrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 1050a31a186aSmrg 10511e423a8fSmrg [m4_case([$1], 10521e423a8fSmrg [ustar], 10531e423a8fSmrg [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 10541e423a8fSmrg # There is notably a 21 bits limit for the UID and the GID. In fact, 10551e423a8fSmrg # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 10561e423a8fSmrg # and bug#13588). 10571e423a8fSmrg am_max_uid=2097151 # 2^21 - 1 10581e423a8fSmrg am_max_gid=$am_max_uid 10591e423a8fSmrg # The $UID and $GID variables are not portable, so we need to resort 10601e423a8fSmrg # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 10611e423a8fSmrg # below are definitely unexpected, so allow the users to see them 10621e423a8fSmrg # (that is, avoid stderr redirection). 10631e423a8fSmrg am_uid=`id -u || echo unknown` 10641e423a8fSmrg am_gid=`id -g || echo unknown` 10651e423a8fSmrg AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 10661e423a8fSmrg if test $am_uid -le $am_max_uid; then 10671e423a8fSmrg AC_MSG_RESULT([yes]) 10681e423a8fSmrg else 10691e423a8fSmrg AC_MSG_RESULT([no]) 10701e423a8fSmrg _am_tools=none 10711e423a8fSmrg fi 10721e423a8fSmrg AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 10731e423a8fSmrg if test $am_gid -le $am_max_gid; then 10741e423a8fSmrg AC_MSG_RESULT([yes]) 10751e423a8fSmrg else 10761e423a8fSmrg AC_MSG_RESULT([no]) 10771e423a8fSmrg _am_tools=none 10781e423a8fSmrg fi], 1079a31a186aSmrg 10801e423a8fSmrg [pax], 10811e423a8fSmrg [], 1082a31a186aSmrg 10831e423a8fSmrg [m4_fatal([Unknown tar format])]) 1084a31a186aSmrg 10851e423a8fSmrg AC_MSG_CHECKING([how to create a $1 tar archive]) 1086a31a186aSmrg 10871e423a8fSmrg # Go ahead even if we have the value already cached. We do so because we 10881e423a8fSmrg # need to set the values for the 'am__tar' and 'am__untar' variables. 10891e423a8fSmrg _am_tools=${am_cv_prog_tar_$1-$_am_tools} 1090a31a186aSmrg 10911e423a8fSmrg for _am_tool in $_am_tools; do 10921e423a8fSmrg case $_am_tool in 10931e423a8fSmrg gnutar) 10941e423a8fSmrg for _am_tar in tar gnutar gtar; do 10951e423a8fSmrg AM_RUN_LOG([$_am_tar --version]) && break 10961e423a8fSmrg done 10971e423a8fSmrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 10981e423a8fSmrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 10991e423a8fSmrg am__untar="$_am_tar -xf -" 11001e423a8fSmrg ;; 11011e423a8fSmrg plaintar) 11021e423a8fSmrg # Must skip GNU tar: if it does not support --format= it doesn't create 11031e423a8fSmrg # ustar tarball either. 11041e423a8fSmrg (tar --version) >/dev/null 2>&1 && continue 11051e423a8fSmrg am__tar='tar chf - "$$tardir"' 11061e423a8fSmrg am__tar_='tar chf - "$tardir"' 11071e423a8fSmrg am__untar='tar xf -' 11081e423a8fSmrg ;; 11091e423a8fSmrg pax) 11101e423a8fSmrg am__tar='pax -L -x $1 -w "$$tardir"' 11111e423a8fSmrg am__tar_='pax -L -x $1 -w "$tardir"' 11121e423a8fSmrg am__untar='pax -r' 11131e423a8fSmrg ;; 11141e423a8fSmrg cpio) 11151e423a8fSmrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 11161e423a8fSmrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 11171e423a8fSmrg am__untar='cpio -i -H $1 -d' 11181e423a8fSmrg ;; 11191e423a8fSmrg none) 11201e423a8fSmrg am__tar=false 11211e423a8fSmrg am__tar_=false 11221e423a8fSmrg am__untar=false 11231e423a8fSmrg ;; 11241e423a8fSmrg esac 1125a31a186aSmrg 11261e423a8fSmrg # If the value was cached, stop now. We just wanted to have am__tar 11271e423a8fSmrg # and am__untar set. 11281e423a8fSmrg test -n "${am_cv_prog_tar_$1}" && break 1129a31a186aSmrg 11301e423a8fSmrg # tar/untar a dummy directory, and stop if the command works. 11311e423a8fSmrg rm -rf conftest.dir 11321e423a8fSmrg mkdir conftest.dir 11331e423a8fSmrg echo GrepMe > conftest.dir/file 11341e423a8fSmrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 11351e423a8fSmrg rm -rf conftest.dir 11361e423a8fSmrg if test -s conftest.tar; then 11371e423a8fSmrg AM_RUN_LOG([$am__untar <conftest.tar]) 11381e423a8fSmrg AM_RUN_LOG([cat conftest.dir/file]) 11391e423a8fSmrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 11401e423a8fSmrg fi 11411e423a8fSmrg done 11421e423a8fSmrg rm -rf conftest.dir 1143a31a186aSmrg 11441e423a8fSmrg AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 11451e423a8fSmrg AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 1146a31a186aSmrg 11471e423a8fSmrgAC_SUBST([am__tar]) 11481e423a8fSmrgAC_SUBST([am__untar]) 11491e423a8fSmrg]) # _AM_PROG_TAR 1150a31a186aSmrg 11511e423a8fSmrgdnl Copyright 2005 Red Hat, Inc 11521e423a8fSmrgdnl 11531e423a8fSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 11541e423a8fSmrgdnl documentation for any purpose is hereby granted without fee, provided that 11551e423a8fSmrgdnl the above copyright notice appear in all copies and that both that 11561e423a8fSmrgdnl copyright notice and this permission notice appear in supporting 11571e423a8fSmrgdnl documentation. 11581e423a8fSmrgdnl 11591e423a8fSmrgdnl The above copyright notice and this permission notice shall be included 11601e423a8fSmrgdnl in all copies or substantial portions of the Software. 11611e423a8fSmrgdnl 11621e423a8fSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 11631e423a8fSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 11641e423a8fSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 11651e423a8fSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 11661e423a8fSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 11671e423a8fSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 11681e423a8fSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 11691e423a8fSmrgdnl 11701e423a8fSmrgdnl Except as contained in this notice, the name of the copyright holders shall 11711e423a8fSmrgdnl not be used in advertising or otherwise to promote the sale, use or 11721e423a8fSmrgdnl other dealings in this Software without prior written authorization 11731e423a8fSmrgdnl from the copyright holders. 11741e423a8fSmrgdnl 1175a31a186aSmrg 11761e423a8fSmrg# XORG_DRIVER_CHECK_EXT(MACRO, PROTO) 11771e423a8fSmrg# -------------------------- 11781e423a8fSmrg# Checks for the MACRO define in xorg-server.h (from the sdk). If it 11791e423a8fSmrg# is defined, then add the given PROTO to $REQUIRED_MODULES. 1180a31a186aSmrg 11811e423a8fSmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 11821e423a8fSmrg AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 11831e423a8fSmrg SAVE_CFLAGS="$CFLAGS" 11841e423a8fSmrg CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`" 11851e423a8fSmrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 11861e423a8fSmrg#include "xorg-server.h" 11871e423a8fSmrg#if !defined $1 11881e423a8fSmrg#error $1 not defined 11891e423a8fSmrg#endif 11901e423a8fSmrg ]])], 11911e423a8fSmrg [_EXT_CHECK=yes], 11921e423a8fSmrg [_EXT_CHECK=no]) 11931e423a8fSmrg CFLAGS="$SAVE_CFLAGS" 11941e423a8fSmrg AC_MSG_CHECKING([if $1 is defined]) 11951e423a8fSmrg AC_MSG_RESULT([$_EXT_CHECK]) 11961e423a8fSmrg if test "$_EXT_CHECK" != no; then 11971e423a8fSmrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 11981e423a8fSmrg fi 11991e423a8fSmrg]) 1200a31a186aSmrg 12011e423a8fSmrgdnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 12021e423a8fSmrgdnl serial 11 (pkg-config-0.29) 12031e423a8fSmrgdnl 12041e423a8fSmrgdnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 12051e423a8fSmrgdnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> 12061e423a8fSmrgdnl 12071e423a8fSmrgdnl This program is free software; you can redistribute it and/or modify 12081e423a8fSmrgdnl it under the terms of the GNU General Public License as published by 12091e423a8fSmrgdnl the Free Software Foundation; either version 2 of the License, or 12101e423a8fSmrgdnl (at your option) any later version. 12111e423a8fSmrgdnl 12121e423a8fSmrgdnl This program is distributed in the hope that it will be useful, but 12131e423a8fSmrgdnl WITHOUT ANY WARRANTY; without even the implied warranty of 12141e423a8fSmrgdnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12151e423a8fSmrgdnl General Public License for more details. 12161e423a8fSmrgdnl 12171e423a8fSmrgdnl You should have received a copy of the GNU General Public License 12181e423a8fSmrgdnl along with this program; if not, write to the Free Software 12191e423a8fSmrgdnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 12201e423a8fSmrgdnl 02111-1307, USA. 12211e423a8fSmrgdnl 12221e423a8fSmrgdnl As a special exception to the GNU General Public License, if you 12231e423a8fSmrgdnl distribute this file as part of a program that contains a 12241e423a8fSmrgdnl configuration script generated by Autoconf, you may include it under 12251e423a8fSmrgdnl the same distribution terms that you use for the rest of that 12261e423a8fSmrgdnl program. 1227a31a186aSmrg 12281e423a8fSmrgdnl PKG_PREREQ(MIN-VERSION) 12291e423a8fSmrgdnl ----------------------- 12301e423a8fSmrgdnl Since: 0.29 12311e423a8fSmrgdnl 12321e423a8fSmrgdnl Verify that the version of the pkg-config macros are at least 12331e423a8fSmrgdnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's 12341e423a8fSmrgdnl installed version of pkg-config, this checks the developer's version 12351e423a8fSmrgdnl of pkg.m4 when generating configure. 12361e423a8fSmrgdnl 12371e423a8fSmrgdnl To ensure that this macro is defined, also add: 12381e423a8fSmrgdnl m4_ifndef([PKG_PREREQ], 12391e423a8fSmrgdnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) 12401e423a8fSmrgdnl 12411e423a8fSmrgdnl See the "Since" comment for each macro you use to see what version 12421e423a8fSmrgdnl of the macros you require. 12431e423a8fSmrgm4_defun([PKG_PREREQ], 12441e423a8fSmrg[m4_define([PKG_MACROS_VERSION], [0.29]) 12451e423a8fSmrgm4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, 12461e423a8fSmrg [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) 12471e423a8fSmrg])dnl PKG_PREREQ 1248a31a186aSmrg 12491e423a8fSmrgdnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) 12501e423a8fSmrgdnl ---------------------------------- 12511e423a8fSmrgdnl Since: 0.16 12521e423a8fSmrgdnl 12531e423a8fSmrgdnl Search for the pkg-config tool and set the PKG_CONFIG variable to 12541e423a8fSmrgdnl first found in the path. Checks that the version of pkg-config found 12551e423a8fSmrgdnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is 12561e423a8fSmrgdnl used since that's the first version where most current features of 12571e423a8fSmrgdnl pkg-config existed. 12581e423a8fSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 12591e423a8fSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 12601e423a8fSmrgm4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 12611e423a8fSmrgm4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 12621e423a8fSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 12631e423a8fSmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 12641e423a8fSmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 1265a31a186aSmrg 12661e423a8fSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 12671e423a8fSmrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 12681e423a8fSmrgfi 12691e423a8fSmrgif test -n "$PKG_CONFIG"; then 12701e423a8fSmrg _pkg_min_version=m4_default([$1], [0.9.0]) 12711e423a8fSmrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 12721e423a8fSmrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 12731e423a8fSmrg AC_MSG_RESULT([yes]) 12741e423a8fSmrg else 12751e423a8fSmrg AC_MSG_RESULT([no]) 12761e423a8fSmrg PKG_CONFIG="" 12771e423a8fSmrg fi 12781e423a8fSmrgfi[]dnl 12791e423a8fSmrg])dnl PKG_PROG_PKG_CONFIG 1280a31a186aSmrg 12811e423a8fSmrgdnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 12821e423a8fSmrgdnl ------------------------------------------------------------------- 12831e423a8fSmrgdnl Since: 0.18 12841e423a8fSmrgdnl 12851e423a8fSmrgdnl Check to see whether a particular set of modules exists. Similar to 12861e423a8fSmrgdnl PKG_CHECK_MODULES(), but does not set variables or print errors. 12871e423a8fSmrgdnl 12881e423a8fSmrgdnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 12891e423a8fSmrgdnl only at the first occurence in configure.ac, so if the first place 12901e423a8fSmrgdnl it's called might be skipped (such as if it is within an "if", you 12911e423a8fSmrgdnl have to call PKG_CHECK_EXISTS manually 12921e423a8fSmrgAC_DEFUN([PKG_CHECK_EXISTS], 12931e423a8fSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 12941e423a8fSmrgif test -n "$PKG_CONFIG" && \ 12951e423a8fSmrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 12961e423a8fSmrg m4_default([$2], [:]) 12971e423a8fSmrgm4_ifvaln([$3], [else 12981e423a8fSmrg $3])dnl 12991e423a8fSmrgfi]) 1300493f84f4Smrg 13011e423a8fSmrgdnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 13021e423a8fSmrgdnl --------------------------------------------- 13031e423a8fSmrgdnl Internal wrapper calling pkg-config via PKG_CONFIG and setting 13041e423a8fSmrgdnl pkg_failed based on the result. 13051e423a8fSmrgm4_define([_PKG_CONFIG], 13061e423a8fSmrg[if test -n "$$1"; then 13071e423a8fSmrg pkg_cv_[]$1="$$1" 13081e423a8fSmrg elif test -n "$PKG_CONFIG"; then 13091e423a8fSmrg PKG_CHECK_EXISTS([$3], 13101e423a8fSmrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 13111e423a8fSmrg test "x$?" != "x0" && pkg_failed=yes ], 13121e423a8fSmrg [pkg_failed=yes]) 13131e423a8fSmrg else 13141e423a8fSmrg pkg_failed=untried 13151e423a8fSmrgfi[]dnl 13161e423a8fSmrg])dnl _PKG_CONFIG 1317493f84f4Smrg 13181e423a8fSmrgdnl _PKG_SHORT_ERRORS_SUPPORTED 13191e423a8fSmrgdnl --------------------------- 13201e423a8fSmrgdnl Internal check to see if pkg-config supports short errors. 13211e423a8fSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 13221e423a8fSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 13231e423a8fSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 13241e423a8fSmrg _pkg_short_errors_supported=yes 13251e423a8fSmrgelse 13261e423a8fSmrg _pkg_short_errors_supported=no 13271e423a8fSmrgfi[]dnl 13281e423a8fSmrg])dnl _PKG_SHORT_ERRORS_SUPPORTED 1329a31a186aSmrg 1330ee82cb62Smrg 13311e423a8fSmrgdnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 13321e423a8fSmrgdnl [ACTION-IF-NOT-FOUND]) 13331e423a8fSmrgdnl -------------------------------------------------------------- 13341e423a8fSmrgdnl Since: 0.4.0 13351e423a8fSmrgdnl 13361e423a8fSmrgdnl Note that if there is a possibility the first call to 13371e423a8fSmrgdnl PKG_CHECK_MODULES might not happen, you should be sure to include an 13381e423a8fSmrgdnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 13391e423a8fSmrgAC_DEFUN([PKG_CHECK_MODULES], 13401e423a8fSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 13411e423a8fSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 13421e423a8fSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 1343a31a186aSmrg 13441e423a8fSmrgpkg_failed=no 13451e423a8fSmrgAC_MSG_CHECKING([for $1]) 1346ee82cb62Smrg 13471e423a8fSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 13481e423a8fSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 1349ee82cb62Smrg 13501e423a8fSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 13511e423a8fSmrgand $1[]_LIBS to avoid the need to call pkg-config. 13521e423a8fSmrgSee the pkg-config man page for more details.]) 1353ee82cb62Smrg 13541e423a8fSmrgif test $pkg_failed = yes; then 13551e423a8fSmrg AC_MSG_RESULT([no]) 13561e423a8fSmrg _PKG_SHORT_ERRORS_SUPPORTED 13571e423a8fSmrg if test $_pkg_short_errors_supported = yes; then 13581e423a8fSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 13591e423a8fSmrg else 13601e423a8fSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 13611e423a8fSmrg fi 13621e423a8fSmrg # Put the nasty error message in config.log where it belongs 13631e423a8fSmrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 1364ee82cb62Smrg 13651e423a8fSmrg m4_default([$4], [AC_MSG_ERROR( 13661e423a8fSmrg[Package requirements ($2) were not met: 1367ee82cb62Smrg 13681e423a8fSmrg$$1_PKG_ERRORS 1369a31a186aSmrg 13701e423a8fSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 13711e423a8fSmrginstalled software in a non-standard prefix. 1372a31a186aSmrg 13731e423a8fSmrg_PKG_TEXT])[]dnl 13741e423a8fSmrg ]) 13751e423a8fSmrgelif test $pkg_failed = untried; then 13761e423a8fSmrg AC_MSG_RESULT([no]) 13771e423a8fSmrg m4_default([$4], [AC_MSG_FAILURE( 13781e423a8fSmrg[The pkg-config script could not be found or is too old. Make sure it 13791e423a8fSmrgis in your PATH or set the PKG_CONFIG environment variable to the full 13801e423a8fSmrgpath to pkg-config. 1381a31a186aSmrg 13821e423a8fSmrg_PKG_TEXT 1383a31a186aSmrg 13841e423a8fSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 13851e423a8fSmrg ]) 13861e423a8fSmrgelse 13871e423a8fSmrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 13881e423a8fSmrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 13891e423a8fSmrg AC_MSG_RESULT([yes]) 13901e423a8fSmrg $3 13911e423a8fSmrgfi[]dnl 13921e423a8fSmrg])dnl PKG_CHECK_MODULES 1393a31a186aSmrg 1394a31a186aSmrg 13951e423a8fSmrgdnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 13961e423a8fSmrgdnl [ACTION-IF-NOT-FOUND]) 13971e423a8fSmrgdnl --------------------------------------------------------------------- 13981e423a8fSmrgdnl Since: 0.29 13991e423a8fSmrgdnl 14001e423a8fSmrgdnl Checks for existence of MODULES and gathers its build flags with 14011e423a8fSmrgdnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags 14021e423a8fSmrgdnl and VARIABLE-PREFIX_LIBS from --libs. 14031e423a8fSmrgdnl 14041e423a8fSmrgdnl Note that if there is a possibility the first call to 14051e423a8fSmrgdnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to 14061e423a8fSmrgdnl include an explicit call to PKG_PROG_PKG_CONFIG in your 14071e423a8fSmrgdnl configure.ac. 14081e423a8fSmrgAC_DEFUN([PKG_CHECK_MODULES_STATIC], 14091e423a8fSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 14101e423a8fSmrg_save_PKG_CONFIG=$PKG_CONFIG 14111e423a8fSmrgPKG_CONFIG="$PKG_CONFIG --static" 14121e423a8fSmrgPKG_CHECK_MODULES($@) 14131e423a8fSmrgPKG_CONFIG=$_save_PKG_CONFIG[]dnl 14141e423a8fSmrg])dnl PKG_CHECK_MODULES_STATIC 1415a31a186aSmrg 1416a31a186aSmrg 14171e423a8fSmrgdnl PKG_INSTALLDIR([DIRECTORY]) 14181e423a8fSmrgdnl ------------------------- 14191e423a8fSmrgdnl Since: 0.27 14201e423a8fSmrgdnl 14211e423a8fSmrgdnl Substitutes the variable pkgconfigdir as the location where a module 14221e423a8fSmrgdnl should install pkg-config .pc files. By default the directory is 14231e423a8fSmrgdnl $libdir/pkgconfig, but the default can be changed by passing 14241e423a8fSmrgdnl DIRECTORY. The user can override through the --with-pkgconfigdir 14251e423a8fSmrgdnl parameter. 14261e423a8fSmrgAC_DEFUN([PKG_INSTALLDIR], 14271e423a8fSmrg[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) 14281e423a8fSmrgm4_pushdef([pkg_description], 14291e423a8fSmrg [pkg-config installation directory @<:@]pkg_default[@:>@]) 14301e423a8fSmrgAC_ARG_WITH([pkgconfigdir], 14311e423a8fSmrg [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, 14321e423a8fSmrg [with_pkgconfigdir=]pkg_default) 14331e423a8fSmrgAC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) 14341e423a8fSmrgm4_popdef([pkg_default]) 14351e423a8fSmrgm4_popdef([pkg_description]) 14361e423a8fSmrg])dnl PKG_INSTALLDIR 1437a31a186aSmrg 1438a31a186aSmrg 14391e423a8fSmrgdnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) 14401e423a8fSmrgdnl -------------------------------- 14411e423a8fSmrgdnl Since: 0.27 14421e423a8fSmrgdnl 14431e423a8fSmrgdnl Substitutes the variable noarch_pkgconfigdir as the location where a 14441e423a8fSmrgdnl module should install arch-independent pkg-config .pc files. By 14451e423a8fSmrgdnl default the directory is $datadir/pkgconfig, but the default can be 14461e423a8fSmrgdnl changed by passing DIRECTORY. The user can override through the 14471e423a8fSmrgdnl --with-noarch-pkgconfigdir parameter. 14481e423a8fSmrgAC_DEFUN([PKG_NOARCH_INSTALLDIR], 14491e423a8fSmrg[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) 14501e423a8fSmrgm4_pushdef([pkg_description], 14511e423a8fSmrg [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) 14521e423a8fSmrgAC_ARG_WITH([noarch-pkgconfigdir], 14531e423a8fSmrg [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, 14541e423a8fSmrg [with_noarch_pkgconfigdir=]pkg_default) 14551e423a8fSmrgAC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) 14561e423a8fSmrgm4_popdef([pkg_default]) 14571e423a8fSmrgm4_popdef([pkg_description]) 14581e423a8fSmrg])dnl PKG_NOARCH_INSTALLDIR 1459a31a186aSmrg 1460a31a186aSmrg 14611e423a8fSmrgdnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, 14621e423a8fSmrgdnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 14631e423a8fSmrgdnl ------------------------------------------- 14641e423a8fSmrgdnl Since: 0.28 14651e423a8fSmrgdnl 14661e423a8fSmrgdnl Retrieves the value of the pkg-config variable for the given module. 14671e423a8fSmrgAC_DEFUN([PKG_CHECK_VAR], 14681e423a8fSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 14691e423a8fSmrgAC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl 1470a31a186aSmrg 14711e423a8fSmrg_PKG_CONFIG([$1], [variable="][$3]["], [$2]) 14721e423a8fSmrgAS_VAR_COPY([$1], [pkg_cv_][$1]) 1473a31a186aSmrg 14741e423a8fSmrgAS_VAR_IF([$1], [""], [$5], [$4])dnl 14751e423a8fSmrg])dnl PKG_CHECK_VAR 1476a31a186aSmrg 14771e423a8fSmrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 14781e423a8fSmrgdnl 14791e423a8fSmrgdnl Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. 14801e423a8fSmrgdnl 14811e423a8fSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 14821e423a8fSmrgdnl copy of this software and associated documentation files (the "Software"), 14831e423a8fSmrgdnl to deal in the Software without restriction, including without limitation 14841e423a8fSmrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 14851e423a8fSmrgdnl and/or sell copies of the Software, and to permit persons to whom the 14861e423a8fSmrgdnl Software is furnished to do so, subject to the following conditions: 14871e423a8fSmrgdnl 14881e423a8fSmrgdnl The above copyright notice and this permission notice (including the next 14891e423a8fSmrgdnl paragraph) shall be included in all copies or substantial portions of the 14901e423a8fSmrgdnl Software. 14911e423a8fSmrgdnl 14921e423a8fSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14931e423a8fSmrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 14941e423a8fSmrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 14951e423a8fSmrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 14961e423a8fSmrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 14971e423a8fSmrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 14981e423a8fSmrgdnl DEALINGS IN THE SOFTWARE. 14991e423a8fSmrg 15001e423a8fSmrg# XORG_MACROS_VERSION(required-version) 15011e423a8fSmrg# ------------------------------------- 15021e423a8fSmrg# Minimum version: 1.1.0 15031e423a8fSmrg# 15041e423a8fSmrg# If you're using a macro added in Version 1.1 or newer, include this in 15051e423a8fSmrg# your configure.ac with the minimum required version, such as: 15061e423a8fSmrg# XORG_MACROS_VERSION(1.1) 15071e423a8fSmrg# 15081e423a8fSmrg# To ensure that this macro is defined, also add: 15091e423a8fSmrg# m4_ifndef([XORG_MACROS_VERSION], 15101e423a8fSmrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 15111e423a8fSmrg# 15121e423a8fSmrg# 15131e423a8fSmrg# See the "minimum version" comment for each macro you use to see what 15141e423a8fSmrg# version you require. 15151e423a8fSmrgm4_defun([XORG_MACROS_VERSION],[ 15161e423a8fSmrgm4_define([vers_have], [1.19.3]) 15171e423a8fSmrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 15181e423a8fSmrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 15191e423a8fSmrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 15201e423a8fSmrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 15211e423a8fSmrgm4_if(m4_version_compare(vers_have, [$1]), -1, 15221e423a8fSmrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 15231e423a8fSmrgm4_undefine([vers_have]) 15241e423a8fSmrgm4_undefine([maj_have]) 15251e423a8fSmrgm4_undefine([maj_needed]) 15261e423a8fSmrg]) # XORG_MACROS_VERSION 15271e423a8fSmrg 15281e423a8fSmrg# XORG_PROG_RAWCPP() 15291e423a8fSmrg# ------------------ 15301e423a8fSmrg# Minimum version: 1.0.0 15311e423a8fSmrg# 15321e423a8fSmrg# Find cpp program and necessary flags for use in pre-processing text files 15331e423a8fSmrg# such as man pages and config files 15341e423a8fSmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 15351e423a8fSmrgAC_REQUIRE([AC_PROG_CPP]) 15361e423a8fSmrgAC_PATH_TOOL(RAWCPP, [cpp], [${CPP}], 15371e423a8fSmrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 15381e423a8fSmrg 15391e423a8fSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 15401e423a8fSmrg# which is not the best choice for supporting other OS'es, but covers most 15411e423a8fSmrg# of the ones we need for now. 15421e423a8fSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 15431e423a8fSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 15441e423a8fSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 15451e423a8fSmrg AC_MSG_RESULT([no]) 15461e423a8fSmrgelse 15471e423a8fSmrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 15481e423a8fSmrg RAWCPPFLAGS=-undef 15491e423a8fSmrg AC_MSG_RESULT([yes]) 15501e423a8fSmrg # under Cygwin unix is still defined even with -undef 15511e423a8fSmrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 15521e423a8fSmrg RAWCPPFLAGS="-undef -ansi" 15531e423a8fSmrg AC_MSG_RESULT([yes, with -ansi]) 15541e423a8fSmrg else 15551e423a8fSmrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 15561e423a8fSmrg fi 15570bb88ba4Smrgfi 15581e423a8fSmrgrm -f conftest.$ac_ext 15590bb88ba4Smrg 15601e423a8fSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 15611e423a8fSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 15621e423a8fSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 15631e423a8fSmrg AC_MSG_RESULT([no]) 15641e423a8fSmrgelse 15651e423a8fSmrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 15661e423a8fSmrg TRADITIONALCPPFLAGS="-traditional" 15671e423a8fSmrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 15681e423a8fSmrg AC_MSG_RESULT([yes]) 15691e423a8fSmrg else 15701e423a8fSmrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 15711e423a8fSmrg fi 15721e423a8fSmrgfi 15731e423a8fSmrgrm -f conftest.$ac_ext 15741e423a8fSmrgAC_SUBST(RAWCPPFLAGS) 15751e423a8fSmrgAC_SUBST(TRADITIONALCPPFLAGS) 15761e423a8fSmrg]) # XORG_PROG_RAWCPP 15770bb88ba4Smrg 15781e423a8fSmrg# XORG_MANPAGE_SECTIONS() 1579a31a186aSmrg# ----------------------- 15801e423a8fSmrg# Minimum version: 1.0.0 15811e423a8fSmrg# 15821e423a8fSmrg# Determine which sections man pages go in for the different man page types 15831e423a8fSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 15841e423a8fSmrg# Not sure if there's any better way than just hardcoding by OS name. 15851e423a8fSmrg# Override default settings by setting environment variables 15861e423a8fSmrg# Added MAN_SUBSTS in version 1.8 15871e423a8fSmrg# Added AC_PROG_SED in version 1.8 1588a31a186aSmrg 15891e423a8fSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 15901e423a8fSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 15911e423a8fSmrgAC_REQUIRE([AC_PROG_SED]) 1592a31a186aSmrg 15931e423a8fSmrgcase $host_os in 15941e423a8fSmrg solaris*) 15951e423a8fSmrg # Solaris 2.0 - 11.3 use SysV man page section numbers, so we 15961e423a8fSmrg # check for a man page file found in later versions that use 15971e423a8fSmrg # traditional section numbers instead 15981e423a8fSmrg AC_CHECK_FILE([/usr/share/man/man7/attributes.7], 15991e423a8fSmrg [SYSV_MAN_SECTIONS=false], [SYSV_MAN_SECTIONS=true]) 16001e423a8fSmrg ;; 16011e423a8fSmrg *) SYSV_MAN_SECTIONS=false ;; 16021e423a8fSmrgesac 1603a31a186aSmrg 16041e423a8fSmrgif test x$APP_MAN_SUFFIX = x ; then 16051e423a8fSmrg APP_MAN_SUFFIX=1 16061e423a8fSmrgfi 16071e423a8fSmrgif test x$APP_MAN_DIR = x ; then 16081e423a8fSmrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 16091e423a8fSmrgfi 16100bb88ba4Smrg 16111e423a8fSmrgif test x$LIB_MAN_SUFFIX = x ; then 16121e423a8fSmrg LIB_MAN_SUFFIX=3 16131e423a8fSmrgfi 16141e423a8fSmrgif test x$LIB_MAN_DIR = x ; then 16151e423a8fSmrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 16161e423a8fSmrgfi 1617a31a186aSmrg 16181e423a8fSmrgif test x$FILE_MAN_SUFFIX = x ; then 16191e423a8fSmrg case $SYSV_MAN_SECTIONS in 16201e423a8fSmrg true) FILE_MAN_SUFFIX=4 ;; 16211e423a8fSmrg *) FILE_MAN_SUFFIX=5 ;; 16221e423a8fSmrg esac 16231e423a8fSmrgfi 16241e423a8fSmrgif test x$FILE_MAN_DIR = x ; then 16251e423a8fSmrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 16261e423a8fSmrgfi 1627a31a186aSmrg 16281e423a8fSmrgif test x$MISC_MAN_SUFFIX = x ; then 16291e423a8fSmrg case $SYSV_MAN_SECTIONS in 16301e423a8fSmrg true) MISC_MAN_SUFFIX=5 ;; 16311e423a8fSmrg *) MISC_MAN_SUFFIX=7 ;; 16321e423a8fSmrg esac 16331e423a8fSmrgfi 16341e423a8fSmrgif test x$MISC_MAN_DIR = x ; then 16351e423a8fSmrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 16361e423a8fSmrgfi 1637a31a186aSmrg 16381e423a8fSmrgif test x$DRIVER_MAN_SUFFIX = x ; then 16391e423a8fSmrg case $SYSV_MAN_SECTIONS in 16401e423a8fSmrg true) DRIVER_MAN_SUFFIX=7 ;; 16411e423a8fSmrg *) DRIVER_MAN_SUFFIX=4 ;; 16421e423a8fSmrg esac 16431e423a8fSmrgfi 16441e423a8fSmrgif test x$DRIVER_MAN_DIR = x ; then 16451e423a8fSmrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 16461e423a8fSmrgfi 1647fe5e51b7Smrg 16481e423a8fSmrgif test x$ADMIN_MAN_SUFFIX = x ; then 16491e423a8fSmrg case $SYSV_MAN_SECTIONS in 16501e423a8fSmrg true) ADMIN_MAN_SUFFIX=1m ;; 16511e423a8fSmrg *) ADMIN_MAN_SUFFIX=8 ;; 16521e423a8fSmrg esac 16531e423a8fSmrgfi 16541e423a8fSmrgif test x$ADMIN_MAN_DIR = x ; then 16551e423a8fSmrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 16561e423a8fSmrgfi 1657a31a186aSmrg 1658fe5e51b7Smrg 16591e423a8fSmrgAC_SUBST([APP_MAN_SUFFIX]) 16601e423a8fSmrgAC_SUBST([LIB_MAN_SUFFIX]) 16611e423a8fSmrgAC_SUBST([FILE_MAN_SUFFIX]) 16621e423a8fSmrgAC_SUBST([MISC_MAN_SUFFIX]) 16631e423a8fSmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 16641e423a8fSmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 16651e423a8fSmrgAC_SUBST([APP_MAN_DIR]) 16661e423a8fSmrgAC_SUBST([LIB_MAN_DIR]) 16671e423a8fSmrgAC_SUBST([FILE_MAN_DIR]) 16681e423a8fSmrgAC_SUBST([MISC_MAN_DIR]) 16691e423a8fSmrgAC_SUBST([DRIVER_MAN_DIR]) 16701e423a8fSmrgAC_SUBST([ADMIN_MAN_DIR]) 1671fe5e51b7Smrg 16721e423a8fSmrgXORG_MAN_PAGE="X Version 11" 16731e423a8fSmrgAC_SUBST([XORG_MAN_PAGE]) 16741e423a8fSmrgMAN_SUBSTS="\ 16751e423a8fSmrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 16761e423a8fSmrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 16771e423a8fSmrg -e 's|__xservername__|Xorg|g' \ 16781e423a8fSmrg -e 's|__xconfigfile__|xorg.conf|g' \ 16791e423a8fSmrg -e 's|__projectroot__|\$(prefix)|g' \ 16801e423a8fSmrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 16811e423a8fSmrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 16821e423a8fSmrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 16831e423a8fSmrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 16841e423a8fSmrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 16851e423a8fSmrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 16861e423a8fSmrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 16871e423a8fSmrgAC_SUBST([MAN_SUBSTS]) 1688fe5e51b7Smrg 16891e423a8fSmrg]) # XORG_MANPAGE_SECTIONS 1690fe5e51b7Smrg 16911e423a8fSmrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 1692fe5e51b7Smrg# ------------------------ 16931e423a8fSmrg# Minimum version: 1.7.0 16941e423a8fSmrg# 16951e423a8fSmrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 16961e423a8fSmrg# provided by xorg-sgml-doctools, if installed. 16971e423a8fSmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 16981e423a8fSmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 16991e423a8fSmrgXORG_SGML_PATH= 17001e423a8fSmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 17011e423a8fSmrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 17021e423a8fSmrg [m4_ifval([$1],[:], 17031e423a8fSmrg [if test x"$cross_compiling" != x"yes" ; then 17041e423a8fSmrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 17051e423a8fSmrg [XORG_SGML_PATH=$prefix/share/sgml]) 17061e423a8fSmrg fi]) 17071e423a8fSmrg ]) 1708fe5e51b7Smrg 17091e423a8fSmrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 17101e423a8fSmrg# the path and the name of the doc stylesheet 17111e423a8fSmrgif test "x$XORG_SGML_PATH" != "x" ; then 17121e423a8fSmrg AC_MSG_RESULT([$XORG_SGML_PATH]) 17131e423a8fSmrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 17141e423a8fSmrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 17151e423a8fSmrgelse 17161e423a8fSmrg AC_MSG_RESULT([no]) 17171e423a8fSmrgfi 1718fe5e51b7Smrg 17191e423a8fSmrgAC_SUBST(XORG_SGML_PATH) 17201e423a8fSmrgAC_SUBST(STYLESHEET_SRCDIR) 17211e423a8fSmrgAC_SUBST(XSL_STYLESHEET) 17221e423a8fSmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 17231e423a8fSmrg]) # XORG_CHECK_SGML_DOCTOOLS 1724fe5e51b7Smrg 17251e423a8fSmrg# XORG_CHECK_LINUXDOC 17261e423a8fSmrg# ------------------- 17271e423a8fSmrg# Minimum version: 1.0.0 17281e423a8fSmrg# 17291e423a8fSmrg# Defines the variable MAKE_TEXT if the necessary tools and 17301e423a8fSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 17311e423a8fSmrg# Whether or not the necessary tools and files are found can be checked 17321e423a8fSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 17331e423a8fSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 17341e423a8fSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 17351e423a8fSmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 1736eda3803bSmrg 17371e423a8fSmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 17380bb88ba4Smrg 17391e423a8fSmrgAC_MSG_CHECKING([whether to build documentation]) 17400bb88ba4Smrg 17411e423a8fSmrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 17421e423a8fSmrg BUILDDOC=yes 17431e423a8fSmrgelse 17441e423a8fSmrg BUILDDOC=no 17451e423a8fSmrgfi 1746eda3803bSmrg 17471e423a8fSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 1748a31a186aSmrg 17491e423a8fSmrgAC_MSG_RESULT([$BUILDDOC]) 1750a31a186aSmrg 17511e423a8fSmrgAC_MSG_CHECKING([whether to build pdf documentation]) 17521e423a8fSmrg 17531e423a8fSmrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 17541e423a8fSmrg BUILDPDFDOC=yes 17550bb88ba4Smrgelse 17561e423a8fSmrg BUILDPDFDOC=no 17570bb88ba4Smrgfi 1758fe5e51b7Smrg 17591e423a8fSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1760fe5e51b7Smrg 17611e423a8fSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 17621e423a8fSmrg 17631e423a8fSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 17641e423a8fSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 17651e423a8fSmrgMAKE_PDF="$PS2PDF" 17661e423a8fSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 17670bb88ba4Smrg 17681e423a8fSmrgAC_SUBST(MAKE_TEXT) 17691e423a8fSmrgAC_SUBST(MAKE_PS) 17701e423a8fSmrgAC_SUBST(MAKE_PDF) 17711e423a8fSmrgAC_SUBST(MAKE_HTML) 17721e423a8fSmrg]) # XORG_CHECK_LINUXDOC 1773fe5e51b7Smrg 17741e423a8fSmrg# XORG_CHECK_DOCBOOK 17751e423a8fSmrg# ------------------- 17761e423a8fSmrg# Minimum version: 1.0.0 17771e423a8fSmrg# 17781e423a8fSmrg# Checks for the ability to build output formats from SGML DocBook source. 17791e423a8fSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 17801e423a8fSmrg# indicates whether the necessary tools and files are found and, if set, 17811e423a8fSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 17821e423a8fSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 17831e423a8fSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 1784fe5e51b7Smrg 17851e423a8fSmrgBUILDTXTDOC=no 17861e423a8fSmrgBUILDPDFDOC=no 17871e423a8fSmrgBUILDPSDOC=no 17881e423a8fSmrgBUILDHTMLDOC=no 17890bb88ba4Smrg 17901e423a8fSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 17911e423a8fSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 17921e423a8fSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 17931e423a8fSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 17941e423a8fSmrg 17951e423a8fSmrgAC_MSG_CHECKING([whether to build text documentation]) 17961e423a8fSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 17971e423a8fSmrg test x$BUILD_TXTDOC != xno; then 17981e423a8fSmrg BUILDTXTDOC=yes 1799fe5e51b7Smrgfi 18001e423a8fSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 18011e423a8fSmrgAC_MSG_RESULT([$BUILDTXTDOC]) 1802fe5e51b7Smrg 18031e423a8fSmrgAC_MSG_CHECKING([whether to build PDF documentation]) 18041e423a8fSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 18051e423a8fSmrg test x$BUILD_PDFDOC != xno; then 18061e423a8fSmrg BUILDPDFDOC=yes 18071e423a8fSmrgfi 18081e423a8fSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 18091e423a8fSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 1810643b027fSmrg 18111e423a8fSmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 18121e423a8fSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 18131e423a8fSmrg test x$BUILD_PSDOC != xno; then 18141e423a8fSmrg BUILDPSDOC=yes 18151e423a8fSmrgfi 18161e423a8fSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 18171e423a8fSmrgAC_MSG_RESULT([$BUILDPSDOC]) 1818fe5e51b7Smrg 18191e423a8fSmrgAC_MSG_CHECKING([whether to build HTML documentation]) 18201e423a8fSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 18211e423a8fSmrg test x$BUILD_HTMLDOC != xno; then 18221e423a8fSmrg BUILDHTMLDOC=yes 18231e423a8fSmrgfi 18241e423a8fSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 18251e423a8fSmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 1826fe5e51b7Smrg 18271e423a8fSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 18281e423a8fSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 18291e423a8fSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 18301e423a8fSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 1831fe5e51b7Smrg 18321e423a8fSmrgAC_SUBST(MAKE_TEXT) 18331e423a8fSmrgAC_SUBST(MAKE_PS) 18341e423a8fSmrgAC_SUBST(MAKE_PDF) 18351e423a8fSmrgAC_SUBST(MAKE_HTML) 18361e423a8fSmrg]) # XORG_CHECK_DOCBOOK 1837fe5e51b7Smrg 18381e423a8fSmrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 18390bb88ba4Smrg# ---------------- 18401e423a8fSmrg# Minimum version: 1.5.0 18411e423a8fSmrg# Minimum version for optional DEFAULT argument: 1.11.0 18421e423a8fSmrg# 18431e423a8fSmrg# Documentation tools are not always available on all platforms and sometimes 18441e423a8fSmrg# not at the appropriate level. This macro enables a module to test for the 18451e423a8fSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 18461e423a8fSmrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 18471e423a8fSmrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 18481e423a8fSmrg# --with-xmlto assumes 'auto'. 18491e423a8fSmrg# 18501e423a8fSmrg# Interface to module: 18511e423a8fSmrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 18521e423a8fSmrg# XMLTO: returns the path of the xmlto program found 18531e423a8fSmrg# returns the path set by the user in the environment 18541e423a8fSmrg# --with-xmlto: 'yes' user instructs the module to use xmlto 18551e423a8fSmrg# 'no' user instructs the module not to use xmlto 18561e423a8fSmrg# 18571e423a8fSmrg# Added in version 1.10.0 18581e423a8fSmrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 18591e423a8fSmrg# xmlto for text output requires either lynx, links, or w3m browsers 18601e423a8fSmrg# 18611e423a8fSmrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 18621e423a8fSmrg# 18631e423a8fSmrgAC_DEFUN([XORG_WITH_XMLTO],[ 18641e423a8fSmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 18651e423a8fSmrgm4_define([_defopt], m4_default([$2], [auto])) 18661e423a8fSmrgAC_ARG_WITH(xmlto, 18671e423a8fSmrg AS_HELP_STRING([--with-xmlto], 18681e423a8fSmrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 18691e423a8fSmrg [use_xmlto=$withval], [use_xmlto=]_defopt) 18701e423a8fSmrgm4_undefine([_defopt]) 18710bb88ba4Smrg 18721e423a8fSmrgif test "x$use_xmlto" = x"auto"; then 18731e423a8fSmrg AC_PATH_PROG([XMLTO], [xmlto]) 18741e423a8fSmrg if test "x$XMLTO" = "x"; then 18751e423a8fSmrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 18761e423a8fSmrg have_xmlto=no 18771e423a8fSmrg else 18781e423a8fSmrg have_xmlto=yes 18791e423a8fSmrg fi 18801e423a8fSmrgelif test "x$use_xmlto" = x"yes" ; then 18811e423a8fSmrg AC_PATH_PROG([XMLTO], [xmlto]) 18821e423a8fSmrg if test "x$XMLTO" = "x"; then 18831e423a8fSmrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 18841e423a8fSmrg fi 18851e423a8fSmrg have_xmlto=yes 18861e423a8fSmrgelif test "x$use_xmlto" = x"no" ; then 18871e423a8fSmrg if test "x$XMLTO" != "x"; then 18881e423a8fSmrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 18891e423a8fSmrg fi 18901e423a8fSmrg have_xmlto=no 18911e423a8fSmrgelse 18921e423a8fSmrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 18931e423a8fSmrgfi 18940bb88ba4Smrg 18951e423a8fSmrg# Test for a minimum version of xmlto, if provided. 18961e423a8fSmrgm4_ifval([$1], 18971e423a8fSmrg[if test "$have_xmlto" = yes; then 18981e423a8fSmrg # scrape the xmlto version 18991e423a8fSmrg AC_MSG_CHECKING([the xmlto version]) 19001e423a8fSmrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 19011e423a8fSmrg AC_MSG_RESULT([$xmlto_version]) 19021e423a8fSmrg AS_VERSION_COMPARE([$xmlto_version], [$1], 19031e423a8fSmrg [if test "x$use_xmlto" = xauto; then 19041e423a8fSmrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 19051e423a8fSmrg have_xmlto=no 19061e423a8fSmrg else 19071e423a8fSmrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 19081e423a8fSmrg fi]) 19091e423a8fSmrgfi]) 1910fe5e51b7Smrg 19111e423a8fSmrg# Test for the ability of xmlto to generate a text target 19121e423a8fSmrg# 19131e423a8fSmrg# NOTE: xmlto 0.0.27 or higher return a non-zero return code in the 19141e423a8fSmrg# following test for empty XML docbook files. 19151e423a8fSmrg# For compatibility reasons use the following empty XML docbook file and if 19161e423a8fSmrg# it fails try it again with a non-empty XML file. 19171e423a8fSmrghave_xmlto_text=no 19181e423a8fSmrgcat > conftest.xml << "EOF" 19191e423a8fSmrgEOF 19201e423a8fSmrgAS_IF([test "$have_xmlto" = yes], 19211e423a8fSmrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 19221e423a8fSmrg [have_xmlto_text=yes], 19231e423a8fSmrg [# Try it again with a non-empty XML file. 19241e423a8fSmrg cat > conftest.xml << "EOF" 19251e423a8fSmrg<x></x> 19261e423a8fSmrgEOF 19271e423a8fSmrg AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 19281e423a8fSmrg [have_xmlto_text=yes], 19291e423a8fSmrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])]) 19301e423a8fSmrgrm -f conftest.xml 19311e423a8fSmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 19321e423a8fSmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 19331e423a8fSmrg]) # XORG_WITH_XMLTO 1934fe5e51b7Smrg 19351e423a8fSmrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 19361e423a8fSmrg# -------------------------------------------- 19371e423a8fSmrg# Minimum version: 1.12.0 19381e423a8fSmrg# Minimum version for optional DEFAULT argument: 1.12.0 19391e423a8fSmrg# 19401e423a8fSmrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 19411e423a8fSmrg# XML-based language used for the transformation of XML documents. 19421e423a8fSmrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 19431e423a8fSmrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 19441e423a8fSmrg# The XSLT processor is often used as a standalone tool for transformations. 19451e423a8fSmrg# It should not be assumed that this tool is used only to work with documnetation. 19461e423a8fSmrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 19471e423a8fSmrg# 19481e423a8fSmrg# Interface to module: 19491e423a8fSmrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 19501e423a8fSmrg# XSLTPROC: returns the path of the xsltproc program found 19511e423a8fSmrg# returns the path set by the user in the environment 19521e423a8fSmrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 19531e423a8fSmrg# 'no' user instructs the module not to use xsltproc 19541e423a8fSmrg# have_xsltproc: returns yes if xsltproc found in PATH or no 19551e423a8fSmrg# 19561e423a8fSmrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 19571e423a8fSmrg# 19581e423a8fSmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 19591e423a8fSmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 19601e423a8fSmrg# Preserves the interface, should it be implemented later 19611e423a8fSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 19621e423a8fSmrgm4_define([_defopt], m4_default([$2], [auto])) 19631e423a8fSmrgAC_ARG_WITH(xsltproc, 19641e423a8fSmrg AS_HELP_STRING([--with-xsltproc], 19651e423a8fSmrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 19661e423a8fSmrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 19671e423a8fSmrgm4_undefine([_defopt]) 1968493f84f4Smrg 19691e423a8fSmrgif test "x$use_xsltproc" = x"auto"; then 19701e423a8fSmrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 19711e423a8fSmrg if test "x$XSLTPROC" = "x"; then 19721e423a8fSmrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 19731e423a8fSmrg have_xsltproc=no 19741e423a8fSmrg else 19751e423a8fSmrg have_xsltproc=yes 19761e423a8fSmrg fi 19771e423a8fSmrgelif test "x$use_xsltproc" = x"yes" ; then 19781e423a8fSmrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 19791e423a8fSmrg if test "x$XSLTPROC" = "x"; then 19801e423a8fSmrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 19811e423a8fSmrg fi 19821e423a8fSmrg have_xsltproc=yes 19831e423a8fSmrgelif test "x$use_xsltproc" = x"no" ; then 19841e423a8fSmrg if test "x$XSLTPROC" != "x"; then 19851e423a8fSmrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 19861e423a8fSmrg fi 19871e423a8fSmrg have_xsltproc=no 19880bb88ba4Smrgelse 19891e423a8fSmrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 19900bb88ba4Smrgfi 1991eda3803bSmrg 19921e423a8fSmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 19931e423a8fSmrg]) # XORG_WITH_XSLTPROC 1994a31a186aSmrg 19951e423a8fSmrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 19961e423a8fSmrg# ---------------------------------------- 19971e423a8fSmrg# Minimum version: 1.15.0 19981e423a8fSmrg# 19991e423a8fSmrg# PERL (Practical Extraction and Report Language) is a language optimized for 20001e423a8fSmrg# scanning arbitrary text files, extracting information from those text files, 20011e423a8fSmrg# and printing reports based on that information. 20021e423a8fSmrg# 20031e423a8fSmrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 20041e423a8fSmrg# 20051e423a8fSmrg# Interface to module: 20061e423a8fSmrg# HAVE_PERL: used in makefiles to conditionally scan text files 20071e423a8fSmrg# PERL: returns the path of the perl program found 20081e423a8fSmrg# returns the path set by the user in the environment 20091e423a8fSmrg# --with-perl: 'yes' user instructs the module to use perl 20101e423a8fSmrg# 'no' user instructs the module not to use perl 20111e423a8fSmrg# have_perl: returns yes if perl found in PATH or no 20121e423a8fSmrg# 20131e423a8fSmrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 20141e423a8fSmrg# 20151e423a8fSmrgAC_DEFUN([XORG_WITH_PERL],[ 20161e423a8fSmrgAC_ARG_VAR([PERL], [Path to perl command]) 20171e423a8fSmrg# Preserves the interface, should it be implemented later 20181e423a8fSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 20191e423a8fSmrgm4_define([_defopt], m4_default([$2], [auto])) 20201e423a8fSmrgAC_ARG_WITH(perl, 20211e423a8fSmrg AS_HELP_STRING([--with-perl], 20221e423a8fSmrg [Use perl for extracting information from files (default: ]_defopt[)]), 20231e423a8fSmrg [use_perl=$withval], [use_perl=]_defopt) 20241e423a8fSmrgm4_undefine([_defopt]) 2025a31a186aSmrg 20261e423a8fSmrgif test "x$use_perl" = x"auto"; then 20271e423a8fSmrg AC_PATH_PROG([PERL], [perl]) 20281e423a8fSmrg if test "x$PERL" = "x"; then 20291e423a8fSmrg AC_MSG_WARN([perl not found - cannot extract information and report]) 20301e423a8fSmrg have_perl=no 20311e423a8fSmrg else 20321e423a8fSmrg have_perl=yes 20331e423a8fSmrg fi 20341e423a8fSmrgelif test "x$use_perl" = x"yes" ; then 20351e423a8fSmrg AC_PATH_PROG([PERL], [perl]) 20361e423a8fSmrg if test "x$PERL" = "x"; then 20371e423a8fSmrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 20381e423a8fSmrg fi 20391e423a8fSmrg have_perl=yes 20401e423a8fSmrgelif test "x$use_perl" = x"no" ; then 20411e423a8fSmrg if test "x$PERL" != "x"; then 20421e423a8fSmrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 20431e423a8fSmrg fi 20441e423a8fSmrg have_perl=no 20451e423a8fSmrgelse 20461e423a8fSmrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 2047a31a186aSmrgfi 20480bb88ba4Smrg 20491e423a8fSmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 20501e423a8fSmrg]) # XORG_WITH_PERL 2051fe5e51b7Smrg 20521e423a8fSmrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 20531e423a8fSmrg# ---------------- 20541e423a8fSmrg# Minimum version: 1.5.0 20551e423a8fSmrg# Minimum version for optional DEFAULT argument: 1.11.0 20561e423a8fSmrg# 20571e423a8fSmrg# Documentation tools are not always available on all platforms and sometimes 20581e423a8fSmrg# not at the appropriate level. This macro enables a module to test for the 20591e423a8fSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 20601e423a8fSmrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 20611e423a8fSmrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 20621e423a8fSmrg# --with-asciidoc assumes 'auto'. 20631e423a8fSmrg# 20641e423a8fSmrg# Interface to module: 20651e423a8fSmrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 20661e423a8fSmrg# ASCIIDOC: returns the path of the asciidoc program found 20671e423a8fSmrg# returns the path set by the user in the environment 20681e423a8fSmrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 20691e423a8fSmrg# 'no' user instructs the module not to use asciidoc 20701e423a8fSmrg# 20711e423a8fSmrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 20721e423a8fSmrg# 20731e423a8fSmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 20741e423a8fSmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 20751e423a8fSmrgm4_define([_defopt], m4_default([$2], [auto])) 20761e423a8fSmrgAC_ARG_WITH(asciidoc, 20771e423a8fSmrg AS_HELP_STRING([--with-asciidoc], 20781e423a8fSmrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 20791e423a8fSmrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 20801e423a8fSmrgm4_undefine([_defopt]) 2081fe5e51b7Smrg 20821e423a8fSmrgif test "x$use_asciidoc" = x"auto"; then 20831e423a8fSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 20841e423a8fSmrg if test "x$ASCIIDOC" = "x"; then 20851e423a8fSmrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 20861e423a8fSmrg have_asciidoc=no 20871e423a8fSmrg else 20881e423a8fSmrg have_asciidoc=yes 2089fe5e51b7Smrg fi 20901e423a8fSmrgelif test "x$use_asciidoc" = x"yes" ; then 20911e423a8fSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 20921e423a8fSmrg if test "x$ASCIIDOC" = "x"; then 20931e423a8fSmrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 20941e423a8fSmrg fi 20951e423a8fSmrg have_asciidoc=yes 20961e423a8fSmrgelif test "x$use_asciidoc" = x"no" ; then 20971e423a8fSmrg if test "x$ASCIIDOC" != "x"; then 20981e423a8fSmrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 20991e423a8fSmrg fi 21001e423a8fSmrg have_asciidoc=no 2101fe5e51b7Smrgelse 21021e423a8fSmrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 2103fe5e51b7Smrgfi 21041e423a8fSmrgm4_ifval([$1], 21051e423a8fSmrg[if test "$have_asciidoc" = yes; then 21061e423a8fSmrg # scrape the asciidoc version 21071e423a8fSmrg AC_MSG_CHECKING([the asciidoc version]) 21081e423a8fSmrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 21091e423a8fSmrg AC_MSG_RESULT([$asciidoc_version]) 21101e423a8fSmrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 21111e423a8fSmrg [if test "x$use_asciidoc" = xauto; then 21121e423a8fSmrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 21131e423a8fSmrg have_asciidoc=no 21141e423a8fSmrg else 21151e423a8fSmrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 21161e423a8fSmrg fi]) 21171e423a8fSmrgfi]) 21181e423a8fSmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 21191e423a8fSmrg]) # XORG_WITH_ASCIIDOC 2120eda3803bSmrg 21211e423a8fSmrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 21221e423a8fSmrg# ------------------------------------------- 21231e423a8fSmrg# Minimum version: 1.5.0 21241e423a8fSmrg# Minimum version for optional DEFAULT argument: 1.11.0 21251e423a8fSmrg# Minimum version for optional DOT checking: 1.18.0 21261e423a8fSmrg# 21271e423a8fSmrg# Documentation tools are not always available on all platforms and sometimes 21281e423a8fSmrg# not at the appropriate level. This macro enables a module to test for the 21291e423a8fSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 21301e423a8fSmrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 21311e423a8fSmrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 21321e423a8fSmrg# --with-doxygen assumes 'auto'. 21331e423a8fSmrg# 21341e423a8fSmrg# Interface to module: 21351e423a8fSmrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 21361e423a8fSmrg# DOXYGEN: returns the path of the doxygen program found 21371e423a8fSmrg# returns the path set by the user in the environment 21381e423a8fSmrg# --with-doxygen: 'yes' user instructs the module to use doxygen 21391e423a8fSmrg# 'no' user instructs the module not to use doxygen 21401e423a8fSmrg# 21411e423a8fSmrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 21421e423a8fSmrg# 21431e423a8fSmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 21441e423a8fSmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 21451e423a8fSmrgAC_ARG_VAR([DOT], [Path to the dot graphics utility]) 21461e423a8fSmrgm4_define([_defopt], m4_default([$2], [auto])) 21471e423a8fSmrgAC_ARG_WITH(doxygen, 21481e423a8fSmrg AS_HELP_STRING([--with-doxygen], 21491e423a8fSmrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 21501e423a8fSmrg [use_doxygen=$withval], [use_doxygen=]_defopt) 21511e423a8fSmrgm4_undefine([_defopt]) 2152a31a186aSmrg 21531e423a8fSmrgif test "x$use_doxygen" = x"auto"; then 21541e423a8fSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 21551e423a8fSmrg if test "x$DOXYGEN" = "x"; then 21561e423a8fSmrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 21571e423a8fSmrg have_doxygen=no 21581e423a8fSmrg else 21591e423a8fSmrg have_doxygen=yes 2160fe5e51b7Smrg fi 21611e423a8fSmrgelif test "x$use_doxygen" = x"yes" ; then 21621e423a8fSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 21631e423a8fSmrg if test "x$DOXYGEN" = "x"; then 21641e423a8fSmrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 21651e423a8fSmrg fi 21661e423a8fSmrg have_doxygen=yes 21671e423a8fSmrgelif test "x$use_doxygen" = x"no" ; then 21681e423a8fSmrg if test "x$DOXYGEN" != "x"; then 21691e423a8fSmrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 21701e423a8fSmrg fi 21711e423a8fSmrg have_doxygen=no 2172fe5e51b7Smrgelse 21731e423a8fSmrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 2174fe5e51b7Smrgfi 21751e423a8fSmrgm4_ifval([$1], 21761e423a8fSmrg[if test "$have_doxygen" = yes; then 21771e423a8fSmrg # scrape the doxygen version 21781e423a8fSmrg AC_MSG_CHECKING([the doxygen version]) 21791e423a8fSmrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 21801e423a8fSmrg AC_MSG_RESULT([$doxygen_version]) 21811e423a8fSmrg AS_VERSION_COMPARE([$doxygen_version], [$1], 21821e423a8fSmrg [if test "x$use_doxygen" = xauto; then 21831e423a8fSmrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 21841e423a8fSmrg have_doxygen=no 21851e423a8fSmrg else 21861e423a8fSmrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 21871e423a8fSmrg fi]) 21881e423a8fSmrgfi]) 2189fe5e51b7Smrg 21901e423a8fSmrgdnl Check for DOT if we have doxygen. The caller decides if it is mandatory 21911e423a8fSmrgdnl HAVE_DOT is a variable that can be used in your doxygen.in config file: 21921e423a8fSmrgdnl HAVE_DOT = @HAVE_DOT@ 21931e423a8fSmrgHAVE_DOT=no 21941e423a8fSmrgif test "x$have_doxygen" = "xyes"; then 21951e423a8fSmrg AC_PATH_PROG([DOT], [dot]) 21961e423a8fSmrg if test "x$DOT" != "x"; then 21971e423a8fSmrg HAVE_DOT=yes 2198fe5e51b7Smrg fi 21991e423a8fSmrgfi 2200fe5e51b7Smrg 22011e423a8fSmrgAC_SUBST([HAVE_DOT]) 22021e423a8fSmrgAM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"]) 22031e423a8fSmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 22041e423a8fSmrg]) # XORG_WITH_DOXYGEN 22050bb88ba4Smrg 22061e423a8fSmrg# XORG_WITH_GROFF([DEFAULT]) 22071e423a8fSmrg# ---------------- 22081e423a8fSmrg# Minimum version: 1.6.0 22091e423a8fSmrg# Minimum version for optional DEFAULT argument: 1.11.0 22101e423a8fSmrg# 22111e423a8fSmrg# Documentation tools are not always available on all platforms and sometimes 22121e423a8fSmrg# not at the appropriate level. This macro enables a module to test for the 22131e423a8fSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 22141e423a8fSmrg# the --with-groff option, it allows maximum flexibilty in making decisions 22151e423a8fSmrg# as whether or not to use the groff package. When DEFAULT is not specified, 22161e423a8fSmrg# --with-groff assumes 'auto'. 22171e423a8fSmrg# 22181e423a8fSmrg# Interface to module: 22191e423a8fSmrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 22201e423a8fSmrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 22211e423a8fSmrg# HAVE_GROFF_MS: the -ms macros package 22221e423a8fSmrg# GROFF: returns the path of the groff program found 22231e423a8fSmrg# returns the path set by the user in the environment 22241e423a8fSmrg# --with-groff: 'yes' user instructs the module to use groff 22251e423a8fSmrg# 'no' user instructs the module not to use groff 22261e423a8fSmrg# 22271e423a8fSmrg# Added in version 1.9.0: 22281e423a8fSmrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 22291e423a8fSmrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 22301e423a8fSmrg# psselect from the psutils package. 22311e423a8fSmrg# the ghostcript package. Refer to the grohtml man pages 22321e423a8fSmrg# 22331e423a8fSmrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 22341e423a8fSmrg# 22351e423a8fSmrg# OS and distros often splits groff in a basic and full package, the former 22361e423a8fSmrg# having the groff program and the later having devices, fonts and macros 22371e423a8fSmrg# Checking for the groff executable is not enough. 22381e423a8fSmrg# 22391e423a8fSmrg# If macros are missing, we cannot assume that groff is useless, so we don't 22401e423a8fSmrg# unset HAVE_GROFF or GROFF env variables. 22411e423a8fSmrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 22421e423a8fSmrg# 22431e423a8fSmrgAC_DEFUN([XORG_WITH_GROFF],[ 22441e423a8fSmrgAC_ARG_VAR([GROFF], [Path to groff command]) 22451e423a8fSmrgm4_define([_defopt], m4_default([$1], [auto])) 22461e423a8fSmrgAC_ARG_WITH(groff, 22471e423a8fSmrg AS_HELP_STRING([--with-groff], 22481e423a8fSmrg [Use groff to regenerate documentation (default: ]_defopt[)]), 22491e423a8fSmrg [use_groff=$withval], [use_groff=]_defopt) 22501e423a8fSmrgm4_undefine([_defopt]) 22511e423a8fSmrg 22521e423a8fSmrgif test "x$use_groff" = x"auto"; then 22531e423a8fSmrg AC_PATH_PROG([GROFF], [groff]) 22541e423a8fSmrg if test "x$GROFF" = "x"; then 22551e423a8fSmrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 22561e423a8fSmrg have_groff=no 22571e423a8fSmrg else 22581e423a8fSmrg have_groff=yes 22591e423a8fSmrg fi 22601e423a8fSmrgelif test "x$use_groff" = x"yes" ; then 22611e423a8fSmrg AC_PATH_PROG([GROFF], [groff]) 22621e423a8fSmrg if test "x$GROFF" = "x"; then 22631e423a8fSmrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 22641e423a8fSmrg fi 22651e423a8fSmrg have_groff=yes 22661e423a8fSmrgelif test "x$use_groff" = x"no" ; then 22671e423a8fSmrg if test "x$GROFF" != "x"; then 22681e423a8fSmrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 22691e423a8fSmrg fi 22701e423a8fSmrg have_groff=no 22711e423a8fSmrgelse 22721e423a8fSmrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 22731e423a8fSmrgfi 22741e423a8fSmrg 22751e423a8fSmrg# We have groff, test for the presence of the macro packages 22761e423a8fSmrgif test "x$have_groff" = x"yes"; then 22771e423a8fSmrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 22781e423a8fSmrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 22791e423a8fSmrg groff_ms_works=yes 2280fe5e51b7Smrg else 22811e423a8fSmrg groff_ms_works=no 2282fe5e51b7Smrg fi 22831e423a8fSmrg AC_MSG_RESULT([$groff_ms_works]) 22841e423a8fSmrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 22851e423a8fSmrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 22861e423a8fSmrg groff_mm_works=yes 2287fe5e51b7Smrg else 22881e423a8fSmrg groff_mm_works=no 2289fe5e51b7Smrg fi 22901e423a8fSmrg AC_MSG_RESULT([$groff_mm_works]) 2291fe5e51b7Smrgfi 2292fe5e51b7Smrg 22931e423a8fSmrg# We have groff, test for HTML dependencies, one command per package 22941e423a8fSmrgif test "x$have_groff" = x"yes"; then 22951e423a8fSmrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 22961e423a8fSmrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 22971e423a8fSmrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 22981e423a8fSmrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 22991e423a8fSmrg have_groff_html=yes 23001e423a8fSmrg else 23011e423a8fSmrg have_groff_html=no 23021e423a8fSmrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 23031e423a8fSmrg fi 23041e423a8fSmrgfi 2305a31a186aSmrg 23061e423a8fSmrg# Set Automake conditionals for Makefiles 23071e423a8fSmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 23081e423a8fSmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 23091e423a8fSmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 23101e423a8fSmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 23111e423a8fSmrg]) # XORG_WITH_GROFF 2312fe5e51b7Smrg 23131e423a8fSmrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 23141e423a8fSmrg# --------------------------------------- 23151e423a8fSmrg# Minimum version: 1.6.0 23161e423a8fSmrg# Minimum version for optional DEFAULT argument: 1.11.0 23171e423a8fSmrg# Minimum version for optional MIN-VERSION argument: 1.15.0 23181e423a8fSmrg# 23191e423a8fSmrg# Documentation tools are not always available on all platforms and sometimes 23201e423a8fSmrg# not at the appropriate level. This macro enables a module to test for the 23211e423a8fSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 23221e423a8fSmrg# the --with-fop option, it allows maximum flexibilty in making decisions 23231e423a8fSmrg# as whether or not to use the fop package. When DEFAULT is not specified, 23241e423a8fSmrg# --with-fop assumes 'auto'. 23251e423a8fSmrg# 23261e423a8fSmrg# Interface to module: 23271e423a8fSmrg# HAVE_FOP: used in makefiles to conditionally generate documentation 23281e423a8fSmrg# FOP: returns the path of the fop program found 23291e423a8fSmrg# returns the path set by the user in the environment 23301e423a8fSmrg# --with-fop: 'yes' user instructs the module to use fop 23311e423a8fSmrg# 'no' user instructs the module not to use fop 23321e423a8fSmrg# 23331e423a8fSmrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 23341e423a8fSmrg# 23351e423a8fSmrgAC_DEFUN([XORG_WITH_FOP],[ 23361e423a8fSmrgAC_ARG_VAR([FOP], [Path to fop command]) 23371e423a8fSmrgm4_define([_defopt], m4_default([$2], [auto])) 23381e423a8fSmrgAC_ARG_WITH(fop, 23391e423a8fSmrg AS_HELP_STRING([--with-fop], 23401e423a8fSmrg [Use fop to regenerate documentation (default: ]_defopt[)]), 23411e423a8fSmrg [use_fop=$withval], [use_fop=]_defopt) 23421e423a8fSmrgm4_undefine([_defopt]) 2343fe5e51b7Smrg 23441e423a8fSmrgif test "x$use_fop" = x"auto"; then 23451e423a8fSmrg AC_PATH_PROG([FOP], [fop]) 23461e423a8fSmrg if test "x$FOP" = "x"; then 23471e423a8fSmrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 23481e423a8fSmrg have_fop=no 23491e423a8fSmrg else 23501e423a8fSmrg have_fop=yes 23511e423a8fSmrg fi 23521e423a8fSmrgelif test "x$use_fop" = x"yes" ; then 23531e423a8fSmrg AC_PATH_PROG([FOP], [fop]) 23541e423a8fSmrg if test "x$FOP" = "x"; then 23551e423a8fSmrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 23561e423a8fSmrg fi 23571e423a8fSmrg have_fop=yes 23581e423a8fSmrgelif test "x$use_fop" = x"no" ; then 23591e423a8fSmrg if test "x$FOP" != "x"; then 23601e423a8fSmrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 23611e423a8fSmrg fi 23621e423a8fSmrg have_fop=no 2363fe5e51b7Smrgelse 23641e423a8fSmrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 23651e423a8fSmrgfi 2366fe5e51b7Smrg 23671e423a8fSmrg# Test for a minimum version of fop, if provided. 23681e423a8fSmrgm4_ifval([$1], 23691e423a8fSmrg[if test "$have_fop" = yes; then 23701e423a8fSmrg # scrape the fop version 23711e423a8fSmrg AC_MSG_CHECKING([for fop minimum version]) 23721e423a8fSmrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 23731e423a8fSmrg AC_MSG_RESULT([$fop_version]) 23741e423a8fSmrg AS_VERSION_COMPARE([$fop_version], [$1], 23751e423a8fSmrg [if test "x$use_fop" = xauto; then 23761e423a8fSmrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 23771e423a8fSmrg have_fop=no 23781e423a8fSmrg else 23791e423a8fSmrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 23801e423a8fSmrg fi]) 23811e423a8fSmrgfi]) 23821e423a8fSmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 23831e423a8fSmrg]) # XORG_WITH_FOP 2384fe5e51b7Smrg 23851e423a8fSmrg# XORG_WITH_M4([MIN-VERSION]) 23861e423a8fSmrg# --------------------------- 23871e423a8fSmrg# Minimum version: 1.19.0 23881e423a8fSmrg# 23891e423a8fSmrg# This macro attempts to locate an m4 macro processor which supports 23901e423a8fSmrg# -I option and is only useful for modules relying on M4 in order to 23911e423a8fSmrg# expand macros in source code files. 23921e423a8fSmrg# 23931e423a8fSmrg# Interface to module: 23941e423a8fSmrg# M4: returns the path of the m4 program found 23951e423a8fSmrg# returns the path set by the user in the environment 23961e423a8fSmrg# 23971e423a8fSmrgAC_DEFUN([XORG_WITH_M4], [ 23981e423a8fSmrgAC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4], 23991e423a8fSmrg [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4], 24001e423a8fSmrg [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \ 24011e423a8fSmrg ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]], 24021e423a8fSmrg [AC_MSG_ERROR([could not find m4 that supports -I option])], 24031e423a8fSmrg [$PATH:/usr/gnu/bin])]) 2404fe5e51b7Smrg 24051e423a8fSmrgAC_SUBST([M4], [$ac_cv_path_M4]) 24061e423a8fSmrg]) # XORG_WITH_M4 2407fe5e51b7Smrg 24081e423a8fSmrg# XORG_WITH_PS2PDF([DEFAULT]) 24091e423a8fSmrg# ---------------- 24101e423a8fSmrg# Minimum version: 1.6.0 24111e423a8fSmrg# Minimum version for optional DEFAULT argument: 1.11.0 24121e423a8fSmrg# 24131e423a8fSmrg# Documentation tools are not always available on all platforms and sometimes 24141e423a8fSmrg# not at the appropriate level. This macro enables a module to test for the 24151e423a8fSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 24161e423a8fSmrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 24171e423a8fSmrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 24181e423a8fSmrg# --with-ps2pdf assumes 'auto'. 24191e423a8fSmrg# 24201e423a8fSmrg# Interface to module: 24211e423a8fSmrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 24221e423a8fSmrg# PS2PDF: returns the path of the ps2pdf program found 24231e423a8fSmrg# returns the path set by the user in the environment 24241e423a8fSmrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 24251e423a8fSmrg# 'no' user instructs the module not to use ps2pdf 24261e423a8fSmrg# 24271e423a8fSmrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 24281e423a8fSmrg# 24291e423a8fSmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 24301e423a8fSmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 24311e423a8fSmrgm4_define([_defopt], m4_default([$1], [auto])) 24321e423a8fSmrgAC_ARG_WITH(ps2pdf, 24331e423a8fSmrg AS_HELP_STRING([--with-ps2pdf], 24341e423a8fSmrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 24351e423a8fSmrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 24361e423a8fSmrgm4_undefine([_defopt]) 2437fe5e51b7Smrg 24381e423a8fSmrgif test "x$use_ps2pdf" = x"auto"; then 24391e423a8fSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 24401e423a8fSmrg if test "x$PS2PDF" = "x"; then 24411e423a8fSmrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 24421e423a8fSmrg have_ps2pdf=no 24431e423a8fSmrg else 24441e423a8fSmrg have_ps2pdf=yes 24451e423a8fSmrg fi 24461e423a8fSmrgelif test "x$use_ps2pdf" = x"yes" ; then 24471e423a8fSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 24481e423a8fSmrg if test "x$PS2PDF" = "x"; then 24491e423a8fSmrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 24501e423a8fSmrg fi 24511e423a8fSmrg have_ps2pdf=yes 24521e423a8fSmrgelif test "x$use_ps2pdf" = x"no" ; then 24531e423a8fSmrg if test "x$PS2PDF" != "x"; then 24541e423a8fSmrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 24551e423a8fSmrg fi 24561e423a8fSmrg have_ps2pdf=no 2457fe5e51b7Smrgelse 24581e423a8fSmrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 24591e423a8fSmrgfi 24601e423a8fSmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 24611e423a8fSmrg]) # XORG_WITH_PS2PDF 2462fe5e51b7Smrg 24631e423a8fSmrg# XORG_ENABLE_DOCS (enable_docs=yes) 24641e423a8fSmrg# ---------------- 24651e423a8fSmrg# Minimum version: 1.6.0 24661e423a8fSmrg# 24671e423a8fSmrg# Documentation tools are not always available on all platforms and sometimes 24681e423a8fSmrg# not at the appropriate level. This macro enables a builder to skip all 24691e423a8fSmrg# documentation targets except traditional man pages. 24701e423a8fSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 24711e423a8fSmrg# maximum flexibilty in controlling documentation building. 24721e423a8fSmrg# Refer to: 24731e423a8fSmrg# XORG_WITH_XMLTO --with-xmlto 24741e423a8fSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 24751e423a8fSmrg# XORG_WITH_DOXYGEN --with-doxygen 24761e423a8fSmrg# XORG_WITH_FOP --with-fop 24771e423a8fSmrg# XORG_WITH_GROFF --with-groff 24781e423a8fSmrg# XORG_WITH_PS2PDF --with-ps2pdf 24791e423a8fSmrg# 24801e423a8fSmrg# Interface to module: 24811e423a8fSmrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 24821e423a8fSmrg# --enable-docs: 'yes' user instructs the module to generate docs 24831e423a8fSmrg# 'no' user instructs the module not to generate docs 24841e423a8fSmrg# parm1: specify the default value, yes or no. 24851e423a8fSmrg# 24861e423a8fSmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 24871e423a8fSmrgm4_define([docs_default], m4_default([$1], [yes])) 24881e423a8fSmrgAC_ARG_ENABLE(docs, 24891e423a8fSmrg AS_HELP_STRING([--enable-docs], 24901e423a8fSmrg [Enable building the documentation (default: ]docs_default[)]), 24911e423a8fSmrg [build_docs=$enableval], [build_docs=]docs_default) 24921e423a8fSmrgm4_undefine([docs_default]) 24931e423a8fSmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 24941e423a8fSmrgAC_MSG_CHECKING([whether to build documentation]) 24951e423a8fSmrgAC_MSG_RESULT([$build_docs]) 24961e423a8fSmrg]) # XORG_ENABLE_DOCS 2497fe5e51b7Smrg 24981e423a8fSmrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 24991e423a8fSmrg# ---------------- 25001e423a8fSmrg# Minimum version: 1.6.0 25011e423a8fSmrg# 25021e423a8fSmrg# This macro enables a builder to skip all developer documentation. 25031e423a8fSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 25041e423a8fSmrg# maximum flexibilty in controlling documentation building. 25051e423a8fSmrg# Refer to: 25061e423a8fSmrg# XORG_WITH_XMLTO --with-xmlto 25071e423a8fSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 25081e423a8fSmrg# XORG_WITH_DOXYGEN --with-doxygen 25091e423a8fSmrg# XORG_WITH_FOP --with-fop 25101e423a8fSmrg# XORG_WITH_GROFF --with-groff 25111e423a8fSmrg# XORG_WITH_PS2PDF --with-ps2pdf 25121e423a8fSmrg# 25131e423a8fSmrg# Interface to module: 25141e423a8fSmrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 25151e423a8fSmrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 25161e423a8fSmrg# 'no' user instructs the module not to generate developer docs 25171e423a8fSmrg# parm1: specify the default value, yes or no. 25181e423a8fSmrg# 25191e423a8fSmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 25201e423a8fSmrgm4_define([devel_default], m4_default([$1], [yes])) 25211e423a8fSmrgAC_ARG_ENABLE(devel-docs, 25221e423a8fSmrg AS_HELP_STRING([--enable-devel-docs], 25231e423a8fSmrg [Enable building the developer documentation (default: ]devel_default[)]), 25241e423a8fSmrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 25251e423a8fSmrgm4_undefine([devel_default]) 25261e423a8fSmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 25271e423a8fSmrgAC_MSG_CHECKING([whether to build developer documentation]) 25281e423a8fSmrgAC_MSG_RESULT([$build_devel_docs]) 25291e423a8fSmrg]) # XORG_ENABLE_DEVEL_DOCS 2530493f84f4Smrg 25311e423a8fSmrg# XORG_ENABLE_SPECS (enable_specs=yes) 25321e423a8fSmrg# ---------------- 25331e423a8fSmrg# Minimum version: 1.6.0 25341e423a8fSmrg# 25351e423a8fSmrg# This macro enables a builder to skip all functional specification targets. 25361e423a8fSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 25371e423a8fSmrg# maximum flexibilty in controlling documentation building. 25381e423a8fSmrg# Refer to: 25391e423a8fSmrg# XORG_WITH_XMLTO --with-xmlto 25401e423a8fSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 25411e423a8fSmrg# XORG_WITH_DOXYGEN --with-doxygen 25421e423a8fSmrg# XORG_WITH_FOP --with-fop 25431e423a8fSmrg# XORG_WITH_GROFF --with-groff 25441e423a8fSmrg# XORG_WITH_PS2PDF --with-ps2pdf 25451e423a8fSmrg# 25461e423a8fSmrg# Interface to module: 25471e423a8fSmrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 25481e423a8fSmrg# --enable-specs: 'yes' user instructs the module to generate specs 25491e423a8fSmrg# 'no' user instructs the module not to generate specs 25501e423a8fSmrg# parm1: specify the default value, yes or no. 25511e423a8fSmrg# 25521e423a8fSmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 25531e423a8fSmrgm4_define([spec_default], m4_default([$1], [yes])) 25541e423a8fSmrgAC_ARG_ENABLE(specs, 25551e423a8fSmrg AS_HELP_STRING([--enable-specs], 25561e423a8fSmrg [Enable building the specs (default: ]spec_default[)]), 25571e423a8fSmrg [build_specs=$enableval], [build_specs=]spec_default) 25581e423a8fSmrgm4_undefine([spec_default]) 25591e423a8fSmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 25601e423a8fSmrgAC_MSG_CHECKING([whether to build functional specifications]) 25611e423a8fSmrgAC_MSG_RESULT([$build_specs]) 25621e423a8fSmrg]) # XORG_ENABLE_SPECS 2563fe5e51b7Smrg 25641e423a8fSmrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 25651e423a8fSmrg# ---------------------------------------------- 25661e423a8fSmrg# Minimum version: 1.13.0 25671e423a8fSmrg# 25681e423a8fSmrg# This macro enables a builder to enable/disable unit testing 25691e423a8fSmrg# It makes no assumption about the test cases implementation 25701e423a8fSmrg# Test cases may or may not use Automake "Support for test suites" 25711e423a8fSmrg# They may or may not use the software utility library GLib 25721e423a8fSmrg# 25731e423a8fSmrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 25741e423a8fSmrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 25751e423a8fSmrg# The variable enable_unit_tests is used by other macros in this file. 25761e423a8fSmrg# 25771e423a8fSmrg# Interface to module: 25781e423a8fSmrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 25791e423a8fSmrg# enable_unit_tests: used in configure.ac for additional configuration 25801e423a8fSmrg# --enable-unit-tests: 'yes' user instructs the module to build tests 25811e423a8fSmrg# 'no' user instructs the module not to build tests 25821e423a8fSmrg# parm1: specify the default value, yes or no. 25831e423a8fSmrg# 25841e423a8fSmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 25851e423a8fSmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 25861e423a8fSmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 25871e423a8fSmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 25881e423a8fSmrgm4_define([_defopt], m4_default([$1], [auto])) 25891e423a8fSmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 25901e423a8fSmrg [Enable building unit test cases (default: ]_defopt[)]), 25911e423a8fSmrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 25921e423a8fSmrgm4_undefine([_defopt]) 25931e423a8fSmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 25941e423a8fSmrgAC_MSG_CHECKING([whether to build unit test cases]) 25951e423a8fSmrgAC_MSG_RESULT([$enable_unit_tests]) 25961e423a8fSmrg]) # XORG_ENABLE_UNIT_TESTS 2597fe5e51b7Smrg 25981e423a8fSmrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 25991e423a8fSmrg# ------------------------------------------------------ 26001e423a8fSmrg# Minimum version: 1.17.0 26011e423a8fSmrg# 26021e423a8fSmrg# This macro enables a builder to enable/disable integration testing 26031e423a8fSmrg# It makes no assumption about the test cases' implementation 26041e423a8fSmrg# Test cases may or may not use Automake "Support for test suites" 26051e423a8fSmrg# 26061e423a8fSmrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 26071e423a8fSmrg# usually requires less dependencies and may be built and run under less 26081e423a8fSmrg# stringent environments than integration tests. 26091e423a8fSmrg# 26101e423a8fSmrg# Interface to module: 26111e423a8fSmrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 26121e423a8fSmrg# enable_integration_tests: used in configure.ac for additional configuration 26131e423a8fSmrg# --enable-integration-tests: 'yes' user instructs the module to build tests 26141e423a8fSmrg# 'no' user instructs the module not to build tests 26151e423a8fSmrg# parm1: specify the default value, yes or no. 26161e423a8fSmrg# 26171e423a8fSmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 26181e423a8fSmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 26191e423a8fSmrgm4_define([_defopt], m4_default([$1], [auto])) 26201e423a8fSmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 26211e423a8fSmrg [Enable building integration test cases (default: ]_defopt[)]), 26221e423a8fSmrg [enable_integration_tests=$enableval], 26231e423a8fSmrg [enable_integration_tests=]_defopt) 26241e423a8fSmrgm4_undefine([_defopt]) 26251e423a8fSmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 26261e423a8fSmrg [test "x$enable_integration_tests" != xno]) 26271e423a8fSmrgAC_MSG_CHECKING([whether to build unit test cases]) 26281e423a8fSmrgAC_MSG_RESULT([$enable_integration_tests]) 26291e423a8fSmrg]) # XORG_ENABLE_INTEGRATION_TESTS 2630fe5e51b7Smrg 26311e423a8fSmrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 26321e423a8fSmrg# ---------------------------------------- 26331e423a8fSmrg# Minimum version: 1.13.0 26341e423a8fSmrg# 26351e423a8fSmrg# GLib is a library which provides advanced data structures and functions. 26361e423a8fSmrg# This macro enables a module to test for the presence of Glib. 26371e423a8fSmrg# 26381e423a8fSmrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 26391e423a8fSmrg# Otherwise the value of $enable_unit_tests is blank. 26401e423a8fSmrg# 26411e423a8fSmrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 26421e423a8fSmrg# test support usually requires less dependencies and may be built and run under 26431e423a8fSmrg# less stringent environments than integration tests. 26441e423a8fSmrg# 26451e423a8fSmrg# Interface to module: 26461e423a8fSmrg# HAVE_GLIB: used in makefiles to conditionally build targets 26471e423a8fSmrg# with_glib: used in configure.ac to know if GLib has been found 26481e423a8fSmrg# --with-glib: 'yes' user instructs the module to use glib 26491e423a8fSmrg# 'no' user instructs the module not to use glib 26501e423a8fSmrg# 26511e423a8fSmrgAC_DEFUN([XORG_WITH_GLIB],[ 26521e423a8fSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 26531e423a8fSmrgm4_define([_defopt], m4_default([$2], [auto])) 26541e423a8fSmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 26551e423a8fSmrg [Use GLib library for unit testing (default: ]_defopt[)]), 26561e423a8fSmrg [with_glib=$withval], [with_glib=]_defopt) 26571e423a8fSmrgm4_undefine([_defopt]) 2658fe5e51b7Smrg 26591e423a8fSmrghave_glib=no 26601e423a8fSmrg# Do not probe GLib if user explicitly disabled unit testing 26611e423a8fSmrgif test "x$enable_unit_tests" != x"no"; then 26621e423a8fSmrg # Do not probe GLib if user explicitly disabled it 26631e423a8fSmrg if test "x$with_glib" != x"no"; then 26641e423a8fSmrg m4_ifval( 26651e423a8fSmrg [$1], 26661e423a8fSmrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 26671e423a8fSmrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 26681e423a8fSmrg ) 26691e423a8fSmrg fi 26701e423a8fSmrgfi 2671fe5e51b7Smrg 26721e423a8fSmrg# Not having GLib when unit testing has been explicitly requested is an error 26731e423a8fSmrgif test "x$enable_unit_tests" = x"yes"; then 26741e423a8fSmrg if test "x$have_glib" = x"no"; then 26751e423a8fSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 26761e423a8fSmrg fi 26771e423a8fSmrgfi 2678fe5e51b7Smrg 26791e423a8fSmrg# Having unit testing disabled when GLib has been explicitly requested is an error 26801e423a8fSmrgif test "x$enable_unit_tests" = x"no"; then 26811e423a8fSmrg if test "x$with_glib" = x"yes"; then 26821e423a8fSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 26831e423a8fSmrg fi 26841e423a8fSmrgfi 2685fe5e51b7Smrg 26861e423a8fSmrg# Not having GLib when it has been explicitly requested is an error 26871e423a8fSmrgif test "x$with_glib" = x"yes"; then 26881e423a8fSmrg if test "x$have_glib" = x"no"; then 26891e423a8fSmrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 26901e423a8fSmrg fi 2691fe5e51b7Smrgfi 2692fe5e51b7Smrg 26931e423a8fSmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 26941e423a8fSmrg]) # XORG_WITH_GLIB 2695eda3803bSmrg 26961e423a8fSmrg# XORG_LD_WRAP([required|optional]) 26971e423a8fSmrg# --------------------------------- 26981e423a8fSmrg# Minimum version: 1.13.0 26991e423a8fSmrg# 27001e423a8fSmrg# Check if linker supports -wrap, passed via compiler flags 27011e423a8fSmrg# 27021e423a8fSmrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 27031e423a8fSmrg# Otherwise the value of $enable_unit_tests is blank. 27041e423a8fSmrg# 27051e423a8fSmrg# Argument added in 1.16.0 - default is "required", to match existing behavior 27061e423a8fSmrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 27071e423a8fSmrg# available, an argument of "optional" allows use when some unit tests require 27081e423a8fSmrg# ld -wrap and others do not. 27091e423a8fSmrg# 27101e423a8fSmrgAC_DEFUN([XORG_LD_WRAP],[ 27111e423a8fSmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 27121e423a8fSmrg [AC_LANG_PROGRAM([#include <stdlib.h> 27131e423a8fSmrg void __wrap_exit(int status) { return; }], 27141e423a8fSmrg [exit(0);])]) 27151e423a8fSmrg# Not having ld wrap when unit testing has been explicitly requested is an error 27161e423a8fSmrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 27171e423a8fSmrg if test "x$have_ld_wrap" = x"no"; then 27181e423a8fSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 27191e423a8fSmrg fi 27201e423a8fSmrgfi 27211e423a8fSmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 27221e423a8fSmrg# 27231e423a8fSmrg]) # XORG_LD_WRAP 2724a31a186aSmrg 27251e423a8fSmrg# XORG_CHECK_LINKER_FLAGS 27261e423a8fSmrg# ----------------------- 27271e423a8fSmrg# SYNOPSIS 27281e423a8fSmrg# 27291e423a8fSmrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 27301e423a8fSmrg# 27311e423a8fSmrg# DESCRIPTION 27321e423a8fSmrg# 27331e423a8fSmrg# Check whether the given linker FLAGS work with the current language's 27341e423a8fSmrg# linker, or whether they give an error. 27351e423a8fSmrg# 27361e423a8fSmrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 27371e423a8fSmrg# success/failure. 27381e423a8fSmrg# 27391e423a8fSmrg# PROGRAM-SOURCE is the program source to link with, if needed 27401e423a8fSmrg# 27411e423a8fSmrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 27421e423a8fSmrg# 27431e423a8fSmrg# LICENSE 27441e423a8fSmrg# 27451e423a8fSmrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 27461e423a8fSmrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 27471e423a8fSmrg# Copyright (c) 2009 Matteo Frigo 27481e423a8fSmrg# 27491e423a8fSmrg# This program is free software: you can redistribute it and/or modify it 27501e423a8fSmrg# under the terms of the GNU General Public License as published by the 27511e423a8fSmrg# Free Software Foundation, either version 3 of the License, or (at your 27521e423a8fSmrg# option) any later version. 27531e423a8fSmrg# 27541e423a8fSmrg# This program is distributed in the hope that it will be useful, but 27551e423a8fSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 27561e423a8fSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 27571e423a8fSmrg# Public License for more details. 27581e423a8fSmrg# 27591e423a8fSmrg# You should have received a copy of the GNU General Public License along 27601e423a8fSmrg# with this program. If not, see <http://www.gnu.org/licenses/>. 27611e423a8fSmrg# 27621e423a8fSmrg# As a special exception, the respective Autoconf Macro's copyright owner 27631e423a8fSmrg# gives unlimited permission to copy, distribute and modify the configure 27641e423a8fSmrg# scripts that are the output of Autoconf when processing the Macro. You 27651e423a8fSmrg# need not follow the terms of the GNU General Public License when using 27661e423a8fSmrg# or distributing such scripts, even though portions of the text of the 27671e423a8fSmrg# Macro appear in them. The GNU General Public License (GPL) does govern 27681e423a8fSmrg# all other use of the material that constitutes the Autoconf Macro. 27691e423a8fSmrg# 27701e423a8fSmrg# This special exception to the GPL applies to versions of the Autoconf 27711e423a8fSmrg# Macro released by the Autoconf Archive. When you make and distribute a 27721e423a8fSmrg# modified version of the Autoconf Macro, you may extend this special 27731e423a8fSmrg# exception to the GPL to apply to your modified version as well.# 27741e423a8fSmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 27751e423a8fSmrg[AC_MSG_CHECKING([whether the linker accepts $1]) 27761e423a8fSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 27771e423a8fSmrgAS_LITERAL_IF([$1], 27781e423a8fSmrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 27791e423a8fSmrg ax_save_FLAGS=$LDFLAGS 27801e423a8fSmrg LDFLAGS="$1" 27811e423a8fSmrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 27821e423a8fSmrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 27831e423a8fSmrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 27841e423a8fSmrg LDFLAGS=$ax_save_FLAGS])], 27851e423a8fSmrg [ax_save_FLAGS=$LDFLAGS 27861e423a8fSmrg LDFLAGS="$1" 27871e423a8fSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 27881e423a8fSmrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 27891e423a8fSmrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 27901e423a8fSmrg LDFLAGS=$ax_save_FLAGS]) 27911e423a8fSmrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 27921e423a8fSmrgAC_MSG_RESULT($xorg_check_linker_flags) 27931e423a8fSmrgif test "x$xorg_check_linker_flags" = xyes; then 27941e423a8fSmrg m4_default([$2], :) 27951e423a8fSmrgelse 27961e423a8fSmrg m4_default([$3], :) 27971e423a8fSmrgfi 27981e423a8fSmrg]) # XORG_CHECK_LINKER_FLAGS 2799fe5e51b7Smrg 28001e423a8fSmrg# XORG_MEMORY_CHECK_FLAGS 28011e423a8fSmrg# ----------------------- 28021e423a8fSmrg# Minimum version: 1.16.0 28031e423a8fSmrg# 28041e423a8fSmrg# This macro attempts to find appropriate memory checking functionality 28051e423a8fSmrg# for various platforms which unit testing code may use to catch various 28061e423a8fSmrg# forms of memory allocation and access errors in testing. 28071e423a8fSmrg# 28081e423a8fSmrg# Interface to module: 28091e423a8fSmrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 28101e423a8fSmrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 28111e423a8fSmrg# 28121e423a8fSmrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 28131e423a8fSmrg# 28141e423a8fSmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 2815fe5e51b7Smrg 28161e423a8fSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 28171e423a8fSmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 28181e423a8fSmrg [Environment variables to enable memory checking in tests]) 2819fe5e51b7Smrg 28201e423a8fSmrg# Check for different types of support on different platforms 28211e423a8fSmrgcase $host_os in 28221e423a8fSmrg solaris*) 28231e423a8fSmrg AC_CHECK_LIB([umem], [umem_alloc], 28241e423a8fSmrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 28251e423a8fSmrg ;; 28261e423a8fSmrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 28271e423a8fSmrg # both directly and inverted, so should not be 0 or 255. 28281e423a8fSmrg malloc_debug_env='MALLOC_PERTURB_=15' 28291e423a8fSmrg ;; 28301e423a8fSmrg darwin*) 28311e423a8fSmrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 28321e423a8fSmrg ;; 28331e423a8fSmrg *bsd*) 28341e423a8fSmrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 28351e423a8fSmrg ;; 28361e423a8fSmrgesac 2837fe5e51b7Smrg 28381e423a8fSmrg# User supplied flags override default flags 28391e423a8fSmrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 28401e423a8fSmrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 2841fe5e51b7Smrgfi 2842fe5e51b7Smrg 28431e423a8fSmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 28441e423a8fSmrg]) # XORG_WITH_LINT 28451e423a8fSmrg 28461e423a8fSmrg# XORG_CHECK_MALLOC_ZERO 28471e423a8fSmrg# ---------------------- 28481e423a8fSmrg# Minimum version: 1.0.0 28491e423a8fSmrg# 28501e423a8fSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 28511e423a8fSmrg# malloc(0) returns NULL. Packages should add one of these cflags to 28521e423a8fSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 28531e423a8fSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 28541e423a8fSmrgAC_ARG_ENABLE(malloc0returnsnull, 28551e423a8fSmrg AS_HELP_STRING([--enable-malloc0returnsnull], 28561e423a8fSmrg [malloc(0) returns NULL (default: auto)]), 28571e423a8fSmrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 28581e423a8fSmrg [MALLOC_ZERO_RETURNS_NULL=auto]) 2859fe5e51b7Smrg 28601e423a8fSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 28611e423a8fSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 28621e423a8fSmrgAC_CACHE_VAL([xorg_cv_malloc0_returns_null], 28631e423a8fSmrg [AC_RUN_IFELSE([AC_LANG_PROGRAM([ 28641e423a8fSmrg#include <stdlib.h> 28651e423a8fSmrg],[ 28661e423a8fSmrg char *m0, *r0, *c0, *p; 28671e423a8fSmrg m0 = malloc(0); 28681e423a8fSmrg p = malloc(10); 28691e423a8fSmrg r0 = realloc(p,0); 28701e423a8fSmrg c0 = calloc(0,10); 28711e423a8fSmrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 28721e423a8fSmrg])], 28731e423a8fSmrg [xorg_cv_malloc0_returns_null=yes], 28741e423a8fSmrg [xorg_cv_malloc0_returns_null=no])]) 28751e423a8fSmrgMALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null 28761e423a8fSmrgfi 28771e423a8fSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 28781e423a8fSmrg 28791e423a8fSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 28801e423a8fSmrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 28811e423a8fSmrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 28821e423a8fSmrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 2883fe5e51b7Smrgelse 28841e423a8fSmrg MALLOC_ZERO_CFLAGS="" 28851e423a8fSmrg XMALLOC_ZERO_CFLAGS="" 28861e423a8fSmrg XTMALLOC_ZERO_CFLAGS="" 2887fe5e51b7Smrgfi 2888fe5e51b7Smrg 28891e423a8fSmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 28901e423a8fSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 28911e423a8fSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 28921e423a8fSmrg]) # XORG_CHECK_MALLOC_ZERO 2893fe5e51b7Smrg 28941e423a8fSmrg# XORG_WITH_LINT() 28951e423a8fSmrg# ---------------- 28961e423a8fSmrg# Minimum version: 1.1.0 28971e423a8fSmrg# 28981e423a8fSmrg# This macro enables the use of a tool that flags some suspicious and 28991e423a8fSmrg# non-portable constructs (likely to be bugs) in C language source code. 29001e423a8fSmrg# It will attempt to locate the tool and use appropriate options. 29011e423a8fSmrg# There are various lint type tools on different platforms. 29021e423a8fSmrg# 29031e423a8fSmrg# Interface to module: 29041e423a8fSmrg# LINT: returns the path to the tool found on the platform 29051e423a8fSmrg# or the value set to LINT on the configure cmd line 29061e423a8fSmrg# also an Automake conditional 29071e423a8fSmrg# LINT_FLAGS: an Automake variable with appropriate flags 29081e423a8fSmrg# 29091e423a8fSmrg# --with-lint: 'yes' user instructs the module to use lint 29101e423a8fSmrg# 'no' user instructs the module not to use lint (default) 29111e423a8fSmrg# 29121e423a8fSmrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 29131e423a8fSmrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 29141e423a8fSmrg# 29151e423a8fSmrgAC_DEFUN([XORG_WITH_LINT],[ 2916fe5e51b7Smrg 29171e423a8fSmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 29181e423a8fSmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 29191e423a8fSmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 29201e423a8fSmrg [Use a lint-style source code checker (default: disabled)])], 29211e423a8fSmrg [use_lint=$withval], [use_lint=no]) 29221e423a8fSmrg 29231e423a8fSmrg# Obtain platform specific info like program name and options 29241e423a8fSmrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 29251e423a8fSmrgcase $host_os in 29261e423a8fSmrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 29271e423a8fSmrg lint_name=splint 29281e423a8fSmrg lint_options="-badflag" 29291e423a8fSmrg ;; 29301e423a8fSmrg *freebsd* | *netbsd*) 29311e423a8fSmrg lint_name=lint 29321e423a8fSmrg lint_options="-u -b" 29331e423a8fSmrg ;; 29341e423a8fSmrg *solaris*) 29351e423a8fSmrg lint_name=lint 29361e423a8fSmrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 29371e423a8fSmrg ;; 29381e423a8fSmrgesac 29391e423a8fSmrg 29401e423a8fSmrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 29411e423a8fSmrgif test "x$use_lint" = x"yes" ; then 29421e423a8fSmrg AC_PATH_PROG([LINT], [$lint_name]) 29431e423a8fSmrg if test "x$LINT" = "x"; then 29441e423a8fSmrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 29451e423a8fSmrg fi 29461e423a8fSmrgelif test "x$use_lint" = x"no" ; then 29471e423a8fSmrg if test "x$LINT" != "x"; then 29481e423a8fSmrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 29491e423a8fSmrg fi 2950fe5e51b7Smrgelse 29511e423a8fSmrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 2952fe5e51b7Smrgfi 2953fe5e51b7Smrg 29541e423a8fSmrg# User supplied flags override default flags 29551e423a8fSmrgif test "x$LINT_FLAGS" != "x"; then 29561e423a8fSmrg lint_options=$LINT_FLAGS 2957fe5e51b7Smrgfi 2958fe5e51b7Smrg 29591e423a8fSmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 29601e423a8fSmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 29611e423a8fSmrg 29621e423a8fSmrg]) # XORG_WITH_LINT 2963fe5e51b7Smrg 29641e423a8fSmrg# XORG_LINT_LIBRARY(LIBNAME) 29651e423a8fSmrg# -------------------------- 29661e423a8fSmrg# Minimum version: 1.1.0 29671e423a8fSmrg# 29681e423a8fSmrg# Sets up flags for building lint libraries for checking programs that call 29691e423a8fSmrg# functions in the library. 29701e423a8fSmrg# 29711e423a8fSmrg# Interface to module: 29721e423a8fSmrg# LINTLIB - Automake variable with the name of lint library file to make 29731e423a8fSmrg# MAKE_LINT_LIB - Automake conditional 29741e423a8fSmrg# 29751e423a8fSmrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 29761e423a8fSmrg# - 'no' user instructs the module not to create a lint library (default) 29771e423a8fSmrg 29781e423a8fSmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 29791e423a8fSmrgAC_REQUIRE([XORG_WITH_LINT]) 29801e423a8fSmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 29811e423a8fSmrg [Create lint library (default: disabled)])], 29821e423a8fSmrg [make_lint_lib=$enableval], [make_lint_lib=no]) 29831e423a8fSmrg 29841e423a8fSmrgif test "x$make_lint_lib" = x"yes" ; then 29851e423a8fSmrg LINTLIB=llib-l$1.ln 29861e423a8fSmrg if test "x$LINT" = "x"; then 29871e423a8fSmrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 29881e423a8fSmrg fi 29891e423a8fSmrgelif test "x$make_lint_lib" != x"no" ; then 29901e423a8fSmrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 2991fe5e51b7Smrgfi 2992fe5e51b7Smrg 29931e423a8fSmrgAC_SUBST(LINTLIB) 29941e423a8fSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 2995fe5e51b7Smrg 29961e423a8fSmrg]) # XORG_LINT_LIBRARY 2997ee82cb62Smrg 29981e423a8fSmrg# XORG_COMPILER_BRAND 29991e423a8fSmrg# ------------------- 30001e423a8fSmrg# Minimum version: 1.14.0 30011e423a8fSmrg# 30021e423a8fSmrg# Checks for various brands of compilers and sets flags as appropriate: 30031e423a8fSmrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 30041e423a8fSmrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 30051e423a8fSmrg# clang compiler - sets CLANGCC to "yes" 30061e423a8fSmrg# Intel compiler - sets INTELCC to "yes" 30071e423a8fSmrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 30081e423a8fSmrg# 30091e423a8fSmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 30101e423a8fSmrgAC_LANG_CASE( 30111e423a8fSmrg [C], [ 30121e423a8fSmrg AC_REQUIRE([AC_PROG_CC_C99]) 30131e423a8fSmrg ], 30141e423a8fSmrg [C++], [ 30151e423a8fSmrg AC_REQUIRE([AC_PROG_CXX]) 30161e423a8fSmrg ] 30171e423a8fSmrg) 30181e423a8fSmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 30191e423a8fSmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 30201e423a8fSmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 30211e423a8fSmrg]) # XORG_COMPILER_BRAND 3022ee82cb62Smrg 30231e423a8fSmrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 30241e423a8fSmrg# --------------- 30251e423a8fSmrg# Minimum version: 1.16.0 30261e423a8fSmrg# 30271e423a8fSmrg# Test if the compiler works when passed the given flag as a command line argument. 30281e423a8fSmrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 30291e423a8fSmrg# next flag in the list until there are no more options. 30301e423a8fSmrg# 30311e423a8fSmrg# Note that this does not guarantee that the compiler supports the flag as some 30321e423a8fSmrg# compilers will simply ignore arguments that they do not understand, but we do 30331e423a8fSmrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 30341e423a8fSmrg# -Werror=unused-command-line-argument 30351e423a8fSmrg# 30361e423a8fSmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 30371e423a8fSmrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 30381e423a8fSmrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 3039fe5e51b7Smrg 30401e423a8fSmrgAC_LANG_COMPILER_REQUIRE 3041fe5e51b7Smrg 30421e423a8fSmrgAC_LANG_CASE( 30431e423a8fSmrg [C], [ 30441e423a8fSmrg AC_REQUIRE([AC_PROG_CC_C99]) 30451e423a8fSmrg define([PREFIX], [C]) 30461e423a8fSmrg define([CACHE_PREFIX], [cc]) 30471e423a8fSmrg define([COMPILER], [$CC]) 30481e423a8fSmrg ], 30491e423a8fSmrg [C++], [ 30501e423a8fSmrg define([PREFIX], [CXX]) 30511e423a8fSmrg define([CACHE_PREFIX], [cxx]) 30521e423a8fSmrg define([COMPILER], [$CXX]) 30531e423a8fSmrg ] 30541e423a8fSmrg) 3055ee82cb62Smrg 30561e423a8fSmrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 3057fe5e51b7Smrg 30581e423a8fSmrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 30591e423a8fSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 30601e423a8fSmrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 30611e423a8fSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 30621e423a8fSmrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 30631e423a8fSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 30641e423a8fSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 30651e423a8fSmrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 30661e423a8fSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 30671e423a8fSmrgfi 3068fe5e51b7Smrg 30691e423a8fSmrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 30701e423a8fSmrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 30711e423a8fSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 30721e423a8fSmrg fi 30731e423a8fSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 30741e423a8fSmrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 30751e423a8fSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 30761e423a8fSmrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 30771e423a8fSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 30781e423a8fSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 30791e423a8fSmrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 30801e423a8fSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 30811e423a8fSmrgfi 3082493f84f4Smrg 30831e423a8fSmrgfound="no" 30841e423a8fSmrgm4_foreach([flag], m4_cdr($@), [ 30851e423a8fSmrg if test $found = "no" ; then 30861e423a8fSmrg if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then 30871e423a8fSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 30881e423a8fSmrg fi 3089fe5e51b7Smrg 30901e423a8fSmrg if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then 30911e423a8fSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 30921e423a8fSmrg fi 3093fe5e51b7Smrg 30941e423a8fSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 3095fe5e51b7Smrg 30961e423a8fSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 30971e423a8fSmrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 30981e423a8fSmrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 30991e423a8fSmrg AC_CACHE_VAL($cacheid, 31001e423a8fSmrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 31011e423a8fSmrg [eval $cacheid=yes], 31021e423a8fSmrg [eval $cacheid=no])]) 3103fe5e51b7Smrg 31041e423a8fSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 3105fe5e51b7Smrg 31061e423a8fSmrg eval supported=\$$cacheid 31071e423a8fSmrg AC_MSG_RESULT([$supported]) 31081e423a8fSmrg if test "$supported" = "yes" ; then 31091e423a8fSmrg $1="$$1 ]flag[" 31101e423a8fSmrg found="yes" 31111e423a8fSmrg fi 31121e423a8fSmrg fi 31131e423a8fSmrg]) 31141e423a8fSmrg]) # XORG_TESTSET_CFLAG 3115fe5e51b7Smrg 31161e423a8fSmrg# XORG_COMPILER_FLAGS 31171e423a8fSmrg# --------------- 31181e423a8fSmrg# Minimum version: 1.16.0 31191e423a8fSmrg# 31201e423a8fSmrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 31211e423a8fSmrg# arguments supported by the selected compiler which do NOT alter the generated 31221e423a8fSmrg# code. These arguments will cause the compiler to print various warnings 31231e423a8fSmrg# during compilation AND turn a conservative set of warnings into errors. 31241e423a8fSmrg# 31251e423a8fSmrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 31261e423a8fSmrg# future versions of util-macros as options are added to new compilers. 31271e423a8fSmrg# 31281e423a8fSmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 31291e423a8fSmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 31300bb88ba4Smrg 31311e423a8fSmrgAC_ARG_ENABLE(selective-werror, 31321e423a8fSmrg AS_HELP_STRING([--disable-selective-werror], 31331e423a8fSmrg [Turn off selective compiler errors. (default: enabled)]), 31341e423a8fSmrg [SELECTIVE_WERROR=$enableval], 31351e423a8fSmrg [SELECTIVE_WERROR=yes]) 31360bb88ba4Smrg 31371e423a8fSmrgAC_LANG_CASE( 31381e423a8fSmrg [C], [ 31391e423a8fSmrg define([PREFIX], [C]) 31401e423a8fSmrg ], 31411e423a8fSmrg [C++], [ 31421e423a8fSmrg define([PREFIX], [CXX]) 31431e423a8fSmrg ] 31441e423a8fSmrg) 31451e423a8fSmrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 31461e423a8fSmrgif test "x$SUNCC" = "xyes"; then 31471e423a8fSmrg [BASE_]PREFIX[FLAGS]="-v" 31481e423a8fSmrgelse 31491e423a8fSmrg [BASE_]PREFIX[FLAGS]="" 31501e423a8fSmrgfi 31510bb88ba4Smrg 31521e423a8fSmrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 31531e423a8fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 31541e423a8fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 31551e423a8fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 31561e423a8fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 3157fe5e51b7Smrg 31581e423a8fSmrgAC_LANG_CASE( 31591e423a8fSmrg [C], [ 31601e423a8fSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 31611e423a8fSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 31621e423a8fSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 31631e423a8fSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 31641e423a8fSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd]) 31651e423a8fSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 31661e423a8fSmrg ] 31671e423a8fSmrg) 3168fe5e51b7Smrg 31691e423a8fSmrg# This chunk adds additional warnings that could catch undesired effects. 31701e423a8fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 31711e423a8fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 31721e423a8fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 31731e423a8fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 31741e423a8fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 31751e423a8fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 31761e423a8fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 3177fe5e51b7Smrg 31781e423a8fSmrg# These are currently disabled because they are noisy. They will be enabled 31791e423a8fSmrg# in the future once the codebase is sufficiently modernized to silence 31801e423a8fSmrg# them. For now, I don't want them to drown out the other warnings. 31811e423a8fSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 31821e423a8fSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 31831e423a8fSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 3184fe5e51b7Smrg 31851e423a8fSmrg# Turn some warnings into errors, so we don't accidently get successful builds 31861e423a8fSmrg# when there are problems that should be fixed. 3187fe5e51b7Smrg 31881e423a8fSmrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 31891e423a8fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 31901e423a8fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 31911e423a8fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 31921e423a8fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 31931e423a8fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 31941e423a8fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 31951e423a8fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 31961e423a8fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 31971e423a8fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 31981e423a8fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 31991e423a8fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 32001e423a8fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 32011e423a8fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 32021e423a8fSmrgelse 32031e423a8fSmrgAC_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]) 32041e423a8fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 32051e423a8fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 32061e423a8fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 32071e423a8fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 32081e423a8fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 32091e423a8fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 32101e423a8fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 32111e423a8fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 32121e423a8fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 32131e423a8fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 32141e423a8fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 32151e423a8fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 32161e423a8fSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 32171e423a8fSmrgfi 3218fe5e51b7Smrg 32191e423a8fSmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 32201e423a8fSmrg]) # XORG_COMPILER_FLAGS 3221fe5e51b7Smrg 32221e423a8fSmrg# XORG_CWARNFLAGS 32231e423a8fSmrg# --------------- 32241e423a8fSmrg# Minimum version: 1.2.0 32251e423a8fSmrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 32261e423a8fSmrg# 32271e423a8fSmrg# Defines CWARNFLAGS to enable C compiler warnings. 32281e423a8fSmrg# 32291e423a8fSmrg# This function is deprecated because it defines -fno-strict-aliasing 32301e423a8fSmrg# which alters the code generated by the compiler. If -fno-strict-aliasing 32311e423a8fSmrg# is needed, then it should be added explicitly in the module when 32321e423a8fSmrg# it is updated to use BASE_CFLAGS. 32331e423a8fSmrg# 32341e423a8fSmrgAC_DEFUN([XORG_CWARNFLAGS], [ 32351e423a8fSmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 32361e423a8fSmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 32371e423a8fSmrgAC_LANG_CASE( 32381e423a8fSmrg [C], [ 32391e423a8fSmrg CWARNFLAGS="$BASE_CFLAGS" 32401e423a8fSmrg if test "x$GCC" = xyes ; then 32411e423a8fSmrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 32421e423a8fSmrg fi 32431e423a8fSmrg AC_SUBST(CWARNFLAGS) 32441e423a8fSmrg ] 32451e423a8fSmrg) 32461e423a8fSmrg]) # XORG_CWARNFLAGS 3247493f84f4Smrg 32481e423a8fSmrg# XORG_STRICT_OPTION 32491e423a8fSmrg# ----------------------- 32501e423a8fSmrg# Minimum version: 1.3.0 32511e423a8fSmrg# 32521e423a8fSmrg# Add configure option to enable strict compilation flags, such as treating 32531e423a8fSmrg# warnings as fatal errors. 32541e423a8fSmrg# If --enable-strict-compilation is passed to configure, adds strict flags to 32551e423a8fSmrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 32561e423a8fSmrg# 32571e423a8fSmrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 32581e423a8fSmrg# when strict compilation is unconditionally desired. 32591e423a8fSmrgAC_DEFUN([XORG_STRICT_OPTION], [ 32601e423a8fSmrgAC_REQUIRE([XORG_CWARNFLAGS]) 32611e423a8fSmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 3262493f84f4Smrg 32631e423a8fSmrgAC_ARG_ENABLE(strict-compilation, 32641e423a8fSmrg AS_HELP_STRING([--enable-strict-compilation], 32651e423a8fSmrg [Enable all warnings from compiler and make them errors (default: disabled)]), 32661e423a8fSmrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 3267493f84f4Smrg 32681e423a8fSmrgAC_LANG_CASE( 32691e423a8fSmrg [C], [ 32701e423a8fSmrg define([PREFIX], [C]) 32711e423a8fSmrg ], 32721e423a8fSmrg [C++], [ 32731e423a8fSmrg define([PREFIX], [CXX]) 32741e423a8fSmrg ] 32751e423a8fSmrg) 32760bb88ba4Smrg 32771e423a8fSmrg[STRICT_]PREFIX[FLAGS]="" 32781e423a8fSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 32791e423a8fSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 3280a31a186aSmrg 32811e423a8fSmrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 32821e423a8fSmrg# activate it with -Werror, so we add it here explicitly. 32831e423a8fSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 3284a31a186aSmrg 32851e423a8fSmrgif test "x$STRICT_COMPILE" = "xyes"; then 32861e423a8fSmrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 32871e423a8fSmrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 32881e423a8fSmrgfi 32891e423a8fSmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 32901e423a8fSmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 32911e423a8fSmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 32921e423a8fSmrg]) # XORG_STRICT_OPTION 3293fe5e51b7Smrg 32941e423a8fSmrg# XORG_DEFAULT_OPTIONS 32951e423a8fSmrg# -------------------- 32961e423a8fSmrg# Minimum version: 1.3.0 32971e423a8fSmrg# 32981e423a8fSmrg# Defines default options for X.Org modules. 32991e423a8fSmrg# 33001e423a8fSmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 33011e423a8fSmrgAC_REQUIRE([AC_PROG_INSTALL]) 33021e423a8fSmrgXORG_COMPILER_FLAGS 33031e423a8fSmrgXORG_CWARNFLAGS 33041e423a8fSmrgXORG_STRICT_OPTION 33051e423a8fSmrgXORG_RELEASE_VERSION 33061e423a8fSmrgXORG_CHANGELOG 33071e423a8fSmrgXORG_INSTALL 33081e423a8fSmrgXORG_MANPAGE_SECTIONS 33091e423a8fSmrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 33101e423a8fSmrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 33111e423a8fSmrg]) # XORG_DEFAULT_OPTIONS 3312fe5e51b7Smrg 33131e423a8fSmrg# XORG_INSTALL() 33141e423a8fSmrg# ---------------- 33151e423a8fSmrg# Minimum version: 1.4.0 33161e423a8fSmrg# 33171e423a8fSmrg# Defines the variable INSTALL_CMD as the command to copy 33181e423a8fSmrg# INSTALL from $prefix/share/util-macros. 33191e423a8fSmrg# 33201e423a8fSmrgAC_DEFUN([XORG_INSTALL], [ 33211e423a8fSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 33221e423a8fSmrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 33231e423a8fSmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 33241e423a8fSmrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 33251e423a8fSmrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; test -e \$(top_srcdir)/INSTALL || ( \ 33261e423a8fSmrgtouch \$(top_srcdir)/INSTALL; \ 33271e423a8fSmrgecho 'failed to copy INSTALL from util-macros: installing empty INSTALL.' >&2))" 33281e423a8fSmrgAC_SUBST([INSTALL_CMD]) 33291e423a8fSmrg]) # XORG_INSTALL 33301e423a8fSmrgdnl Copyright 2005 Red Hat, Inc 33311e423a8fSmrgdnl 33321e423a8fSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 33331e423a8fSmrgdnl documentation for any purpose is hereby granted without fee, provided that 33341e423a8fSmrgdnl the above copyright notice appear in all copies and that both that 33351e423a8fSmrgdnl copyright notice and this permission notice appear in supporting 33361e423a8fSmrgdnl documentation. 33371e423a8fSmrgdnl 33381e423a8fSmrgdnl The above copyright notice and this permission notice shall be included 33391e423a8fSmrgdnl in all copies or substantial portions of the Software. 33401e423a8fSmrgdnl 33411e423a8fSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 33421e423a8fSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 33431e423a8fSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 33441e423a8fSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 33451e423a8fSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 33461e423a8fSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 33471e423a8fSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 33481e423a8fSmrgdnl 33491e423a8fSmrgdnl Except as contained in this notice, the name of the copyright holders shall 33501e423a8fSmrgdnl not be used in advertising or otherwise to promote the sale, use or 33511e423a8fSmrgdnl other dealings in this Software without prior written authorization 33521e423a8fSmrgdnl from the copyright holders. 33531e423a8fSmrgdnl 3354b0de6900Smrg 33551e423a8fSmrg# XORG_RELEASE_VERSION 33561e423a8fSmrg# -------------------- 33571e423a8fSmrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 3358fe5e51b7Smrg 33591e423a8fSmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 33601e423a8fSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 33611e423a8fSmrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 33621e423a8fSmrg [Major version of this package]) 33631e423a8fSmrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 33641e423a8fSmrg if test "x$PVM" = "x"; then 33651e423a8fSmrg PVM="0" 33661e423a8fSmrg fi 33671e423a8fSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 33681e423a8fSmrg [$PVM], 33691e423a8fSmrg [Minor version of this package]) 33701e423a8fSmrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 33711e423a8fSmrg if test "x$PVP" = "x"; then 33721e423a8fSmrg PVP="0" 33731e423a8fSmrg fi 33741e423a8fSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 33751e423a8fSmrg [$PVP], 33761e423a8fSmrg [Patch version of this package]) 33771e423a8fSmrg]) 3378fe5e51b7Smrg 33791e423a8fSmrg# XORG_CHANGELOG() 33801e423a8fSmrg# ---------------- 33811e423a8fSmrg# Minimum version: 1.2.0 33821e423a8fSmrg# 33831e423a8fSmrg# Defines the variable CHANGELOG_CMD as the command to generate 33841e423a8fSmrg# ChangeLog from git. 33851e423a8fSmrg# 33861e423a8fSmrg# 33871e423a8fSmrgAC_DEFUN([XORG_CHANGELOG], [ 33881e423a8fSmrgCHANGELOG_CMD="((GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp) 2>/dev/null && \ 33891e423a8fSmrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 33901e423a8fSmrg|| (rm -f \$(top_srcdir)/.changelog.tmp; test -e \$(top_srcdir)/ChangeLog || ( \ 33911e423a8fSmrgtouch \$(top_srcdir)/ChangeLog; \ 33921e423a8fSmrgecho 'git failed to create ChangeLog: installing empty ChangeLog.' >&2))" 33931e423a8fSmrgAC_SUBST([CHANGELOG_CMD]) 33941e423a8fSmrg]) # XORG_CHANGELOG 3395fe5e51b7Smrg 33961e423a8fSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 33971e423a8fSmrg# 33981e423a8fSmrg# Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software 33991e423a8fSmrg# Foundation, Inc. 34001e423a8fSmrg# Written by Gordon Matzigkeit, 1996 34011e423a8fSmrg# 34021e423a8fSmrg# This file is free software; the Free Software Foundation gives 34031e423a8fSmrg# unlimited permission to copy and/or distribute it, with or without 34041e423a8fSmrg# modifications, as long as this notice is preserved. 3405fe5e51b7Smrg 34061e423a8fSmrgm4_define([_LT_COPYING], [dnl 34071e423a8fSmrg# Copyright (C) 2014 Free Software Foundation, Inc. 34081e423a8fSmrg# This is free software; see the source for copying conditions. There is NO 34091e423a8fSmrg# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 3410fe5e51b7Smrg 34111e423a8fSmrg# GNU Libtool is free software; you can redistribute it and/or modify 34121e423a8fSmrg# it under the terms of the GNU General Public License as published by 34131e423a8fSmrg# the Free Software Foundation; either version 2 of of the License, or 34141e423a8fSmrg# (at your option) any later version. 34151e423a8fSmrg# 34161e423a8fSmrg# As a special exception to the GNU General Public License, if you 34171e423a8fSmrg# distribute this file as part of a program or library that is built 34181e423a8fSmrg# using GNU Libtool, you may include this file under the same 34191e423a8fSmrg# distribution terms that you use for the rest of that program. 34201e423a8fSmrg# 34211e423a8fSmrg# GNU Libtool is distributed in the hope that it will be useful, but 34221e423a8fSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 34231e423a8fSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 34241e423a8fSmrg# GNU General Public License for more details. 34251e423a8fSmrg# 34261e423a8fSmrg# You should have received a copy of the GNU General Public License 34271e423a8fSmrg# along with this program. If not, see <http://www.gnu.org/licenses/>. 34281e423a8fSmrg]) 3429fe5e51b7Smrg 34301e423a8fSmrg# serial 59 LT_INIT 3431fe5e51b7Smrg 3432fe5e51b7Smrg 34331e423a8fSmrg# LT_PREREQ(VERSION) 34341e423a8fSmrg# ------------------ 34351e423a8fSmrg# Complain and exit if this libtool version is less that VERSION. 34361e423a8fSmrgm4_defun([LT_PREREQ], 34371e423a8fSmrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 34381e423a8fSmrg [m4_default([$3], 34391e423a8fSmrg [m4_fatal([Libtool version $1 or higher is required], 34401e423a8fSmrg 63)])], 34411e423a8fSmrg [$2])]) 3442fe5e51b7Smrg 3443a31a186aSmrg 34441e423a8fSmrg# _LT_CHECK_BUILDDIR 34451e423a8fSmrg# ------------------ 34461e423a8fSmrg# Complain if the absolute build directory name contains unusual characters 34471e423a8fSmrgm4_defun([_LT_CHECK_BUILDDIR], 34481e423a8fSmrg[case `pwd` in 34491e423a8fSmrg *\ * | *\ *) 34501e423a8fSmrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 3451fe5e51b7Smrgesac 34521e423a8fSmrg]) 3453fe5e51b7Smrg 3454fe5e51b7Smrg 34551e423a8fSmrg# LT_INIT([OPTIONS]) 34561e423a8fSmrg# ------------------ 34571e423a8fSmrgAC_DEFUN([LT_INIT], 34581e423a8fSmrg[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK 34591e423a8fSmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 34601e423a8fSmrgAC_BEFORE([$0], [LT_LANG])dnl 34611e423a8fSmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 34621e423a8fSmrgAC_BEFORE([$0], [LTDL_INIT])dnl 34631e423a8fSmrgm4_require([_LT_CHECK_BUILDDIR])dnl 3464ee82cb62Smrg 34651e423a8fSmrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 34661e423a8fSmrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 34671e423a8fSmrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 34681e423a8fSmrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 34691e423a8fSmrgdnl unless we require an AC_DEFUNed macro: 34701e423a8fSmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 34711e423a8fSmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 34721e423a8fSmrgAC_REQUIRE([LTVERSION_VERSION])dnl 34731e423a8fSmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 34741e423a8fSmrgm4_require([_LT_PROG_LTMAIN])dnl 3475fe5e51b7Smrg 34761e423a8fSmrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 3477ee82cb62Smrg 34781e423a8fSmrgdnl Parse OPTIONS 34791e423a8fSmrg_LT_SET_OPTIONS([$0], [$1]) 3480ee82cb62Smrg 34811e423a8fSmrg# This can be used to rebuild libtool when needed 34821e423a8fSmrgLIBTOOL_DEPS=$ltmain 3483ee82cb62Smrg 34841e423a8fSmrg# Always use our own libtool. 34851e423a8fSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 34861e423a8fSmrgAC_SUBST(LIBTOOL)dnl 3487a31a186aSmrg 34881e423a8fSmrg_LT_SETUP 3489a31a186aSmrg 34901e423a8fSmrg# Only expand once: 34911e423a8fSmrgm4_define([LT_INIT]) 34921e423a8fSmrg])# LT_INIT 3493fe5e51b7Smrg 34941e423a8fSmrg# Old names: 34951e423a8fSmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 34961e423a8fSmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 34971e423a8fSmrgdnl aclocal-1.4 backwards compatibility: 34981e423a8fSmrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 34991e423a8fSmrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 3500fe5e51b7Smrg 3501fe5e51b7Smrg 35021e423a8fSmrg# _LT_PREPARE_CC_BASENAME 35031e423a8fSmrg# ----------------------- 35041e423a8fSmrgm4_defun([_LT_PREPARE_CC_BASENAME], [ 35051e423a8fSmrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 35061e423a8fSmrgfunc_cc_basename () 35071e423a8fSmrg{ 35081e423a8fSmrg for cc_temp in @S|@*""; do 35091e423a8fSmrg case $cc_temp in 35101e423a8fSmrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 35111e423a8fSmrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 35121e423a8fSmrg \-*) ;; 35131e423a8fSmrg *) break;; 35141e423a8fSmrg esac 35151e423a8fSmrg done 35161e423a8fSmrg func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 35171e423a8fSmrg} 35181e423a8fSmrg])# _LT_PREPARE_CC_BASENAME 3519eda3803bSmrg 3520a31a186aSmrg 35211e423a8fSmrg# _LT_CC_BASENAME(CC) 35221e423a8fSmrg# ------------------- 35231e423a8fSmrg# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, 35241e423a8fSmrg# but that macro is also expanded into generated libtool script, which 35251e423a8fSmrg# arranges for $SED and $ECHO to be set by different means. 35261e423a8fSmrgm4_defun([_LT_CC_BASENAME], 35271e423a8fSmrg[m4_require([_LT_PREPARE_CC_BASENAME])dnl 35281e423a8fSmrgAC_REQUIRE([_LT_DECL_SED])dnl 35291e423a8fSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 35301e423a8fSmrgfunc_cc_basename $1 35311e423a8fSmrgcc_basename=$func_cc_basename_result 35321e423a8fSmrg]) 3533fe5e51b7Smrg 3534fe5e51b7Smrg 35351e423a8fSmrg# _LT_FILEUTILS_DEFAULTS 35361e423a8fSmrg# ---------------------- 35371e423a8fSmrg# It is okay to use these file commands and assume they have been set 35381e423a8fSmrg# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. 35391e423a8fSmrgm4_defun([_LT_FILEUTILS_DEFAULTS], 35401e423a8fSmrg[: ${CP="cp -f"} 35411e423a8fSmrg: ${MV="mv -f"} 35421e423a8fSmrg: ${RM="rm -f"} 35431e423a8fSmrg])# _LT_FILEUTILS_DEFAULTS 35441e423a8fSmrg 35451e423a8fSmrg 35461e423a8fSmrg# _LT_SETUP 35471e423a8fSmrg# --------- 35481e423a8fSmrgm4_defun([_LT_SETUP], 35491e423a8fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3550643b027fSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 35511e423a8fSmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 35521e423a8fSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 3553a31a186aSmrg 35541e423a8fSmrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 35551e423a8fSmrgdnl 35561e423a8fSmrg_LT_DECL([], [host_alias], [0], [The host system])dnl 35571e423a8fSmrg_LT_DECL([], [host], [0])dnl 35581e423a8fSmrg_LT_DECL([], [host_os], [0])dnl 35591e423a8fSmrgdnl 35601e423a8fSmrg_LT_DECL([], [build_alias], [0], [The build system])dnl 35611e423a8fSmrg_LT_DECL([], [build], [0])dnl 35621e423a8fSmrg_LT_DECL([], [build_os], [0])dnl 35631e423a8fSmrgdnl 35641e423a8fSmrgAC_REQUIRE([AC_PROG_CC])dnl 35651e423a8fSmrgAC_REQUIRE([LT_PATH_LD])dnl 35661e423a8fSmrgAC_REQUIRE([LT_PATH_NM])dnl 35671e423a8fSmrgdnl 35681e423a8fSmrgAC_REQUIRE([AC_PROG_LN_S])dnl 35691e423a8fSmrgtest -z "$LN_S" && LN_S="ln -s" 35701e423a8fSmrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 35711e423a8fSmrgdnl 35721e423a8fSmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 35731e423a8fSmrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 35741e423a8fSmrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 35751e423a8fSmrgdnl 35761e423a8fSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 35771e423a8fSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 35781e423a8fSmrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 35791e423a8fSmrgm4_require([_LT_CMD_RELOAD])dnl 35801e423a8fSmrgm4_require([_LT_DECL_FILECMD])dnl 35811e423a8fSmrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 35821e423a8fSmrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 35831e423a8fSmrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 35841e423a8fSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 35851e423a8fSmrgm4_require([_LT_WITH_SYSROOT])dnl 35861e423a8fSmrgm4_require([_LT_CMD_TRUNCATE])dnl 3587a31a186aSmrg 35881e423a8fSmrg_LT_CONFIG_LIBTOOL_INIT([ 35891e423a8fSmrg# See if we are running on zsh, and set the options that allow our 35901e423a8fSmrg# commands through without removal of \ escapes INIT. 35911e423a8fSmrgif test -n "\${ZSH_VERSION+set}"; then 35921e423a8fSmrg setopt NO_GLOB_SUBST 3593fe5e51b7Smrgfi 35941e423a8fSmrg]) 35951e423a8fSmrgif test -n "${ZSH_VERSION+set}"; then 35961e423a8fSmrg setopt NO_GLOB_SUBST 3597fe5e51b7Smrgfi 3598a31a186aSmrg 35991e423a8fSmrg_LT_CHECK_OBJDIR 3600a31a186aSmrg 36011e423a8fSmrgm4_require([_LT_TAG_COMPILER])dnl 3602fe5e51b7Smrg 3603fe5e51b7Smrgcase $host_os in 36041e423a8fSmrgaix3*) 36051e423a8fSmrg # AIX sometimes has problems with the GCC collect2 program. For some 36061e423a8fSmrg # reason, if we set the COLLECT_NAMES environment variable, the problems 36071e423a8fSmrg # vanish in a puff of smoke. 36081e423a8fSmrg if test set != "${COLLECT_NAMES+set}"; then 36091e423a8fSmrg COLLECT_NAMES= 36101e423a8fSmrg export COLLECT_NAMES 36111e423a8fSmrg fi 36121e423a8fSmrg ;; 3613fe5e51b7Smrgesac 3614fe5e51b7Smrg 36151e423a8fSmrg# Global variables: 36161e423a8fSmrgofile=libtool 36171e423a8fSmrgcan_build_shared=yes 3618fe5e51b7Smrg 36191e423a8fSmrg# All known linkers require a '.a' archive for static linking (except MSVC and 36201e423a8fSmrg# ICC, which need '.lib'). 36211e423a8fSmrglibext=a 3622493f84f4Smrg 36231e423a8fSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 3624493f84f4Smrg 36251e423a8fSmrgold_CC=$CC 36261e423a8fSmrgold_CFLAGS=$CFLAGS 3627493f84f4Smrg 36281e423a8fSmrg# Set sane defaults for various variables 36291e423a8fSmrgtest -z "$CC" && CC=cc 36301e423a8fSmrgtest -z "$LTCC" && LTCC=$CC 36311e423a8fSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 36321e423a8fSmrgtest -z "$LD" && LD=ld 36331e423a8fSmrgtest -z "$ac_objext" && ac_objext=o 3634493f84f4Smrg 36351e423a8fSmrg_LT_CC_BASENAME([$compiler]) 3636fe5e51b7Smrg 36371e423a8fSmrg# Only perform the check for file, if the check method requires it 36381e423a8fSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 36391e423a8fSmrgcase $deplibs_check_method in 36401e423a8fSmrgfile_magic*) 36411e423a8fSmrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 36421e423a8fSmrg _LT_PATH_MAGIC 36431e423a8fSmrg fi 3644fe5e51b7Smrg ;; 36451e423a8fSmrgesac 3646fe5e51b7Smrg 36471e423a8fSmrg# Use C for the default configuration in the libtool script 36481e423a8fSmrgLT_SUPPORTED_TAG([CC]) 36491e423a8fSmrg_LT_LANG_C_CONFIG 36501e423a8fSmrg_LT_LANG_DEFAULT_CONFIG 36511e423a8fSmrg_LT_CONFIG_COMMANDS 36521e423a8fSmrg])# _LT_SETUP 3653fe5e51b7Smrg 3654fe5e51b7Smrg 36551e423a8fSmrg# _LT_PREPARE_SED_QUOTE_VARS 36561e423a8fSmrg# -------------------------- 36571e423a8fSmrg# Define a few sed substitution that help us do robust quoting. 36581e423a8fSmrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 36591e423a8fSmrg[# Backslashify metacharacters that are still active within 36601e423a8fSmrg# double-quoted strings. 36611e423a8fSmrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 3662fe5e51b7Smrg 36631e423a8fSmrg# Same as above, but do not quote variable references. 36641e423a8fSmrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 3665fe5e51b7Smrg 36661e423a8fSmrg# Sed substitution to delay expansion of an escaped shell variable in a 36671e423a8fSmrg# double_quote_subst'ed string. 36681e423a8fSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 3669a31a186aSmrg 36701e423a8fSmrg# Sed substitution to delay expansion of an escaped single quote. 36711e423a8fSmrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 3672fe5e51b7Smrg 36731e423a8fSmrg# Sed substitution to avoid accidental globbing in evaled expressions 36741e423a8fSmrgno_glob_subst='s/\*/\\\*/g' 36751e423a8fSmrg]) 3676fe5e51b7Smrg 36771e423a8fSmrg# _LT_PROG_LTMAIN 36781e423a8fSmrg# --------------- 36791e423a8fSmrg# Note that this code is called both from 'configure', and 'config.status' 36801e423a8fSmrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 36811e423a8fSmrg# 'config.status' has no value for ac_aux_dir unless we are using Automake, 36821e423a8fSmrg# so we pass a copy along to make sure it has a sensible value anyway. 36831e423a8fSmrgm4_defun([_LT_PROG_LTMAIN], 36841e423a8fSmrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 36851e423a8fSmrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 36861e423a8fSmrgltmain=$ac_aux_dir/ltmain.sh 36871e423a8fSmrg])# _LT_PROG_LTMAIN 36880bb88ba4Smrg 3689fe5e51b7Smrg 3690fe5e51b7Smrg 36911e423a8fSmrg# So that we can recreate a full libtool script including additional 36921e423a8fSmrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 36931e423a8fSmrg# in macros and then make a single call at the end using the 'libtool' 36941e423a8fSmrg# label. 3695fe5e51b7Smrg 3696fe5e51b7Smrg 36971e423a8fSmrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 36981e423a8fSmrg# ---------------------------------------- 36991e423a8fSmrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 37001e423a8fSmrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 37011e423a8fSmrg[m4_ifval([$1], 37021e423a8fSmrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 37031e423a8fSmrg [$1 37041e423a8fSmrg])])]) 3705fe5e51b7Smrg 37061e423a8fSmrg# Initialize. 37071e423a8fSmrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 3708fe5e51b7Smrg 3709fe5e51b7Smrg 37101e423a8fSmrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 37111e423a8fSmrg# ------------------------------ 37121e423a8fSmrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 37131e423a8fSmrgm4_define([_LT_CONFIG_LIBTOOL], 37141e423a8fSmrg[m4_ifval([$1], 37151e423a8fSmrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 37161e423a8fSmrg [$1 37171e423a8fSmrg])])]) 3718fe5e51b7Smrg 37191e423a8fSmrg# Initialize. 37201e423a8fSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 3721fe5e51b7Smrg 3722fe5e51b7Smrg 37231e423a8fSmrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 37241e423a8fSmrg# ----------------------------------------------------- 37251e423a8fSmrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 37261e423a8fSmrg[_LT_CONFIG_LIBTOOL([$1]) 37271e423a8fSmrg_LT_CONFIG_LIBTOOL_INIT([$2]) 37281e423a8fSmrg]) 3729fe5e51b7Smrg 3730a31a186aSmrg 37311e423a8fSmrg# _LT_FORMAT_COMMENT([COMMENT]) 37321e423a8fSmrg# ----------------------------- 37331e423a8fSmrg# Add leading comment marks to the start of each line, and a trailing 37341e423a8fSmrg# full-stop to the whole comment if one is not present already. 37351e423a8fSmrgm4_define([_LT_FORMAT_COMMENT], 37361e423a8fSmrg[m4_ifval([$1], [ 37371e423a8fSmrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 37381e423a8fSmrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 37391e423a8fSmrg)]) 3740fe5e51b7Smrg 37410bb88ba4Smrg 37420bb88ba4Smrg 3743a31a186aSmrg 3744eda3803bSmrg 37451e423a8fSmrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 37461e423a8fSmrg# ------------------------------------------------------------------- 37471e423a8fSmrg# CONFIGNAME is the name given to the value in the libtool script. 37481e423a8fSmrg# VARNAME is the (base) name used in the configure script. 37491e423a8fSmrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 37501e423a8fSmrg# VARNAME. Any other value will be used directly. 37511e423a8fSmrgm4_define([_LT_DECL], 37521e423a8fSmrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 37531e423a8fSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 37541e423a8fSmrg [m4_ifval([$1], [$1], [$2])]) 37551e423a8fSmrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 37561e423a8fSmrg m4_ifval([$4], 37571e423a8fSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 37581e423a8fSmrg lt_dict_add_subkey([lt_decl_dict], [$2], 37591e423a8fSmrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 37601e423a8fSmrg]) 3761fe5e51b7Smrg 3762a31a186aSmrg 37631e423a8fSmrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 37641e423a8fSmrg# -------------------------------------------------------- 37651e423a8fSmrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 3766fe5e51b7Smrg 3767eda3803bSmrg 37681e423a8fSmrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 37691e423a8fSmrg# ------------------------------------------------ 37701e423a8fSmrgm4_define([lt_decl_tag_varnames], 37711e423a8fSmrg[_lt_decl_filter([tagged?], [yes], $@)]) 37720bb88ba4Smrg 37730bb88ba4Smrg 37741e423a8fSmrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 37751e423a8fSmrg# --------------------------------------------------------- 37761e423a8fSmrgm4_define([_lt_decl_filter], 37771e423a8fSmrg[m4_case([$#], 37781e423a8fSmrg [0], [m4_fatal([$0: too few arguments: $#])], 37791e423a8fSmrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 37801e423a8fSmrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 37811e423a8fSmrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 37821e423a8fSmrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 37831e423a8fSmrg]) 37840bb88ba4Smrg 37850bb88ba4Smrg 37861e423a8fSmrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 37871e423a8fSmrg# -------------------------------------------------- 37881e423a8fSmrgm4_define([lt_decl_quote_varnames], 37891e423a8fSmrg[_lt_decl_filter([value], [1], $@)]) 37900bb88ba4Smrg 3791a31a186aSmrg 37921e423a8fSmrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 37931e423a8fSmrg# --------------------------------------------------- 37941e423a8fSmrgm4_define([lt_decl_dquote_varnames], 37951e423a8fSmrg[_lt_decl_filter([value], [2], $@)]) 3796493f84f4Smrg 3797493f84f4Smrg 37981e423a8fSmrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 37991e423a8fSmrg# --------------------------------------------------- 38001e423a8fSmrgm4_define([lt_decl_varnames_tagged], 38011e423a8fSmrg[m4_assert([$# <= 2])dnl 38021e423a8fSmrg_$0(m4_quote(m4_default([$1], [[, ]])), 38031e423a8fSmrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 38041e423a8fSmrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 38051e423a8fSmrgm4_define([_lt_decl_varnames_tagged], 38061e423a8fSmrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 3807fe5e51b7Smrg 3808fe5e51b7Smrg 38091e423a8fSmrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 38101e423a8fSmrg# ------------------------------------------------ 38111e423a8fSmrgm4_define([lt_decl_all_varnames], 38121e423a8fSmrg[_$0(m4_quote(m4_default([$1], [[, ]])), 38131e423a8fSmrg m4_if([$2], [], 38141e423a8fSmrg m4_quote(lt_decl_varnames), 38151e423a8fSmrg m4_quote(m4_shift($@))))[]dnl 38161e423a8fSmrg]) 38171e423a8fSmrgm4_define([_lt_decl_all_varnames], 38181e423a8fSmrg[lt_join($@, lt_decl_varnames_tagged([$1], 38191e423a8fSmrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 38201e423a8fSmrg]) 3821fe5e51b7Smrg 3822fe5e51b7Smrg 38231e423a8fSmrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 38241e423a8fSmrg# ------------------------------------ 38251e423a8fSmrg# Quote a variable value, and forward it to 'config.status' so that its 38261e423a8fSmrg# declaration there will have the same value as in 'configure'. VARNAME 38271e423a8fSmrg# must have a single quote delimited value for this to work. 38281e423a8fSmrgm4_define([_LT_CONFIG_STATUS_DECLARE], 38291e423a8fSmrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 3830fe5e51b7Smrg 3831fe5e51b7Smrg 38321e423a8fSmrg# _LT_CONFIG_STATUS_DECLARATIONS 38331e423a8fSmrg# ------------------------------ 38341e423a8fSmrg# We delimit libtool config variables with single quotes, so when 38351e423a8fSmrg# we write them to config.status, we have to be sure to quote all 38361e423a8fSmrg# embedded single quotes properly. In configure, this macro expands 38371e423a8fSmrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 38381e423a8fSmrg# 38391e423a8fSmrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 38401e423a8fSmrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 38411e423a8fSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 38421e423a8fSmrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 3843fe5e51b7Smrg 3844fe5e51b7Smrg 38451e423a8fSmrg# _LT_LIBTOOL_TAGS 38461e423a8fSmrg# ---------------- 38471e423a8fSmrg# Output comment and list of tags supported by the script 38481e423a8fSmrgm4_defun([_LT_LIBTOOL_TAGS], 38491e423a8fSmrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 38501e423a8fSmrgavailable_tags='_LT_TAGS'dnl 38511e423a8fSmrg]) 3852fe5e51b7Smrg 3853fe5e51b7Smrg 38541e423a8fSmrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 38551e423a8fSmrg# ----------------------------------- 38561e423a8fSmrg# Extract the dictionary values for VARNAME (optionally with TAG) and 38571e423a8fSmrg# expand to a commented shell variable setting: 38581e423a8fSmrg# 38591e423a8fSmrg# # Some comment about what VAR is for. 38601e423a8fSmrg# visible_name=$lt_internal_name 38611e423a8fSmrgm4_define([_LT_LIBTOOL_DECLARE], 38621e423a8fSmrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 38631e423a8fSmrg [description])))[]dnl 38641e423a8fSmrgm4_pushdef([_libtool_name], 38651e423a8fSmrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 38661e423a8fSmrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 38671e423a8fSmrg [0], [_libtool_name=[$]$1], 38681e423a8fSmrg [1], [_libtool_name=$lt_[]$1], 38691e423a8fSmrg [2], [_libtool_name=$lt_[]$1], 38701e423a8fSmrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 38711e423a8fSmrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 38721e423a8fSmrg]) 3873fe5e51b7Smrg 3874fe5e51b7Smrg 38751e423a8fSmrg# _LT_LIBTOOL_CONFIG_VARS 38761e423a8fSmrg# ----------------------- 38771e423a8fSmrg# Produce commented declarations of non-tagged libtool config variables 38781e423a8fSmrg# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' 38791e423a8fSmrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 38801e423a8fSmrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 38811e423a8fSmrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 38821e423a8fSmrg[m4_foreach([_lt_var], 38831e423a8fSmrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 38841e423a8fSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 3885fe5e51b7Smrg 3886fe5e51b7Smrg 38871e423a8fSmrg# _LT_LIBTOOL_TAG_VARS(TAG) 38881e423a8fSmrg# ------------------------- 38891e423a8fSmrgm4_define([_LT_LIBTOOL_TAG_VARS], 38901e423a8fSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 38911e423a8fSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 3892493f84f4Smrg 3893fe5e51b7Smrg 38941e423a8fSmrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 38951e423a8fSmrg# ------------------------------ 38961e423a8fSmrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 3897493f84f4Smrg 3898fe5e51b7Smrg 38991e423a8fSmrg# _LT_CONFIG_COMMANDS 39001e423a8fSmrg# ------------------- 39011e423a8fSmrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 39021e423a8fSmrg# variables for single and double quote escaping we saved from calls 39031e423a8fSmrg# to _LT_DECL, we can put quote escaped variables declarations 39041e423a8fSmrg# into 'config.status', and then the shell code to quote escape them in 39051e423a8fSmrg# for loops in 'config.status'. Finally, any additional code accumulated 39061e423a8fSmrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 39071e423a8fSmrgm4_defun([_LT_CONFIG_COMMANDS], 39081e423a8fSmrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 39091e423a8fSmrg dnl If the libtool generation code has been placed in $CONFIG_LT, 39101e423a8fSmrg dnl instead of duplicating it all over again into config.status, 39111e423a8fSmrg dnl then we will have config.status run $CONFIG_LT later, so it 39121e423a8fSmrg dnl needs to know what name is stored there: 39131e423a8fSmrg [AC_CONFIG_COMMANDS([libtool], 39141e423a8fSmrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 39151e423a8fSmrg dnl If the libtool generation code is destined for config.status, 39161e423a8fSmrg dnl expand the accumulated commands and init code now: 39171e423a8fSmrg [AC_CONFIG_COMMANDS([libtool], 39181e423a8fSmrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 39191e423a8fSmrg])#_LT_CONFIG_COMMANDS 3920fe5e51b7Smrg 3921fe5e51b7Smrg 39221e423a8fSmrg# Initialize. 39231e423a8fSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 39241e423a8fSmrg[ 3925fe5e51b7Smrg 39261e423a8fSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 39271e423a8fSmrg# if CDPATH is set. 39281e423a8fSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 3929fe5e51b7Smrg 39301e423a8fSmrgsed_quote_subst='$sed_quote_subst' 39311e423a8fSmrgdouble_quote_subst='$double_quote_subst' 39321e423a8fSmrgdelay_variable_subst='$delay_variable_subst' 39331e423a8fSmrg_LT_CONFIG_STATUS_DECLARATIONS 39341e423a8fSmrgLTCC='$LTCC' 39351e423a8fSmrgLTCFLAGS='$LTCFLAGS' 39361e423a8fSmrgcompiler='$compiler_DEFAULT' 3937fe5e51b7Smrg 39381e423a8fSmrg# A function that is used when there is no print builtin or printf. 39391e423a8fSmrgfunc_fallback_echo () 39401e423a8fSmrg{ 39411e423a8fSmrg eval 'cat <<_LTECHO_EOF 39421e423a8fSmrg\$[]1 39431e423a8fSmrg_LTECHO_EOF' 3944a31a186aSmrg} 3945643b027fSmrg 39461e423a8fSmrg# Quote evaled strings. 39471e423a8fSmrgfor var in lt_decl_all_varnames([[ \ 39481e423a8fSmrg]], lt_decl_quote_varnames); do 39491e423a8fSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 39501e423a8fSmrg *[[\\\\\\\`\\"\\\$]]*) 39511e423a8fSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 39521e423a8fSmrg ;; 39531e423a8fSmrg *) 39541e423a8fSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 39551e423a8fSmrg ;; 39561e423a8fSmrg esac 39571e423a8fSmrgdone 3958643b027fSmrg 39591e423a8fSmrg# Double-quote double-evaled strings. 39601e423a8fSmrgfor var in lt_decl_all_varnames([[ \ 39611e423a8fSmrg]], lt_decl_dquote_varnames); do 39621e423a8fSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 39631e423a8fSmrg *[[\\\\\\\`\\"\\\$]]*) 39641e423a8fSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 39651e423a8fSmrg ;; 39661e423a8fSmrg *) 39671e423a8fSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 39681e423a8fSmrg ;; 39691e423a8fSmrg esac 39701e423a8fSmrgdone 39710bb88ba4Smrg 39721e423a8fSmrg_LT_OUTPUT_LIBTOOL_INIT 39731e423a8fSmrg]) 3974643b027fSmrg 39751e423a8fSmrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 39761e423a8fSmrg# ------------------------------------ 39771e423a8fSmrg# Generate a child script FILE with all initialization necessary to 39781e423a8fSmrg# reuse the environment learned by the parent script, and make the 39791e423a8fSmrg# file executable. If COMMENT is supplied, it is inserted after the 39801e423a8fSmrg# '#!' sequence but before initialization text begins. After this 39811e423a8fSmrg# macro, additional text can be appended to FILE to form the body of 39821e423a8fSmrg# the child script. The macro ends with non-zero status if the 39831e423a8fSmrg# file could not be fully written (such as if the disk is full). 39841e423a8fSmrgm4_ifdef([AS_INIT_GENERATED], 39851e423a8fSmrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 39861e423a8fSmrg[m4_defun([_LT_GENERATED_FILE_INIT], 39871e423a8fSmrg[m4_require([AS_PREPARE])]dnl 39881e423a8fSmrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 39891e423a8fSmrg[lt_write_fail=0 39901e423a8fSmrgcat >$1 <<_ASEOF || lt_write_fail=1 39911e423a8fSmrg#! $SHELL 39921e423a8fSmrg# Generated by $as_me. 39931e423a8fSmrg$2 39941e423a8fSmrgSHELL=\${CONFIG_SHELL-$SHELL} 39951e423a8fSmrgexport SHELL 39961e423a8fSmrg_ASEOF 39971e423a8fSmrgcat >>$1 <<\_ASEOF || lt_write_fail=1 39981e423a8fSmrgAS_SHELL_SANITIZE 39991e423a8fSmrg_AS_PREPARE 40001e423a8fSmrgexec AS_MESSAGE_FD>&1 40011e423a8fSmrg_ASEOF 40021e423a8fSmrgtest 0 = "$lt_write_fail" && chmod +x $1[]dnl 40031e423a8fSmrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 4004643b027fSmrg 40051e423a8fSmrg# LT_OUTPUT 40061e423a8fSmrg# --------- 40071e423a8fSmrg# This macro allows early generation of the libtool script (before 40081e423a8fSmrg# AC_OUTPUT is called), incase it is used in configure for compilation 40091e423a8fSmrg# tests. 40101e423a8fSmrgAC_DEFUN([LT_OUTPUT], 40111e423a8fSmrg[: ${CONFIG_LT=./config.lt} 40121e423a8fSmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 40131e423a8fSmrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 40141e423a8fSmrg[# Run this file to recreate a libtool stub with the current configuration.]) 4015643b027fSmrg 40161e423a8fSmrgcat >>"$CONFIG_LT" <<\_LTEOF 40171e423a8fSmrglt_cl_silent=false 40181e423a8fSmrgexec AS_MESSAGE_LOG_FD>>config.log 4019a31a186aSmrg{ 40201e423a8fSmrg echo 40211e423a8fSmrg AS_BOX([Running $as_me.]) 40221e423a8fSmrg} >&AS_MESSAGE_LOG_FD 4023643b027fSmrg 40241e423a8fSmrglt_cl_help="\ 40251e423a8fSmrg'$as_me' creates a local libtool stub from the current configuration, 40261e423a8fSmrgfor use in further configure time tests before the real libtool is 40271e423a8fSmrggenerated. 4028643b027fSmrg 40291e423a8fSmrgUsage: $[0] [[OPTIONS]] 4030fe5e51b7Smrg 40311e423a8fSmrg -h, --help print this help, then exit 40321e423a8fSmrg -V, --version print version number, then exit 40331e423a8fSmrg -q, --quiet do not print progress messages 40341e423a8fSmrg -d, --debug don't remove temporary files 4035fe5e51b7Smrg 40361e423a8fSmrgReport bugs to <bug-libtool@gnu.org>." 40370bb88ba4Smrg 40381e423a8fSmrglt_cl_version="\ 40391e423a8fSmrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 40401e423a8fSmrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 40411e423a8fSmrgconfigured by $[0], generated by m4_PACKAGE_STRING. 4042fe5e51b7Smrg 40431e423a8fSmrgCopyright (C) 2011 Free Software Foundation, Inc. 40441e423a8fSmrgThis config.lt script is free software; the Free Software Foundation 40451e423a8fSmrggives unlimited permision to copy, distribute and modify it." 4046fe5e51b7Smrg 40471e423a8fSmrgwhile test 0 != $[#] 40481e423a8fSmrgdo 40491e423a8fSmrg case $[1] in 40501e423a8fSmrg --version | --v* | -V ) 40511e423a8fSmrg echo "$lt_cl_version"; exit 0 ;; 40521e423a8fSmrg --help | --h* | -h ) 40531e423a8fSmrg echo "$lt_cl_help"; exit 0 ;; 40541e423a8fSmrg --debug | --d* | -d ) 40551e423a8fSmrg debug=: ;; 40561e423a8fSmrg --quiet | --q* | --silent | --s* | -q ) 40571e423a8fSmrg lt_cl_silent=: ;; 4058fe5e51b7Smrg 40591e423a8fSmrg -*) AC_MSG_ERROR([unrecognized option: $[1] 40601e423a8fSmrgTry '$[0] --help' for more information.]) ;; 4061643b027fSmrg 40621e423a8fSmrg *) AC_MSG_ERROR([unrecognized argument: $[1] 40631e423a8fSmrgTry '$[0] --help' for more information.]) ;; 40641e423a8fSmrg esac 40651e423a8fSmrg shift 40661e423a8fSmrgdone 4067fe5e51b7Smrg 40681e423a8fSmrgif $lt_cl_silent; then 40691e423a8fSmrg exec AS_MESSAGE_FD>/dev/null 40701e423a8fSmrgfi 40711e423a8fSmrg_LTEOF 4072eda3803bSmrg 40731e423a8fSmrgcat >>"$CONFIG_LT" <<_LTEOF 40741e423a8fSmrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 40751e423a8fSmrg_LTEOF 4076a31a186aSmrg 40771e423a8fSmrgcat >>"$CONFIG_LT" <<\_LTEOF 40781e423a8fSmrgAC_MSG_NOTICE([creating $ofile]) 40791e423a8fSmrg_LT_OUTPUT_LIBTOOL_COMMANDS 40801e423a8fSmrgAS_EXIT(0) 40811e423a8fSmrg_LTEOF 40821e423a8fSmrgchmod +x "$CONFIG_LT" 4083a31a186aSmrg 40841e423a8fSmrg# configure is writing to config.log, but config.lt does its own redirection, 40851e423a8fSmrg# appending to config.log, which fails on DOS, as config.log is still kept 40861e423a8fSmrg# open by configure. Here we exec the FD to /dev/null, effectively closing 40871e423a8fSmrg# config.log, so it can be properly (re)opened and appended to by config.lt. 40881e423a8fSmrglt_cl_success=: 40891e423a8fSmrgtest yes = "$silent" && 40901e423a8fSmrg lt_config_lt_args="$lt_config_lt_args --quiet" 40911e423a8fSmrgexec AS_MESSAGE_LOG_FD>/dev/null 40921e423a8fSmrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 40931e423a8fSmrgexec AS_MESSAGE_LOG_FD>>config.log 40941e423a8fSmrg$lt_cl_success || AS_EXIT(1) 40951e423a8fSmrg])# LT_OUTPUT 4096a31a186aSmrg 4097a31a186aSmrg 40981e423a8fSmrg# _LT_CONFIG(TAG) 40991e423a8fSmrg# --------------- 41001e423a8fSmrg# If TAG is the built-in tag, create an initial libtool script with a 41011e423a8fSmrg# default configuration from the untagged config vars. Otherwise add code 41021e423a8fSmrg# to config.status for appending the configuration named by TAG from the 41031e423a8fSmrg# matching tagged config vars. 41041e423a8fSmrgm4_defun([_LT_CONFIG], 41051e423a8fSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 41061e423a8fSmrg_LT_CONFIG_SAVE_COMMANDS([ 41071e423a8fSmrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 41081e423a8fSmrg m4_if(_LT_TAG, [C], [ 41091e423a8fSmrg # See if we are running on zsh, and set the options that allow our 41101e423a8fSmrg # commands through without removal of \ escapes. 41111e423a8fSmrg if test -n "${ZSH_VERSION+set}"; then 41121e423a8fSmrg setopt NO_GLOB_SUBST 41131e423a8fSmrg fi 4114a31a186aSmrg 41151e423a8fSmrg cfgfile=${ofile}T 41161e423a8fSmrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 41171e423a8fSmrg $RM "$cfgfile" 4118a31a186aSmrg 41191e423a8fSmrg cat <<_LT_EOF >> "$cfgfile" 41201e423a8fSmrg#! $SHELL 41211e423a8fSmrg# Generated automatically by $as_me ($PACKAGE) $VERSION 41221e423a8fSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 41231e423a8fSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 41240bb88ba4Smrg 41251e423a8fSmrg# Provide generalized library-building support services. 41261e423a8fSmrg# Written by Gordon Matzigkeit, 1996 4127a31a186aSmrg 41281e423a8fSmrg_LT_COPYING 41291e423a8fSmrg_LT_LIBTOOL_TAGS 4130a31a186aSmrg 41311e423a8fSmrg# Configured defaults for sys_lib_dlsearch_path munging. 41321e423a8fSmrg: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} 4133a31a186aSmrg 41341e423a8fSmrg# ### BEGIN LIBTOOL CONFIG 41351e423a8fSmrg_LT_LIBTOOL_CONFIG_VARS 41361e423a8fSmrg_LT_LIBTOOL_TAG_VARS 41371e423a8fSmrg# ### END LIBTOOL CONFIG 4138a31a186aSmrg 41391e423a8fSmrg_LT_EOF 4140a31a186aSmrg 41411e423a8fSmrg cat <<'_LT_EOF' >> "$cfgfile" 41420bb88ba4Smrg 41431e423a8fSmrg# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE 4144a31a186aSmrg 41451e423a8fSmrg_LT_PREPARE_MUNGE_PATH_LIST 41461e423a8fSmrg_LT_PREPARE_CC_BASENAME 4147a31a186aSmrg 41481e423a8fSmrg# ### END FUNCTIONS SHARED WITH CONFIGURE 4149fe5e51b7Smrg 41501e423a8fSmrg_LT_EOF 4151fe5e51b7Smrg 41521e423a8fSmrg case $host_os in 41531e423a8fSmrg aix3*) 41541e423a8fSmrg cat <<\_LT_EOF >> "$cfgfile" 41551e423a8fSmrg# AIX sometimes has problems with the GCC collect2 program. For some 41561e423a8fSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems 41571e423a8fSmrg# vanish in a puff of smoke. 41581e423a8fSmrgif test set != "${COLLECT_NAMES+set}"; then 41591e423a8fSmrg COLLECT_NAMES= 41601e423a8fSmrg export COLLECT_NAMES 41611e423a8fSmrgfi 41621e423a8fSmrg_LT_EOF 41631e423a8fSmrg ;; 41641e423a8fSmrg esac 4165fe5e51b7Smrg 41661e423a8fSmrg _LT_PROG_LTMAIN 4167fe5e51b7Smrg 41681e423a8fSmrg # We use sed instead of cat because bash on DJGPP gets confused if 41691e423a8fSmrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 41701e423a8fSmrg # text mode, it properly converts lines to CR/LF. This bash problem 41711e423a8fSmrg # is reportedly fixed, but why not run on old versions too? 41721e423a8fSmrg $SED '$q' "$ltmain" >> "$cfgfile" \ 41731e423a8fSmrg || (rm -f "$cfgfile"; exit 1) 4174fe5e51b7Smrg 41751e423a8fSmrg mv -f "$cfgfile" "$ofile" || 41761e423a8fSmrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 41771e423a8fSmrg chmod +x "$ofile" 41781e423a8fSmrg], 41791e423a8fSmrg[cat <<_LT_EOF >> "$ofile" 4180fe5e51b7Smrg 41811e423a8fSmrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 41821e423a8fSmrgdnl in a comment (ie after a #). 41831e423a8fSmrg# ### BEGIN LIBTOOL TAG CONFIG: $1 41841e423a8fSmrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 41851e423a8fSmrg# ### END LIBTOOL TAG CONFIG: $1 41861e423a8fSmrg_LT_EOF 41871e423a8fSmrg])dnl /m4_if 41881e423a8fSmrg], 41891e423a8fSmrg[m4_if([$1], [], [ 41901e423a8fSmrg PACKAGE='$PACKAGE' 41911e423a8fSmrg VERSION='$VERSION' 41921e423a8fSmrg RM='$RM' 41931e423a8fSmrg ofile='$ofile'], []) 41941e423a8fSmrg])dnl /_LT_CONFIG_SAVE_COMMANDS 41951e423a8fSmrg])# _LT_CONFIG 4196fe5e51b7Smrg 4197fe5e51b7Smrg 41981e423a8fSmrg# LT_SUPPORTED_TAG(TAG) 41991e423a8fSmrg# --------------------- 42001e423a8fSmrg# Trace this macro to discover what tags are supported by the libtool 42011e423a8fSmrg# --tag option, using: 42021e423a8fSmrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 42031e423a8fSmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 4204fe5e51b7Smrg 4205fe5e51b7Smrg 42061e423a8fSmrg# C support is built-in for now 42071e423a8fSmrgm4_define([_LT_LANG_C_enabled], []) 42081e423a8fSmrgm4_define([_LT_TAGS], []) 4209fe5e51b7Smrg 4210643b027fSmrg 42111e423a8fSmrg# LT_LANG(LANG) 42121e423a8fSmrg# ------------- 42131e423a8fSmrg# Enable libtool support for the given language if not already enabled. 42141e423a8fSmrgAC_DEFUN([LT_LANG], 42151e423a8fSmrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 42161e423a8fSmrgm4_case([$1], 42171e423a8fSmrg [C], [_LT_LANG(C)], 42181e423a8fSmrg [C++], [_LT_LANG(CXX)], 42191e423a8fSmrg [Go], [_LT_LANG(GO)], 42201e423a8fSmrg [Java], [_LT_LANG(GCJ)], 42211e423a8fSmrg [Fortran 77], [_LT_LANG(F77)], 42221e423a8fSmrg [Fortran], [_LT_LANG(FC)], 42231e423a8fSmrg [Windows Resource], [_LT_LANG(RC)], 42241e423a8fSmrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 42251e423a8fSmrg [_LT_LANG($1)], 42261e423a8fSmrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 42271e423a8fSmrg])# LT_LANG 4228fe5e51b7Smrg 4229a31a186aSmrg 42301e423a8fSmrg# _LT_LANG(LANGNAME) 42311e423a8fSmrg# ------------------ 42321e423a8fSmrgm4_defun([_LT_LANG], 42331e423a8fSmrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 42341e423a8fSmrg [LT_SUPPORTED_TAG([$1])dnl 42351e423a8fSmrg m4_append([_LT_TAGS], [$1 ])dnl 42361e423a8fSmrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 42371e423a8fSmrg _LT_LANG_$1_CONFIG($1)])dnl 42381e423a8fSmrg])# _LT_LANG 42390bb88ba4Smrg 4240fe5e51b7Smrg 42411e423a8fSmrgm4_ifndef([AC_PROG_GO], [ 42421e423a8fSmrg# NOTE: This macro has been submitted for inclusion into # 42431e423a8fSmrg# GNU Autoconf as AC_PROG_GO. When it is available in # 42441e423a8fSmrg# a released version of Autoconf we should remove this # 42451e423a8fSmrg# macro and use it instead. # 42461e423a8fSmrgm4_defun([AC_PROG_GO], 42471e423a8fSmrg[AC_LANG_PUSH(Go)dnl 42481e423a8fSmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 42491e423a8fSmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 42501e423a8fSmrg_AC_ARG_VAR_LDFLAGS()dnl 42511e423a8fSmrgAC_CHECK_TOOL(GOC, gccgo) 42521e423a8fSmrgif test -z "$GOC"; then 42531e423a8fSmrg if test -n "$ac_tool_prefix"; then 42541e423a8fSmrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 42551e423a8fSmrg fi 4256fe5e51b7Smrgfi 42571e423a8fSmrgif test -z "$GOC"; then 42581e423a8fSmrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 42591e423a8fSmrgfi 42601e423a8fSmrg])#m4_defun 42611e423a8fSmrg])#m4_ifndef 4262fe5e51b7Smrg 4263fe5e51b7Smrg 42641e423a8fSmrg# _LT_LANG_DEFAULT_CONFIG 42651e423a8fSmrg# ----------------------- 42661e423a8fSmrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 42671e423a8fSmrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 42681e423a8fSmrg [LT_LANG(CXX)], 42691e423a8fSmrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 4270643b027fSmrg 42711e423a8fSmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 42721e423a8fSmrg [LT_LANG(F77)], 42731e423a8fSmrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 4274fe5e51b7Smrg 42751e423a8fSmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 42761e423a8fSmrg [LT_LANG(FC)], 42771e423a8fSmrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 4278fe5e51b7Smrg 42791e423a8fSmrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 42801e423a8fSmrgdnl pulling things in needlessly. 42811e423a8fSmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 42821e423a8fSmrg [LT_LANG(GCJ)], 42831e423a8fSmrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 42841e423a8fSmrg [LT_LANG(GCJ)], 42851e423a8fSmrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 42861e423a8fSmrg [LT_LANG(GCJ)], 42871e423a8fSmrg [m4_ifdef([AC_PROG_GCJ], 42881e423a8fSmrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 42891e423a8fSmrg m4_ifdef([A][M_PROG_GCJ], 42901e423a8fSmrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 42911e423a8fSmrg m4_ifdef([LT_PROG_GCJ], 42921e423a8fSmrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 42930bb88ba4Smrg 42941e423a8fSmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 42951e423a8fSmrg [LT_LANG(GO)], 42961e423a8fSmrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 42970bb88ba4Smrg 42981e423a8fSmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 42991e423a8fSmrg [LT_LANG(RC)], 43001e423a8fSmrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 43011e423a8fSmrg])# _LT_LANG_DEFAULT_CONFIG 4302fe5e51b7Smrg 43031e423a8fSmrg# Obsolete macros: 43041e423a8fSmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 43051e423a8fSmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 43061e423a8fSmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 43071e423a8fSmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 43081e423a8fSmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 43091e423a8fSmrgdnl aclocal-1.4 backwards compatibility: 43101e423a8fSmrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 43111e423a8fSmrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 43121e423a8fSmrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 43131e423a8fSmrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 43141e423a8fSmrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 4315fe5e51b7Smrg 4316fe5e51b7Smrg 43171e423a8fSmrg# _LT_TAG_COMPILER 43181e423a8fSmrg# ---------------- 43191e423a8fSmrgm4_defun([_LT_TAG_COMPILER], 43201e423a8fSmrg[AC_REQUIRE([AC_PROG_CC])dnl 4321fe5e51b7Smrg 43221e423a8fSmrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 43231e423a8fSmrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 43241e423a8fSmrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 43251e423a8fSmrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 4326fe5e51b7Smrg 43271e423a8fSmrg# If no C compiler was specified, use CC. 43281e423a8fSmrgLTCC=${LTCC-"$CC"} 4329fe5e51b7Smrg 43301e423a8fSmrg# If no C compiler flags were specified, use CFLAGS. 43311e423a8fSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 4332a31a186aSmrg 43331e423a8fSmrg# Allow CC to be a program name with arguments. 43341e423a8fSmrgcompiler=$CC 43351e423a8fSmrg])# _LT_TAG_COMPILER 4336fe5e51b7Smrg 43370bb88ba4Smrg 43381e423a8fSmrg# _LT_COMPILER_BOILERPLATE 43391e423a8fSmrg# ------------------------ 43401e423a8fSmrg# Check for compiler boilerplate output or warnings with 43411e423a8fSmrg# the simple compiler test code. 43421e423a8fSmrgm4_defun([_LT_COMPILER_BOILERPLATE], 43431e423a8fSmrg[m4_require([_LT_DECL_SED])dnl 43441e423a8fSmrgac_outfile=conftest.$ac_objext 43451e423a8fSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 43461e423a8fSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 43471e423a8fSmrg_lt_compiler_boilerplate=`cat conftest.err` 43481e423a8fSmrg$RM conftest* 43491e423a8fSmrg])# _LT_COMPILER_BOILERPLATE 4350493f84f4Smrg 4351fe5e51b7Smrg 43521e423a8fSmrg# _LT_LINKER_BOILERPLATE 43531e423a8fSmrg# ---------------------- 43541e423a8fSmrg# Check for linker boilerplate output or warnings with 43551e423a8fSmrg# the simple link test code. 43561e423a8fSmrgm4_defun([_LT_LINKER_BOILERPLATE], 43571e423a8fSmrg[m4_require([_LT_DECL_SED])dnl 43581e423a8fSmrgac_outfile=conftest.$ac_objext 43591e423a8fSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 43601e423a8fSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 43611e423a8fSmrg_lt_linker_boilerplate=`cat conftest.err` 43621e423a8fSmrg$RM -r conftest* 43631e423a8fSmrg])# _LT_LINKER_BOILERPLATE 4364fe5e51b7Smrg 43651e423a8fSmrg# _LT_REQUIRED_DARWIN_CHECKS 43661e423a8fSmrg# ------------------------- 43671e423a8fSmrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 43681e423a8fSmrg case $host_os in 43691e423a8fSmrg rhapsody* | darwin*) 43701e423a8fSmrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 43711e423a8fSmrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 43721e423a8fSmrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 43731e423a8fSmrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 43741e423a8fSmrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 43751e423a8fSmrg _LT_DECL([], [DSYMUTIL], [1], 43761e423a8fSmrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 43771e423a8fSmrg _LT_DECL([], [NMEDIT], [1], 43781e423a8fSmrg [Tool to change global to local symbols on Mac OS X]) 43791e423a8fSmrg _LT_DECL([], [LIPO], [1], 43801e423a8fSmrg [Tool to manipulate fat objects and archives on Mac OS X]) 43811e423a8fSmrg _LT_DECL([], [OTOOL], [1], 43821e423a8fSmrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 43831e423a8fSmrg _LT_DECL([], [OTOOL64], [1], 43841e423a8fSmrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 4385fe5e51b7Smrg 43861e423a8fSmrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 43871e423a8fSmrg [lt_cv_apple_cc_single_mod=no 43881e423a8fSmrg if test -z "$LT_MULTI_MODULE"; then 43891e423a8fSmrg # By default we will add the -single_module flag. You can override 43901e423a8fSmrg # by either setting the environment variable LT_MULTI_MODULE 43911e423a8fSmrg # non-empty at configure time, or by adding -multi_module to the 43921e423a8fSmrg # link flags. 43931e423a8fSmrg rm -rf libconftest.dylib* 43941e423a8fSmrg echo "int foo(void){return 1;}" > conftest.c 43951e423a8fSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 43961e423a8fSmrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 43971e423a8fSmrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 43981e423a8fSmrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 43991e423a8fSmrg _lt_result=$? 44001e423a8fSmrg # If there is a non-empty error log, and "single_module" 44011e423a8fSmrg # appears in it, assume the flag caused a linker warning 44021e423a8fSmrg if test -s conftest.err && $GREP single_module conftest.err; then 44031e423a8fSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 44041e423a8fSmrg # Otherwise, if the output was created with a 0 exit code from 44051e423a8fSmrg # the compiler, it worked. 44061e423a8fSmrg elif test -f libconftest.dylib && test 0 = "$_lt_result"; then 44071e423a8fSmrg lt_cv_apple_cc_single_mod=yes 44081e423a8fSmrg else 44091e423a8fSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 44101e423a8fSmrg fi 44111e423a8fSmrg rm -rf libconftest.dylib* 44121e423a8fSmrg rm -f conftest.* 44131e423a8fSmrg fi]) 4414fe5e51b7Smrg 44151e423a8fSmrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 44161e423a8fSmrg [lt_cv_ld_exported_symbols_list], 44171e423a8fSmrg [lt_cv_ld_exported_symbols_list=no 44181e423a8fSmrg save_LDFLAGS=$LDFLAGS 44191e423a8fSmrg echo "_main" > conftest.sym 44201e423a8fSmrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 44211e423a8fSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 44221e423a8fSmrg [lt_cv_ld_exported_symbols_list=yes], 44231e423a8fSmrg [lt_cv_ld_exported_symbols_list=no]) 44241e423a8fSmrg LDFLAGS=$save_LDFLAGS 44251e423a8fSmrg ]) 4426fe5e51b7Smrg 44271e423a8fSmrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 44281e423a8fSmrg [lt_cv_ld_force_load=no 44291e423a8fSmrg cat > conftest.c << _LT_EOF 44301e423a8fSmrgint forced_loaded() { return 2;} 4431a31a186aSmrg_LT_EOF 44321e423a8fSmrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 44331e423a8fSmrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 44341e423a8fSmrg echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 44351e423a8fSmrg $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 44361e423a8fSmrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 44371e423a8fSmrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 44381e423a8fSmrg cat > conftest.c << _LT_EOF 44391e423a8fSmrgint main() { return 0;} 44401e423a8fSmrg_LT_EOF 44411e423a8fSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 44421e423a8fSmrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 44431e423a8fSmrg _lt_result=$? 44441e423a8fSmrg if test -s conftest.err && $GREP force_load conftest.err; then 44451e423a8fSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 44461e423a8fSmrg elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then 44471e423a8fSmrg lt_cv_ld_force_load=yes 4448a31a186aSmrg else 44491e423a8fSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 4450a31a186aSmrg fi 44511e423a8fSmrg rm -f conftest.err libconftest.a conftest conftest.c 44521e423a8fSmrg rm -rf conftest.dSYM 44531e423a8fSmrg ]) 44541e423a8fSmrg case $host_os in 44551e423a8fSmrg rhapsody* | darwin1.[[012]]) 44561e423a8fSmrg _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; 44571e423a8fSmrg darwin1.*) 44581e423a8fSmrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 44591e423a8fSmrg darwin*) 44601e423a8fSmrg case $MACOSX_DEPLOYMENT_TARGET,$host in 44611e423a8fSmrg 10.[[012]],*|,*powerpc*-darwin[[5-8]]*) 44621e423a8fSmrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 44631e423a8fSmrg *) 44641e423a8fSmrg _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 44651e423a8fSmrg esac 44661e423a8fSmrg ;; 44671e423a8fSmrg esac 44681e423a8fSmrg if test yes = "$lt_cv_apple_cc_single_mod"; then 44691e423a8fSmrg _lt_dar_single_mod='$single_module' 44701e423a8fSmrg fi 44711e423a8fSmrg if test yes = "$lt_cv_ld_exported_symbols_list"; then 44721e423a8fSmrg _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' 44731e423a8fSmrg else 44741e423a8fSmrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' 44751e423a8fSmrg fi 44761e423a8fSmrg if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then 44771e423a8fSmrg _lt_dsymutil='~$DSYMUTIL $lib || :' 44781e423a8fSmrg else 44791e423a8fSmrg _lt_dsymutil= 44801e423a8fSmrg fi 44811e423a8fSmrg ;; 44821e423a8fSmrg esac 44831e423a8fSmrg]) 4484fe5e51b7Smrg 4485fe5e51b7Smrg 44861e423a8fSmrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 44871e423a8fSmrg# --------------------------------- 44881e423a8fSmrg# Checks for linker and compiler features on darwin 44891e423a8fSmrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 44901e423a8fSmrg[ 44911e423a8fSmrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 44921e423a8fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 44931e423a8fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 44941e423a8fSmrg _LT_TAGVAR(hardcode_automatic, $1)=yes 44951e423a8fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 44961e423a8fSmrg if test yes = "$lt_cv_ld_force_load"; then 44971e423a8fSmrg _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\"`' 44981e423a8fSmrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 44991e423a8fSmrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 45001e423a8fSmrg else 45011e423a8fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 45021e423a8fSmrg fi 45031e423a8fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 45041e423a8fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined 45051e423a8fSmrg case $cc_basename in 45061e423a8fSmrg ifort*|nagfor*) _lt_dar_can_shared=yes ;; 45071e423a8fSmrg *) _lt_dar_can_shared=$GCC ;; 45081e423a8fSmrg esac 45091e423a8fSmrg if test yes = "$_lt_dar_can_shared"; then 45101e423a8fSmrg output_verbose_link_cmd=func_echo_all 45111e423a8fSmrg _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" 45121e423a8fSmrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" 45131e423a8fSmrg _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" 45141e423a8fSmrg _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" 45151e423a8fSmrg m4_if([$1], [CXX], 45161e423a8fSmrg[ if test yes != "$lt_cv_apple_cc_single_mod"; then 45171e423a8fSmrg _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" 45181e423a8fSmrg _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" 45191e423a8fSmrg fi 45201e423a8fSmrg],[]) 45211e423a8fSmrg else 45221e423a8fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 45231e423a8fSmrg fi 45241e423a8fSmrg]) 4525fe5e51b7Smrg 45261e423a8fSmrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 45271e423a8fSmrg# ---------------------------------- 45281e423a8fSmrg# Links a minimal program and checks the executable 45291e423a8fSmrg# for the system default hardcoded library path. In most cases, 45301e423a8fSmrg# this is /usr/lib:/lib, but when the MPI compilers are used 45311e423a8fSmrg# the location of the communication and MPI libs are included too. 45321e423a8fSmrg# If we don't find anything, use the default library path according 45331e423a8fSmrg# to the aix ld manual. 45341e423a8fSmrg# Store the results from the different compilers for each TAGNAME. 45351e423a8fSmrg# Allow to override them for all tags through lt_cv_aix_libpath. 45361e423a8fSmrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 45371e423a8fSmrg[m4_require([_LT_DECL_SED])dnl 45381e423a8fSmrgif test set = "${lt_cv_aix_libpath+set}"; then 45391e423a8fSmrg aix_libpath=$lt_cv_aix_libpath 45401e423a8fSmrgelse 45411e423a8fSmrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 45421e423a8fSmrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 45431e423a8fSmrg lt_aix_libpath_sed='[ 45441e423a8fSmrg /Import File Strings/,/^$/ { 45451e423a8fSmrg /^0/ { 45461e423a8fSmrg s/^0 *\([^ ]*\) *$/\1/ 45471e423a8fSmrg p 45481e423a8fSmrg } 45491e423a8fSmrg }]' 45501e423a8fSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 45511e423a8fSmrg # Check for a 64-bit object if we didn't find anything. 45521e423a8fSmrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 45531e423a8fSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 45541e423a8fSmrg fi],[]) 45551e423a8fSmrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 45561e423a8fSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib 45571e423a8fSmrg fi 45581e423a8fSmrg ]) 45591e423a8fSmrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 45601e423a8fSmrgfi 45611e423a8fSmrg])# _LT_SYS_MODULE_PATH_AIX 4562fe5e51b7Smrg 4563fe5e51b7Smrg 45641e423a8fSmrg# _LT_SHELL_INIT(ARG) 45651e423a8fSmrg# ------------------- 45661e423a8fSmrgm4_define([_LT_SHELL_INIT], 45671e423a8fSmrg[m4_divert_text([M4SH-INIT], [$1 45681e423a8fSmrg])])# _LT_SHELL_INIT 4569fe5e51b7Smrg 4570fe5e51b7Smrg 4571fe5e51b7Smrg 45721e423a8fSmrg# _LT_PROG_ECHO_BACKSLASH 45731e423a8fSmrg# ----------------------- 45741e423a8fSmrg# Find how we can fake an echo command that does not interpret backslash. 45751e423a8fSmrg# In particular, with Autoconf 2.60 or later we add some code to the start 45761e423a8fSmrg# of the generated configure script that will find a shell with a builtin 45771e423a8fSmrg# printf (that we can use as an echo command). 45781e423a8fSmrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 45791e423a8fSmrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 45801e423a8fSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 45811e423a8fSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 4582fe5e51b7Smrg 45831e423a8fSmrgAC_MSG_CHECKING([how to print strings]) 45841e423a8fSmrg# Test print first, because it will be a builtin if present. 45851e423a8fSmrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 45861e423a8fSmrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 45871e423a8fSmrg ECHO='print -r --' 45881e423a8fSmrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 45891e423a8fSmrg ECHO='printf %s\n' 45901e423a8fSmrgelse 45911e423a8fSmrg # Use this function as a fallback that always works. 45921e423a8fSmrg func_fallback_echo () 45931e423a8fSmrg { 45941e423a8fSmrg eval 'cat <<_LTECHO_EOF 45951e423a8fSmrg$[]1 45961e423a8fSmrg_LTECHO_EOF' 45971e423a8fSmrg } 45981e423a8fSmrg ECHO='func_fallback_echo' 45991e423a8fSmrgfi 4600fe5e51b7Smrg 46011e423a8fSmrg# func_echo_all arg... 46021e423a8fSmrg# Invoke $ECHO with all args, space-separated. 46031e423a8fSmrgfunc_echo_all () 46041e423a8fSmrg{ 46051e423a8fSmrg $ECHO "$*" 46061e423a8fSmrg} 4607a31a186aSmrg 46081e423a8fSmrgcase $ECHO in 46091e423a8fSmrg printf*) AC_MSG_RESULT([printf]) ;; 46101e423a8fSmrg print*) AC_MSG_RESULT([print -r]) ;; 46111e423a8fSmrg *) AC_MSG_RESULT([cat]) ;; 46121e423a8fSmrgesac 4613fe5e51b7Smrg 46141e423a8fSmrgm4_ifdef([_AS_DETECT_SUGGESTED], 46151e423a8fSmrg[_AS_DETECT_SUGGESTED([ 46161e423a8fSmrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 46171e423a8fSmrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 46181e423a8fSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 46191e423a8fSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 46201e423a8fSmrg PATH=/empty FPATH=/empty; export PATH FPATH 46211e423a8fSmrg test "X`printf %s $ECHO`" = "X$ECHO" \ 46221e423a8fSmrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 4623fe5e51b7Smrg 46241e423a8fSmrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 46251e423a8fSmrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 46261e423a8fSmrg])# _LT_PROG_ECHO_BACKSLASH 4627fe5e51b7Smrg 4628fe5e51b7Smrg 46291e423a8fSmrg# _LT_WITH_SYSROOT 46301e423a8fSmrg# ---------------- 46311e423a8fSmrgAC_DEFUN([_LT_WITH_SYSROOT], 46321e423a8fSmrg[m4_require([_LT_DECL_SED])dnl 46331e423a8fSmrgAC_MSG_CHECKING([for sysroot]) 46341e423a8fSmrgAC_ARG_WITH([sysroot], 46351e423a8fSmrg[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], 46361e423a8fSmrg [Search for dependent libraries within DIR (or the compiler's sysroot 46371e423a8fSmrg if not specified).])], 46381e423a8fSmrg[], [with_sysroot=no]) 4639fe5e51b7Smrg 46401e423a8fSmrgdnl lt_sysroot will always be passed unquoted. We quote it here 46411e423a8fSmrgdnl in case the user passed a directory name. 46421e423a8fSmrglt_sysroot= 46431e423a8fSmrgcase $with_sysroot in #( 46441e423a8fSmrg yes) 46451e423a8fSmrg if test yes = "$GCC"; then 46461e423a8fSmrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 46471e423a8fSmrg fi 46481e423a8fSmrg ;; #( 46491e423a8fSmrg /*) 46501e423a8fSmrg lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` 46511e423a8fSmrg ;; #( 46521e423a8fSmrg no|'') 46531e423a8fSmrg ;; #( 46541e423a8fSmrg *) 46551e423a8fSmrg AC_MSG_RESULT([$with_sysroot]) 46561e423a8fSmrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 46571e423a8fSmrg ;; 46581e423a8fSmrgesac 4659fe5e51b7Smrg 46601e423a8fSmrg AC_MSG_RESULT([${lt_sysroot:-no}]) 46611e423a8fSmrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 46621e423a8fSmrg[dependent libraries, and where our libraries should be installed.])]) 4663fe5e51b7Smrg 46641e423a8fSmrg# _LT_ENABLE_LOCK 46651e423a8fSmrg# --------------- 46661e423a8fSmrgm4_defun([_LT_ENABLE_LOCK], 46671e423a8fSmrg[AC_ARG_ENABLE([libtool-lock], 46681e423a8fSmrg [AS_HELP_STRING([--disable-libtool-lock], 46691e423a8fSmrg [avoid locking (might break parallel builds)])]) 46701e423a8fSmrgtest no = "$enable_libtool_lock" || enable_libtool_lock=yes 4671fe5e51b7Smrg 46721e423a8fSmrg# Some flags need to be propagated to the compiler or linker for good 46731e423a8fSmrg# libtool support. 46741e423a8fSmrgcase $host in 46751e423a8fSmrgia64-*-hpux*) 46761e423a8fSmrg # Find out what ABI is being produced by ac_compile, and set mode 46771e423a8fSmrg # options accordingly. 46781e423a8fSmrg echo 'int i;' > conftest.$ac_ext 46791e423a8fSmrg if AC_TRY_EVAL(ac_compile); then 46801e423a8fSmrg case `$FILECMD conftest.$ac_objext` in 46811e423a8fSmrg *ELF-32*) 46821e423a8fSmrg HPUX_IA64_MODE=32 46831e423a8fSmrg ;; 46841e423a8fSmrg *ELF-64*) 46851e423a8fSmrg HPUX_IA64_MODE=64 46861e423a8fSmrg ;; 46871e423a8fSmrg esac 46881e423a8fSmrg fi 46891e423a8fSmrg rm -rf conftest* 46901e423a8fSmrg ;; 46911e423a8fSmrg*-*-irix6*) 46921e423a8fSmrg # Find out what ABI is being produced by ac_compile, and set linker 46931e423a8fSmrg # options accordingly. 46941e423a8fSmrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 46951e423a8fSmrg if AC_TRY_EVAL(ac_compile); then 46961e423a8fSmrg if test yes = "$lt_cv_prog_gnu_ld"; then 46971e423a8fSmrg case `$FILECMD conftest.$ac_objext` in 46981e423a8fSmrg *32-bit*) 46991e423a8fSmrg LD="${LD-ld} -melf32bsmip" 4700a31a186aSmrg ;; 47011e423a8fSmrg *N32*) 47021e423a8fSmrg LD="${LD-ld} -melf32bmipn32" 4703a31a186aSmrg ;; 47041e423a8fSmrg *64-bit*) 47051e423a8fSmrg LD="${LD-ld} -melf64bmip" 47061e423a8fSmrg ;; 47071e423a8fSmrg esac 47081e423a8fSmrg else 47091e423a8fSmrg case `$FILECMD conftest.$ac_objext` in 47101e423a8fSmrg *32-bit*) 47111e423a8fSmrg LD="${LD-ld} -32" 4712a31a186aSmrg ;; 47131e423a8fSmrg *N32*) 47141e423a8fSmrg LD="${LD-ld} -n32" 4715a31a186aSmrg ;; 47161e423a8fSmrg *64-bit*) 47171e423a8fSmrg LD="${LD-ld} -64" 4718a31a186aSmrg ;; 47191e423a8fSmrg esac 47201e423a8fSmrg fi 47211e423a8fSmrg fi 47221e423a8fSmrg rm -rf conftest* 47231e423a8fSmrg ;; 4724a31a186aSmrg 47251e423a8fSmrgmips64*-*linux*) 47261e423a8fSmrg # Find out what ABI is being produced by ac_compile, and set linker 47271e423a8fSmrg # options accordingly. 47281e423a8fSmrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 47291e423a8fSmrg if AC_TRY_EVAL(ac_compile); then 47301e423a8fSmrg emul=elf 47311e423a8fSmrg case `$FILECMD conftest.$ac_objext` in 47321e423a8fSmrg *32-bit*) 47331e423a8fSmrg emul="${emul}32" 47341e423a8fSmrg ;; 47351e423a8fSmrg *64-bit*) 47361e423a8fSmrg emul="${emul}64" 47371e423a8fSmrg ;; 47381e423a8fSmrg esac 47391e423a8fSmrg case `$FILECMD conftest.$ac_objext` in 47401e423a8fSmrg *MSB*) 47411e423a8fSmrg emul="${emul}btsmip" 47421e423a8fSmrg ;; 47431e423a8fSmrg *LSB*) 47441e423a8fSmrg emul="${emul}ltsmip" 47451e423a8fSmrg ;; 47461e423a8fSmrg esac 47471e423a8fSmrg case `$FILECMD conftest.$ac_objext` in 47481e423a8fSmrg *N32*) 47491e423a8fSmrg emul="${emul}n32" 47501e423a8fSmrg ;; 47511e423a8fSmrg esac 47521e423a8fSmrg LD="${LD-ld} -m $emul" 47531e423a8fSmrg fi 47541e423a8fSmrg rm -rf conftest* 47551e423a8fSmrg ;; 4756eda3803bSmrg 47571e423a8fSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 47581e423a8fSmrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 47591e423a8fSmrg # Find out what ABI is being produced by ac_compile, and set linker 47601e423a8fSmrg # options accordingly. Note that the listed cases only cover the 47611e423a8fSmrg # situations where additional linker options are needed (such as when 47621e423a8fSmrg # doing 32-bit compilation for a host where ld defaults to 64-bit, or 47631e423a8fSmrg # vice versa); the common cases where no linker options are needed do 47641e423a8fSmrg # not appear in the list. 47651e423a8fSmrg echo 'int i;' > conftest.$ac_ext 47661e423a8fSmrg if AC_TRY_EVAL(ac_compile); then 47671e423a8fSmrg case `$FILECMD conftest.o` in 47681e423a8fSmrg *32-bit*) 47691e423a8fSmrg case $host in 47701e423a8fSmrg x86_64-*kfreebsd*-gnu) 47711e423a8fSmrg LD="${LD-ld} -m elf_i386_fbsd" 47721e423a8fSmrg ;; 47731e423a8fSmrg x86_64-*linux*) 47741e423a8fSmrg case `$FILECMD conftest.o` in 47751e423a8fSmrg *x86-64*) 47761e423a8fSmrg LD="${LD-ld} -m elf32_x86_64" 47771e423a8fSmrg ;; 47781e423a8fSmrg *) 47791e423a8fSmrg LD="${LD-ld} -m elf_i386" 47801e423a8fSmrg ;; 47811e423a8fSmrg esac 47821e423a8fSmrg ;; 47831e423a8fSmrg powerpc64le-*linux*) 47841e423a8fSmrg LD="${LD-ld} -m elf32lppclinux" 47851e423a8fSmrg ;; 47861e423a8fSmrg powerpc64-*linux*) 47871e423a8fSmrg LD="${LD-ld} -m elf32ppclinux" 47881e423a8fSmrg ;; 47891e423a8fSmrg s390x-*linux*) 47901e423a8fSmrg LD="${LD-ld} -m elf_s390" 47911e423a8fSmrg ;; 47921e423a8fSmrg sparc64-*linux*) 47931e423a8fSmrg LD="${LD-ld} -m elf32_sparc" 47941e423a8fSmrg ;; 47951e423a8fSmrg esac 47961e423a8fSmrg ;; 47971e423a8fSmrg *64-bit*) 47981e423a8fSmrg case $host in 47991e423a8fSmrg x86_64-*kfreebsd*-gnu) 48001e423a8fSmrg LD="${LD-ld} -m elf_x86_64_fbsd" 48011e423a8fSmrg ;; 48021e423a8fSmrg x86_64-*linux*) 48031e423a8fSmrg LD="${LD-ld} -m elf_x86_64" 48041e423a8fSmrg ;; 48051e423a8fSmrg powerpcle-*linux*) 48061e423a8fSmrg LD="${LD-ld} -m elf64lppc" 48071e423a8fSmrg ;; 48081e423a8fSmrg powerpc-*linux*) 48091e423a8fSmrg LD="${LD-ld} -m elf64ppc" 48101e423a8fSmrg ;; 48111e423a8fSmrg s390*-*linux*|s390*-*tpf*) 48121e423a8fSmrg LD="${LD-ld} -m elf64_s390" 48131e423a8fSmrg ;; 48141e423a8fSmrg sparc*-*linux*) 48151e423a8fSmrg LD="${LD-ld} -m elf64_sparc" 48161e423a8fSmrg ;; 48171e423a8fSmrg esac 48181e423a8fSmrg ;; 48191e423a8fSmrg esac 48201e423a8fSmrg fi 48211e423a8fSmrg rm -rf conftest* 48221e423a8fSmrg ;; 48231e423a8fSmrg 48241e423a8fSmrg*-*-sco3.2v5*) 48251e423a8fSmrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 48261e423a8fSmrg SAVE_CFLAGS=$CFLAGS 48271e423a8fSmrg CFLAGS="$CFLAGS -belf" 48281e423a8fSmrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 48291e423a8fSmrg [AC_LANG_PUSH(C) 48301e423a8fSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 48311e423a8fSmrg AC_LANG_POP]) 48321e423a8fSmrg if test yes != "$lt_cv_cc_needs_belf"; then 48331e423a8fSmrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 48341e423a8fSmrg CFLAGS=$SAVE_CFLAGS 48351e423a8fSmrg fi 48361e423a8fSmrg ;; 48371e423a8fSmrg*-*solaris*) 48381e423a8fSmrg # Find out what ABI is being produced by ac_compile, and set linker 48391e423a8fSmrg # options accordingly. 48401e423a8fSmrg echo 'int i;' > conftest.$ac_ext 48411e423a8fSmrg if AC_TRY_EVAL(ac_compile); then 48421e423a8fSmrg case `$FILECMD conftest.o` in 48431e423a8fSmrg *64-bit*) 48441e423a8fSmrg case $lt_cv_prog_gnu_ld in 48451e423a8fSmrg yes*) 48461e423a8fSmrg case $host in 48471e423a8fSmrg i?86-*-solaris*|x86_64-*-solaris*) 48481e423a8fSmrg LD="${LD-ld} -m elf_x86_64" 48491e423a8fSmrg ;; 48501e423a8fSmrg sparc*-*-solaris*) 48511e423a8fSmrg LD="${LD-ld} -m elf64_sparc" 48521e423a8fSmrg ;; 48531e423a8fSmrg esac 48541e423a8fSmrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 48551e423a8fSmrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 48561e423a8fSmrg LD=${LD-ld}_sol2 48571e423a8fSmrg fi 48581e423a8fSmrg ;; 48591e423a8fSmrg *) 48601e423a8fSmrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 48611e423a8fSmrg LD="${LD-ld} -64" 48621e423a8fSmrg fi 4863493f84f4Smrg ;; 4864493f84f4Smrg esac 4865493f84f4Smrg ;; 48661e423a8fSmrg esac 48671e423a8fSmrg fi 48681e423a8fSmrg rm -rf conftest* 48691e423a8fSmrg ;; 48701e423a8fSmrgesac 4871493f84f4Smrg 48721e423a8fSmrgneed_locks=$enable_libtool_lock 48731e423a8fSmrg])# _LT_ENABLE_LOCK 4874fe5e51b7Smrg 4875fe5e51b7Smrg 48761e423a8fSmrg# _LT_PROG_AR 48771e423a8fSmrg# ----------- 48781e423a8fSmrgm4_defun([_LT_PROG_AR], 48791e423a8fSmrg[AC_CHECK_TOOLS(AR, [ar], false) 48801e423a8fSmrg: ${AR=ar} 48811e423a8fSmrg_LT_DECL([], [AR], [1], [The archiver]) 4882fe5e51b7Smrg 48831e423a8fSmrg# Use ARFLAGS variable as AR's operation code to sync the variable naming with 48841e423a8fSmrg# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have 48851e423a8fSmrg# higher priority because thats what people were doing historically (setting 48861e423a8fSmrg# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS 48871e423a8fSmrg# variable obsoleted/removed. 4888fe5e51b7Smrg 48891e423a8fSmrgtest ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} 48901e423a8fSmrglt_ar_flags=$AR_FLAGS 48911e423a8fSmrg_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)]) 4892fe5e51b7Smrg 48931e423a8fSmrg# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override 48941e423a8fSmrg# by AR_FLAGS because that was never working and AR_FLAGS is about to die. 48951e423a8fSmrg_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}], 48961e423a8fSmrg [Flags to create an archive]) 4897fe5e51b7Smrg 48981e423a8fSmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 48991e423a8fSmrg [lt_cv_ar_at_file=no 49001e423a8fSmrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 49011e423a8fSmrg [echo conftest.$ac_objext > conftest.lst 49021e423a8fSmrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 49031e423a8fSmrg AC_TRY_EVAL([lt_ar_try]) 49041e423a8fSmrg if test 0 -eq "$ac_status"; then 49051e423a8fSmrg # Ensure the archiver fails upon bogus file names. 49061e423a8fSmrg rm -f conftest.$ac_objext libconftest.a 49071e423a8fSmrg AC_TRY_EVAL([lt_ar_try]) 49081e423a8fSmrg if test 0 -ne "$ac_status"; then 49091e423a8fSmrg lt_cv_ar_at_file=@ 49101e423a8fSmrg fi 4911a31a186aSmrg fi 49121e423a8fSmrg rm -f conftest.* libconftest.a 49131e423a8fSmrg ]) 49141e423a8fSmrg ]) 4915fe5e51b7Smrg 49161e423a8fSmrgif test no = "$lt_cv_ar_at_file"; then 49171e423a8fSmrg archiver_list_spec= 49181e423a8fSmrgelse 49191e423a8fSmrg archiver_list_spec=$lt_cv_ar_at_file 49201e423a8fSmrgfi 49211e423a8fSmrg_LT_DECL([], [archiver_list_spec], [1], 49221e423a8fSmrg [How to feed a file listing to the archiver]) 49231e423a8fSmrg])# _LT_PROG_AR 4924fe5e51b7Smrg 4925fe5e51b7Smrg 49261e423a8fSmrg# _LT_CMD_OLD_ARCHIVE 49271e423a8fSmrg# ------------------- 49281e423a8fSmrgm4_defun([_LT_CMD_OLD_ARCHIVE], 49291e423a8fSmrg[_LT_PROG_AR 4930fe5e51b7Smrg 49311e423a8fSmrgAC_CHECK_TOOL(STRIP, strip, :) 49321e423a8fSmrgtest -z "$STRIP" && STRIP=: 49331e423a8fSmrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 4934fe5e51b7Smrg 49351e423a8fSmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 49361e423a8fSmrgtest -z "$RANLIB" && RANLIB=: 49371e423a8fSmrg_LT_DECL([], [RANLIB], [1], 49381e423a8fSmrg [Commands used to install an old-style archive]) 4939fe5e51b7Smrg 49401e423a8fSmrg# Determine commands to create old-style static archives. 49411e423a8fSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 49421e423a8fSmrgold_postinstall_cmds='chmod 644 $oldlib' 49431e423a8fSmrgold_postuninstall_cmds= 4944fe5e51b7Smrg 49451e423a8fSmrgif test -n "$RANLIB"; then 49461e423a8fSmrg case $host_os in 49471e423a8fSmrg bitrig* | openbsd*) 49481e423a8fSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 49491e423a8fSmrg ;; 49501e423a8fSmrg *) 49511e423a8fSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 49521e423a8fSmrg ;; 49531e423a8fSmrg esac 49541e423a8fSmrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 49551e423a8fSmrgfi 4956fe5e51b7Smrg 49571e423a8fSmrgcase $host_os in 49581e423a8fSmrg darwin*) 49591e423a8fSmrg lock_old_archive_extraction=yes ;; 49601e423a8fSmrg *) 49611e423a8fSmrg lock_old_archive_extraction=no ;; 49621e423a8fSmrgesac 49631e423a8fSmrg_LT_DECL([], [old_postinstall_cmds], [2]) 49641e423a8fSmrg_LT_DECL([], [old_postuninstall_cmds], [2]) 49651e423a8fSmrg_LT_TAGDECL([], [old_archive_cmds], [2], 49661e423a8fSmrg [Commands used to build an old-style archive]) 49671e423a8fSmrg_LT_DECL([], [lock_old_archive_extraction], [0], 49681e423a8fSmrg [Whether to use a lock for old archive extraction]) 49691e423a8fSmrg])# _LT_CMD_OLD_ARCHIVE 4970fe5e51b7Smrg 4971fe5e51b7Smrg 49721e423a8fSmrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 49731e423a8fSmrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 49741e423a8fSmrg# ---------------------------------------------------------------- 49751e423a8fSmrg# Check whether the given compiler option works 49761e423a8fSmrgAC_DEFUN([_LT_COMPILER_OPTION], 49771e423a8fSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 49781e423a8fSmrgm4_require([_LT_DECL_SED])dnl 49791e423a8fSmrgAC_CACHE_CHECK([$1], [$2], 49801e423a8fSmrg [$2=no 49811e423a8fSmrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 49821e423a8fSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 49831e423a8fSmrg lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment 49841e423a8fSmrg # Insert the option either (1) after the last *FLAGS variable, or 49851e423a8fSmrg # (2) before a word containing "conftest.", or (3) at the end. 49861e423a8fSmrg # Note that $ac_compile itself does not contain backslashes and begins 49871e423a8fSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 49881e423a8fSmrg # The option is referenced via a variable to avoid confusing sed. 49891e423a8fSmrg lt_compile=`echo "$ac_compile" | $SED \ 49901e423a8fSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 49911e423a8fSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 49921e423a8fSmrg -e 's:$: $lt_compiler_flag:'` 49931e423a8fSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 49941e423a8fSmrg (eval "$lt_compile" 2>conftest.err) 49951e423a8fSmrg ac_status=$? 49961e423a8fSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 49971e423a8fSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 49981e423a8fSmrg if (exit $ac_status) && test -s "$ac_outfile"; then 49991e423a8fSmrg # The compiler can only warn and ignore the option if not recognized 50001e423a8fSmrg # So say no if there are warnings other than the usual output. 50011e423a8fSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 50021e423a8fSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 50031e423a8fSmrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 50041e423a8fSmrg $2=yes 50051e423a8fSmrg fi 50061e423a8fSmrg fi 50071e423a8fSmrg $RM conftest* 5008a31a186aSmrg]) 5009fe5e51b7Smrg 50101e423a8fSmrgif test yes = "[$]$2"; then 50111e423a8fSmrg m4_if([$5], , :, [$5]) 50121e423a8fSmrgelse 50131e423a8fSmrg m4_if([$6], , :, [$6]) 50141e423a8fSmrgfi 50151e423a8fSmrg])# _LT_COMPILER_OPTION 5016fe5e51b7Smrg 50171e423a8fSmrg# Old name: 50181e423a8fSmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 50191e423a8fSmrgdnl aclocal-1.4 backwards compatibility: 50201e423a8fSmrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 50210bb88ba4Smrg 5022fe5e51b7Smrg 50231e423a8fSmrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 50241e423a8fSmrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 50251e423a8fSmrg# ---------------------------------------------------- 50261e423a8fSmrg# Check whether the given linker option works 50271e423a8fSmrgAC_DEFUN([_LT_LINKER_OPTION], 50281e423a8fSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 50291e423a8fSmrgm4_require([_LT_DECL_SED])dnl 50301e423a8fSmrgAC_CACHE_CHECK([$1], [$2], 50311e423a8fSmrg [$2=no 50321e423a8fSmrg save_LDFLAGS=$LDFLAGS 50331e423a8fSmrg LDFLAGS="$LDFLAGS $3" 50341e423a8fSmrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 50351e423a8fSmrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 50361e423a8fSmrg # The linker can only warn and ignore the option if not recognized 50371e423a8fSmrg # So say no if there are warnings 50381e423a8fSmrg if test -s conftest.err; then 50391e423a8fSmrg # Append any errors to the config.log. 50401e423a8fSmrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 50411e423a8fSmrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 50421e423a8fSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 50431e423a8fSmrg if diff conftest.exp conftest.er2 >/dev/null; then 50441e423a8fSmrg $2=yes 50451e423a8fSmrg fi 50461e423a8fSmrg else 50471e423a8fSmrg $2=yes 50481e423a8fSmrg fi 50491e423a8fSmrg fi 50501e423a8fSmrg $RM -r conftest* 50511e423a8fSmrg LDFLAGS=$save_LDFLAGS 50521e423a8fSmrg]) 5053a31a186aSmrg 50541e423a8fSmrgif test yes = "[$]$2"; then 50551e423a8fSmrg m4_if([$4], , :, [$4]) 50561e423a8fSmrgelse 50571e423a8fSmrg m4_if([$5], , :, [$5]) 50581e423a8fSmrgfi 50591e423a8fSmrg])# _LT_LINKER_OPTION 5060a31a186aSmrg 50611e423a8fSmrg# Old name: 50621e423a8fSmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 50631e423a8fSmrgdnl aclocal-1.4 backwards compatibility: 50641e423a8fSmrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 5065fe5e51b7Smrg 5066fe5e51b7Smrg 50671e423a8fSmrg# LT_CMD_MAX_LEN 50681e423a8fSmrg#--------------- 50691e423a8fSmrgAC_DEFUN([LT_CMD_MAX_LEN], 50701e423a8fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 50711e423a8fSmrg# find the maximum length of command line arguments 50721e423a8fSmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 50731e423a8fSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 50741e423a8fSmrg i=0 50751e423a8fSmrg teststring=ABCD 5076fe5e51b7Smrg 50771e423a8fSmrg case $build_os in 50781e423a8fSmrg msdosdjgpp*) 50791e423a8fSmrg # On DJGPP, this test can blow up pretty badly due to problems in libc 50801e423a8fSmrg # (any single argument exceeding 2000 bytes causes a buffer overrun 50811e423a8fSmrg # during glob expansion). Even if it were fixed, the result of this 50821e423a8fSmrg # check would be larger than it should be. 50831e423a8fSmrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 50841e423a8fSmrg ;; 5085fe5e51b7Smrg 50861e423a8fSmrg gnu*) 50871e423a8fSmrg # Under GNU Hurd, this test is not required because there is 50881e423a8fSmrg # no limit to the length of command line arguments. 50891e423a8fSmrg # Libtool will interpret -1 as no limit whatsoever 50901e423a8fSmrg lt_cv_sys_max_cmd_len=-1; 50911e423a8fSmrg ;; 5092fe5e51b7Smrg 50931e423a8fSmrg cygwin* | mingw* | cegcc*) 50941e423a8fSmrg # On Win9x/ME, this test blows up -- it succeeds, but takes 50951e423a8fSmrg # about 5 minutes as the teststring grows exponentially. 50961e423a8fSmrg # Worse, since 9x/ME are not pre-emptively multitasking, 50971e423a8fSmrg # you end up with a "frozen" computer, even though with patience 50981e423a8fSmrg # the test eventually succeeds (with a max line length of 256k). 50991e423a8fSmrg # Instead, let's just punt: use the minimum linelength reported by 51001e423a8fSmrg # all of the supported platforms: 8192 (on NT/2K/XP). 51011e423a8fSmrg lt_cv_sys_max_cmd_len=8192; 51021e423a8fSmrg ;; 5103fe5e51b7Smrg 51041e423a8fSmrg mint*) 51051e423a8fSmrg # On MiNT this can take a long time and run out of memory. 51061e423a8fSmrg lt_cv_sys_max_cmd_len=8192; 51071e423a8fSmrg ;; 5108fe5e51b7Smrg 51091e423a8fSmrg amigaos*) 51101e423a8fSmrg # On AmigaOS with pdksh, this test takes hours, literally. 51111e423a8fSmrg # So we just punt and use a minimum line length of 8192. 51121e423a8fSmrg lt_cv_sys_max_cmd_len=8192; 51131e423a8fSmrg ;; 5114a31a186aSmrg 51151e423a8fSmrg bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) 51161e423a8fSmrg # This has been around since 386BSD, at least. Likely further. 51171e423a8fSmrg if test -x /sbin/sysctl; then 51181e423a8fSmrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 51191e423a8fSmrg elif test -x /usr/sbin/sysctl; then 51201e423a8fSmrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 51211e423a8fSmrg else 51221e423a8fSmrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 51231e423a8fSmrg fi 51241e423a8fSmrg # And add a safety zone 51251e423a8fSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 51261e423a8fSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 51271e423a8fSmrg ;; 5128a31a186aSmrg 51291e423a8fSmrg interix*) 51301e423a8fSmrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 51311e423a8fSmrg lt_cv_sys_max_cmd_len=196608 51321e423a8fSmrg ;; 5133a31a186aSmrg 51341e423a8fSmrg os2*) 51351e423a8fSmrg # The test takes a long time on OS/2. 51361e423a8fSmrg lt_cv_sys_max_cmd_len=8192 5137a31a186aSmrg ;; 5138fe5e51b7Smrg 51391e423a8fSmrg osf*) 51401e423a8fSmrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 51411e423a8fSmrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 51421e423a8fSmrg # nice to cause kernel panics so lets avoid the loop below. 51431e423a8fSmrg # First set a reasonable default. 51441e423a8fSmrg lt_cv_sys_max_cmd_len=16384 51451e423a8fSmrg # 51461e423a8fSmrg if test -x /sbin/sysconfig; then 51471e423a8fSmrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 51481e423a8fSmrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 5149493f84f4Smrg esac 5150a31a186aSmrg fi 5151a31a186aSmrg ;; 51521e423a8fSmrg sco3.2v5*) 51531e423a8fSmrg lt_cv_sys_max_cmd_len=102400 51541e423a8fSmrg ;; 51551e423a8fSmrg sysv5* | sco5v6* | sysv4.2uw2*) 51561e423a8fSmrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 51571e423a8fSmrg if test -n "$kargmax"; then 51581e423a8fSmrg lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[ ]]//'` 51591e423a8fSmrg else 51601e423a8fSmrg lt_cv_sys_max_cmd_len=32768 51611e423a8fSmrg fi 51621e423a8fSmrg ;; 51631e423a8fSmrg *) 51641e423a8fSmrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 51651e423a8fSmrg if test -n "$lt_cv_sys_max_cmd_len" && \ 51661e423a8fSmrg test undefined != "$lt_cv_sys_max_cmd_len"; then 51671e423a8fSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 51681e423a8fSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 51691e423a8fSmrg else 51701e423a8fSmrg # Make teststring a little bigger before we do anything with it. 51711e423a8fSmrg # a 1K string should be a reasonable start. 51721e423a8fSmrg for i in 1 2 3 4 5 6 7 8; do 51731e423a8fSmrg teststring=$teststring$teststring 51741e423a8fSmrg done 51751e423a8fSmrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 51761e423a8fSmrg # If test is not a shell built-in, we'll probably end up computing a 51771e423a8fSmrg # maximum length that is only half of the actual maximum length, but 51781e423a8fSmrg # we can't tell. 51791e423a8fSmrg while { test X`env echo "$teststring$teststring" 2>/dev/null` \ 51801e423a8fSmrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 51811e423a8fSmrg test 17 != "$i" # 1/2 MB should be enough 51821e423a8fSmrg do 51831e423a8fSmrg i=`expr $i + 1` 51841e423a8fSmrg teststring=$teststring$teststring 51851e423a8fSmrg done 51861e423a8fSmrg # Only check the string length outside the loop. 51871e423a8fSmrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 51881e423a8fSmrg teststring= 51891e423a8fSmrg # Add a significant safety factor because C++ compilers can tack on 51901e423a8fSmrg # massive amounts of additional arguments before passing them to the 51911e423a8fSmrg # linker. It appears as though 1/2 is a usable value. 51921e423a8fSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 51931e423a8fSmrg fi 51941e423a8fSmrg ;; 5195a31a186aSmrg esac 51961e423a8fSmrg]) 51971e423a8fSmrgif test -n "$lt_cv_sys_max_cmd_len"; then 51981e423a8fSmrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 51991e423a8fSmrgelse 52001e423a8fSmrg AC_MSG_RESULT(none) 52011e423a8fSmrgfi 52021e423a8fSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len 52031e423a8fSmrg_LT_DECL([], [max_cmd_len], [0], 52041e423a8fSmrg [What is the maximum length of a command?]) 52051e423a8fSmrg])# LT_CMD_MAX_LEN 5206fe5e51b7Smrg 52071e423a8fSmrg# Old name: 52081e423a8fSmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 52091e423a8fSmrgdnl aclocal-1.4 backwards compatibility: 52101e423a8fSmrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 5211fe5e51b7Smrg 5212fe5e51b7Smrg 52131e423a8fSmrg# _LT_HEADER_DLFCN 52141e423a8fSmrg# ---------------- 52151e423a8fSmrgm4_defun([_LT_HEADER_DLFCN], 52161e423a8fSmrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 52171e423a8fSmrg])# _LT_HEADER_DLFCN 5218fe5e51b7Smrg 5219a31a186aSmrg 52201e423a8fSmrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 52211e423a8fSmrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 52221e423a8fSmrg# ---------------------------------------------------------------- 52231e423a8fSmrgm4_defun([_LT_TRY_DLOPEN_SELF], 52241e423a8fSmrg[m4_require([_LT_HEADER_DLFCN])dnl 52251e423a8fSmrgif test yes = "$cross_compiling"; then : 52261e423a8fSmrg [$4] 52271e423a8fSmrgelse 52281e423a8fSmrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 52291e423a8fSmrg lt_status=$lt_dlunknown 52301e423a8fSmrg cat > conftest.$ac_ext <<_LT_EOF 52311e423a8fSmrg[#line $LINENO "configure" 52321e423a8fSmrg#include "confdefs.h" 5233fe5e51b7Smrg 52341e423a8fSmrg#if HAVE_DLFCN_H 52351e423a8fSmrg#include <dlfcn.h> 52361e423a8fSmrg#endif 5237fe5e51b7Smrg 52381e423a8fSmrg#include <stdio.h> 5239a31a186aSmrg 52401e423a8fSmrg#ifdef RTLD_GLOBAL 52411e423a8fSmrg# define LT_DLGLOBAL RTLD_GLOBAL 52421e423a8fSmrg#else 52431e423a8fSmrg# ifdef DL_GLOBAL 52441e423a8fSmrg# define LT_DLGLOBAL DL_GLOBAL 52451e423a8fSmrg# else 52461e423a8fSmrg# define LT_DLGLOBAL 0 52471e423a8fSmrg# endif 52481e423a8fSmrg#endif 5249a31a186aSmrg 52501e423a8fSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 52511e423a8fSmrg find out it does not work in some platform. */ 52521e423a8fSmrg#ifndef LT_DLLAZY_OR_NOW 52531e423a8fSmrg# ifdef RTLD_LAZY 52541e423a8fSmrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 52551e423a8fSmrg# else 52561e423a8fSmrg# ifdef DL_LAZY 52571e423a8fSmrg# define LT_DLLAZY_OR_NOW DL_LAZY 52581e423a8fSmrg# else 52591e423a8fSmrg# ifdef RTLD_NOW 52601e423a8fSmrg# define LT_DLLAZY_OR_NOW RTLD_NOW 52611e423a8fSmrg# else 52621e423a8fSmrg# ifdef DL_NOW 52631e423a8fSmrg# define LT_DLLAZY_OR_NOW DL_NOW 52641e423a8fSmrg# else 52651e423a8fSmrg# define LT_DLLAZY_OR_NOW 0 52661e423a8fSmrg# endif 52671e423a8fSmrg# endif 52681e423a8fSmrg# endif 52691e423a8fSmrg# endif 52701e423a8fSmrg#endif 5271a31a186aSmrg 52721e423a8fSmrg/* When -fvisibility=hidden is used, assume the code has been annotated 52731e423a8fSmrg correspondingly for the symbols needed. */ 52741e423a8fSmrg#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 52751e423a8fSmrgint fnord () __attribute__((visibility("default"))); 52761e423a8fSmrg#endif 5277a31a186aSmrg 52781e423a8fSmrgint fnord () { return 42; } 52791e423a8fSmrgint main () 52801e423a8fSmrg{ 52811e423a8fSmrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 52821e423a8fSmrg int status = $lt_dlunknown; 5283a31a186aSmrg 52841e423a8fSmrg if (self) 52851e423a8fSmrg { 52861e423a8fSmrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 52871e423a8fSmrg else 52881e423a8fSmrg { 52891e423a8fSmrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 52901e423a8fSmrg else puts (dlerror ()); 52911e423a8fSmrg } 52921e423a8fSmrg /* dlclose (self); */ 52931e423a8fSmrg } 5294a31a186aSmrg else 52951e423a8fSmrg puts (dlerror ()); 52961e423a8fSmrg 52971e423a8fSmrg return status; 52981e423a8fSmrg}] 52991e423a8fSmrg_LT_EOF 53001e423a8fSmrg if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then 53011e423a8fSmrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 53021e423a8fSmrg lt_status=$? 53031e423a8fSmrg case x$lt_status in 53041e423a8fSmrg x$lt_dlno_uscore) $1 ;; 53051e423a8fSmrg x$lt_dlneed_uscore) $2 ;; 53061e423a8fSmrg x$lt_dlunknown|x*) $3 ;; 53071e423a8fSmrg esac 53081e423a8fSmrg else : 53091e423a8fSmrg # compilation failed 53101e423a8fSmrg $3 5311a31a186aSmrg fi 53121e423a8fSmrgfi 53131e423a8fSmrgrm -fr conftest* 53141e423a8fSmrg])# _LT_TRY_DLOPEN_SELF 5315fe5e51b7Smrg 5316fe5e51b7Smrg 53171e423a8fSmrg# LT_SYS_DLOPEN_SELF 53181e423a8fSmrg# ------------------ 53191e423a8fSmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 53201e423a8fSmrg[m4_require([_LT_HEADER_DLFCN])dnl 53211e423a8fSmrgif test yes != "$enable_dlopen"; then 53221e423a8fSmrg enable_dlopen=unknown 53231e423a8fSmrg enable_dlopen_self=unknown 53241e423a8fSmrg enable_dlopen_self_static=unknown 53251e423a8fSmrgelse 53261e423a8fSmrg lt_cv_dlopen=no 53271e423a8fSmrg lt_cv_dlopen_libs= 5328fe5e51b7Smrg 53291e423a8fSmrg case $host_os in 53301e423a8fSmrg beos*) 53311e423a8fSmrg lt_cv_dlopen=load_add_on 53321e423a8fSmrg lt_cv_dlopen_libs= 53331e423a8fSmrg lt_cv_dlopen_self=yes 53341e423a8fSmrg ;; 5335fe5e51b7Smrg 53361e423a8fSmrg mingw* | pw32* | cegcc*) 53371e423a8fSmrg lt_cv_dlopen=LoadLibrary 53381e423a8fSmrg lt_cv_dlopen_libs= 53391e423a8fSmrg ;; 5340fe5e51b7Smrg 53411e423a8fSmrg cygwin*) 53421e423a8fSmrg lt_cv_dlopen=dlopen 53431e423a8fSmrg lt_cv_dlopen_libs= 53441e423a8fSmrg ;; 5345fe5e51b7Smrg 53461e423a8fSmrg darwin*) 53471e423a8fSmrg # if libdl is installed we need to link against it 53481e423a8fSmrg AC_CHECK_LIB([dl], [dlopen], 53491e423a8fSmrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ 53501e423a8fSmrg lt_cv_dlopen=dyld 53511e423a8fSmrg lt_cv_dlopen_libs= 53521e423a8fSmrg lt_cv_dlopen_self=yes 53531e423a8fSmrg ]) 53541e423a8fSmrg ;; 5355fe5e51b7Smrg 53561e423a8fSmrg tpf*) 53571e423a8fSmrg # Don't try to run any link tests for TPF. We know it's impossible 53581e423a8fSmrg # because TPF is a cross-compiler, and we know how we open DSOs. 53591e423a8fSmrg lt_cv_dlopen=dlopen 53601e423a8fSmrg lt_cv_dlopen_libs= 53611e423a8fSmrg lt_cv_dlopen_self=no 53621e423a8fSmrg ;; 5363a31a186aSmrg 53641e423a8fSmrg *) 53651e423a8fSmrg AC_CHECK_FUNC([shl_load], 53661e423a8fSmrg [lt_cv_dlopen=shl_load], 53671e423a8fSmrg [AC_CHECK_LIB([dld], [shl_load], 53681e423a8fSmrg [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], 53691e423a8fSmrg [AC_CHECK_FUNC([dlopen], 53701e423a8fSmrg [lt_cv_dlopen=dlopen], 53711e423a8fSmrg [AC_CHECK_LIB([dl], [dlopen], 53721e423a8fSmrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], 53731e423a8fSmrg [AC_CHECK_LIB([svld], [dlopen], 53741e423a8fSmrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], 53751e423a8fSmrg [AC_CHECK_LIB([dld], [dld_link], 53761e423a8fSmrg [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) 53771e423a8fSmrg ]) 53781e423a8fSmrg ]) 53791e423a8fSmrg ]) 53801e423a8fSmrg ]) 53811e423a8fSmrg ]) 53821e423a8fSmrg ;; 53831e423a8fSmrg esac 5384fe5e51b7Smrg 53851e423a8fSmrg if test no = "$lt_cv_dlopen"; then 53861e423a8fSmrg enable_dlopen=no 53871e423a8fSmrg else 53881e423a8fSmrg enable_dlopen=yes 53891e423a8fSmrg fi 5390fe5e51b7Smrg 53911e423a8fSmrg case $lt_cv_dlopen in 53921e423a8fSmrg dlopen) 53931e423a8fSmrg save_CPPFLAGS=$CPPFLAGS 53941e423a8fSmrg test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 5395fe5e51b7Smrg 53961e423a8fSmrg save_LDFLAGS=$LDFLAGS 53971e423a8fSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 5398a31a186aSmrg 53991e423a8fSmrg save_LIBS=$LIBS 54001e423a8fSmrg LIBS="$lt_cv_dlopen_libs $LIBS" 5401fe5e51b7Smrg 54021e423a8fSmrg AC_CACHE_CHECK([whether a program can dlopen itself], 54031e423a8fSmrg lt_cv_dlopen_self, [dnl 54041e423a8fSmrg _LT_TRY_DLOPEN_SELF( 54051e423a8fSmrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 54061e423a8fSmrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 54071e423a8fSmrg ]) 5408fe5e51b7Smrg 54091e423a8fSmrg if test yes = "$lt_cv_dlopen_self"; then 54101e423a8fSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 54111e423a8fSmrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 54121e423a8fSmrg lt_cv_dlopen_self_static, [dnl 54131e423a8fSmrg _LT_TRY_DLOPEN_SELF( 54141e423a8fSmrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 54151e423a8fSmrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 54161e423a8fSmrg ]) 54171e423a8fSmrg fi 5418a31a186aSmrg 54191e423a8fSmrg CPPFLAGS=$save_CPPFLAGS 54201e423a8fSmrg LDFLAGS=$save_LDFLAGS 54211e423a8fSmrg LIBS=$save_LIBS 54221e423a8fSmrg ;; 54231e423a8fSmrg esac 5424a31a186aSmrg 54251e423a8fSmrg case $lt_cv_dlopen_self in 54261e423a8fSmrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 54271e423a8fSmrg *) enable_dlopen_self=unknown ;; 54281e423a8fSmrg esac 5429fe5e51b7Smrg 54301e423a8fSmrg case $lt_cv_dlopen_self_static in 54311e423a8fSmrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 54321e423a8fSmrg *) enable_dlopen_self_static=unknown ;; 54331e423a8fSmrg esac 54341e423a8fSmrgfi 54351e423a8fSmrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 54361e423a8fSmrg [Whether dlopen is supported]) 54371e423a8fSmrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 54381e423a8fSmrg [Whether dlopen of programs is supported]) 54391e423a8fSmrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 54401e423a8fSmrg [Whether dlopen of statically linked programs is supported]) 54411e423a8fSmrg])# LT_SYS_DLOPEN_SELF 5442a31a186aSmrg 54431e423a8fSmrg# Old name: 54441e423a8fSmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 54451e423a8fSmrgdnl aclocal-1.4 backwards compatibility: 54461e423a8fSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 5447fe5e51b7Smrg 5448fe5e51b7Smrg 54491e423a8fSmrg# _LT_COMPILER_C_O([TAGNAME]) 54501e423a8fSmrg# --------------------------- 54511e423a8fSmrg# Check to see if options -c and -o are simultaneously supported by compiler. 54521e423a8fSmrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 54531e423a8fSmrgm4_defun([_LT_COMPILER_C_O], 54541e423a8fSmrg[m4_require([_LT_DECL_SED])dnl 54551e423a8fSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 54561e423a8fSmrgm4_require([_LT_TAG_COMPILER])dnl 54571e423a8fSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 54581e423a8fSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 54591e423a8fSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 54601e423a8fSmrg $RM -r conftest 2>/dev/null 54611e423a8fSmrg mkdir conftest 54621e423a8fSmrg cd conftest 54631e423a8fSmrg mkdir out 54641e423a8fSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 5465fe5e51b7Smrg 54661e423a8fSmrg lt_compiler_flag="-o out/conftest2.$ac_objext" 54671e423a8fSmrg # Insert the option either (1) after the last *FLAGS variable, or 54681e423a8fSmrg # (2) before a word containing "conftest.", or (3) at the end. 54691e423a8fSmrg # Note that $ac_compile itself does not contain backslashes and begins 54701e423a8fSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 54711e423a8fSmrg lt_compile=`echo "$ac_compile" | $SED \ 54721e423a8fSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 54731e423a8fSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 54741e423a8fSmrg -e 's:$: $lt_compiler_flag:'` 54751e423a8fSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 54761e423a8fSmrg (eval "$lt_compile" 2>out/conftest.err) 54771e423a8fSmrg ac_status=$? 54781e423a8fSmrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 54791e423a8fSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 54801e423a8fSmrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 54811e423a8fSmrg then 54821e423a8fSmrg # The compiler can only warn and ignore the option if not recognized 54831e423a8fSmrg # So say no if there are warnings 54841e423a8fSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 54851e423a8fSmrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 54861e423a8fSmrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 54871e423a8fSmrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 54881e423a8fSmrg fi 54891e423a8fSmrg fi 54901e423a8fSmrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 54911e423a8fSmrg $RM conftest* 54921e423a8fSmrg # SGI C++ compiler will create directory out/ii_files/ for 54931e423a8fSmrg # template instantiation 54941e423a8fSmrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 54951e423a8fSmrg $RM out/* && rmdir out 54961e423a8fSmrg cd .. 54971e423a8fSmrg $RM -r conftest 54981e423a8fSmrg $RM conftest* 54991e423a8fSmrg]) 55001e423a8fSmrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 55011e423a8fSmrg [Does compiler simultaneously support -c and -o options?]) 55021e423a8fSmrg])# _LT_COMPILER_C_O 55030bb88ba4Smrg 5504fe5e51b7Smrg 55051e423a8fSmrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 55061e423a8fSmrg# ---------------------------------- 55071e423a8fSmrg# Check to see if we can do hard links to lock some files if needed 55081e423a8fSmrgm4_defun([_LT_COMPILER_FILE_LOCKS], 55091e423a8fSmrg[m4_require([_LT_ENABLE_LOCK])dnl 55101e423a8fSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 55111e423a8fSmrg_LT_COMPILER_C_O([$1]) 5512493f84f4Smrg 55131e423a8fSmrghard_links=nottested 55141e423a8fSmrgif test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then 55151e423a8fSmrg # do not overwrite the value of need_locks provided by the user 55161e423a8fSmrg AC_MSG_CHECKING([if we can lock with hard links]) 55171e423a8fSmrg hard_links=yes 55181e423a8fSmrg $RM conftest* 55191e423a8fSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 55201e423a8fSmrg touch conftest.a 55211e423a8fSmrg ln conftest.a conftest.b 2>&5 || hard_links=no 55221e423a8fSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 55231e423a8fSmrg AC_MSG_RESULT([$hard_links]) 55241e423a8fSmrg if test no = "$hard_links"; then 55251e423a8fSmrg AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) 55261e423a8fSmrg need_locks=warn 55271e423a8fSmrg fi 55281e423a8fSmrgelse 55291e423a8fSmrg need_locks=no 55301e423a8fSmrgfi 55311e423a8fSmrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 55321e423a8fSmrg])# _LT_COMPILER_FILE_LOCKS 5533fe5e51b7Smrg 5534fe5e51b7Smrg 55351e423a8fSmrg# _LT_CHECK_OBJDIR 55361e423a8fSmrg# ---------------- 55371e423a8fSmrgm4_defun([_LT_CHECK_OBJDIR], 55381e423a8fSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 55391e423a8fSmrg[rm -f .libs 2>/dev/null 55401e423a8fSmrgmkdir .libs 2>/dev/null 55411e423a8fSmrgif test -d .libs; then 55421e423a8fSmrg lt_cv_objdir=.libs 55431e423a8fSmrgelse 55441e423a8fSmrg # MS-DOS does not allow filenames that begin with a dot. 55451e423a8fSmrg lt_cv_objdir=_libs 55461e423a8fSmrgfi 55471e423a8fSmrgrmdir .libs 2>/dev/null]) 55481e423a8fSmrgobjdir=$lt_cv_objdir 55491e423a8fSmrg_LT_DECL([], [objdir], [0], 55501e423a8fSmrg [The name of the directory that contains temporary libtool files])dnl 55511e423a8fSmrgm4_pattern_allow([LT_OBJDIR])dnl 55521e423a8fSmrgAC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", 55531e423a8fSmrg [Define to the sub-directory where libtool stores uninstalled libraries.]) 55541e423a8fSmrg])# _LT_CHECK_OBJDIR 5555a31a186aSmrg 5556fe5e51b7Smrg 55571e423a8fSmrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 55581e423a8fSmrg# -------------------------------------- 55591e423a8fSmrg# Check hardcoding attributes. 55601e423a8fSmrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 55611e423a8fSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 55621e423a8fSmrg_LT_TAGVAR(hardcode_action, $1)= 55631e423a8fSmrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 55641e423a8fSmrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 55651e423a8fSmrg test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then 55660bb88ba4Smrg 55671e423a8fSmrg # We can hardcode non-existent directories. 55681e423a8fSmrg if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && 55691e423a8fSmrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 55701e423a8fSmrg # have to relink, otherwise we might link with an installed library 55711e423a8fSmrg # when we should be linking with a yet-to-be-installed one 55721e423a8fSmrg ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && 55731e423a8fSmrg test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then 55741e423a8fSmrg # Linking always hardcodes the temporary library directory. 55751e423a8fSmrg _LT_TAGVAR(hardcode_action, $1)=relink 55761e423a8fSmrg else 55771e423a8fSmrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 55781e423a8fSmrg _LT_TAGVAR(hardcode_action, $1)=immediate 55791e423a8fSmrg fi 55801e423a8fSmrgelse 55811e423a8fSmrg # We cannot hardcode anything, or else we can only hardcode existing 55821e423a8fSmrg # directories. 55831e423a8fSmrg _LT_TAGVAR(hardcode_action, $1)=unsupported 55841e423a8fSmrgfi 55851e423a8fSmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 5586a31a186aSmrg 55871e423a8fSmrgif test relink = "$_LT_TAGVAR(hardcode_action, $1)" || 55881e423a8fSmrg test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then 55891e423a8fSmrg # Fast installation is not supported 55901e423a8fSmrg enable_fast_install=no 55911e423a8fSmrgelif test yes = "$shlibpath_overrides_runpath" || 55921e423a8fSmrg test no = "$enable_shared"; then 55931e423a8fSmrg # Fast installation is not necessary 55941e423a8fSmrg enable_fast_install=needless 55951e423a8fSmrgfi 55961e423a8fSmrg_LT_TAGDECL([], [hardcode_action], [0], 55971e423a8fSmrg [How to hardcode a shared library path into an executable]) 55981e423a8fSmrg])# _LT_LINKER_HARDCODE_LIBPATH 5599fe5e51b7Smrg 5600a31a186aSmrg 56011e423a8fSmrg# _LT_CMD_STRIPLIB 56021e423a8fSmrg# ---------------- 56031e423a8fSmrgm4_defun([_LT_CMD_STRIPLIB], 56041e423a8fSmrg[m4_require([_LT_DECL_EGREP]) 56051e423a8fSmrgstriplib= 56061e423a8fSmrgold_striplib= 56071e423a8fSmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 56081e423a8fSmrgif test -z "$STRIP"; then 56091e423a8fSmrg AC_MSG_RESULT([no]) 56101e423a8fSmrgelse 56111e423a8fSmrg if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 56121e423a8fSmrg old_striplib="$STRIP --strip-debug" 56131e423a8fSmrg striplib="$STRIP --strip-unneeded" 56141e423a8fSmrg AC_MSG_RESULT([yes]) 56151e423a8fSmrg else 56161e423a8fSmrg case $host_os in 56171e423a8fSmrg darwin*) 56181e423a8fSmrg # FIXME - insert some real tests, host_os isn't really good enough 56191e423a8fSmrg striplib="$STRIP -x" 56201e423a8fSmrg old_striplib="$STRIP -S" 56211e423a8fSmrg AC_MSG_RESULT([yes]) 56221e423a8fSmrg ;; 56231e423a8fSmrg freebsd*) 56241e423a8fSmrg if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then 56251e423a8fSmrg old_striplib="$STRIP --strip-debug" 56261e423a8fSmrg striplib="$STRIP --strip-unneeded" 56271e423a8fSmrg AC_MSG_RESULT([yes]) 56281e423a8fSmrg else 56291e423a8fSmrg AC_MSG_RESULT([no]) 56301e423a8fSmrg fi 56311e423a8fSmrg ;; 56321e423a8fSmrg *) 56331e423a8fSmrg AC_MSG_RESULT([no]) 56341e423a8fSmrg ;; 56351e423a8fSmrg esac 56361e423a8fSmrg fi 56371e423a8fSmrgfi 56381e423a8fSmrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 56391e423a8fSmrg_LT_DECL([], [striplib], [1]) 56401e423a8fSmrg])# _LT_CMD_STRIPLIB 5641a31a186aSmrg 56421e423a8fSmrg 56431e423a8fSmrg# _LT_PREPARE_MUNGE_PATH_LIST 56441e423a8fSmrg# --------------------------- 56451e423a8fSmrg# Make sure func_munge_path_list() is defined correctly. 56461e423a8fSmrgm4_defun([_LT_PREPARE_MUNGE_PATH_LIST], 56471e423a8fSmrg[[# func_munge_path_list VARIABLE PATH 56481e423a8fSmrg# ----------------------------------- 56491e423a8fSmrg# VARIABLE is name of variable containing _space_ separated list of 56501e423a8fSmrg# directories to be munged by the contents of PATH, which is string 56511e423a8fSmrg# having a format: 56521e423a8fSmrg# "DIR[:DIR]:" 56531e423a8fSmrg# string "DIR[ DIR]" will be prepended to VARIABLE 56541e423a8fSmrg# ":DIR[:DIR]" 56551e423a8fSmrg# string "DIR[ DIR]" will be appended to VARIABLE 56561e423a8fSmrg# "DIRP[:DIRP]::[DIRA:]DIRA" 56571e423a8fSmrg# string "DIRP[ DIRP]" will be prepended to VARIABLE and string 56581e423a8fSmrg# "DIRA[ DIRA]" will be appended to VARIABLE 56591e423a8fSmrg# "DIR[:DIR]" 56601e423a8fSmrg# VARIABLE will be replaced by "DIR[ DIR]" 56611e423a8fSmrgfunc_munge_path_list () 56621e423a8fSmrg{ 56631e423a8fSmrg case x@S|@2 in 56641e423a8fSmrg x) 56651e423a8fSmrg ;; 56661e423a8fSmrg *:) 56671e423a8fSmrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" 56681e423a8fSmrg ;; 56691e423a8fSmrg x:*) 56701e423a8fSmrg eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" 56711e423a8fSmrg ;; 56721e423a8fSmrg *::*) 56731e423a8fSmrg eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" 56741e423a8fSmrg eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" 56751e423a8fSmrg ;; 56761e423a8fSmrg *) 56771e423a8fSmrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" 5678a31a186aSmrg ;; 56791e423a8fSmrg esac 56801e423a8fSmrg} 56811e423a8fSmrg]])# _LT_PREPARE_PATH_LIST 5682fe5e51b7Smrg 5683a31a186aSmrg 56841e423a8fSmrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 56851e423a8fSmrg# ----------------------------- 56861e423a8fSmrg# PORTME Fill in your ld.so characteristics 56871e423a8fSmrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 56881e423a8fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 56891e423a8fSmrgm4_require([_LT_DECL_EGREP])dnl 56901e423a8fSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 56911e423a8fSmrgm4_require([_LT_DECL_OBJDUMP])dnl 56921e423a8fSmrgm4_require([_LT_DECL_SED])dnl 56931e423a8fSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 56941e423a8fSmrgm4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl 56951e423a8fSmrgAC_MSG_CHECKING([dynamic linker characteristics]) 56961e423a8fSmrgm4_if([$1], 56971e423a8fSmrg [], [ 56981e423a8fSmrgif test yes = "$GCC"; then 56991e423a8fSmrg case $host_os in 57001e423a8fSmrg darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; 57011e423a8fSmrg *) lt_awk_arg='/^libraries:/' ;; 57021e423a8fSmrg esac 57031e423a8fSmrg case $host_os in 57041e423a8fSmrg mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; 57051e423a8fSmrg *) lt_sed_strip_eq='s|=/|/|g' ;; 57061e423a8fSmrg esac 57071e423a8fSmrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 57081e423a8fSmrg case $lt_search_path_spec in 57091e423a8fSmrg *\;*) 57101e423a8fSmrg # if the path contains ";" then we assume it to be the separator 57111e423a8fSmrg # otherwise default to the standard path separator (i.e. ":") - it is 57121e423a8fSmrg # assumed that no part of a normal pathname contains ";" but that should 57131e423a8fSmrg # okay in the real world where ";" in dirpaths is itself problematic. 57141e423a8fSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 57151e423a8fSmrg ;; 57161e423a8fSmrg *) 57171e423a8fSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 57181e423a8fSmrg ;; 57191e423a8fSmrg esac 57201e423a8fSmrg # Ok, now we have the path, separated by spaces, we can step through it 57211e423a8fSmrg # and add multilib dir if necessary... 57221e423a8fSmrg lt_tmp_lt_search_path_spec= 57231e423a8fSmrg lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 57241e423a8fSmrg # ...but if some path component already ends with the multilib dir we assume 57251e423a8fSmrg # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). 57261e423a8fSmrg case "$lt_multi_os_dir; $lt_search_path_spec " in 57271e423a8fSmrg "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) 57281e423a8fSmrg lt_multi_os_dir= 57291e423a8fSmrg ;; 57301e423a8fSmrg esac 57311e423a8fSmrg for lt_sys_path in $lt_search_path_spec; do 57321e423a8fSmrg if test -d "$lt_sys_path$lt_multi_os_dir"; then 57331e423a8fSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" 57341e423a8fSmrg elif test -n "$lt_multi_os_dir"; then 57351e423a8fSmrg test -d "$lt_sys_path" && \ 57361e423a8fSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 57371e423a8fSmrg fi 57381e423a8fSmrg done 57391e423a8fSmrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 57401e423a8fSmrgBEGIN {RS = " "; FS = "/|\n";} { 57411e423a8fSmrg lt_foo = ""; 57421e423a8fSmrg lt_count = 0; 57431e423a8fSmrg for (lt_i = NF; lt_i > 0; lt_i--) { 57441e423a8fSmrg if ($lt_i != "" && $lt_i != ".") { 57451e423a8fSmrg if ($lt_i == "..") { 57461e423a8fSmrg lt_count++; 57471e423a8fSmrg } else { 57481e423a8fSmrg if (lt_count == 0) { 57491e423a8fSmrg lt_foo = "/" $lt_i lt_foo; 57501e423a8fSmrg } else { 57511e423a8fSmrg lt_count--; 57521e423a8fSmrg } 57531e423a8fSmrg } 57541e423a8fSmrg } 57551e423a8fSmrg } 57561e423a8fSmrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 57571e423a8fSmrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 57581e423a8fSmrg}'` 57591e423a8fSmrg # AWK program above erroneously prepends '/' to C:/dos/paths 57601e423a8fSmrg # for these hosts. 57611e423a8fSmrg case $host_os in 57621e423a8fSmrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 57631e423a8fSmrg $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; 57641e423a8fSmrg esac 57651e423a8fSmrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 57661e423a8fSmrgelse 57671e423a8fSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 57681e423a8fSmrgfi]) 57691e423a8fSmrglibrary_names_spec= 57701e423a8fSmrglibname_spec='lib$name' 57711e423a8fSmrgsoname_spec= 57721e423a8fSmrgshrext_cmds=.so 57731e423a8fSmrgpostinstall_cmds= 57741e423a8fSmrgpostuninstall_cmds= 57751e423a8fSmrgfinish_cmds= 57761e423a8fSmrgfinish_eval= 57771e423a8fSmrgshlibpath_var= 57781e423a8fSmrgshlibpath_overrides_runpath=unknown 57791e423a8fSmrgversion_type=none 57801e423a8fSmrgdynamic_linker="$host_os ld.so" 57811e423a8fSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 57821e423a8fSmrgneed_lib_prefix=unknown 57831e423a8fSmrghardcode_into_libs=no 5784fe5e51b7Smrg 57851e423a8fSmrg# when you set need_version to no, make sure it does not cause -set_version 57861e423a8fSmrg# flags to be left without arguments 57871e423a8fSmrgneed_version=unknown 5788a31a186aSmrg 57891e423a8fSmrgAC_ARG_VAR([LT_SYS_LIBRARY_PATH], 57901e423a8fSmrg[User-defined run-time library search path.]) 5791a31a186aSmrg 57921e423a8fSmrgcase $host_os in 57931e423a8fSmrgaix3*) 57941e423a8fSmrg version_type=linux # correct to gnu/linux during the next big refactor 57951e423a8fSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname.a' 57961e423a8fSmrg shlibpath_var=LIBPATH 5797a31a186aSmrg 57981e423a8fSmrg # AIX 3 has no versioning support, so we append a major version to the name. 57991e423a8fSmrg soname_spec='$libname$release$shared_ext$major' 58001e423a8fSmrg ;; 5801fe5e51b7Smrg 58021e423a8fSmrgaix[[4-9]]*) 58031e423a8fSmrg version_type=linux # correct to gnu/linux during the next big refactor 58041e423a8fSmrg need_lib_prefix=no 58051e423a8fSmrg need_version=no 58061e423a8fSmrg hardcode_into_libs=yes 58071e423a8fSmrg if test ia64 = "$host_cpu"; then 58081e423a8fSmrg # AIX 5 supports IA64 58091e423a8fSmrg library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' 58101e423a8fSmrg shlibpath_var=LD_LIBRARY_PATH 58111e423a8fSmrg else 58121e423a8fSmrg # With GCC up to 2.95.x, collect2 would create an import file 58131e423a8fSmrg # for dependence libraries. The import file would start with 58141e423a8fSmrg # the line '#! .'. This would cause the generated library to 58151e423a8fSmrg # depend on '.', always an invalid library. This was fixed in 58161e423a8fSmrg # development snapshots of GCC prior to 3.0. 58171e423a8fSmrg case $host_os in 58181e423a8fSmrg aix4 | aix4.[[01]] | aix4.[[01]].*) 58191e423a8fSmrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 58201e423a8fSmrg echo ' yes ' 58211e423a8fSmrg echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then 58221e423a8fSmrg : 58231e423a8fSmrg else 58241e423a8fSmrg can_build_shared=no 58251e423a8fSmrg fi 58261e423a8fSmrg ;; 58271e423a8fSmrg esac 58281e423a8fSmrg # Using Import Files as archive members, it is possible to support 58291e423a8fSmrg # filename-based versioning of shared library archives on AIX. While 58301e423a8fSmrg # this would work for both with and without runtime linking, it will 58311e423a8fSmrg # prevent static linking of such archives. So we do filename-based 58321e423a8fSmrg # shared library versioning with .so extension only, which is used 58331e423a8fSmrg # when both runtime linking and shared linking is enabled. 58341e423a8fSmrg # Unfortunately, runtime linking may impact performance, so we do 58351e423a8fSmrg # not want this to be the default eventually. Also, we use the 58361e423a8fSmrg # versioned .so libs for executables only if there is the -brtl 58371e423a8fSmrg # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. 58381e423a8fSmrg # To allow for filename-based versioning support, we need to create 58391e423a8fSmrg # libNAME.so.V as an archive file, containing: 58401e423a8fSmrg # *) an Import File, referring to the versioned filename of the 58411e423a8fSmrg # archive as well as the shared archive member, telling the 58421e423a8fSmrg # bitwidth (32 or 64) of that shared object, and providing the 58431e423a8fSmrg # list of exported symbols of that shared object, eventually 58441e423a8fSmrg # decorated with the 'weak' keyword 58451e423a8fSmrg # *) the shared object with the F_LOADONLY flag set, to really avoid 58461e423a8fSmrg # it being seen by the linker. 58471e423a8fSmrg # At run time we better use the real file rather than another symlink, 58481e423a8fSmrg # but for link time we create the symlink libNAME.so -> libNAME.so.V 5849fe5e51b7Smrg 58501e423a8fSmrg case $with_aix_soname,$aix_use_runtimelinking in 58511e423a8fSmrg # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct 58521e423a8fSmrg # soname into executable. Probably we can add versioning support to 58531e423a8fSmrg # collect2, so additional links can be useful in future. 58541e423a8fSmrg aix,yes) # traditional libtool 58551e423a8fSmrg dynamic_linker='AIX unversionable lib.so' 58561e423a8fSmrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 58571e423a8fSmrg # instead of lib<name>.a to let people know that these are not 58581e423a8fSmrg # typical AIX shared libraries. 58591e423a8fSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 58601e423a8fSmrg ;; 58611e423a8fSmrg aix,no) # traditional AIX only 58621e423a8fSmrg dynamic_linker='AIX lib.a[(]lib.so.V[)]' 58631e423a8fSmrg # We preserve .a as extension for shared libraries through AIX4.2 58641e423a8fSmrg # and later when we are not doing run time linking. 58651e423a8fSmrg library_names_spec='$libname$release.a $libname.a' 58661e423a8fSmrg soname_spec='$libname$release$shared_ext$major' 58671e423a8fSmrg ;; 58681e423a8fSmrg svr4,*) # full svr4 only 58691e423a8fSmrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" 58701e423a8fSmrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 58711e423a8fSmrg # We do not specify a path in Import Files, so LIBPATH fires. 58721e423a8fSmrg shlibpath_overrides_runpath=yes 58731e423a8fSmrg ;; 58741e423a8fSmrg *,yes) # both, prefer svr4 58751e423a8fSmrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" 58761e423a8fSmrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 58771e423a8fSmrg # unpreferred sharedlib libNAME.a needs extra handling 58781e423a8fSmrg postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' 58791e423a8fSmrg postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' 58801e423a8fSmrg # We do not specify a path in Import Files, so LIBPATH fires. 58811e423a8fSmrg shlibpath_overrides_runpath=yes 58821e423a8fSmrg ;; 58831e423a8fSmrg *,no) # both, prefer aix 58841e423a8fSmrg dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" 58851e423a8fSmrg library_names_spec='$libname$release.a $libname.a' 58861e423a8fSmrg soname_spec='$libname$release$shared_ext$major' 58871e423a8fSmrg # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling 58881e423a8fSmrg postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' 58891e423a8fSmrg postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' 58901e423a8fSmrg ;; 58911e423a8fSmrg esac 58921e423a8fSmrg shlibpath_var=LIBPATH 58931e423a8fSmrg fi 58941e423a8fSmrg ;; 5895fe5e51b7Smrg 58961e423a8fSmrgamigaos*) 58971e423a8fSmrg case $host_cpu in 58981e423a8fSmrg powerpc) 58991e423a8fSmrg # Since July 2007 AmigaOS4 officially supports .so libraries. 59001e423a8fSmrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 59011e423a8fSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 59021e423a8fSmrg ;; 59031e423a8fSmrg m68k) 59041e423a8fSmrg library_names_spec='$libname.ixlibrary $libname.a' 59051e423a8fSmrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 59061e423a8fSmrg finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $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' 59071e423a8fSmrg ;; 59081e423a8fSmrg esac 59091e423a8fSmrg ;; 5910a31a186aSmrg 59111e423a8fSmrgbeos*) 59121e423a8fSmrg library_names_spec='$libname$shared_ext' 59131e423a8fSmrg dynamic_linker="$host_os ld.so" 59141e423a8fSmrg shlibpath_var=LIBRARY_PATH 59151e423a8fSmrg ;; 5916a31a186aSmrg 59171e423a8fSmrgbsdi[[45]]*) 59181e423a8fSmrg version_type=linux # correct to gnu/linux during the next big refactor 59191e423a8fSmrg need_version=no 59201e423a8fSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 59211e423a8fSmrg soname_spec='$libname$release$shared_ext$major' 59221e423a8fSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 59231e423a8fSmrg shlibpath_var=LD_LIBRARY_PATH 59241e423a8fSmrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 59251e423a8fSmrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 59261e423a8fSmrg # the default ld.so.conf also contains /usr/contrib/lib and 59271e423a8fSmrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 59281e423a8fSmrg # libtool to hard-code these into programs 59291e423a8fSmrg ;; 5930fe5e51b7Smrg 59311e423a8fSmrgcygwin* | mingw* | pw32* | cegcc*) 59321e423a8fSmrg version_type=windows 59331e423a8fSmrg shrext_cmds=.dll 59341e423a8fSmrg need_version=no 59351e423a8fSmrg need_lib_prefix=no 5936fe5e51b7Smrg 59371e423a8fSmrg case $GCC,$cc_basename in 59381e423a8fSmrg yes,*) 59391e423a8fSmrg # gcc 59401e423a8fSmrg library_names_spec='$libname.dll.a' 59411e423a8fSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 59421e423a8fSmrg postinstall_cmds='base_file=`basename \$file`~ 59431e423a8fSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 59441e423a8fSmrg dldir=$destdir/`dirname \$dlpath`~ 59451e423a8fSmrg test -d \$dldir || mkdir -p \$dldir~ 59461e423a8fSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 59471e423a8fSmrg chmod a+x \$dldir/$dlname~ 59481e423a8fSmrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 59491e423a8fSmrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 59501e423a8fSmrg fi' 59511e423a8fSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 59521e423a8fSmrg dlpath=$dir/\$dldll~ 59531e423a8fSmrg $RM \$dlpath' 59541e423a8fSmrg shlibpath_overrides_runpath=yes 5955fe5e51b7Smrg 59561e423a8fSmrg case $host_os in 59571e423a8fSmrg cygwin*) 59581e423a8fSmrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 59591e423a8fSmrg soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 59601e423a8fSmrgm4_if([$1], [],[ 59611e423a8fSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 59621e423a8fSmrg ;; 59631e423a8fSmrg mingw* | cegcc*) 59641e423a8fSmrg # MinGW DLLs use traditional 'lib' prefix 59651e423a8fSmrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 59661e423a8fSmrg ;; 59671e423a8fSmrg pw32*) 59681e423a8fSmrg # pw32 DLLs use 'pw' prefix rather than 'lib' 59691e423a8fSmrg library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 59701e423a8fSmrg ;; 59711e423a8fSmrg esac 59721e423a8fSmrg dynamic_linker='Win32 ld.exe' 59731e423a8fSmrg ;; 5974fe5e51b7Smrg 59751e423a8fSmrg *,cl* | *,icl*) 59761e423a8fSmrg # Native MSVC or ICC 59771e423a8fSmrg libname_spec='$name' 59781e423a8fSmrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 59791e423a8fSmrg library_names_spec='$libname.dll.lib' 5980a31a186aSmrg 59811e423a8fSmrg case $build_os in 59821e423a8fSmrg mingw*) 59831e423a8fSmrg sys_lib_search_path_spec= 59841e423a8fSmrg lt_save_ifs=$IFS 59851e423a8fSmrg IFS=';' 59861e423a8fSmrg for lt_path in $LIB 59871e423a8fSmrg do 59881e423a8fSmrg IFS=$lt_save_ifs 59891e423a8fSmrg # Let DOS variable expansion print the short 8.3 style file name. 59901e423a8fSmrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 59911e423a8fSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 59921e423a8fSmrg done 59931e423a8fSmrg IFS=$lt_save_ifs 59941e423a8fSmrg # Convert to MSYS style. 59951e423a8fSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 59961e423a8fSmrg ;; 59971e423a8fSmrg cygwin*) 59981e423a8fSmrg # Convert to unix form, then to dos form, then back to unix form 59991e423a8fSmrg # but this time dos style (no spaces!) so that the unix form looks 60001e423a8fSmrg # like /cygdrive/c/PROGRA~1:/cygdr... 60011e423a8fSmrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 60021e423a8fSmrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 60031e423a8fSmrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 60041e423a8fSmrg ;; 60051e423a8fSmrg *) 60061e423a8fSmrg sys_lib_search_path_spec=$LIB 60071e423a8fSmrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 60081e423a8fSmrg # It is most probably a Windows format PATH. 60091e423a8fSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 60101e423a8fSmrg else 60111e423a8fSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 60121e423a8fSmrg fi 60131e423a8fSmrg # FIXME: find the short name or the path components, as spaces are 60141e423a8fSmrg # common. (e.g. "Program Files" -> "PROGRA~1") 60151e423a8fSmrg ;; 60161e423a8fSmrg esac 6017a31a186aSmrg 60181e423a8fSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 60191e423a8fSmrg postinstall_cmds='base_file=`basename \$file`~ 60201e423a8fSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 60211e423a8fSmrg dldir=$destdir/`dirname \$dlpath`~ 60221e423a8fSmrg test -d \$dldir || mkdir -p \$dldir~ 60231e423a8fSmrg $install_prog $dir/$dlname \$dldir/$dlname' 60241e423a8fSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 60251e423a8fSmrg dlpath=$dir/\$dldll~ 60261e423a8fSmrg $RM \$dlpath' 60271e423a8fSmrg shlibpath_overrides_runpath=yes 60281e423a8fSmrg dynamic_linker='Win32 link.exe' 60291e423a8fSmrg ;; 6030a31a186aSmrg 60311e423a8fSmrg *) 60321e423a8fSmrg # Assume MSVC and ICC wrapper 60331e423a8fSmrg library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' 60341e423a8fSmrg dynamic_linker='Win32 ld.exe' 60351e423a8fSmrg ;; 60361e423a8fSmrg esac 60371e423a8fSmrg # FIXME: first we should search . and the directory the executable is in 60381e423a8fSmrg shlibpath_var=PATH 60391e423a8fSmrg ;; 6040fe5e51b7Smrg 60411e423a8fSmrgdarwin* | rhapsody*) 60421e423a8fSmrg dynamic_linker="$host_os dyld" 60431e423a8fSmrg version_type=darwin 60441e423a8fSmrg need_lib_prefix=no 60451e423a8fSmrg need_version=no 60461e423a8fSmrg library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' 60471e423a8fSmrg soname_spec='$libname$release$major$shared_ext' 60481e423a8fSmrg shlibpath_overrides_runpath=yes 60491e423a8fSmrg shlibpath_var=DYLD_LIBRARY_PATH 60501e423a8fSmrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 60511e423a8fSmrgm4_if([$1], [],[ 60521e423a8fSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 60531e423a8fSmrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 60541e423a8fSmrg ;; 6055fe5e51b7Smrg 60561e423a8fSmrgdgux*) 60571e423a8fSmrg version_type=linux # correct to gnu/linux during the next big refactor 60581e423a8fSmrg need_lib_prefix=no 60591e423a8fSmrg need_version=no 60601e423a8fSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 60611e423a8fSmrg soname_spec='$libname$release$shared_ext$major' 60621e423a8fSmrg shlibpath_var=LD_LIBRARY_PATH 60631e423a8fSmrg ;; 6064a31a186aSmrg 60651e423a8fSmrgfreebsd* | dragonfly* | midnightbsd*) 60661e423a8fSmrg # DragonFly does not have aout. When/if they implement a new 60671e423a8fSmrg # versioning mechanism, adjust this. 60681e423a8fSmrg if test -x /usr/bin/objformat; then 60691e423a8fSmrg objformat=`/usr/bin/objformat` 60701e423a8fSmrg else 60711e423a8fSmrg case $host_os in 60721e423a8fSmrg freebsd[[23]].*) objformat=aout ;; 60731e423a8fSmrg *) objformat=elf ;; 60741e423a8fSmrg esac 60751e423a8fSmrg fi 60761e423a8fSmrg version_type=freebsd-$objformat 60771e423a8fSmrg case $version_type in 60781e423a8fSmrg freebsd-elf*) 60791e423a8fSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 60801e423a8fSmrg soname_spec='$libname$release$shared_ext$major' 60811e423a8fSmrg need_version=no 60821e423a8fSmrg need_lib_prefix=no 60831e423a8fSmrg ;; 60841e423a8fSmrg freebsd-*) 60851e423a8fSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 60861e423a8fSmrg need_version=yes 60871e423a8fSmrg ;; 60881e423a8fSmrg esac 60891e423a8fSmrg shlibpath_var=LD_LIBRARY_PATH 60901e423a8fSmrg case $host_os in 60911e423a8fSmrg freebsd2.*) 60921e423a8fSmrg shlibpath_overrides_runpath=yes 60931e423a8fSmrg ;; 60941e423a8fSmrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 60951e423a8fSmrg shlibpath_overrides_runpath=yes 60961e423a8fSmrg hardcode_into_libs=yes 60971e423a8fSmrg ;; 60981e423a8fSmrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 60991e423a8fSmrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 61001e423a8fSmrg shlibpath_overrides_runpath=no 61011e423a8fSmrg hardcode_into_libs=yes 61021e423a8fSmrg ;; 61031e423a8fSmrg *) # from 4.6 on, and DragonFly 61041e423a8fSmrg shlibpath_overrides_runpath=yes 61051e423a8fSmrg hardcode_into_libs=yes 61061e423a8fSmrg ;; 61071e423a8fSmrg esac 61081e423a8fSmrg ;; 6109a31a186aSmrg 61101e423a8fSmrghaiku*) 61111e423a8fSmrg version_type=linux # correct to gnu/linux during the next big refactor 61121e423a8fSmrg need_lib_prefix=no 61131e423a8fSmrg need_version=no 61141e423a8fSmrg dynamic_linker="$host_os runtime_loader" 61151e423a8fSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 61161e423a8fSmrg soname_spec='$libname$release$shared_ext$major' 61171e423a8fSmrg shlibpath_var=LIBRARY_PATH 61181e423a8fSmrg shlibpath_overrides_runpath=no 61191e423a8fSmrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 61201e423a8fSmrg hardcode_into_libs=yes 61211e423a8fSmrg ;; 6122a31a186aSmrg 61231e423a8fSmrghpux9* | hpux10* | hpux11*) 61241e423a8fSmrg # Give a soname corresponding to the major version so that dld.sl refuses to 61251e423a8fSmrg # link against other versions. 61261e423a8fSmrg version_type=sunos 61271e423a8fSmrg need_lib_prefix=no 61281e423a8fSmrg need_version=no 61291e423a8fSmrg case $host_cpu in 61301e423a8fSmrg ia64*) 61311e423a8fSmrg shrext_cmds='.so' 61321e423a8fSmrg hardcode_into_libs=yes 61331e423a8fSmrg dynamic_linker="$host_os dld.so" 61341e423a8fSmrg shlibpath_var=LD_LIBRARY_PATH 61351e423a8fSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 61361e423a8fSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 61371e423a8fSmrg soname_spec='$libname$release$shared_ext$major' 61381e423a8fSmrg if test 32 = "$HPUX_IA64_MODE"; then 61391e423a8fSmrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 61401e423a8fSmrg sys_lib_dlsearch_path_spec=/usr/lib/hpux32 61411e423a8fSmrg else 61421e423a8fSmrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 61431e423a8fSmrg sys_lib_dlsearch_path_spec=/usr/lib/hpux64 61441e423a8fSmrg fi 61451e423a8fSmrg ;; 61461e423a8fSmrg hppa*64*) 61471e423a8fSmrg shrext_cmds='.sl' 61481e423a8fSmrg hardcode_into_libs=yes 61491e423a8fSmrg dynamic_linker="$host_os dld.sl" 61501e423a8fSmrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 61511e423a8fSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 61521e423a8fSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 61531e423a8fSmrg soname_spec='$libname$release$shared_ext$major' 61541e423a8fSmrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 61551e423a8fSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 61561e423a8fSmrg ;; 61571e423a8fSmrg *) 61581e423a8fSmrg shrext_cmds='.sl' 61591e423a8fSmrg dynamic_linker="$host_os dld.sl" 61601e423a8fSmrg shlibpath_var=SHLIB_PATH 61611e423a8fSmrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 61621e423a8fSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 61631e423a8fSmrg soname_spec='$libname$release$shared_ext$major' 61641e423a8fSmrg ;; 61651e423a8fSmrg esac 61661e423a8fSmrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 61671e423a8fSmrg postinstall_cmds='chmod 555 $lib' 61681e423a8fSmrg # or fails outright, so override atomically: 61691e423a8fSmrg install_override_mode=555 61701e423a8fSmrg ;; 6171fe5e51b7Smrg 61721e423a8fSmrginterix[[3-9]]*) 61731e423a8fSmrg version_type=linux # correct to gnu/linux during the next big refactor 61741e423a8fSmrg need_lib_prefix=no 61751e423a8fSmrg need_version=no 61761e423a8fSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 61771e423a8fSmrg soname_spec='$libname$release$shared_ext$major' 61781e423a8fSmrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 61791e423a8fSmrg shlibpath_var=LD_LIBRARY_PATH 61801e423a8fSmrg shlibpath_overrides_runpath=no 61811e423a8fSmrg hardcode_into_libs=yes 61821e423a8fSmrg ;; 6183fe5e51b7Smrg 61841e423a8fSmrgirix5* | irix6* | nonstopux*) 61851e423a8fSmrg case $host_os in 61861e423a8fSmrg nonstopux*) version_type=nonstopux ;; 61871e423a8fSmrg *) 61881e423a8fSmrg if test yes = "$lt_cv_prog_gnu_ld"; then 61891e423a8fSmrg version_type=linux # correct to gnu/linux during the next big refactor 61901e423a8fSmrg else 61911e423a8fSmrg version_type=irix 61921e423a8fSmrg fi ;; 61931e423a8fSmrg esac 61941e423a8fSmrg need_lib_prefix=no 61951e423a8fSmrg need_version=no 61961e423a8fSmrg soname_spec='$libname$release$shared_ext$major' 61971e423a8fSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' 61981e423a8fSmrg case $host_os in 61991e423a8fSmrg irix5* | nonstopux*) 62001e423a8fSmrg libsuff= shlibsuff= 62011e423a8fSmrg ;; 62021e423a8fSmrg *) 62031e423a8fSmrg case $LD in # libtool.m4 will add one of these switches to LD 62041e423a8fSmrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 62051e423a8fSmrg libsuff= shlibsuff= libmagic=32-bit;; 62061e423a8fSmrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 62071e423a8fSmrg libsuff=32 shlibsuff=N32 libmagic=N32;; 62081e423a8fSmrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 62091e423a8fSmrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 62101e423a8fSmrg *) libsuff= shlibsuff= libmagic=never-match;; 62111e423a8fSmrg esac 62121e423a8fSmrg ;; 62131e423a8fSmrg esac 62141e423a8fSmrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 62151e423a8fSmrg shlibpath_overrides_runpath=no 62161e423a8fSmrg sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" 62171e423a8fSmrg sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" 62181e423a8fSmrg hardcode_into_libs=yes 62191e423a8fSmrg ;; 6220a31a186aSmrg 62211e423a8fSmrg# No shared lib support for Linux oldld, aout, or coff. 62221e423a8fSmrglinux*oldld* | linux*aout* | linux*coff*) 62231e423a8fSmrg dynamic_linker=no 62241e423a8fSmrg ;; 6225fe5e51b7Smrg 62261e423a8fSmrglinux*android*) 62271e423a8fSmrg version_type=none # Android doesn't support versioned libraries. 62281e423a8fSmrg need_lib_prefix=no 62291e423a8fSmrg need_version=no 62301e423a8fSmrg library_names_spec='$libname$release$shared_ext' 62311e423a8fSmrg soname_spec='$libname$release$shared_ext' 62321e423a8fSmrg finish_cmds= 62331e423a8fSmrg shlibpath_var=LD_LIBRARY_PATH 62341e423a8fSmrg shlibpath_overrides_runpath=yes 6235fe5e51b7Smrg 62361e423a8fSmrg # This implies no fast_install, which is unacceptable. 62371e423a8fSmrg # Some rework will be needed to allow for fast_install 62381e423a8fSmrg # before this can be enabled. 62391e423a8fSmrg hardcode_into_libs=yes 6240fe5e51b7Smrg 62411e423a8fSmrg dynamic_linker='Android linker' 62421e423a8fSmrg # Don't embed -rpath directories since the linker doesn't support them. 62431e423a8fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 62441e423a8fSmrg ;; 6245a31a186aSmrg 62461e423a8fSmrg# This must be glibc/ELF. 62471e423a8fSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 62481e423a8fSmrg version_type=linux # correct to gnu/linux during the next big refactor 62491e423a8fSmrg need_lib_prefix=no 62501e423a8fSmrg need_version=no 62511e423a8fSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 62521e423a8fSmrg soname_spec='$libname$release$shared_ext$major' 62531e423a8fSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 62541e423a8fSmrg shlibpath_var=LD_LIBRARY_PATH 62551e423a8fSmrg shlibpath_overrides_runpath=no 6256a31a186aSmrg 62571e423a8fSmrg # Some binutils ld are patched to set DT_RUNPATH 62581e423a8fSmrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 62591e423a8fSmrg [lt_cv_shlibpath_overrides_runpath=no 62601e423a8fSmrg save_LDFLAGS=$LDFLAGS 62611e423a8fSmrg save_libdir=$libdir 62621e423a8fSmrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 62631e423a8fSmrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 62641e423a8fSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 62651e423a8fSmrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 62661e423a8fSmrg [lt_cv_shlibpath_overrides_runpath=yes])]) 62671e423a8fSmrg LDFLAGS=$save_LDFLAGS 62681e423a8fSmrg libdir=$save_libdir 62691e423a8fSmrg ]) 62701e423a8fSmrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 6271a31a186aSmrg 62721e423a8fSmrg # This implies no fast_install, which is unacceptable. 62731e423a8fSmrg # Some rework will be needed to allow for fast_install 62741e423a8fSmrg # before this can be enabled. 62751e423a8fSmrg hardcode_into_libs=yes 6276fe5e51b7Smrg 62771e423a8fSmrg # Ideally, we could use ldconfig to report *all* directores which are 62781e423a8fSmrg # searched for libraries, however this is still not possible. Aside from not 62791e423a8fSmrg # being certain /sbin/ldconfig is available, command 62801e423a8fSmrg # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, 62811e423a8fSmrg # even though it is searched at run-time. Try to do the best guess by 62821e423a8fSmrg # appending ld.so.conf contents (and includes) to the search path. 62831e423a8fSmrg if test -f /etc/ld.so.conf; then 62841e423a8fSmrg 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' ' '` 62851e423a8fSmrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 62861e423a8fSmrg fi 6287fe5e51b7Smrg 62881e423a8fSmrg # We used to test for /lib/ld.so.1 and disable shared libraries on 62891e423a8fSmrg # powerpc, because MkLinux only supported shared libraries with the 62901e423a8fSmrg # GNU dynamic linker. Since this was broken with cross compilers, 62911e423a8fSmrg # most powerpc-linux boxes support dynamic linking these days and 62921e423a8fSmrg # people can always --disable-shared, the test was removed, and we 62931e423a8fSmrg # assume the GNU/Linux dynamic linker is in use. 62941e423a8fSmrg dynamic_linker='GNU/Linux ld.so' 62951e423a8fSmrg ;; 6296fe5e51b7Smrg 62971e423a8fSmrgnetbsd*) 62981e423a8fSmrg version_type=sunos 62991e423a8fSmrg need_lib_prefix=no 63001e423a8fSmrg need_version=no 63011e423a8fSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 63021e423a8fSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 63031e423a8fSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 63041e423a8fSmrg dynamic_linker='NetBSD (a.out) ld.so' 63051e423a8fSmrg else 63061e423a8fSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 63071e423a8fSmrg soname_spec='$libname$release$shared_ext$major' 63081e423a8fSmrg dynamic_linker='NetBSD ld.elf_so' 63091e423a8fSmrg fi 63101e423a8fSmrg shlibpath_var=LD_LIBRARY_PATH 63111e423a8fSmrg shlibpath_overrides_runpath=yes 63121e423a8fSmrg hardcode_into_libs=yes 63131e423a8fSmrg ;; 6314fe5e51b7Smrg 63151e423a8fSmrgnewsos6) 63161e423a8fSmrg version_type=linux # correct to gnu/linux during the next big refactor 63171e423a8fSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 63181e423a8fSmrg shlibpath_var=LD_LIBRARY_PATH 63191e423a8fSmrg shlibpath_overrides_runpath=yes 63201e423a8fSmrg ;; 6321fe5e51b7Smrg 63221e423a8fSmrg*nto* | *qnx*) 63231e423a8fSmrg version_type=qnx 63241e423a8fSmrg need_lib_prefix=no 63251e423a8fSmrg need_version=no 63261e423a8fSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 63271e423a8fSmrg soname_spec='$libname$release$shared_ext$major' 63281e423a8fSmrg shlibpath_var=LD_LIBRARY_PATH 63291e423a8fSmrg shlibpath_overrides_runpath=no 63301e423a8fSmrg hardcode_into_libs=yes 63311e423a8fSmrg dynamic_linker='ldqnx.so' 63321e423a8fSmrg ;; 6333fe5e51b7Smrg 63341e423a8fSmrgopenbsd* | bitrig*) 63351e423a8fSmrg version_type=sunos 63361e423a8fSmrg sys_lib_dlsearch_path_spec=/usr/lib 63371e423a8fSmrg need_lib_prefix=no 63381e423a8fSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 63391e423a8fSmrg need_version=no 63401e423a8fSmrg else 63411e423a8fSmrg need_version=yes 63421e423a8fSmrg fi 63431e423a8fSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 63441e423a8fSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 63451e423a8fSmrg shlibpath_var=LD_LIBRARY_PATH 63461e423a8fSmrg shlibpath_overrides_runpath=yes 63471e423a8fSmrg ;; 6348fe5e51b7Smrg 63491e423a8fSmrgos2*) 63501e423a8fSmrg libname_spec='$name' 63511e423a8fSmrg version_type=windows 63521e423a8fSmrg shrext_cmds=.dll 63531e423a8fSmrg need_version=no 63541e423a8fSmrg need_lib_prefix=no 63551e423a8fSmrg # OS/2 can only load a DLL with a base name of 8 characters or less. 63561e423a8fSmrg soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; 63571e423a8fSmrg v=$($ECHO $release$versuffix | tr -d .-); 63581e423a8fSmrg n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); 63591e423a8fSmrg $ECHO $n$v`$shared_ext' 63601e423a8fSmrg library_names_spec='${libname}_dll.$libext' 63611e423a8fSmrg dynamic_linker='OS/2 ld.exe' 63621e423a8fSmrg shlibpath_var=BEGINLIBPATH 63631e423a8fSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 63641e423a8fSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 63651e423a8fSmrg postinstall_cmds='base_file=`basename \$file`~ 63661e423a8fSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ 63671e423a8fSmrg dldir=$destdir/`dirname \$dlpath`~ 63681e423a8fSmrg test -d \$dldir || mkdir -p \$dldir~ 63691e423a8fSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 63701e423a8fSmrg chmod a+x \$dldir/$dlname~ 63711e423a8fSmrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 63721e423a8fSmrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 63731e423a8fSmrg fi' 63741e423a8fSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ 63751e423a8fSmrg dlpath=$dir/\$dldll~ 63761e423a8fSmrg $RM \$dlpath' 63771e423a8fSmrg ;; 6378a31a186aSmrg 63791e423a8fSmrgosf3* | osf4* | osf5*) 63801e423a8fSmrg version_type=osf 63811e423a8fSmrg need_lib_prefix=no 63821e423a8fSmrg need_version=no 63831e423a8fSmrg soname_spec='$libname$release$shared_ext$major' 63841e423a8fSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 63851e423a8fSmrg shlibpath_var=LD_LIBRARY_PATH 63861e423a8fSmrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 63871e423a8fSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 63881e423a8fSmrg ;; 6389a31a186aSmrg 63901e423a8fSmrgrdos*) 63911e423a8fSmrg dynamic_linker=no 63921e423a8fSmrg ;; 6393a31a186aSmrg 63941e423a8fSmrgsolaris*) 63951e423a8fSmrg version_type=linux # correct to gnu/linux during the next big refactor 63961e423a8fSmrg need_lib_prefix=no 63971e423a8fSmrg need_version=no 63981e423a8fSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 63991e423a8fSmrg soname_spec='$libname$release$shared_ext$major' 64001e423a8fSmrg shlibpath_var=LD_LIBRARY_PATH 64011e423a8fSmrg shlibpath_overrides_runpath=yes 64021e423a8fSmrg hardcode_into_libs=yes 64031e423a8fSmrg # ldd complains unless libraries are executable 64041e423a8fSmrg postinstall_cmds='chmod +x $lib' 64051e423a8fSmrg ;; 6406a31a186aSmrg 64071e423a8fSmrgsunos4*) 64081e423a8fSmrg version_type=sunos 64091e423a8fSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 64101e423a8fSmrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 64111e423a8fSmrg shlibpath_var=LD_LIBRARY_PATH 64121e423a8fSmrg shlibpath_overrides_runpath=yes 64131e423a8fSmrg if test yes = "$with_gnu_ld"; then 64141e423a8fSmrg need_lib_prefix=no 64151e423a8fSmrg fi 64161e423a8fSmrg need_version=yes 64171e423a8fSmrg ;; 6418fe5e51b7Smrg 64191e423a8fSmrgsysv4 | sysv4.3*) 64201e423a8fSmrg version_type=linux # correct to gnu/linux during the next big refactor 64211e423a8fSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 64221e423a8fSmrg soname_spec='$libname$release$shared_ext$major' 64231e423a8fSmrg shlibpath_var=LD_LIBRARY_PATH 64241e423a8fSmrg case $host_vendor in 64251e423a8fSmrg sni) 64261e423a8fSmrg shlibpath_overrides_runpath=no 64271e423a8fSmrg need_lib_prefix=no 64281e423a8fSmrg runpath_var=LD_RUN_PATH 64291e423a8fSmrg ;; 64301e423a8fSmrg siemens) 64311e423a8fSmrg need_lib_prefix=no 64321e423a8fSmrg ;; 64331e423a8fSmrg motorola) 64341e423a8fSmrg need_lib_prefix=no 64351e423a8fSmrg need_version=no 64361e423a8fSmrg shlibpath_overrides_runpath=no 64371e423a8fSmrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 64381e423a8fSmrg ;; 64391e423a8fSmrg esac 64401e423a8fSmrg ;; 6441fe5e51b7Smrg 64421e423a8fSmrgsysv4*MP*) 64431e423a8fSmrg if test -d /usr/nec; then 64441e423a8fSmrg version_type=linux # correct to gnu/linux during the next big refactor 64451e423a8fSmrg library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' 64461e423a8fSmrg soname_spec='$libname$shared_ext.$major' 64471e423a8fSmrg shlibpath_var=LD_LIBRARY_PATH 64481e423a8fSmrg fi 64491e423a8fSmrg ;; 6450fe5e51b7Smrg 64511e423a8fSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 64521e423a8fSmrg version_type=sco 64531e423a8fSmrg need_lib_prefix=no 64541e423a8fSmrg need_version=no 64551e423a8fSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' 64561e423a8fSmrg soname_spec='$libname$release$shared_ext$major' 64571e423a8fSmrg shlibpath_var=LD_LIBRARY_PATH 64581e423a8fSmrg shlibpath_overrides_runpath=yes 64591e423a8fSmrg hardcode_into_libs=yes 64601e423a8fSmrg if test yes = "$with_gnu_ld"; then 64611e423a8fSmrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 64621e423a8fSmrg else 64631e423a8fSmrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 64641e423a8fSmrg case $host_os in 64651e423a8fSmrg sco3.2v5*) 64661e423a8fSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 64671e423a8fSmrg ;; 64681e423a8fSmrg esac 64691e423a8fSmrg fi 64701e423a8fSmrg sys_lib_dlsearch_path_spec='/usr/lib' 64711e423a8fSmrg ;; 6472ee82cb62Smrg 64731e423a8fSmrgtpf*) 64741e423a8fSmrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 64751e423a8fSmrg version_type=linux # correct to gnu/linux during the next big refactor 64761e423a8fSmrg need_lib_prefix=no 64771e423a8fSmrg need_version=no 64781e423a8fSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 64791e423a8fSmrg shlibpath_var=LD_LIBRARY_PATH 64801e423a8fSmrg shlibpath_overrides_runpath=no 64811e423a8fSmrg hardcode_into_libs=yes 64821e423a8fSmrg ;; 6483fe5e51b7Smrg 64841e423a8fSmrguts4*) 64851e423a8fSmrg version_type=linux # correct to gnu/linux during the next big refactor 64861e423a8fSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 64871e423a8fSmrg soname_spec='$libname$release$shared_ext$major' 64881e423a8fSmrg shlibpath_var=LD_LIBRARY_PATH 64891e423a8fSmrg ;; 64900bb88ba4Smrg 64911e423a8fSmrg*) 64921e423a8fSmrg dynamic_linker=no 64931e423a8fSmrg ;; 64940bb88ba4Smrgesac 64951e423a8fSmrgAC_MSG_RESULT([$dynamic_linker]) 64961e423a8fSmrgtest no = "$dynamic_linker" && can_build_shared=no 64970bb88ba4Smrg 64981e423a8fSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 64991e423a8fSmrgif test yes = "$GCC"; then 65001e423a8fSmrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 65011e423a8fSmrgfi 6502fe5e51b7Smrg 65031e423a8fSmrgif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then 65041e423a8fSmrg sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec 65051e423a8fSmrgfi 6506fe5e51b7Smrg 65071e423a8fSmrgif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then 65081e423a8fSmrg sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec 65091e423a8fSmrgfi 6510fe5e51b7Smrg 65111e423a8fSmrg# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... 65121e423a8fSmrgconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec 6513fe5e51b7Smrg 65141e423a8fSmrg# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code 65151e423a8fSmrgfunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" 6516fe5e51b7Smrg 65171e423a8fSmrg# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool 65181e423a8fSmrgconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH 6519fe5e51b7Smrg 65201e423a8fSmrg_LT_DECL([], [variables_saved_for_relink], [1], 65211e423a8fSmrg [Variables whose values should be saved in libtool wrapper scripts and 65221e423a8fSmrg restored at link time]) 65231e423a8fSmrg_LT_DECL([], [need_lib_prefix], [0], 65241e423a8fSmrg [Do we need the "lib" prefix for modules?]) 65251e423a8fSmrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 65261e423a8fSmrg_LT_DECL([], [version_type], [0], [Library versioning type]) 65271e423a8fSmrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 65281e423a8fSmrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 65291e423a8fSmrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 65301e423a8fSmrg [Is shlibpath searched before the hard-coded library search path?]) 65311e423a8fSmrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 65321e423a8fSmrg_LT_DECL([], [library_names_spec], [1], 65331e423a8fSmrg [[List of archive names. First name is the real one, the rest are links. 65341e423a8fSmrg The last name is the one that the linker finds with -lNAME]]) 65351e423a8fSmrg_LT_DECL([], [soname_spec], [1], 65361e423a8fSmrg [[The coded name of the library, if different from the real name]]) 65371e423a8fSmrg_LT_DECL([], [install_override_mode], [1], 65381e423a8fSmrg [Permission mode override for installation of shared libraries]) 65391e423a8fSmrg_LT_DECL([], [postinstall_cmds], [2], 65401e423a8fSmrg [Command to use after installation of a shared archive]) 65411e423a8fSmrg_LT_DECL([], [postuninstall_cmds], [2], 65421e423a8fSmrg [Command to use after uninstallation of a shared archive]) 65431e423a8fSmrg_LT_DECL([], [finish_cmds], [2], 65441e423a8fSmrg [Commands used to finish a libtool library installation in a directory]) 65451e423a8fSmrg_LT_DECL([], [finish_eval], [1], 65461e423a8fSmrg [[As "finish_cmds", except a single script fragment to be evaled but 65471e423a8fSmrg not shown]]) 65481e423a8fSmrg_LT_DECL([], [hardcode_into_libs], [0], 65491e423a8fSmrg [Whether we should hardcode library paths into libraries]) 65501e423a8fSmrg_LT_DECL([], [sys_lib_search_path_spec], [2], 65511e423a8fSmrg [Compile-time system search path for libraries]) 65521e423a8fSmrg_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], 65531e423a8fSmrg [Detected run-time system search path for libraries]) 65541e423a8fSmrg_LT_DECL([], [configure_time_lt_sys_library_path], [2], 65551e423a8fSmrg [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) 65561e423a8fSmrg])# _LT_SYS_DYNAMIC_LINKER 6557fe5e51b7Smrg 6558fe5e51b7Smrg 65591e423a8fSmrg# _LT_PATH_TOOL_PREFIX(TOOL) 65601e423a8fSmrg# -------------------------- 65611e423a8fSmrg# find a file program that can recognize shared library 65621e423a8fSmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 65631e423a8fSmrg[m4_require([_LT_DECL_EGREP])dnl 65641e423a8fSmrgAC_MSG_CHECKING([for $1]) 65651e423a8fSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 65661e423a8fSmrg[case $MAGIC_CMD in 65671e423a8fSmrg[[\\/*] | ?:[\\/]*]) 65681e423a8fSmrg lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. 65691e423a8fSmrg ;; 65701e423a8fSmrg*) 65711e423a8fSmrg lt_save_MAGIC_CMD=$MAGIC_CMD 65721e423a8fSmrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 65731e423a8fSmrgdnl $ac_dummy forces splitting on constant user-supplied paths. 65741e423a8fSmrgdnl POSIX.2 word splitting is done only on the output of word expansions, 65751e423a8fSmrgdnl not every word. This closes a longstanding sh security hole. 65761e423a8fSmrg ac_dummy="m4_if([$2], , $PATH, [$2])" 65771e423a8fSmrg for ac_dir in $ac_dummy; do 65781e423a8fSmrg IFS=$lt_save_ifs 65791e423a8fSmrg test -z "$ac_dir" && ac_dir=. 65801e423a8fSmrg if test -f "$ac_dir/$1"; then 65811e423a8fSmrg lt_cv_path_MAGIC_CMD=$ac_dir/"$1" 65821e423a8fSmrg if test -n "$file_magic_test_file"; then 65831e423a8fSmrg case $deplibs_check_method in 65841e423a8fSmrg "file_magic "*) 65851e423a8fSmrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 65861e423a8fSmrg MAGIC_CMD=$lt_cv_path_MAGIC_CMD 65871e423a8fSmrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 65881e423a8fSmrg $EGREP "$file_magic_regex" > /dev/null; then 65891e423a8fSmrg : 65901e423a8fSmrg else 65911e423a8fSmrg cat <<_LT_EOF 1>&2 6592fe5e51b7Smrg 65931e423a8fSmrg*** Warning: the command libtool uses to detect shared libraries, 65941e423a8fSmrg*** $file_magic_cmd, produces output that libtool cannot recognize. 65951e423a8fSmrg*** The result is that libtool may fail to recognize shared libraries 65961e423a8fSmrg*** as such. This will affect the creation of libtool libraries that 65971e423a8fSmrg*** depend on shared libraries, but programs linked with such libtool 65981e423a8fSmrg*** libraries will work regardless of this problem. Nevertheless, you 65991e423a8fSmrg*** may want to report the problem to your system manager and/or to 66001e423a8fSmrg*** bug-libtool@gnu.org 6601fe5e51b7Smrg 66021e423a8fSmrg_LT_EOF 66031e423a8fSmrg fi ;; 66041e423a8fSmrg esac 66051e423a8fSmrg fi 66061e423a8fSmrg break 66071e423a8fSmrg fi 66081e423a8fSmrg done 66091e423a8fSmrg IFS=$lt_save_ifs 66101e423a8fSmrg MAGIC_CMD=$lt_save_MAGIC_CMD 6611a31a186aSmrg ;; 66121e423a8fSmrgesac]) 66131e423a8fSmrgMAGIC_CMD=$lt_cv_path_MAGIC_CMD 66141e423a8fSmrgif test -n "$MAGIC_CMD"; then 66151e423a8fSmrg AC_MSG_RESULT($MAGIC_CMD) 66161e423a8fSmrgelse 66171e423a8fSmrg AC_MSG_RESULT(no) 6618a31a186aSmrgfi 66191e423a8fSmrg_LT_DECL([], [MAGIC_CMD], [0], 66201e423a8fSmrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 66211e423a8fSmrg])# _LT_PATH_TOOL_PREFIX 66221e423a8fSmrg 66231e423a8fSmrg# Old name: 66241e423a8fSmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 66251e423a8fSmrgdnl aclocal-1.4 backwards compatibility: 66261e423a8fSmrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 6627a31a186aSmrg 6628a31a186aSmrg 66291e423a8fSmrg# _LT_PATH_MAGIC 66301e423a8fSmrg# -------------- 66311e423a8fSmrg# find a file program that can recognize a shared library 66321e423a8fSmrgm4_defun([_LT_PATH_MAGIC], 66331e423a8fSmrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 66341e423a8fSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then 66351e423a8fSmrg if test -n "$ac_tool_prefix"; then 66361e423a8fSmrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 66371e423a8fSmrg else 66381e423a8fSmrg MAGIC_CMD=: 66391e423a8fSmrg fi 66400bb88ba4Smrgfi 66411e423a8fSmrg])# _LT_PATH_MAGIC 6642eda3803bSmrg 6643fe5e51b7Smrg 66441e423a8fSmrg# LT_PATH_LD 66451e423a8fSmrg# ---------- 66461e423a8fSmrg# find the pathname to the GNU or non-GNU linker 66471e423a8fSmrgAC_DEFUN([LT_PATH_LD], 66481e423a8fSmrg[AC_REQUIRE([AC_PROG_CC])dnl 66491e423a8fSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 66501e423a8fSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 66511e423a8fSmrgm4_require([_LT_DECL_SED])dnl 66521e423a8fSmrgm4_require([_LT_DECL_EGREP])dnl 66531e423a8fSmrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 6654eda3803bSmrg 66551e423a8fSmrgAC_ARG_WITH([gnu-ld], 66561e423a8fSmrg [AS_HELP_STRING([--with-gnu-ld], 66571e423a8fSmrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 66581e423a8fSmrg [test no = "$withval" || with_gnu_ld=yes], 66591e423a8fSmrg [with_gnu_ld=no])dnl 6660a31a186aSmrg 66611e423a8fSmrgac_prog=ld 66621e423a8fSmrgif test yes = "$GCC"; then 66631e423a8fSmrg # Check if gcc -print-prog-name=ld gives a path. 66641e423a8fSmrg AC_MSG_CHECKING([for ld used by $CC]) 66651e423a8fSmrg case $host in 66661e423a8fSmrg *-*-mingw*) 66671e423a8fSmrg # gcc leaves a trailing carriage return, which upsets mingw 66681e423a8fSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 66691e423a8fSmrg *) 66701e423a8fSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 66711e423a8fSmrg esac 66721e423a8fSmrg case $ac_prog in 66731e423a8fSmrg # Accept absolute paths. 66741e423a8fSmrg [[\\/]]* | ?:[[\\/]]*) 66751e423a8fSmrg re_direlt='/[[^/]][[^/]]*/\.\./' 66761e423a8fSmrg # Canonicalize the pathname of ld 66771e423a8fSmrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 66781e423a8fSmrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 66791e423a8fSmrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 66801e423a8fSmrg done 66811e423a8fSmrg test -z "$LD" && LD=$ac_prog 66821e423a8fSmrg ;; 66831e423a8fSmrg "") 66841e423a8fSmrg # If it fails, then pretend we aren't using GCC. 66851e423a8fSmrg ac_prog=ld 66861e423a8fSmrg ;; 66871e423a8fSmrg *) 66881e423a8fSmrg # If it is relative, then search for the first ld in PATH. 66891e423a8fSmrg with_gnu_ld=unknown 66901e423a8fSmrg ;; 66911e423a8fSmrg esac 66921e423a8fSmrgelif test yes = "$with_gnu_ld"; then 66931e423a8fSmrg AC_MSG_CHECKING([for GNU ld]) 66941e423a8fSmrgelse 66951e423a8fSmrg AC_MSG_CHECKING([for non-GNU ld]) 66961e423a8fSmrgfi 66971e423a8fSmrgAC_CACHE_VAL(lt_cv_path_LD, 66981e423a8fSmrg[if test -z "$LD"; then 66991e423a8fSmrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 67001e423a8fSmrg for ac_dir in $PATH; do 67011e423a8fSmrg IFS=$lt_save_ifs 67021e423a8fSmrg test -z "$ac_dir" && ac_dir=. 67031e423a8fSmrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 67041e423a8fSmrg lt_cv_path_LD=$ac_dir/$ac_prog 67051e423a8fSmrg # Check to see if the program is GNU ld. I'd rather use --version, 67061e423a8fSmrg # but apparently some variants of GNU ld only accept -v. 67071e423a8fSmrg # Break only if it was the GNU/non-GNU ld that we prefer. 67081e423a8fSmrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 67091e423a8fSmrg *GNU* | *'with BFD'*) 67101e423a8fSmrg test no != "$with_gnu_ld" && break 67111e423a8fSmrg ;; 67121e423a8fSmrg *) 67131e423a8fSmrg test yes != "$with_gnu_ld" && break 67141e423a8fSmrg ;; 67151e423a8fSmrg esac 67161e423a8fSmrg fi 67171e423a8fSmrg done 67181e423a8fSmrg IFS=$lt_save_ifs 67191e423a8fSmrgelse 67201e423a8fSmrg lt_cv_path_LD=$LD # Let the user override the test with a path. 67211e423a8fSmrgfi]) 67221e423a8fSmrgLD=$lt_cv_path_LD 67231e423a8fSmrgif test -n "$LD"; then 67241e423a8fSmrg AC_MSG_RESULT($LD) 67251e423a8fSmrgelse 67261e423a8fSmrg AC_MSG_RESULT(no) 67271e423a8fSmrgfi 67281e423a8fSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 67291e423a8fSmrg_LT_PATH_LD_GNU 67301e423a8fSmrgAC_SUBST([LD]) 6731eda3803bSmrg 67321e423a8fSmrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 67331e423a8fSmrg])# LT_PATH_LD 6734fe5e51b7Smrg 67351e423a8fSmrg# Old names: 67361e423a8fSmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 67371e423a8fSmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 67381e423a8fSmrgdnl aclocal-1.4 backwards compatibility: 67391e423a8fSmrgdnl AC_DEFUN([AM_PROG_LD], []) 67401e423a8fSmrgdnl AC_DEFUN([AC_PROG_LD], []) 6741fe5e51b7Smrg 6742eda3803bSmrg 67431e423a8fSmrg# _LT_PATH_LD_GNU 67441e423a8fSmrg#- -------------- 67451e423a8fSmrgm4_defun([_LT_PATH_LD_GNU], 67461e423a8fSmrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 67471e423a8fSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 67481e423a8fSmrgcase `$LD -v 2>&1 </dev/null` in 67491e423a8fSmrg*GNU* | *'with BFD'*) 67501e423a8fSmrg lt_cv_prog_gnu_ld=yes 67511e423a8fSmrg ;; 67521e423a8fSmrg*) 67531e423a8fSmrg lt_cv_prog_gnu_ld=no 67541e423a8fSmrg ;; 67551e423a8fSmrgesac]) 67561e423a8fSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 67571e423a8fSmrg])# _LT_PATH_LD_GNU 6758eda3803bSmrg 6759a31a186aSmrg 67601e423a8fSmrg# _LT_CMD_RELOAD 67611e423a8fSmrg# -------------- 67621e423a8fSmrg# find reload flag for linker 67631e423a8fSmrg# -- PORTME Some linkers may need a different reload flag. 67641e423a8fSmrgm4_defun([_LT_CMD_RELOAD], 67651e423a8fSmrg[AC_CACHE_CHECK([for $LD option to reload object files], 67661e423a8fSmrg lt_cv_ld_reload_flag, 67671e423a8fSmrg [lt_cv_ld_reload_flag='-r']) 67681e423a8fSmrgreload_flag=$lt_cv_ld_reload_flag 67691e423a8fSmrgcase $reload_flag in 67701e423a8fSmrg"" | " "*) ;; 67711e423a8fSmrg*) reload_flag=" $reload_flag" ;; 67721e423a8fSmrgesac 67731e423a8fSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 67741e423a8fSmrgcase $host_os in 67751e423a8fSmrg cygwin* | mingw* | pw32* | cegcc*) 67761e423a8fSmrg if test yes != "$GCC"; then 67771e423a8fSmrg reload_cmds=false 67781e423a8fSmrg fi 67791e423a8fSmrg ;; 67801e423a8fSmrg darwin*) 67811e423a8fSmrg if test yes = "$GCC"; then 67821e423a8fSmrg reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' 67831e423a8fSmrg else 67841e423a8fSmrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 67851e423a8fSmrg fi 67861e423a8fSmrg ;; 67871e423a8fSmrgesac 67881e423a8fSmrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 67891e423a8fSmrg_LT_TAGDECL([], [reload_cmds], [2])dnl 67901e423a8fSmrg])# _LT_CMD_RELOAD 6791a31a186aSmrg 6792a31a186aSmrg 67931e423a8fSmrg# _LT_PATH_DD 67941e423a8fSmrg# ----------- 67951e423a8fSmrg# find a working dd 67961e423a8fSmrgm4_defun([_LT_PATH_DD], 67971e423a8fSmrg[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD], 67981e423a8fSmrg[printf 0123456789abcdef0123456789abcdef >conftest.i 67991e423a8fSmrgcat conftest.i conftest.i >conftest2.i 68001e423a8fSmrg: ${lt_DD:=$DD} 68011e423a8fSmrgAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], 68021e423a8fSmrg[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 68031e423a8fSmrg cmp -s conftest.i conftest.out \ 68041e423a8fSmrg && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: 68051e423a8fSmrgfi]) 68061e423a8fSmrgrm -f conftest.i conftest2.i conftest.out]) 68071e423a8fSmrg])# _LT_PATH_DD 6808a31a186aSmrg 6809a31a186aSmrg 68101e423a8fSmrg# _LT_CMD_TRUNCATE 68111e423a8fSmrg# ---------------- 68121e423a8fSmrg# find command to truncate a binary pipe 68131e423a8fSmrgm4_defun([_LT_CMD_TRUNCATE], 68141e423a8fSmrg[m4_require([_LT_PATH_DD]) 68151e423a8fSmrgAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], 68161e423a8fSmrg[printf 0123456789abcdef0123456789abcdef >conftest.i 68171e423a8fSmrgcat conftest.i conftest.i >conftest2.i 68181e423a8fSmrglt_cv_truncate_bin= 68191e423a8fSmrgif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 68201e423a8fSmrg cmp -s conftest.i conftest.out \ 68211e423a8fSmrg && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" 68221e423a8fSmrgfi 68231e423a8fSmrgrm -f conftest.i conftest2.i conftest.out 68241e423a8fSmrgtest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) 68251e423a8fSmrg_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], 68261e423a8fSmrg [Command to truncate a binary pipe]) 68271e423a8fSmrg])# _LT_CMD_TRUNCATE 6828eda3803bSmrg 6829eda3803bSmrg 68301e423a8fSmrg# _LT_CHECK_MAGIC_METHOD 68311e423a8fSmrg# ---------------------- 68321e423a8fSmrg# how to check for library dependencies 68331e423a8fSmrg# -- PORTME fill in with the dynamic library characteristics 68341e423a8fSmrgm4_defun([_LT_CHECK_MAGIC_METHOD], 68351e423a8fSmrg[m4_require([_LT_DECL_EGREP]) 68361e423a8fSmrgm4_require([_LT_DECL_OBJDUMP]) 68371e423a8fSmrgAC_CACHE_CHECK([how to recognize dependent libraries], 68381e423a8fSmrglt_cv_deplibs_check_method, 68391e423a8fSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 68401e423a8fSmrglt_cv_file_magic_test_file= 68411e423a8fSmrglt_cv_deplibs_check_method='unknown' 68421e423a8fSmrg# Need to set the preceding variable on all platforms that support 68431e423a8fSmrg# interlibrary dependencies. 68441e423a8fSmrg# 'none' -- dependencies not supported. 68451e423a8fSmrg# 'unknown' -- same as none, but documents that we really don't know. 68461e423a8fSmrg# 'pass_all' -- all dependencies passed with no checks. 68471e423a8fSmrg# 'test_compile' -- check by making test program. 68481e423a8fSmrg# 'file_magic [[regex]]' -- check by looking for files in library path 68491e423a8fSmrg# that responds to the $file_magic_cmd with a given extended regex. 68501e423a8fSmrg# If you have 'file' or equivalent on your system and you're not sure 68511e423a8fSmrg# whether 'pass_all' will *always* work, you probably want this one. 6852fe5e51b7Smrg 68531e423a8fSmrgcase $host_os in 68541e423a8fSmrgaix[[4-9]]*) 68551e423a8fSmrg lt_cv_deplibs_check_method=pass_all 68561e423a8fSmrg ;; 68570bb88ba4Smrg 68581e423a8fSmrgbeos*) 68591e423a8fSmrg lt_cv_deplibs_check_method=pass_all 68601e423a8fSmrg ;; 6861a31a186aSmrg 68621e423a8fSmrgbsdi[[45]]*) 68631e423a8fSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 68641e423a8fSmrg lt_cv_file_magic_cmd='$FILECMD -L' 68651e423a8fSmrg lt_cv_file_magic_test_file=/shlib/libc.so 68661e423a8fSmrg ;; 6867a31a186aSmrg 68681e423a8fSmrgcygwin*) 68691e423a8fSmrg # func_win32_libid is a shell function defined in ltmain.sh 68701e423a8fSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 68711e423a8fSmrg lt_cv_file_magic_cmd='func_win32_libid' 68721e423a8fSmrg ;; 6873a31a186aSmrg 68741e423a8fSmrgmingw* | pw32*) 68751e423a8fSmrg # Base MSYS/MinGW do not provide the 'file' command needed by 68761e423a8fSmrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 68771e423a8fSmrg # unless we find 'file', for example because we are cross-compiling. 68781e423a8fSmrg if ( file / ) >/dev/null 2>&1; then 68791e423a8fSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 68801e423a8fSmrg lt_cv_file_magic_cmd='func_win32_libid' 68811e423a8fSmrg else 68821e423a8fSmrg # Keep this pattern in sync with the one in func_win32_libid. 68831e423a8fSmrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 68841e423a8fSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 68851e423a8fSmrg fi 68861e423a8fSmrg ;; 6887a31a186aSmrg 68881e423a8fSmrgcegcc*) 68891e423a8fSmrg # use the weaker test based on 'objdump'. See mingw*. 68901e423a8fSmrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 68911e423a8fSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 68921e423a8fSmrg ;; 6893fe5e51b7Smrg 68941e423a8fSmrgdarwin* | rhapsody*) 68951e423a8fSmrg lt_cv_deplibs_check_method=pass_all 68961e423a8fSmrg ;; 6897fe5e51b7Smrg 68981e423a8fSmrgfreebsd* | dragonfly* | midnightbsd*) 68991e423a8fSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 69001e423a8fSmrg case $host_cpu in 69011e423a8fSmrg i*86 ) 69021e423a8fSmrg # Not sure whether the presence of OpenBSD here was a mistake. 69031e423a8fSmrg # Let's accept both of them until this is cleared up. 69041e423a8fSmrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 69051e423a8fSmrg lt_cv_file_magic_cmd=$FILECMD 69061e423a8fSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 69071e423a8fSmrg ;; 6908643b027fSmrg esac 69091e423a8fSmrg else 69101e423a8fSmrg lt_cv_deplibs_check_method=pass_all 69111e423a8fSmrg fi 69121e423a8fSmrg ;; 6913a31a186aSmrg 69141e423a8fSmrghaiku*) 69151e423a8fSmrg lt_cv_deplibs_check_method=pass_all 69161e423a8fSmrg ;; 6917a31a186aSmrg 69181e423a8fSmrghpux10.20* | hpux11*) 69191e423a8fSmrg lt_cv_file_magic_cmd=$FILECMD 69201e423a8fSmrg case $host_cpu in 69211e423a8fSmrg ia64*) 69221e423a8fSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 69231e423a8fSmrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 69241e423a8fSmrg ;; 69251e423a8fSmrg hppa*64*) 69261e423a8fSmrg [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]'] 69271e423a8fSmrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 69281e423a8fSmrg ;; 69291e423a8fSmrg *) 69301e423a8fSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 69311e423a8fSmrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 69321e423a8fSmrg ;; 69331e423a8fSmrg esac 69341e423a8fSmrg ;; 6935a31a186aSmrg 69361e423a8fSmrginterix[[3-9]]*) 69371e423a8fSmrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 69381e423a8fSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 69391e423a8fSmrg ;; 6940a31a186aSmrg 69411e423a8fSmrgirix5* | irix6* | nonstopux*) 69421e423a8fSmrg case $LD in 69431e423a8fSmrg *-32|*"-32 ") libmagic=32-bit;; 69441e423a8fSmrg *-n32|*"-n32 ") libmagic=N32;; 69451e423a8fSmrg *-64|*"-64 ") libmagic=64-bit;; 69461e423a8fSmrg *) libmagic=never-match;; 69471e423a8fSmrg esac 69481e423a8fSmrg lt_cv_deplibs_check_method=pass_all 69491e423a8fSmrg ;; 6950a31a186aSmrg 69511e423a8fSmrg# This must be glibc/ELF. 69521e423a8fSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 69531e423a8fSmrg lt_cv_deplibs_check_method=pass_all 69541e423a8fSmrg ;; 6955eda3803bSmrg 69561e423a8fSmrgnetbsd*) 69571e423a8fSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 69581e423a8fSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 69591e423a8fSmrg else 69601e423a8fSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 69611e423a8fSmrg fi 69621e423a8fSmrg ;; 6963eda3803bSmrg 69641e423a8fSmrgnewos6*) 69651e423a8fSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 69661e423a8fSmrg lt_cv_file_magic_cmd=$FILECMD 69671e423a8fSmrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 69681e423a8fSmrg ;; 6969eda3803bSmrg 69701e423a8fSmrg*nto* | *qnx*) 69711e423a8fSmrg lt_cv_deplibs_check_method=pass_all 69721e423a8fSmrg ;; 6973eda3803bSmrg 69741e423a8fSmrgopenbsd* | bitrig*) 69751e423a8fSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 69761e423a8fSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 69771e423a8fSmrg else 69781e423a8fSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 69791e423a8fSmrg fi 69801e423a8fSmrg ;; 6981eda3803bSmrg 69821e423a8fSmrgosf3* | osf4* | osf5*) 69831e423a8fSmrg lt_cv_deplibs_check_method=pass_all 69841e423a8fSmrg ;; 6985eda3803bSmrg 69861e423a8fSmrgrdos*) 69871e423a8fSmrg lt_cv_deplibs_check_method=pass_all 69881e423a8fSmrg ;; 6989eda3803bSmrg 69901e423a8fSmrgsolaris*) 69911e423a8fSmrg lt_cv_deplibs_check_method=pass_all 69921e423a8fSmrg ;; 6993fe5e51b7Smrg 69941e423a8fSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 69951e423a8fSmrg lt_cv_deplibs_check_method=pass_all 69961e423a8fSmrg ;; 6997fe5e51b7Smrg 69981e423a8fSmrgsysv4 | sysv4.3*) 69991e423a8fSmrg case $host_vendor in 70001e423a8fSmrg motorola) 70011e423a8fSmrg 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]]' 70021e423a8fSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 70031e423a8fSmrg ;; 70041e423a8fSmrg ncr) 70051e423a8fSmrg lt_cv_deplibs_check_method=pass_all 70061e423a8fSmrg ;; 70071e423a8fSmrg sequent) 70081e423a8fSmrg lt_cv_file_magic_cmd='/bin/file' 70091e423a8fSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 70101e423a8fSmrg ;; 70111e423a8fSmrg sni) 70121e423a8fSmrg lt_cv_file_magic_cmd='/bin/file' 70131e423a8fSmrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 70141e423a8fSmrg lt_cv_file_magic_test_file=/lib/libc.so 70151e423a8fSmrg ;; 70161e423a8fSmrg siemens) 70171e423a8fSmrg lt_cv_deplibs_check_method=pass_all 70181e423a8fSmrg ;; 70191e423a8fSmrg pc) 70201e423a8fSmrg lt_cv_deplibs_check_method=pass_all 70211e423a8fSmrg ;; 70221e423a8fSmrg esac 70231e423a8fSmrg ;; 7024fe5e51b7Smrg 70251e423a8fSmrgtpf*) 70261e423a8fSmrg lt_cv_deplibs_check_method=pass_all 70271e423a8fSmrg ;; 70281e423a8fSmrgos2*) 70291e423a8fSmrg lt_cv_deplibs_check_method=pass_all 70301e423a8fSmrg ;; 70311e423a8fSmrgesac 70321e423a8fSmrg]) 7033a31a186aSmrg 70341e423a8fSmrgfile_magic_glob= 70351e423a8fSmrgwant_nocaseglob=no 70361e423a8fSmrgif test "$build" = "$host"; then 70371e423a8fSmrg case $host_os in 70381e423a8fSmrg mingw* | pw32*) 70391e423a8fSmrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 70401e423a8fSmrg want_nocaseglob=yes 70411e423a8fSmrg else 70421e423a8fSmrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 70431e423a8fSmrg fi 70441e423a8fSmrg ;; 70451e423a8fSmrg esac 70461e423a8fSmrgfi 7047a31a186aSmrg 70481e423a8fSmrgfile_magic_cmd=$lt_cv_file_magic_cmd 70491e423a8fSmrgdeplibs_check_method=$lt_cv_deplibs_check_method 70501e423a8fSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 7051a31a186aSmrg 70521e423a8fSmrg_LT_DECL([], [deplibs_check_method], [1], 70531e423a8fSmrg [Method to check whether dependent libraries are shared objects]) 70541e423a8fSmrg_LT_DECL([], [file_magic_cmd], [1], 70551e423a8fSmrg [Command to use when deplibs_check_method = "file_magic"]) 70561e423a8fSmrg_LT_DECL([], [file_magic_glob], [1], 70571e423a8fSmrg [How to find potential files when deplibs_check_method = "file_magic"]) 70581e423a8fSmrg_LT_DECL([], [want_nocaseglob], [1], 70591e423a8fSmrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 70601e423a8fSmrg])# _LT_CHECK_MAGIC_METHOD 7061a31a186aSmrg 7062a31a186aSmrg 70631e423a8fSmrg# LT_PATH_NM 70641e423a8fSmrg# ---------- 70651e423a8fSmrg# find the pathname to a BSD- or MS-compatible name lister 70661e423a8fSmrgAC_DEFUN([LT_PATH_NM], 70671e423a8fSmrg[AC_REQUIRE([AC_PROG_CC])dnl 70681e423a8fSmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 70691e423a8fSmrg[if test -n "$NM"; then 70701e423a8fSmrg # Let the user override the test. 70711e423a8fSmrg lt_cv_path_NM=$NM 70721e423a8fSmrgelse 70731e423a8fSmrg lt_nm_to_check=${ac_tool_prefix}nm 70741e423a8fSmrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 70751e423a8fSmrg lt_nm_to_check="$lt_nm_to_check nm" 70761e423a8fSmrg fi 70771e423a8fSmrg for lt_tmp_nm in $lt_nm_to_check; do 70781e423a8fSmrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 70791e423a8fSmrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 70801e423a8fSmrg IFS=$lt_save_ifs 70811e423a8fSmrg test -z "$ac_dir" && ac_dir=. 70821e423a8fSmrg tmp_nm=$ac_dir/$lt_tmp_nm 70831e423a8fSmrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then 70841e423a8fSmrg # Check to see if the nm accepts a BSD-compat flag. 70851e423a8fSmrg # Adding the 'sed 1q' prevents false positives on HP-UX, which says: 70861e423a8fSmrg # nm: unknown option "B" ignored 70871e423a8fSmrg # Tru64's nm complains that /dev/null is an invalid object file 70881e423a8fSmrg # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty 70891e423a8fSmrg case $build_os in 70901e423a8fSmrg mingw*) lt_bad_file=conftest.nm/nofile ;; 70911e423a8fSmrg *) lt_bad_file=/dev/null ;; 70921e423a8fSmrg esac 70931e423a8fSmrg case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in 70941e423a8fSmrg *$lt_bad_file* | *'Invalid file or object type'*) 70951e423a8fSmrg lt_cv_path_NM="$tmp_nm -B" 70961e423a8fSmrg break 2 70971e423a8fSmrg ;; 70981e423a8fSmrg *) 70991e423a8fSmrg case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in 71001e423a8fSmrg */dev/null*) 71011e423a8fSmrg lt_cv_path_NM="$tmp_nm -p" 71021e423a8fSmrg break 2 71031e423a8fSmrg ;; 71041e423a8fSmrg *) 71051e423a8fSmrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 71061e423a8fSmrg continue # so that we can try to find one that supports BSD flags 71071e423a8fSmrg ;; 71081e423a8fSmrg esac 71091e423a8fSmrg ;; 71101e423a8fSmrg esac 71111e423a8fSmrg fi 71121e423a8fSmrg done 71131e423a8fSmrg IFS=$lt_save_ifs 71141e423a8fSmrg done 71151e423a8fSmrg : ${lt_cv_path_NM=no} 71161e423a8fSmrgfi]) 71171e423a8fSmrgif test no != "$lt_cv_path_NM"; then 71181e423a8fSmrg NM=$lt_cv_path_NM 71191e423a8fSmrgelse 71201e423a8fSmrg # Didn't find any BSD compatible name lister, look for dumpbin. 71211e423a8fSmrg if test -n "$DUMPBIN"; then : 71221e423a8fSmrg # Let the user override the test. 71231e423a8fSmrg else 71241e423a8fSmrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 71251e423a8fSmrg case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in 71261e423a8fSmrg *COFF*) 71271e423a8fSmrg DUMPBIN="$DUMPBIN -symbols -headers" 71281e423a8fSmrg ;; 71291e423a8fSmrg *) 71301e423a8fSmrg DUMPBIN=: 71311e423a8fSmrg ;; 71321e423a8fSmrg esac 71331e423a8fSmrg fi 71341e423a8fSmrg AC_SUBST([DUMPBIN]) 71351e423a8fSmrg if test : != "$DUMPBIN"; then 71361e423a8fSmrg NM=$DUMPBIN 71371e423a8fSmrg fi 71381e423a8fSmrgfi 71391e423a8fSmrgtest -z "$NM" && NM=nm 71401e423a8fSmrgAC_SUBST([NM]) 71411e423a8fSmrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 7142a31a186aSmrg 71431e423a8fSmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 71441e423a8fSmrg [lt_cv_nm_interface="BSD nm" 71451e423a8fSmrg echo "int some_variable = 0;" > conftest.$ac_ext 71461e423a8fSmrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 71471e423a8fSmrg (eval "$ac_compile" 2>conftest.err) 71481e423a8fSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 71491e423a8fSmrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 71501e423a8fSmrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 71511e423a8fSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 71521e423a8fSmrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 71531e423a8fSmrg cat conftest.out >&AS_MESSAGE_LOG_FD 71541e423a8fSmrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 71551e423a8fSmrg lt_cv_nm_interface="MS dumpbin" 71561e423a8fSmrg fi 71571e423a8fSmrg rm -f conftest*]) 71581e423a8fSmrg])# LT_PATH_NM 7159a31a186aSmrg 71601e423a8fSmrg# Old names: 71611e423a8fSmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 71621e423a8fSmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 71631e423a8fSmrgdnl aclocal-1.4 backwards compatibility: 71641e423a8fSmrgdnl AC_DEFUN([AM_PROG_NM], []) 71651e423a8fSmrgdnl AC_DEFUN([AC_PROG_NM], []) 7166a31a186aSmrg 71671e423a8fSmrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 71681e423a8fSmrg# -------------------------------- 71691e423a8fSmrg# how to determine the name of the shared library 71701e423a8fSmrg# associated with a specific link library. 71711e423a8fSmrg# -- PORTME fill in with the dynamic library characteristics 71721e423a8fSmrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 71731e423a8fSmrg[m4_require([_LT_DECL_EGREP]) 71741e423a8fSmrgm4_require([_LT_DECL_OBJDUMP]) 71751e423a8fSmrgm4_require([_LT_DECL_DLLTOOL]) 71761e423a8fSmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 71771e423a8fSmrglt_cv_sharedlib_from_linklib_cmd, 71781e423a8fSmrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 7179a31a186aSmrg 71801e423a8fSmrgcase $host_os in 71811e423a8fSmrgcygwin* | mingw* | pw32* | cegcc*) 71821e423a8fSmrg # two different shell functions defined in ltmain.sh; 71831e423a8fSmrg # decide which one to use based on capabilities of $DLLTOOL 71841e423a8fSmrg case `$DLLTOOL --help 2>&1` in 71851e423a8fSmrg *--identify-strict*) 71861e423a8fSmrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 71871e423a8fSmrg ;; 71881e423a8fSmrg *) 71891e423a8fSmrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 71901e423a8fSmrg ;; 71911e423a8fSmrg esac 71921e423a8fSmrg ;; 71931e423a8fSmrg*) 71941e423a8fSmrg # fallback: assume linklib IS sharedlib 71951e423a8fSmrg lt_cv_sharedlib_from_linklib_cmd=$ECHO 71961e423a8fSmrg ;; 71971e423a8fSmrgesac 71981e423a8fSmrg]) 71991e423a8fSmrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 72001e423a8fSmrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 7201a31a186aSmrg 72021e423a8fSmrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 72031e423a8fSmrg [Command to associate shared and link libraries]) 72041e423a8fSmrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 7205a31a186aSmrg 7206a31a186aSmrg 72071e423a8fSmrg# _LT_PATH_MANIFEST_TOOL 72081e423a8fSmrg# ---------------------- 72091e423a8fSmrg# locate the manifest tool 72101e423a8fSmrgm4_defun([_LT_PATH_MANIFEST_TOOL], 72111e423a8fSmrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 72121e423a8fSmrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 72131e423a8fSmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 72141e423a8fSmrg [lt_cv_path_mainfest_tool=no 72151e423a8fSmrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 72161e423a8fSmrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 72171e423a8fSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 72181e423a8fSmrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 72191e423a8fSmrg lt_cv_path_mainfest_tool=yes 72201e423a8fSmrg fi 72211e423a8fSmrg rm -f conftest*]) 72221e423a8fSmrgif test yes != "$lt_cv_path_mainfest_tool"; then 72231e423a8fSmrg MANIFEST_TOOL=: 72241e423a8fSmrgfi 72251e423a8fSmrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 72261e423a8fSmrg])# _LT_PATH_MANIFEST_TOOL 7227fe5e51b7Smrg 72280bb88ba4Smrg 72291e423a8fSmrg# _LT_DLL_DEF_P([FILE]) 72301e423a8fSmrg# --------------------- 72311e423a8fSmrg# True iff FILE is a Windows DLL '.def' file. 72321e423a8fSmrg# Keep in sync with func_dll_def_p in the libtool script 72331e423a8fSmrgAC_DEFUN([_LT_DLL_DEF_P], 72341e423a8fSmrg[dnl 72351e423a8fSmrg test DEF = "`$SED -n dnl 72361e423a8fSmrg -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace 72371e423a8fSmrg -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments 72381e423a8fSmrg -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl 72391e423a8fSmrg -e q dnl Only consider the first "real" line 72401e423a8fSmrg $1`" dnl 72411e423a8fSmrg])# _LT_DLL_DEF_P 72420bb88ba4Smrg 7243fe5e51b7Smrg 72441e423a8fSmrg# LT_LIB_M 72451e423a8fSmrg# -------- 72461e423a8fSmrg# check for math library 72471e423a8fSmrgAC_DEFUN([LT_LIB_M], 72481e423a8fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 72491e423a8fSmrgLIBM= 72501e423a8fSmrgcase $host in 72511e423a8fSmrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 72521e423a8fSmrg # These system don't have libm, or don't need it 72531e423a8fSmrg ;; 72541e423a8fSmrg*-ncr-sysv4.3*) 72551e423a8fSmrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) 72561e423a8fSmrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 72571e423a8fSmrg ;; 72581e423a8fSmrg*) 72591e423a8fSmrg AC_CHECK_LIB(m, cos, LIBM=-lm) 72601e423a8fSmrg ;; 72611e423a8fSmrgesac 72621e423a8fSmrgAC_SUBST([LIBM]) 72631e423a8fSmrg])# LT_LIB_M 72640bb88ba4Smrg 72651e423a8fSmrg# Old name: 72661e423a8fSmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 72671e423a8fSmrgdnl aclocal-1.4 backwards compatibility: 72681e423a8fSmrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 7269fe5e51b7Smrg 7270fe5e51b7Smrg 72711e423a8fSmrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 72721e423a8fSmrg# ------------------------------- 72731e423a8fSmrgm4_defun([_LT_COMPILER_NO_RTTI], 72741e423a8fSmrg[m4_require([_LT_TAG_COMPILER])dnl 7275fe5e51b7Smrg 72761e423a8fSmrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 72770bb88ba4Smrg 72781e423a8fSmrgif test yes = "$GCC"; then 72791e423a8fSmrg case $cc_basename in 72801e423a8fSmrg nvcc*) 72811e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 72821e423a8fSmrg *) 72831e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 72841e423a8fSmrg esac 72850bb88ba4Smrg 72861e423a8fSmrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 72871e423a8fSmrg lt_cv_prog_compiler_rtti_exceptions, 72881e423a8fSmrg [-fno-rtti -fno-exceptions], [], 72891e423a8fSmrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 72901e423a8fSmrgfi 72911e423a8fSmrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 72921e423a8fSmrg [Compiler flag to turn off builtin functions]) 72931e423a8fSmrg])# _LT_COMPILER_NO_RTTI 72940bb88ba4Smrg 72950bb88ba4Smrg 72961e423a8fSmrg# _LT_CMD_GLOBAL_SYMBOLS 72971e423a8fSmrg# ---------------------- 72981e423a8fSmrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 72991e423a8fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 73001e423a8fSmrgAC_REQUIRE([AC_PROG_CC])dnl 73011e423a8fSmrgAC_REQUIRE([AC_PROG_AWK])dnl 73021e423a8fSmrgAC_REQUIRE([LT_PATH_NM])dnl 73031e423a8fSmrgAC_REQUIRE([LT_PATH_LD])dnl 73041e423a8fSmrgm4_require([_LT_DECL_SED])dnl 73051e423a8fSmrgm4_require([_LT_DECL_EGREP])dnl 73061e423a8fSmrgm4_require([_LT_TAG_COMPILER])dnl 73070bb88ba4Smrg 73081e423a8fSmrg# Check for command to grab the raw symbol name followed by C symbol from nm. 73091e423a8fSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 73101e423a8fSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 73111e423a8fSmrg[ 73121e423a8fSmrg# These are sane defaults that work on at least a few old systems. 73131e423a8fSmrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 73140bb88ba4Smrg 73151e423a8fSmrg# Character class describing NM global symbol codes. 73161e423a8fSmrgsymcode='[[BCDEGRST]]' 73170bb88ba4Smrg 73181e423a8fSmrg# Regexp to match symbols that can be accessed directly from C. 73191e423a8fSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 73200bb88ba4Smrg 73211e423a8fSmrg# Define system-specific variables. 73221e423a8fSmrgcase $host_os in 73231e423a8fSmrgaix*) 73241e423a8fSmrg symcode='[[BCDT]]' 73251e423a8fSmrg ;; 73261e423a8fSmrgcygwin* | mingw* | pw32* | cegcc*) 73271e423a8fSmrg symcode='[[ABCDGISTW]]' 73281e423a8fSmrg ;; 73291e423a8fSmrghpux*) 73301e423a8fSmrg if test ia64 = "$host_cpu"; then 73311e423a8fSmrg symcode='[[ABCDEGRST]]' 73321e423a8fSmrg fi 73331e423a8fSmrg ;; 73341e423a8fSmrgirix* | nonstopux*) 73351e423a8fSmrg symcode='[[BCDEGRST]]' 73361e423a8fSmrg ;; 73371e423a8fSmrgosf*) 73381e423a8fSmrg symcode='[[BCDEGQRST]]' 73391e423a8fSmrg ;; 73401e423a8fSmrgsolaris*) 73411e423a8fSmrg symcode='[[BDRT]]' 73421e423a8fSmrg ;; 73431e423a8fSmrgsco3.2v5*) 73441e423a8fSmrg symcode='[[DT]]' 73451e423a8fSmrg ;; 73461e423a8fSmrgsysv4.2uw2*) 73471e423a8fSmrg symcode='[[DT]]' 73481e423a8fSmrg ;; 73491e423a8fSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 73501e423a8fSmrg symcode='[[ABDT]]' 73511e423a8fSmrg ;; 73521e423a8fSmrgsysv4) 73531e423a8fSmrg symcode='[[DFNSTU]]' 73541e423a8fSmrg ;; 73551e423a8fSmrgesac 73560bb88ba4Smrg 73571e423a8fSmrg# If we're using GNU nm, then use its standard symbol codes. 73581e423a8fSmrgcase `$NM -V 2>&1` in 73591e423a8fSmrg*GNU* | *'with BFD'*) 73601e423a8fSmrg symcode='[[ABCDGIRSTW]]' ;; 73611e423a8fSmrgesac 73620bb88ba4Smrg 73631e423a8fSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 73641e423a8fSmrg # Gets list of data symbols to import. 73651e423a8fSmrg lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'" 73661e423a8fSmrg # Adjust the below global symbol transforms to fixup imported variables. 73671e423a8fSmrg lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" 73681e423a8fSmrg lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" 73691e423a8fSmrg lt_c_name_lib_hook="\ 73701e423a8fSmrg -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ 73711e423a8fSmrg -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" 73721e423a8fSmrgelse 73731e423a8fSmrg # Disable hooks by default. 73741e423a8fSmrg lt_cv_sys_global_symbol_to_import= 73751e423a8fSmrg lt_cdecl_hook= 73761e423a8fSmrg lt_c_name_hook= 73771e423a8fSmrg lt_c_name_lib_hook= 73781e423a8fSmrgfi 73790bb88ba4Smrg 73801e423a8fSmrg# Transform an extracted symbol line into a proper C declaration. 73811e423a8fSmrg# Some systems (esp. on ia64) link data and code symbols differently, 73821e423a8fSmrg# so use this general approach. 73831e423a8fSmrglt_cv_sys_global_symbol_to_cdecl="$SED -n"\ 73841e423a8fSmrg$lt_cdecl_hook\ 73851e423a8fSmrg" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ 73861e423a8fSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" 7387fe5e51b7Smrg 73881e423a8fSmrg# Transform an extracted symbol line into symbol name and symbol address 73891e423a8fSmrglt_cv_sys_global_symbol_to_c_name_address="$SED -n"\ 73901e423a8fSmrg$lt_c_name_hook\ 73911e423a8fSmrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 73921e423a8fSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" 7393fe5e51b7Smrg 73941e423a8fSmrg# Transform an extracted symbol line into symbol name with lib prefix and 73951e423a8fSmrg# symbol address. 73961e423a8fSmrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\ 73971e423a8fSmrg$lt_c_name_lib_hook\ 73981e423a8fSmrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 73991e423a8fSmrg" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ 74001e423a8fSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" 7401fe5e51b7Smrg 74021e423a8fSmrg# Handle CRLF in mingw tool chain 74031e423a8fSmrgopt_cr= 74041e423a8fSmrgcase $build_os in 74051e423a8fSmrgmingw*) 74061e423a8fSmrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 74071e423a8fSmrg ;; 74081e423a8fSmrgesac 74090bb88ba4Smrg 74101e423a8fSmrg# Try without a prefix underscore, then with it. 74111e423a8fSmrgfor ac_symprfx in "" "_"; do 74120bb88ba4Smrg 74131e423a8fSmrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 74141e423a8fSmrg symxfrm="\\1 $ac_symprfx\\2 \\2" 7415fe5e51b7Smrg 74161e423a8fSmrg # Write the raw and C identifiers. 74171e423a8fSmrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 74181e423a8fSmrg # Fake it for dumpbin and say T for any non-static function, 74191e423a8fSmrg # D for any global variable and I for any imported variable. 74201e423a8fSmrg # Also find C++ and __fastcall symbols from MSVC++ or ICC, 74211e423a8fSmrg # which start with @ or ?. 74221e423a8fSmrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 74231e423a8fSmrg" {last_section=section; section=\$ 3};"\ 74241e423a8fSmrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 74251e423a8fSmrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 74261e423a8fSmrg" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ 74271e423a8fSmrg" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ 74281e423a8fSmrg" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ 74291e423a8fSmrg" \$ 0!~/External *\|/{next};"\ 74301e423a8fSmrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 74311e423a8fSmrg" {if(hide[section]) next};"\ 74321e423a8fSmrg" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ 74331e423a8fSmrg" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ 74341e423a8fSmrg" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ 74351e423a8fSmrg" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ 74361e423a8fSmrg" ' prfx=^$ac_symprfx]" 74371e423a8fSmrg else 74381e423a8fSmrg lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 74391e423a8fSmrg fi 74401e423a8fSmrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'" 7441fe5e51b7Smrg 74421e423a8fSmrg # Check to see that the pipe works correctly. 74431e423a8fSmrg pipe_works=no 7444fe5e51b7Smrg 74451e423a8fSmrg rm -f conftest* 74461e423a8fSmrg cat > conftest.$ac_ext <<_LT_EOF 74471e423a8fSmrg#ifdef __cplusplus 74481e423a8fSmrgextern "C" { 74491e423a8fSmrg#endif 74501e423a8fSmrgchar nm_test_var; 74511e423a8fSmrgvoid nm_test_func(void); 74521e423a8fSmrgvoid nm_test_func(void){} 74531e423a8fSmrg#ifdef __cplusplus 74541e423a8fSmrg} 74551e423a8fSmrg#endif 74561e423a8fSmrgint main(){nm_test_var='a';nm_test_func();return(0);} 74571e423a8fSmrg_LT_EOF 7458fe5e51b7Smrg 74591e423a8fSmrg if AC_TRY_EVAL(ac_compile); then 74601e423a8fSmrg # Now try to grab the symbols. 74611e423a8fSmrg nlist=conftest.nm 74621e423a8fSmrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 74631e423a8fSmrg # Try sorting and uniquifying the output. 74641e423a8fSmrg if sort "$nlist" | uniq > "$nlist"T; then 74651e423a8fSmrg mv -f "$nlist"T "$nlist" 74661e423a8fSmrg else 74671e423a8fSmrg rm -f "$nlist"T 74681e423a8fSmrg fi 7469eda3803bSmrg 74701e423a8fSmrg # Make sure that we snagged all the symbols we need. 74711e423a8fSmrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 74721e423a8fSmrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 74731e423a8fSmrg cat <<_LT_EOF > conftest.$ac_ext 74741e423a8fSmrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 74751e423a8fSmrg#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE 74761e423a8fSmrg/* DATA imports from DLLs on WIN32 can't be const, because runtime 74771e423a8fSmrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 74781e423a8fSmrg# define LT@&t@_DLSYM_CONST 74791e423a8fSmrg#elif defined __osf__ 74801e423a8fSmrg/* This system does not cope well with relocations in const data. */ 74811e423a8fSmrg# define LT@&t@_DLSYM_CONST 74821e423a8fSmrg#else 74831e423a8fSmrg# define LT@&t@_DLSYM_CONST const 74841e423a8fSmrg#endif 7485eda3803bSmrg 74861e423a8fSmrg#ifdef __cplusplus 74871e423a8fSmrgextern "C" { 74881e423a8fSmrg#endif 7489eda3803bSmrg 74901e423a8fSmrg_LT_EOF 74911e423a8fSmrg # Now generate the symbol file. 74921e423a8fSmrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 7493a31a186aSmrg 74941e423a8fSmrg cat <<_LT_EOF >> conftest.$ac_ext 7495a31a186aSmrg 74961e423a8fSmrg/* The mapping between symbol names and symbols. */ 74971e423a8fSmrgLT@&t@_DLSYM_CONST struct { 74981e423a8fSmrg const char *name; 74991e423a8fSmrg void *address; 75001e423a8fSmrg} 75011e423a8fSmrglt__PROGRAM__LTX_preloaded_symbols[[]] = 75021e423a8fSmrg{ 75031e423a8fSmrg { "@PROGRAM@", (void *) 0 }, 75041e423a8fSmrg_LT_EOF 75051e423a8fSmrg $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 75061e423a8fSmrg cat <<\_LT_EOF >> conftest.$ac_ext 75071e423a8fSmrg {0, (void *) 0} 75081e423a8fSmrg}; 75091e423a8fSmrg 75101e423a8fSmrg/* This works around a problem in FreeBSD linker */ 75111e423a8fSmrg#ifdef FREEBSD_WORKAROUND 75121e423a8fSmrgstatic const void *lt_preloaded_setup() { 75131e423a8fSmrg return lt__PROGRAM__LTX_preloaded_symbols; 75141e423a8fSmrg} 75151e423a8fSmrg#endif 75161e423a8fSmrg 75171e423a8fSmrg#ifdef __cplusplus 75181e423a8fSmrg} 75191e423a8fSmrg#endif 75201e423a8fSmrg_LT_EOF 75211e423a8fSmrg # Now try linking the two files. 75221e423a8fSmrg mv conftest.$ac_objext conftstm.$ac_objext 75231e423a8fSmrg lt_globsym_save_LIBS=$LIBS 75241e423a8fSmrg lt_globsym_save_CFLAGS=$CFLAGS 75251e423a8fSmrg LIBS=conftstm.$ac_objext 75261e423a8fSmrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 75271e423a8fSmrg if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then 75281e423a8fSmrg pipe_works=yes 75291e423a8fSmrg fi 75301e423a8fSmrg LIBS=$lt_globsym_save_LIBS 75311e423a8fSmrg CFLAGS=$lt_globsym_save_CFLAGS 75321e423a8fSmrg else 75331e423a8fSmrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 75341e423a8fSmrg fi 75351e423a8fSmrg else 75361e423a8fSmrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 7537a31a186aSmrg fi 75381e423a8fSmrg else 75391e423a8fSmrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 75401e423a8fSmrg fi 75411e423a8fSmrg else 75421e423a8fSmrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 75431e423a8fSmrg cat conftest.$ac_ext >&5 75441e423a8fSmrg fi 75451e423a8fSmrg rm -rf conftest* conftst* 75461e423a8fSmrg 75471e423a8fSmrg # Do not use the global_symbol_pipe unless it works. 75481e423a8fSmrg if test yes = "$pipe_works"; then 7549a31a186aSmrg break 75501e423a8fSmrg else 75511e423a8fSmrg lt_cv_sys_global_symbol_pipe= 7552fe5e51b7Smrg fi 7553a31a186aSmrgdone 7554fe5e51b7Smrg]) 75551e423a8fSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 75561e423a8fSmrg lt_cv_sys_global_symbol_to_cdecl= 75571e423a8fSmrgfi 75581e423a8fSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 75591e423a8fSmrg AC_MSG_RESULT(failed) 75601e423a8fSmrgelse 75611e423a8fSmrg AC_MSG_RESULT(ok) 75621e423a8fSmrgfi 7563fe5e51b7Smrg 75641e423a8fSmrg# Response file support. 75651e423a8fSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 75661e423a8fSmrg nm_file_list_spec='@' 75671e423a8fSmrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 75681e423a8fSmrg nm_file_list_spec='@' 75691e423a8fSmrgfi 7570a31a186aSmrg 75711e423a8fSmrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 75721e423a8fSmrg [Take the output of nm and produce a listing of raw symbols and C names]) 75731e423a8fSmrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 75741e423a8fSmrg [Transform the output of nm in a proper C declaration]) 75751e423a8fSmrg_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], 75761e423a8fSmrg [Transform the output of nm into a list of symbols to manually relocate]) 75771e423a8fSmrg_LT_DECL([global_symbol_to_c_name_address], 75781e423a8fSmrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 75791e423a8fSmrg [Transform the output of nm in a C name address pair]) 75801e423a8fSmrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 75811e423a8fSmrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 75821e423a8fSmrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 75831e423a8fSmrg_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], 75841e423a8fSmrg [The name lister interface]) 75851e423a8fSmrg_LT_DECL([], [nm_file_list_spec], [1], 75861e423a8fSmrg [Specify filename containing input files for $NM]) 75871e423a8fSmrg]) # _LT_CMD_GLOBAL_SYMBOLS 7588a31a186aSmrg 7589a31a186aSmrg 75901e423a8fSmrg# _LT_COMPILER_PIC([TAGNAME]) 75911e423a8fSmrg# --------------------------- 75921e423a8fSmrgm4_defun([_LT_COMPILER_PIC], 75931e423a8fSmrg[m4_require([_LT_TAG_COMPILER])dnl 75941e423a8fSmrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 75951e423a8fSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 75961e423a8fSmrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 75971e423a8fSmrg 75981e423a8fSmrgm4_if([$1], [CXX], [ 75991e423a8fSmrg # C++ specific cases for pic, static, wl, etc. 76001e423a8fSmrg if test yes = "$GXX"; then 76011e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 76021e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 76031e423a8fSmrg 76041e423a8fSmrg case $host_os in 76051e423a8fSmrg aix*) 76061e423a8fSmrg # All AIX code is PIC. 76071e423a8fSmrg if test ia64 = "$host_cpu"; then 76081e423a8fSmrg # AIX 5 now supports IA64 processor 76091e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 76101e423a8fSmrg fi 76111e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 76121e423a8fSmrg ;; 76131e423a8fSmrg 76141e423a8fSmrg amigaos*) 76151e423a8fSmrg case $host_cpu in 76161e423a8fSmrg powerpc) 76171e423a8fSmrg # see comment about AmigaOS4 .so support 76181e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 76191e423a8fSmrg ;; 76201e423a8fSmrg m68k) 76211e423a8fSmrg # FIXME: we need at least 68020 code to build shared libraries, but 76221e423a8fSmrg # adding the '-m68020' flag to GCC prevents building anything better, 76231e423a8fSmrg # like '-m68040'. 76241e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 76251e423a8fSmrg ;; 76261e423a8fSmrg esac 76271e423a8fSmrg ;; 76281e423a8fSmrg 76291e423a8fSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 76301e423a8fSmrg # PIC is the default for these OSes. 76311e423a8fSmrg ;; 76321e423a8fSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 76331e423a8fSmrg # This hack is so that the source file can tell whether it is being 76341e423a8fSmrg # built for inclusion in a dll (and should export symbols for example). 76351e423a8fSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 76361e423a8fSmrg # (--disable-auto-import) libraries 76371e423a8fSmrg m4_if([$1], [GCJ], [], 76381e423a8fSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 76391e423a8fSmrg case $host_os in 76401e423a8fSmrg os2*) 76411e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 76421e423a8fSmrg ;; 76431e423a8fSmrg esac 76441e423a8fSmrg ;; 76451e423a8fSmrg darwin* | rhapsody*) 76461e423a8fSmrg # PIC is the default on this platform 76471e423a8fSmrg # Common symbols not allowed in MH_DYLIB files 76481e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 76491e423a8fSmrg ;; 76501e423a8fSmrg *djgpp*) 76511e423a8fSmrg # DJGPP does not support shared libraries at all 76521e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 76531e423a8fSmrg ;; 76541e423a8fSmrg haiku*) 76551e423a8fSmrg # PIC is the default for Haiku. 76561e423a8fSmrg # The "-static" flag exists, but is broken. 76571e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 76581e423a8fSmrg ;; 76591e423a8fSmrg interix[[3-9]]*) 76601e423a8fSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 76611e423a8fSmrg # Instead, we relocate shared libraries at runtime. 76621e423a8fSmrg ;; 76631e423a8fSmrg sysv4*MP*) 76641e423a8fSmrg if test -d /usr/nec; then 76651e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 76661e423a8fSmrg fi 76671e423a8fSmrg ;; 76681e423a8fSmrg hpux*) 76691e423a8fSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 76701e423a8fSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 76711e423a8fSmrg # sets the default TLS model and affects inlining. 76721e423a8fSmrg case $host_cpu in 76731e423a8fSmrg hppa*64*) 76741e423a8fSmrg ;; 76751e423a8fSmrg *) 76761e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 76771e423a8fSmrg ;; 76781e423a8fSmrg esac 76791e423a8fSmrg ;; 76801e423a8fSmrg *qnx* | *nto*) 76811e423a8fSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 76821e423a8fSmrg # it will coredump. 76831e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 76841e423a8fSmrg ;; 76851e423a8fSmrg *) 76861e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 76871e423a8fSmrg ;; 76881e423a8fSmrg esac 76891e423a8fSmrg else 76901e423a8fSmrg case $host_os in 76911e423a8fSmrg aix[[4-9]]*) 76921e423a8fSmrg # All AIX code is PIC. 76931e423a8fSmrg if test ia64 = "$host_cpu"; then 76941e423a8fSmrg # AIX 5 now supports IA64 processor 76951e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 76961e423a8fSmrg else 76971e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 76981e423a8fSmrg fi 76991e423a8fSmrg ;; 77001e423a8fSmrg chorus*) 77011e423a8fSmrg case $cc_basename in 77021e423a8fSmrg cxch68*) 77031e423a8fSmrg # Green Hills C++ Compiler 77041e423a8fSmrg # _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" 77051e423a8fSmrg ;; 77061e423a8fSmrg esac 77071e423a8fSmrg ;; 77081e423a8fSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 77091e423a8fSmrg # This hack is so that the source file can tell whether it is being 77101e423a8fSmrg # built for inclusion in a dll (and should export symbols for example). 77111e423a8fSmrg m4_if([$1], [GCJ], [], 77121e423a8fSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 77131e423a8fSmrg ;; 77141e423a8fSmrg dgux*) 77151e423a8fSmrg case $cc_basename in 77161e423a8fSmrg ec++*) 77171e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 77181e423a8fSmrg ;; 77191e423a8fSmrg ghcx*) 77201e423a8fSmrg # Green Hills C++ Compiler 77211e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 77221e423a8fSmrg ;; 77231e423a8fSmrg *) 77241e423a8fSmrg ;; 77251e423a8fSmrg esac 77261e423a8fSmrg ;; 77271e423a8fSmrg freebsd* | dragonfly* | midnightbsd*) 77281e423a8fSmrg # FreeBSD uses GNU C++ 77291e423a8fSmrg ;; 77301e423a8fSmrg hpux9* | hpux10* | hpux11*) 77311e423a8fSmrg case $cc_basename in 77321e423a8fSmrg CC*) 77331e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 77341e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 77351e423a8fSmrg if test ia64 != "$host_cpu"; then 77361e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 77371e423a8fSmrg fi 77381e423a8fSmrg ;; 77391e423a8fSmrg aCC*) 77401e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 77411e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 77421e423a8fSmrg case $host_cpu in 77431e423a8fSmrg hppa*64*|ia64*) 77441e423a8fSmrg # +Z the default 77451e423a8fSmrg ;; 77461e423a8fSmrg *) 77471e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 77481e423a8fSmrg ;; 77491e423a8fSmrg esac 77501e423a8fSmrg ;; 77511e423a8fSmrg *) 77521e423a8fSmrg ;; 77531e423a8fSmrg esac 77541e423a8fSmrg ;; 77551e423a8fSmrg interix*) 77561e423a8fSmrg # This is c89, which is MS Visual C++ (no shared libs) 77571e423a8fSmrg # Anyone wants to do a port? 77581e423a8fSmrg ;; 77591e423a8fSmrg irix5* | irix6* | nonstopux*) 77601e423a8fSmrg case $cc_basename in 77611e423a8fSmrg CC*) 77621e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 77631e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 77641e423a8fSmrg # CC pic flag -KPIC is the default. 77651e423a8fSmrg ;; 77661e423a8fSmrg *) 77671e423a8fSmrg ;; 77681e423a8fSmrg esac 77691e423a8fSmrg ;; 77701e423a8fSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 77711e423a8fSmrg case $cc_basename in 77721e423a8fSmrg KCC*) 77731e423a8fSmrg # KAI C++ Compiler 77741e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 77751e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 77761e423a8fSmrg ;; 77771e423a8fSmrg ecpc* ) 77781e423a8fSmrg # old Intel C++ for x86_64, which still supported -KPIC. 77791e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 77801e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 77811e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 77821e423a8fSmrg ;; 77831e423a8fSmrg icpc* ) 77841e423a8fSmrg # Intel C++, used to be incompatible with GCC. 77851e423a8fSmrg # ICC 10 doesn't accept -KPIC any more. 77861e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 77871e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 77881e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 77891e423a8fSmrg ;; 77901e423a8fSmrg pgCC* | pgcpp*) 77911e423a8fSmrg # Portland Group C++ compiler 77921e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 77931e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 77941e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 77951e423a8fSmrg ;; 77961e423a8fSmrg cxx*) 77971e423a8fSmrg # Compaq C++ 77981e423a8fSmrg # Make sure the PIC flag is empty. It appears that all Alpha 77991e423a8fSmrg # Linux and Compaq Tru64 Unix objects are PIC. 78001e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 78011e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 78021e423a8fSmrg ;; 78031e423a8fSmrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 78041e423a8fSmrg # IBM XL 8.0, 9.0 on PPC and BlueGene 78051e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 78061e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 78071e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 78081e423a8fSmrg ;; 78091e423a8fSmrg *) 78101e423a8fSmrg case `$CC -V 2>&1 | $SED 5q` in 78111e423a8fSmrg *Sun\ C*) 78121e423a8fSmrg # Sun C++ 5.9 78131e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 78141e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 78151e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 78161e423a8fSmrg ;; 78171e423a8fSmrg esac 78181e423a8fSmrg ;; 78191e423a8fSmrg esac 78201e423a8fSmrg ;; 78211e423a8fSmrg lynxos*) 78221e423a8fSmrg ;; 78231e423a8fSmrg m88k*) 78241e423a8fSmrg ;; 78251e423a8fSmrg mvs*) 78261e423a8fSmrg case $cc_basename in 78271e423a8fSmrg cxx*) 78281e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 78291e423a8fSmrg ;; 78301e423a8fSmrg *) 78311e423a8fSmrg ;; 78321e423a8fSmrg esac 78331e423a8fSmrg ;; 78341e423a8fSmrg netbsd*) 78351e423a8fSmrg ;; 78361e423a8fSmrg *qnx* | *nto*) 78371e423a8fSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 78381e423a8fSmrg # it will coredump. 78391e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 78401e423a8fSmrg ;; 78411e423a8fSmrg osf3* | osf4* | osf5*) 78421e423a8fSmrg case $cc_basename in 78431e423a8fSmrg KCC*) 78441e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 78451e423a8fSmrg ;; 78461e423a8fSmrg RCC*) 78471e423a8fSmrg # Rational C++ 2.4.1 78481e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 78491e423a8fSmrg ;; 78501e423a8fSmrg cxx*) 78511e423a8fSmrg # Digital/Compaq C++ 78521e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 78531e423a8fSmrg # Make sure the PIC flag is empty. It appears that all Alpha 78541e423a8fSmrg # Linux and Compaq Tru64 Unix objects are PIC. 78551e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 78561e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 78571e423a8fSmrg ;; 78581e423a8fSmrg *) 78591e423a8fSmrg ;; 78601e423a8fSmrg esac 78611e423a8fSmrg ;; 78621e423a8fSmrg psos*) 78631e423a8fSmrg ;; 78641e423a8fSmrg solaris*) 78651e423a8fSmrg case $cc_basename in 78661e423a8fSmrg CC* | sunCC*) 78671e423a8fSmrg # Sun C++ 4.2, 5.x and Centerline C++ 78681e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 78691e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 78701e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 78711e423a8fSmrg ;; 78721e423a8fSmrg gcx*) 78731e423a8fSmrg # Green Hills C++ Compiler 78741e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 78751e423a8fSmrg ;; 78761e423a8fSmrg *) 78771e423a8fSmrg ;; 78781e423a8fSmrg esac 78791e423a8fSmrg ;; 78801e423a8fSmrg sunos4*) 78811e423a8fSmrg case $cc_basename in 78821e423a8fSmrg CC*) 78831e423a8fSmrg # Sun C++ 4.x 78841e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 78851e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 78861e423a8fSmrg ;; 78871e423a8fSmrg lcc*) 78881e423a8fSmrg # Lucid 78891e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 78901e423a8fSmrg ;; 78911e423a8fSmrg *) 78921e423a8fSmrg ;; 78931e423a8fSmrg esac 78941e423a8fSmrg ;; 78951e423a8fSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 78961e423a8fSmrg case $cc_basename in 78971e423a8fSmrg CC*) 78981e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 78991e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 79001e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 79011e423a8fSmrg ;; 79021e423a8fSmrg esac 79031e423a8fSmrg ;; 79041e423a8fSmrg tandem*) 79051e423a8fSmrg case $cc_basename in 79061e423a8fSmrg NCC*) 79071e423a8fSmrg # NonStop-UX NCC 3.20 79081e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 79091e423a8fSmrg ;; 79101e423a8fSmrg *) 79111e423a8fSmrg ;; 79121e423a8fSmrg esac 79131e423a8fSmrg ;; 79141e423a8fSmrg vxworks*) 79151e423a8fSmrg ;; 79161e423a8fSmrg *) 79171e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 79181e423a8fSmrg ;; 79191e423a8fSmrg esac 79201e423a8fSmrg fi 79211e423a8fSmrg], 79221e423a8fSmrg[ 79231e423a8fSmrg if test yes = "$GCC"; then 79241e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 79251e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 7926eda3803bSmrg 79271e423a8fSmrg case $host_os in 79281e423a8fSmrg aix*) 79291e423a8fSmrg # All AIX code is PIC. 79301e423a8fSmrg if test ia64 = "$host_cpu"; then 79311e423a8fSmrg # AIX 5 now supports IA64 processor 79321e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 79331e423a8fSmrg fi 79341e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 79351e423a8fSmrg ;; 7936eda3803bSmrg 79371e423a8fSmrg amigaos*) 79381e423a8fSmrg case $host_cpu in 79391e423a8fSmrg powerpc) 79401e423a8fSmrg # see comment about AmigaOS4 .so support 79411e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 79420bb88ba4Smrg ;; 79431e423a8fSmrg m68k) 79441e423a8fSmrg # FIXME: we need at least 68020 code to build shared libraries, but 79451e423a8fSmrg # adding the '-m68020' flag to GCC prevents building anything better, 79461e423a8fSmrg # like '-m68040'. 79471e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 79480bb88ba4Smrg ;; 79491e423a8fSmrg esac 79501e423a8fSmrg ;; 7951a31a186aSmrg 79521e423a8fSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 79531e423a8fSmrg # PIC is the default for these OSes. 79541e423a8fSmrg ;; 7955fe5e51b7Smrg 79561e423a8fSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 79571e423a8fSmrg # This hack is so that the source file can tell whether it is being 79581e423a8fSmrg # built for inclusion in a dll (and should export symbols for example). 79591e423a8fSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 79601e423a8fSmrg # (--disable-auto-import) libraries 79611e423a8fSmrg m4_if([$1], [GCJ], [], 79621e423a8fSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 79631e423a8fSmrg case $host_os in 79641e423a8fSmrg os2*) 79651e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 79661e423a8fSmrg ;; 79671e423a8fSmrg esac 79681e423a8fSmrg ;; 7969fe5e51b7Smrg 79701e423a8fSmrg darwin* | rhapsody*) 79711e423a8fSmrg # PIC is the default on this platform 79721e423a8fSmrg # Common symbols not allowed in MH_DYLIB files 79731e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 79741e423a8fSmrg ;; 7975a31a186aSmrg 79761e423a8fSmrg haiku*) 79771e423a8fSmrg # PIC is the default for Haiku. 79781e423a8fSmrg # The "-static" flag exists, but is broken. 79791e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 79801e423a8fSmrg ;; 7981fe5e51b7Smrg 79821e423a8fSmrg hpux*) 79831e423a8fSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 79841e423a8fSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 79851e423a8fSmrg # sets the default TLS model and affects inlining. 79861e423a8fSmrg case $host_cpu in 79871e423a8fSmrg hppa*64*) 79881e423a8fSmrg # +Z the default 79891e423a8fSmrg ;; 79901e423a8fSmrg *) 79911e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 79921e423a8fSmrg ;; 79931e423a8fSmrg esac 79941e423a8fSmrg ;; 7995fe5e51b7Smrg 79961e423a8fSmrg interix[[3-9]]*) 79971e423a8fSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 79981e423a8fSmrg # Instead, we relocate shared libraries at runtime. 79991e423a8fSmrg ;; 8000fe5e51b7Smrg 80011e423a8fSmrg msdosdjgpp*) 80021e423a8fSmrg # Just because we use GCC doesn't mean we suddenly get shared libraries 80031e423a8fSmrg # on systems that don't support them. 80041e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 80051e423a8fSmrg enable_shared=no 80061e423a8fSmrg ;; 8007eda3803bSmrg 80081e423a8fSmrg *nto* | *qnx*) 80091e423a8fSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 80101e423a8fSmrg # it will coredump. 80111e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 80121e423a8fSmrg ;; 8013eda3803bSmrg 80141e423a8fSmrg sysv4*MP*) 80151e423a8fSmrg if test -d /usr/nec; then 80161e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 80171e423a8fSmrg fi 80181e423a8fSmrg ;; 8019eda3803bSmrg 80201e423a8fSmrg *) 80211e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 80221e423a8fSmrg ;; 80231e423a8fSmrg esac 8024eda3803bSmrg 80251e423a8fSmrg case $cc_basename in 80261e423a8fSmrg nvcc*) # Cuda Compiler Driver 2.2 80271e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 80281e423a8fSmrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 80291e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 80301e423a8fSmrg fi 80311e423a8fSmrg ;; 80321e423a8fSmrg esac 80331e423a8fSmrg else 80341e423a8fSmrg # PORTME Check for flag to pass linker flags through the system compiler. 80351e423a8fSmrg case $host_os in 80361e423a8fSmrg aix*) 80371e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 80381e423a8fSmrg if test ia64 = "$host_cpu"; then 80391e423a8fSmrg # AIX 5 now supports IA64 processor 80401e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 80411e423a8fSmrg else 80421e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 80431e423a8fSmrg fi 80441e423a8fSmrg ;; 8045a31a186aSmrg 80461e423a8fSmrg darwin* | rhapsody*) 80471e423a8fSmrg # PIC is the default on this platform 80481e423a8fSmrg # Common symbols not allowed in MH_DYLIB files 80491e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 80501e423a8fSmrg case $cc_basename in 80511e423a8fSmrg nagfor*) 80521e423a8fSmrg # NAG Fortran compiler 80531e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 80541e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 80551e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 80561e423a8fSmrg ;; 80571e423a8fSmrg esac 80581e423a8fSmrg ;; 8059a31a186aSmrg 80601e423a8fSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 80611e423a8fSmrg # This hack is so that the source file can tell whether it is being 80621e423a8fSmrg # built for inclusion in a dll (and should export symbols for example). 80631e423a8fSmrg m4_if([$1], [GCJ], [], 80641e423a8fSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 80651e423a8fSmrg case $host_os in 80661e423a8fSmrg os2*) 80671e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 80681e423a8fSmrg ;; 80691e423a8fSmrg esac 80701e423a8fSmrg ;; 8071a31a186aSmrg 80721e423a8fSmrg hpux9* | hpux10* | hpux11*) 80731e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 80741e423a8fSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 80751e423a8fSmrg # not for PA HP-UX. 80761e423a8fSmrg case $host_cpu in 80771e423a8fSmrg hppa*64*|ia64*) 80781e423a8fSmrg # +Z the default 80791e423a8fSmrg ;; 80801e423a8fSmrg *) 80811e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 80821e423a8fSmrg ;; 80831e423a8fSmrg esac 80841e423a8fSmrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 80851e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 80861e423a8fSmrg ;; 8087a31a186aSmrg 80881e423a8fSmrg irix5* | irix6* | nonstopux*) 80891e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 80901e423a8fSmrg # PIC (with -KPIC) is the default. 80911e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 80921e423a8fSmrg ;; 8093a31a186aSmrg 80941e423a8fSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 80951e423a8fSmrg case $cc_basename in 80961e423a8fSmrg # old Intel for x86_64, which still supported -KPIC. 80971e423a8fSmrg ecc*) 80981e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 80991e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 81001e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 81011e423a8fSmrg ;; 81021e423a8fSmrg # icc used to be incompatible with GCC. 81031e423a8fSmrg # ICC 10 doesn't accept -KPIC any more. 81041e423a8fSmrg icc* | ifort*) 81051e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 81061e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 81071e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 81081e423a8fSmrg ;; 81091e423a8fSmrg # Lahey Fortran 8.1. 81101e423a8fSmrg lf95*) 81111e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 81121e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 81131e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 81141e423a8fSmrg ;; 81151e423a8fSmrg nagfor*) 81161e423a8fSmrg # NAG Fortran compiler 81171e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 81181e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 81191e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 81201e423a8fSmrg ;; 81211e423a8fSmrg tcc*) 81221e423a8fSmrg # Fabrice Bellard et al's Tiny C Compiler 81231e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 81241e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 81251e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 81261e423a8fSmrg ;; 81271e423a8fSmrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 81281e423a8fSmrg # Portland Group compilers (*not* the Pentium gcc compiler, 81291e423a8fSmrg # which looks to be a dead project) 81301e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 81311e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 81321e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 81331e423a8fSmrg ;; 81341e423a8fSmrg ccc*) 81351e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 81361e423a8fSmrg # All Alpha code is PIC. 81371e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 81381e423a8fSmrg ;; 81391e423a8fSmrg xl* | bgxl* | bgf* | mpixl*) 81401e423a8fSmrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 81411e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 81421e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 81431e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 81441e423a8fSmrg ;; 81451e423a8fSmrg *) 81461e423a8fSmrg case `$CC -V 2>&1 | $SED 5q` in 81471e423a8fSmrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 81481e423a8fSmrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 81491e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 81501e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 81511e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 81521e423a8fSmrg ;; 81531e423a8fSmrg *Sun\ F* | *Sun*Fortran*) 81541e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 81551e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 81561e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 81571e423a8fSmrg ;; 81581e423a8fSmrg *Sun\ C*) 81591e423a8fSmrg # Sun C 5.9 81601e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 81611e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 81621e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 81631e423a8fSmrg ;; 81641e423a8fSmrg *Intel*\ [[CF]]*Compiler*) 81651e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 81661e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 81671e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 81681e423a8fSmrg ;; 81691e423a8fSmrg *Portland\ Group*) 81701e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 81711e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 81721e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 81731e423a8fSmrg ;; 81741e423a8fSmrg esac 81751e423a8fSmrg ;; 81761e423a8fSmrg esac 81771e423a8fSmrg ;; 8178fe5e51b7Smrg 81791e423a8fSmrg newsos6) 81801e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 81811e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 81821e423a8fSmrg ;; 8183fe5e51b7Smrg 81841e423a8fSmrg *nto* | *qnx*) 81851e423a8fSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 81861e423a8fSmrg # it will coredump. 81871e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 81881e423a8fSmrg ;; 8189fe5e51b7Smrg 81901e423a8fSmrg osf3* | osf4* | osf5*) 81911e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 81921e423a8fSmrg # All OSF/1 code is PIC. 81931e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 81941e423a8fSmrg ;; 8195fe5e51b7Smrg 81961e423a8fSmrg rdos*) 81971e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 81981e423a8fSmrg ;; 8199fe5e51b7Smrg 82001e423a8fSmrg solaris*) 82011e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 82021e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 82031e423a8fSmrg case $cc_basename in 82041e423a8fSmrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 82051e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 82061e423a8fSmrg *) 82071e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 82081e423a8fSmrg esac 82091e423a8fSmrg ;; 8210fe5e51b7Smrg 82111e423a8fSmrg sunos4*) 82121e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 82131e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 82141e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 82151e423a8fSmrg ;; 8216fe5e51b7Smrg 82171e423a8fSmrg sysv4 | sysv4.2uw2* | sysv4.3*) 82181e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 82191e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 82201e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 82211e423a8fSmrg ;; 82221e423a8fSmrg 82231e423a8fSmrg sysv4*MP*) 82241e423a8fSmrg if test -d /usr/nec; then 82251e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 82261e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 82271e423a8fSmrg fi 8228fe5e51b7Smrg ;; 8229fe5e51b7Smrg 82301e423a8fSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 82311e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 82321e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 82331e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 82341e423a8fSmrg ;; 8235fe5e51b7Smrg 82361e423a8fSmrg unicos*) 82371e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 82381e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 82391e423a8fSmrg ;; 8240fe5e51b7Smrg 82411e423a8fSmrg uts4*) 82421e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 82431e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 82441e423a8fSmrg ;; 8245fe5e51b7Smrg 82461e423a8fSmrg *) 82471e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 82481e423a8fSmrg ;; 82491e423a8fSmrg esac 82501e423a8fSmrg fi 8251a31a186aSmrg]) 82521e423a8fSmrgcase $host_os in 82531e423a8fSmrg # For platforms that do not support PIC, -DPIC is meaningless: 82541e423a8fSmrg *djgpp*) 82551e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 82561e423a8fSmrg ;; 82571e423a8fSmrg *) 82581e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 82591e423a8fSmrg ;; 82601e423a8fSmrgesac 8261fe5e51b7Smrg 82621e423a8fSmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 82631e423a8fSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 82641e423a8fSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 82651e423a8fSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 8266fe5e51b7Smrg 82671e423a8fSmrg# 82681e423a8fSmrg# Check to make sure the PIC flag actually works. 82691e423a8fSmrg# 82701e423a8fSmrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 82711e423a8fSmrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 82721e423a8fSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 82731e423a8fSmrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 82741e423a8fSmrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 82751e423a8fSmrg "" | " "*) ;; 82761e423a8fSmrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 82771e423a8fSmrg esac], 82781e423a8fSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 82791e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 82801e423a8fSmrgfi 82811e423a8fSmrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 82821e423a8fSmrg [Additional compiler flags for building library objects]) 8283fe5e51b7Smrg 82841e423a8fSmrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 82851e423a8fSmrg [How to pass a linker flag through the compiler]) 82861e423a8fSmrg# 82871e423a8fSmrg# Check to make sure the static flag actually works. 82881e423a8fSmrg# 82891e423a8fSmrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 82901e423a8fSmrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 82911e423a8fSmrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 82921e423a8fSmrg $lt_tmp_static_flag, 82931e423a8fSmrg [], 82941e423a8fSmrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 82951e423a8fSmrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 82961e423a8fSmrg [Compiler flag to prevent dynamic linking]) 82971e423a8fSmrg])# _LT_COMPILER_PIC 8298fe5e51b7Smrg 8299fe5e51b7Smrg 83001e423a8fSmrg# _LT_LINKER_SHLIBS([TAGNAME]) 8301a31a186aSmrg# ---------------------------- 83021e423a8fSmrg# See if the linker supports building shared libraries. 83031e423a8fSmrgm4_defun([_LT_LINKER_SHLIBS], 83041e423a8fSmrg[AC_REQUIRE([LT_PATH_LD])dnl 83051e423a8fSmrgAC_REQUIRE([LT_PATH_NM])dnl 83061e423a8fSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 83071e423a8fSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 83081e423a8fSmrgm4_require([_LT_DECL_EGREP])dnl 83091e423a8fSmrgm4_require([_LT_DECL_SED])dnl 83101e423a8fSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 83111e423a8fSmrgm4_require([_LT_TAG_COMPILER])dnl 83121e423a8fSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 83131e423a8fSmrgm4_if([$1], [CXX], [ 83141e423a8fSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 83151e423a8fSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 83161e423a8fSmrg case $host_os in 83171e423a8fSmrg aix[[4-9]]*) 83181e423a8fSmrg # If we're using GNU nm, then we don't want the "-C" option. 83191e423a8fSmrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 83201e423a8fSmrg # Without the "-l" option, or with the "-B" option, AIX nm treats 83211e423a8fSmrg # weak defined symbols like other global defined symbols, whereas 83221e423a8fSmrg # GNU nm marks them as "W". 83231e423a8fSmrg # While the 'weak' keyword is ignored in the Export File, we need 83241e423a8fSmrg # it in the Import File for the 'aix-soname' feature, so we have 83251e423a8fSmrg # to replace the "-B" option with "-P" for AIX nm. 83261e423a8fSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 83271e423a8fSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' 83281e423a8fSmrg else 83291e423a8fSmrg _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' 83301e423a8fSmrg fi 83311e423a8fSmrg ;; 83321e423a8fSmrg pw32*) 83331e423a8fSmrg _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds 83341e423a8fSmrg ;; 83351e423a8fSmrg cygwin* | mingw* | cegcc*) 83361e423a8fSmrg case $cc_basename in 83371e423a8fSmrg cl* | icl*) 83381e423a8fSmrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 83391e423a8fSmrg ;; 8340a31a186aSmrg *) 83411e423a8fSmrg _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' 83421e423a8fSmrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 83431e423a8fSmrg ;; 83441e423a8fSmrg esac 83451e423a8fSmrg ;; 83461e423a8fSmrg *) 83471e423a8fSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 83481e423a8fSmrg ;; 83491e423a8fSmrg esac 83501e423a8fSmrg], [ 83511e423a8fSmrg runpath_var= 83521e423a8fSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 83531e423a8fSmrg _LT_TAGVAR(always_export_symbols, $1)=no 83541e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)= 83551e423a8fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)= 83561e423a8fSmrg _LT_TAGVAR(compiler_needs_object, $1)=no 83571e423a8fSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 83581e423a8fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 83591e423a8fSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 83601e423a8fSmrg _LT_TAGVAR(hardcode_automatic, $1)=no 83611e423a8fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 83621e423a8fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 83631e423a8fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 83641e423a8fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 83651e423a8fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=no 83661e423a8fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 83671e423a8fSmrg _LT_TAGVAR(inherit_rpath, $1)=no 83681e423a8fSmrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 83691e423a8fSmrg _LT_TAGVAR(module_cmds, $1)= 83701e423a8fSmrg _LT_TAGVAR(module_expsym_cmds, $1)= 83711e423a8fSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 83721e423a8fSmrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 83731e423a8fSmrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 83741e423a8fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 83751e423a8fSmrg # include_expsyms should be a list of space-separated symbols to be *always* 83761e423a8fSmrg # included in the symbol list 83771e423a8fSmrg _LT_TAGVAR(include_expsyms, $1)= 83781e423a8fSmrg # exclude_expsyms can be an extended regexp of symbols to exclude 83791e423a8fSmrg # it will be wrapped by ' (' and ')$', so one must not match beginning or 83801e423a8fSmrg # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', 83811e423a8fSmrg # as well as any symbol that contains 'd'. 83821e423a8fSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 83831e423a8fSmrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 83841e423a8fSmrg # platforms (ab)use it in PIC code, but their linkers get confused if 83851e423a8fSmrg # the symbol is explicitly referenced. Since portable code cannot 83861e423a8fSmrg # rely on this symbol name, it's probably fine to never include it in 83871e423a8fSmrg # preloaded symbol tables. 83881e423a8fSmrg # Exclude shared library initialization/finalization symbols. 83891e423a8fSmrgdnl Note also adjust exclude_expsyms for C++ above. 83901e423a8fSmrg extract_expsyms_cmds= 83911e423a8fSmrg 83921e423a8fSmrg case $host_os in 83931e423a8fSmrg cygwin* | mingw* | pw32* | cegcc*) 83941e423a8fSmrg # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time 83951e423a8fSmrg # When not using gcc, we currently assume that we are using 83961e423a8fSmrg # Microsoft Visual C++ or Intel C++ Compiler. 83971e423a8fSmrg if test yes != "$GCC"; then 83981e423a8fSmrg with_gnu_ld=no 83991e423a8fSmrg fi 84001e423a8fSmrg ;; 84011e423a8fSmrg interix*) 84021e423a8fSmrg # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) 84031e423a8fSmrg with_gnu_ld=yes 84041e423a8fSmrg ;; 84051e423a8fSmrg openbsd* | bitrig*) 84061e423a8fSmrg with_gnu_ld=no 84071e423a8fSmrg ;; 84081e423a8fSmrg esac 84091e423a8fSmrg 84101e423a8fSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 84111e423a8fSmrg 84121e423a8fSmrg # On some targets, GNU ld is compatible enough with the native linker 84131e423a8fSmrg # that we're better off using the native interface for both. 84141e423a8fSmrg lt_use_gnu_ld_interface=no 84151e423a8fSmrg if test yes = "$with_gnu_ld"; then 84161e423a8fSmrg case $host_os in 84171e423a8fSmrg aix*) 84181e423a8fSmrg # The AIX port of GNU ld has always aspired to compatibility 84191e423a8fSmrg # with the native linker. However, as the warning in the GNU ld 84201e423a8fSmrg # block says, versions before 2.19.5* couldn't really create working 84211e423a8fSmrg # shared libraries, regardless of the interface used. 84221e423a8fSmrg case `$LD -v 2>&1` in 84231e423a8fSmrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 84241e423a8fSmrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 84251e423a8fSmrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 84261e423a8fSmrg *) 84271e423a8fSmrg lt_use_gnu_ld_interface=yes 84281e423a8fSmrg ;; 84291e423a8fSmrg esac 84301e423a8fSmrg ;; 84311e423a8fSmrg *) 84321e423a8fSmrg lt_use_gnu_ld_interface=yes 84331e423a8fSmrg ;; 84341e423a8fSmrg esac 84351e423a8fSmrg fi 84361e423a8fSmrg 84371e423a8fSmrg if test yes = "$lt_use_gnu_ld_interface"; then 84381e423a8fSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 84391e423a8fSmrg wlarc='$wl' 84401e423a8fSmrg 84411e423a8fSmrg # Set some defaults for GNU ld with shared library support. These 84421e423a8fSmrg # are reset later if shared libraries are not supported. Putting them 84431e423a8fSmrg # here allows them to be overridden if necessary. 84441e423a8fSmrg runpath_var=LD_RUN_PATH 84451e423a8fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 84461e423a8fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 84471e423a8fSmrg # ancient GNU ld didn't support --whole-archive et. al. 84481e423a8fSmrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 84491e423a8fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 84501e423a8fSmrg else 84511e423a8fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 84521e423a8fSmrg fi 84531e423a8fSmrg supports_anon_versioning=no 84541e423a8fSmrg case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in 84551e423a8fSmrg *GNU\ gold*) supports_anon_versioning=yes ;; 84561e423a8fSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 84571e423a8fSmrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 84581e423a8fSmrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 84591e423a8fSmrg *\ 2.11.*) ;; # other 2.11 versions 84601e423a8fSmrg *) supports_anon_versioning=yes ;; 84611e423a8fSmrg esac 84621e423a8fSmrg 84631e423a8fSmrg # See if GNU ld supports shared libraries. 84641e423a8fSmrg case $host_os in 84651e423a8fSmrg aix[[3-9]]*) 84661e423a8fSmrg # On AIX/PPC, the GNU linker is very broken 84671e423a8fSmrg if test ia64 != "$host_cpu"; then 84681e423a8fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 84691e423a8fSmrg cat <<_LT_EOF 1>&2 84701e423a8fSmrg 84711e423a8fSmrg*** Warning: the GNU linker, at least up to release 2.19, is reported 84721e423a8fSmrg*** to be unable to reliably create shared libraries on AIX. 84731e423a8fSmrg*** Therefore, libtool is disabling shared libraries support. If you 84741e423a8fSmrg*** really care for shared libraries, you may want to install binutils 84751e423a8fSmrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 84761e423a8fSmrg*** You will then need to restart the configuration process. 84771e423a8fSmrg 84781e423a8fSmrg_LT_EOF 84791e423a8fSmrg fi 8480fe5e51b7Smrg ;; 8481fe5e51b7Smrg 84821e423a8fSmrg amigaos*) 84831e423a8fSmrg case $host_cpu in 84841e423a8fSmrg powerpc) 84851e423a8fSmrg # see comment about AmigaOS4 .so support 84861e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 84871e423a8fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 84881e423a8fSmrg ;; 84891e423a8fSmrg m68k) 84901e423a8fSmrg _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)' 84911e423a8fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 84921e423a8fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 84931e423a8fSmrg ;; 84941e423a8fSmrg esac 84951e423a8fSmrg ;; 8496fe5e51b7Smrg 84971e423a8fSmrg beos*) 84981e423a8fSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 84991e423a8fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 85001e423a8fSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 85011e423a8fSmrg # support --undefined. This deserves some investigation. FIXME 85021e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 85031e423a8fSmrg else 85041e423a8fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 85051e423a8fSmrg fi 85061e423a8fSmrg ;; 8507fe5e51b7Smrg 85081e423a8fSmrg cygwin* | mingw* | pw32* | cegcc*) 85091e423a8fSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 85101e423a8fSmrg # as there is no search path for DLLs. 85111e423a8fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 85121e423a8fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 85131e423a8fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 85141e423a8fSmrg _LT_TAGVAR(always_export_symbols, $1)=no 85151e423a8fSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 85161e423a8fSmrg _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' 85171e423a8fSmrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 8518fe5e51b7Smrg 85191e423a8fSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 85201e423a8fSmrg _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' 85211e423a8fSmrg # If the export-symbols file already is a .def file, use it as 85221e423a8fSmrg # is; otherwise, prepend EXPORTS... 85231e423a8fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 85241e423a8fSmrg cp $export_symbols $output_objdir/$soname.def; 85251e423a8fSmrg else 85261e423a8fSmrg echo EXPORTS > $output_objdir/$soname.def; 85271e423a8fSmrg cat $export_symbols >> $output_objdir/$soname.def; 85281e423a8fSmrg fi~ 85291e423a8fSmrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 85301e423a8fSmrg else 85311e423a8fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 85321e423a8fSmrg fi 85331e423a8fSmrg ;; 8534fe5e51b7Smrg 85351e423a8fSmrg haiku*) 85361e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 85371e423a8fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 85381e423a8fSmrg ;; 8539fe5e51b7Smrg 85401e423a8fSmrg os2*) 85411e423a8fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 85421e423a8fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 85431e423a8fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 85441e423a8fSmrg shrext_cmds=.dll 85451e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 85461e423a8fSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 85471e423a8fSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 85481e423a8fSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 85491e423a8fSmrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 85501e423a8fSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 85511e423a8fSmrg emximp -o $lib $output_objdir/$libname.def' 85521e423a8fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 85531e423a8fSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 85541e423a8fSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 85551e423a8fSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 85561e423a8fSmrg prefix_cmds="$SED"~ 85571e423a8fSmrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 85581e423a8fSmrg prefix_cmds="$prefix_cmds -e 1d"; 85591e423a8fSmrg fi~ 85601e423a8fSmrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 85611e423a8fSmrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 85621e423a8fSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 85631e423a8fSmrg emximp -o $lib $output_objdir/$libname.def' 85641e423a8fSmrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 85651e423a8fSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 85661e423a8fSmrg _LT_TAGVAR(file_list_spec, $1)='@' 85671e423a8fSmrg ;; 85681e423a8fSmrg 85691e423a8fSmrg interix[[3-9]]*) 85701e423a8fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 85711e423a8fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 85721e423a8fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 85731e423a8fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 85741e423a8fSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 85751e423a8fSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 85761e423a8fSmrg # default) and relocated if they conflict, which is a slow very memory 85771e423a8fSmrg # consuming and fragmenting process. To avoid this, we pick a random, 85781e423a8fSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 85791e423a8fSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 85801e423a8fSmrg _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' 85811e423a8fSmrg _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' 85821e423a8fSmrg ;; 8583fe5e51b7Smrg 85841e423a8fSmrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 85851e423a8fSmrg tmp_diet=no 85861e423a8fSmrg if test linux-dietlibc = "$host_os"; then 85871e423a8fSmrg case $cc_basename in 85881e423a8fSmrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 85891e423a8fSmrg esac 85901e423a8fSmrg fi 85911e423a8fSmrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 85921e423a8fSmrg && test no = "$tmp_diet" 85931e423a8fSmrg then 85941e423a8fSmrg tmp_addflag=' $pic_flag' 85951e423a8fSmrg tmp_sharedflag='-shared' 85961e423a8fSmrg case $cc_basename,$host_cpu in 85971e423a8fSmrg pgcc*) # Portland Group C compiler 85981e423a8fSmrg _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' 85991e423a8fSmrg tmp_addflag=' $pic_flag' 86001e423a8fSmrg ;; 86011e423a8fSmrg pgf77* | pgf90* | pgf95* | pgfortran*) 86021e423a8fSmrg # Portland Group f77 and f90 compilers 86031e423a8fSmrg _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' 86041e423a8fSmrg tmp_addflag=' $pic_flag -Mnomain' ;; 86051e423a8fSmrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 86061e423a8fSmrg tmp_addflag=' -i_dynamic' ;; 86071e423a8fSmrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 86081e423a8fSmrg tmp_addflag=' -i_dynamic -nofor_main' ;; 86091e423a8fSmrg ifc* | ifort*) # Intel Fortran compiler 86101e423a8fSmrg tmp_addflag=' -nofor_main' ;; 86111e423a8fSmrg lf95*) # Lahey Fortran 8.1 86121e423a8fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 86131e423a8fSmrg tmp_sharedflag='--shared' ;; 86141e423a8fSmrg nagfor*) # NAGFOR 5.3 86151e423a8fSmrg tmp_sharedflag='-Wl,-shared' ;; 86161e423a8fSmrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 86171e423a8fSmrg tmp_sharedflag='-qmkshrobj' 86181e423a8fSmrg tmp_addflag= ;; 86191e423a8fSmrg nvcc*) # Cuda Compiler Driver 2.2 86201e423a8fSmrg _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' 86211e423a8fSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 86221e423a8fSmrg ;; 86231e423a8fSmrg esac 86241e423a8fSmrg case `$CC -V 2>&1 | $SED 5q` in 86251e423a8fSmrg *Sun\ C*) # Sun C 5.9 86261e423a8fSmrg _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' 86271e423a8fSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 86281e423a8fSmrg tmp_sharedflag='-G' ;; 86291e423a8fSmrg *Sun\ F*) # Sun Fortran 8.3 86301e423a8fSmrg tmp_sharedflag='-G' ;; 86311e423a8fSmrg esac 86321e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8633fe5e51b7Smrg 86341e423a8fSmrg if test yes = "$supports_anon_versioning"; then 86351e423a8fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 86361e423a8fSmrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 86371e423a8fSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 86381e423a8fSmrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 86391e423a8fSmrg fi 8640fe5e51b7Smrg 86411e423a8fSmrg case $cc_basename in 86421e423a8fSmrg tcc*) 86431e423a8fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' 86441e423a8fSmrg ;; 86451e423a8fSmrg xlf* | bgf* | bgxlf* | mpixlf*) 86461e423a8fSmrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 86471e423a8fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 86481e423a8fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 86491e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 86501e423a8fSmrg if test yes = "$supports_anon_versioning"; then 86511e423a8fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 86521e423a8fSmrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 86531e423a8fSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 86541e423a8fSmrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 86551e423a8fSmrg fi 86561e423a8fSmrg ;; 86571e423a8fSmrg esac 86581e423a8fSmrg else 86591e423a8fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 86601e423a8fSmrg fi 8661fe5e51b7Smrg ;; 8662fe5e51b7Smrg 86631e423a8fSmrg netbsd*) 86641e423a8fSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 86651e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 86661e423a8fSmrg wlarc= 86671e423a8fSmrg else 86681e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 86691e423a8fSmrg _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' 86701e423a8fSmrg fi 86711e423a8fSmrg ;; 8672fe5e51b7Smrg 86731e423a8fSmrg solaris*) 86741e423a8fSmrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 86751e423a8fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 86761e423a8fSmrg cat <<_LT_EOF 1>&2 8677fe5e51b7Smrg 86781e423a8fSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 86791e423a8fSmrg*** create shared libraries on Solaris systems. Therefore, libtool 86801e423a8fSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 86811e423a8fSmrg*** binutils to release 2.9.1 or newer. Another option is to modify 86821e423a8fSmrg*** your PATH or compiler configuration so that the native linker is 86831e423a8fSmrg*** used, and then restart. 8684fe5e51b7Smrg 86851e423a8fSmrg_LT_EOF 86861e423a8fSmrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 86871e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 86881e423a8fSmrg _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' 86891e423a8fSmrg else 86901e423a8fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 86911e423a8fSmrg fi 86921e423a8fSmrg ;; 8693fe5e51b7Smrg 86941e423a8fSmrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 86951e423a8fSmrg case `$LD -v 2>&1` in 86961e423a8fSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 86971e423a8fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 86981e423a8fSmrg cat <<_LT_EOF 1>&2 8699fe5e51b7Smrg 87001e423a8fSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot 87011e423a8fSmrg*** reliably create shared libraries on SCO systems. Therefore, libtool 87021e423a8fSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 87031e423a8fSmrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 87041e423a8fSmrg*** your PATH or compiler configuration so that the native linker is 87051e423a8fSmrg*** used, and then restart. 8706fe5e51b7Smrg 87071e423a8fSmrg_LT_EOF 87081e423a8fSmrg ;; 87091e423a8fSmrg *) 87101e423a8fSmrg # For security reasons, it is highly recommended that you always 87111e423a8fSmrg # use absolute paths for naming shared libraries, and exclude the 87121e423a8fSmrg # DT_RUNPATH tag from executables and libraries. But doing so 87131e423a8fSmrg # requires that you compile everything twice, which is a pain. 87141e423a8fSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 87151e423a8fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 87161e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 87171e423a8fSmrg _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' 87181e423a8fSmrg else 87191e423a8fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 87201e423a8fSmrg fi 87211e423a8fSmrg ;; 87221e423a8fSmrg esac 87231e423a8fSmrg ;; 87241e423a8fSmrg 87251e423a8fSmrg sunos4*) 87261e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 87271e423a8fSmrg wlarc= 87281e423a8fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 87291e423a8fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8730493f84f4Smrg ;; 87311e423a8fSmrg 8732493f84f4Smrg *) 87331e423a8fSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 87341e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 87351e423a8fSmrg _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' 87361e423a8fSmrg else 87371e423a8fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 87381e423a8fSmrg fi 8739493f84f4Smrg ;; 8740493f84f4Smrg esac 87411e423a8fSmrg 87421e423a8fSmrg if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then 87431e423a8fSmrg runpath_var= 87441e423a8fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 87451e423a8fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 87461e423a8fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 8747493f84f4Smrg fi 87481e423a8fSmrg else 87491e423a8fSmrg # PORTME fill in a description of your system's linker (not GNU ld) 87501e423a8fSmrg case $host_os in 87511e423a8fSmrg aix3*) 87521e423a8fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 87531e423a8fSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 87541e423a8fSmrg _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' 87551e423a8fSmrg # Note: this linker hardcodes the directories in LIBPATH if there 87561e423a8fSmrg # are no directories specified by -L. 87571e423a8fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 87581e423a8fSmrg if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then 87591e423a8fSmrg # Neither direct hardcoding nor static linking is supported with a 87601e423a8fSmrg # broken collect2. 87611e423a8fSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 87621e423a8fSmrg fi 87631e423a8fSmrg ;; 8764493f84f4Smrg 87651e423a8fSmrg aix[[4-9]]*) 87661e423a8fSmrg if test ia64 = "$host_cpu"; then 87671e423a8fSmrg # On IA64, the linker does run time linking by default, so we don't 87681e423a8fSmrg # have to do anything special. 87691e423a8fSmrg aix_use_runtimelinking=no 87701e423a8fSmrg exp_sym_flag='-Bexport' 87711e423a8fSmrg no_entry_flag= 87721e423a8fSmrg else 87731e423a8fSmrg # If we're using GNU nm, then we don't want the "-C" option. 87741e423a8fSmrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 87751e423a8fSmrg # Without the "-l" option, or with the "-B" option, AIX nm treats 87761e423a8fSmrg # weak defined symbols like other global defined symbols, whereas 87771e423a8fSmrg # GNU nm marks them as "W". 87781e423a8fSmrg # While the 'weak' keyword is ignored in the Export File, we need 87791e423a8fSmrg # it in the Import File for the 'aix-soname' feature, so we have 87801e423a8fSmrg # to replace the "-B" option with "-P" for AIX nm. 87811e423a8fSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 87821e423a8fSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' 87831e423a8fSmrg else 87841e423a8fSmrg _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' 87851e423a8fSmrg fi 87861e423a8fSmrg aix_use_runtimelinking=no 8787493f84f4Smrg 87881e423a8fSmrg # Test if we are trying to use run time linking or normal 87891e423a8fSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 87901e423a8fSmrg # have runtime linking enabled, and use it for executables. 87911e423a8fSmrg # For shared libraries, we enable/disable runtime linking 87921e423a8fSmrg # depending on the kind of the shared library created - 87931e423a8fSmrg # when "with_aix_soname,aix_use_runtimelinking" is: 87941e423a8fSmrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 87951e423a8fSmrg # "aix,yes" lib.so shared, rtl:yes, for executables 87961e423a8fSmrg # lib.a static archive 87971e423a8fSmrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 87981e423a8fSmrg # lib.a(lib.so.V) shared, rtl:no, for executables 87991e423a8fSmrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 88001e423a8fSmrg # lib.a(lib.so.V) shared, rtl:no 88011e423a8fSmrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 88021e423a8fSmrg # lib.a static archive 88031e423a8fSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 88041e423a8fSmrg for ld_flag in $LDFLAGS; do 88051e423a8fSmrg if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then 88061e423a8fSmrg aix_use_runtimelinking=yes 88071e423a8fSmrg break 88081e423a8fSmrg fi 88091e423a8fSmrg done 88101e423a8fSmrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 88111e423a8fSmrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 88121e423a8fSmrg # so we don't have lib.a shared libs to link our executables. 88131e423a8fSmrg # We have to force runtime linking in this case. 88141e423a8fSmrg aix_use_runtimelinking=yes 88151e423a8fSmrg LDFLAGS="$LDFLAGS -Wl,-brtl" 88161e423a8fSmrg fi 88171e423a8fSmrg ;; 88181e423a8fSmrg esac 8819493f84f4Smrg 88201e423a8fSmrg exp_sym_flag='-bexport' 88211e423a8fSmrg no_entry_flag='-bnoentry' 88221e423a8fSmrg fi 8823493f84f4Smrg 88241e423a8fSmrg # When large executables or shared objects are built, AIX ld can 88251e423a8fSmrg # have problems creating the table of contents. If linking a library 88261e423a8fSmrg # or program results in "error TOC overflow" add -mminimal-toc to 88271e423a8fSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 88281e423a8fSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 88291e423a8fSmrg 88301e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='' 88311e423a8fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 88321e423a8fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 88331e423a8fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 88341e423a8fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 88351e423a8fSmrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 88361e423a8fSmrg case $with_aix_soname,$aix_use_runtimelinking in 88371e423a8fSmrg aix,*) ;; # traditional, no import file 88381e423a8fSmrg svr4,* | *,yes) # use import file 88391e423a8fSmrg # The Import File defines what to hardcode. 88401e423a8fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 88411e423a8fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 88421e423a8fSmrg ;; 88431e423a8fSmrg esac 88441e423a8fSmrg 88451e423a8fSmrg if test yes = "$GCC"; then 88461e423a8fSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 88471e423a8fSmrg # We only want to do this on AIX 4.2 and lower, the check 88481e423a8fSmrg # below for broken collect2 doesn't work under 4.3+ 88491e423a8fSmrg collect2name=`$CC -print-prog-name=collect2` 88501e423a8fSmrg if test -f "$collect2name" && 88511e423a8fSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 88521e423a8fSmrg then 88531e423a8fSmrg # We have reworked collect2 88541e423a8fSmrg : 88551e423a8fSmrg else 88561e423a8fSmrg # We have old collect2 88571e423a8fSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 88581e423a8fSmrg # It fails to find uninstalled libraries when the uninstalled 88591e423a8fSmrg # path is not listed in the libpath. Setting hardcode_minus_L 88601e423a8fSmrg # to unsupported forces relinking 88611e423a8fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 88621e423a8fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 88631e423a8fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 88641e423a8fSmrg fi 88651e423a8fSmrg ;; 88661e423a8fSmrg esac 88671e423a8fSmrg shared_flag='-shared' 88681e423a8fSmrg if test yes = "$aix_use_runtimelinking"; then 88691e423a8fSmrg shared_flag="$shared_flag "'$wl-G' 88701e423a8fSmrg fi 88711e423a8fSmrg # Need to ensure runtime linking is disabled for the traditional 88721e423a8fSmrg # shared library, or the linker may eventually find shared libraries 88731e423a8fSmrg # /with/ Import File - we do not want to mix them. 88741e423a8fSmrg shared_flag_aix='-shared' 88751e423a8fSmrg shared_flag_svr4='-shared $wl-G' 88761e423a8fSmrg else 88771e423a8fSmrg # not using gcc 88781e423a8fSmrg if test ia64 = "$host_cpu"; then 88791e423a8fSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 88801e423a8fSmrg # chokes on -Wl,-G. The following line is correct: 88811e423a8fSmrg shared_flag='-G' 88821e423a8fSmrg else 88831e423a8fSmrg if test yes = "$aix_use_runtimelinking"; then 88841e423a8fSmrg shared_flag='$wl-G' 88851e423a8fSmrg else 88861e423a8fSmrg shared_flag='$wl-bM:SRE' 88871e423a8fSmrg fi 88881e423a8fSmrg shared_flag_aix='$wl-bM:SRE' 88891e423a8fSmrg shared_flag_svr4='$wl-G' 88900bb88ba4Smrg fi 88911e423a8fSmrg fi 8892fe5e51b7Smrg 88931e423a8fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 88941e423a8fSmrg # It seems that -bexpall does not export symbols beginning with 88951e423a8fSmrg # underscore (_), so it is better to generate a list of symbols to export. 88961e423a8fSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 88971e423a8fSmrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 88981e423a8fSmrg # Warning - without using the other runtime loading flags (-brtl), 88991e423a8fSmrg # -berok will link without error, but may produce a broken library. 89001e423a8fSmrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 89011e423a8fSmrg # Determine the default libpath from the value encoded in an 89021e423a8fSmrg # empty executable. 89031e423a8fSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 89041e423a8fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 89051e423a8fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag 89061e423a8fSmrg else 89071e423a8fSmrg if test ia64 = "$host_cpu"; then 89081e423a8fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 89091e423a8fSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 89101e423a8fSmrg _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" 89111e423a8fSmrg else 89121e423a8fSmrg # Determine the default libpath from the value encoded in an 89131e423a8fSmrg # empty executable. 89141e423a8fSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 89151e423a8fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 89161e423a8fSmrg # Warning - without using the other run time loading flags, 89171e423a8fSmrg # -berok will link without error, but may produce a broken library. 89181e423a8fSmrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 89191e423a8fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 89201e423a8fSmrg if test yes = "$with_gnu_ld"; then 89211e423a8fSmrg # We only use this code for GNU lds that support --whole-archive. 89221e423a8fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 89231e423a8fSmrg else 89241e423a8fSmrg # Exported symbols can be pulled into shared objects from archives 89251e423a8fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 89261e423a8fSmrg fi 89271e423a8fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 89281e423a8fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 89291e423a8fSmrg # -brtl affects multiple linker settings, -berok does not and is overridden later 89301e423a8fSmrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 89311e423a8fSmrg if test svr4 != "$with_aix_soname"; then 89321e423a8fSmrg # This is similar to how AIX traditionally builds its shared libraries. 89331e423a8fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' 89341e423a8fSmrg fi 89351e423a8fSmrg if test aix != "$with_aix_soname"; then 89361e423a8fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' 89371e423a8fSmrg else 89381e423a8fSmrg # used by -dlpreopen to get the symbols 89391e423a8fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 89401e423a8fSmrg fi 89411e423a8fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 89421e423a8fSmrg fi 89431e423a8fSmrg fi 89441e423a8fSmrg ;; 8945a31a186aSmrg 89461e423a8fSmrg amigaos*) 89471e423a8fSmrg case $host_cpu in 89481e423a8fSmrg powerpc) 89491e423a8fSmrg # see comment about AmigaOS4 .so support 89501e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 89511e423a8fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 89521e423a8fSmrg ;; 89531e423a8fSmrg m68k) 89541e423a8fSmrg _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)' 89551e423a8fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 89561e423a8fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 89571e423a8fSmrg ;; 89581e423a8fSmrg esac 89591e423a8fSmrg ;; 8960a31a186aSmrg 89611e423a8fSmrg bsdi[[45]]*) 89621e423a8fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 89631e423a8fSmrg ;; 8964a31a186aSmrg 89651e423a8fSmrg cygwin* | mingw* | pw32* | cegcc*) 89661e423a8fSmrg # When not using gcc, we currently assume that we are using 89671e423a8fSmrg # Microsoft Visual C++ or Intel C++ Compiler. 89681e423a8fSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 89691e423a8fSmrg # no search path for DLLs. 89701e423a8fSmrg case $cc_basename in 89711e423a8fSmrg cl* | icl*) 89721e423a8fSmrg # Native MSVC or ICC 89731e423a8fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 89741e423a8fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 89751e423a8fSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 89761e423a8fSmrg _LT_TAGVAR(file_list_spec, $1)='@' 89771e423a8fSmrg # Tell ltmain to make .lib files, not .a files. 89781e423a8fSmrg libext=lib 89791e423a8fSmrg # Tell ltmain to make .dll files, not .so files. 89801e423a8fSmrg shrext_cmds=.dll 89811e423a8fSmrg # FIXME: Setting linknames here is a bad hack. 89821e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 89831e423a8fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 89841e423a8fSmrg cp "$export_symbols" "$output_objdir/$soname.def"; 89851e423a8fSmrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 89861e423a8fSmrg else 89871e423a8fSmrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 89881e423a8fSmrg fi~ 89891e423a8fSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 89901e423a8fSmrg linknames=' 89911e423a8fSmrg # The linker will not automatically build a static lib if we build a DLL. 89921e423a8fSmrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 89931e423a8fSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 89941e423a8fSmrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 89951e423a8fSmrg _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' 89961e423a8fSmrg # Don't use ranlib 89971e423a8fSmrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 89981e423a8fSmrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 89991e423a8fSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 90001e423a8fSmrg case $lt_outputfile in 90011e423a8fSmrg *.exe|*.EXE) ;; 90021e423a8fSmrg *) 90031e423a8fSmrg lt_outputfile=$lt_outputfile.exe 90041e423a8fSmrg lt_tool_outputfile=$lt_tool_outputfile.exe 90051e423a8fSmrg ;; 90061e423a8fSmrg esac~ 90071e423a8fSmrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 90081e423a8fSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 90091e423a8fSmrg $RM "$lt_outputfile.manifest"; 90101e423a8fSmrg fi' 90111e423a8fSmrg ;; 90121e423a8fSmrg *) 90131e423a8fSmrg # Assume MSVC and ICC wrapper 90141e423a8fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 90151e423a8fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 90161e423a8fSmrg # Tell ltmain to make .lib files, not .a files. 90171e423a8fSmrg libext=lib 90181e423a8fSmrg # Tell ltmain to make .dll files, not .so files. 90191e423a8fSmrg shrext_cmds=.dll 90201e423a8fSmrg # FIXME: Setting linknames here is a bad hack. 90211e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 90221e423a8fSmrg # The linker will automatically build a .lib file if we build a DLL. 90231e423a8fSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 90241e423a8fSmrg # FIXME: Should let the user specify the lib program. 90251e423a8fSmrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 90261e423a8fSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 90271e423a8fSmrg ;; 90281e423a8fSmrg esac 90291e423a8fSmrg ;; 9030a31a186aSmrg 90311e423a8fSmrg darwin* | rhapsody*) 90321e423a8fSmrg _LT_DARWIN_LINKER_FEATURES($1) 90331e423a8fSmrg ;; 9034a31a186aSmrg 90351e423a8fSmrg dgux*) 90361e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 90371e423a8fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 90381e423a8fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 90391e423a8fSmrg ;; 9040a31a186aSmrg 90411e423a8fSmrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 90421e423a8fSmrg # support. Future versions do this automatically, but an explicit c++rt0.o 90431e423a8fSmrg # does not break anything, and helps significantly (at the cost of a little 90441e423a8fSmrg # extra space). 90451e423a8fSmrg freebsd2.2*) 90461e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 90471e423a8fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 90481e423a8fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 90491e423a8fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 90501e423a8fSmrg ;; 9051a31a186aSmrg 90521e423a8fSmrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 90531e423a8fSmrg freebsd2.*) 90541e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 90551e423a8fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 90561e423a8fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 90571e423a8fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 90581e423a8fSmrg ;; 9059a31a186aSmrg 90601e423a8fSmrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 90611e423a8fSmrg freebsd* | dragonfly* | midnightbsd*) 90621e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 90631e423a8fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 90641e423a8fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 90651e423a8fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 90661e423a8fSmrg ;; 9067a31a186aSmrg 90681e423a8fSmrg hpux9*) 90691e423a8fSmrg if test yes = "$GCC"; then 90701e423a8fSmrg _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 "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 90711e423a8fSmrg else 90721e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 90731e423a8fSmrg fi 90741e423a8fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 90751e423a8fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 90761e423a8fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 9077a31a186aSmrg 90781e423a8fSmrg # hardcode_minus_L: Not really in the search PATH, 90791e423a8fSmrg # but as the default location of the library. 90801e423a8fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 90811e423a8fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 90821e423a8fSmrg ;; 9083a31a186aSmrg 90841e423a8fSmrg hpux10*) 90851e423a8fSmrg if test yes,no = "$GCC,$with_gnu_ld"; then 90861e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 90871e423a8fSmrg else 90881e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 90891e423a8fSmrg fi 90901e423a8fSmrg if test no = "$with_gnu_ld"; then 90911e423a8fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 90921e423a8fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 90931e423a8fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 90941e423a8fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 90951e423a8fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 90961e423a8fSmrg # hardcode_minus_L: Not really in the search PATH, 90971e423a8fSmrg # but as the default location of the library. 90981e423a8fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 90991e423a8fSmrg fi 91001e423a8fSmrg ;; 9101a31a186aSmrg 91021e423a8fSmrg hpux11*) 91031e423a8fSmrg if test yes,no = "$GCC,$with_gnu_ld"; then 91041e423a8fSmrg case $host_cpu in 91051e423a8fSmrg hppa*64*) 91061e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 91071e423a8fSmrg ;; 91081e423a8fSmrg ia64*) 91091e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 91101e423a8fSmrg ;; 91111e423a8fSmrg *) 91121e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 91131e423a8fSmrg ;; 91141e423a8fSmrg esac 91151e423a8fSmrg else 91161e423a8fSmrg case $host_cpu in 91171e423a8fSmrg hppa*64*) 91181e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 91191e423a8fSmrg ;; 91201e423a8fSmrg ia64*) 91211e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 91221e423a8fSmrg ;; 91231e423a8fSmrg *) 91241e423a8fSmrg m4_if($1, [], [ 91251e423a8fSmrg # Older versions of the 11.00 compiler do not understand -b yet 91261e423a8fSmrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 91271e423a8fSmrg _LT_LINKER_OPTION([if $CC understands -b], 91281e423a8fSmrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 91291e423a8fSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 91301e423a8fSmrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 91311e423a8fSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 91321e423a8fSmrg ;; 91331e423a8fSmrg esac 91341e423a8fSmrg fi 91351e423a8fSmrg if test no = "$with_gnu_ld"; then 91361e423a8fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 91371e423a8fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9138a31a186aSmrg 91391e423a8fSmrg case $host_cpu in 91401e423a8fSmrg hppa*64*|ia64*) 91411e423a8fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 91421e423a8fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 91431e423a8fSmrg ;; 91441e423a8fSmrg *) 91451e423a8fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 91461e423a8fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 91471e423a8fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 9148a31a186aSmrg 91491e423a8fSmrg # hardcode_minus_L: Not really in the search PATH, 91501e423a8fSmrg # but as the default location of the library. 91511e423a8fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 91521e423a8fSmrg ;; 91531e423a8fSmrg esac 91541e423a8fSmrg fi 91551e423a8fSmrg ;; 9156a31a186aSmrg 91571e423a8fSmrg irix5* | irix6* | nonstopux*) 91581e423a8fSmrg if test yes = "$GCC"; then 91591e423a8fSmrg _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' 91601e423a8fSmrg # Try to use the -exported_symbol ld option, if it does not 91611e423a8fSmrg # work, assume that -exports_file does not work either and 91621e423a8fSmrg # implicitly export all symbols. 91631e423a8fSmrg # This should be the same for all languages, so no per-tag cache variable. 91641e423a8fSmrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 91651e423a8fSmrg [lt_cv_irix_exported_symbol], 91661e423a8fSmrg [save_LDFLAGS=$LDFLAGS 91671e423a8fSmrg LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" 91681e423a8fSmrg AC_LINK_IFELSE( 91691e423a8fSmrg [AC_LANG_SOURCE( 91701e423a8fSmrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 91711e423a8fSmrg [C++], [[int foo (void) { return 0; }]], 91721e423a8fSmrg [Fortran 77], [[ 91731e423a8fSmrg subroutine foo 91741e423a8fSmrg end]], 91751e423a8fSmrg [Fortran], [[ 91761e423a8fSmrg subroutine foo 91771e423a8fSmrg end]])])], 91781e423a8fSmrg [lt_cv_irix_exported_symbol=yes], 91791e423a8fSmrg [lt_cv_irix_exported_symbol=no]) 91801e423a8fSmrg LDFLAGS=$save_LDFLAGS]) 91811e423a8fSmrg if test yes = "$lt_cv_irix_exported_symbol"; then 91821e423a8fSmrg _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' 91831e423a8fSmrg fi 91841e423a8fSmrg else 91851e423a8fSmrg _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' 91861e423a8fSmrg _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' 91871e423a8fSmrg fi 91881e423a8fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 91891e423a8fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 91901e423a8fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 91911e423a8fSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 91921e423a8fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 91931e423a8fSmrg ;; 91941e423a8fSmrg 91951e423a8fSmrg linux*) 91961e423a8fSmrg case $cc_basename in 91971e423a8fSmrg tcc*) 91981e423a8fSmrg # Fabrice Bellard et al's Tiny C Compiler 91991e423a8fSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 92001e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 92011e423a8fSmrg ;; 92021e423a8fSmrg esac 92031e423a8fSmrg ;; 9204fe5e51b7Smrg 92051e423a8fSmrg netbsd*) 92061e423a8fSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 92071e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 92081e423a8fSmrg else 92091e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 92101e423a8fSmrg fi 92111e423a8fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 92121e423a8fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 92131e423a8fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 92141e423a8fSmrg ;; 9215eda3803bSmrg 92161e423a8fSmrg newsos6) 92171e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 92181e423a8fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 92191e423a8fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 92201e423a8fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 92211e423a8fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 92221e423a8fSmrg ;; 9223fe5e51b7Smrg 92241e423a8fSmrg *nto* | *qnx*) 92251e423a8fSmrg ;; 9226fe5e51b7Smrg 92271e423a8fSmrg openbsd* | bitrig*) 92281e423a8fSmrg if test -f /usr/libexec/ld.so; then 92291e423a8fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 92301e423a8fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 92311e423a8fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 92321e423a8fSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 92331e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 92341e423a8fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' 92351e423a8fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 92361e423a8fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 92371e423a8fSmrg else 92381e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 92391e423a8fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 92401e423a8fSmrg fi 92411e423a8fSmrg else 92421e423a8fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 92431e423a8fSmrg fi 92441e423a8fSmrg ;; 9245fe5e51b7Smrg 92461e423a8fSmrg os2*) 92471e423a8fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 92481e423a8fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 92491e423a8fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 92501e423a8fSmrg shrext_cmds=.dll 92511e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 92521e423a8fSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 92531e423a8fSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 92541e423a8fSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 92551e423a8fSmrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 92561e423a8fSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 92571e423a8fSmrg emximp -o $lib $output_objdir/$libname.def' 92581e423a8fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 92591e423a8fSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 92601e423a8fSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 92611e423a8fSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 92621e423a8fSmrg prefix_cmds="$SED"~ 92631e423a8fSmrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 92641e423a8fSmrg prefix_cmds="$prefix_cmds -e 1d"; 92651e423a8fSmrg fi~ 92661e423a8fSmrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 92671e423a8fSmrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 92681e423a8fSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 92691e423a8fSmrg emximp -o $lib $output_objdir/$libname.def' 92701e423a8fSmrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 92711e423a8fSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 92721e423a8fSmrg _LT_TAGVAR(file_list_spec, $1)='@' 92731e423a8fSmrg ;; 9274fe5e51b7Smrg 92751e423a8fSmrg osf3*) 92761e423a8fSmrg if test yes = "$GCC"; then 92771e423a8fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 92781e423a8fSmrg _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' 92791e423a8fSmrg else 92801e423a8fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 92811e423a8fSmrg _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' 92821e423a8fSmrg fi 92831e423a8fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 92841e423a8fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 92851e423a8fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 92861e423a8fSmrg ;; 9287fe5e51b7Smrg 92881e423a8fSmrg osf4* | osf5*) # as osf3* with the addition of -msym flag 92891e423a8fSmrg if test yes = "$GCC"; then 92901e423a8fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 92911e423a8fSmrg _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' 92921e423a8fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 92931e423a8fSmrg else 92941e423a8fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 92951e423a8fSmrg _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' 92961e423a8fSmrg _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~ 92971e423a8fSmrg $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' 9298a31a186aSmrg 92991e423a8fSmrg # Both c and cxx compiler support -rpath directly 93001e423a8fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 93011e423a8fSmrg fi 93021e423a8fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 93031e423a8fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 93041e423a8fSmrg ;; 9305fe5e51b7Smrg 93061e423a8fSmrg solaris*) 93071e423a8fSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 93081e423a8fSmrg if test yes = "$GCC"; then 93091e423a8fSmrg wlarc='$wl' 93101e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 93111e423a8fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 93121e423a8fSmrg $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' 93131e423a8fSmrg else 93141e423a8fSmrg case `$CC -V 2>&1` in 93151e423a8fSmrg *"Compilers 5.0"*) 93161e423a8fSmrg wlarc='' 93171e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' 93181e423a8fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 93191e423a8fSmrg $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 93201e423a8fSmrg ;; 93211e423a8fSmrg *) 93221e423a8fSmrg wlarc='$wl' 93231e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' 93241e423a8fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 93251e423a8fSmrg $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 93261e423a8fSmrg ;; 93271e423a8fSmrg esac 93281e423a8fSmrg fi 93291e423a8fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 93301e423a8fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 93311e423a8fSmrg case $host_os in 93321e423a8fSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 93331e423a8fSmrg *) 93341e423a8fSmrg # The compiler driver will combine and reorder linker options, 93351e423a8fSmrg # but understands '-z linker_flag'. GCC discards it without '$wl', 93361e423a8fSmrg # but is careful enough not to reorder. 93371e423a8fSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 93381e423a8fSmrg if test yes = "$GCC"; then 93391e423a8fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 93401e423a8fSmrg else 93411e423a8fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 93421e423a8fSmrg fi 93431e423a8fSmrg ;; 93441e423a8fSmrg esac 93451e423a8fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 93461e423a8fSmrg ;; 9347fe5e51b7Smrg 93481e423a8fSmrg sunos4*) 93491e423a8fSmrg if test sequent = "$host_vendor"; then 93501e423a8fSmrg # Use $CC to link under sequent, because it throws in some extra .o 93511e423a8fSmrg # files that make .init and .fini sections work. 93521e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' 93531e423a8fSmrg else 93541e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 93551e423a8fSmrg fi 93561e423a8fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 93571e423a8fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 93581e423a8fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 93591e423a8fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 93601e423a8fSmrg ;; 9361fe5e51b7Smrg 93621e423a8fSmrg sysv4) 93631e423a8fSmrg case $host_vendor in 93641e423a8fSmrg sni) 93651e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 93661e423a8fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 93671e423a8fSmrg ;; 93681e423a8fSmrg siemens) 93691e423a8fSmrg ## LD is ld it makes a PLAMLIB 93701e423a8fSmrg ## CC just makes a GrossModule. 93711e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 93721e423a8fSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 93731e423a8fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 93741e423a8fSmrg ;; 93751e423a8fSmrg motorola) 93761e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 93771e423a8fSmrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 93781e423a8fSmrg ;; 93791e423a8fSmrg esac 93801e423a8fSmrg runpath_var='LD_RUN_PATH' 93811e423a8fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 93821e423a8fSmrg ;; 9383fe5e51b7Smrg 93841e423a8fSmrg sysv4.3*) 93851e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 93861e423a8fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 93871e423a8fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 93881e423a8fSmrg ;; 9389fe5e51b7Smrg 93901e423a8fSmrg sysv4*MP*) 93911e423a8fSmrg if test -d /usr/nec; then 93921e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 93931e423a8fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 93941e423a8fSmrg runpath_var=LD_RUN_PATH 93951e423a8fSmrg hardcode_runpath_var=yes 93961e423a8fSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 93971e423a8fSmrg fi 93981e423a8fSmrg ;; 9399eda3803bSmrg 94001e423a8fSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 94011e423a8fSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 94021e423a8fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 94031e423a8fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 94041e423a8fSmrg runpath_var='LD_RUN_PATH' 9405a31a186aSmrg 94061e423a8fSmrg if test yes = "$GCC"; then 94071e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 94081e423a8fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 94091e423a8fSmrg else 94101e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 94111e423a8fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 94121e423a8fSmrg fi 94131e423a8fSmrg ;; 9414a31a186aSmrg 94151e423a8fSmrg sysv5* | sco3.2v5* | sco5v6*) 94161e423a8fSmrg # Note: We CANNOT use -z defs as we might desire, because we do not 94171e423a8fSmrg # link with -lc, and that would cause any symbols used from libc to 94181e423a8fSmrg # always be unresolved, which means just about no library would 94191e423a8fSmrg # ever link correctly. If we're not using GNU ld we use -z text 94201e423a8fSmrg # though, which does catch some bad symbols but isn't as heavy-handed 94211e423a8fSmrg # as -z defs. 94221e423a8fSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 94231e423a8fSmrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 94241e423a8fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 94251e423a8fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 94261e423a8fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 94271e423a8fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 94281e423a8fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 94291e423a8fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 94301e423a8fSmrg runpath_var='LD_RUN_PATH' 9431a31a186aSmrg 94321e423a8fSmrg if test yes = "$GCC"; then 94331e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 94341e423a8fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 94351e423a8fSmrg else 94361e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 94371e423a8fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 94381e423a8fSmrg fi 94391e423a8fSmrg ;; 9440a31a186aSmrg 94411e423a8fSmrg uts4*) 94421e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 94431e423a8fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 94441e423a8fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 94451e423a8fSmrg ;; 9446a31a186aSmrg 94471e423a8fSmrg *) 94481e423a8fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 94491e423a8fSmrg ;; 94501e423a8fSmrg esac 9451b0de6900Smrg 94521e423a8fSmrg if test sni = "$host_vendor"; then 94531e423a8fSmrg case $host in 94541e423a8fSmrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 94551e423a8fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' 94561e423a8fSmrg ;; 94571e423a8fSmrg esac 94581e423a8fSmrg fi 94591e423a8fSmrg fi 94601e423a8fSmrg]) 94611e423a8fSmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 94621e423a8fSmrgtest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 9463b0de6900Smrg 94641e423a8fSmrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 94650bb88ba4Smrg 94661e423a8fSmrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 94671e423a8fSmrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 94681e423a8fSmrg_LT_DECL([], [extract_expsyms_cmds], [2], 94691e423a8fSmrg [The commands to extract the exported symbol list from a shared archive]) 94701e423a8fSmrg 94711e423a8fSmrg# 94721e423a8fSmrg# Do we need to explicitly link libc? 94731e423a8fSmrg# 94741e423a8fSmrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 94751e423a8fSmrgx|xyes) 94761e423a8fSmrg # Assume -lc should be added 94771e423a8fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 94781e423a8fSmrg 94791e423a8fSmrg if test yes,yes = "$GCC,$enable_shared"; then 94801e423a8fSmrg case $_LT_TAGVAR(archive_cmds, $1) in 94811e423a8fSmrg *'~'*) 94821e423a8fSmrg # FIXME: we may have to deal with multi-command sequences. 94831e423a8fSmrg ;; 94841e423a8fSmrg '$CC '*) 94851e423a8fSmrg # Test whether the compiler implicitly links with -lc since on some 94861e423a8fSmrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 94871e423a8fSmrg # to ld, don't add -lc before -lgcc. 94881e423a8fSmrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 94891e423a8fSmrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 94901e423a8fSmrg [$RM conftest* 94911e423a8fSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 94921e423a8fSmrg 94931e423a8fSmrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 94941e423a8fSmrg soname=conftest 94951e423a8fSmrg lib=conftest 94961e423a8fSmrg libobjs=conftest.$ac_objext 94971e423a8fSmrg deplibs= 94981e423a8fSmrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 94991e423a8fSmrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 95001e423a8fSmrg compiler_flags=-v 95011e423a8fSmrg linker_flags=-v 95021e423a8fSmrg verstring= 95031e423a8fSmrg output_objdir=. 95041e423a8fSmrg libname=conftest 95051e423a8fSmrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 95061e423a8fSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 95071e423a8fSmrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 95081e423a8fSmrg then 95091e423a8fSmrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 95101e423a8fSmrg else 95111e423a8fSmrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 95121e423a8fSmrg fi 95131e423a8fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 9514fe5e51b7Smrg else 95151e423a8fSmrg cat conftest.err 1>&5 9516fe5e51b7Smrg fi 95171e423a8fSmrg $RM conftest* 95181e423a8fSmrg ]) 95191e423a8fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 95201e423a8fSmrg ;; 95211e423a8fSmrg esac 95221e423a8fSmrg fi 95231e423a8fSmrg ;; 95241e423a8fSmrgesac 9525fe5e51b7Smrg 95261e423a8fSmrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 95271e423a8fSmrg [Whether or not to add -lc for building shared libraries]) 95281e423a8fSmrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 95291e423a8fSmrg [enable_shared_with_static_runtimes], [0], 95301e423a8fSmrg [Whether or not to disallow shared libs when runtime libs are static]) 95311e423a8fSmrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 95321e423a8fSmrg [Compiler flag to allow reflexive dlopens]) 95331e423a8fSmrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 95341e423a8fSmrg [Compiler flag to generate shared objects directly from archives]) 95351e423a8fSmrg_LT_TAGDECL([], [compiler_needs_object], [1], 95361e423a8fSmrg [Whether the compiler copes with passing no objects directly]) 95371e423a8fSmrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 95381e423a8fSmrg [Create an old-style archive from a shared archive]) 95391e423a8fSmrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 95401e423a8fSmrg [Create a temporary old-style archive to link instead of a shared archive]) 95411e423a8fSmrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 95421e423a8fSmrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 95431e423a8fSmrg_LT_TAGDECL([], [module_cmds], [2], 95441e423a8fSmrg [Commands used to build a loadable module if different from building 95451e423a8fSmrg a shared archive.]) 95461e423a8fSmrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 95471e423a8fSmrg_LT_TAGDECL([], [with_gnu_ld], [1], 95481e423a8fSmrg [Whether we are building with GNU ld or not]) 95491e423a8fSmrg_LT_TAGDECL([], [allow_undefined_flag], [1], 95501e423a8fSmrg [Flag that allows shared libraries with undefined symbols to be built]) 95511e423a8fSmrg_LT_TAGDECL([], [no_undefined_flag], [1], 95521e423a8fSmrg [Flag that enforces no undefined symbols]) 95531e423a8fSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 95541e423a8fSmrg [Flag to hardcode $libdir into a binary during linking. 95551e423a8fSmrg This must work even if $libdir does not exist]) 95561e423a8fSmrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 95571e423a8fSmrg [Whether we need a single "-rpath" flag with a separated argument]) 95581e423a8fSmrg_LT_TAGDECL([], [hardcode_direct], [0], 95591e423a8fSmrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 95601e423a8fSmrg DIR into the resulting binary]) 95611e423a8fSmrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 95621e423a8fSmrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 95631e423a8fSmrg DIR into the resulting binary and the resulting library dependency is 95641e423a8fSmrg "absolute", i.e impossible to change by setting $shlibpath_var if the 95651e423a8fSmrg library is relocated]) 95661e423a8fSmrg_LT_TAGDECL([], [hardcode_minus_L], [0], 95671e423a8fSmrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 95681e423a8fSmrg into the resulting binary]) 95691e423a8fSmrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 95701e423a8fSmrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 95711e423a8fSmrg into the resulting binary]) 95721e423a8fSmrg_LT_TAGDECL([], [hardcode_automatic], [0], 95731e423a8fSmrg [Set to "yes" if building a shared library automatically hardcodes DIR 95741e423a8fSmrg into the library and all subsequent libraries and executables linked 95751e423a8fSmrg against it]) 95761e423a8fSmrg_LT_TAGDECL([], [inherit_rpath], [0], 95771e423a8fSmrg [Set to yes if linker adds runtime paths of dependent libraries 95781e423a8fSmrg to runtime path list]) 95791e423a8fSmrg_LT_TAGDECL([], [link_all_deplibs], [0], 95801e423a8fSmrg [Whether libtool must link a program against all its dependency libraries]) 95811e423a8fSmrg_LT_TAGDECL([], [always_export_symbols], [0], 95821e423a8fSmrg [Set to "yes" if exported symbols are required]) 95831e423a8fSmrg_LT_TAGDECL([], [export_symbols_cmds], [2], 95841e423a8fSmrg [The commands to list exported symbols]) 95851e423a8fSmrg_LT_TAGDECL([], [exclude_expsyms], [1], 95861e423a8fSmrg [Symbols that should not be listed in the preloaded symbols]) 95871e423a8fSmrg_LT_TAGDECL([], [include_expsyms], [1], 95881e423a8fSmrg [Symbols that must always be exported]) 95891e423a8fSmrg_LT_TAGDECL([], [prelink_cmds], [2], 95901e423a8fSmrg [Commands necessary for linking programs (against libraries) with templates]) 95911e423a8fSmrg_LT_TAGDECL([], [postlink_cmds], [2], 95921e423a8fSmrg [Commands necessary for finishing linking programs]) 95931e423a8fSmrg_LT_TAGDECL([], [file_list_spec], [1], 95941e423a8fSmrg [Specify filename containing input files]) 95951e423a8fSmrgdnl FIXME: Not yet implemented 95961e423a8fSmrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 95971e423a8fSmrgdnl [Compiler flag to generate thread safe objects]) 95981e423a8fSmrg])# _LT_LINKER_SHLIBS 9599fe5e51b7Smrg 9600fe5e51b7Smrg 96011e423a8fSmrg# _LT_LANG_C_CONFIG([TAG]) 96021e423a8fSmrg# ------------------------ 96031e423a8fSmrg# Ensure that the configuration variables for a C compiler are suitably 96041e423a8fSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 96051e423a8fSmrg# the compiler configuration to 'libtool'. 96061e423a8fSmrgm4_defun([_LT_LANG_C_CONFIG], 96071e423a8fSmrg[m4_require([_LT_DECL_EGREP])dnl 96081e423a8fSmrglt_save_CC=$CC 96091e423a8fSmrgAC_LANG_PUSH(C) 9610fe5e51b7Smrg 96111e423a8fSmrg# Source file extension for C test sources. 96121e423a8fSmrgac_ext=c 9613fe5e51b7Smrg 96141e423a8fSmrg# Object file extension for compiled C test sources. 96151e423a8fSmrgobjext=o 96161e423a8fSmrg_LT_TAGVAR(objext, $1)=$objext 9617fe5e51b7Smrg 96181e423a8fSmrg# Code to be used in simple compile tests 96191e423a8fSmrglt_simple_compile_test_code="int some_variable = 0;" 9620fe5e51b7Smrg 96211e423a8fSmrg# Code to be used in simple link tests 96221e423a8fSmrglt_simple_link_test_code='int main(){return(0);}' 9623fe5e51b7Smrg 96241e423a8fSmrg_LT_TAG_COMPILER 96251e423a8fSmrg# Save the default compiler, since it gets overwritten when the other 96261e423a8fSmrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 96271e423a8fSmrgcompiler_DEFAULT=$CC 9628fe5e51b7Smrg 96291e423a8fSmrg# save warnings/boilerplate of simple test code 96301e423a8fSmrg_LT_COMPILER_BOILERPLATE 96311e423a8fSmrg_LT_LINKER_BOILERPLATE 9632fe5e51b7Smrg 96331e423a8fSmrgif test -n "$compiler"; then 96341e423a8fSmrg _LT_COMPILER_NO_RTTI($1) 96351e423a8fSmrg _LT_COMPILER_PIC($1) 96361e423a8fSmrg _LT_COMPILER_C_O($1) 96371e423a8fSmrg _LT_COMPILER_FILE_LOCKS($1) 96381e423a8fSmrg _LT_LINKER_SHLIBS($1) 96391e423a8fSmrg _LT_SYS_DYNAMIC_LINKER($1) 96401e423a8fSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 96411e423a8fSmrg LT_SYS_DLOPEN_SELF 96421e423a8fSmrg _LT_CMD_STRIPLIB 9643fe5e51b7Smrg 96441e423a8fSmrg # Report what library types will actually be built 96451e423a8fSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 96461e423a8fSmrg AC_MSG_RESULT([$can_build_shared]) 9647fe5e51b7Smrg 96481e423a8fSmrg AC_MSG_CHECKING([whether to build shared libraries]) 96491e423a8fSmrg test no = "$can_build_shared" && enable_shared=no 9650fe5e51b7Smrg 96511e423a8fSmrg # On AIX, shared libraries and static libraries use the same namespace, and 96521e423a8fSmrg # are all built from PIC. 96531e423a8fSmrg case $host_os in 96541e423a8fSmrg aix3*) 96551e423a8fSmrg test yes = "$enable_shared" && enable_static=no 96561e423a8fSmrg if test -n "$RANLIB"; then 96571e423a8fSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 96581e423a8fSmrg postinstall_cmds='$RANLIB $lib' 96591e423a8fSmrg fi 96601e423a8fSmrg ;; 9661fe5e51b7Smrg 96621e423a8fSmrg aix[[4-9]]*) 96631e423a8fSmrg if test ia64 != "$host_cpu"; then 96641e423a8fSmrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 96651e423a8fSmrg yes,aix,yes) ;; # shared object as lib.so file only 96661e423a8fSmrg yes,svr4,*) ;; # shared object as lib.so archive member only 96671e423a8fSmrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 96681e423a8fSmrg esac 96691e423a8fSmrg fi 96701e423a8fSmrg ;; 96711e423a8fSmrg esac 96721e423a8fSmrg AC_MSG_RESULT([$enable_shared]) 96731e423a8fSmrg 96741e423a8fSmrg AC_MSG_CHECKING([whether to build static libraries]) 96751e423a8fSmrg # Make sure either enable_shared or enable_static is yes. 96761e423a8fSmrg test yes = "$enable_shared" || enable_static=yes 96771e423a8fSmrg AC_MSG_RESULT([$enable_static]) 9678fe5e51b7Smrg 96791e423a8fSmrg _LT_CONFIG($1) 96801e423a8fSmrgfi 96811e423a8fSmrgAC_LANG_POP 96821e423a8fSmrgCC=$lt_save_CC 96831e423a8fSmrg])# _LT_LANG_C_CONFIG 9684acd6767fSmrg 9685b0de6900Smrg 96861e423a8fSmrg# _LT_LANG_CXX_CONFIG([TAG]) 96871e423a8fSmrg# -------------------------- 96881e423a8fSmrg# Ensure that the configuration variables for a C++ compiler are suitably 96891e423a8fSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 96901e423a8fSmrg# the compiler configuration to 'libtool'. 96911e423a8fSmrgm4_defun([_LT_LANG_CXX_CONFIG], 96921e423a8fSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 96931e423a8fSmrgm4_require([_LT_DECL_EGREP])dnl 96941e423a8fSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 96951e423a8fSmrgif test -n "$CXX" && ( test no != "$CXX" && 96961e423a8fSmrg ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || 96971e423a8fSmrg (test g++ != "$CXX"))); then 96981e423a8fSmrg AC_PROG_CXXCPP 96991e423a8fSmrgelse 97001e423a8fSmrg _lt_caught_CXX_error=yes 97011e423a8fSmrgfi 9702b0de6900Smrg 97031e423a8fSmrgAC_LANG_PUSH(C++) 97041e423a8fSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 97051e423a8fSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 97061e423a8fSmrg_LT_TAGVAR(always_export_symbols, $1)=no 97071e423a8fSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 97081e423a8fSmrg_LT_TAGVAR(compiler_needs_object, $1)=no 97091e423a8fSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 97101e423a8fSmrg_LT_TAGVAR(hardcode_direct, $1)=no 97111e423a8fSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 97121e423a8fSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 97131e423a8fSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 97141e423a8fSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 97151e423a8fSmrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 97161e423a8fSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 97171e423a8fSmrg_LT_TAGVAR(inherit_rpath, $1)=no 97181e423a8fSmrg_LT_TAGVAR(module_cmds, $1)= 97191e423a8fSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 97201e423a8fSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 97211e423a8fSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 97221e423a8fSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 97231e423a8fSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 97241e423a8fSmrg_LT_TAGVAR(no_undefined_flag, $1)= 97251e423a8fSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 97261e423a8fSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 9727acd6767fSmrg 97281e423a8fSmrg# Source file extension for C++ test sources. 97291e423a8fSmrgac_ext=cpp 9730acd6767fSmrg 97311e423a8fSmrg# Object file extension for compiled C++ test sources. 97321e423a8fSmrgobjext=o 97331e423a8fSmrg_LT_TAGVAR(objext, $1)=$objext 9734acd6767fSmrg 97351e423a8fSmrg# No sense in running all these tests if we already determined that 97361e423a8fSmrg# the CXX compiler isn't working. Some variables (like enable_shared) 97371e423a8fSmrg# are currently assumed to apply to all compilers on this platform, 97381e423a8fSmrg# and will be corrupted by setting them based on a non-working compiler. 97391e423a8fSmrgif test yes != "$_lt_caught_CXX_error"; then 97401e423a8fSmrg # Code to be used in simple compile tests 97411e423a8fSmrg lt_simple_compile_test_code="int some_variable = 0;" 9742493f84f4Smrg 97431e423a8fSmrg # Code to be used in simple link tests 97441e423a8fSmrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 9745493f84f4Smrg 97461e423a8fSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 97471e423a8fSmrg _LT_TAG_COMPILER 9748493f84f4Smrg 97491e423a8fSmrg # save warnings/boilerplate of simple test code 97501e423a8fSmrg _LT_COMPILER_BOILERPLATE 97511e423a8fSmrg _LT_LINKER_BOILERPLATE 9752493f84f4Smrg 97531e423a8fSmrg # Allow CC to be a program name with arguments. 97541e423a8fSmrg lt_save_CC=$CC 97551e423a8fSmrg lt_save_CFLAGS=$CFLAGS 97561e423a8fSmrg lt_save_LD=$LD 97571e423a8fSmrg lt_save_GCC=$GCC 97581e423a8fSmrg GCC=$GXX 97591e423a8fSmrg lt_save_with_gnu_ld=$with_gnu_ld 97601e423a8fSmrg lt_save_path_LD=$lt_cv_path_LD 97611e423a8fSmrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 97621e423a8fSmrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 97631e423a8fSmrg else 97641e423a8fSmrg $as_unset lt_cv_prog_gnu_ld 97651e423a8fSmrg fi 97661e423a8fSmrg if test -n "${lt_cv_path_LDCXX+set}"; then 97671e423a8fSmrg lt_cv_path_LD=$lt_cv_path_LDCXX 97681e423a8fSmrg else 97691e423a8fSmrg $as_unset lt_cv_path_LD 97701e423a8fSmrg fi 97711e423a8fSmrg test -z "${LDCXX+set}" || LD=$LDCXX 97721e423a8fSmrg CC=${CXX-"c++"} 97731e423a8fSmrg CFLAGS=$CXXFLAGS 97741e423a8fSmrg compiler=$CC 97751e423a8fSmrg _LT_TAGVAR(compiler, $1)=$CC 97761e423a8fSmrg _LT_CC_BASENAME([$compiler]) 9777fe5e51b7Smrg 97781e423a8fSmrg if test -n "$compiler"; then 97791e423a8fSmrg # We don't want -fno-exception when compiling C++ code, so set the 97801e423a8fSmrg # no_builtin_flag separately 97811e423a8fSmrg if test yes = "$GXX"; then 97821e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 97831e423a8fSmrg else 97841e423a8fSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 97851e423a8fSmrg fi 9786fe5e51b7Smrg 97871e423a8fSmrg if test yes = "$GXX"; then 97881e423a8fSmrg # Set up default GNU C++ configuration 9789fe5e51b7Smrg 97901e423a8fSmrg LT_PATH_LD 9791fe5e51b7Smrg 97921e423a8fSmrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 97931e423a8fSmrg # archiving commands below assume that GNU ld is being used. 97941e423a8fSmrg if test yes = "$with_gnu_ld"; then 97951e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 97961e423a8fSmrg _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' 9797fe5e51b7Smrg 97981e423a8fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 97991e423a8fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 9800fe5e51b7Smrg 98011e423a8fSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 98021e423a8fSmrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 98031e423a8fSmrg # investigate it a little bit more. (MM) 98041e423a8fSmrg wlarc='$wl' 9805fe5e51b7Smrg 98061e423a8fSmrg # ancient GNU ld didn't support --whole-archive et. al. 98071e423a8fSmrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 98081e423a8fSmrg $GREP 'no-whole-archive' > /dev/null; then 98091e423a8fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 98101e423a8fSmrg else 98111e423a8fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 98121e423a8fSmrg fi 98131e423a8fSmrg else 98141e423a8fSmrg with_gnu_ld=no 98151e423a8fSmrg wlarc= 9816fe5e51b7Smrg 98171e423a8fSmrg # A generic and very simple default shared library creation 98181e423a8fSmrg # command for GNU C++ for the case where it uses the native 98191e423a8fSmrg # linker, instead of GNU ld. If possible, this setting should 98201e423a8fSmrg # overridden to take advantage of the native linker features on 98211e423a8fSmrg # the platform it is being used on. 98221e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 98231e423a8fSmrg fi 9824fe5e51b7Smrg 98251e423a8fSmrg # Commands to make compiler produce verbose output that lists 98261e423a8fSmrg # what "hidden" libraries, object files and flags are used when 98271e423a8fSmrg # linking a shared library. 98281e423a8fSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 98291e423a8fSmrg 98301e423a8fSmrg else 98311e423a8fSmrg GXX=no 98321e423a8fSmrg with_gnu_ld=no 98331e423a8fSmrg wlarc= 98341e423a8fSmrg fi 98351e423a8fSmrg 98361e423a8fSmrg # PORTME: fill in a description of your system's C++ link characteristics 98371e423a8fSmrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 98381e423a8fSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 9839fe5e51b7Smrg case $host_os in 98401e423a8fSmrg aix3*) 98411e423a8fSmrg # FIXME: insert proper C++ library support 98421e423a8fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 98431e423a8fSmrg ;; 98441e423a8fSmrg aix[[4-9]]*) 98451e423a8fSmrg if test ia64 = "$host_cpu"; then 98461e423a8fSmrg # On IA64, the linker does run time linking by default, so we don't 98471e423a8fSmrg # have to do anything special. 98481e423a8fSmrg aix_use_runtimelinking=no 98491e423a8fSmrg exp_sym_flag='-Bexport' 98501e423a8fSmrg no_entry_flag= 98511e423a8fSmrg else 98521e423a8fSmrg aix_use_runtimelinking=no 98531e423a8fSmrg 98541e423a8fSmrg # Test if we are trying to use run time linking or normal 98551e423a8fSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 98561e423a8fSmrg # have runtime linking enabled, and use it for executables. 98571e423a8fSmrg # For shared libraries, we enable/disable runtime linking 98581e423a8fSmrg # depending on the kind of the shared library created - 98591e423a8fSmrg # when "with_aix_soname,aix_use_runtimelinking" is: 98601e423a8fSmrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 98611e423a8fSmrg # "aix,yes" lib.so shared, rtl:yes, for executables 98621e423a8fSmrg # lib.a static archive 98631e423a8fSmrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 98641e423a8fSmrg # lib.a(lib.so.V) shared, rtl:no, for executables 98651e423a8fSmrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 98661e423a8fSmrg # lib.a(lib.so.V) shared, rtl:no 98671e423a8fSmrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 98681e423a8fSmrg # lib.a static archive 98691e423a8fSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 98701e423a8fSmrg for ld_flag in $LDFLAGS; do 98711e423a8fSmrg case $ld_flag in 98721e423a8fSmrg *-brtl*) 98731e423a8fSmrg aix_use_runtimelinking=yes 98741e423a8fSmrg break 98751e423a8fSmrg ;; 98761e423a8fSmrg esac 98771e423a8fSmrg done 98781e423a8fSmrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 98791e423a8fSmrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 98801e423a8fSmrg # so we don't have lib.a shared libs to link our executables. 98811e423a8fSmrg # We have to force runtime linking in this case. 98821e423a8fSmrg aix_use_runtimelinking=yes 98831e423a8fSmrg LDFLAGS="$LDFLAGS -Wl,-brtl" 98841e423a8fSmrg fi 98851e423a8fSmrg ;; 98861e423a8fSmrg esac 9887fe5e51b7Smrg 98881e423a8fSmrg exp_sym_flag='-bexport' 98891e423a8fSmrg no_entry_flag='-bnoentry' 98901e423a8fSmrg fi 9891fe5e51b7Smrg 98921e423a8fSmrg # When large executables or shared objects are built, AIX ld can 98931e423a8fSmrg # have problems creating the table of contents. If linking a library 98941e423a8fSmrg # or program results in "error TOC overflow" add -mminimal-toc to 98951e423a8fSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 98961e423a8fSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 9897fe5e51b7Smrg 98981e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='' 98991e423a8fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 99001e423a8fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 99011e423a8fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 99021e423a8fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 99031e423a8fSmrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 99041e423a8fSmrg case $with_aix_soname,$aix_use_runtimelinking in 99051e423a8fSmrg aix,*) ;; # no import file 99061e423a8fSmrg svr4,* | *,yes) # use import file 99071e423a8fSmrg # The Import File defines what to hardcode. 99081e423a8fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 99091e423a8fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 99101e423a8fSmrg ;; 99111e423a8fSmrg esac 9912fe5e51b7Smrg 99131e423a8fSmrg if test yes = "$GXX"; then 99141e423a8fSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 99151e423a8fSmrg # We only want to do this on AIX 4.2 and lower, the check 99161e423a8fSmrg # below for broken collect2 doesn't work under 4.3+ 99171e423a8fSmrg collect2name=`$CC -print-prog-name=collect2` 99181e423a8fSmrg if test -f "$collect2name" && 99191e423a8fSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 99201e423a8fSmrg then 99211e423a8fSmrg # We have reworked collect2 99221e423a8fSmrg : 99231e423a8fSmrg else 99241e423a8fSmrg # We have old collect2 99251e423a8fSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 99261e423a8fSmrg # It fails to find uninstalled libraries when the uninstalled 99271e423a8fSmrg # path is not listed in the libpath. Setting hardcode_minus_L 99281e423a8fSmrg # to unsupported forces relinking 99291e423a8fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 99301e423a8fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 99311e423a8fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 99321e423a8fSmrg fi 99331e423a8fSmrg esac 99341e423a8fSmrg shared_flag='-shared' 99351e423a8fSmrg if test yes = "$aix_use_runtimelinking"; then 99361e423a8fSmrg shared_flag=$shared_flag' $wl-G' 99371e423a8fSmrg fi 99381e423a8fSmrg # Need to ensure runtime linking is disabled for the traditional 99391e423a8fSmrg # shared library, or the linker may eventually find shared libraries 99401e423a8fSmrg # /with/ Import File - we do not want to mix them. 99411e423a8fSmrg shared_flag_aix='-shared' 99421e423a8fSmrg shared_flag_svr4='-shared $wl-G' 99431e423a8fSmrg else 99441e423a8fSmrg # not using gcc 99451e423a8fSmrg if test ia64 = "$host_cpu"; then 99461e423a8fSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 99471e423a8fSmrg # chokes on -Wl,-G. The following line is correct: 99481e423a8fSmrg shared_flag='-G' 99491e423a8fSmrg else 99501e423a8fSmrg if test yes = "$aix_use_runtimelinking"; then 99511e423a8fSmrg shared_flag='$wl-G' 99521e423a8fSmrg else 99531e423a8fSmrg shared_flag='$wl-bM:SRE' 99541e423a8fSmrg fi 99551e423a8fSmrg shared_flag_aix='$wl-bM:SRE' 99561e423a8fSmrg shared_flag_svr4='$wl-G' 99571e423a8fSmrg fi 99581e423a8fSmrg fi 9959fe5e51b7Smrg 99601e423a8fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 99611e423a8fSmrg # It seems that -bexpall does not export symbols beginning with 99621e423a8fSmrg # underscore (_), so it is better to generate a list of symbols to 99631e423a8fSmrg # export. 99641e423a8fSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 99651e423a8fSmrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 99661e423a8fSmrg # Warning - without using the other runtime loading flags (-brtl), 99671e423a8fSmrg # -berok will link without error, but may produce a broken library. 99681e423a8fSmrg # The "-G" linker flag allows undefined symbols. 99691e423a8fSmrg _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' 99701e423a8fSmrg # Determine the default libpath from the value encoded in an empty 99711e423a8fSmrg # executable. 99721e423a8fSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 99731e423a8fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 9974d7be9c72Smrg 99751e423a8fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag 99761e423a8fSmrg else 99771e423a8fSmrg if test ia64 = "$host_cpu"; then 99781e423a8fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 99791e423a8fSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 99801e423a8fSmrg _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" 99811e423a8fSmrg else 99821e423a8fSmrg # Determine the default libpath from the value encoded in an 99831e423a8fSmrg # empty executable. 99841e423a8fSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 99851e423a8fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 99861e423a8fSmrg # Warning - without using the other run time loading flags, 99871e423a8fSmrg # -berok will link without error, but may produce a broken library. 99881e423a8fSmrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 99891e423a8fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 99901e423a8fSmrg if test yes = "$with_gnu_ld"; then 99911e423a8fSmrg # We only use this code for GNU lds that support --whole-archive. 99921e423a8fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 99931e423a8fSmrg else 99941e423a8fSmrg # Exported symbols can be pulled into shared objects from archives 99951e423a8fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 99961e423a8fSmrg fi 99971e423a8fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 99981e423a8fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 99991e423a8fSmrg # -brtl affects multiple linker settings, -berok does not and is overridden later 100001e423a8fSmrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 100011e423a8fSmrg if test svr4 != "$with_aix_soname"; then 100021e423a8fSmrg # This is similar to how AIX traditionally builds its shared 100031e423a8fSmrg # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. 100041e423a8fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' 100051e423a8fSmrg fi 100061e423a8fSmrg if test aix != "$with_aix_soname"; then 100071e423a8fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' 100081e423a8fSmrg else 100091e423a8fSmrg # used by -dlpreopen to get the symbols 100101e423a8fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 100111e423a8fSmrg fi 100121e423a8fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 100131e423a8fSmrg fi 100141e423a8fSmrg fi 100151e423a8fSmrg ;; 10016d7be9c72Smrg 100171e423a8fSmrg beos*) 100181e423a8fSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 100191e423a8fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 100201e423a8fSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 100211e423a8fSmrg # support --undefined. This deserves some investigation. FIXME 100221e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 100231e423a8fSmrg else 100241e423a8fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 100251e423a8fSmrg fi 100261e423a8fSmrg ;; 10027fe5e51b7Smrg 100281e423a8fSmrg chorus*) 100291e423a8fSmrg case $cc_basename in 100301e423a8fSmrg *) 100311e423a8fSmrg # FIXME: insert proper C++ library support 100321e423a8fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 100331e423a8fSmrg ;; 100341e423a8fSmrg esac 100351e423a8fSmrg ;; 100361e423a8fSmrg 100371e423a8fSmrg cygwin* | mingw* | pw32* | cegcc*) 100381e423a8fSmrg case $GXX,$cc_basename in 100391e423a8fSmrg ,cl* | no,cl* | ,icl* | no,icl*) 100401e423a8fSmrg # Native MSVC or ICC 100411e423a8fSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 100421e423a8fSmrg # no search path for DLLs. 100431e423a8fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 100441e423a8fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 100451e423a8fSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 100461e423a8fSmrg _LT_TAGVAR(file_list_spec, $1)='@' 100471e423a8fSmrg # Tell ltmain to make .lib files, not .a files. 100481e423a8fSmrg libext=lib 100491e423a8fSmrg # Tell ltmain to make .dll files, not .so files. 100501e423a8fSmrg shrext_cmds=.dll 100511e423a8fSmrg # FIXME: Setting linknames here is a bad hack. 100521e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 100531e423a8fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 100541e423a8fSmrg cp "$export_symbols" "$output_objdir/$soname.def"; 100551e423a8fSmrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 100561e423a8fSmrg else 100571e423a8fSmrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 100581e423a8fSmrg fi~ 100591e423a8fSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 100601e423a8fSmrg linknames=' 100611e423a8fSmrg # The linker will not automatically build a static lib if we build a DLL. 100621e423a8fSmrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 100631e423a8fSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 100641e423a8fSmrg # Don't use ranlib 100651e423a8fSmrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 100661e423a8fSmrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 100671e423a8fSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 100681e423a8fSmrg case $lt_outputfile in 100691e423a8fSmrg *.exe|*.EXE) ;; 100701e423a8fSmrg *) 100711e423a8fSmrg lt_outputfile=$lt_outputfile.exe 100721e423a8fSmrg lt_tool_outputfile=$lt_tool_outputfile.exe 100731e423a8fSmrg ;; 100741e423a8fSmrg esac~ 100751e423a8fSmrg func_to_tool_file "$lt_outputfile"~ 100761e423a8fSmrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 100771e423a8fSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 100781e423a8fSmrg $RM "$lt_outputfile.manifest"; 100791e423a8fSmrg fi' 100801e423a8fSmrg ;; 100811e423a8fSmrg *) 100821e423a8fSmrg # g++ 100831e423a8fSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 100841e423a8fSmrg # as there is no search path for DLLs. 100851e423a8fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 100861e423a8fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 100871e423a8fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 100881e423a8fSmrg _LT_TAGVAR(always_export_symbols, $1)=no 100891e423a8fSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 10090d7be9c72Smrg 100911e423a8fSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 100921e423a8fSmrg _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' 100931e423a8fSmrg # If the export-symbols file already is a .def file, use it as 100941e423a8fSmrg # is; otherwise, prepend EXPORTS... 100951e423a8fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 100961e423a8fSmrg cp $export_symbols $output_objdir/$soname.def; 100971e423a8fSmrg else 100981e423a8fSmrg echo EXPORTS > $output_objdir/$soname.def; 100991e423a8fSmrg cat $export_symbols >> $output_objdir/$soname.def; 101001e423a8fSmrg fi~ 101011e423a8fSmrg $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' 101021e423a8fSmrg else 101031e423a8fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 101041e423a8fSmrg fi 101051e423a8fSmrg ;; 101061e423a8fSmrg esac 101071e423a8fSmrg ;; 101081e423a8fSmrg darwin* | rhapsody*) 101091e423a8fSmrg _LT_DARWIN_LINKER_FEATURES($1) 101101e423a8fSmrg ;; 10111d7be9c72Smrg 101121e423a8fSmrg os2*) 101131e423a8fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 101141e423a8fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 101151e423a8fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 101161e423a8fSmrg shrext_cmds=.dll 101171e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 101181e423a8fSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 101191e423a8fSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 101201e423a8fSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 101211e423a8fSmrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 101221e423a8fSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 101231e423a8fSmrg emximp -o $lib $output_objdir/$libname.def' 101241e423a8fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 101251e423a8fSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 101261e423a8fSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 101271e423a8fSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 101281e423a8fSmrg prefix_cmds="$SED"~ 101291e423a8fSmrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 101301e423a8fSmrg prefix_cmds="$prefix_cmds -e 1d"; 101311e423a8fSmrg fi~ 101321e423a8fSmrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 101331e423a8fSmrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 101341e423a8fSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 101351e423a8fSmrg emximp -o $lib $output_objdir/$libname.def' 101361e423a8fSmrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 101371e423a8fSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 101381e423a8fSmrg _LT_TAGVAR(file_list_spec, $1)='@' 101391e423a8fSmrg ;; 10140d7be9c72Smrg 101411e423a8fSmrg dgux*) 101421e423a8fSmrg case $cc_basename in 101431e423a8fSmrg ec++*) 101441e423a8fSmrg # FIXME: insert proper C++ library support 101451e423a8fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 101461e423a8fSmrg ;; 101471e423a8fSmrg ghcx*) 101481e423a8fSmrg # Green Hills C++ Compiler 101491e423a8fSmrg # FIXME: insert proper C++ library support 101501e423a8fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 101511e423a8fSmrg ;; 101521e423a8fSmrg *) 101531e423a8fSmrg # FIXME: insert proper C++ library support 101541e423a8fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 101551e423a8fSmrg ;; 101561e423a8fSmrg esac 101571e423a8fSmrg ;; 10158fe5e51b7Smrg 101591e423a8fSmrg freebsd2.*) 101601e423a8fSmrg # C++ shared libraries reported to be fairly broken before 101611e423a8fSmrg # switch to ELF 101621e423a8fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 101631e423a8fSmrg ;; 10164fe5e51b7Smrg 101651e423a8fSmrg freebsd-elf*) 101661e423a8fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 101671e423a8fSmrg ;; 10168fe5e51b7Smrg 101691e423a8fSmrg freebsd* | dragonfly* | midnightbsd*) 101701e423a8fSmrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 101711e423a8fSmrg # conventions 101721e423a8fSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 101731e423a8fSmrg ;; 10174fe5e51b7Smrg 101751e423a8fSmrg haiku*) 101761e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 101771e423a8fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 101781e423a8fSmrg ;; 10179fe5e51b7Smrg 101801e423a8fSmrg hpux9*) 101811e423a8fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 101821e423a8fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 101831e423a8fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 101841e423a8fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 101851e423a8fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 101861e423a8fSmrg # but as the default 101871e423a8fSmrg # location of the library. 10188fe5e51b7Smrg 101891e423a8fSmrg case $cc_basename in 101901e423a8fSmrg CC*) 101911e423a8fSmrg # FIXME: insert proper C++ library support 101921e423a8fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 101931e423a8fSmrg ;; 101941e423a8fSmrg aCC*) 101951e423a8fSmrg _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 "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 101961e423a8fSmrg # Commands to make compiler produce verbose output that lists 101971e423a8fSmrg # what "hidden" libraries, object files and flags are used when 101981e423a8fSmrg # linking a shared library. 101991e423a8fSmrg # 102001e423a8fSmrg # There doesn't appear to be a way to prevent this compiler from 102011e423a8fSmrg # explicitly linking system object files so we need to strip them 102021e423a8fSmrg # from the output so that they don't get included in the library 102031e423a8fSmrg # dependencies. 102041e423a8fSmrg 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"' 102051e423a8fSmrg ;; 102061e423a8fSmrg *) 102071e423a8fSmrg if test yes = "$GXX"; then 102081e423a8fSmrg _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 "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 102091e423a8fSmrg else 102101e423a8fSmrg # FIXME: insert proper C++ library support 102111e423a8fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 102121e423a8fSmrg fi 102131e423a8fSmrg ;; 102141e423a8fSmrg esac 102151e423a8fSmrg ;; 10216fe5e51b7Smrg 102171e423a8fSmrg hpux10*|hpux11*) 102181e423a8fSmrg if test no = "$with_gnu_ld"; then 102191e423a8fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 102201e423a8fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10221fe5e51b7Smrg 102221e423a8fSmrg case $host_cpu in 102231e423a8fSmrg hppa*64*|ia64*) 102241e423a8fSmrg ;; 102251e423a8fSmrg *) 102261e423a8fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 102271e423a8fSmrg ;; 102281e423a8fSmrg esac 102291e423a8fSmrg fi 102301e423a8fSmrg case $host_cpu in 102311e423a8fSmrg hppa*64*|ia64*) 102321e423a8fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 102331e423a8fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 102341e423a8fSmrg ;; 102351e423a8fSmrg *) 102361e423a8fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 102371e423a8fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 102381e423a8fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 102391e423a8fSmrg # but as the default 102401e423a8fSmrg # location of the library. 102411e423a8fSmrg ;; 102421e423a8fSmrg esac 10243fe5e51b7Smrg 102441e423a8fSmrg case $cc_basename in 102451e423a8fSmrg CC*) 102461e423a8fSmrg # FIXME: insert proper C++ library support 102471e423a8fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 102481e423a8fSmrg ;; 102491e423a8fSmrg aCC*) 102501e423a8fSmrg case $host_cpu in 102511e423a8fSmrg hppa*64*) 102521e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 102531e423a8fSmrg ;; 102541e423a8fSmrg ia64*) 102551e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 102561e423a8fSmrg ;; 102571e423a8fSmrg *) 102581e423a8fSmrg _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' 102591e423a8fSmrg ;; 102601e423a8fSmrg esac 102611e423a8fSmrg # Commands to make compiler produce verbose output that lists 102621e423a8fSmrg # what "hidden" libraries, object files and flags are used when 102631e423a8fSmrg # linking a shared library. 102641e423a8fSmrg # 102651e423a8fSmrg # There doesn't appear to be a way to prevent this compiler from 102661e423a8fSmrg # explicitly linking system object files so we need to strip them 102671e423a8fSmrg # from the output so that they don't get included in the library 102681e423a8fSmrg # dependencies. 102691e423a8fSmrg 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"' 102701e423a8fSmrg ;; 102711e423a8fSmrg *) 102721e423a8fSmrg if test yes = "$GXX"; then 102731e423a8fSmrg if test no = "$with_gnu_ld"; then 102741e423a8fSmrg case $host_cpu in 102751e423a8fSmrg hppa*64*) 102761e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 102771e423a8fSmrg ;; 102781e423a8fSmrg ia64*) 102791e423a8fSmrg _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' 102801e423a8fSmrg ;; 102811e423a8fSmrg *) 102821e423a8fSmrg _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' 102831e423a8fSmrg ;; 102841e423a8fSmrg esac 102851e423a8fSmrg fi 102861e423a8fSmrg else 102871e423a8fSmrg # FIXME: insert proper C++ library support 102881e423a8fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 102891e423a8fSmrg fi 102901e423a8fSmrg ;; 102911e423a8fSmrg esac 102921e423a8fSmrg ;; 102931e423a8fSmrg 102941e423a8fSmrg interix[[3-9]]*) 102951e423a8fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 102961e423a8fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 102971e423a8fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 102981e423a8fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 102991e423a8fSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 103001e423a8fSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 103011e423a8fSmrg # default) and relocated if they conflict, which is a slow very memory 103021e423a8fSmrg # consuming and fragmenting process. To avoid this, we pick a random, 103031e423a8fSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 103041e423a8fSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 103051e423a8fSmrg _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' 103061e423a8fSmrg _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' 103071e423a8fSmrg ;; 103081e423a8fSmrg irix5* | irix6*) 103091e423a8fSmrg case $cc_basename in 103101e423a8fSmrg CC*) 103111e423a8fSmrg # SGI C++ 103121e423a8fSmrg _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' 10313fe5e51b7Smrg 103141e423a8fSmrg # Archives containing C++ object files must be created using 103151e423a8fSmrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 103161e423a8fSmrg # necessary to make sure instantiated templates are included 103171e423a8fSmrg # in the archive. 103181e423a8fSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 103191e423a8fSmrg ;; 103201e423a8fSmrg *) 103211e423a8fSmrg if test yes = "$GXX"; then 103221e423a8fSmrg if test no = "$with_gnu_ld"; then 103231e423a8fSmrg _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' 103241e423a8fSmrg else 103251e423a8fSmrg _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' 103261e423a8fSmrg fi 103271e423a8fSmrg fi 103281e423a8fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 103291e423a8fSmrg ;; 103301e423a8fSmrg esac 103311e423a8fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 103321e423a8fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 103331e423a8fSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 103341e423a8fSmrg ;; 10335fe5e51b7Smrg 103361e423a8fSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 103371e423a8fSmrg case $cc_basename in 103381e423a8fSmrg KCC*) 103391e423a8fSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 10340fe5e51b7Smrg 103411e423a8fSmrg # KCC will only create a shared library if the output file 103421e423a8fSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 103431e423a8fSmrg # to its proper name (with version) after linking. 103441e423a8fSmrg _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' 103451e423a8fSmrg _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' 103461e423a8fSmrg # Commands to make compiler produce verbose output that lists 103471e423a8fSmrg # what "hidden" libraries, object files and flags are used when 103481e423a8fSmrg # linking a shared library. 103491e423a8fSmrg # 103501e423a8fSmrg # There doesn't appear to be a way to prevent this compiler from 103511e423a8fSmrg # explicitly linking system object files so we need to strip them 103521e423a8fSmrg # from the output so that they don't get included in the library 103531e423a8fSmrg # dependencies. 103541e423a8fSmrg 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"' 10355d7be9c72Smrg 103561e423a8fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 103571e423a8fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 10358fe5e51b7Smrg 103591e423a8fSmrg # Archives containing C++ object files must be created using 103601e423a8fSmrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 103611e423a8fSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 103621e423a8fSmrg ;; 103631e423a8fSmrg icpc* | ecpc* ) 103641e423a8fSmrg # Intel C++ 103651e423a8fSmrg with_gnu_ld=yes 103661e423a8fSmrg # version 8.0 and above of icpc choke on multiply defined symbols 103671e423a8fSmrg # if we add $predep_objects and $postdep_objects, however 7.1 and 103681e423a8fSmrg # earlier do not add the objects themselves. 103691e423a8fSmrg case `$CC -V 2>&1` in 103701e423a8fSmrg *"Version 7."*) 103711e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 103721e423a8fSmrg _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' 103731e423a8fSmrg ;; 103741e423a8fSmrg *) # Version 8.0 or newer 103751e423a8fSmrg tmp_idyn= 103761e423a8fSmrg case $host_cpu in 103771e423a8fSmrg ia64*) tmp_idyn=' -i_dynamic';; 103781e423a8fSmrg esac 103791e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 103801e423a8fSmrg _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' 103811e423a8fSmrg ;; 103821e423a8fSmrg esac 103831e423a8fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 103841e423a8fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 103851e423a8fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 103861e423a8fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 103871e423a8fSmrg ;; 103881e423a8fSmrg pgCC* | pgcpp*) 103891e423a8fSmrg # Portland Group C++ compiler 103901e423a8fSmrg case `$CC -V` in 103911e423a8fSmrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 103921e423a8fSmrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 103931e423a8fSmrg rm -rf $tpldir~ 103941e423a8fSmrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 103951e423a8fSmrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 103961e423a8fSmrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 103971e423a8fSmrg rm -rf $tpldir~ 103981e423a8fSmrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 103991e423a8fSmrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 104001e423a8fSmrg $RANLIB $oldlib' 104011e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 104021e423a8fSmrg rm -rf $tpldir~ 104031e423a8fSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 104041e423a8fSmrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 104051e423a8fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 104061e423a8fSmrg rm -rf $tpldir~ 104071e423a8fSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 104081e423a8fSmrg $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' 104091e423a8fSmrg ;; 104101e423a8fSmrg *) # Version 6 and above use weak symbols 104111e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 104121e423a8fSmrg _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' 104131e423a8fSmrg ;; 104141e423a8fSmrg esac 10415fe5e51b7Smrg 104161e423a8fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' 104171e423a8fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 104181e423a8fSmrg _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' 104191e423a8fSmrg ;; 104201e423a8fSmrg cxx*) 104211e423a8fSmrg # Compaq C++ 104221e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 104231e423a8fSmrg _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' 10424fe5e51b7Smrg 104251e423a8fSmrg runpath_var=LD_RUN_PATH 104261e423a8fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 104271e423a8fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10428fe5e51b7Smrg 104291e423a8fSmrg # Commands to make compiler produce verbose output that lists 104301e423a8fSmrg # what "hidden" libraries, object files and flags are used when 104311e423a8fSmrg # linking a shared library. 104321e423a8fSmrg # 104331e423a8fSmrg # There doesn't appear to be a way to prevent this compiler from 104341e423a8fSmrg # explicitly linking system object files so we need to strip them 104351e423a8fSmrg # from the output so that they don't get included in the library 104361e423a8fSmrg # dependencies. 104371e423a8fSmrg 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' 104381e423a8fSmrg ;; 104391e423a8fSmrg xl* | mpixl* | bgxl*) 104401e423a8fSmrg # IBM XL 8.0 on PPC, with GNU ld 104411e423a8fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 104421e423a8fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 104431e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 104441e423a8fSmrg if test yes = "$supports_anon_versioning"; then 104451e423a8fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 104461e423a8fSmrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 104471e423a8fSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 104481e423a8fSmrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 104491e423a8fSmrg fi 104501e423a8fSmrg ;; 104511e423a8fSmrg *) 104521e423a8fSmrg case `$CC -V 2>&1 | $SED 5q` in 104531e423a8fSmrg *Sun\ C*) 104541e423a8fSmrg # Sun C++ 5.9 104551e423a8fSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 104561e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 104571e423a8fSmrg _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' 104581e423a8fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 104591e423a8fSmrg _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' 104601e423a8fSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 10461fe5e51b7Smrg 104621e423a8fSmrg # Not sure whether something based on 104631e423a8fSmrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 104641e423a8fSmrg # would be better. 104651e423a8fSmrg output_verbose_link_cmd='func_echo_all' 10466fe5e51b7Smrg 104671e423a8fSmrg # Archives containing C++ object files must be created using 104681e423a8fSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 104691e423a8fSmrg # necessary to make sure instantiated templates are included 104701e423a8fSmrg # in the archive. 104711e423a8fSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 104721e423a8fSmrg ;; 104731e423a8fSmrg esac 104741e423a8fSmrg ;; 104751e423a8fSmrg esac 104761e423a8fSmrg ;; 10477fe5e51b7Smrg 104781e423a8fSmrg lynxos*) 104791e423a8fSmrg # FIXME: insert proper C++ library support 104801e423a8fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 104811e423a8fSmrg ;; 10482fe5e51b7Smrg 104831e423a8fSmrg m88k*) 104841e423a8fSmrg # FIXME: insert proper C++ library support 104851e423a8fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 104861e423a8fSmrg ;; 10487d7be9c72Smrg 104881e423a8fSmrg mvs*) 104891e423a8fSmrg case $cc_basename in 104901e423a8fSmrg cxx*) 104911e423a8fSmrg # FIXME: insert proper C++ library support 104921e423a8fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 104931e423a8fSmrg ;; 104941e423a8fSmrg *) 104951e423a8fSmrg # FIXME: insert proper C++ library support 104961e423a8fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 104971e423a8fSmrg ;; 104981e423a8fSmrg esac 104991e423a8fSmrg ;; 10500d7be9c72Smrg 105011e423a8fSmrg netbsd*) 105021e423a8fSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 105031e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 105041e423a8fSmrg wlarc= 105051e423a8fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 105061e423a8fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 105071e423a8fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 105081e423a8fSmrg fi 105091e423a8fSmrg # Workaround some broken pre-1.5 toolchains 105101e423a8fSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 105111e423a8fSmrg ;; 10512d7be9c72Smrg 105131e423a8fSmrg *nto* | *qnx*) 105141e423a8fSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 105151e423a8fSmrg ;; 10516d7be9c72Smrg 105171e423a8fSmrg openbsd* | bitrig*) 105181e423a8fSmrg if test -f /usr/libexec/ld.so; then 105191e423a8fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 105201e423a8fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 105211e423a8fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 105221e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 105231e423a8fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 105241e423a8fSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then 105251e423a8fSmrg _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' 105261e423a8fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 105271e423a8fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 105281e423a8fSmrg fi 105291e423a8fSmrg output_verbose_link_cmd=func_echo_all 105301e423a8fSmrg else 105311e423a8fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 105321e423a8fSmrg fi 105331e423a8fSmrg ;; 105340bb88ba4Smrg 105351e423a8fSmrg osf3* | osf4* | osf5*) 105361e423a8fSmrg case $cc_basename in 105371e423a8fSmrg KCC*) 105381e423a8fSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 105390bb88ba4Smrg 105401e423a8fSmrg # KCC will only create a shared library if the output file 105411e423a8fSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 105421e423a8fSmrg # to its proper name (with version) after linking. 105431e423a8fSmrg _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' 105440bb88ba4Smrg 105451e423a8fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 105461e423a8fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 105470bb88ba4Smrg 105481e423a8fSmrg # Archives containing C++ object files must be created using 105491e423a8fSmrg # the KAI C++ compiler. 105501e423a8fSmrg case $host in 105511e423a8fSmrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 105521e423a8fSmrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 105531e423a8fSmrg esac 105541e423a8fSmrg ;; 105551e423a8fSmrg RCC*) 105561e423a8fSmrg # Rational C++ 2.4.1 105571e423a8fSmrg # FIXME: insert proper C++ library support 105581e423a8fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 105591e423a8fSmrg ;; 105601e423a8fSmrg cxx*) 105611e423a8fSmrg case $host in 105621e423a8fSmrg osf3*) 105631e423a8fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 105641e423a8fSmrg _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' 105651e423a8fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 105661e423a8fSmrg ;; 105671e423a8fSmrg *) 105681e423a8fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 105691e423a8fSmrg _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' 105701e423a8fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 105711e423a8fSmrg echo "-hidden">> $lib.exp~ 105721e423a8fSmrg $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~ 105731e423a8fSmrg $RM $lib.exp' 105741e423a8fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 105751e423a8fSmrg ;; 105761e423a8fSmrg esac 105770bb88ba4Smrg 105781e423a8fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 105791e423a8fSmrg 105801e423a8fSmrg # Commands to make compiler produce verbose output that lists 105811e423a8fSmrg # what "hidden" libraries, object files and flags are used when 105821e423a8fSmrg # linking a shared library. 105831e423a8fSmrg # 105841e423a8fSmrg # There doesn't appear to be a way to prevent this compiler from 105851e423a8fSmrg # explicitly linking system object files so we need to strip them 105861e423a8fSmrg # from the output so that they don't get included in the library 105871e423a8fSmrg # dependencies. 105881e423a8fSmrg 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"' 105891e423a8fSmrg ;; 105901e423a8fSmrg *) 105911e423a8fSmrg if test yes,no = "$GXX,$with_gnu_ld"; then 105921e423a8fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 105931e423a8fSmrg case $host in 105941e423a8fSmrg osf3*) 105951e423a8fSmrg _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' 105961e423a8fSmrg ;; 105971e423a8fSmrg *) 105981e423a8fSmrg _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' 105991e423a8fSmrg ;; 106001e423a8fSmrg esac 106010bb88ba4Smrg 106021e423a8fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 106031e423a8fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10604d7be9c72Smrg 106051e423a8fSmrg # Commands to make compiler produce verbose output that lists 106061e423a8fSmrg # what "hidden" libraries, object files and flags are used when 106071e423a8fSmrg # linking a shared library. 106081e423a8fSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 10609d7be9c72Smrg 106101e423a8fSmrg else 106111e423a8fSmrg # FIXME: insert proper C++ library support 106121e423a8fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 106131e423a8fSmrg fi 106141e423a8fSmrg ;; 106151e423a8fSmrg esac 106161e423a8fSmrg ;; 10617d7be9c72Smrg 106181e423a8fSmrg psos*) 106191e423a8fSmrg # FIXME: insert proper C++ library support 106201e423a8fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 106211e423a8fSmrg ;; 10622493f84f4Smrg 106231e423a8fSmrg sunos4*) 106241e423a8fSmrg case $cc_basename in 106251e423a8fSmrg CC*) 106261e423a8fSmrg # Sun C++ 4.x 106271e423a8fSmrg # FIXME: insert proper C++ library support 106281e423a8fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 106291e423a8fSmrg ;; 106301e423a8fSmrg lcc*) 106311e423a8fSmrg # Lucid 106321e423a8fSmrg # FIXME: insert proper C++ library support 106331e423a8fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 106341e423a8fSmrg ;; 106351e423a8fSmrg *) 106361e423a8fSmrg # FIXME: insert proper C++ library support 106371e423a8fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 106381e423a8fSmrg ;; 106391e423a8fSmrg esac 106401e423a8fSmrg ;; 10641493f84f4Smrg 106421e423a8fSmrg solaris*) 106431e423a8fSmrg case $cc_basename in 106441e423a8fSmrg CC* | sunCC*) 106451e423a8fSmrg # Sun C++ 4.2, 5.x and Centerline C++ 106461e423a8fSmrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 106471e423a8fSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 106481e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 106491e423a8fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 106501e423a8fSmrg $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' 10651d7be9c72Smrg 106521e423a8fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 106531e423a8fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 106541e423a8fSmrg case $host_os in 106551e423a8fSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 106561e423a8fSmrg *) 106571e423a8fSmrg # The compiler driver will combine and reorder linker options, 106581e423a8fSmrg # but understands '-z linker_flag'. 106591e423a8fSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 106601e423a8fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 106611e423a8fSmrg ;; 106621e423a8fSmrg esac 106631e423a8fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 10664d7be9c72Smrg 106651e423a8fSmrg output_verbose_link_cmd='func_echo_all' 10666d7be9c72Smrg 106671e423a8fSmrg # Archives containing C++ object files must be created using 106681e423a8fSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 106691e423a8fSmrg # necessary to make sure instantiated templates are included 106701e423a8fSmrg # in the archive. 106711e423a8fSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 106721e423a8fSmrg ;; 106731e423a8fSmrg gcx*) 106741e423a8fSmrg # Green Hills C++ Compiler 106751e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 10676d7be9c72Smrg 106771e423a8fSmrg # The C++ compiler must be used to create the archive. 106781e423a8fSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 106791e423a8fSmrg ;; 106801e423a8fSmrg *) 106811e423a8fSmrg # GNU C++ compiler with Solaris linker 106821e423a8fSmrg if test yes,no = "$GXX,$with_gnu_ld"; then 106831e423a8fSmrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' 106841e423a8fSmrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 106851e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 106861e423a8fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 106871e423a8fSmrg $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 10688d7be9c72Smrg 106891e423a8fSmrg # Commands to make compiler produce verbose output that lists 106901e423a8fSmrg # what "hidden" libraries, object files and flags are used when 106911e423a8fSmrg # linking a shared library. 106921e423a8fSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 106931e423a8fSmrg else 106941e423a8fSmrg # g++ 2.7 appears to require '-G' NOT '-shared' on this 106951e423a8fSmrg # platform. 106961e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 106971e423a8fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 106981e423a8fSmrg $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 10699d7be9c72Smrg 107001e423a8fSmrg # Commands to make compiler produce verbose output that lists 107011e423a8fSmrg # what "hidden" libraries, object files and flags are used when 107021e423a8fSmrg # linking a shared library. 107031e423a8fSmrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 107041e423a8fSmrg fi 10705d7be9c72Smrg 107061e423a8fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' 107071e423a8fSmrg case $host_os in 107081e423a8fSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 107091e423a8fSmrg *) 107101e423a8fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 107111e423a8fSmrg ;; 107121e423a8fSmrg esac 107131e423a8fSmrg fi 107141e423a8fSmrg ;; 107151e423a8fSmrg esac 107161e423a8fSmrg ;; 107170bb88ba4Smrg 107181e423a8fSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 107191e423a8fSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 107201e423a8fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 107211e423a8fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 107221e423a8fSmrg runpath_var='LD_RUN_PATH' 10723d7be9c72Smrg 107241e423a8fSmrg case $cc_basename in 107251e423a8fSmrg CC*) 107261e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 107271e423a8fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 107281e423a8fSmrg ;; 107291e423a8fSmrg *) 107301e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 107311e423a8fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 107321e423a8fSmrg ;; 107331e423a8fSmrg esac 107341e423a8fSmrg ;; 10735ee82cb62Smrg 107361e423a8fSmrg sysv5* | sco3.2v5* | sco5v6*) 107371e423a8fSmrg # Note: We CANNOT use -z defs as we might desire, because we do not 107381e423a8fSmrg # link with -lc, and that would cause any symbols used from libc to 107391e423a8fSmrg # always be unresolved, which means just about no library would 107401e423a8fSmrg # ever link correctly. If we're not using GNU ld we use -z text 107411e423a8fSmrg # though, which does catch some bad symbols but isn't as heavy-handed 107421e423a8fSmrg # as -z defs. 107431e423a8fSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 107441e423a8fSmrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 107451e423a8fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 107461e423a8fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 107471e423a8fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 107481e423a8fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 107491e423a8fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 107501e423a8fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 107511e423a8fSmrg runpath_var='LD_RUN_PATH' 107521e423a8fSmrg 107531e423a8fSmrg case $cc_basename in 107541e423a8fSmrg CC*) 107551e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 107561e423a8fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 107571e423a8fSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 107581e423a8fSmrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 107591e423a8fSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 107601e423a8fSmrg '"$_LT_TAGVAR(reload_cmds, $1)" 107611e423a8fSmrg ;; 107621e423a8fSmrg *) 107631e423a8fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 107641e423a8fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 107651e423a8fSmrg ;; 107661e423a8fSmrg esac 107671e423a8fSmrg ;; 107681e423a8fSmrg 107691e423a8fSmrg tandem*) 107701e423a8fSmrg case $cc_basename in 107711e423a8fSmrg NCC*) 107721e423a8fSmrg # NonStop-UX NCC 3.20 107731e423a8fSmrg # FIXME: insert proper C++ library support 107741e423a8fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 107751e423a8fSmrg ;; 107761e423a8fSmrg *) 107771e423a8fSmrg # FIXME: insert proper C++ library support 107781e423a8fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 107791e423a8fSmrg ;; 107801e423a8fSmrg esac 107811e423a8fSmrg ;; 10782ee82cb62Smrg 107831e423a8fSmrg vxworks*) 107841e423a8fSmrg # FIXME: insert proper C++ library support 107851e423a8fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 107861e423a8fSmrg ;; 10787d7be9c72Smrg 107881e423a8fSmrg *) 107891e423a8fSmrg # FIXME: insert proper C++ library support 107901e423a8fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 107911e423a8fSmrg ;; 107921e423a8fSmrg esac 10793d7be9c72Smrg 107941e423a8fSmrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 107951e423a8fSmrg test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 10796d7be9c72Smrg 107971e423a8fSmrg _LT_TAGVAR(GCC, $1)=$GXX 107981e423a8fSmrg _LT_TAGVAR(LD, $1)=$LD 10799d7be9c72Smrg 108001e423a8fSmrg ## CAVEAT EMPTOR: 108011e423a8fSmrg ## There is no encapsulation within the following macros, do not change 108021e423a8fSmrg ## the running order or otherwise move them around unless you know exactly 108031e423a8fSmrg ## what you are doing... 108041e423a8fSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 108051e423a8fSmrg _LT_COMPILER_PIC($1) 108061e423a8fSmrg _LT_COMPILER_C_O($1) 108071e423a8fSmrg _LT_COMPILER_FILE_LOCKS($1) 108081e423a8fSmrg _LT_LINKER_SHLIBS($1) 108091e423a8fSmrg _LT_SYS_DYNAMIC_LINKER($1) 108101e423a8fSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 10811d7be9c72Smrg 108121e423a8fSmrg _LT_CONFIG($1) 108131e423a8fSmrg fi # test -n "$compiler" 108140bb88ba4Smrg 108151e423a8fSmrg CC=$lt_save_CC 108161e423a8fSmrg CFLAGS=$lt_save_CFLAGS 108171e423a8fSmrg LDCXX=$LD 108181e423a8fSmrg LD=$lt_save_LD 108191e423a8fSmrg GCC=$lt_save_GCC 108201e423a8fSmrg with_gnu_ld=$lt_save_with_gnu_ld 108211e423a8fSmrg lt_cv_path_LDCXX=$lt_cv_path_LD 108221e423a8fSmrg lt_cv_path_LD=$lt_save_path_LD 108231e423a8fSmrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 108241e423a8fSmrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 108251e423a8fSmrgfi # test yes != "$_lt_caught_CXX_error" 108260bb88ba4Smrg 108271e423a8fSmrgAC_LANG_POP 108281e423a8fSmrg])# _LT_LANG_CXX_CONFIG 108291e423a8fSmrg 108301e423a8fSmrg 108311e423a8fSmrg# _LT_FUNC_STRIPNAME_CNF 108321e423a8fSmrg# ---------------------- 108331e423a8fSmrg# func_stripname_cnf prefix suffix name 108341e423a8fSmrg# strip PREFIX and SUFFIX off of NAME. 108351e423a8fSmrg# PREFIX and SUFFIX must not contain globbing or regex special 108361e423a8fSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading 108371e423a8fSmrg# dot (in which case that matches only a dot). 108380bb88ba4Smrg# 108391e423a8fSmrg# This function is identical to the (non-XSI) version of func_stripname, 108401e423a8fSmrg# except this one can be used by m4 code that may be executed by configure, 108411e423a8fSmrg# rather than the libtool script. 108421e423a8fSmrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 108431e423a8fSmrgAC_REQUIRE([_LT_DECL_SED]) 108441e423a8fSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 108451e423a8fSmrgfunc_stripname_cnf () 108461e423a8fSmrg{ 108471e423a8fSmrg case @S|@2 in 108481e423a8fSmrg .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; 108491e423a8fSmrg *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; 108501e423a8fSmrg esac 108511e423a8fSmrg} # func_stripname_cnf 108521e423a8fSmrg])# _LT_FUNC_STRIPNAME_CNF 108530bb88ba4Smrg 108540bb88ba4Smrg 108551e423a8fSmrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 108561e423a8fSmrg# --------------------------------- 108571e423a8fSmrg# Figure out "hidden" library dependencies from verbose 108581e423a8fSmrg# compiler output when linking a shared library. 108591e423a8fSmrg# Parse the compiler output and extract the necessary 108601e423a8fSmrg# objects, libraries and library flags. 108611e423a8fSmrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 108621e423a8fSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 108631e423a8fSmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 108641e423a8fSmrg# Dependencies to place before and after the object being linked: 108651e423a8fSmrg_LT_TAGVAR(predep_objects, $1)= 108661e423a8fSmrg_LT_TAGVAR(postdep_objects, $1)= 108671e423a8fSmrg_LT_TAGVAR(predeps, $1)= 108681e423a8fSmrg_LT_TAGVAR(postdeps, $1)= 108691e423a8fSmrg_LT_TAGVAR(compiler_lib_search_path, $1)= 108700bb88ba4Smrg 108711e423a8fSmrgdnl we can't use the lt_simple_compile_test_code here, 108721e423a8fSmrgdnl because it contains code intended for an executable, 108731e423a8fSmrgdnl not a library. It's possible we should let each 108741e423a8fSmrgdnl tag define a new lt_????_link_test_code variable, 108751e423a8fSmrgdnl but it's only used here... 108761e423a8fSmrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 108771e423a8fSmrgint a; 108781e423a8fSmrgvoid foo (void) { a = 0; } 108791e423a8fSmrg_LT_EOF 108801e423a8fSmrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 108811e423a8fSmrgclass Foo 108821e423a8fSmrg{ 108831e423a8fSmrgpublic: 108841e423a8fSmrg Foo (void) { a = 0; } 108851e423a8fSmrgprivate: 108861e423a8fSmrg int a; 108871e423a8fSmrg}; 108881e423a8fSmrg_LT_EOF 108891e423a8fSmrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 108901e423a8fSmrg subroutine foo 108911e423a8fSmrg implicit none 108921e423a8fSmrg integer*4 a 108931e423a8fSmrg a=0 108941e423a8fSmrg return 108951e423a8fSmrg end 108961e423a8fSmrg_LT_EOF 108971e423a8fSmrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 108981e423a8fSmrg subroutine foo 108991e423a8fSmrg implicit none 109001e423a8fSmrg integer a 109011e423a8fSmrg a=0 109021e423a8fSmrg return 109031e423a8fSmrg end 109041e423a8fSmrg_LT_EOF 109051e423a8fSmrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 109061e423a8fSmrgpublic class foo { 109071e423a8fSmrg private int a; 109081e423a8fSmrg public void bar (void) { 109091e423a8fSmrg a = 0; 109101e423a8fSmrg } 109111e423a8fSmrg}; 109121e423a8fSmrg_LT_EOF 109131e423a8fSmrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 109141e423a8fSmrgpackage foo 109151e423a8fSmrgfunc foo() { 109161e423a8fSmrg} 109171e423a8fSmrg_LT_EOF 109181e423a8fSmrg]) 109190bb88ba4Smrg 109201e423a8fSmrg_lt_libdeps_save_CFLAGS=$CFLAGS 109211e423a8fSmrgcase "$CC $CFLAGS " in #( 109221e423a8fSmrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 109231e423a8fSmrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 109241e423a8fSmrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 109251e423a8fSmrgesac 109260bb88ba4Smrg 109271e423a8fSmrgdnl Parse the compiler output and extract the necessary 109281e423a8fSmrgdnl objects, libraries and library flags. 109291e423a8fSmrgif AC_TRY_EVAL(ac_compile); then 109301e423a8fSmrg # Parse the compiler output and extract the necessary 109311e423a8fSmrg # objects, libraries and library flags. 109320bb88ba4Smrg 109331e423a8fSmrg # Sentinel used to keep track of whether or not we are before 109341e423a8fSmrg # the conftest object file. 109351e423a8fSmrg pre_test_object_deps_done=no 109361e423a8fSmrg 109371e423a8fSmrg for p in `eval "$output_verbose_link_cmd"`; do 109381e423a8fSmrg case $prev$p in 109391e423a8fSmrg 109401e423a8fSmrg -L* | -R* | -l*) 109411e423a8fSmrg # Some compilers place space between "-{L,R}" and the path. 109421e423a8fSmrg # Remove the space. 109431e423a8fSmrg if test x-L = "$p" || 109441e423a8fSmrg test x-R = "$p"; then 109451e423a8fSmrg prev=$p 109461e423a8fSmrg continue 109471e423a8fSmrg fi 109481e423a8fSmrg 109491e423a8fSmrg # Expand the sysroot to ease extracting the directories later. 109501e423a8fSmrg if test -z "$prev"; then 109511e423a8fSmrg case $p in 109521e423a8fSmrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 109531e423a8fSmrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 109541e423a8fSmrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 109551e423a8fSmrg esac 109561e423a8fSmrg fi 109571e423a8fSmrg case $p in 109581e423a8fSmrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 109591e423a8fSmrg esac 109601e423a8fSmrg if test no = "$pre_test_object_deps_done"; then 109611e423a8fSmrg case $prev in 109621e423a8fSmrg -L | -R) 109631e423a8fSmrg # Internal compiler library paths should come after those 109641e423a8fSmrg # provided the user. The postdeps already come after the 109651e423a8fSmrg # user supplied libs so there is no need to process them. 109661e423a8fSmrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 109671e423a8fSmrg _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p 109681e423a8fSmrg else 109691e423a8fSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" 109701e423a8fSmrg fi 109711e423a8fSmrg ;; 109721e423a8fSmrg # The "-l" case would never come before the object being 109731e423a8fSmrg # linked, so don't bother handling this case. 109741e423a8fSmrg esac 109751e423a8fSmrg else 109761e423a8fSmrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 109771e423a8fSmrg _LT_TAGVAR(postdeps, $1)=$prev$p 109781e423a8fSmrg else 109791e423a8fSmrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" 109801e423a8fSmrg fi 109811e423a8fSmrg fi 109821e423a8fSmrg prev= 109831e423a8fSmrg ;; 109841e423a8fSmrg 109851e423a8fSmrg *.lto.$objext) ;; # Ignore GCC LTO objects 109861e423a8fSmrg *.$objext) 109871e423a8fSmrg # This assumes that the test object file only shows up 109881e423a8fSmrg # once in the compiler output. 109891e423a8fSmrg if test "$p" = "conftest.$objext"; then 109901e423a8fSmrg pre_test_object_deps_done=yes 109911e423a8fSmrg continue 109921e423a8fSmrg fi 109931e423a8fSmrg 109941e423a8fSmrg if test no = "$pre_test_object_deps_done"; then 109951e423a8fSmrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 109961e423a8fSmrg _LT_TAGVAR(predep_objects, $1)=$p 109971e423a8fSmrg else 109981e423a8fSmrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 109991e423a8fSmrg fi 110001e423a8fSmrg else 110011e423a8fSmrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 110021e423a8fSmrg _LT_TAGVAR(postdep_objects, $1)=$p 110031e423a8fSmrg else 110041e423a8fSmrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 110051e423a8fSmrg fi 110061e423a8fSmrg fi 110071e423a8fSmrg ;; 110080bb88ba4Smrg 110091e423a8fSmrg *) ;; # Ignore the rest. 110101e423a8fSmrg 110111e423a8fSmrg esac 110121e423a8fSmrg done 110131e423a8fSmrg 110141e423a8fSmrg # Clean up. 110151e423a8fSmrg rm -f a.out a.exe 110160bb88ba4Smrgelse 110171e423a8fSmrg echo "libtool.m4: error: problem compiling $1 test program" 110180bb88ba4Smrgfi 110190bb88ba4Smrg 110201e423a8fSmrg$RM -f confest.$objext 110211e423a8fSmrgCFLAGS=$_lt_libdeps_save_CFLAGS 110220bb88ba4Smrg 110231e423a8fSmrg# PORTME: override above test on systems where it is broken 110241e423a8fSmrgm4_if([$1], [CXX], 110251e423a8fSmrg[case $host_os in 110261e423a8fSmrginterix[[3-9]]*) 110271e423a8fSmrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 110281e423a8fSmrg # hack all around it, let's just trust "g++" to DTRT. 110291e423a8fSmrg _LT_TAGVAR(predep_objects,$1)= 110301e423a8fSmrg _LT_TAGVAR(postdep_objects,$1)= 110311e423a8fSmrg _LT_TAGVAR(postdeps,$1)= 110321e423a8fSmrg ;; 110331e423a8fSmrgesac 110341e423a8fSmrg]) 110350bb88ba4Smrg 110361e423a8fSmrgcase " $_LT_TAGVAR(postdeps, $1) " in 110371e423a8fSmrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 110380bb88ba4Smrgesac 110391e423a8fSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 110401e423a8fSmrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 110411e423a8fSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` 110421e423a8fSmrgfi 110431e423a8fSmrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 110441e423a8fSmrg [The directories searched by this compiler when creating a shared library]) 110451e423a8fSmrg_LT_TAGDECL([], [predep_objects], [1], 110461e423a8fSmrg [Dependencies to place before and after the objects being linked to 110471e423a8fSmrg create a shared library]) 110481e423a8fSmrg_LT_TAGDECL([], [postdep_objects], [1]) 110491e423a8fSmrg_LT_TAGDECL([], [predeps], [1]) 110501e423a8fSmrg_LT_TAGDECL([], [postdeps], [1]) 110511e423a8fSmrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 110521e423a8fSmrg [The library search path used internally by the compiler when linking 110531e423a8fSmrg a shared library]) 110541e423a8fSmrg])# _LT_SYS_HIDDEN_LIBDEPS 110550bb88ba4Smrg 110561e423a8fSmrg 110571e423a8fSmrg# _LT_LANG_F77_CONFIG([TAG]) 110581e423a8fSmrg# -------------------------- 110591e423a8fSmrg# Ensure that the configuration variables for a Fortran 77 compiler are 110601e423a8fSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 110611e423a8fSmrg# to write the compiler configuration to 'libtool'. 110621e423a8fSmrgm4_defun([_LT_LANG_F77_CONFIG], 110631e423a8fSmrg[AC_LANG_PUSH(Fortran 77) 110641e423a8fSmrgif test -z "$F77" || test no = "$F77"; then 110651e423a8fSmrg _lt_disable_F77=yes 110660bb88ba4Smrgfi 110670bb88ba4Smrg 110681e423a8fSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 110691e423a8fSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 110701e423a8fSmrg_LT_TAGVAR(always_export_symbols, $1)=no 110711e423a8fSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 110721e423a8fSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 110731e423a8fSmrg_LT_TAGVAR(hardcode_direct, $1)=no 110741e423a8fSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 110751e423a8fSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 110761e423a8fSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 110771e423a8fSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 110781e423a8fSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 110791e423a8fSmrg_LT_TAGVAR(inherit_rpath, $1)=no 110801e423a8fSmrg_LT_TAGVAR(module_cmds, $1)= 110811e423a8fSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 110821e423a8fSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 110831e423a8fSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 110841e423a8fSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 110851e423a8fSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 110861e423a8fSmrg_LT_TAGVAR(no_undefined_flag, $1)= 110871e423a8fSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 110881e423a8fSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 110890bb88ba4Smrg 110901e423a8fSmrg# Source file extension for f77 test sources. 110911e423a8fSmrgac_ext=f 11092fe5e51b7Smrg 110931e423a8fSmrg# Object file extension for compiled f77 test sources. 110941e423a8fSmrgobjext=o 110951e423a8fSmrg_LT_TAGVAR(objext, $1)=$objext 11096fe5e51b7Smrg 110971e423a8fSmrg# No sense in running all these tests if we already determined that 110981e423a8fSmrg# the F77 compiler isn't working. Some variables (like enable_shared) 110991e423a8fSmrg# are currently assumed to apply to all compilers on this platform, 111001e423a8fSmrg# and will be corrupted by setting them based on a non-working compiler. 111011e423a8fSmrgif test yes != "$_lt_disable_F77"; then 111021e423a8fSmrg # Code to be used in simple compile tests 111031e423a8fSmrg lt_simple_compile_test_code="\ 111041e423a8fSmrg subroutine t 111051e423a8fSmrg return 111061e423a8fSmrg end 111071e423a8fSmrg" 111081e423a8fSmrg 111091e423a8fSmrg # Code to be used in simple link tests 111101e423a8fSmrg lt_simple_link_test_code="\ 111111e423a8fSmrg program t 111121e423a8fSmrg end 111131e423a8fSmrg" 111141e423a8fSmrg 111151e423a8fSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 111161e423a8fSmrg _LT_TAG_COMPILER 111171e423a8fSmrg 111181e423a8fSmrg # save warnings/boilerplate of simple test code 111191e423a8fSmrg _LT_COMPILER_BOILERPLATE 111201e423a8fSmrg _LT_LINKER_BOILERPLATE 111211e423a8fSmrg 111221e423a8fSmrg # Allow CC to be a program name with arguments. 111231e423a8fSmrg lt_save_CC=$CC 111241e423a8fSmrg lt_save_GCC=$GCC 111251e423a8fSmrg lt_save_CFLAGS=$CFLAGS 111261e423a8fSmrg CC=${F77-"f77"} 111271e423a8fSmrg CFLAGS=$FFLAGS 111281e423a8fSmrg compiler=$CC 111291e423a8fSmrg _LT_TAGVAR(compiler, $1)=$CC 111301e423a8fSmrg _LT_CC_BASENAME([$compiler]) 111311e423a8fSmrg GCC=$G77 111321e423a8fSmrg if test -n "$compiler"; then 111331e423a8fSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 111341e423a8fSmrg AC_MSG_RESULT([$can_build_shared]) 11135fe5e51b7Smrg 111361e423a8fSmrg AC_MSG_CHECKING([whether to build shared libraries]) 111371e423a8fSmrg test no = "$can_build_shared" && enable_shared=no 11138fe5e51b7Smrg 111391e423a8fSmrg # On AIX, shared libraries and static libraries use the same namespace, and 111401e423a8fSmrg # are all built from PIC. 111411e423a8fSmrg case $host_os in 111421e423a8fSmrg aix3*) 111431e423a8fSmrg test yes = "$enable_shared" && enable_static=no 111441e423a8fSmrg if test -n "$RANLIB"; then 111451e423a8fSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 111461e423a8fSmrg postinstall_cmds='$RANLIB $lib' 111471e423a8fSmrg fi 111481e423a8fSmrg ;; 111491e423a8fSmrg aix[[4-9]]*) 111501e423a8fSmrg if test ia64 != "$host_cpu"; then 111511e423a8fSmrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 111521e423a8fSmrg yes,aix,yes) ;; # shared object as lib.so file only 111531e423a8fSmrg yes,svr4,*) ;; # shared object as lib.so archive member only 111541e423a8fSmrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 111551e423a8fSmrg esac 111561e423a8fSmrg fi 111571e423a8fSmrg ;; 111581e423a8fSmrg esac 111591e423a8fSmrg AC_MSG_RESULT([$enable_shared]) 11160fe5e51b7Smrg 111611e423a8fSmrg AC_MSG_CHECKING([whether to build static libraries]) 111621e423a8fSmrg # Make sure either enable_shared or enable_static is yes. 111631e423a8fSmrg test yes = "$enable_shared" || enable_static=yes 111641e423a8fSmrg AC_MSG_RESULT([$enable_static]) 11165d7be9c72Smrg 111661e423a8fSmrg _LT_TAGVAR(GCC, $1)=$G77 111671e423a8fSmrg _LT_TAGVAR(LD, $1)=$LD 11168d7be9c72Smrg 111691e423a8fSmrg ## CAVEAT EMPTOR: 111701e423a8fSmrg ## There is no encapsulation within the following macros, do not change 111711e423a8fSmrg ## the running order or otherwise move them around unless you know exactly 111721e423a8fSmrg ## what you are doing... 111731e423a8fSmrg _LT_COMPILER_PIC($1) 111741e423a8fSmrg _LT_COMPILER_C_O($1) 111751e423a8fSmrg _LT_COMPILER_FILE_LOCKS($1) 111761e423a8fSmrg _LT_LINKER_SHLIBS($1) 111771e423a8fSmrg _LT_SYS_DYNAMIC_LINKER($1) 111781e423a8fSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 11179d7be9c72Smrg 111801e423a8fSmrg _LT_CONFIG($1) 111811e423a8fSmrg fi # test -n "$compiler" 11182fe5e51b7Smrg 111831e423a8fSmrg GCC=$lt_save_GCC 111841e423a8fSmrg CC=$lt_save_CC 111851e423a8fSmrg CFLAGS=$lt_save_CFLAGS 111861e423a8fSmrgfi # test yes != "$_lt_disable_F77" 11187fe5e51b7Smrg 111881e423a8fSmrgAC_LANG_POP 111891e423a8fSmrg])# _LT_LANG_F77_CONFIG 11190fe5e51b7Smrg 11191fe5e51b7Smrg 111921e423a8fSmrg# _LT_LANG_FC_CONFIG([TAG]) 111931e423a8fSmrg# ------------------------- 111941e423a8fSmrg# Ensure that the configuration variables for a Fortran compiler are 111951e423a8fSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 111961e423a8fSmrg# to write the compiler configuration to 'libtool'. 111971e423a8fSmrgm4_defun([_LT_LANG_FC_CONFIG], 111981e423a8fSmrg[AC_LANG_PUSH(Fortran) 11199d7be9c72Smrg 112001e423a8fSmrgif test -z "$FC" || test no = "$FC"; then 112011e423a8fSmrg _lt_disable_FC=yes 11202fe5e51b7Smrgfi 11203d7be9c72Smrg 112041e423a8fSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 112051e423a8fSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 112061e423a8fSmrg_LT_TAGVAR(always_export_symbols, $1)=no 112071e423a8fSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 112081e423a8fSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 112091e423a8fSmrg_LT_TAGVAR(hardcode_direct, $1)=no 112101e423a8fSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 112111e423a8fSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 112121e423a8fSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 112131e423a8fSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 112141e423a8fSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 112151e423a8fSmrg_LT_TAGVAR(inherit_rpath, $1)=no 112161e423a8fSmrg_LT_TAGVAR(module_cmds, $1)= 112171e423a8fSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 112181e423a8fSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 112191e423a8fSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 112201e423a8fSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 112211e423a8fSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 112221e423a8fSmrg_LT_TAGVAR(no_undefined_flag, $1)= 112231e423a8fSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 112241e423a8fSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 11225fe5e51b7Smrg 112261e423a8fSmrg# Source file extension for fc test sources. 112271e423a8fSmrgac_ext=${ac_fc_srcext-f} 11228fe5e51b7Smrg 112291e423a8fSmrg# Object file extension for compiled fc test sources. 112301e423a8fSmrgobjext=o 112311e423a8fSmrg_LT_TAGVAR(objext, $1)=$objext 112320bb88ba4Smrg 112331e423a8fSmrg# No sense in running all these tests if we already determined that 112341e423a8fSmrg# the FC compiler isn't working. Some variables (like enable_shared) 112351e423a8fSmrg# are currently assumed to apply to all compilers on this platform, 112361e423a8fSmrg# and will be corrupted by setting them based on a non-working compiler. 112371e423a8fSmrgif test yes != "$_lt_disable_FC"; then 112381e423a8fSmrg # Code to be used in simple compile tests 112391e423a8fSmrg lt_simple_compile_test_code="\ 112401e423a8fSmrg subroutine t 112411e423a8fSmrg return 112421e423a8fSmrg end 112431e423a8fSmrg" 112440bb88ba4Smrg 112451e423a8fSmrg # Code to be used in simple link tests 112461e423a8fSmrg lt_simple_link_test_code="\ 112471e423a8fSmrg program t 112481e423a8fSmrg end 112491e423a8fSmrg" 112501e423a8fSmrg 112511e423a8fSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 112521e423a8fSmrg _LT_TAG_COMPILER 112531e423a8fSmrg 112541e423a8fSmrg # save warnings/boilerplate of simple test code 112551e423a8fSmrg _LT_COMPILER_BOILERPLATE 112561e423a8fSmrg _LT_LINKER_BOILERPLATE 112571e423a8fSmrg 112581e423a8fSmrg # Allow CC to be a program name with arguments. 112591e423a8fSmrg lt_save_CC=$CC 112601e423a8fSmrg lt_save_GCC=$GCC 112611e423a8fSmrg lt_save_CFLAGS=$CFLAGS 112621e423a8fSmrg CC=${FC-"f95"} 112631e423a8fSmrg CFLAGS=$FCFLAGS 112641e423a8fSmrg compiler=$CC 112651e423a8fSmrg GCC=$ac_cv_fc_compiler_gnu 112660bb88ba4Smrg 112671e423a8fSmrg _LT_TAGVAR(compiler, $1)=$CC 112681e423a8fSmrg _LT_CC_BASENAME([$compiler]) 112690bb88ba4Smrg 112701e423a8fSmrg if test -n "$compiler"; then 112711e423a8fSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 112721e423a8fSmrg AC_MSG_RESULT([$can_build_shared]) 112730bb88ba4Smrg 112741e423a8fSmrg AC_MSG_CHECKING([whether to build shared libraries]) 112751e423a8fSmrg test no = "$can_build_shared" && enable_shared=no 112760bb88ba4Smrg 112771e423a8fSmrg # On AIX, shared libraries and static libraries use the same namespace, and 112781e423a8fSmrg # are all built from PIC. 112791e423a8fSmrg case $host_os in 112801e423a8fSmrg aix3*) 112811e423a8fSmrg test yes = "$enable_shared" && enable_static=no 112821e423a8fSmrg if test -n "$RANLIB"; then 112831e423a8fSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 112841e423a8fSmrg postinstall_cmds='$RANLIB $lib' 112851e423a8fSmrg fi 112861e423a8fSmrg ;; 112871e423a8fSmrg aix[[4-9]]*) 112881e423a8fSmrg if test ia64 != "$host_cpu"; then 112891e423a8fSmrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 112901e423a8fSmrg yes,aix,yes) ;; # shared object as lib.so file only 112911e423a8fSmrg yes,svr4,*) ;; # shared object as lib.so archive member only 112921e423a8fSmrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 112931e423a8fSmrg esac 112940bb88ba4Smrg fi 112951e423a8fSmrg ;; 112961e423a8fSmrg esac 112971e423a8fSmrg AC_MSG_RESULT([$enable_shared]) 112980bb88ba4Smrg 112991e423a8fSmrg AC_MSG_CHECKING([whether to build static libraries]) 113001e423a8fSmrg # Make sure either enable_shared or enable_static is yes. 113011e423a8fSmrg test yes = "$enable_shared" || enable_static=yes 113021e423a8fSmrg AC_MSG_RESULT([$enable_static]) 113030bb88ba4Smrg 113041e423a8fSmrg _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu 113051e423a8fSmrg _LT_TAGVAR(LD, $1)=$LD 113060bb88ba4Smrg 113071e423a8fSmrg ## CAVEAT EMPTOR: 113081e423a8fSmrg ## There is no encapsulation within the following macros, do not change 113091e423a8fSmrg ## the running order or otherwise move them around unless you know exactly 113101e423a8fSmrg ## what you are doing... 113111e423a8fSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 113121e423a8fSmrg _LT_COMPILER_PIC($1) 113131e423a8fSmrg _LT_COMPILER_C_O($1) 113141e423a8fSmrg _LT_COMPILER_FILE_LOCKS($1) 113151e423a8fSmrg _LT_LINKER_SHLIBS($1) 113161e423a8fSmrg _LT_SYS_DYNAMIC_LINKER($1) 113171e423a8fSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 113180bb88ba4Smrg 113191e423a8fSmrg _LT_CONFIG($1) 113201e423a8fSmrg fi # test -n "$compiler" 113210bb88ba4Smrg 113221e423a8fSmrg GCC=$lt_save_GCC 113231e423a8fSmrg CC=$lt_save_CC 113241e423a8fSmrg CFLAGS=$lt_save_CFLAGS 113251e423a8fSmrgfi # test yes != "$_lt_disable_FC" 113260bb88ba4Smrg 113271e423a8fSmrgAC_LANG_POP 113281e423a8fSmrg])# _LT_LANG_FC_CONFIG 113290bb88ba4Smrg 113300bb88ba4Smrg 113311e423a8fSmrg# _LT_LANG_GCJ_CONFIG([TAG]) 113321e423a8fSmrg# -------------------------- 113331e423a8fSmrg# Ensure that the configuration variables for the GNU Java Compiler compiler 113341e423a8fSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 113351e423a8fSmrg# to write the compiler configuration to 'libtool'. 113361e423a8fSmrgm4_defun([_LT_LANG_GCJ_CONFIG], 113371e423a8fSmrg[AC_REQUIRE([LT_PROG_GCJ])dnl 113381e423a8fSmrgAC_LANG_SAVE 113390bb88ba4Smrg 113401e423a8fSmrg# Source file extension for Java test sources. 113411e423a8fSmrgac_ext=java 113420bb88ba4Smrg 113431e423a8fSmrg# Object file extension for compiled Java test sources. 113441e423a8fSmrgobjext=o 113451e423a8fSmrg_LT_TAGVAR(objext, $1)=$objext 113460bb88ba4Smrg 113471e423a8fSmrg# Code to be used in simple compile tests 113481e423a8fSmrglt_simple_compile_test_code="class foo {}" 113490bb88ba4Smrg 113501e423a8fSmrg# Code to be used in simple link tests 113511e423a8fSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 113520bb88ba4Smrg 113531e423a8fSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 113541e423a8fSmrg_LT_TAG_COMPILER 113550bb88ba4Smrg 113561e423a8fSmrg# save warnings/boilerplate of simple test code 113571e423a8fSmrg_LT_COMPILER_BOILERPLATE 113581e423a8fSmrg_LT_LINKER_BOILERPLATE 113590bb88ba4Smrg 113601e423a8fSmrg# Allow CC to be a program name with arguments. 113611e423a8fSmrglt_save_CC=$CC 113621e423a8fSmrglt_save_CFLAGS=$CFLAGS 113631e423a8fSmrglt_save_GCC=$GCC 113641e423a8fSmrgGCC=yes 113651e423a8fSmrgCC=${GCJ-"gcj"} 113661e423a8fSmrgCFLAGS=$GCJFLAGS 113671e423a8fSmrgcompiler=$CC 113681e423a8fSmrg_LT_TAGVAR(compiler, $1)=$CC 113691e423a8fSmrg_LT_TAGVAR(LD, $1)=$LD 113701e423a8fSmrg_LT_CC_BASENAME([$compiler]) 113711e423a8fSmrg 113721e423a8fSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 113731e423a8fSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 113741e423a8fSmrg 113751e423a8fSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 113761e423a8fSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 113771e423a8fSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 113781e423a8fSmrg 113791e423a8fSmrgif test -n "$compiler"; then 113801e423a8fSmrg _LT_COMPILER_NO_RTTI($1) 113811e423a8fSmrg _LT_COMPILER_PIC($1) 113821e423a8fSmrg _LT_COMPILER_C_O($1) 113831e423a8fSmrg _LT_COMPILER_FILE_LOCKS($1) 113841e423a8fSmrg _LT_LINKER_SHLIBS($1) 113851e423a8fSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 113861e423a8fSmrg 113871e423a8fSmrg _LT_CONFIG($1) 113880bb88ba4Smrgfi 113890bb88ba4Smrg 113901e423a8fSmrgAC_LANG_RESTORE 113910bb88ba4Smrg 113921e423a8fSmrgGCC=$lt_save_GCC 113931e423a8fSmrgCC=$lt_save_CC 113941e423a8fSmrgCFLAGS=$lt_save_CFLAGS 113951e423a8fSmrg])# _LT_LANG_GCJ_CONFIG 11396a31a186aSmrg 11397a31a186aSmrg 113981e423a8fSmrg# _LT_LANG_GO_CONFIG([TAG]) 113991e423a8fSmrg# -------------------------- 114001e423a8fSmrg# Ensure that the configuration variables for the GNU Go compiler 114011e423a8fSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 114021e423a8fSmrg# to write the compiler configuration to 'libtool'. 114031e423a8fSmrgm4_defun([_LT_LANG_GO_CONFIG], 114041e423a8fSmrg[AC_REQUIRE([LT_PROG_GO])dnl 114051e423a8fSmrgAC_LANG_SAVE 114060bb88ba4Smrg 114071e423a8fSmrg# Source file extension for Go test sources. 114081e423a8fSmrgac_ext=go 114090bb88ba4Smrg 114101e423a8fSmrg# Object file extension for compiled Go test sources. 114111e423a8fSmrgobjext=o 114121e423a8fSmrg_LT_TAGVAR(objext, $1)=$objext 114130bb88ba4Smrg 114141e423a8fSmrg# Code to be used in simple compile tests 114151e423a8fSmrglt_simple_compile_test_code="package main; func main() { }" 114160bb88ba4Smrg 114171e423a8fSmrg# Code to be used in simple link tests 114181e423a8fSmrglt_simple_link_test_code='package main; func main() { }' 11419a31a186aSmrg 114201e423a8fSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 114211e423a8fSmrg_LT_TAG_COMPILER 11422a31a186aSmrg 114231e423a8fSmrg# save warnings/boilerplate of simple test code 114241e423a8fSmrg_LT_COMPILER_BOILERPLATE 114251e423a8fSmrg_LT_LINKER_BOILERPLATE 11426fe5e51b7Smrg 114271e423a8fSmrg# Allow CC to be a program name with arguments. 114281e423a8fSmrglt_save_CC=$CC 114291e423a8fSmrglt_save_CFLAGS=$CFLAGS 114301e423a8fSmrglt_save_GCC=$GCC 114311e423a8fSmrgGCC=yes 114321e423a8fSmrgCC=${GOC-"gccgo"} 114331e423a8fSmrgCFLAGS=$GOFLAGS 114341e423a8fSmrgcompiler=$CC 114351e423a8fSmrg_LT_TAGVAR(compiler, $1)=$CC 114361e423a8fSmrg_LT_TAGVAR(LD, $1)=$LD 114371e423a8fSmrg_LT_CC_BASENAME([$compiler]) 11438493f84f4Smrg 114391e423a8fSmrg# Go did not exist at the time GCC didn't implicitly link libc in. 114401e423a8fSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 11441fe5e51b7Smrg 114421e423a8fSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 114431e423a8fSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 114441e423a8fSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 11445eda3803bSmrg 114461e423a8fSmrgif test -n "$compiler"; then 114471e423a8fSmrg _LT_COMPILER_NO_RTTI($1) 114481e423a8fSmrg _LT_COMPILER_PIC($1) 114491e423a8fSmrg _LT_COMPILER_C_O($1) 114501e423a8fSmrg _LT_COMPILER_FILE_LOCKS($1) 114511e423a8fSmrg _LT_LINKER_SHLIBS($1) 114521e423a8fSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 114531e423a8fSmrg 114541e423a8fSmrg _LT_CONFIG($1) 114551e423a8fSmrgfi 114561e423a8fSmrg 114571e423a8fSmrgAC_LANG_RESTORE 114581e423a8fSmrg 114591e423a8fSmrgGCC=$lt_save_GCC 114601e423a8fSmrgCC=$lt_save_CC 114611e423a8fSmrgCFLAGS=$lt_save_CFLAGS 114621e423a8fSmrg])# _LT_LANG_GO_CONFIG 114631e423a8fSmrg 114641e423a8fSmrg 114651e423a8fSmrg# _LT_LANG_RC_CONFIG([TAG]) 114661e423a8fSmrg# ------------------------- 114671e423a8fSmrg# Ensure that the configuration variables for the Windows resource compiler 114681e423a8fSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 114691e423a8fSmrg# to write the compiler configuration to 'libtool'. 114701e423a8fSmrgm4_defun([_LT_LANG_RC_CONFIG], 114711e423a8fSmrg[AC_REQUIRE([LT_PROG_RC])dnl 114721e423a8fSmrgAC_LANG_SAVE 11473a31a186aSmrg 114741e423a8fSmrg# Source file extension for RC test sources. 114751e423a8fSmrgac_ext=rc 11476a31a186aSmrg 114771e423a8fSmrg# Object file extension for compiled RC test sources. 114781e423a8fSmrgobjext=o 114791e423a8fSmrg_LT_TAGVAR(objext, $1)=$objext 11480a31a186aSmrg 114811e423a8fSmrg# Code to be used in simple compile tests 114821e423a8fSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 11483fe5e51b7Smrg 114841e423a8fSmrg# Code to be used in simple link tests 114851e423a8fSmrglt_simple_link_test_code=$lt_simple_compile_test_code 11486fe5e51b7Smrg 114871e423a8fSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 114881e423a8fSmrg_LT_TAG_COMPILER 11489fe5e51b7Smrg 114901e423a8fSmrg# save warnings/boilerplate of simple test code 114911e423a8fSmrg_LT_COMPILER_BOILERPLATE 114921e423a8fSmrg_LT_LINKER_BOILERPLATE 11493fe5e51b7Smrg 114941e423a8fSmrg# Allow CC to be a program name with arguments. 114951e423a8fSmrglt_save_CC=$CC 114961e423a8fSmrglt_save_CFLAGS=$CFLAGS 114971e423a8fSmrglt_save_GCC=$GCC 114981e423a8fSmrgGCC= 114991e423a8fSmrgCC=${RC-"windres"} 115001e423a8fSmrgCFLAGS= 115011e423a8fSmrgcompiler=$CC 115021e423a8fSmrg_LT_TAGVAR(compiler, $1)=$CC 115031e423a8fSmrg_LT_CC_BASENAME([$compiler]) 115041e423a8fSmrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 11505fe5e51b7Smrg 115061e423a8fSmrgif test -n "$compiler"; then 115071e423a8fSmrg : 115081e423a8fSmrg _LT_CONFIG($1) 115091e423a8fSmrgfi 11510fe5e51b7Smrg 115111e423a8fSmrgGCC=$lt_save_GCC 115121e423a8fSmrgAC_LANG_RESTORE 115131e423a8fSmrgCC=$lt_save_CC 115141e423a8fSmrgCFLAGS=$lt_save_CFLAGS 115151e423a8fSmrg])# _LT_LANG_RC_CONFIG 11516fe5e51b7Smrg 115171e423a8fSmrg 115181e423a8fSmrg# LT_PROG_GCJ 115191e423a8fSmrg# ----------- 115201e423a8fSmrgAC_DEFUN([LT_PROG_GCJ], 115211e423a8fSmrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 115221e423a8fSmrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 115231e423a8fSmrg [AC_CHECK_TOOL(GCJ, gcj,) 115241e423a8fSmrg test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" 115251e423a8fSmrg AC_SUBST(GCJFLAGS)])])[]dnl 11526fe5e51b7Smrg]) 11527fe5e51b7Smrg 115281e423a8fSmrg# Old name: 115291e423a8fSmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 115301e423a8fSmrgdnl aclocal-1.4 backwards compatibility: 115311e423a8fSmrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 11532fe5e51b7Smrg 11533fe5e51b7Smrg 115341e423a8fSmrg# LT_PROG_GO 115351e423a8fSmrg# ---------- 115361e423a8fSmrgAC_DEFUN([LT_PROG_GO], 115371e423a8fSmrg[AC_CHECK_TOOL(GOC, gccgo,) 115381e423a8fSmrg]) 11539fe5e51b7Smrg 11540fe5e51b7Smrg 115411e423a8fSmrg# LT_PROG_RC 115421e423a8fSmrg# ---------- 115431e423a8fSmrgAC_DEFUN([LT_PROG_RC], 115441e423a8fSmrg[AC_CHECK_TOOL(RC, windres,) 115451e423a8fSmrg]) 11546fe5e51b7Smrg 115471e423a8fSmrg# Old name: 115481e423a8fSmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 115491e423a8fSmrgdnl aclocal-1.4 backwards compatibility: 115501e423a8fSmrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 11551fe5e51b7Smrg 11552fe5e51b7Smrg 115531e423a8fSmrg# _LT_DECL_EGREP 115541e423a8fSmrg# -------------- 115551e423a8fSmrg# If we don't have a new enough Autoconf to choose the best grep 115561e423a8fSmrg# available, choose the one first in the user's PATH. 115571e423a8fSmrgm4_defun([_LT_DECL_EGREP], 115581e423a8fSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl 115591e423a8fSmrgAC_REQUIRE([AC_PROG_FGREP])dnl 115601e423a8fSmrgtest -z "$GREP" && GREP=grep 115611e423a8fSmrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 115621e423a8fSmrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 115631e423a8fSmrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 115641e423a8fSmrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 115651e423a8fSmrgAC_SUBST([GREP]) 115661e423a8fSmrg]) 11567fe5e51b7Smrg 11568fe5e51b7Smrg 115691e423a8fSmrg# _LT_DECL_OBJDUMP 115701e423a8fSmrg# -------------- 115711e423a8fSmrg# If we don't have a new enough Autoconf to choose the best objdump 115721e423a8fSmrg# available, choose the one first in the user's PATH. 115731e423a8fSmrgm4_defun([_LT_DECL_OBJDUMP], 115741e423a8fSmrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 115751e423a8fSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 115761e423a8fSmrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 115771e423a8fSmrgAC_SUBST([OBJDUMP]) 115781e423a8fSmrg]) 115791e423a8fSmrg 115801e423a8fSmrg# _LT_DECL_DLLTOOL 115811e423a8fSmrg# ---------------- 115821e423a8fSmrg# Ensure DLLTOOL variable is set. 115831e423a8fSmrgm4_defun([_LT_DECL_DLLTOOL], 115841e423a8fSmrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 115851e423a8fSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 115861e423a8fSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 115871e423a8fSmrgAC_SUBST([DLLTOOL]) 115881e423a8fSmrg]) 115891e423a8fSmrg 115901e423a8fSmrg# _LT_DECL_FILECMD 115911e423a8fSmrg# ---------------- 115921e423a8fSmrg# Check for a file(cmd) program that can be used to detect file type and magic 115931e423a8fSmrgm4_defun([_LT_DECL_FILECMD], 115941e423a8fSmrg[AC_CHECK_TOOL([FILECMD], [file], [:]) 115951e423a8fSmrg_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types]) 115961e423a8fSmrg])# _LD_DECL_FILECMD 11597fe5e51b7Smrg 115981e423a8fSmrg# _LT_DECL_SED 115991e423a8fSmrg# ------------ 116001e423a8fSmrg# Check for a fully-functional sed program, that truncates 116011e423a8fSmrg# as few characters as possible. Prefer GNU sed if found. 116021e423a8fSmrgm4_defun([_LT_DECL_SED], 116031e423a8fSmrg[AC_PROG_SED 116041e423a8fSmrgtest -z "$SED" && SED=sed 116051e423a8fSmrgXsed="$SED -e 1s/^X//" 116061e423a8fSmrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 116071e423a8fSmrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 116081e423a8fSmrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 116091e423a8fSmrg])# _LT_DECL_SED 11610643b027fSmrg 116111e423a8fSmrgm4_ifndef([AC_PROG_SED], [ 116121e423a8fSmrg# NOTE: This macro has been submitted for inclusion into # 116131e423a8fSmrg# GNU Autoconf as AC_PROG_SED. When it is available in # 116141e423a8fSmrg# a released version of Autoconf we should remove this # 116151e423a8fSmrg# macro and use it instead. # 11616fe5e51b7Smrg 116171e423a8fSmrgm4_defun([AC_PROG_SED], 116181e423a8fSmrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 116191e423a8fSmrgAC_CACHE_VAL(lt_cv_path_SED, 116201e423a8fSmrg[# Loop through the user's path and test for sed and gsed. 116211e423a8fSmrg# Then use that list of sed's as ones to test for truncation. 116221e423a8fSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 116231e423a8fSmrgfor as_dir in $PATH 116241e423a8fSmrgdo 116251e423a8fSmrg IFS=$as_save_IFS 116261e423a8fSmrg test -z "$as_dir" && as_dir=. 116271e423a8fSmrg for lt_ac_prog in sed gsed; do 116281e423a8fSmrg for ac_exec_ext in '' $ac_executable_extensions; do 116291e423a8fSmrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 116301e423a8fSmrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 11631fe5e51b7Smrg fi 116321e423a8fSmrg done 116331e423a8fSmrg done 116341e423a8fSmrgdone 116351e423a8fSmrgIFS=$as_save_IFS 116361e423a8fSmrglt_ac_max=0 116371e423a8fSmrglt_ac_count=0 116381e423a8fSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 116391e423a8fSmrg# along with /bin/sed that truncates output. 116401e423a8fSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 116411e423a8fSmrg test ! -f "$lt_ac_sed" && continue 116421e423a8fSmrg cat /dev/null > conftest.in 116431e423a8fSmrg lt_ac_count=0 116441e423a8fSmrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 116451e423a8fSmrg # Check for GNU sed and select it if it is found. 116461e423a8fSmrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 116471e423a8fSmrg lt_cv_path_SED=$lt_ac_sed 116481e423a8fSmrg break 116491e423a8fSmrg fi 116501e423a8fSmrg while true; do 116511e423a8fSmrg cat conftest.in conftest.in >conftest.tmp 116521e423a8fSmrg mv conftest.tmp conftest.in 116531e423a8fSmrg cp conftest.in conftest.nl 116541e423a8fSmrg echo >>conftest.nl 116551e423a8fSmrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 116561e423a8fSmrg cmp -s conftest.out conftest.nl || break 116571e423a8fSmrg # 10000 chars as input seems more than enough 116581e423a8fSmrg test 10 -lt "$lt_ac_count" && break 116591e423a8fSmrg lt_ac_count=`expr $lt_ac_count + 1` 116601e423a8fSmrg if test "$lt_ac_count" -gt "$lt_ac_max"; then 116611e423a8fSmrg lt_ac_max=$lt_ac_count 116621e423a8fSmrg lt_cv_path_SED=$lt_ac_sed 11663fe5e51b7Smrg fi 11664fe5e51b7Smrg done 116651e423a8fSmrgdone 116661e423a8fSmrg]) 116671e423a8fSmrgSED=$lt_cv_path_SED 116681e423a8fSmrgAC_SUBST([SED]) 116691e423a8fSmrgAC_MSG_RESULT([$SED]) 116701e423a8fSmrg])#AC_PROG_SED 116711e423a8fSmrg])#m4_ifndef 11672fe5e51b7Smrg 116731e423a8fSmrg# Old name: 116741e423a8fSmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 116751e423a8fSmrgdnl aclocal-1.4 backwards compatibility: 116761e423a8fSmrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 116771e423a8fSmrg 116781e423a8fSmrg 116791e423a8fSmrg# _LT_CHECK_SHELL_FEATURES 116801e423a8fSmrg# ------------------------ 116811e423a8fSmrg# Find out whether the shell is Bourne or XSI compatible, 116821e423a8fSmrg# or has some other useful features. 116831e423a8fSmrgm4_defun([_LT_CHECK_SHELL_FEATURES], 116841e423a8fSmrg[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 116851e423a8fSmrg lt_unset=unset 11686fe5e51b7Smrgelse 116871e423a8fSmrg lt_unset=false 11688fe5e51b7Smrgfi 116891e423a8fSmrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 116901e423a8fSmrg 116911e423a8fSmrg# test EBCDIC or ASCII 116921e423a8fSmrgcase `echo X|tr X '\101'` in 116931e423a8fSmrg A) # ASCII based system 116941e423a8fSmrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 116951e423a8fSmrg lt_SP2NL='tr \040 \012' 116961e423a8fSmrg lt_NL2SP='tr \015\012 \040\040' 116971e423a8fSmrg ;; 116981e423a8fSmrg *) # EBCDIC based system 116991e423a8fSmrg lt_SP2NL='tr \100 \n' 117001e423a8fSmrg lt_NL2SP='tr \r\n \100\100' 117011e423a8fSmrg ;; 117021e423a8fSmrgesac 117031e423a8fSmrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 117041e423a8fSmrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 117051e423a8fSmrg])# _LT_CHECK_SHELL_FEATURES 117061e423a8fSmrg 117071e423a8fSmrg 117081e423a8fSmrg# _LT_PATH_CONVERSION_FUNCTIONS 117091e423a8fSmrg# ----------------------------- 117101e423a8fSmrg# Determine what file name conversion functions should be used by 117111e423a8fSmrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 117121e423a8fSmrg# for certain cross-compile configurations and native mingw. 117131e423a8fSmrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 117141e423a8fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 117151e423a8fSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 117161e423a8fSmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 117171e423a8fSmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 117181e423a8fSmrg[case $host in 117191e423a8fSmrg *-*-mingw* ) 117201e423a8fSmrg case $build in 117211e423a8fSmrg *-*-mingw* ) # actually msys 117221e423a8fSmrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 117231e423a8fSmrg ;; 117241e423a8fSmrg *-*-cygwin* ) 117251e423a8fSmrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 117261e423a8fSmrg ;; 117271e423a8fSmrg * ) # otherwise, assume *nix 117281e423a8fSmrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 117291e423a8fSmrg ;; 117301e423a8fSmrg esac 117311e423a8fSmrg ;; 117321e423a8fSmrg *-*-cygwin* ) 117331e423a8fSmrg case $build in 117341e423a8fSmrg *-*-mingw* ) # actually msys 117351e423a8fSmrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 117361e423a8fSmrg ;; 117371e423a8fSmrg *-*-cygwin* ) 117381e423a8fSmrg lt_cv_to_host_file_cmd=func_convert_file_noop 117391e423a8fSmrg ;; 117401e423a8fSmrg * ) # otherwise, assume *nix 117411e423a8fSmrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 117421e423a8fSmrg ;; 117431e423a8fSmrg esac 117441e423a8fSmrg ;; 117451e423a8fSmrg * ) # unhandled hosts (and "normal" native builds) 117461e423a8fSmrg lt_cv_to_host_file_cmd=func_convert_file_noop 117471e423a8fSmrg ;; 117481e423a8fSmrgesac 11749fe5e51b7Smrg]) 117501e423a8fSmrgto_host_file_cmd=$lt_cv_to_host_file_cmd 117511e423a8fSmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 117521e423a8fSmrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 117531e423a8fSmrg [0], [convert $build file names to $host format])dnl 117541e423a8fSmrg 117551e423a8fSmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 117561e423a8fSmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 117571e423a8fSmrg[#assume ordinary cross tools, or native build. 117581e423a8fSmrglt_cv_to_tool_file_cmd=func_convert_file_noop 117591e423a8fSmrgcase $host in 117601e423a8fSmrg *-*-mingw* ) 117611e423a8fSmrg case $build in 117621e423a8fSmrg *-*-mingw* ) # actually msys 117631e423a8fSmrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 117641e423a8fSmrg ;; 117651e423a8fSmrg esac 117661e423a8fSmrg ;; 117671e423a8fSmrgesac 11768fe5e51b7Smrg]) 117691e423a8fSmrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 117701e423a8fSmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 117711e423a8fSmrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 117721e423a8fSmrg [0], [convert $build files to toolchain format])dnl 117731e423a8fSmrg])# _LT_PATH_CONVERSION_FUNCTIONS 11774fe5e51b7Smrg 117751e423a8fSmrg# Helper functions for option handling. -*- Autoconf -*- 117761e423a8fSmrg# 117771e423a8fSmrg# Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2022 Free 117781e423a8fSmrg# Software Foundation, Inc. 117791e423a8fSmrg# Written by Gary V. Vaughan, 2004 117801e423a8fSmrg# 117811e423a8fSmrg# This file is free software; the Free Software Foundation gives 117821e423a8fSmrg# unlimited permission to copy and/or distribute it, with or without 117831e423a8fSmrg# modifications, as long as this notice is preserved. 11784fe5e51b7Smrg 117851e423a8fSmrg# serial 8 ltoptions.m4 117861e423a8fSmrg 117871e423a8fSmrg# This is to help aclocal find these macros, as it can't see m4_define. 117881e423a8fSmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 117891e423a8fSmrg 117901e423a8fSmrg 117911e423a8fSmrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 117921e423a8fSmrg# ------------------------------------------ 117931e423a8fSmrgm4_define([_LT_MANGLE_OPTION], 117941e423a8fSmrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 117951e423a8fSmrg 117961e423a8fSmrg 117971e423a8fSmrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 117981e423a8fSmrg# --------------------------------------- 117991e423a8fSmrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 118001e423a8fSmrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 118011e423a8fSmrg# saved as a flag. 118021e423a8fSmrgm4_define([_LT_SET_OPTION], 118031e423a8fSmrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 118041e423a8fSmrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 118051e423a8fSmrg _LT_MANGLE_DEFUN([$1], [$2]), 118061e423a8fSmrg [m4_warning([Unknown $1 option '$2'])])[]dnl 11807fe5e51b7Smrg]) 11808fe5e51b7Smrg 11809fe5e51b7Smrg 118101e423a8fSmrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 118111e423a8fSmrg# ------------------------------------------------------------ 118121e423a8fSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 118131e423a8fSmrgm4_define([_LT_IF_OPTION], 118141e423a8fSmrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 118151e423a8fSmrg 118161e423a8fSmrg 118171e423a8fSmrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 118181e423a8fSmrg# ------------------------------------------------------- 118191e423a8fSmrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 118201e423a8fSmrg# are set. 118211e423a8fSmrgm4_define([_LT_UNLESS_OPTIONS], 118221e423a8fSmrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 118231e423a8fSmrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 118241e423a8fSmrg [m4_define([$0_found])])])[]dnl 118251e423a8fSmrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 118261e423a8fSmrg])[]dnl 11827fe5e51b7Smrg]) 11828fe5e51b7Smrg 11829fe5e51b7Smrg 118301e423a8fSmrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 118311e423a8fSmrg# ---------------------------------------- 118321e423a8fSmrg# OPTION-LIST is a space-separated list of Libtool options associated 118331e423a8fSmrg# with MACRO-NAME. If any OPTION has a matching handler declared with 118341e423a8fSmrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 118351e423a8fSmrg# the unknown option and exit. 118361e423a8fSmrgm4_defun([_LT_SET_OPTIONS], 118371e423a8fSmrg[# Set options 118381e423a8fSmrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 118391e423a8fSmrg [_LT_SET_OPTION([$1], _LT_Option)]) 118401e423a8fSmrg 118411e423a8fSmrgm4_if([$1],[LT_INIT],[ 118421e423a8fSmrg dnl 118431e423a8fSmrg dnl Simply set some default values (i.e off) if boolean options were not 118441e423a8fSmrg dnl specified: 118451e423a8fSmrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 118461e423a8fSmrg ]) 118471e423a8fSmrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 118481e423a8fSmrg ]) 118491e423a8fSmrg dnl 118501e423a8fSmrg dnl If no reference was made to various pairs of opposing options, then 118511e423a8fSmrg dnl we run the default mode handler for the pair. For example, if neither 118521e423a8fSmrg dnl 'shared' nor 'disable-shared' was passed, we enable building of shared 118531e423a8fSmrg dnl archives by default: 118541e423a8fSmrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 118551e423a8fSmrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 118561e423a8fSmrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 118571e423a8fSmrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 118581e423a8fSmrg [_LT_ENABLE_FAST_INSTALL]) 118591e423a8fSmrg _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], 118601e423a8fSmrg [_LT_WITH_AIX_SONAME([aix])]) 118611e423a8fSmrg ]) 118621e423a8fSmrg])# _LT_SET_OPTIONS 11863fe5e51b7Smrg 11864fe5e51b7Smrg 11865fe5e51b7Smrg 118661e423a8fSmrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 118671e423a8fSmrg# ----------------------------------------- 118681e423a8fSmrgm4_define([_LT_MANGLE_DEFUN], 118691e423a8fSmrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 11870fe5e51b7Smrg 118711e423a8fSmrg 118721e423a8fSmrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 118731e423a8fSmrg# ----------------------------------------------- 118741e423a8fSmrgm4_define([LT_OPTION_DEFINE], 118751e423a8fSmrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 118761e423a8fSmrg])# LT_OPTION_DEFINE 118771e423a8fSmrg 118781e423a8fSmrg 118791e423a8fSmrg# dlopen 118801e423a8fSmrg# ------ 118811e423a8fSmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 11882fe5e51b7Smrg]) 11883fe5e51b7Smrg 118841e423a8fSmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 118851e423a8fSmrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 118861e423a8fSmrgAC_DIAGNOSE([obsolete], 118871e423a8fSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 118881e423a8fSmrgput the 'dlopen' option into LT_INIT's first parameter.]) 118891e423a8fSmrg]) 11890fe5e51b7Smrg 118911e423a8fSmrgdnl aclocal-1.4 backwards compatibility: 118921e423a8fSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 11893fe5e51b7Smrg 11894fe5e51b7Smrg 118951e423a8fSmrg# win32-dll 118961e423a8fSmrg# --------- 118971e423a8fSmrg# Declare package support for building win32 dll's. 118981e423a8fSmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 118991e423a8fSmrg[enable_win32_dll=yes 119001e423a8fSmrg 119011e423a8fSmrgcase $host in 119021e423a8fSmrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 119031e423a8fSmrg AC_CHECK_TOOL(AS, as, false) 119041e423a8fSmrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 119051e423a8fSmrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 119061e423a8fSmrg ;; 119071e423a8fSmrgesac 119081e423a8fSmrg 119091e423a8fSmrgtest -z "$AS" && AS=as 119101e423a8fSmrg_LT_DECL([], [AS], [1], [Assembler program])dnl 119111e423a8fSmrg 119121e423a8fSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 119131e423a8fSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 119141e423a8fSmrg 119151e423a8fSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 119161e423a8fSmrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 119171e423a8fSmrg])# win32-dll 119181e423a8fSmrg 119191e423a8fSmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 119201e423a8fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 119211e423a8fSmrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 119221e423a8fSmrgAC_DIAGNOSE([obsolete], 119231e423a8fSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 119241e423a8fSmrgput the 'win32-dll' option into LT_INIT's first parameter.]) 11925493f84f4Smrg]) 11926493f84f4Smrg 119271e423a8fSmrgdnl aclocal-1.4 backwards compatibility: 119281e423a8fSmrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 119291e423a8fSmrg 119301e423a8fSmrg 119311e423a8fSmrg# _LT_ENABLE_SHARED([DEFAULT]) 119321e423a8fSmrg# ---------------------------- 119331e423a8fSmrg# implement the --enable-shared flag, and supports the 'shared' and 119341e423a8fSmrg# 'disable-shared' LT_INIT options. 119351e423a8fSmrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 119361e423a8fSmrgm4_define([_LT_ENABLE_SHARED], 119371e423a8fSmrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 119381e423a8fSmrgAC_ARG_ENABLE([shared], 119391e423a8fSmrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 119401e423a8fSmrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 119411e423a8fSmrg [p=${PACKAGE-default} 119421e423a8fSmrg case $enableval in 119431e423a8fSmrg yes) enable_shared=yes ;; 119441e423a8fSmrg no) enable_shared=no ;; 119451e423a8fSmrg *) 119461e423a8fSmrg enable_shared=no 119471e423a8fSmrg # Look at the argument we got. We use all the common list separators. 119481e423a8fSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 119491e423a8fSmrg for pkg in $enableval; do 119501e423a8fSmrg IFS=$lt_save_ifs 119511e423a8fSmrg if test "X$pkg" = "X$p"; then 119521e423a8fSmrg enable_shared=yes 119531e423a8fSmrg fi 119541e423a8fSmrg done 119551e423a8fSmrg IFS=$lt_save_ifs 119561e423a8fSmrg ;; 119571e423a8fSmrg esac], 119581e423a8fSmrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 11959fe5e51b7Smrg 119601e423a8fSmrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 119611e423a8fSmrg [Whether or not to build shared libraries]) 119621e423a8fSmrg])# _LT_ENABLE_SHARED 11963fe5e51b7Smrg 119641e423a8fSmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 119651e423a8fSmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 11966fe5e51b7Smrg 119671e423a8fSmrg# Old names: 119681e423a8fSmrgAC_DEFUN([AC_ENABLE_SHARED], 119691e423a8fSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 119701e423a8fSmrg]) 11971fe5e51b7Smrg 119721e423a8fSmrgAC_DEFUN([AC_DISABLE_SHARED], 119731e423a8fSmrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 11974fe5e51b7Smrg]) 11975493f84f4Smrg 119761e423a8fSmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 119771e423a8fSmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 11978493f84f4Smrg 119791e423a8fSmrgdnl aclocal-1.4 backwards compatibility: 119801e423a8fSmrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 119811e423a8fSmrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 11982493f84f4Smrg 11983493f84f4Smrg 11984493f84f4Smrg 119851e423a8fSmrg# _LT_ENABLE_STATIC([DEFAULT]) 119861e423a8fSmrg# ---------------------------- 119871e423a8fSmrg# implement the --enable-static flag, and support the 'static' and 119881e423a8fSmrg# 'disable-static' LT_INIT options. 119891e423a8fSmrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 119901e423a8fSmrgm4_define([_LT_ENABLE_STATIC], 119911e423a8fSmrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 119921e423a8fSmrgAC_ARG_ENABLE([static], 119931e423a8fSmrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 119941e423a8fSmrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 119951e423a8fSmrg [p=${PACKAGE-default} 119961e423a8fSmrg case $enableval in 119971e423a8fSmrg yes) enable_static=yes ;; 119981e423a8fSmrg no) enable_static=no ;; 119991e423a8fSmrg *) 120001e423a8fSmrg enable_static=no 120011e423a8fSmrg # Look at the argument we got. We use all the common list separators. 120021e423a8fSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 120031e423a8fSmrg for pkg in $enableval; do 120041e423a8fSmrg IFS=$lt_save_ifs 120051e423a8fSmrg if test "X$pkg" = "X$p"; then 120061e423a8fSmrg enable_static=yes 120071e423a8fSmrg fi 120081e423a8fSmrg done 120091e423a8fSmrg IFS=$lt_save_ifs 120101e423a8fSmrg ;; 120111e423a8fSmrg esac], 120121e423a8fSmrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 12013493f84f4Smrg 120141e423a8fSmrg _LT_DECL([build_old_libs], [enable_static], [0], 120151e423a8fSmrg [Whether or not to build static libraries]) 120161e423a8fSmrg])# _LT_ENABLE_STATIC 12017493f84f4Smrg 120181e423a8fSmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 120191e423a8fSmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 12020fe5e51b7Smrg 120211e423a8fSmrg# Old names: 120221e423a8fSmrgAC_DEFUN([AC_ENABLE_STATIC], 120231e423a8fSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 120241e423a8fSmrg]) 12025643b027fSmrg 120261e423a8fSmrgAC_DEFUN([AC_DISABLE_STATIC], 120271e423a8fSmrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 120281e423a8fSmrg]) 12029fe5e51b7Smrg 120301e423a8fSmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 120311e423a8fSmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 12032fe5e51b7Smrg 120331e423a8fSmrgdnl aclocal-1.4 backwards compatibility: 120341e423a8fSmrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 120351e423a8fSmrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 12036fe5e51b7Smrg 12037fe5e51b7Smrg 12038fe5e51b7Smrg 120391e423a8fSmrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 120401e423a8fSmrg# ---------------------------------- 120411e423a8fSmrg# implement the --enable-fast-install flag, and support the 'fast-install' 120421e423a8fSmrg# and 'disable-fast-install' LT_INIT options. 120431e423a8fSmrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 120441e423a8fSmrgm4_define([_LT_ENABLE_FAST_INSTALL], 120451e423a8fSmrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 120461e423a8fSmrgAC_ARG_ENABLE([fast-install], 120471e423a8fSmrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 120481e423a8fSmrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 120491e423a8fSmrg [p=${PACKAGE-default} 120501e423a8fSmrg case $enableval in 120511e423a8fSmrg yes) enable_fast_install=yes ;; 120521e423a8fSmrg no) enable_fast_install=no ;; 120531e423a8fSmrg *) 120541e423a8fSmrg enable_fast_install=no 120551e423a8fSmrg # Look at the argument we got. We use all the common list separators. 120561e423a8fSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 120571e423a8fSmrg for pkg in $enableval; do 120581e423a8fSmrg IFS=$lt_save_ifs 120591e423a8fSmrg if test "X$pkg" = "X$p"; then 120601e423a8fSmrg enable_fast_install=yes 120611e423a8fSmrg fi 120621e423a8fSmrg done 120631e423a8fSmrg IFS=$lt_save_ifs 120641e423a8fSmrg ;; 120651e423a8fSmrg esac], 120661e423a8fSmrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 12067fe5e51b7Smrg 120681e423a8fSmrg_LT_DECL([fast_install], [enable_fast_install], [0], 120691e423a8fSmrg [Whether or not to optimize for fast installation])dnl 120701e423a8fSmrg])# _LT_ENABLE_FAST_INSTALL 12071fe5e51b7Smrg 120721e423a8fSmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 120731e423a8fSmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 12074fe5e51b7Smrg 120751e423a8fSmrg# Old names: 120761e423a8fSmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 120771e423a8fSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 120781e423a8fSmrgAC_DIAGNOSE([obsolete], 120791e423a8fSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 120801e423a8fSmrgthe 'fast-install' option into LT_INIT's first parameter.]) 12081fe5e51b7Smrg]) 12082fe5e51b7Smrg 120831e423a8fSmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 120841e423a8fSmrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 120851e423a8fSmrgAC_DIAGNOSE([obsolete], 120861e423a8fSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 120871e423a8fSmrgthe 'disable-fast-install' option into LT_INIT's first parameter.]) 120881e423a8fSmrg]) 12089fe5e51b7Smrg 120901e423a8fSmrgdnl aclocal-1.4 backwards compatibility: 120911e423a8fSmrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 120921e423a8fSmrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 12093fe5e51b7Smrg 12094fe5e51b7Smrg 120951e423a8fSmrg# _LT_WITH_AIX_SONAME([DEFAULT]) 120961e423a8fSmrg# ---------------------------------- 120971e423a8fSmrg# implement the --with-aix-soname flag, and support the `aix-soname=aix' 120981e423a8fSmrg# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT 120991e423a8fSmrg# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. 121001e423a8fSmrgm4_define([_LT_WITH_AIX_SONAME], 121011e423a8fSmrg[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl 121021e423a8fSmrgshared_archive_member_spec= 121031e423a8fSmrgcase $host,$enable_shared in 121041e423a8fSmrgpower*-*-aix[[5-9]]*,yes) 121051e423a8fSmrg AC_MSG_CHECKING([which variant of shared library versioning to provide]) 121061e423a8fSmrg AC_ARG_WITH([aix-soname], 121071e423a8fSmrg [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], 121081e423a8fSmrg [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], 121091e423a8fSmrg [case $withval in 121101e423a8fSmrg aix|svr4|both) 121111e423a8fSmrg ;; 121121e423a8fSmrg *) 121131e423a8fSmrg AC_MSG_ERROR([Unknown argument to --with-aix-soname]) 121141e423a8fSmrg ;; 121151e423a8fSmrg esac 121161e423a8fSmrg lt_cv_with_aix_soname=$with_aix_soname], 121171e423a8fSmrg [AC_CACHE_VAL([lt_cv_with_aix_soname], 121181e423a8fSmrg [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) 121191e423a8fSmrg with_aix_soname=$lt_cv_with_aix_soname]) 121201e423a8fSmrg AC_MSG_RESULT([$with_aix_soname]) 121211e423a8fSmrg if test aix != "$with_aix_soname"; then 121221e423a8fSmrg # For the AIX way of multilib, we name the shared archive member 121231e423a8fSmrg # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', 121241e423a8fSmrg # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. 121251e423a8fSmrg # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, 121261e423a8fSmrg # the AIX toolchain works better with OBJECT_MODE set (default 32). 121271e423a8fSmrg if test 64 = "${OBJECT_MODE-32}"; then 121281e423a8fSmrg shared_archive_member_spec=shr_64 121291e423a8fSmrg else 121301e423a8fSmrg shared_archive_member_spec=shr 121311e423a8fSmrg fi 121321e423a8fSmrg fi 121331e423a8fSmrg ;; 121341e423a8fSmrg*) 121351e423a8fSmrg with_aix_soname=aix 121361e423a8fSmrg ;; 121371e423a8fSmrgesac 12138fe5e51b7Smrg 121391e423a8fSmrg_LT_DECL([], [shared_archive_member_spec], [0], 121401e423a8fSmrg [Shared archive member basename, for filename based shared library versioning on AIX])dnl 121411e423a8fSmrg])# _LT_WITH_AIX_SONAME 12142fe5e51b7Smrg 121431e423a8fSmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) 121441e423a8fSmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) 121451e423a8fSmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) 12146fe5e51b7Smrg 12147fe5e51b7Smrg 121481e423a8fSmrg# _LT_WITH_PIC([MODE]) 121490bb88ba4Smrg# -------------------- 121501e423a8fSmrg# implement the --with-pic flag, and support the 'pic-only' and 'no-pic' 121511e423a8fSmrg# LT_INIT options. 121521e423a8fSmrg# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. 121531e423a8fSmrgm4_define([_LT_WITH_PIC], 121541e423a8fSmrg[AC_ARG_WITH([pic], 121551e423a8fSmrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 121561e423a8fSmrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 121571e423a8fSmrg [lt_p=${PACKAGE-default} 121581e423a8fSmrg case $withval in 121591e423a8fSmrg yes|no) pic_mode=$withval ;; 121601e423a8fSmrg *) 121611e423a8fSmrg pic_mode=default 121621e423a8fSmrg # Look at the argument we got. We use all the common list separators. 121631e423a8fSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 121641e423a8fSmrg for lt_pkg in $withval; do 121651e423a8fSmrg IFS=$lt_save_ifs 121661e423a8fSmrg if test "X$lt_pkg" = "X$lt_p"; then 121671e423a8fSmrg pic_mode=yes 121681e423a8fSmrg fi 121691e423a8fSmrg done 121701e423a8fSmrg IFS=$lt_save_ifs 121711e423a8fSmrg ;; 121721e423a8fSmrg esac], 121731e423a8fSmrg [pic_mode=m4_default([$1], [default])]) 12174fe5e51b7Smrg 121751e423a8fSmrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 121761e423a8fSmrg])# _LT_WITH_PIC 12177fe5e51b7Smrg 121781e423a8fSmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 121791e423a8fSmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 12180fe5e51b7Smrg 121811e423a8fSmrg# Old name: 121821e423a8fSmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 121831e423a8fSmrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 121841e423a8fSmrgAC_DIAGNOSE([obsolete], 121851e423a8fSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 121861e423a8fSmrgput the 'pic-only' option into LT_INIT's first parameter.]) 121871e423a8fSmrg]) 12188fe5e51b7Smrg 121891e423a8fSmrgdnl aclocal-1.4 backwards compatibility: 121901e423a8fSmrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 12191493f84f4Smrg 12192493f84f4Smrg 121931e423a8fSmrgm4_define([_LTDL_MODE], []) 121941e423a8fSmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 121951e423a8fSmrg [m4_define([_LTDL_MODE], [nonrecursive])]) 121961e423a8fSmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 121971e423a8fSmrg [m4_define([_LTDL_MODE], [recursive])]) 121981e423a8fSmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 121991e423a8fSmrg [m4_define([_LTDL_MODE], [subproject])]) 122001e423a8fSmrg 122011e423a8fSmrgm4_define([_LTDL_TYPE], []) 122021e423a8fSmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 122031e423a8fSmrg [m4_define([_LTDL_TYPE], [installable])]) 122041e423a8fSmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 122051e423a8fSmrg [m4_define([_LTDL_TYPE], [convenience])]) 122061e423a8fSmrg 122071e423a8fSmrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 12208fe5e51b7Smrg# 122091e423a8fSmrg# Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2022 Free Software 122101e423a8fSmrg# Foundation, Inc. 122111e423a8fSmrg# Written by Gary V. Vaughan, 2004 122121e423a8fSmrg# 122131e423a8fSmrg# This file is free software; the Free Software Foundation gives 122141e423a8fSmrg# unlimited permission to copy and/or distribute it, with or without 122151e423a8fSmrg# modifications, as long as this notice is preserved. 12216fe5e51b7Smrg 122171e423a8fSmrg# serial 6 ltsugar.m4 12218493f84f4Smrg 122191e423a8fSmrg# This is to help aclocal find these macros, as it can't see m4_define. 122201e423a8fSmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 12221493f84f4Smrg 12222fe5e51b7Smrg 122231e423a8fSmrg# lt_join(SEP, ARG1, [ARG2...]) 122241e423a8fSmrg# ----------------------------- 122251e423a8fSmrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 122261e423a8fSmrg# associated separator. 122271e423a8fSmrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 122281e423a8fSmrg# versions in m4sugar had bugs. 122291e423a8fSmrgm4_define([lt_join], 122301e423a8fSmrg[m4_if([$#], [1], [], 122311e423a8fSmrg [$#], [2], [[$2]], 122321e423a8fSmrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 122331e423a8fSmrgm4_define([_lt_join], 122341e423a8fSmrg[m4_if([$#$2], [2], [], 122351e423a8fSmrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 12236643b027fSmrg 12237acd6767fSmrg 122381e423a8fSmrg# lt_car(LIST) 122391e423a8fSmrg# lt_cdr(LIST) 122401e423a8fSmrg# ------------ 122411e423a8fSmrg# Manipulate m4 lists. 122421e423a8fSmrg# These macros are necessary as long as will still need to support 122431e423a8fSmrg# Autoconf-2.59, which quotes differently. 122441e423a8fSmrgm4_define([lt_car], [[$1]]) 122451e423a8fSmrgm4_define([lt_cdr], 122461e423a8fSmrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 122471e423a8fSmrg [$#], 1, [], 122481e423a8fSmrg [m4_dquote(m4_shift($@))])]) 122491e423a8fSmrgm4_define([lt_unquote], $1) 122501e423a8fSmrg 12251fe5e51b7Smrg 122521e423a8fSmrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 122531e423a8fSmrg# ------------------------------------------ 122541e423a8fSmrg# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. 122551e423a8fSmrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 122561e423a8fSmrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 122571e423a8fSmrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 122581e423a8fSmrg# than defined and empty). 12259a31a186aSmrg# 122601e423a8fSmrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 122611e423a8fSmrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 122621e423a8fSmrgm4_define([lt_append], 122631e423a8fSmrg[m4_define([$1], 122641e423a8fSmrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 12265a31a186aSmrg 12266a31a186aSmrg 12267fe5e51b7Smrg 122681e423a8fSmrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 122691e423a8fSmrg# ---------------------------------------------------------- 122701e423a8fSmrg# Produce a SEP delimited list of all paired combinations of elements of 122711e423a8fSmrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 122721e423a8fSmrg# has the form PREFIXmINFIXSUFFIXn. 122731e423a8fSmrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 122741e423a8fSmrgm4_define([lt_combine], 122751e423a8fSmrg[m4_if(m4_eval([$# > 3]), [1], 122761e423a8fSmrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 122771e423a8fSmrg[[m4_foreach([_Lt_prefix], [$2], 122781e423a8fSmrg [m4_foreach([_Lt_suffix], 122791e423a8fSmrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 122801e423a8fSmrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 122811e423a8fSmrg 122821e423a8fSmrg 122831e423a8fSmrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 122841e423a8fSmrg# ----------------------------------------------------------------------- 122851e423a8fSmrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 122861e423a8fSmrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 122871e423a8fSmrgm4_define([lt_if_append_uniq], 122881e423a8fSmrg[m4_ifdef([$1], 122891e423a8fSmrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 122901e423a8fSmrg [lt_append([$1], [$2], [$3])$4], 122911e423a8fSmrg [$5])], 122921e423a8fSmrg [lt_append([$1], [$2], [$3])$4])]) 122931e423a8fSmrg 122941e423a8fSmrg 122951e423a8fSmrg# lt_dict_add(DICT, KEY, VALUE) 122961e423a8fSmrg# ----------------------------- 122971e423a8fSmrgm4_define([lt_dict_add], 122981e423a8fSmrg[m4_define([$1($2)], [$3])]) 12299fe5e51b7Smrg 12300fe5e51b7Smrg 123011e423a8fSmrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 123021e423a8fSmrg# -------------------------------------------- 123031e423a8fSmrgm4_define([lt_dict_add_subkey], 123041e423a8fSmrg[m4_define([$1($2:$3)], [$4])]) 12305fe5e51b7Smrg 12306643b027fSmrg 123071e423a8fSmrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 123081e423a8fSmrg# ---------------------------------- 123091e423a8fSmrgm4_define([lt_dict_fetch], 123101e423a8fSmrg[m4_ifval([$3], 123111e423a8fSmrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 123121e423a8fSmrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 12313fe5e51b7Smrg 12314fe5e51b7Smrg 123151e423a8fSmrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 123161e423a8fSmrg# ----------------------------------------------------------------- 123171e423a8fSmrgm4_define([lt_if_dict_fetch], 123181e423a8fSmrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 123191e423a8fSmrg [$5], 123201e423a8fSmrg [$6])]) 12321493f84f4Smrg 12322fe5e51b7Smrg 123231e423a8fSmrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 123241e423a8fSmrg# -------------------------------------------------------------- 123251e423a8fSmrgm4_define([lt_dict_filter], 123261e423a8fSmrg[m4_if([$5], [], [], 123271e423a8fSmrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 123281e423a8fSmrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 123291e423a8fSmrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 123301e423a8fSmrg]) 12331493f84f4Smrg 123321e423a8fSmrg# ltversion.m4 -- version numbers -*- Autoconf -*- 123331e423a8fSmrg# 123341e423a8fSmrg# Copyright (C) 2004, 2011-2019, 2021-2022 Free Software Foundation, 123351e423a8fSmrg# Inc. 123361e423a8fSmrg# Written by Scott James Remnant, 2004 123371e423a8fSmrg# 123381e423a8fSmrg# This file is free software; the Free Software Foundation gives 123391e423a8fSmrg# unlimited permission to copy and/or distribute it, with or without 123401e423a8fSmrg# modifications, as long as this notice is preserved. 12341fe5e51b7Smrg 123421e423a8fSmrg# @configure_input@ 12343493f84f4Smrg 123441e423a8fSmrg# serial 4245 ltversion.m4 123451e423a8fSmrg# This file is part of GNU Libtool 12346493f84f4Smrg 123471e423a8fSmrgm4_define([LT_PACKAGE_VERSION], [2.4.7]) 123481e423a8fSmrgm4_define([LT_PACKAGE_REVISION], [2.4.7]) 12349493f84f4Smrg 123501e423a8fSmrgAC_DEFUN([LTVERSION_VERSION], 123511e423a8fSmrg[macro_version='2.4.7' 123521e423a8fSmrgmacro_revision='2.4.7' 123531e423a8fSmrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 123541e423a8fSmrg_LT_DECL(, macro_revision, 0) 123551e423a8fSmrg]) 12356493f84f4Smrg 123571e423a8fSmrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 123581e423a8fSmrg# 123591e423a8fSmrg# Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2022 Free 123601e423a8fSmrg# Software Foundation, Inc. 123611e423a8fSmrg# Written by Scott James Remnant, 2004. 123621e423a8fSmrg# 123631e423a8fSmrg# This file is free software; the Free Software Foundation gives 123641e423a8fSmrg# unlimited permission to copy and/or distribute it, with or without 123651e423a8fSmrg# modifications, as long as this notice is preserved. 12366493f84f4Smrg 123671e423a8fSmrg# serial 5 lt~obsolete.m4 12368493f84f4Smrg 123691e423a8fSmrg# These exist entirely to fool aclocal when bootstrapping libtool. 123701e423a8fSmrg# 123711e423a8fSmrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), 123721e423a8fSmrg# which have later been changed to m4_define as they aren't part of the 123731e423a8fSmrg# exported API, or moved to Autoconf or Automake where they belong. 123741e423a8fSmrg# 123751e423a8fSmrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 123761e423a8fSmrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 123771e423a8fSmrg# using a macro with the same name in our local m4/libtool.m4 it'll 123781e423a8fSmrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 123791e423a8fSmrg# and doesn't know about Autoconf macros at all.) 123801e423a8fSmrg# 123811e423a8fSmrg# So we provide this file, which has a silly filename so it's always 123821e423a8fSmrg# included after everything else. This provides aclocal with the 123831e423a8fSmrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 123841e423a8fSmrg# because those macros already exist, or will be overwritten later. 123851e423a8fSmrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 123861e423a8fSmrg# 123871e423a8fSmrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 123881e423a8fSmrg# Yes, that means every name once taken will need to remain here until 123891e423a8fSmrg# we give up compatibility with versions before 1.7, at which point 123901e423a8fSmrg# we need to keep only those names which we still refer to. 12391fe5e51b7Smrg 123921e423a8fSmrg# This is to help aclocal find these macros, as it can't see m4_define. 123931e423a8fSmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 12394493f84f4Smrg 123951e423a8fSmrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 123961e423a8fSmrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 123971e423a8fSmrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 123981e423a8fSmrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 123991e423a8fSmrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 124001e423a8fSmrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 124011e423a8fSmrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 124021e423a8fSmrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 124031e423a8fSmrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 124041e423a8fSmrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 124051e423a8fSmrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 124061e423a8fSmrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 124071e423a8fSmrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 124081e423a8fSmrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 124091e423a8fSmrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 124101e423a8fSmrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 124111e423a8fSmrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 124121e423a8fSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 124131e423a8fSmrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 124141e423a8fSmrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 124151e423a8fSmrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 124161e423a8fSmrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 124171e423a8fSmrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 124181e423a8fSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 124191e423a8fSmrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 124201e423a8fSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 124211e423a8fSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 124221e423a8fSmrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 124231e423a8fSmrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 124241e423a8fSmrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 124251e423a8fSmrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 124261e423a8fSmrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 124271e423a8fSmrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 124281e423a8fSmrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 124291e423a8fSmrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 124301e423a8fSmrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 124311e423a8fSmrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 124321e423a8fSmrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 124331e423a8fSmrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 124341e423a8fSmrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 124351e423a8fSmrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 124361e423a8fSmrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 124371e423a8fSmrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 124381e423a8fSmrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 124391e423a8fSmrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 124401e423a8fSmrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 124411e423a8fSmrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 124421e423a8fSmrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 124431e423a8fSmrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 124441e423a8fSmrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 124451e423a8fSmrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 124461e423a8fSmrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 124471e423a8fSmrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 124481e423a8fSmrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 124491e423a8fSmrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 124501e423a8fSmrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 124511e423a8fSmrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 124521e423a8fSmrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 124531e423a8fSmrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 124541e423a8fSmrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 124551e423a8fSmrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 12456fe5e51b7Smrg 12457