aclocal.m4 revision 9dedec0c
19dedec0cSmrg# generated automatically by aclocal 1.16.5 -*- Autoconf -*- 29d0b5e55Smrg 39dedec0cSmrg# Copyright (C) 1996-2021 Free Software Foundation, Inc. 46c321187Smrg 56c321187Smrg# This file is free software; the Free Software Foundation 66c321187Smrg# gives unlimited permission to copy and/or distribute it, 76c321187Smrg# with or without modifications, as long as this notice is preserved. 86c321187Smrg 96c321187Smrg# This program is distributed in the hope that it will be useful, 106c321187Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 116c321187Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 126c321187Smrg# PARTICULAR PURPOSE. 136c321187Smrg 149d0b5e55Smrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 1593493779Smrgm4_ifndef([AC_AUTOCONF_VERSION], 1693493779Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 179dedec0cSmrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],, 189dedec0cSmrg[m4_warning([this file was generated for autoconf 2.71. 1993493779SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 2093493779SmrgIf you have problems, you may need to regenerate the build system entirely. 219d0b5e55SmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])]) 226c321187Smrg 239dedec0cSmrg# Copyright (C) 2002-2021 Free Software Foundation, Inc. 24198e4c3cSmrg# 259dedec0cSmrg# This file is free software; the Free Software Foundation 269dedec0cSmrg# gives unlimited permission to copy and/or distribute it, 279dedec0cSmrg# with or without modifications, as long as this notice is preserved. 286c321187Smrg 299dedec0cSmrg# AM_AUTOMAKE_VERSION(VERSION) 309dedec0cSmrg# ---------------------------- 319dedec0cSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 329dedec0cSmrg# generated from the m4 files accompanying Automake X.Y. 339dedec0cSmrg# (This private macro should not be called outside this file.) 349dedec0cSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 359dedec0cSmrg[am__api_version='1.16' 369dedec0cSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 379dedec0cSmrgdnl require some minimum version. Point them to the right macro. 389dedec0cSmrgm4_if([$1], [1.16.5], [], 399dedec0cSmrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 40198e4c3cSmrg]) 416c321187Smrg 429dedec0cSmrg# _AM_AUTOCONF_VERSION(VERSION) 439dedec0cSmrg# ----------------------------- 449dedec0cSmrg# aclocal traces this macro to find the Autoconf version. 459dedec0cSmrg# This is a private macro too. Using m4_define simplifies 469dedec0cSmrg# the logic in aclocal, which can simply ignore this definition. 479dedec0cSmrgm4_define([_AM_AUTOCONF_VERSION], []) 486c321187Smrg 499dedec0cSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION 509dedec0cSmrg# ------------------------------- 519dedec0cSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 529dedec0cSmrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 539dedec0cSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 549dedec0cSmrg[AM_AUTOMAKE_VERSION([1.16.5])dnl 559dedec0cSmrgm4_ifndef([AC_AUTOCONF_VERSION], 569dedec0cSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 579dedec0cSmrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 586c321187Smrg 599dedec0cSmrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 606c321187Smrg 619dedec0cSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 629dedec0cSmrg# 639dedec0cSmrg# This file is free software; the Free Software Foundation 649dedec0cSmrg# gives unlimited permission to copy and/or distribute it, 659dedec0cSmrg# with or without modifications, as long as this notice is preserved. 666c321187Smrg 679dedec0cSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 689dedec0cSmrg# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 699dedec0cSmrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 709dedec0cSmrg# 719dedec0cSmrg# Of course, Automake must honor this variable whenever it calls a 729dedec0cSmrg# tool from the auxiliary directory. The problem is that $srcdir (and 739dedec0cSmrg# therefore $ac_aux_dir as well) can be either absolute or relative, 749dedec0cSmrg# depending on how configure is run. This is pretty annoying, since 759dedec0cSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 769dedec0cSmrg# source directory, any form will work fine, but in subdirectories a 779dedec0cSmrg# relative path needs to be adjusted first. 789dedec0cSmrg# 799dedec0cSmrg# $ac_aux_dir/missing 809dedec0cSmrg# fails when called from a subdirectory if $ac_aux_dir is relative 819dedec0cSmrg# $top_srcdir/$ac_aux_dir/missing 829dedec0cSmrg# fails if $ac_aux_dir is absolute, 839dedec0cSmrg# fails when called from a subdirectory in a VPATH build with 849dedec0cSmrg# a relative $ac_aux_dir 859dedec0cSmrg# 869dedec0cSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 879dedec0cSmrg# are both prefixed by $srcdir. In an in-source build this is usually 889dedec0cSmrg# harmless because $srcdir is '.', but things will broke when you 899dedec0cSmrg# start a VPATH build or use an absolute $srcdir. 909dedec0cSmrg# 919dedec0cSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 929dedec0cSmrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 939dedec0cSmrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 949dedec0cSmrg# and then we would define $MISSING as 959dedec0cSmrg# MISSING="\${SHELL} $am_aux_dir/missing" 969dedec0cSmrg# This will work as long as MISSING is not called from configure, because 979dedec0cSmrg# unfortunately $(top_srcdir) has no meaning in configure. 989dedec0cSmrg# However there are other variables, like CC, which are often used in 999dedec0cSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 1009dedec0cSmrg# 1019dedec0cSmrg# Another solution, used here, is to always expand $ac_aux_dir to an 1029dedec0cSmrg# absolute PATH. The drawback is that using absolute paths prevent a 1039dedec0cSmrg# configured tree to be moved without reconfiguration. 1049dedec0cSmrg 1059dedec0cSmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 1069dedec0cSmrg[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 1079dedec0cSmrg# Expand $ac_aux_dir to an absolute path. 1089dedec0cSmrgam_aux_dir=`cd "$ac_aux_dir" && pwd` 1096c321187Smrg]) 1106c321187Smrg 1119dedec0cSmrg# AM_CONDITIONAL -*- Autoconf -*- 1126c321187Smrg 1139dedec0cSmrg# Copyright (C) 1997-2021 Free Software Foundation, Inc. 1149dedec0cSmrg# 1159dedec0cSmrg# This file is free software; the Free Software Foundation 1169dedec0cSmrg# gives unlimited permission to copy and/or distribute it, 1179dedec0cSmrg# with or without modifications, as long as this notice is preserved. 1186c321187Smrg 1199dedec0cSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 1209dedec0cSmrg# ------------------------------------- 1219dedec0cSmrg# Define a conditional. 1229dedec0cSmrgAC_DEFUN([AM_CONDITIONAL], 1239dedec0cSmrg[AC_PREREQ([2.52])dnl 1249dedec0cSmrg m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 1259dedec0cSmrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 1269dedec0cSmrgAC_SUBST([$1_TRUE])dnl 1279dedec0cSmrgAC_SUBST([$1_FALSE])dnl 1289dedec0cSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 1299dedec0cSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 1309dedec0cSmrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 1319dedec0cSmrgif $2; then 1329dedec0cSmrg $1_TRUE= 1339dedec0cSmrg $1_FALSE='#' 1349dedec0cSmrgelse 1359dedec0cSmrg $1_TRUE='#' 1369dedec0cSmrg $1_FALSE= 1379dedec0cSmrgfi 1389dedec0cSmrgAC_CONFIG_COMMANDS_PRE( 1399dedec0cSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 1409dedec0cSmrg AC_MSG_ERROR([[conditional "$1" was never defined. 1419dedec0cSmrgUsually this means the macro was only invoked conditionally.]]) 1429dedec0cSmrgfi])]) 1436c321187Smrg 1449dedec0cSmrg# Copyright (C) 1999-2021 Free Software Foundation, Inc. 1459dedec0cSmrg# 1469dedec0cSmrg# This file is free software; the Free Software Foundation 1479dedec0cSmrg# gives unlimited permission to copy and/or distribute it, 1489dedec0cSmrg# with or without modifications, as long as this notice is preserved. 1496c321187Smrg 1506c321187Smrg 1519dedec0cSmrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 1529dedec0cSmrg# written in clear, in which case automake, when reading aclocal.m4, 1539dedec0cSmrg# will think it sees a *use*, and therefore will trigger all it's 1549dedec0cSmrg# C support machinery. Also note that it means that autoscan, seeing 1559dedec0cSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 1566c321187Smrg 1576c321187Smrg 1589dedec0cSmrg# _AM_DEPENDENCIES(NAME) 1599dedec0cSmrg# ---------------------- 1609dedec0cSmrg# See how the compiler implements dependency checking. 1619dedec0cSmrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 1629dedec0cSmrg# We try a few techniques and use that to set a single cache variable. 1639dedec0cSmrg# 1649dedec0cSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 1659dedec0cSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 1669dedec0cSmrg# dependency, and given that the user is not expected to run this macro, 1679dedec0cSmrg# just rely on AC_PROG_CC. 1689dedec0cSmrgAC_DEFUN([_AM_DEPENDENCIES], 1699dedec0cSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 1709dedec0cSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 1719dedec0cSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 1729dedec0cSmrgAC_REQUIRE([AM_DEP_TRACK])dnl 1736c321187Smrg 1749dedec0cSmrgm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 1759dedec0cSmrg [$1], [CXX], [depcc="$CXX" am_compiler_list=], 1769dedec0cSmrg [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 1779dedec0cSmrg [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 1789dedec0cSmrg [$1], [UPC], [depcc="$UPC" am_compiler_list=], 1799dedec0cSmrg [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 1809dedec0cSmrg [depcc="$$1" am_compiler_list=]) 1816c321187Smrg 1829dedec0cSmrgAC_CACHE_CHECK([dependency style of $depcc], 1839dedec0cSmrg [am_cv_$1_dependencies_compiler_type], 1849dedec0cSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 1859dedec0cSmrg # We make a subdir and do the tests there. Otherwise we can end up 1869dedec0cSmrg # making bogus files that we don't know about and never remove. For 1879dedec0cSmrg # instance it was reported that on HP-UX the gcc test will end up 1889dedec0cSmrg # making a dummy file named 'D' -- because '-MD' means "put the output 1899dedec0cSmrg # in D". 1909dedec0cSmrg rm -rf conftest.dir 1919dedec0cSmrg mkdir conftest.dir 1929dedec0cSmrg # Copy depcomp to subdir because otherwise we won't find it if we're 1939dedec0cSmrg # using a relative directory. 1949dedec0cSmrg cp "$am_depcomp" conftest.dir 1959dedec0cSmrg cd conftest.dir 1969dedec0cSmrg # We will build objects and dependencies in a subdirectory because 1979dedec0cSmrg # it helps to detect inapplicable dependency modes. For instance 1989dedec0cSmrg # both Tru64's cc and ICC support -MD to output dependencies as a 1999dedec0cSmrg # side effect of compilation, but ICC will put the dependencies in 2009dedec0cSmrg # the current directory while Tru64 will put them in the object 2019dedec0cSmrg # directory. 2029dedec0cSmrg mkdir sub 2036c321187Smrg 2049dedec0cSmrg am_cv_$1_dependencies_compiler_type=none 2059dedec0cSmrg if test "$am_compiler_list" = ""; then 2069dedec0cSmrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 2079dedec0cSmrg fi 2089dedec0cSmrg am__universal=false 2099dedec0cSmrg m4_case([$1], [CC], 2109dedec0cSmrg [case " $depcc " in #( 2119dedec0cSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 2129dedec0cSmrg esac], 2139dedec0cSmrg [CXX], 2149dedec0cSmrg [case " $depcc " in #( 2159dedec0cSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 2169dedec0cSmrg esac]) 21793493779Smrg 2189dedec0cSmrg for depmode in $am_compiler_list; do 2199dedec0cSmrg # Setup a source with many dependencies, because some compilers 2209dedec0cSmrg # like to wrap large dependency lists on column 80 (with \), and 2219dedec0cSmrg # we should not choose a depcomp mode which is confused by this. 2229dedec0cSmrg # 2239dedec0cSmrg # We need to recreate these files for each test, as the compiler may 2249dedec0cSmrg # overwrite some of them when testing with obscure command lines. 2259dedec0cSmrg # This happens at least with the AIX C compiler. 2269dedec0cSmrg : > sub/conftest.c 2279dedec0cSmrg for i in 1 2 3 4 5 6; do 2289dedec0cSmrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 2299dedec0cSmrg # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 2309dedec0cSmrg # Solaris 10 /bin/sh. 2319dedec0cSmrg echo '/* dummy */' > sub/conftst$i.h 2326c321187Smrg done 2339dedec0cSmrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 2346c321187Smrg 2359dedec0cSmrg # We check with '-c' and '-o' for the sake of the "dashmstdout" 2369dedec0cSmrg # mode. It turns out that the SunPro C++ compiler does not properly 2379dedec0cSmrg # handle '-M -o', and we need to detect this. Also, some Intel 2389dedec0cSmrg # versions had trouble with output in subdirs. 2399dedec0cSmrg am__obj=sub/conftest.${OBJEXT-o} 2409dedec0cSmrg am__minus_obj="-o $am__obj" 2419dedec0cSmrg case $depmode in 2429dedec0cSmrg gcc) 2439dedec0cSmrg # This depmode causes a compiler race in universal mode. 2449dedec0cSmrg test "$am__universal" = false || continue 2459dedec0cSmrg ;; 2469dedec0cSmrg nosideeffect) 2479dedec0cSmrg # After this tag, mechanisms are not by side-effect, so they'll 2489dedec0cSmrg # only be used when explicitly requested. 2499dedec0cSmrg if test "x$enable_dependency_tracking" = xyes; then 2509dedec0cSmrg continue 2519dedec0cSmrg else 2529dedec0cSmrg break 2539dedec0cSmrg fi 2549dedec0cSmrg ;; 2559dedec0cSmrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 2569dedec0cSmrg # This compiler won't grok '-c -o', but also, the minuso test has 2579dedec0cSmrg # not run yet. These depmodes are late enough in the game, and 2589dedec0cSmrg # so weak that their functioning should not be impacted. 2599dedec0cSmrg am__obj=conftest.${OBJEXT-o} 2609dedec0cSmrg am__minus_obj= 2619dedec0cSmrg ;; 2629dedec0cSmrg none) break ;; 2639dedec0cSmrg esac 2649dedec0cSmrg if depmode=$depmode \ 2659dedec0cSmrg source=sub/conftest.c object=$am__obj \ 2669dedec0cSmrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 2679dedec0cSmrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 2689dedec0cSmrg >/dev/null 2>conftest.err && 2699dedec0cSmrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 2709dedec0cSmrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 2719dedec0cSmrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 2729dedec0cSmrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 2739dedec0cSmrg # icc doesn't choke on unknown options, it will just issue warnings 2749dedec0cSmrg # or remarks (even with -Werror). So we grep stderr for any message 2759dedec0cSmrg # that says an option was ignored or not supported. 2769dedec0cSmrg # When given -MP, icc 7.0 and 7.1 complain thusly: 2779dedec0cSmrg # icc: Command line warning: ignoring option '-M'; no argument required 2789dedec0cSmrg # The diagnosis changed in icc 8.0: 2799dedec0cSmrg # icc: Command line remark: option '-MP' not supported 2809dedec0cSmrg if (grep 'ignoring option' conftest.err || 2819dedec0cSmrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 2829dedec0cSmrg am_cv_$1_dependencies_compiler_type=$depmode 2839dedec0cSmrg break 2849dedec0cSmrg fi 2859dedec0cSmrg fi 2869dedec0cSmrg done 2876c321187Smrg 2889dedec0cSmrg cd .. 2899dedec0cSmrg rm -rf conftest.dir 2909dedec0cSmrgelse 2919dedec0cSmrg am_cv_$1_dependencies_compiler_type=none 2929dedec0cSmrgfi 2939dedec0cSmrg]) 2949dedec0cSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 2959dedec0cSmrgAM_CONDITIONAL([am__fastdep$1], [ 2969dedec0cSmrg test "x$enable_dependency_tracking" != xno \ 2979dedec0cSmrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 2986c321187Smrg]) 2996c321187Smrg 3006c321187Smrg 3019dedec0cSmrg# AM_SET_DEPDIR 3029dedec0cSmrg# ------------- 3039dedec0cSmrg# Choose a directory name for dependency files. 3049dedec0cSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 3059dedec0cSmrgAC_DEFUN([AM_SET_DEPDIR], 3069dedec0cSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 3079dedec0cSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 3089dedec0cSmrg]) 309198e4c3cSmrg 310198e4c3cSmrg 3119dedec0cSmrg# AM_DEP_TRACK 3129dedec0cSmrg# ------------ 3139dedec0cSmrgAC_DEFUN([AM_DEP_TRACK], 3149dedec0cSmrg[AC_ARG_ENABLE([dependency-tracking], [dnl 3159dedec0cSmrgAS_HELP_STRING( 3169dedec0cSmrg [--enable-dependency-tracking], 3179dedec0cSmrg [do not reject slow dependency extractors]) 3189dedec0cSmrgAS_HELP_STRING( 3199dedec0cSmrg [--disable-dependency-tracking], 3209dedec0cSmrg [speeds up one-time build])]) 3219dedec0cSmrgif test "x$enable_dependency_tracking" != xno; then 3229dedec0cSmrg am_depcomp="$ac_aux_dir/depcomp" 3239dedec0cSmrg AMDEPBACKSLASH='\' 3249dedec0cSmrg am__nodep='_no' 3256c321187Smrgfi 3269dedec0cSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 3279dedec0cSmrgAC_SUBST([AMDEPBACKSLASH])dnl 3289dedec0cSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 3299dedec0cSmrgAC_SUBST([am__nodep])dnl 3309dedec0cSmrg_AM_SUBST_NOTMAKE([am__nodep])dnl 3316c321187Smrg]) 3326c321187Smrg 3339dedec0cSmrg# Generate code to set up dependency tracking. -*- Autoconf -*- 3346c321187Smrg 3359dedec0cSmrg# Copyright (C) 1999-2021 Free Software Foundation, Inc. 3369dedec0cSmrg# 3379dedec0cSmrg# This file is free software; the Free Software Foundation 3389dedec0cSmrg# gives unlimited permission to copy and/or distribute it, 3399dedec0cSmrg# with or without modifications, as long as this notice is preserved. 3406c321187Smrg 3419dedec0cSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 3429dedec0cSmrg# ------------------------------ 3439dedec0cSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 3449dedec0cSmrg[{ 3459dedec0cSmrg # Older Autoconf quotes --file arguments for eval, but not when files 3469dedec0cSmrg # are listed without --file. Let's play safe and only enable the eval 3479dedec0cSmrg # if we detect the quoting. 3489dedec0cSmrg # TODO: see whether this extra hack can be removed once we start 3499dedec0cSmrg # requiring Autoconf 2.70 or later. 3509dedec0cSmrg AS_CASE([$CONFIG_FILES], 3519dedec0cSmrg [*\'*], [eval set x "$CONFIG_FILES"], 3529dedec0cSmrg [*], [set x $CONFIG_FILES]) 3539dedec0cSmrg shift 3549dedec0cSmrg # Used to flag and report bootstrapping failures. 3559dedec0cSmrg am_rc=0 3569dedec0cSmrg for am_mf 3579dedec0cSmrg do 3589dedec0cSmrg # Strip MF so we end up with the name of the file. 3599dedec0cSmrg am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` 3609dedec0cSmrg # Check whether this is an Automake generated Makefile which includes 3619dedec0cSmrg # dependency-tracking related rules and includes. 3629dedec0cSmrg # Grep'ing the whole file directly is not great: AIX grep has a line 3639dedec0cSmrg # limit of 2048, but all sed's we know have understand at least 4000. 3649dedec0cSmrg sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ 3659dedec0cSmrg || continue 3669dedec0cSmrg am_dirpart=`AS_DIRNAME(["$am_mf"])` 3679dedec0cSmrg am_filepart=`AS_BASENAME(["$am_mf"])` 3689dedec0cSmrg AM_RUN_LOG([cd "$am_dirpart" \ 3699dedec0cSmrg && sed -e '/# am--include-marker/d' "$am_filepart" \ 3709dedec0cSmrg | $MAKE -f - am--depfiles]) || am_rc=$? 3719dedec0cSmrg done 3729dedec0cSmrg if test $am_rc -ne 0; then 3739dedec0cSmrg AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments 3749dedec0cSmrg for automatic dependency tracking. If GNU make was not used, consider 3759dedec0cSmrg re-running the configure script with MAKE="gmake" (or whatever is 3769dedec0cSmrg necessary). You can also try re-running configure with the 3779dedec0cSmrg '--disable-dependency-tracking' option to at least be able to build 3789dedec0cSmrg the package (albeit without support for automatic dependency tracking).]) 379198e4c3cSmrg fi 3809dedec0cSmrg AS_UNSET([am_dirpart]) 3819dedec0cSmrg AS_UNSET([am_filepart]) 3829dedec0cSmrg AS_UNSET([am_mf]) 3839dedec0cSmrg AS_UNSET([am_rc]) 3849dedec0cSmrg rm -f conftest-deps.mk 3859dedec0cSmrg} 3869dedec0cSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 3876c321187Smrg 3886c321187Smrg 3899dedec0cSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS 3909dedec0cSmrg# ----------------------------- 3919dedec0cSmrg# This macro should only be invoked once -- use via AC_REQUIRE. 3929dedec0cSmrg# 3939dedec0cSmrg# This code is only required when automatic dependency tracking is enabled. 3949dedec0cSmrg# This creates each '.Po' and '.Plo' makefile fragment that we'll need in 3959dedec0cSmrg# order to bootstrap the dependency handling code. 3969dedec0cSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 3979dedec0cSmrg[AC_CONFIG_COMMANDS([depfiles], 3989dedec0cSmrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 3999dedec0cSmrg [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) 4006c321187Smrg 4019dedec0cSmrg# Do all the work for Automake. -*- Autoconf -*- 4026c321187Smrg 4039dedec0cSmrg# Copyright (C) 1996-2021 Free Software Foundation, Inc. 4049dedec0cSmrg# 4059dedec0cSmrg# This file is free software; the Free Software Foundation 4069dedec0cSmrg# gives unlimited permission to copy and/or distribute it, 4079dedec0cSmrg# with or without modifications, as long as this notice is preserved. 4086c321187Smrg 4099dedec0cSmrg# This macro actually does too much. Some checks are only needed if 4109dedec0cSmrg# your package does certain things. But this isn't really a big deal. 4119d0b5e55Smrg 4129dedec0cSmrgdnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 4139dedec0cSmrgm4_define([AC_PROG_CC], 4149dedec0cSmrgm4_defn([AC_PROG_CC]) 4159dedec0cSmrg[_AM_PROG_CC_C_O 4169dedec0cSmrg]) 4176c321187Smrg 4189dedec0cSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 4199dedec0cSmrg# AM_INIT_AUTOMAKE([OPTIONS]) 4209dedec0cSmrg# ----------------------------------------------- 4219dedec0cSmrg# The call with PACKAGE and VERSION arguments is the old style 4229dedec0cSmrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 4239dedec0cSmrg# and VERSION should now be passed to AC_INIT and removed from 4249dedec0cSmrg# the call to AM_INIT_AUTOMAKE. 4259dedec0cSmrg# We support both call styles for the transition. After 4269dedec0cSmrg# the next Automake release, Autoconf can make the AC_INIT 4279dedec0cSmrg# arguments mandatory, and then we can depend on a new Autoconf 4289dedec0cSmrg# release and drop the old call support. 4299dedec0cSmrgAC_DEFUN([AM_INIT_AUTOMAKE], 4309dedec0cSmrg[AC_PREREQ([2.65])dnl 4319dedec0cSmrgm4_ifdef([_$0_ALREADY_INIT], 4329dedec0cSmrg [m4_fatal([$0 expanded multiple times 4339dedec0cSmrg]m4_defn([_$0_ALREADY_INIT]))], 4349dedec0cSmrg [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl 4359dedec0cSmrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 4369dedec0cSmrgdnl the ones we care about. 4379dedec0cSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 4389dedec0cSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 4399dedec0cSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 4409dedec0cSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 4419dedec0cSmrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 4429dedec0cSmrg # is not polluted with repeated "-I." 4439dedec0cSmrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 4449dedec0cSmrg # test to see if srcdir already configured 4459dedec0cSmrg if test -f $srcdir/config.status; then 4469dedec0cSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 4479dedec0cSmrg fi 4489dedec0cSmrgfi 4496c321187Smrg 4509dedec0cSmrg# test whether we have cygpath 4519dedec0cSmrgif test -z "$CYGPATH_W"; then 4529dedec0cSmrg if (cygpath --version) >/dev/null 2>/dev/null; then 4539dedec0cSmrg CYGPATH_W='cygpath -w' 4549dedec0cSmrg else 4559dedec0cSmrg CYGPATH_W=echo 4569dedec0cSmrg fi 4579dedec0cSmrgfi 4589dedec0cSmrgAC_SUBST([CYGPATH_W]) 4599d0b5e55Smrg 4609dedec0cSmrg# Define the identity of the package. 4619dedec0cSmrgdnl Distinguish between old-style and new-style calls. 4629dedec0cSmrgm4_ifval([$2], 4639dedec0cSmrg[AC_DIAGNOSE([obsolete], 4649dedec0cSmrg [$0: two- and three-arguments forms are deprecated.]) 4659dedec0cSmrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 4669dedec0cSmrg AC_SUBST([PACKAGE], [$1])dnl 4679dedec0cSmrg AC_SUBST([VERSION], [$2])], 4689dedec0cSmrg[_AM_SET_OPTIONS([$1])dnl 4699dedec0cSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 4709dedec0cSmrgm4_if( 4719dedec0cSmrg m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]), 4729dedec0cSmrg [ok:ok],, 4739dedec0cSmrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 4749dedec0cSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 4759dedec0cSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 4769d0b5e55Smrg 4779dedec0cSmrg_AM_IF_OPTION([no-define],, 4789dedec0cSmrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 4799dedec0cSmrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 4809d0b5e55Smrg 4819dedec0cSmrg# Some tools Automake needs. 4829dedec0cSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 4839dedec0cSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 4849dedec0cSmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 4859dedec0cSmrgAM_MISSING_PROG([AUTOCONF], [autoconf]) 4869dedec0cSmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 4879dedec0cSmrgAM_MISSING_PROG([AUTOHEADER], [autoheader]) 4889dedec0cSmrgAM_MISSING_PROG([MAKEINFO], [makeinfo]) 4899dedec0cSmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 4909dedec0cSmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 4919dedec0cSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 4929dedec0cSmrg# For better backward compatibility. To be removed once Automake 1.9.x 4939dedec0cSmrg# dies out for good. For more background, see: 4949dedec0cSmrg# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 4959dedec0cSmrg# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 4969dedec0cSmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 4979dedec0cSmrg# We need awk for the "check" target (and possibly the TAP driver). The 4989dedec0cSmrg# system "awk" is bad on some platforms. 4999dedec0cSmrgAC_REQUIRE([AC_PROG_AWK])dnl 5009dedec0cSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 5019dedec0cSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 5029dedec0cSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 5039dedec0cSmrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 5049dedec0cSmrg [_AM_PROG_TAR([v7])])]) 5059dedec0cSmrg_AM_IF_OPTION([no-dependencies],, 5069dedec0cSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 5079dedec0cSmrg [_AM_DEPENDENCIES([CC])], 5089dedec0cSmrg [m4_define([AC_PROG_CC], 5099dedec0cSmrg m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 5109dedec0cSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 5119dedec0cSmrg [_AM_DEPENDENCIES([CXX])], 5129dedec0cSmrg [m4_define([AC_PROG_CXX], 5139dedec0cSmrg m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 5149dedec0cSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 5159dedec0cSmrg [_AM_DEPENDENCIES([OBJC])], 5169dedec0cSmrg [m4_define([AC_PROG_OBJC], 5179dedec0cSmrg m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 5189dedec0cSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 5199dedec0cSmrg [_AM_DEPENDENCIES([OBJCXX])], 5209dedec0cSmrg [m4_define([AC_PROG_OBJCXX], 5219dedec0cSmrg m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 522198e4c3cSmrg]) 5239dedec0cSmrg# Variables for tags utilities; see am/tags.am 5249dedec0cSmrgif test -z "$CTAGS"; then 5259dedec0cSmrg CTAGS=ctags 5269dedec0cSmrgfi 5279dedec0cSmrgAC_SUBST([CTAGS]) 5289dedec0cSmrgif test -z "$ETAGS"; then 5299dedec0cSmrg ETAGS=etags 5309dedec0cSmrgfi 5319dedec0cSmrgAC_SUBST([ETAGS]) 5329dedec0cSmrgif test -z "$CSCOPE"; then 5339dedec0cSmrg CSCOPE=cscope 5349dedec0cSmrgfi 5359dedec0cSmrgAC_SUBST([CSCOPE]) 5369d0b5e55Smrg 5379dedec0cSmrgAC_REQUIRE([AM_SILENT_RULES])dnl 5389dedec0cSmrgdnl The testsuite driver may need to know about EXEEXT, so add the 5399dedec0cSmrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 5409dedec0cSmrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 5419dedec0cSmrgAC_CONFIG_COMMANDS_PRE(dnl 5429dedec0cSmrg[m4_provide_if([_AM_COMPILER_EXEEXT], 5439dedec0cSmrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 5446c321187Smrg 5459dedec0cSmrg# POSIX will say in a future version that running "rm -f" with no argument 5469dedec0cSmrg# is OK; and we want to be able to make that assumption in our Makefile 5479dedec0cSmrg# recipes. So use an aggressive probe to check that the usage we want is 5489dedec0cSmrg# actually supported "in the wild" to an acceptable degree. 5499dedec0cSmrg# See automake bug#10828. 5509dedec0cSmrg# To make any issue more visible, cause the running configure to be aborted 5519dedec0cSmrg# by default if the 'rm' program in use doesn't match our expectations; the 5529dedec0cSmrg# user can still override this though. 5539dedec0cSmrgif rm -f && rm -fr && rm -rf; then : OK; else 5549dedec0cSmrg cat >&2 <<'END' 5559dedec0cSmrgOops! 5566c321187Smrg 5579dedec0cSmrgYour 'rm' program seems unable to run without file operands specified 5589dedec0cSmrgon the command line, even when the '-f' option is present. This is contrary 5599dedec0cSmrgto the behaviour of most rm programs out there, and not conforming with 5609dedec0cSmrgthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 5616c321187Smrg 5629dedec0cSmrgPlease tell bug-automake@gnu.org about your system, including the value 5639dedec0cSmrgof your $PATH and any error possibly output before this message. This 5649dedec0cSmrgcan help us improve future automake versions. 5656c321187Smrg 5669dedec0cSmrgEND 5679dedec0cSmrg if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 5689dedec0cSmrg echo 'Configuration will proceed anyway, since you have set the' >&2 5699dedec0cSmrg echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 5709dedec0cSmrg echo >&2 5719dedec0cSmrg else 5729dedec0cSmrg cat >&2 <<'END' 5739dedec0cSmrgAborting the configuration process, to ensure you take notice of the issue. 5746c321187Smrg 5759dedec0cSmrgYou can download and install GNU coreutils to get an 'rm' implementation 5769dedec0cSmrgthat behaves properly: <https://www.gnu.org/software/coreutils/>. 5776c321187Smrg 5789dedec0cSmrgIf you want to complete the configuration process using your problematic 5799dedec0cSmrg'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 5809dedec0cSmrgto "yes", and re-run configure. 5816c321187Smrg 5829dedec0cSmrgEND 5839dedec0cSmrg AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 5849dedec0cSmrg fi 5859dedec0cSmrgfi 5869dedec0cSmrgdnl The trailing newline in this macro's definition is deliberate, for 5879dedec0cSmrgdnl backward compatibility and to allow trailing 'dnl'-style comments 5889dedec0cSmrgdnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. 5896c321187Smrg]) 5906c321187Smrg 5919dedec0cSmrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 5929dedec0cSmrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 5939dedec0cSmrgdnl mangled by Autoconf and run in a shell conditional statement. 5949dedec0cSmrgm4_define([_AC_COMPILER_EXEEXT], 5959dedec0cSmrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 5966c321187Smrg 5979dedec0cSmrg# When config.status generates a header, we must update the stamp-h file. 5989dedec0cSmrg# This file resides in the same directory as the config header 5999dedec0cSmrg# that is generated. The stamp files are numbered to have different names. 600198e4c3cSmrg 6019dedec0cSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 6029dedec0cSmrg# loop where config.status creates the headers, so we can generate 6039dedec0cSmrg# our stamp files there. 6049dedec0cSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 6059dedec0cSmrg[# Compute $1's index in $config_headers. 6069dedec0cSmrg_am_arg=$1 6079dedec0cSmrg_am_stamp_count=1 6089dedec0cSmrgfor _am_header in $config_headers :; do 6099dedec0cSmrg case $_am_header in 6109dedec0cSmrg $_am_arg | $_am_arg:* ) 6119dedec0cSmrg break ;; 6129dedec0cSmrg * ) 6139dedec0cSmrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 6149dedec0cSmrg esac 6159dedec0cSmrgdone 6169dedec0cSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 617198e4c3cSmrg 6189dedec0cSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 6199dedec0cSmrg# 6209dedec0cSmrg# This file is free software; the Free Software Foundation 6219dedec0cSmrg# gives unlimited permission to copy and/or distribute it, 6229dedec0cSmrg# with or without modifications, as long as this notice is preserved. 623198e4c3cSmrg 6249dedec0cSmrg# AM_PROG_INSTALL_SH 6259dedec0cSmrg# ------------------ 6269dedec0cSmrg# Define $install_sh. 6279dedec0cSmrgAC_DEFUN([AM_PROG_INSTALL_SH], 6289dedec0cSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 6299dedec0cSmrgif test x"${install_sh+set}" != xset; then 6309dedec0cSmrg case $am_aux_dir in 6319dedec0cSmrg *\ * | *\ *) 6329dedec0cSmrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 6339dedec0cSmrg *) 6349dedec0cSmrg install_sh="\${SHELL} $am_aux_dir/install-sh" 6359dedec0cSmrg esac 6369dedec0cSmrgfi 6379dedec0cSmrgAC_SUBST([install_sh])]) 6386c321187Smrg 6399dedec0cSmrg# Copyright (C) 2003-2021 Free Software Foundation, Inc. 6409dedec0cSmrg# 6419dedec0cSmrg# This file is free software; the Free Software Foundation 6429dedec0cSmrg# gives unlimited permission to copy and/or distribute it, 6439dedec0cSmrg# with or without modifications, as long as this notice is preserved. 6446c321187Smrg 6459dedec0cSmrg# Check whether the underlying file-system supports filenames 6469dedec0cSmrg# with a leading dot. For instance MS-DOS doesn't. 6479dedec0cSmrgAC_DEFUN([AM_SET_LEADING_DOT], 6489dedec0cSmrg[rm -rf .tst 2>/dev/null 6499dedec0cSmrgmkdir .tst 2>/dev/null 6509dedec0cSmrgif test -d .tst; then 6519dedec0cSmrg am__leading_dot=. 6529dedec0cSmrgelse 6539dedec0cSmrg am__leading_dot=_ 6549dedec0cSmrgfi 6559dedec0cSmrgrmdir .tst 2>/dev/null 6569dedec0cSmrgAC_SUBST([am__leading_dot])]) 6576c321187Smrg 6589dedec0cSmrg# Check to see how 'make' treats includes. -*- Autoconf -*- 6596c321187Smrg 6609dedec0cSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 6619dedec0cSmrg# 6629dedec0cSmrg# This file is free software; the Free Software Foundation 6639dedec0cSmrg# gives unlimited permission to copy and/or distribute it, 6649dedec0cSmrg# with or without modifications, as long as this notice is preserved. 6656c321187Smrg 6669dedec0cSmrg# AM_MAKE_INCLUDE() 6679dedec0cSmrg# ----------------- 6689dedec0cSmrg# Check whether make has an 'include' directive that can support all 6699dedec0cSmrg# the idioms we need for our automatic dependency tracking code. 6709dedec0cSmrgAC_DEFUN([AM_MAKE_INCLUDE], 6719dedec0cSmrg[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) 6729dedec0cSmrgcat > confinc.mk << 'END' 6739dedec0cSmrgam__doit: 6749dedec0cSmrg @echo this is the am__doit target >confinc.out 6759dedec0cSmrg.PHONY: am__doit 6769dedec0cSmrgEND 6779dedec0cSmrgam__include="#" 6789dedec0cSmrgam__quote= 6799dedec0cSmrg# BSD make does it like this. 6809dedec0cSmrgecho '.include "confinc.mk" # ignored' > confmf.BSD 6819dedec0cSmrg# Other make implementations (GNU, Solaris 10, AIX) do it like this. 6829dedec0cSmrgecho 'include confinc.mk # ignored' > confmf.GNU 6839dedec0cSmrg_am_result=no 6849dedec0cSmrgfor s in GNU BSD; do 6859dedec0cSmrg AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) 6869dedec0cSmrg AS_CASE([$?:`cat confinc.out 2>/dev/null`], 6879dedec0cSmrg ['0:this is the am__doit target'], 6889dedec0cSmrg [AS_CASE([$s], 6899dedec0cSmrg [BSD], [am__include='.include' am__quote='"'], 6909dedec0cSmrg [am__include='include' am__quote=''])]) 6919dedec0cSmrg if test "$am__include" != "#"; then 6929dedec0cSmrg _am_result="yes ($s style)" 6939dedec0cSmrg break 6949dedec0cSmrg fi 6959dedec0cSmrgdone 6969dedec0cSmrgrm -f confinc.* confmf.* 6979dedec0cSmrgAC_MSG_RESULT([${_am_result}]) 6989dedec0cSmrgAC_SUBST([am__include])]) 6999dedec0cSmrgAC_SUBST([am__quote])]) 7006c321187Smrg 7019dedec0cSmrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 7026c321187Smrg 7039dedec0cSmrg# Copyright (C) 1997-2021 Free Software Foundation, Inc. 7049dedec0cSmrg# 7059dedec0cSmrg# This file is free software; the Free Software Foundation 7069dedec0cSmrg# gives unlimited permission to copy and/or distribute it, 7079dedec0cSmrg# with or without modifications, as long as this notice is preserved. 7089d0b5e55Smrg 7099dedec0cSmrg# AM_MISSING_PROG(NAME, PROGRAM) 7109dedec0cSmrg# ------------------------------ 7119dedec0cSmrgAC_DEFUN([AM_MISSING_PROG], 7129dedec0cSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 7139dedec0cSmrg$1=${$1-"${am_missing_run}$2"} 7149dedec0cSmrgAC_SUBST($1)]) 7159dedec0cSmrg 7169dedec0cSmrg# AM_MISSING_HAS_RUN 7179dedec0cSmrg# ------------------ 7189dedec0cSmrg# Define MISSING if not defined so far and test if it is modern enough. 7199dedec0cSmrg# If it is, set am_missing_run to use it, otherwise, to nothing. 7209dedec0cSmrgAC_DEFUN([AM_MISSING_HAS_RUN], 7219dedec0cSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 7229dedec0cSmrgAC_REQUIRE_AUX_FILE([missing])dnl 7239dedec0cSmrgif test x"${MISSING+set}" != xset; then 7249dedec0cSmrg MISSING="\${SHELL} '$am_aux_dir/missing'" 7259dedec0cSmrgfi 7269dedec0cSmrg# Use eval to expand $SHELL 7279dedec0cSmrgif eval "$MISSING --is-lightweight"; then 7289dedec0cSmrg am_missing_run="$MISSING " 7299dedec0cSmrgelse 7309dedec0cSmrg am_missing_run= 7319dedec0cSmrg AC_MSG_WARN(['missing' script is too old or missing]) 7329dedec0cSmrgfi 7339dedec0cSmrg]) 7349d0b5e55Smrg 7359dedec0cSmrg# Helper functions for option handling. -*- Autoconf -*- 7366c321187Smrg 7379dedec0cSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 7389dedec0cSmrg# 7399dedec0cSmrg# This file is free software; the Free Software Foundation 7409dedec0cSmrg# gives unlimited permission to copy and/or distribute it, 7419dedec0cSmrg# with or without modifications, as long as this notice is preserved. 7426c321187Smrg 7439dedec0cSmrg# _AM_MANGLE_OPTION(NAME) 7449dedec0cSmrg# ----------------------- 7459dedec0cSmrgAC_DEFUN([_AM_MANGLE_OPTION], 7469dedec0cSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 7479d0b5e55Smrg 7489dedec0cSmrg# _AM_SET_OPTION(NAME) 7499dedec0cSmrg# -------------------- 7509dedec0cSmrg# Set option NAME. Presently that only means defining a flag for this option. 7519dedec0cSmrgAC_DEFUN([_AM_SET_OPTION], 7529dedec0cSmrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 7539d0b5e55Smrg 7549dedec0cSmrg# _AM_SET_OPTIONS(OPTIONS) 7559dedec0cSmrg# ------------------------ 7569dedec0cSmrg# OPTIONS is a space-separated list of Automake options. 7579dedec0cSmrgAC_DEFUN([_AM_SET_OPTIONS], 7589dedec0cSmrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 7596c321187Smrg 7609dedec0cSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 7619dedec0cSmrg# ------------------------------------------- 7629dedec0cSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 7639dedec0cSmrgAC_DEFUN([_AM_IF_OPTION], 7649dedec0cSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 76593493779Smrg 7669dedec0cSmrg# Copyright (C) 1999-2021 Free Software Foundation, Inc. 7679dedec0cSmrg# 7689dedec0cSmrg# This file is free software; the Free Software Foundation 7699dedec0cSmrg# gives unlimited permission to copy and/or distribute it, 7709dedec0cSmrg# with or without modifications, as long as this notice is preserved. 7719d0b5e55Smrg 7729dedec0cSmrg# _AM_PROG_CC_C_O 7739dedec0cSmrg# --------------- 7749dedec0cSmrg# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 7759dedec0cSmrg# to automatically call this. 7769dedec0cSmrgAC_DEFUN([_AM_PROG_CC_C_O], 7779dedec0cSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 7789dedec0cSmrgAC_REQUIRE_AUX_FILE([compile])dnl 7799dedec0cSmrgAC_LANG_PUSH([C])dnl 7809dedec0cSmrgAC_CACHE_CHECK( 7819dedec0cSmrg [whether $CC understands -c and -o together], 7829dedec0cSmrg [am_cv_prog_cc_c_o], 7839dedec0cSmrg [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 7849dedec0cSmrg # Make sure it works both with $CC and with simple cc. 7859dedec0cSmrg # Following AC_PROG_CC_C_O, we do the test twice because some 7869dedec0cSmrg # compilers refuse to overwrite an existing .o file with -o, 7879dedec0cSmrg # though they will create one. 7889dedec0cSmrg am_cv_prog_cc_c_o=yes 7899dedec0cSmrg for am_i in 1 2; do 7909dedec0cSmrg if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 7919dedec0cSmrg && test -f conftest2.$ac_objext; then 7929dedec0cSmrg : OK 7939dedec0cSmrg else 7949dedec0cSmrg am_cv_prog_cc_c_o=no 7959dedec0cSmrg break 7969dedec0cSmrg fi 7979dedec0cSmrg done 7989dedec0cSmrg rm -f core conftest* 7999dedec0cSmrg unset am_i]) 8009dedec0cSmrgif test "$am_cv_prog_cc_c_o" != yes; then 8019dedec0cSmrg # Losing compiler, so override with the script. 8029dedec0cSmrg # FIXME: It is wrong to rewrite CC. 8039dedec0cSmrg # But if we don't then we get into trouble of one sort or another. 8049dedec0cSmrg # A longer-term fix would be to have automake use am__CC in this case, 8059dedec0cSmrg # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 8069dedec0cSmrg CC="$am_aux_dir/compile $CC" 8079dedec0cSmrgfi 8089dedec0cSmrgAC_LANG_POP([C])]) 809198e4c3cSmrg 8109dedec0cSmrg# For backward compatibility. 8119dedec0cSmrgAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 8126c321187Smrg 8139dedec0cSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 81493493779Smrg# 8159dedec0cSmrg# This file is free software; the Free Software Foundation 8169dedec0cSmrg# gives unlimited permission to copy and/or distribute it, 8179dedec0cSmrg# with or without modifications, as long as this notice is preserved. 818198e4c3cSmrg 8199dedec0cSmrg# AM_RUN_LOG(COMMAND) 8209dedec0cSmrg# ------------------- 8219dedec0cSmrg# Run COMMAND, save the exit status in ac_status, and log it. 8229dedec0cSmrg# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 8239dedec0cSmrgAC_DEFUN([AM_RUN_LOG], 8249dedec0cSmrg[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 8259dedec0cSmrg ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 8269dedec0cSmrg ac_status=$? 8279dedec0cSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 8289dedec0cSmrg (exit $ac_status); }]) 82993493779Smrg 8309dedec0cSmrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 831198e4c3cSmrg 8329dedec0cSmrg# Copyright (C) 1996-2021 Free Software Foundation, Inc. 8336c321187Smrg# 8349dedec0cSmrg# This file is free software; the Free Software Foundation 8359dedec0cSmrg# gives unlimited permission to copy and/or distribute it, 8369dedec0cSmrg# with or without modifications, as long as this notice is preserved. 8376c321187Smrg 8389dedec0cSmrg# AM_SANITY_CHECK 8399dedec0cSmrg# --------------- 8409dedec0cSmrgAC_DEFUN([AM_SANITY_CHECK], 8419dedec0cSmrg[AC_MSG_CHECKING([whether build environment is sane]) 8429dedec0cSmrg# Reject unsafe characters in $srcdir or the absolute working directory 8439dedec0cSmrg# name. Accept space and tab only in the latter. 8449dedec0cSmrgam_lf=' 8459dedec0cSmrg' 8469dedec0cSmrgcase `pwd` in 8479dedec0cSmrg *[[\\\"\#\$\&\'\`$am_lf]]*) 8489dedec0cSmrg AC_MSG_ERROR([unsafe absolute working directory name]);; 8499dedec0cSmrgesac 8509dedec0cSmrgcase $srcdir in 8519dedec0cSmrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 8529dedec0cSmrg AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 8539dedec0cSmrgesac 8546c321187Smrg 8559dedec0cSmrg# Do 'set' in a subshell so we don't clobber the current shell's 8569dedec0cSmrg# arguments. Must try -L first in case configure is actually a 8579dedec0cSmrg# symlink; some systems play weird games with the mod time of symlinks 8589dedec0cSmrg# (eg FreeBSD returns the mod time of the symlink's containing 8599dedec0cSmrg# directory). 8609dedec0cSmrgif ( 8619dedec0cSmrg am_has_slept=no 8629dedec0cSmrg for am_try in 1 2; do 8639dedec0cSmrg echo "timestamp, slept: $am_has_slept" > conftest.file 8649dedec0cSmrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 8659dedec0cSmrg if test "$[*]" = "X"; then 8669dedec0cSmrg # -L didn't work. 8679dedec0cSmrg set X `ls -t "$srcdir/configure" conftest.file` 8689dedec0cSmrg fi 8699dedec0cSmrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 8709dedec0cSmrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 87193493779Smrg 8729dedec0cSmrg # If neither matched, then we have a broken ls. This can happen 8739dedec0cSmrg # if, for instance, CONFIG_SHELL is bash and it inherits a 8749dedec0cSmrg # broken ls alias from the environment. This has actually 8759dedec0cSmrg # happened. Such a system could not be considered "sane". 8769dedec0cSmrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 8779dedec0cSmrg alias in your environment]) 8789dedec0cSmrg fi 8799dedec0cSmrg if test "$[2]" = conftest.file || test $am_try -eq 2; then 8809dedec0cSmrg break 8819dedec0cSmrg fi 8829dedec0cSmrg # Just in case. 8839dedec0cSmrg sleep 1 8849dedec0cSmrg am_has_slept=yes 8859dedec0cSmrg done 8869dedec0cSmrg test "$[2]" = conftest.file 8879dedec0cSmrg ) 8889dedec0cSmrgthen 8899dedec0cSmrg # Ok. 8909dedec0cSmrg : 8919dedec0cSmrgelse 8929dedec0cSmrg AC_MSG_ERROR([newly created file is older than distributed files! 8939dedec0cSmrgCheck your system clock]) 8949dedec0cSmrgfi 8959dedec0cSmrgAC_MSG_RESULT([yes]) 8969dedec0cSmrg# If we didn't sleep, we still need to ensure time stamps of config.status and 8979dedec0cSmrg# generated files are strictly newer. 8989dedec0cSmrgam_sleep_pid= 8999dedec0cSmrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then 9009dedec0cSmrg ( sleep 1 ) & 9019dedec0cSmrg am_sleep_pid=$! 9029dedec0cSmrgfi 9039dedec0cSmrgAC_CONFIG_COMMANDS_PRE( 9049dedec0cSmrg [AC_MSG_CHECKING([that generated files are newer than configure]) 9059dedec0cSmrg if test -n "$am_sleep_pid"; then 9069dedec0cSmrg # Hide warnings about reused PIDs. 9079dedec0cSmrg wait $am_sleep_pid 2>/dev/null 9089dedec0cSmrg fi 9099dedec0cSmrg AC_MSG_RESULT([done])]) 9109dedec0cSmrgrm -f conftest.file 9119dedec0cSmrg]) 9126c321187Smrg 9139dedec0cSmrg# Copyright (C) 2009-2021 Free Software Foundation, Inc. 9149dedec0cSmrg# 9159dedec0cSmrg# This file is free software; the Free Software Foundation 9169dedec0cSmrg# gives unlimited permission to copy and/or distribute it, 9179dedec0cSmrg# with or without modifications, as long as this notice is preserved. 9186c321187Smrg 9199dedec0cSmrg# AM_SILENT_RULES([DEFAULT]) 9209dedec0cSmrg# -------------------------- 9219dedec0cSmrg# Enable less verbose build rules; with the default set to DEFAULT 9229dedec0cSmrg# ("yes" being less verbose, "no" or empty being verbose). 9239dedec0cSmrgAC_DEFUN([AM_SILENT_RULES], 9249dedec0cSmrg[AC_ARG_ENABLE([silent-rules], [dnl 9259dedec0cSmrgAS_HELP_STRING( 9269dedec0cSmrg [--enable-silent-rules], 9279dedec0cSmrg [less verbose build output (undo: "make V=1")]) 9289dedec0cSmrgAS_HELP_STRING( 9299dedec0cSmrg [--disable-silent-rules], 9309dedec0cSmrg [verbose build output (undo: "make V=0")])dnl 9319dedec0cSmrg]) 9329dedec0cSmrgcase $enable_silent_rules in @%:@ ((( 9339dedec0cSmrg yes) AM_DEFAULT_VERBOSITY=0;; 9349dedec0cSmrg no) AM_DEFAULT_VERBOSITY=1;; 9359dedec0cSmrg *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 9369dedec0cSmrgesac 9379dedec0cSmrgdnl 9389dedec0cSmrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 9399dedec0cSmrgdnl do not support nested variable expansions. 9409dedec0cSmrgdnl See automake bug#9928 and bug#10237. 9419dedec0cSmrgam_make=${MAKE-make} 9429dedec0cSmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 9439dedec0cSmrg [am_cv_make_support_nested_variables], 9449dedec0cSmrg [if AS_ECHO([['TRUE=$(BAR$(V)) 9459dedec0cSmrgBAR0=false 9469dedec0cSmrgBAR1=true 9479dedec0cSmrgV=1 9489dedec0cSmrgam__doit: 9499dedec0cSmrg @$(TRUE) 9509dedec0cSmrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 9519dedec0cSmrg am_cv_make_support_nested_variables=yes 9529dedec0cSmrgelse 9539dedec0cSmrg am_cv_make_support_nested_variables=no 9549dedec0cSmrgfi]) 9559dedec0cSmrgif test $am_cv_make_support_nested_variables = yes; then 9569dedec0cSmrg dnl Using '$V' instead of '$(V)' breaks IRIX make. 9579dedec0cSmrg AM_V='$(V)' 9589dedec0cSmrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 9599dedec0cSmrgelse 9609dedec0cSmrg AM_V=$AM_DEFAULT_VERBOSITY 9619dedec0cSmrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 9629dedec0cSmrgfi 9639dedec0cSmrgAC_SUBST([AM_V])dnl 9649dedec0cSmrgAM_SUBST_NOTMAKE([AM_V])dnl 9659dedec0cSmrgAC_SUBST([AM_DEFAULT_V])dnl 9669dedec0cSmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 9679dedec0cSmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 9689dedec0cSmrgAM_BACKSLASH='\' 9699dedec0cSmrgAC_SUBST([AM_BACKSLASH])dnl 9709dedec0cSmrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 9719dedec0cSmrg]) 9726c321187Smrg 9739dedec0cSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 9749dedec0cSmrg# 9759dedec0cSmrg# This file is free software; the Free Software Foundation 9769dedec0cSmrg# gives unlimited permission to copy and/or distribute it, 9779dedec0cSmrg# with or without modifications, as long as this notice is preserved. 9786c321187Smrg 9799dedec0cSmrg# AM_PROG_INSTALL_STRIP 9809dedec0cSmrg# --------------------- 9819dedec0cSmrg# One issue with vendor 'install' (even GNU) is that you can't 9829dedec0cSmrg# specify the program used to strip binaries. This is especially 9839dedec0cSmrg# annoying in cross-compiling environments, where the build's strip 9849dedec0cSmrg# is unlikely to handle the host's binaries. 9859dedec0cSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we 9869dedec0cSmrg# always use install-sh in "make install-strip", and initialize 9879dedec0cSmrg# STRIPPROG with the value of the STRIP variable (set by the user). 9889dedec0cSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 9899dedec0cSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 9909dedec0cSmrg# Installed binaries are usually stripped using 'strip' when the user 9919dedec0cSmrg# run "make install-strip". However 'strip' might not be the right 9929dedec0cSmrg# tool to use in cross-compilation environments, therefore Automake 9939dedec0cSmrg# will honor the 'STRIP' environment variable to overrule this program. 9949dedec0cSmrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 9959dedec0cSmrgif test "$cross_compiling" != no; then 9969dedec0cSmrg AC_CHECK_TOOL([STRIP], [strip], :) 9979dedec0cSmrgfi 9989dedec0cSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 9999dedec0cSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 10009d0b5e55Smrg 10019dedec0cSmrg# Copyright (C) 2006-2021 Free Software Foundation, Inc. 10029dedec0cSmrg# 10039dedec0cSmrg# This file is free software; the Free Software Foundation 10049dedec0cSmrg# gives unlimited permission to copy and/or distribute it, 10059dedec0cSmrg# with or without modifications, as long as this notice is preserved. 10066c321187Smrg 10079dedec0cSmrg# _AM_SUBST_NOTMAKE(VARIABLE) 10089dedec0cSmrg# --------------------------- 10099dedec0cSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 10109dedec0cSmrg# This macro is traced by Automake. 10119dedec0cSmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 1012e120bd27Smrg 10139dedec0cSmrg# AM_SUBST_NOTMAKE(VARIABLE) 10149dedec0cSmrg# -------------------------- 10159dedec0cSmrg# Public sister of _AM_SUBST_NOTMAKE. 10169dedec0cSmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 1017e120bd27Smrg 10189dedec0cSmrg# Check how to create a tarball. -*- Autoconf -*- 10196c321187Smrg 10209dedec0cSmrg# Copyright (C) 2004-2021 Free Software Foundation, Inc. 10219dedec0cSmrg# 10229dedec0cSmrg# This file is free software; the Free Software Foundation 10239dedec0cSmrg# gives unlimited permission to copy and/or distribute it, 10249dedec0cSmrg# with or without modifications, as long as this notice is preserved. 1025198e4c3cSmrg 10269dedec0cSmrg# _AM_PROG_TAR(FORMAT) 10279dedec0cSmrg# -------------------- 10289dedec0cSmrg# Check how to create a tarball in format FORMAT. 10299dedec0cSmrg# FORMAT should be one of 'v7', 'ustar', or 'pax'. 10309dedec0cSmrg# 10319dedec0cSmrg# Substitute a variable $(am__tar) that is a command 10329dedec0cSmrg# writing to stdout a FORMAT-tarball containing the directory 10339dedec0cSmrg# $tardir. 10349dedec0cSmrg# tardir=directory && $(am__tar) > result.tar 10359dedec0cSmrg# 10369dedec0cSmrg# Substitute a variable $(am__untar) that extract such 10379dedec0cSmrg# a tarball read from stdin. 10389dedec0cSmrg# $(am__untar) < result.tar 10399dedec0cSmrg# 10409dedec0cSmrgAC_DEFUN([_AM_PROG_TAR], 10419dedec0cSmrg[# Always define AMTAR for backward compatibility. Yes, it's still used 10429dedec0cSmrg# in the wild :-( We should find a proper way to deprecate it ... 10439dedec0cSmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 10440cc2eac3Smrg 10459dedec0cSmrg# We'll loop over all known methods to create a tar archive until one works. 10469dedec0cSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 1047e120bd27Smrg 10489dedec0cSmrgm4_if([$1], [v7], 10499dedec0cSmrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 1050e120bd27Smrg 10519dedec0cSmrg [m4_case([$1], 10529dedec0cSmrg [ustar], 10539dedec0cSmrg [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 10549dedec0cSmrg # There is notably a 21 bits limit for the UID and the GID. In fact, 10559dedec0cSmrg # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 10569dedec0cSmrg # and bug#13588). 10579dedec0cSmrg am_max_uid=2097151 # 2^21 - 1 10589dedec0cSmrg am_max_gid=$am_max_uid 10599dedec0cSmrg # The $UID and $GID variables are not portable, so we need to resort 10609dedec0cSmrg # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 10619dedec0cSmrg # below are definitely unexpected, so allow the users to see them 10629dedec0cSmrg # (that is, avoid stderr redirection). 10639dedec0cSmrg am_uid=`id -u || echo unknown` 10649dedec0cSmrg am_gid=`id -g || echo unknown` 10659dedec0cSmrg AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 10669dedec0cSmrg if test $am_uid -le $am_max_uid; then 10679dedec0cSmrg AC_MSG_RESULT([yes]) 10689dedec0cSmrg else 10699dedec0cSmrg AC_MSG_RESULT([no]) 10709dedec0cSmrg _am_tools=none 10719dedec0cSmrg fi 10729dedec0cSmrg AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 10739dedec0cSmrg if test $am_gid -le $am_max_gid; then 10749dedec0cSmrg AC_MSG_RESULT([yes]) 10759dedec0cSmrg else 10769dedec0cSmrg AC_MSG_RESULT([no]) 10779dedec0cSmrg _am_tools=none 10789dedec0cSmrg fi], 10796c321187Smrg 10809dedec0cSmrg [pax], 10819dedec0cSmrg [], 10826c321187Smrg 10839dedec0cSmrg [m4_fatal([Unknown tar format])]) 10846c321187Smrg 10859dedec0cSmrg AC_MSG_CHECKING([how to create a $1 tar archive]) 10866c321187Smrg 10879dedec0cSmrg # Go ahead even if we have the value already cached. We do so because we 10889dedec0cSmrg # need to set the values for the 'am__tar' and 'am__untar' variables. 10899dedec0cSmrg _am_tools=${am_cv_prog_tar_$1-$_am_tools} 10906c321187Smrg 10919dedec0cSmrg for _am_tool in $_am_tools; do 10929dedec0cSmrg case $_am_tool in 10939dedec0cSmrg gnutar) 10949dedec0cSmrg for _am_tar in tar gnutar gtar; do 10959dedec0cSmrg AM_RUN_LOG([$_am_tar --version]) && break 10969dedec0cSmrg done 10979dedec0cSmrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 10989dedec0cSmrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 10999dedec0cSmrg am__untar="$_am_tar -xf -" 11009dedec0cSmrg ;; 11019dedec0cSmrg plaintar) 11029dedec0cSmrg # Must skip GNU tar: if it does not support --format= it doesn't create 11039dedec0cSmrg # ustar tarball either. 11049dedec0cSmrg (tar --version) >/dev/null 2>&1 && continue 11059dedec0cSmrg am__tar='tar chf - "$$tardir"' 11069dedec0cSmrg am__tar_='tar chf - "$tardir"' 11079dedec0cSmrg am__untar='tar xf -' 11089dedec0cSmrg ;; 11099dedec0cSmrg pax) 11109dedec0cSmrg am__tar='pax -L -x $1 -w "$$tardir"' 11119dedec0cSmrg am__tar_='pax -L -x $1 -w "$tardir"' 11129dedec0cSmrg am__untar='pax -r' 11139dedec0cSmrg ;; 11149dedec0cSmrg cpio) 11159dedec0cSmrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 11169dedec0cSmrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 11179dedec0cSmrg am__untar='cpio -i -H $1 -d' 11189dedec0cSmrg ;; 11199dedec0cSmrg none) 11209dedec0cSmrg am__tar=false 11219dedec0cSmrg am__tar_=false 11229dedec0cSmrg am__untar=false 11239dedec0cSmrg ;; 11249dedec0cSmrg esac 11256c321187Smrg 11269dedec0cSmrg # If the value was cached, stop now. We just wanted to have am__tar 11279dedec0cSmrg # and am__untar set. 11289dedec0cSmrg test -n "${am_cv_prog_tar_$1}" && break 11296c321187Smrg 11309dedec0cSmrg # tar/untar a dummy directory, and stop if the command works. 11319dedec0cSmrg rm -rf conftest.dir 11329dedec0cSmrg mkdir conftest.dir 11339dedec0cSmrg echo GrepMe > conftest.dir/file 11349dedec0cSmrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 11359dedec0cSmrg rm -rf conftest.dir 11369dedec0cSmrg if test -s conftest.tar; then 11379dedec0cSmrg AM_RUN_LOG([$am__untar <conftest.tar]) 11389dedec0cSmrg AM_RUN_LOG([cat conftest.dir/file]) 11399dedec0cSmrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 11409dedec0cSmrg fi 11419dedec0cSmrg done 11429dedec0cSmrg rm -rf conftest.dir 11436c321187Smrg 11449dedec0cSmrg AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 11459dedec0cSmrg AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 11466c321187Smrg 11479dedec0cSmrgAC_SUBST([am__tar]) 11489dedec0cSmrgAC_SUBST([am__untar]) 11499dedec0cSmrg]) # _AM_PROG_TAR 11506c321187Smrg 11519dedec0cSmrgdnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 11529dedec0cSmrgdnl serial 11 (pkg-config-0.29) 11539dedec0cSmrgdnl 11549dedec0cSmrgdnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 11559dedec0cSmrgdnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> 11569dedec0cSmrgdnl 11579dedec0cSmrgdnl This program is free software; you can redistribute it and/or modify 11589dedec0cSmrgdnl it under the terms of the GNU General Public License as published by 11599dedec0cSmrgdnl the Free Software Foundation; either version 2 of the License, or 11609dedec0cSmrgdnl (at your option) any later version. 11619dedec0cSmrgdnl 11629dedec0cSmrgdnl This program is distributed in the hope that it will be useful, but 11639dedec0cSmrgdnl WITHOUT ANY WARRANTY; without even the implied warranty of 11649dedec0cSmrgdnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11659dedec0cSmrgdnl General Public License for more details. 11669dedec0cSmrgdnl 11679dedec0cSmrgdnl You should have received a copy of the GNU General Public License 11689dedec0cSmrgdnl along with this program; if not, write to the Free Software 11699dedec0cSmrgdnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 11709dedec0cSmrgdnl 02111-1307, USA. 11719dedec0cSmrgdnl 11729dedec0cSmrgdnl As a special exception to the GNU General Public License, if you 11739dedec0cSmrgdnl distribute this file as part of a program that contains a 11749dedec0cSmrgdnl configuration script generated by Autoconf, you may include it under 11759dedec0cSmrgdnl the same distribution terms that you use for the rest of that 11769dedec0cSmrgdnl program. 11776c321187Smrg 11789dedec0cSmrgdnl PKG_PREREQ(MIN-VERSION) 11799dedec0cSmrgdnl ----------------------- 11809dedec0cSmrgdnl Since: 0.29 11819dedec0cSmrgdnl 11829dedec0cSmrgdnl Verify that the version of the pkg-config macros are at least 11839dedec0cSmrgdnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's 11849dedec0cSmrgdnl installed version of pkg-config, this checks the developer's version 11859dedec0cSmrgdnl of pkg.m4 when generating configure. 11869dedec0cSmrgdnl 11879dedec0cSmrgdnl To ensure that this macro is defined, also add: 11889dedec0cSmrgdnl m4_ifndef([PKG_PREREQ], 11899dedec0cSmrgdnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) 11909dedec0cSmrgdnl 11919dedec0cSmrgdnl See the "Since" comment for each macro you use to see what version 11929dedec0cSmrgdnl of the macros you require. 11939dedec0cSmrgm4_defun([PKG_PREREQ], 11949dedec0cSmrg[m4_define([PKG_MACROS_VERSION], [0.29]) 11959dedec0cSmrgm4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, 11969dedec0cSmrg [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) 11979dedec0cSmrg])dnl PKG_PREREQ 11986c321187Smrg 11999dedec0cSmrgdnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) 12009dedec0cSmrgdnl ---------------------------------- 12019dedec0cSmrgdnl Since: 0.16 12029dedec0cSmrgdnl 12039dedec0cSmrgdnl Search for the pkg-config tool and set the PKG_CONFIG variable to 12049dedec0cSmrgdnl first found in the path. Checks that the version of pkg-config found 12059dedec0cSmrgdnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is 12069dedec0cSmrgdnl used since that's the first version where most current features of 12079dedec0cSmrgdnl pkg-config existed. 12089dedec0cSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 12099dedec0cSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 12109dedec0cSmrgm4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 12119dedec0cSmrgm4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 12129dedec0cSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 12139dedec0cSmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 12149dedec0cSmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 12156c321187Smrg 12169dedec0cSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 12179dedec0cSmrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 12189dedec0cSmrgfi 12199dedec0cSmrgif test -n "$PKG_CONFIG"; then 12209dedec0cSmrg _pkg_min_version=m4_default([$1], [0.9.0]) 12219dedec0cSmrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 12229dedec0cSmrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 12239dedec0cSmrg AC_MSG_RESULT([yes]) 12249dedec0cSmrg else 12259dedec0cSmrg AC_MSG_RESULT([no]) 12269dedec0cSmrg PKG_CONFIG="" 12279dedec0cSmrg fi 12289dedec0cSmrgfi[]dnl 12299dedec0cSmrg])dnl PKG_PROG_PKG_CONFIG 12306c321187Smrg 12319dedec0cSmrgdnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 12329dedec0cSmrgdnl ------------------------------------------------------------------- 12339dedec0cSmrgdnl Since: 0.18 12349dedec0cSmrgdnl 12359dedec0cSmrgdnl Check to see whether a particular set of modules exists. Similar to 12369dedec0cSmrgdnl PKG_CHECK_MODULES(), but does not set variables or print errors. 12379dedec0cSmrgdnl 12389dedec0cSmrgdnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 12399dedec0cSmrgdnl only at the first occurence in configure.ac, so if the first place 12409dedec0cSmrgdnl it's called might be skipped (such as if it is within an "if", you 12419dedec0cSmrgdnl have to call PKG_CHECK_EXISTS manually 12429dedec0cSmrgAC_DEFUN([PKG_CHECK_EXISTS], 12439dedec0cSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 12449dedec0cSmrgif test -n "$PKG_CONFIG" && \ 12459dedec0cSmrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 12469dedec0cSmrg m4_default([$2], [:]) 12479dedec0cSmrgm4_ifvaln([$3], [else 12489dedec0cSmrg $3])dnl 12499dedec0cSmrgfi]) 12506c321187Smrg 12519dedec0cSmrgdnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 12529dedec0cSmrgdnl --------------------------------------------- 12539dedec0cSmrgdnl Internal wrapper calling pkg-config via PKG_CONFIG and setting 12549dedec0cSmrgdnl pkg_failed based on the result. 12559dedec0cSmrgm4_define([_PKG_CONFIG], 12569dedec0cSmrg[if test -n "$$1"; then 12579dedec0cSmrg pkg_cv_[]$1="$$1" 12589dedec0cSmrg elif test -n "$PKG_CONFIG"; then 12599dedec0cSmrg PKG_CHECK_EXISTS([$3], 12609dedec0cSmrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 12619dedec0cSmrg test "x$?" != "x0" && pkg_failed=yes ], 12629dedec0cSmrg [pkg_failed=yes]) 12639dedec0cSmrg else 12649dedec0cSmrg pkg_failed=untried 12659dedec0cSmrgfi[]dnl 12669dedec0cSmrg])dnl _PKG_CONFIG 12676c321187Smrg 12689dedec0cSmrgdnl _PKG_SHORT_ERRORS_SUPPORTED 12699dedec0cSmrgdnl --------------------------- 12709dedec0cSmrgdnl Internal check to see if pkg-config supports short errors. 12719dedec0cSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 12729dedec0cSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 12739dedec0cSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 12749dedec0cSmrg _pkg_short_errors_supported=yes 12759dedec0cSmrgelse 12769dedec0cSmrg _pkg_short_errors_supported=no 12779dedec0cSmrgfi[]dnl 12789dedec0cSmrg])dnl _PKG_SHORT_ERRORS_SUPPORTED 1279e120bd27Smrg 12800cc2eac3Smrg 12819dedec0cSmrgdnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 12829dedec0cSmrgdnl [ACTION-IF-NOT-FOUND]) 12839dedec0cSmrgdnl -------------------------------------------------------------- 12849dedec0cSmrgdnl Since: 0.4.0 12859dedec0cSmrgdnl 12869dedec0cSmrgdnl Note that if there is a possibility the first call to 12879dedec0cSmrgdnl PKG_CHECK_MODULES might not happen, you should be sure to include an 12889dedec0cSmrgdnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 12899dedec0cSmrgAC_DEFUN([PKG_CHECK_MODULES], 12909dedec0cSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 12919dedec0cSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 12929dedec0cSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 1293e120bd27Smrg 12949dedec0cSmrgpkg_failed=no 12959dedec0cSmrgAC_MSG_CHECKING([for $1]) 1296e120bd27Smrg 12979dedec0cSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 12989dedec0cSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 1299e120bd27Smrg 13009dedec0cSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 13019dedec0cSmrgand $1[]_LIBS to avoid the need to call pkg-config. 13029dedec0cSmrgSee the pkg-config man page for more details.]) 1303e120bd27Smrg 13049dedec0cSmrgif test $pkg_failed = yes; then 13059dedec0cSmrg AC_MSG_RESULT([no]) 13069dedec0cSmrg _PKG_SHORT_ERRORS_SUPPORTED 13079dedec0cSmrg if test $_pkg_short_errors_supported = yes; then 13089dedec0cSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 13099dedec0cSmrg else 13109dedec0cSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 13119dedec0cSmrg fi 13129dedec0cSmrg # Put the nasty error message in config.log where it belongs 13139dedec0cSmrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 1314e120bd27Smrg 13159dedec0cSmrg m4_default([$4], [AC_MSG_ERROR( 13169dedec0cSmrg[Package requirements ($2) were not met: 1317e120bd27Smrg 13189dedec0cSmrg$$1_PKG_ERRORS 1319e120bd27Smrg 13209dedec0cSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 13219dedec0cSmrginstalled software in a non-standard prefix. 1322e120bd27Smrg 13239dedec0cSmrg_PKG_TEXT])[]dnl 13249dedec0cSmrg ]) 13259dedec0cSmrgelif test $pkg_failed = untried; then 13269dedec0cSmrg AC_MSG_RESULT([no]) 13279dedec0cSmrg m4_default([$4], [AC_MSG_FAILURE( 13289dedec0cSmrg[The pkg-config script could not be found or is too old. Make sure it 13299dedec0cSmrgis in your PATH or set the PKG_CONFIG environment variable to the full 13309dedec0cSmrgpath to pkg-config. 1331e120bd27Smrg 13329dedec0cSmrg_PKG_TEXT 1333e120bd27Smrg 13349dedec0cSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 13359dedec0cSmrg ]) 13369dedec0cSmrgelse 13379dedec0cSmrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 13389dedec0cSmrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 13399dedec0cSmrg AC_MSG_RESULT([yes]) 13409dedec0cSmrg $3 13419dedec0cSmrgfi[]dnl 13429dedec0cSmrg])dnl PKG_CHECK_MODULES 1343e120bd27Smrg 1344e120bd27Smrg 13459dedec0cSmrgdnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 13469dedec0cSmrgdnl [ACTION-IF-NOT-FOUND]) 13479dedec0cSmrgdnl --------------------------------------------------------------------- 13489dedec0cSmrgdnl Since: 0.29 13499dedec0cSmrgdnl 13509dedec0cSmrgdnl Checks for existence of MODULES and gathers its build flags with 13519dedec0cSmrgdnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags 13529dedec0cSmrgdnl and VARIABLE-PREFIX_LIBS from --libs. 13539dedec0cSmrgdnl 13549dedec0cSmrgdnl Note that if there is a possibility the first call to 13559dedec0cSmrgdnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to 13569dedec0cSmrgdnl include an explicit call to PKG_PROG_PKG_CONFIG in your 13579dedec0cSmrgdnl configure.ac. 13589dedec0cSmrgAC_DEFUN([PKG_CHECK_MODULES_STATIC], 13599dedec0cSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 13609dedec0cSmrg_save_PKG_CONFIG=$PKG_CONFIG 13619dedec0cSmrgPKG_CONFIG="$PKG_CONFIG --static" 13629dedec0cSmrgPKG_CHECK_MODULES($@) 13639dedec0cSmrgPKG_CONFIG=$_save_PKG_CONFIG[]dnl 13649dedec0cSmrg])dnl PKG_CHECK_MODULES_STATIC 1365e120bd27Smrg 1366e120bd27Smrg 13679dedec0cSmrgdnl PKG_INSTALLDIR([DIRECTORY]) 13689dedec0cSmrgdnl ------------------------- 13699dedec0cSmrgdnl Since: 0.27 13709dedec0cSmrgdnl 13719dedec0cSmrgdnl Substitutes the variable pkgconfigdir as the location where a module 13729dedec0cSmrgdnl should install pkg-config .pc files. By default the directory is 13739dedec0cSmrgdnl $libdir/pkgconfig, but the default can be changed by passing 13749dedec0cSmrgdnl DIRECTORY. The user can override through the --with-pkgconfigdir 13759dedec0cSmrgdnl parameter. 13769dedec0cSmrgAC_DEFUN([PKG_INSTALLDIR], 13779dedec0cSmrg[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) 13789dedec0cSmrgm4_pushdef([pkg_description], 13799dedec0cSmrg [pkg-config installation directory @<:@]pkg_default[@:>@]) 13809dedec0cSmrgAC_ARG_WITH([pkgconfigdir], 13819dedec0cSmrg [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, 13829dedec0cSmrg [with_pkgconfigdir=]pkg_default) 13839dedec0cSmrgAC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) 13849dedec0cSmrgm4_popdef([pkg_default]) 13859dedec0cSmrgm4_popdef([pkg_description]) 13869dedec0cSmrg])dnl PKG_INSTALLDIR 1387e120bd27Smrg 1388e120bd27Smrg 13899dedec0cSmrgdnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) 13909dedec0cSmrgdnl -------------------------------- 13919dedec0cSmrgdnl Since: 0.27 13929dedec0cSmrgdnl 13939dedec0cSmrgdnl Substitutes the variable noarch_pkgconfigdir as the location where a 13949dedec0cSmrgdnl module should install arch-independent pkg-config .pc files. By 13959dedec0cSmrgdnl default the directory is $datadir/pkgconfig, but the default can be 13969dedec0cSmrgdnl changed by passing DIRECTORY. The user can override through the 13979dedec0cSmrgdnl --with-noarch-pkgconfigdir parameter. 13989dedec0cSmrgAC_DEFUN([PKG_NOARCH_INSTALLDIR], 13999dedec0cSmrg[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) 14009dedec0cSmrgm4_pushdef([pkg_description], 14019dedec0cSmrg [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) 14029dedec0cSmrgAC_ARG_WITH([noarch-pkgconfigdir], 14039dedec0cSmrg [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, 14049dedec0cSmrg [with_noarch_pkgconfigdir=]pkg_default) 14059dedec0cSmrgAC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) 14069dedec0cSmrgm4_popdef([pkg_default]) 14079dedec0cSmrgm4_popdef([pkg_description]) 14089dedec0cSmrg])dnl PKG_NOARCH_INSTALLDIR 1409e120bd27Smrg 1410e120bd27Smrg 14119dedec0cSmrgdnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, 14129dedec0cSmrgdnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 14139dedec0cSmrgdnl ------------------------------------------- 14149dedec0cSmrgdnl Since: 0.28 14159dedec0cSmrgdnl 14169dedec0cSmrgdnl Retrieves the value of the pkg-config variable for the given module. 14179dedec0cSmrgAC_DEFUN([PKG_CHECK_VAR], 14189dedec0cSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 14199dedec0cSmrgAC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl 14206c321187Smrg 14219dedec0cSmrg_PKG_CONFIG([$1], [variable="][$3]["], [$2]) 14229dedec0cSmrgAS_VAR_COPY([$1], [pkg_cv_][$1]) 14236c321187Smrg 14249dedec0cSmrgAS_VAR_IF([$1], [""], [$5], [$4])dnl 14259dedec0cSmrg])dnl PKG_CHECK_VAR 14266c321187Smrg 14279dedec0cSmrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 14289dedec0cSmrgdnl 14299dedec0cSmrgdnl Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. 14309dedec0cSmrgdnl 14319dedec0cSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 14329dedec0cSmrgdnl copy of this software and associated documentation files (the "Software"), 14339dedec0cSmrgdnl to deal in the Software without restriction, including without limitation 14349dedec0cSmrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 14359dedec0cSmrgdnl and/or sell copies of the Software, and to permit persons to whom the 14369dedec0cSmrgdnl Software is furnished to do so, subject to the following conditions: 14379dedec0cSmrgdnl 14389dedec0cSmrgdnl The above copyright notice and this permission notice (including the next 14399dedec0cSmrgdnl paragraph) shall be included in all copies or substantial portions of the 14409dedec0cSmrgdnl Software. 14419dedec0cSmrgdnl 14429dedec0cSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14439dedec0cSmrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 14449dedec0cSmrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 14459dedec0cSmrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 14469dedec0cSmrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 14479dedec0cSmrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 14489dedec0cSmrgdnl DEALINGS IN THE SOFTWARE. 14496c321187Smrg 14509dedec0cSmrg# XORG_MACROS_VERSION(required-version) 14519dedec0cSmrg# ------------------------------------- 14529dedec0cSmrg# Minimum version: 1.1.0 14539dedec0cSmrg# 14549dedec0cSmrg# If you're using a macro added in Version 1.1 or newer, include this in 14559dedec0cSmrg# your configure.ac with the minimum required version, such as: 14569dedec0cSmrg# XORG_MACROS_VERSION(1.1) 14579dedec0cSmrg# 14589dedec0cSmrg# To ensure that this macro is defined, also add: 14599dedec0cSmrg# m4_ifndef([XORG_MACROS_VERSION], 14609dedec0cSmrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 14619dedec0cSmrg# 14629dedec0cSmrg# 14639dedec0cSmrg# See the "minimum version" comment for each macro you use to see what 14649dedec0cSmrg# version you require. 14659dedec0cSmrgm4_defun([XORG_MACROS_VERSION],[ 14669dedec0cSmrgm4_define([vers_have], [1.19.3]) 14679dedec0cSmrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 14689dedec0cSmrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 14699dedec0cSmrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 14709dedec0cSmrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 14719dedec0cSmrgm4_if(m4_version_compare(vers_have, [$1]), -1, 14729dedec0cSmrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 14739dedec0cSmrgm4_undefine([vers_have]) 14749dedec0cSmrgm4_undefine([maj_have]) 14759dedec0cSmrgm4_undefine([maj_needed]) 14769dedec0cSmrg]) # XORG_MACROS_VERSION 1477e120bd27Smrg 14789dedec0cSmrg# XORG_PROG_RAWCPP() 14799dedec0cSmrg# ------------------ 14809dedec0cSmrg# Minimum version: 1.0.0 14819dedec0cSmrg# 14829dedec0cSmrg# Find cpp program and necessary flags for use in pre-processing text files 14839dedec0cSmrg# such as man pages and config files 14849dedec0cSmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 14859dedec0cSmrgAC_REQUIRE([AC_PROG_CPP]) 14869dedec0cSmrgAC_PATH_TOOL(RAWCPP, [cpp], [${CPP}], 14879dedec0cSmrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 1488e120bd27Smrg 14899dedec0cSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 14909dedec0cSmrg# which is not the best choice for supporting other OS'es, but covers most 14919dedec0cSmrg# of the ones we need for now. 14929dedec0cSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 14939dedec0cSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 14949dedec0cSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 14959dedec0cSmrg AC_MSG_RESULT([no]) 14969dedec0cSmrgelse 14979dedec0cSmrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 14989dedec0cSmrg RAWCPPFLAGS=-undef 14999dedec0cSmrg AC_MSG_RESULT([yes]) 15009dedec0cSmrg # under Cygwin unix is still defined even with -undef 15019dedec0cSmrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 15029dedec0cSmrg RAWCPPFLAGS="-undef -ansi" 15039dedec0cSmrg AC_MSG_RESULT([yes, with -ansi]) 15049dedec0cSmrg else 15059dedec0cSmrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 15069dedec0cSmrg fi 15079dedec0cSmrgfi 15089dedec0cSmrgrm -f conftest.$ac_ext 15096c321187Smrg 15109dedec0cSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 15119dedec0cSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 15129dedec0cSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 15139dedec0cSmrg AC_MSG_RESULT([no]) 15149dedec0cSmrgelse 15159dedec0cSmrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 15169dedec0cSmrg TRADITIONALCPPFLAGS="-traditional" 15179dedec0cSmrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 15189dedec0cSmrg AC_MSG_RESULT([yes]) 15199dedec0cSmrg else 15209dedec0cSmrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 15219dedec0cSmrg fi 15229dedec0cSmrgfi 15239dedec0cSmrgrm -f conftest.$ac_ext 15249dedec0cSmrgAC_SUBST(RAWCPPFLAGS) 15259dedec0cSmrgAC_SUBST(TRADITIONALCPPFLAGS) 15269dedec0cSmrg]) # XORG_PROG_RAWCPP 15276c321187Smrg 15289dedec0cSmrg# XORG_MANPAGE_SECTIONS() 15299dedec0cSmrg# ----------------------- 15309dedec0cSmrg# Minimum version: 1.0.0 15319dedec0cSmrg# 15329dedec0cSmrg# Determine which sections man pages go in for the different man page types 15339dedec0cSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 15349dedec0cSmrg# Not sure if there's any better way than just hardcoding by OS name. 15359dedec0cSmrg# Override default settings by setting environment variables 15369dedec0cSmrg# Added MAN_SUBSTS in version 1.8 15379dedec0cSmrg# Added AC_PROG_SED in version 1.8 153893493779Smrg 15399dedec0cSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 15409dedec0cSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 15419dedec0cSmrgAC_REQUIRE([AC_PROG_SED]) 154293493779Smrg 15439dedec0cSmrgcase $host_os in 15449dedec0cSmrg solaris*) 15459dedec0cSmrg # Solaris 2.0 - 11.3 use SysV man page section numbers, so we 15469dedec0cSmrg # check for a man page file found in later versions that use 15479dedec0cSmrg # traditional section numbers instead 15489dedec0cSmrg AC_CHECK_FILE([/usr/share/man/man7/attributes.7], 15499dedec0cSmrg [SYSV_MAN_SECTIONS=false], [SYSV_MAN_SECTIONS=true]) 15509dedec0cSmrg ;; 15519dedec0cSmrg *) SYSV_MAN_SECTIONS=false ;; 15529dedec0cSmrgesac 155393493779Smrg 15549dedec0cSmrgif test x$APP_MAN_SUFFIX = x ; then 15559dedec0cSmrg APP_MAN_SUFFIX=1 15569dedec0cSmrgfi 15579dedec0cSmrgif test x$APP_MAN_DIR = x ; then 15589dedec0cSmrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 15599dedec0cSmrgfi 1560e120bd27Smrg 15619dedec0cSmrgif test x$LIB_MAN_SUFFIX = x ; then 15629dedec0cSmrg LIB_MAN_SUFFIX=3 15639dedec0cSmrgfi 15649dedec0cSmrgif test x$LIB_MAN_DIR = x ; then 15659dedec0cSmrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 15669dedec0cSmrgfi 15676c321187Smrg 15689dedec0cSmrgif test x$FILE_MAN_SUFFIX = x ; then 15699dedec0cSmrg case $SYSV_MAN_SECTIONS in 15709dedec0cSmrg true) FILE_MAN_SUFFIX=4 ;; 15719dedec0cSmrg *) FILE_MAN_SUFFIX=5 ;; 15729dedec0cSmrg esac 15739dedec0cSmrgfi 15749dedec0cSmrgif test x$FILE_MAN_DIR = x ; then 15759dedec0cSmrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 15769dedec0cSmrgfi 15770cc2eac3Smrg 15789dedec0cSmrgif test x$MISC_MAN_SUFFIX = x ; then 15799dedec0cSmrg case $SYSV_MAN_SECTIONS in 15809dedec0cSmrg true) MISC_MAN_SUFFIX=5 ;; 15819dedec0cSmrg *) MISC_MAN_SUFFIX=7 ;; 15829dedec0cSmrg esac 15839dedec0cSmrgfi 15849dedec0cSmrgif test x$MISC_MAN_DIR = x ; then 15859dedec0cSmrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 15869dedec0cSmrgfi 15870cc2eac3Smrg 15889dedec0cSmrgif test x$DRIVER_MAN_SUFFIX = x ; then 15899dedec0cSmrg case $SYSV_MAN_SECTIONS in 15909dedec0cSmrg true) DRIVER_MAN_SUFFIX=7 ;; 15919dedec0cSmrg *) DRIVER_MAN_SUFFIX=4 ;; 15929dedec0cSmrg esac 15939dedec0cSmrgfi 15949dedec0cSmrgif test x$DRIVER_MAN_DIR = x ; then 15959dedec0cSmrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 15969dedec0cSmrgfi 15976c321187Smrg 15989dedec0cSmrgif test x$ADMIN_MAN_SUFFIX = x ; then 15999dedec0cSmrg case $SYSV_MAN_SECTIONS in 16009dedec0cSmrg true) ADMIN_MAN_SUFFIX=1m ;; 16019dedec0cSmrg *) ADMIN_MAN_SUFFIX=8 ;; 16029dedec0cSmrg esac 16039dedec0cSmrgfi 16049dedec0cSmrgif test x$ADMIN_MAN_DIR = x ; then 16059dedec0cSmrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 16069dedec0cSmrgfi 160793493779Smrg 16086c321187Smrg 16099dedec0cSmrgAC_SUBST([APP_MAN_SUFFIX]) 16109dedec0cSmrgAC_SUBST([LIB_MAN_SUFFIX]) 16119dedec0cSmrgAC_SUBST([FILE_MAN_SUFFIX]) 16129dedec0cSmrgAC_SUBST([MISC_MAN_SUFFIX]) 16139dedec0cSmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 16149dedec0cSmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 16159dedec0cSmrgAC_SUBST([APP_MAN_DIR]) 16169dedec0cSmrgAC_SUBST([LIB_MAN_DIR]) 16179dedec0cSmrgAC_SUBST([FILE_MAN_DIR]) 16189dedec0cSmrgAC_SUBST([MISC_MAN_DIR]) 16199dedec0cSmrgAC_SUBST([DRIVER_MAN_DIR]) 16209dedec0cSmrgAC_SUBST([ADMIN_MAN_DIR]) 16216c321187Smrg 16229dedec0cSmrgXORG_MAN_PAGE="X Version 11" 16239dedec0cSmrgAC_SUBST([XORG_MAN_PAGE]) 16249dedec0cSmrgMAN_SUBSTS="\ 16259dedec0cSmrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 16269dedec0cSmrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 16279dedec0cSmrg -e 's|__xservername__|Xorg|g' \ 16289dedec0cSmrg -e 's|__xconfigfile__|xorg.conf|g' \ 16299dedec0cSmrg -e 's|__projectroot__|\$(prefix)|g' \ 16309dedec0cSmrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 16319dedec0cSmrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 16329dedec0cSmrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 16339dedec0cSmrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 16349dedec0cSmrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 16359dedec0cSmrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 16369dedec0cSmrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 16379dedec0cSmrgAC_SUBST([MAN_SUBSTS]) 16386c321187Smrg 16399dedec0cSmrg]) # XORG_MANPAGE_SECTIONS 164093493779Smrg 16419dedec0cSmrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 16429dedec0cSmrg# ------------------------ 16439dedec0cSmrg# Minimum version: 1.7.0 16449dedec0cSmrg# 16459dedec0cSmrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 16469dedec0cSmrg# provided by xorg-sgml-doctools, if installed. 16479dedec0cSmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 16489dedec0cSmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 16499dedec0cSmrgXORG_SGML_PATH= 16509dedec0cSmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 16519dedec0cSmrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 16529dedec0cSmrg [m4_ifval([$1],[:], 16539dedec0cSmrg [if test x"$cross_compiling" != x"yes" ; then 16549dedec0cSmrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 16559dedec0cSmrg [XORG_SGML_PATH=$prefix/share/sgml]) 16569dedec0cSmrg fi]) 1657198e4c3cSmrg ]) 16586c321187Smrg 16599dedec0cSmrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 16609dedec0cSmrg# the path and the name of the doc stylesheet 16619dedec0cSmrgif test "x$XORG_SGML_PATH" != "x" ; then 16629dedec0cSmrg AC_MSG_RESULT([$XORG_SGML_PATH]) 16639dedec0cSmrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 16649dedec0cSmrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 16659dedec0cSmrgelse 16669dedec0cSmrg AC_MSG_RESULT([no]) 16679dedec0cSmrgfi 16686c321187Smrg 16699dedec0cSmrgAC_SUBST(XORG_SGML_PATH) 16709dedec0cSmrgAC_SUBST(STYLESHEET_SRCDIR) 16719dedec0cSmrgAC_SUBST(XSL_STYLESHEET) 16729dedec0cSmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 16739dedec0cSmrg]) # XORG_CHECK_SGML_DOCTOOLS 16746c321187Smrg 16759dedec0cSmrg# XORG_CHECK_LINUXDOC 16769dedec0cSmrg# ------------------- 16779dedec0cSmrg# Minimum version: 1.0.0 16789dedec0cSmrg# 16799dedec0cSmrg# Defines the variable MAKE_TEXT if the necessary tools and 16809dedec0cSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 16819dedec0cSmrg# Whether or not the necessary tools and files are found can be checked 16829dedec0cSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 16839dedec0cSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 16849dedec0cSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 16859dedec0cSmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 16866c321187Smrg 16879dedec0cSmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 16886c321187Smrg 16899dedec0cSmrgAC_MSG_CHECKING([whether to build documentation]) 16906c321187Smrg 16919dedec0cSmrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 16929dedec0cSmrg BUILDDOC=yes 16939dedec0cSmrgelse 16949dedec0cSmrg BUILDDOC=no 16959dedec0cSmrgfi 16960cc2eac3Smrg 16979dedec0cSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 16980cc2eac3Smrg 16999dedec0cSmrgAC_MSG_RESULT([$BUILDDOC]) 17006c321187Smrg 17019dedec0cSmrgAC_MSG_CHECKING([whether to build pdf documentation]) 17029dedec0cSmrg 17039dedec0cSmrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 17049dedec0cSmrg BUILDPDFDOC=yes 1705198e4c3cSmrgelse 17069dedec0cSmrg BUILDPDFDOC=no 1707198e4c3cSmrgfi 17086c321187Smrg 17099dedec0cSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 17106c321187Smrg 17119dedec0cSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 1712e120bd27Smrg 17139dedec0cSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 17149dedec0cSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 17159dedec0cSmrgMAKE_PDF="$PS2PDF" 17169dedec0cSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 1717e120bd27Smrg 17189dedec0cSmrgAC_SUBST(MAKE_TEXT) 17199dedec0cSmrgAC_SUBST(MAKE_PS) 17209dedec0cSmrgAC_SUBST(MAKE_PDF) 17219dedec0cSmrgAC_SUBST(MAKE_HTML) 17229dedec0cSmrg]) # XORG_CHECK_LINUXDOC 1723e120bd27Smrg 17249dedec0cSmrg# XORG_CHECK_DOCBOOK 17259dedec0cSmrg# ------------------- 17269dedec0cSmrg# Minimum version: 1.0.0 17279dedec0cSmrg# 17289dedec0cSmrg# Checks for the ability to build output formats from SGML DocBook source. 17299dedec0cSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 17309dedec0cSmrg# indicates whether the necessary tools and files are found and, if set, 17319dedec0cSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 17329dedec0cSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 17339dedec0cSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 1734e120bd27Smrg 17359dedec0cSmrgBUILDTXTDOC=no 17369dedec0cSmrgBUILDPDFDOC=no 17379dedec0cSmrgBUILDPSDOC=no 17389dedec0cSmrgBUILDHTMLDOC=no 1739e120bd27Smrg 17409dedec0cSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 17419dedec0cSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 17429dedec0cSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 17439dedec0cSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 1744e120bd27Smrg 17459dedec0cSmrgAC_MSG_CHECKING([whether to build text documentation]) 17469dedec0cSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 17479dedec0cSmrg test x$BUILD_TXTDOC != xno; then 17489dedec0cSmrg BUILDTXTDOC=yes 17499dedec0cSmrgfi 17509dedec0cSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 17519dedec0cSmrgAC_MSG_RESULT([$BUILDTXTDOC]) 1752e120bd27Smrg 17539dedec0cSmrgAC_MSG_CHECKING([whether to build PDF documentation]) 17549dedec0cSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 17559dedec0cSmrg test x$BUILD_PDFDOC != xno; then 17569dedec0cSmrg BUILDPDFDOC=yes 17579dedec0cSmrgfi 17589dedec0cSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 17599dedec0cSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 1760e120bd27Smrg 17619dedec0cSmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 17629dedec0cSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 17639dedec0cSmrg test x$BUILD_PSDOC != xno; then 17649dedec0cSmrg BUILDPSDOC=yes 17659dedec0cSmrgfi 17669dedec0cSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 17679dedec0cSmrgAC_MSG_RESULT([$BUILDPSDOC]) 1768e120bd27Smrg 17699dedec0cSmrgAC_MSG_CHECKING([whether to build HTML documentation]) 17709dedec0cSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 17719dedec0cSmrg test x$BUILD_HTMLDOC != xno; then 17729dedec0cSmrg BUILDHTMLDOC=yes 17739dedec0cSmrgfi 17749dedec0cSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 17759dedec0cSmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 1776e120bd27Smrg 17779dedec0cSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 17789dedec0cSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 17799dedec0cSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 17809dedec0cSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 1781e120bd27Smrg 17829dedec0cSmrgAC_SUBST(MAKE_TEXT) 17839dedec0cSmrgAC_SUBST(MAKE_PS) 17849dedec0cSmrgAC_SUBST(MAKE_PDF) 17859dedec0cSmrgAC_SUBST(MAKE_HTML) 17869dedec0cSmrg]) # XORG_CHECK_DOCBOOK 1787e120bd27Smrg 17889dedec0cSmrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 17899dedec0cSmrg# ---------------- 17909dedec0cSmrg# Minimum version: 1.5.0 17919dedec0cSmrg# Minimum version for optional DEFAULT argument: 1.11.0 17929dedec0cSmrg# 17939dedec0cSmrg# Documentation tools are not always available on all platforms and sometimes 17949dedec0cSmrg# not at the appropriate level. This macro enables a module to test for the 17959dedec0cSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 17969dedec0cSmrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 17979dedec0cSmrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 17989dedec0cSmrg# --with-xmlto assumes 'auto'. 17999dedec0cSmrg# 18009dedec0cSmrg# Interface to module: 18019dedec0cSmrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 18029dedec0cSmrg# XMLTO: returns the path of the xmlto program found 18039dedec0cSmrg# returns the path set by the user in the environment 18049dedec0cSmrg# --with-xmlto: 'yes' user instructs the module to use xmlto 18059dedec0cSmrg# 'no' user instructs the module not to use xmlto 18069dedec0cSmrg# 18079dedec0cSmrg# Added in version 1.10.0 18089dedec0cSmrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 18099dedec0cSmrg# xmlto for text output requires either lynx, links, or w3m browsers 18109dedec0cSmrg# 18119dedec0cSmrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 18129dedec0cSmrg# 18139dedec0cSmrgAC_DEFUN([XORG_WITH_XMLTO],[ 18149dedec0cSmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 18159dedec0cSmrgm4_define([_defopt], m4_default([$2], [auto])) 18169dedec0cSmrgAC_ARG_WITH(xmlto, 18179dedec0cSmrg AS_HELP_STRING([--with-xmlto], 18189dedec0cSmrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 18199dedec0cSmrg [use_xmlto=$withval], [use_xmlto=]_defopt) 18209dedec0cSmrgm4_undefine([_defopt]) 1821e120bd27Smrg 18229dedec0cSmrgif test "x$use_xmlto" = x"auto"; then 18239dedec0cSmrg AC_PATH_PROG([XMLTO], [xmlto]) 18249dedec0cSmrg if test "x$XMLTO" = "x"; then 18259dedec0cSmrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 18269dedec0cSmrg have_xmlto=no 18279dedec0cSmrg else 18289dedec0cSmrg have_xmlto=yes 18299dedec0cSmrg fi 18309dedec0cSmrgelif test "x$use_xmlto" = x"yes" ; then 18319dedec0cSmrg AC_PATH_PROG([XMLTO], [xmlto]) 18329dedec0cSmrg if test "x$XMLTO" = "x"; then 18339dedec0cSmrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 18349dedec0cSmrg fi 18359dedec0cSmrg have_xmlto=yes 18369dedec0cSmrgelif test "x$use_xmlto" = x"no" ; then 18379dedec0cSmrg if test "x$XMLTO" != "x"; then 18389dedec0cSmrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 18399dedec0cSmrg fi 18409dedec0cSmrg have_xmlto=no 1841198e4c3cSmrgelse 18429dedec0cSmrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 1843198e4c3cSmrgfi 1844e120bd27Smrg 18459dedec0cSmrg# Test for a minimum version of xmlto, if provided. 18469dedec0cSmrgm4_ifval([$1], 18479dedec0cSmrg[if test "$have_xmlto" = yes; then 18489dedec0cSmrg # scrape the xmlto version 18499dedec0cSmrg AC_MSG_CHECKING([the xmlto version]) 18509dedec0cSmrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 18519dedec0cSmrg AC_MSG_RESULT([$xmlto_version]) 18529dedec0cSmrg AS_VERSION_COMPARE([$xmlto_version], [$1], 18539dedec0cSmrg [if test "x$use_xmlto" = xauto; then 18549dedec0cSmrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 18559dedec0cSmrg have_xmlto=no 18569dedec0cSmrg else 18579dedec0cSmrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 18589dedec0cSmrg fi]) 18599dedec0cSmrgfi]) 1860e120bd27Smrg 18619dedec0cSmrg# Test for the ability of xmlto to generate a text target 18629dedec0cSmrg# 18639dedec0cSmrg# NOTE: xmlto 0.0.27 or higher return a non-zero return code in the 18649dedec0cSmrg# following test for empty XML docbook files. 18659dedec0cSmrg# For compatibility reasons use the following empty XML docbook file and if 18669dedec0cSmrg# it fails try it again with a non-empty XML file. 18679dedec0cSmrghave_xmlto_text=no 18689dedec0cSmrgcat > conftest.xml << "EOF" 18699dedec0cSmrgEOF 18709dedec0cSmrgAS_IF([test "$have_xmlto" = yes], 18719dedec0cSmrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 18729dedec0cSmrg [have_xmlto_text=yes], 18739dedec0cSmrg [# Try it again with a non-empty XML file. 18749dedec0cSmrg cat > conftest.xml << "EOF" 18759dedec0cSmrg<x></x> 18769dedec0cSmrgEOF 18779dedec0cSmrg AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 18789dedec0cSmrg [have_xmlto_text=yes], 18799dedec0cSmrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])]) 18809dedec0cSmrgrm -f conftest.xml 18819dedec0cSmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 18829dedec0cSmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 18839dedec0cSmrg]) # XORG_WITH_XMLTO 1884e120bd27Smrg 18859dedec0cSmrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 18869dedec0cSmrg# -------------------------------------------- 18879dedec0cSmrg# Minimum version: 1.12.0 18889dedec0cSmrg# Minimum version for optional DEFAULT argument: 1.12.0 18899dedec0cSmrg# 18909dedec0cSmrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 18919dedec0cSmrg# XML-based language used for the transformation of XML documents. 18929dedec0cSmrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 18939dedec0cSmrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 18949dedec0cSmrg# The XSLT processor is often used as a standalone tool for transformations. 18959dedec0cSmrg# It should not be assumed that this tool is used only to work with documnetation. 18969dedec0cSmrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 18979dedec0cSmrg# 18989dedec0cSmrg# Interface to module: 18999dedec0cSmrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 19009dedec0cSmrg# XSLTPROC: returns the path of the xsltproc program found 19019dedec0cSmrg# returns the path set by the user in the environment 19029dedec0cSmrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 19039dedec0cSmrg# 'no' user instructs the module not to use xsltproc 19049dedec0cSmrg# have_xsltproc: returns yes if xsltproc found in PATH or no 19059dedec0cSmrg# 19069dedec0cSmrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 19079dedec0cSmrg# 19089dedec0cSmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 19099dedec0cSmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 19109dedec0cSmrg# Preserves the interface, should it be implemented later 19119dedec0cSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 19129dedec0cSmrgm4_define([_defopt], m4_default([$2], [auto])) 19139dedec0cSmrgAC_ARG_WITH(xsltproc, 19149dedec0cSmrg AS_HELP_STRING([--with-xsltproc], 19159dedec0cSmrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 19169dedec0cSmrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 19179dedec0cSmrgm4_undefine([_defopt]) 1918e120bd27Smrg 19199dedec0cSmrgif test "x$use_xsltproc" = x"auto"; then 19209dedec0cSmrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 19219dedec0cSmrg if test "x$XSLTPROC" = "x"; then 19229dedec0cSmrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 19239dedec0cSmrg have_xsltproc=no 19249dedec0cSmrg else 19259dedec0cSmrg have_xsltproc=yes 19269dedec0cSmrg fi 19279dedec0cSmrgelif test "x$use_xsltproc" = x"yes" ; then 19289dedec0cSmrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 19299dedec0cSmrg if test "x$XSLTPROC" = "x"; then 19309dedec0cSmrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 19319dedec0cSmrg fi 19329dedec0cSmrg have_xsltproc=yes 19339dedec0cSmrgelif test "x$use_xsltproc" = x"no" ; then 19349dedec0cSmrg if test "x$XSLTPROC" != "x"; then 19359dedec0cSmrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 19369dedec0cSmrg fi 19379dedec0cSmrg have_xsltproc=no 19389dedec0cSmrgelse 19399dedec0cSmrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 19400cc2eac3Smrgfi 1941e120bd27Smrg 19429dedec0cSmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 19439dedec0cSmrg]) # XORG_WITH_XSLTPROC 1944e120bd27Smrg 19459dedec0cSmrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 19469dedec0cSmrg# ---------------------------------------- 19479dedec0cSmrg# Minimum version: 1.15.0 19489dedec0cSmrg# 19499dedec0cSmrg# PERL (Practical Extraction and Report Language) is a language optimized for 19509dedec0cSmrg# scanning arbitrary text files, extracting information from those text files, 19519dedec0cSmrg# and printing reports based on that information. 19529dedec0cSmrg# 19539dedec0cSmrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 19549dedec0cSmrg# 19559dedec0cSmrg# Interface to module: 19569dedec0cSmrg# HAVE_PERL: used in makefiles to conditionally scan text files 19579dedec0cSmrg# PERL: returns the path of the perl program found 19589dedec0cSmrg# returns the path set by the user in the environment 19599dedec0cSmrg# --with-perl: 'yes' user instructs the module to use perl 19609dedec0cSmrg# 'no' user instructs the module not to use perl 19619dedec0cSmrg# have_perl: returns yes if perl found in PATH or no 19629dedec0cSmrg# 19639dedec0cSmrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 19649dedec0cSmrg# 19659dedec0cSmrgAC_DEFUN([XORG_WITH_PERL],[ 19669dedec0cSmrgAC_ARG_VAR([PERL], [Path to perl command]) 19679dedec0cSmrg# Preserves the interface, should it be implemented later 19689dedec0cSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 19699dedec0cSmrgm4_define([_defopt], m4_default([$2], [auto])) 19709dedec0cSmrgAC_ARG_WITH(perl, 19719dedec0cSmrg AS_HELP_STRING([--with-perl], 19729dedec0cSmrg [Use perl for extracting information from files (default: ]_defopt[)]), 19739dedec0cSmrg [use_perl=$withval], [use_perl=]_defopt) 19749dedec0cSmrgm4_undefine([_defopt]) 1975e120bd27Smrg 19769dedec0cSmrgif test "x$use_perl" = x"auto"; then 19779dedec0cSmrg AC_PATH_PROG([PERL], [perl]) 19789dedec0cSmrg if test "x$PERL" = "x"; then 19799dedec0cSmrg AC_MSG_WARN([perl not found - cannot extract information and report]) 19809dedec0cSmrg have_perl=no 19819dedec0cSmrg else 19829dedec0cSmrg have_perl=yes 1983198e4c3cSmrg fi 19849dedec0cSmrgelif test "x$use_perl" = x"yes" ; then 19859dedec0cSmrg AC_PATH_PROG([PERL], [perl]) 19869dedec0cSmrg if test "x$PERL" = "x"; then 19879dedec0cSmrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 19889dedec0cSmrg fi 19899dedec0cSmrg have_perl=yes 19909dedec0cSmrgelif test "x$use_perl" = x"no" ; then 19919dedec0cSmrg if test "x$PERL" != "x"; then 19929dedec0cSmrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 19939dedec0cSmrg fi 19949dedec0cSmrg have_perl=no 1995198e4c3cSmrgelse 19969dedec0cSmrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 1997198e4c3cSmrgfi 1998e120bd27Smrg 19999dedec0cSmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 20009dedec0cSmrg]) # XORG_WITH_PERL 20010cc2eac3Smrg 20029dedec0cSmrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 20039dedec0cSmrg# ---------------- 20049dedec0cSmrg# Minimum version: 1.5.0 20059dedec0cSmrg# Minimum version for optional DEFAULT argument: 1.11.0 20069dedec0cSmrg# 20079dedec0cSmrg# Documentation tools are not always available on all platforms and sometimes 20089dedec0cSmrg# not at the appropriate level. This macro enables a module to test for the 20099dedec0cSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 20109dedec0cSmrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 20119dedec0cSmrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 20129dedec0cSmrg# --with-asciidoc assumes 'auto'. 20139dedec0cSmrg# 20149dedec0cSmrg# Interface to module: 20159dedec0cSmrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 20169dedec0cSmrg# ASCIIDOC: returns the path of the asciidoc program found 20179dedec0cSmrg# returns the path set by the user in the environment 20189dedec0cSmrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 20199dedec0cSmrg# 'no' user instructs the module not to use asciidoc 20209dedec0cSmrg# 20219dedec0cSmrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 20229dedec0cSmrg# 20239dedec0cSmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 20249dedec0cSmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 20259dedec0cSmrgm4_define([_defopt], m4_default([$2], [auto])) 20269dedec0cSmrgAC_ARG_WITH(asciidoc, 20279dedec0cSmrg AS_HELP_STRING([--with-asciidoc], 20289dedec0cSmrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 20299dedec0cSmrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 20309dedec0cSmrgm4_undefine([_defopt]) 20310cc2eac3Smrg 20329dedec0cSmrgif test "x$use_asciidoc" = x"auto"; then 20339dedec0cSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 20349dedec0cSmrg if test "x$ASCIIDOC" = "x"; then 20359dedec0cSmrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 20369dedec0cSmrg have_asciidoc=no 20379dedec0cSmrg else 20389dedec0cSmrg have_asciidoc=yes 20399dedec0cSmrg fi 20409dedec0cSmrgelif test "x$use_asciidoc" = x"yes" ; then 20419dedec0cSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 20429dedec0cSmrg if test "x$ASCIIDOC" = "x"; then 20439dedec0cSmrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 20449dedec0cSmrg fi 20459dedec0cSmrg have_asciidoc=yes 20469dedec0cSmrgelif test "x$use_asciidoc" = x"no" ; then 20479dedec0cSmrg if test "x$ASCIIDOC" != "x"; then 20489dedec0cSmrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 20499dedec0cSmrg fi 20509dedec0cSmrg have_asciidoc=no 2051198e4c3cSmrgelse 20529dedec0cSmrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 2053e120bd27Smrgfi 20549dedec0cSmrgm4_ifval([$1], 20559dedec0cSmrg[if test "$have_asciidoc" = yes; then 20569dedec0cSmrg # scrape the asciidoc version 20579dedec0cSmrg AC_MSG_CHECKING([the asciidoc version]) 20589dedec0cSmrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 20599dedec0cSmrg AC_MSG_RESULT([$asciidoc_version]) 20609dedec0cSmrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 20619dedec0cSmrg [if test "x$use_asciidoc" = xauto; then 20629dedec0cSmrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 20639dedec0cSmrg have_asciidoc=no 20649dedec0cSmrg else 20659dedec0cSmrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 20669dedec0cSmrg fi]) 20679dedec0cSmrgfi]) 20689dedec0cSmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 20699dedec0cSmrg]) # XORG_WITH_ASCIIDOC 20706c321187Smrg 20719dedec0cSmrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 20729dedec0cSmrg# ------------------------------------------- 20739dedec0cSmrg# Minimum version: 1.5.0 20749dedec0cSmrg# Minimum version for optional DEFAULT argument: 1.11.0 20759dedec0cSmrg# Minimum version for optional DOT checking: 1.18.0 20769dedec0cSmrg# 20779dedec0cSmrg# Documentation tools are not always available on all platforms and sometimes 20789dedec0cSmrg# not at the appropriate level. This macro enables a module to test for the 20799dedec0cSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 20809dedec0cSmrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 20819dedec0cSmrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 20829dedec0cSmrg# --with-doxygen assumes 'auto'. 20839dedec0cSmrg# 20849dedec0cSmrg# Interface to module: 20859dedec0cSmrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 20869dedec0cSmrg# DOXYGEN: returns the path of the doxygen program found 20879dedec0cSmrg# returns the path set by the user in the environment 20889dedec0cSmrg# --with-doxygen: 'yes' user instructs the module to use doxygen 20899dedec0cSmrg# 'no' user instructs the module not to use doxygen 20909dedec0cSmrg# 20919dedec0cSmrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 20929dedec0cSmrg# 20939dedec0cSmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 20949dedec0cSmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 20959dedec0cSmrgAC_ARG_VAR([DOT], [Path to the dot graphics utility]) 20969dedec0cSmrgm4_define([_defopt], m4_default([$2], [auto])) 20979dedec0cSmrgAC_ARG_WITH(doxygen, 20989dedec0cSmrg AS_HELP_STRING([--with-doxygen], 20999dedec0cSmrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 21009dedec0cSmrg [use_doxygen=$withval], [use_doxygen=]_defopt) 21019dedec0cSmrgm4_undefine([_defopt]) 21026c321187Smrg 21039dedec0cSmrgif test "x$use_doxygen" = x"auto"; then 21049dedec0cSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 21059dedec0cSmrg if test "x$DOXYGEN" = "x"; then 21069dedec0cSmrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 21079dedec0cSmrg have_doxygen=no 21089dedec0cSmrg else 21099dedec0cSmrg have_doxygen=yes 21109dedec0cSmrg fi 21119dedec0cSmrgelif test "x$use_doxygen" = x"yes" ; then 21129dedec0cSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 21139dedec0cSmrg if test "x$DOXYGEN" = "x"; then 21149dedec0cSmrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 21159dedec0cSmrg fi 21169dedec0cSmrg have_doxygen=yes 21179dedec0cSmrgelif test "x$use_doxygen" = x"no" ; then 21189dedec0cSmrg if test "x$DOXYGEN" != "x"; then 21199dedec0cSmrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 21209dedec0cSmrg fi 21219dedec0cSmrg have_doxygen=no 21229dedec0cSmrgelse 21239dedec0cSmrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 21249dedec0cSmrgfi 21259dedec0cSmrgm4_ifval([$1], 21269dedec0cSmrg[if test "$have_doxygen" = yes; then 21279dedec0cSmrg # scrape the doxygen version 21289dedec0cSmrg AC_MSG_CHECKING([the doxygen version]) 21299dedec0cSmrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 21309dedec0cSmrg AC_MSG_RESULT([$doxygen_version]) 21319dedec0cSmrg AS_VERSION_COMPARE([$doxygen_version], [$1], 21329dedec0cSmrg [if test "x$use_doxygen" = xauto; then 21339dedec0cSmrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 21349dedec0cSmrg have_doxygen=no 21359dedec0cSmrg else 21369dedec0cSmrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 21379dedec0cSmrg fi]) 21389dedec0cSmrgfi]) 21396c321187Smrg 21409dedec0cSmrgdnl Check for DOT if we have doxygen. The caller decides if it is mandatory 21419dedec0cSmrgdnl HAVE_DOT is a variable that can be used in your doxygen.in config file: 21429dedec0cSmrgdnl HAVE_DOT = @HAVE_DOT@ 21439dedec0cSmrgHAVE_DOT=no 21449dedec0cSmrgif test "x$have_doxygen" = "xyes"; then 21459dedec0cSmrg AC_PATH_PROG([DOT], [dot]) 21469dedec0cSmrg if test "x$DOT" != "x"; then 21479dedec0cSmrg HAVE_DOT=yes 2148198e4c3cSmrg fi 21499dedec0cSmrgfi 2150e120bd27Smrg 21519dedec0cSmrgAC_SUBST([HAVE_DOT]) 21529dedec0cSmrgAM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"]) 21539dedec0cSmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 21549dedec0cSmrg]) # XORG_WITH_DOXYGEN 2155e120bd27Smrg 21569dedec0cSmrg# XORG_WITH_GROFF([DEFAULT]) 21579dedec0cSmrg# ---------------- 21589dedec0cSmrg# Minimum version: 1.6.0 21599dedec0cSmrg# Minimum version for optional DEFAULT argument: 1.11.0 21609dedec0cSmrg# 21619dedec0cSmrg# Documentation tools are not always available on all platforms and sometimes 21629dedec0cSmrg# not at the appropriate level. This macro enables a module to test for the 21639dedec0cSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 21649dedec0cSmrg# the --with-groff option, it allows maximum flexibilty in making decisions 21659dedec0cSmrg# as whether or not to use the groff package. When DEFAULT is not specified, 21669dedec0cSmrg# --with-groff assumes 'auto'. 21679dedec0cSmrg# 21689dedec0cSmrg# Interface to module: 21699dedec0cSmrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 21709dedec0cSmrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 21719dedec0cSmrg# HAVE_GROFF_MS: the -ms macros package 21729dedec0cSmrg# GROFF: returns the path of the groff program found 21739dedec0cSmrg# returns the path set by the user in the environment 21749dedec0cSmrg# --with-groff: 'yes' user instructs the module to use groff 21759dedec0cSmrg# 'no' user instructs the module not to use groff 21769dedec0cSmrg# 21779dedec0cSmrg# Added in version 1.9.0: 21789dedec0cSmrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 21799dedec0cSmrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 21809dedec0cSmrg# psselect from the psutils package. 21819dedec0cSmrg# the ghostcript package. Refer to the grohtml man pages 21829dedec0cSmrg# 21839dedec0cSmrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 21849dedec0cSmrg# 21859dedec0cSmrg# OS and distros often splits groff in a basic and full package, the former 21869dedec0cSmrg# having the groff program and the later having devices, fonts and macros 21879dedec0cSmrg# Checking for the groff executable is not enough. 21889dedec0cSmrg# 21899dedec0cSmrg# If macros are missing, we cannot assume that groff is useless, so we don't 21909dedec0cSmrg# unset HAVE_GROFF or GROFF env variables. 21919dedec0cSmrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 21929dedec0cSmrg# 21939dedec0cSmrgAC_DEFUN([XORG_WITH_GROFF],[ 21949dedec0cSmrgAC_ARG_VAR([GROFF], [Path to groff command]) 21959dedec0cSmrgm4_define([_defopt], m4_default([$1], [auto])) 21969dedec0cSmrgAC_ARG_WITH(groff, 21979dedec0cSmrg AS_HELP_STRING([--with-groff], 21989dedec0cSmrg [Use groff to regenerate documentation (default: ]_defopt[)]), 21999dedec0cSmrg [use_groff=$withval], [use_groff=]_defopt) 22009dedec0cSmrgm4_undefine([_defopt]) 22019dedec0cSmrg 22029dedec0cSmrgif test "x$use_groff" = x"auto"; then 22039dedec0cSmrg AC_PATH_PROG([GROFF], [groff]) 22049dedec0cSmrg if test "x$GROFF" = "x"; then 22059dedec0cSmrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 22069dedec0cSmrg have_groff=no 22079dedec0cSmrg else 22089dedec0cSmrg have_groff=yes 22099dedec0cSmrg fi 22109dedec0cSmrgelif test "x$use_groff" = x"yes" ; then 22119dedec0cSmrg AC_PATH_PROG([GROFF], [groff]) 22129dedec0cSmrg if test "x$GROFF" = "x"; then 22139dedec0cSmrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 22149dedec0cSmrg fi 22159dedec0cSmrg have_groff=yes 22169dedec0cSmrgelif test "x$use_groff" = x"no" ; then 22179dedec0cSmrg if test "x$GROFF" != "x"; then 22189dedec0cSmrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 22199dedec0cSmrg fi 22209dedec0cSmrg have_groff=no 2221198e4c3cSmrgelse 22229dedec0cSmrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 2223198e4c3cSmrgfi 22246c321187Smrg 22259dedec0cSmrg# We have groff, test for the presence of the macro packages 22269dedec0cSmrgif test "x$have_groff" = x"yes"; then 22279dedec0cSmrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 22289dedec0cSmrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 22299dedec0cSmrg groff_ms_works=yes 22309dedec0cSmrg else 22319dedec0cSmrg groff_ms_works=no 22329dedec0cSmrg fi 22339dedec0cSmrg AC_MSG_RESULT([$groff_ms_works]) 22349dedec0cSmrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 22359dedec0cSmrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 22369dedec0cSmrg groff_mm_works=yes 22379dedec0cSmrg else 22389dedec0cSmrg groff_mm_works=no 22399dedec0cSmrg fi 22409dedec0cSmrg AC_MSG_RESULT([$groff_mm_works]) 22419dedec0cSmrgfi 2242e120bd27Smrg 22439dedec0cSmrg# We have groff, test for HTML dependencies, one command per package 22449dedec0cSmrgif test "x$have_groff" = x"yes"; then 22459dedec0cSmrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 22469dedec0cSmrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 22479dedec0cSmrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 22489dedec0cSmrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 22499dedec0cSmrg have_groff_html=yes 22509dedec0cSmrg else 22519dedec0cSmrg have_groff_html=no 22529dedec0cSmrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 22539dedec0cSmrg fi 22549dedec0cSmrgfi 22559d0b5e55Smrg 22569dedec0cSmrg# Set Automake conditionals for Makefiles 22579dedec0cSmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 22589dedec0cSmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 22599dedec0cSmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 22609dedec0cSmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 22619dedec0cSmrg]) # XORG_WITH_GROFF 22629d0b5e55Smrg 22639dedec0cSmrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 22649dedec0cSmrg# --------------------------------------- 22659dedec0cSmrg# Minimum version: 1.6.0 22669dedec0cSmrg# Minimum version for optional DEFAULT argument: 1.11.0 22679dedec0cSmrg# Minimum version for optional MIN-VERSION argument: 1.15.0 22689dedec0cSmrg# 22699dedec0cSmrg# Documentation tools are not always available on all platforms and sometimes 22709dedec0cSmrg# not at the appropriate level. This macro enables a module to test for the 22719dedec0cSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 22729dedec0cSmrg# the --with-fop option, it allows maximum flexibilty in making decisions 22739dedec0cSmrg# as whether or not to use the fop package. When DEFAULT is not specified, 22749dedec0cSmrg# --with-fop assumes 'auto'. 22759dedec0cSmrg# 22769dedec0cSmrg# Interface to module: 22779dedec0cSmrg# HAVE_FOP: used in makefiles to conditionally generate documentation 22789dedec0cSmrg# FOP: returns the path of the fop program found 22799dedec0cSmrg# returns the path set by the user in the environment 22809dedec0cSmrg# --with-fop: 'yes' user instructs the module to use fop 22819dedec0cSmrg# 'no' user instructs the module not to use fop 22829dedec0cSmrg# 22839dedec0cSmrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 22849dedec0cSmrg# 22859dedec0cSmrgAC_DEFUN([XORG_WITH_FOP],[ 22869dedec0cSmrgAC_ARG_VAR([FOP], [Path to fop command]) 22879dedec0cSmrgm4_define([_defopt], m4_default([$2], [auto])) 22889dedec0cSmrgAC_ARG_WITH(fop, 22899dedec0cSmrg AS_HELP_STRING([--with-fop], 22909dedec0cSmrg [Use fop to regenerate documentation (default: ]_defopt[)]), 22919dedec0cSmrg [use_fop=$withval], [use_fop=]_defopt) 22929dedec0cSmrgm4_undefine([_defopt]) 2293e120bd27Smrg 22949dedec0cSmrgif test "x$use_fop" = x"auto"; then 22959dedec0cSmrg AC_PATH_PROG([FOP], [fop]) 22969dedec0cSmrg if test "x$FOP" = "x"; then 22979dedec0cSmrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 22989dedec0cSmrg have_fop=no 22999dedec0cSmrg else 23009dedec0cSmrg have_fop=yes 23019dedec0cSmrg fi 23029dedec0cSmrgelif test "x$use_fop" = x"yes" ; then 23039dedec0cSmrg AC_PATH_PROG([FOP], [fop]) 23049dedec0cSmrg if test "x$FOP" = "x"; then 23059dedec0cSmrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 23069dedec0cSmrg fi 23079dedec0cSmrg have_fop=yes 23089dedec0cSmrgelif test "x$use_fop" = x"no" ; then 23099dedec0cSmrg if test "x$FOP" != "x"; then 23109dedec0cSmrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 23119dedec0cSmrg fi 23129dedec0cSmrg have_fop=no 2313198e4c3cSmrgelse 23149dedec0cSmrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 23159dedec0cSmrgfi 2316e120bd27Smrg 23179dedec0cSmrg# Test for a minimum version of fop, if provided. 23189dedec0cSmrgm4_ifval([$1], 23199dedec0cSmrg[if test "$have_fop" = yes; then 23209dedec0cSmrg # scrape the fop version 23219dedec0cSmrg AC_MSG_CHECKING([for fop minimum version]) 23229dedec0cSmrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 23239dedec0cSmrg AC_MSG_RESULT([$fop_version]) 23249dedec0cSmrg AS_VERSION_COMPARE([$fop_version], [$1], 23259dedec0cSmrg [if test "x$use_fop" = xauto; then 23269dedec0cSmrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 23279dedec0cSmrg have_fop=no 23289dedec0cSmrg else 23299dedec0cSmrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 23309dedec0cSmrg fi]) 23319dedec0cSmrgfi]) 23329dedec0cSmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 23339dedec0cSmrg]) # XORG_WITH_FOP 2334e120bd27Smrg 23359dedec0cSmrg# XORG_WITH_M4([MIN-VERSION]) 23369dedec0cSmrg# --------------------------- 23379dedec0cSmrg# Minimum version: 1.19.0 23389dedec0cSmrg# 23399dedec0cSmrg# This macro attempts to locate an m4 macro processor which supports 23409dedec0cSmrg# -I option and is only useful for modules relying on M4 in order to 23419dedec0cSmrg# expand macros in source code files. 23429dedec0cSmrg# 23439dedec0cSmrg# Interface to module: 23449dedec0cSmrg# M4: returns the path of the m4 program found 23459dedec0cSmrg# returns the path set by the user in the environment 23469dedec0cSmrg# 23479dedec0cSmrgAC_DEFUN([XORG_WITH_M4], [ 23489dedec0cSmrgAC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4], 23499dedec0cSmrg [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4], 23509dedec0cSmrg [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \ 23519dedec0cSmrg ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]], 23529dedec0cSmrg [AC_MSG_ERROR([could not find m4 that supports -I option])], 23539dedec0cSmrg [$PATH:/usr/gnu/bin])]) 2354e120bd27Smrg 23559dedec0cSmrgAC_SUBST([M4], [$ac_cv_path_M4]) 23569dedec0cSmrg]) # XORG_WITH_M4 2357e120bd27Smrg 23589dedec0cSmrg# XORG_WITH_PS2PDF([DEFAULT]) 23599dedec0cSmrg# ---------------- 23609dedec0cSmrg# Minimum version: 1.6.0 23619dedec0cSmrg# Minimum version for optional DEFAULT argument: 1.11.0 23629dedec0cSmrg# 23639dedec0cSmrg# Documentation tools are not always available on all platforms and sometimes 23649dedec0cSmrg# not at the appropriate level. This macro enables a module to test for the 23659dedec0cSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 23669dedec0cSmrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 23679dedec0cSmrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 23689dedec0cSmrg# --with-ps2pdf assumes 'auto'. 23699dedec0cSmrg# 23709dedec0cSmrg# Interface to module: 23719dedec0cSmrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 23729dedec0cSmrg# PS2PDF: returns the path of the ps2pdf program found 23739dedec0cSmrg# returns the path set by the user in the environment 23749dedec0cSmrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 23759dedec0cSmrg# 'no' user instructs the module not to use ps2pdf 23769dedec0cSmrg# 23779dedec0cSmrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 23789dedec0cSmrg# 23799dedec0cSmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 23809dedec0cSmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 23819dedec0cSmrgm4_define([_defopt], m4_default([$1], [auto])) 23829dedec0cSmrgAC_ARG_WITH(ps2pdf, 23839dedec0cSmrg AS_HELP_STRING([--with-ps2pdf], 23849dedec0cSmrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 23859dedec0cSmrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 23869dedec0cSmrgm4_undefine([_defopt]) 2387e120bd27Smrg 23889dedec0cSmrgif test "x$use_ps2pdf" = x"auto"; then 23899dedec0cSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 23909dedec0cSmrg if test "x$PS2PDF" = "x"; then 23919dedec0cSmrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 23929dedec0cSmrg have_ps2pdf=no 23939dedec0cSmrg else 23949dedec0cSmrg have_ps2pdf=yes 23959dedec0cSmrg fi 23969dedec0cSmrgelif test "x$use_ps2pdf" = x"yes" ; then 23979dedec0cSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 23989dedec0cSmrg if test "x$PS2PDF" = "x"; then 23999dedec0cSmrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 24009dedec0cSmrg fi 24019dedec0cSmrg have_ps2pdf=yes 24029dedec0cSmrgelif test "x$use_ps2pdf" = x"no" ; then 24039dedec0cSmrg if test "x$PS2PDF" != "x"; then 24049dedec0cSmrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 24059dedec0cSmrg fi 24069dedec0cSmrg have_ps2pdf=no 2407198e4c3cSmrgelse 24089dedec0cSmrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 24099dedec0cSmrgfi 24109dedec0cSmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 24119dedec0cSmrg]) # XORG_WITH_PS2PDF 2412e120bd27Smrg 24139dedec0cSmrg# XORG_ENABLE_DOCS (enable_docs=yes) 24149dedec0cSmrg# ---------------- 24159dedec0cSmrg# Minimum version: 1.6.0 24169dedec0cSmrg# 24179dedec0cSmrg# Documentation tools are not always available on all platforms and sometimes 24189dedec0cSmrg# not at the appropriate level. This macro enables a builder to skip all 24199dedec0cSmrg# documentation targets except traditional man pages. 24209dedec0cSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 24219dedec0cSmrg# maximum flexibilty in controlling documentation building. 24229dedec0cSmrg# Refer to: 24239dedec0cSmrg# XORG_WITH_XMLTO --with-xmlto 24249dedec0cSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 24259dedec0cSmrg# XORG_WITH_DOXYGEN --with-doxygen 24269dedec0cSmrg# XORG_WITH_FOP --with-fop 24279dedec0cSmrg# XORG_WITH_GROFF --with-groff 24289dedec0cSmrg# XORG_WITH_PS2PDF --with-ps2pdf 24299dedec0cSmrg# 24309dedec0cSmrg# Interface to module: 24319dedec0cSmrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 24329dedec0cSmrg# --enable-docs: 'yes' user instructs the module to generate docs 24339dedec0cSmrg# 'no' user instructs the module not to generate docs 24349dedec0cSmrg# parm1: specify the default value, yes or no. 24359dedec0cSmrg# 24369dedec0cSmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 24379dedec0cSmrgm4_define([docs_default], m4_default([$1], [yes])) 24389dedec0cSmrgAC_ARG_ENABLE(docs, 24399dedec0cSmrg AS_HELP_STRING([--enable-docs], 24409dedec0cSmrg [Enable building the documentation (default: ]docs_default[)]), 24419dedec0cSmrg [build_docs=$enableval], [build_docs=]docs_default) 24429dedec0cSmrgm4_undefine([docs_default]) 24439dedec0cSmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 24449dedec0cSmrgAC_MSG_CHECKING([whether to build documentation]) 24459dedec0cSmrgAC_MSG_RESULT([$build_docs]) 24469dedec0cSmrg]) # XORG_ENABLE_DOCS 2447e120bd27Smrg 24489dedec0cSmrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 24499dedec0cSmrg# ---------------- 24509dedec0cSmrg# Minimum version: 1.6.0 24519dedec0cSmrg# 24529dedec0cSmrg# This macro enables a builder to skip all developer documentation. 24539dedec0cSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 24549dedec0cSmrg# maximum flexibilty in controlling documentation building. 24559dedec0cSmrg# Refer to: 24569dedec0cSmrg# XORG_WITH_XMLTO --with-xmlto 24579dedec0cSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 24589dedec0cSmrg# XORG_WITH_DOXYGEN --with-doxygen 24599dedec0cSmrg# XORG_WITH_FOP --with-fop 24609dedec0cSmrg# XORG_WITH_GROFF --with-groff 24619dedec0cSmrg# XORG_WITH_PS2PDF --with-ps2pdf 24629dedec0cSmrg# 24639dedec0cSmrg# Interface to module: 24649dedec0cSmrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 24659dedec0cSmrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 24669dedec0cSmrg# 'no' user instructs the module not to generate developer docs 24679dedec0cSmrg# parm1: specify the default value, yes or no. 24689dedec0cSmrg# 24699dedec0cSmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 24709dedec0cSmrgm4_define([devel_default], m4_default([$1], [yes])) 24719dedec0cSmrgAC_ARG_ENABLE(devel-docs, 24729dedec0cSmrg AS_HELP_STRING([--enable-devel-docs], 24739dedec0cSmrg [Enable building the developer documentation (default: ]devel_default[)]), 24749dedec0cSmrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 24759dedec0cSmrgm4_undefine([devel_default]) 24769dedec0cSmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 24779dedec0cSmrgAC_MSG_CHECKING([whether to build developer documentation]) 24789dedec0cSmrgAC_MSG_RESULT([$build_devel_docs]) 24799dedec0cSmrg]) # XORG_ENABLE_DEVEL_DOCS 2480e120bd27Smrg 24819dedec0cSmrg# XORG_ENABLE_SPECS (enable_specs=yes) 24829dedec0cSmrg# ---------------- 24839dedec0cSmrg# Minimum version: 1.6.0 24849dedec0cSmrg# 24859dedec0cSmrg# This macro enables a builder to skip all functional specification targets. 24869dedec0cSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 24879dedec0cSmrg# maximum flexibilty in controlling documentation building. 24889dedec0cSmrg# Refer to: 24899dedec0cSmrg# XORG_WITH_XMLTO --with-xmlto 24909dedec0cSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 24919dedec0cSmrg# XORG_WITH_DOXYGEN --with-doxygen 24929dedec0cSmrg# XORG_WITH_FOP --with-fop 24939dedec0cSmrg# XORG_WITH_GROFF --with-groff 24949dedec0cSmrg# XORG_WITH_PS2PDF --with-ps2pdf 24959dedec0cSmrg# 24969dedec0cSmrg# Interface to module: 24979dedec0cSmrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 24989dedec0cSmrg# --enable-specs: 'yes' user instructs the module to generate specs 24999dedec0cSmrg# 'no' user instructs the module not to generate specs 25009dedec0cSmrg# parm1: specify the default value, yes or no. 25019dedec0cSmrg# 25029dedec0cSmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 25039dedec0cSmrgm4_define([spec_default], m4_default([$1], [yes])) 25049dedec0cSmrgAC_ARG_ENABLE(specs, 25059dedec0cSmrg AS_HELP_STRING([--enable-specs], 25069dedec0cSmrg [Enable building the specs (default: ]spec_default[)]), 25079dedec0cSmrg [build_specs=$enableval], [build_specs=]spec_default) 25089dedec0cSmrgm4_undefine([spec_default]) 25099dedec0cSmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 25109dedec0cSmrgAC_MSG_CHECKING([whether to build functional specifications]) 25119dedec0cSmrgAC_MSG_RESULT([$build_specs]) 25129dedec0cSmrg]) # XORG_ENABLE_SPECS 2513e120bd27Smrg 25149dedec0cSmrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 25159dedec0cSmrg# ---------------------------------------------- 25169dedec0cSmrg# Minimum version: 1.13.0 25179dedec0cSmrg# 25189dedec0cSmrg# This macro enables a builder to enable/disable unit testing 25199dedec0cSmrg# It makes no assumption about the test cases implementation 25209dedec0cSmrg# Test cases may or may not use Automake "Support for test suites" 25219dedec0cSmrg# They may or may not use the software utility library GLib 25229dedec0cSmrg# 25239dedec0cSmrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 25249dedec0cSmrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 25259dedec0cSmrg# The variable enable_unit_tests is used by other macros in this file. 25269dedec0cSmrg# 25279dedec0cSmrg# Interface to module: 25289dedec0cSmrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 25299dedec0cSmrg# enable_unit_tests: used in configure.ac for additional configuration 25309dedec0cSmrg# --enable-unit-tests: 'yes' user instructs the module to build tests 25319dedec0cSmrg# 'no' user instructs the module not to build tests 25329dedec0cSmrg# parm1: specify the default value, yes or no. 25339dedec0cSmrg# 25349dedec0cSmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 25359dedec0cSmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 25369dedec0cSmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 25379dedec0cSmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 25389dedec0cSmrgm4_define([_defopt], m4_default([$1], [auto])) 25399dedec0cSmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 25409dedec0cSmrg [Enable building unit test cases (default: ]_defopt[)]), 25419dedec0cSmrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 25429dedec0cSmrgm4_undefine([_defopt]) 25439dedec0cSmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 25449dedec0cSmrgAC_MSG_CHECKING([whether to build unit test cases]) 25459dedec0cSmrgAC_MSG_RESULT([$enable_unit_tests]) 25469dedec0cSmrg]) # XORG_ENABLE_UNIT_TESTS 2547198e4c3cSmrg 25489dedec0cSmrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 25499dedec0cSmrg# ------------------------------------------------------ 25509dedec0cSmrg# Minimum version: 1.17.0 25519dedec0cSmrg# 25529dedec0cSmrg# This macro enables a builder to enable/disable integration testing 25539dedec0cSmrg# It makes no assumption about the test cases' implementation 25549dedec0cSmrg# Test cases may or may not use Automake "Support for test suites" 25559dedec0cSmrg# 25569dedec0cSmrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 25579dedec0cSmrg# usually requires less dependencies and may be built and run under less 25589dedec0cSmrg# stringent environments than integration tests. 25599dedec0cSmrg# 25609dedec0cSmrg# Interface to module: 25619dedec0cSmrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 25629dedec0cSmrg# enable_integration_tests: used in configure.ac for additional configuration 25639dedec0cSmrg# --enable-integration-tests: 'yes' user instructs the module to build tests 25649dedec0cSmrg# 'no' user instructs the module not to build tests 25659dedec0cSmrg# parm1: specify the default value, yes or no. 25669dedec0cSmrg# 25679dedec0cSmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 25689dedec0cSmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 25699dedec0cSmrgm4_define([_defopt], m4_default([$1], [auto])) 25709dedec0cSmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 25719dedec0cSmrg [Enable building integration test cases (default: ]_defopt[)]), 25729dedec0cSmrg [enable_integration_tests=$enableval], 25739dedec0cSmrg [enable_integration_tests=]_defopt) 25749dedec0cSmrgm4_undefine([_defopt]) 25759dedec0cSmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 25769dedec0cSmrg [test "x$enable_integration_tests" != xno]) 25779dedec0cSmrgAC_MSG_CHECKING([whether to build unit test cases]) 25789dedec0cSmrgAC_MSG_RESULT([$enable_integration_tests]) 25799dedec0cSmrg]) # XORG_ENABLE_INTEGRATION_TESTS 25809d0b5e55Smrg 25819dedec0cSmrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 25829dedec0cSmrg# ---------------------------------------- 25839dedec0cSmrg# Minimum version: 1.13.0 25849dedec0cSmrg# 25859dedec0cSmrg# GLib is a library which provides advanced data structures and functions. 25869dedec0cSmrg# This macro enables a module to test for the presence of Glib. 25879dedec0cSmrg# 25889dedec0cSmrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 25899dedec0cSmrg# Otherwise the value of $enable_unit_tests is blank. 25909dedec0cSmrg# 25919dedec0cSmrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 25929dedec0cSmrg# test support usually requires less dependencies and may be built and run under 25939dedec0cSmrg# less stringent environments than integration tests. 25949dedec0cSmrg# 25959dedec0cSmrg# Interface to module: 25969dedec0cSmrg# HAVE_GLIB: used in makefiles to conditionally build targets 25979dedec0cSmrg# with_glib: used in configure.ac to know if GLib has been found 25989dedec0cSmrg# --with-glib: 'yes' user instructs the module to use glib 25999dedec0cSmrg# 'no' user instructs the module not to use glib 26009dedec0cSmrg# 26019dedec0cSmrgAC_DEFUN([XORG_WITH_GLIB],[ 26029dedec0cSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 26039dedec0cSmrgm4_define([_defopt], m4_default([$2], [auto])) 26049dedec0cSmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 26059dedec0cSmrg [Use GLib library for unit testing (default: ]_defopt[)]), 26069dedec0cSmrg [with_glib=$withval], [with_glib=]_defopt) 26079dedec0cSmrgm4_undefine([_defopt]) 2608198e4c3cSmrg 26099dedec0cSmrghave_glib=no 26109dedec0cSmrg# Do not probe GLib if user explicitly disabled unit testing 26119dedec0cSmrgif test "x$enable_unit_tests" != x"no"; then 26129dedec0cSmrg # Do not probe GLib if user explicitly disabled it 26139dedec0cSmrg if test "x$with_glib" != x"no"; then 26149dedec0cSmrg m4_ifval( 26159dedec0cSmrg [$1], 26169dedec0cSmrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 26179dedec0cSmrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 26189dedec0cSmrg ) 26199dedec0cSmrg fi 26209dedec0cSmrgfi 2621e120bd27Smrg 26229dedec0cSmrg# Not having GLib when unit testing has been explicitly requested is an error 26239dedec0cSmrgif test "x$enable_unit_tests" = x"yes"; then 26249dedec0cSmrg if test "x$have_glib" = x"no"; then 26259dedec0cSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 26269dedec0cSmrg fi 26279dedec0cSmrgfi 2628e120bd27Smrg 26299dedec0cSmrg# Having unit testing disabled when GLib has been explicitly requested is an error 26309dedec0cSmrgif test "x$enable_unit_tests" = x"no"; then 26319dedec0cSmrg if test "x$with_glib" = x"yes"; then 26329dedec0cSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 26339dedec0cSmrg fi 26340cc2eac3Smrgfi 2635e120bd27Smrg 26369dedec0cSmrg# Not having GLib when it has been explicitly requested is an error 26379dedec0cSmrgif test "x$with_glib" = x"yes"; then 26389dedec0cSmrg if test "x$have_glib" = x"no"; then 26399dedec0cSmrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 26409dedec0cSmrg fi 26419dedec0cSmrgfi 2642e120bd27Smrg 26439dedec0cSmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 26449dedec0cSmrg]) # XORG_WITH_GLIB 2645e120bd27Smrg 26469dedec0cSmrg# XORG_LD_WRAP([required|optional]) 26479dedec0cSmrg# --------------------------------- 26489dedec0cSmrg# Minimum version: 1.13.0 26499dedec0cSmrg# 26509dedec0cSmrg# Check if linker supports -wrap, passed via compiler flags 26519dedec0cSmrg# 26529dedec0cSmrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 26539dedec0cSmrg# Otherwise the value of $enable_unit_tests is blank. 26549dedec0cSmrg# 26559dedec0cSmrg# Argument added in 1.16.0 - default is "required", to match existing behavior 26569dedec0cSmrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 26579dedec0cSmrg# available, an argument of "optional" allows use when some unit tests require 26589dedec0cSmrg# ld -wrap and others do not. 26599dedec0cSmrg# 26609dedec0cSmrgAC_DEFUN([XORG_LD_WRAP],[ 26619dedec0cSmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 26629dedec0cSmrg [AC_LANG_PROGRAM([#include <stdlib.h> 26639dedec0cSmrg void __wrap_exit(int status) { return; }], 26649dedec0cSmrg [exit(0);])]) 26659dedec0cSmrg# Not having ld wrap when unit testing has been explicitly requested is an error 26669dedec0cSmrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 26679dedec0cSmrg if test "x$have_ld_wrap" = x"no"; then 26689dedec0cSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 26699dedec0cSmrg fi 26709dedec0cSmrgfi 26719dedec0cSmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 26729dedec0cSmrg# 26739dedec0cSmrg]) # XORG_LD_WRAP 2674198e4c3cSmrg 26759dedec0cSmrg# XORG_CHECK_LINKER_FLAGS 26769dedec0cSmrg# ----------------------- 26779dedec0cSmrg# SYNOPSIS 26789dedec0cSmrg# 26799dedec0cSmrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 26809dedec0cSmrg# 26819dedec0cSmrg# DESCRIPTION 26829dedec0cSmrg# 26839dedec0cSmrg# Check whether the given linker FLAGS work with the current language's 26849dedec0cSmrg# linker, or whether they give an error. 26859dedec0cSmrg# 26869dedec0cSmrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 26879dedec0cSmrg# success/failure. 26889dedec0cSmrg# 26899dedec0cSmrg# PROGRAM-SOURCE is the program source to link with, if needed 26909dedec0cSmrg# 26919dedec0cSmrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 26929dedec0cSmrg# 26939dedec0cSmrg# LICENSE 26949dedec0cSmrg# 26959dedec0cSmrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 26969dedec0cSmrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 26979dedec0cSmrg# Copyright (c) 2009 Matteo Frigo 26989dedec0cSmrg# 26999dedec0cSmrg# This program is free software: you can redistribute it and/or modify it 27009dedec0cSmrg# under the terms of the GNU General Public License as published by the 27019dedec0cSmrg# Free Software Foundation, either version 3 of the License, or (at your 27029dedec0cSmrg# option) any later version. 27039dedec0cSmrg# 27049dedec0cSmrg# This program is distributed in the hope that it will be useful, but 27059dedec0cSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 27069dedec0cSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 27079dedec0cSmrg# Public License for more details. 27089dedec0cSmrg# 27099dedec0cSmrg# You should have received a copy of the GNU General Public License along 27109dedec0cSmrg# with this program. If not, see <http://www.gnu.org/licenses/>. 27119dedec0cSmrg# 27129dedec0cSmrg# As a special exception, the respective Autoconf Macro's copyright owner 27139dedec0cSmrg# gives unlimited permission to copy, distribute and modify the configure 27149dedec0cSmrg# scripts that are the output of Autoconf when processing the Macro. You 27159dedec0cSmrg# need not follow the terms of the GNU General Public License when using 27169dedec0cSmrg# or distributing such scripts, even though portions of the text of the 27179dedec0cSmrg# Macro appear in them. The GNU General Public License (GPL) does govern 27189dedec0cSmrg# all other use of the material that constitutes the Autoconf Macro. 27199dedec0cSmrg# 27209dedec0cSmrg# This special exception to the GPL applies to versions of the Autoconf 27219dedec0cSmrg# Macro released by the Autoconf Archive. When you make and distribute a 27229dedec0cSmrg# modified version of the Autoconf Macro, you may extend this special 27239dedec0cSmrg# exception to the GPL to apply to your modified version as well.# 27249dedec0cSmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 27259dedec0cSmrg[AC_MSG_CHECKING([whether the linker accepts $1]) 27269dedec0cSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 27279dedec0cSmrgAS_LITERAL_IF([$1], 27289dedec0cSmrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 27299dedec0cSmrg ax_save_FLAGS=$LDFLAGS 27309dedec0cSmrg LDFLAGS="$1" 27319dedec0cSmrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 27329dedec0cSmrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 27339dedec0cSmrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 27349dedec0cSmrg LDFLAGS=$ax_save_FLAGS])], 27359dedec0cSmrg [ax_save_FLAGS=$LDFLAGS 27369dedec0cSmrg LDFLAGS="$1" 27379dedec0cSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 27389dedec0cSmrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 27399dedec0cSmrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 27409dedec0cSmrg LDFLAGS=$ax_save_FLAGS]) 27419dedec0cSmrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 27429dedec0cSmrgAC_MSG_RESULT($xorg_check_linker_flags) 27439dedec0cSmrgif test "x$xorg_check_linker_flags" = xyes; then 27449dedec0cSmrg m4_default([$2], :) 27450cc2eac3Smrgelse 27469dedec0cSmrg m4_default([$3], :) 27470cc2eac3Smrgfi 27489dedec0cSmrg]) # XORG_CHECK_LINKER_FLAGS 27499dedec0cSmrg 27509dedec0cSmrg# XORG_MEMORY_CHECK_FLAGS 27519dedec0cSmrg# ----------------------- 27529dedec0cSmrg# Minimum version: 1.16.0 27539dedec0cSmrg# 27549dedec0cSmrg# This macro attempts to find appropriate memory checking functionality 27559dedec0cSmrg# for various platforms which unit testing code may use to catch various 27569dedec0cSmrg# forms of memory allocation and access errors in testing. 27579dedec0cSmrg# 27589dedec0cSmrg# Interface to module: 27599dedec0cSmrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 27609dedec0cSmrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 27619dedec0cSmrg# 27629dedec0cSmrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 27639dedec0cSmrg# 27649dedec0cSmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 2765e120bd27Smrg 27669dedec0cSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 27679dedec0cSmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 27689dedec0cSmrg [Environment variables to enable memory checking in tests]) 2769e120bd27Smrg 27709dedec0cSmrg# Check for different types of support on different platforms 27719dedec0cSmrgcase $host_os in 27729dedec0cSmrg solaris*) 27739dedec0cSmrg AC_CHECK_LIB([umem], [umem_alloc], 27749dedec0cSmrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 27759dedec0cSmrg ;; 27769dedec0cSmrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 27779dedec0cSmrg # both directly and inverted, so should not be 0 or 255. 27789dedec0cSmrg malloc_debug_env='MALLOC_PERTURB_=15' 27799dedec0cSmrg ;; 27809dedec0cSmrg darwin*) 27819dedec0cSmrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 27829dedec0cSmrg ;; 27839dedec0cSmrg *bsd*) 27849dedec0cSmrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 27859dedec0cSmrg ;; 27869dedec0cSmrgesac 27879dedec0cSmrg 27889dedec0cSmrg# User supplied flags override default flags 27899dedec0cSmrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 27909dedec0cSmrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 2791198e4c3cSmrgfi 2792e120bd27Smrg 27939dedec0cSmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 27949dedec0cSmrg]) # XORG_WITH_LINT 2795e120bd27Smrg 27969dedec0cSmrg# XORG_CHECK_MALLOC_ZERO 27979dedec0cSmrg# ---------------------- 27989dedec0cSmrg# Minimum version: 1.0.0 27999dedec0cSmrg# 28009dedec0cSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 28019dedec0cSmrg# malloc(0) returns NULL. Packages should add one of these cflags to 28029dedec0cSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 28039dedec0cSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 28049dedec0cSmrgAC_ARG_ENABLE(malloc0returnsnull, 28059dedec0cSmrg AS_HELP_STRING([--enable-malloc0returnsnull], 28069dedec0cSmrg [malloc(0) returns NULL (default: auto)]), 28079dedec0cSmrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 28089dedec0cSmrg [MALLOC_ZERO_RETURNS_NULL=auto]) 28090cc2eac3Smrg 28109dedec0cSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 28119dedec0cSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 28129dedec0cSmrgAC_CACHE_VAL([xorg_cv_malloc0_returns_null], 28139dedec0cSmrg [AC_RUN_IFELSE([AC_LANG_PROGRAM([ 28149dedec0cSmrg#include <stdlib.h> 28159dedec0cSmrg],[ 28169dedec0cSmrg char *m0, *r0, *c0, *p; 28179dedec0cSmrg m0 = malloc(0); 28189dedec0cSmrg p = malloc(10); 28199dedec0cSmrg r0 = realloc(p,0); 28209dedec0cSmrg c0 = calloc(0,10); 28219dedec0cSmrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 28229dedec0cSmrg])], 28239dedec0cSmrg [xorg_cv_malloc0_returns_null=yes], 28249dedec0cSmrg [xorg_cv_malloc0_returns_null=no])]) 28259dedec0cSmrgMALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null 28269dedec0cSmrgfi 28279dedec0cSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 28289dedec0cSmrg 28299dedec0cSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 28309dedec0cSmrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 28319dedec0cSmrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 28329dedec0cSmrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 2833198e4c3cSmrgelse 28349dedec0cSmrg MALLOC_ZERO_CFLAGS="" 28359dedec0cSmrg XMALLOC_ZERO_CFLAGS="" 28369dedec0cSmrg XTMALLOC_ZERO_CFLAGS="" 2837198e4c3cSmrgfi 2838e120bd27Smrg 28399dedec0cSmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 28409dedec0cSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 28419dedec0cSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 28429dedec0cSmrg]) # XORG_CHECK_MALLOC_ZERO 2843e120bd27Smrg 28449dedec0cSmrg# XORG_WITH_LINT() 2845198e4c3cSmrg# ---------------- 28469dedec0cSmrg# Minimum version: 1.1.0 28479dedec0cSmrg# 28489dedec0cSmrg# This macro enables the use of a tool that flags some suspicious and 28499dedec0cSmrg# non-portable constructs (likely to be bugs) in C language source code. 28509dedec0cSmrg# It will attempt to locate the tool and use appropriate options. 28519dedec0cSmrg# There are various lint type tools on different platforms. 28529dedec0cSmrg# 28539dedec0cSmrg# Interface to module: 28549dedec0cSmrg# LINT: returns the path to the tool found on the platform 28559dedec0cSmrg# or the value set to LINT on the configure cmd line 28569dedec0cSmrg# also an Automake conditional 28579dedec0cSmrg# LINT_FLAGS: an Automake variable with appropriate flags 28589dedec0cSmrg# 28599dedec0cSmrg# --with-lint: 'yes' user instructs the module to use lint 28609dedec0cSmrg# 'no' user instructs the module not to use lint (default) 28619dedec0cSmrg# 28629dedec0cSmrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 28639dedec0cSmrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 28649dedec0cSmrg# 28659dedec0cSmrgAC_DEFUN([XORG_WITH_LINT],[ 2866e120bd27Smrg 28679dedec0cSmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 28689dedec0cSmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 28699dedec0cSmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 28709dedec0cSmrg [Use a lint-style source code checker (default: disabled)])], 28719dedec0cSmrg [use_lint=$withval], [use_lint=no]) 28720cc2eac3Smrg 28739dedec0cSmrg# Obtain platform specific info like program name and options 28749dedec0cSmrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 28759dedec0cSmrgcase $host_os in 28769dedec0cSmrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 28779dedec0cSmrg lint_name=splint 28789dedec0cSmrg lint_options="-badflag" 28799dedec0cSmrg ;; 28809dedec0cSmrg *freebsd* | *netbsd*) 28819dedec0cSmrg lint_name=lint 28829dedec0cSmrg lint_options="-u -b" 28839dedec0cSmrg ;; 28849dedec0cSmrg *solaris*) 28859dedec0cSmrg lint_name=lint 28869dedec0cSmrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 28879dedec0cSmrg ;; 28889dedec0cSmrgesac 2889e120bd27Smrg 28909dedec0cSmrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 28919dedec0cSmrgif test "x$use_lint" = x"yes" ; then 28929dedec0cSmrg AC_PATH_PROG([LINT], [$lint_name]) 28939dedec0cSmrg if test "x$LINT" = "x"; then 28949dedec0cSmrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 28959dedec0cSmrg fi 28969dedec0cSmrgelif test "x$use_lint" = x"no" ; then 28979dedec0cSmrg if test "x$LINT" != "x"; then 28989dedec0cSmrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 28999dedec0cSmrg fi 29000cc2eac3Smrgelse 29019dedec0cSmrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 29029dedec0cSmrgfi 2903e120bd27Smrg 29049dedec0cSmrg# User supplied flags override default flags 29059dedec0cSmrgif test "x$LINT_FLAGS" != "x"; then 29069dedec0cSmrg lint_options=$LINT_FLAGS 29079dedec0cSmrgfi 2908e120bd27Smrg 29099dedec0cSmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 29109dedec0cSmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 2911e120bd27Smrg 29129dedec0cSmrg]) # XORG_WITH_LINT 2913e120bd27Smrg 29149dedec0cSmrg# XORG_LINT_LIBRARY(LIBNAME) 29159dedec0cSmrg# -------------------------- 29169dedec0cSmrg# Minimum version: 1.1.0 29179dedec0cSmrg# 29189dedec0cSmrg# Sets up flags for building lint libraries for checking programs that call 29199dedec0cSmrg# functions in the library. 29209dedec0cSmrg# 29219dedec0cSmrg# Interface to module: 29229dedec0cSmrg# LINTLIB - Automake variable with the name of lint library file to make 29239dedec0cSmrg# MAKE_LINT_LIB - Automake conditional 29249dedec0cSmrg# 29259dedec0cSmrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 29269dedec0cSmrg# - 'no' user instructs the module not to create a lint library (default) 2927198e4c3cSmrg 29289dedec0cSmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 29299dedec0cSmrgAC_REQUIRE([XORG_WITH_LINT]) 29309dedec0cSmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 29319dedec0cSmrg [Create lint library (default: disabled)])], 29329dedec0cSmrg [make_lint_lib=$enableval], [make_lint_lib=no]) 2933e120bd27Smrg 29349dedec0cSmrgif test "x$make_lint_lib" = x"yes" ; then 29359dedec0cSmrg LINTLIB=llib-l$1.ln 29369dedec0cSmrg if test "x$LINT" = "x"; then 29379dedec0cSmrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 29389dedec0cSmrg fi 29399dedec0cSmrgelif test "x$make_lint_lib" != x"no" ; then 29409dedec0cSmrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 29419dedec0cSmrgfi 2942e120bd27Smrg 29439dedec0cSmrgAC_SUBST(LINTLIB) 29449dedec0cSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 2945e120bd27Smrg 29469dedec0cSmrg]) # XORG_LINT_LIBRARY 2947e120bd27Smrg 29489dedec0cSmrg# XORG_COMPILER_BRAND 29499dedec0cSmrg# ------------------- 29509dedec0cSmrg# Minimum version: 1.14.0 29519dedec0cSmrg# 29529dedec0cSmrg# Checks for various brands of compilers and sets flags as appropriate: 29539dedec0cSmrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 29549dedec0cSmrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 29559dedec0cSmrg# clang compiler - sets CLANGCC to "yes" 29569dedec0cSmrg# Intel compiler - sets INTELCC to "yes" 29579dedec0cSmrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 29589dedec0cSmrg# 29599dedec0cSmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 29609dedec0cSmrgAC_LANG_CASE( 29619dedec0cSmrg [C], [ 29629dedec0cSmrg AC_REQUIRE([AC_PROG_CC_C99]) 29639dedec0cSmrg ], 29649dedec0cSmrg [C++], [ 29659dedec0cSmrg AC_REQUIRE([AC_PROG_CXX]) 29669dedec0cSmrg ] 29679dedec0cSmrg) 29689dedec0cSmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 29699dedec0cSmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 29709dedec0cSmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 29719dedec0cSmrg]) # XORG_COMPILER_BRAND 2972e120bd27Smrg 29739dedec0cSmrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 29749dedec0cSmrg# --------------- 29759dedec0cSmrg# Minimum version: 1.16.0 29769dedec0cSmrg# 29779dedec0cSmrg# Test if the compiler works when passed the given flag as a command line argument. 29789dedec0cSmrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 29799dedec0cSmrg# next flag in the list until there are no more options. 29809dedec0cSmrg# 29819dedec0cSmrg# Note that this does not guarantee that the compiler supports the flag as some 29829dedec0cSmrg# compilers will simply ignore arguments that they do not understand, but we do 29839dedec0cSmrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 29849dedec0cSmrg# -Werror=unused-command-line-argument 29859dedec0cSmrg# 29869dedec0cSmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 29879dedec0cSmrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 29889dedec0cSmrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 2989e120bd27Smrg 29909dedec0cSmrgAC_LANG_COMPILER_REQUIRE 2991e120bd27Smrg 29929dedec0cSmrgAC_LANG_CASE( 29939dedec0cSmrg [C], [ 29949dedec0cSmrg AC_REQUIRE([AC_PROG_CC_C99]) 29959dedec0cSmrg define([PREFIX], [C]) 29969dedec0cSmrg define([CACHE_PREFIX], [cc]) 29979dedec0cSmrg define([COMPILER], [$CC]) 29989dedec0cSmrg ], 29999dedec0cSmrg [C++], [ 30009dedec0cSmrg define([PREFIX], [CXX]) 30019dedec0cSmrg define([CACHE_PREFIX], [cxx]) 30029dedec0cSmrg define([COMPILER], [$CXX]) 30039dedec0cSmrg ] 30049dedec0cSmrg) 3005e120bd27Smrg 30069dedec0cSmrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 3007e120bd27Smrg 30089dedec0cSmrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 30099dedec0cSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 30109dedec0cSmrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 30119dedec0cSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 30129dedec0cSmrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 30139dedec0cSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 30149dedec0cSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 30159dedec0cSmrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 30169dedec0cSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 30179dedec0cSmrgfi 3018e120bd27Smrg 30199dedec0cSmrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 30209dedec0cSmrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 30219dedec0cSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 30229dedec0cSmrg fi 30239dedec0cSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 30249dedec0cSmrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 30259dedec0cSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 30269dedec0cSmrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 30279dedec0cSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 30289dedec0cSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 30299dedec0cSmrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 30309dedec0cSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 30319dedec0cSmrgfi 3032e120bd27Smrg 30339dedec0cSmrgfound="no" 30349dedec0cSmrgm4_foreach([flag], m4_cdr($@), [ 30359dedec0cSmrg if test $found = "no" ; then 30369dedec0cSmrg if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then 30379dedec0cSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 30389dedec0cSmrg fi 3039e120bd27Smrg 30409dedec0cSmrg if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then 30419dedec0cSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 30429dedec0cSmrg fi 3043e120bd27Smrg 30449dedec0cSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 3045e120bd27Smrg 30469dedec0cSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 30479dedec0cSmrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 30489dedec0cSmrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 30499dedec0cSmrg AC_CACHE_VAL($cacheid, 30509dedec0cSmrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 30519dedec0cSmrg [eval $cacheid=yes], 30529dedec0cSmrg [eval $cacheid=no])]) 3053198e4c3cSmrg 30549dedec0cSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 3055e120bd27Smrg 30569dedec0cSmrg eval supported=\$$cacheid 30579dedec0cSmrg AC_MSG_RESULT([$supported]) 30589dedec0cSmrg if test "$supported" = "yes" ; then 30599dedec0cSmrg $1="$$1 ]flag[" 30609dedec0cSmrg found="yes" 30619dedec0cSmrg fi 30629dedec0cSmrg fi 30639dedec0cSmrg]) 30649dedec0cSmrg]) # XORG_TESTSET_CFLAG 3065e120bd27Smrg 30669dedec0cSmrg# XORG_COMPILER_FLAGS 30679dedec0cSmrg# --------------- 30689dedec0cSmrg# Minimum version: 1.16.0 30699dedec0cSmrg# 30709dedec0cSmrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 30719dedec0cSmrg# arguments supported by the selected compiler which do NOT alter the generated 30729dedec0cSmrg# code. These arguments will cause the compiler to print various warnings 30739dedec0cSmrg# during compilation AND turn a conservative set of warnings into errors. 30749dedec0cSmrg# 30759dedec0cSmrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 30769dedec0cSmrg# future versions of util-macros as options are added to new compilers. 30779dedec0cSmrg# 30789dedec0cSmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 30799dedec0cSmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 3080e120bd27Smrg 30819dedec0cSmrgAC_ARG_ENABLE(selective-werror, 30829dedec0cSmrg AS_HELP_STRING([--disable-selective-werror], 30839dedec0cSmrg [Turn off selective compiler errors. (default: enabled)]), 30849dedec0cSmrg [SELECTIVE_WERROR=$enableval], 30859dedec0cSmrg [SELECTIVE_WERROR=yes]) 3086e120bd27Smrg 30879dedec0cSmrgAC_LANG_CASE( 30889dedec0cSmrg [C], [ 30899dedec0cSmrg define([PREFIX], [C]) 30909dedec0cSmrg ], 30919dedec0cSmrg [C++], [ 30929dedec0cSmrg define([PREFIX], [CXX]) 30939dedec0cSmrg ] 30949dedec0cSmrg) 30959dedec0cSmrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 30969dedec0cSmrgif test "x$SUNCC" = "xyes"; then 30979dedec0cSmrg [BASE_]PREFIX[FLAGS]="-v" 30989dedec0cSmrgelse 30999dedec0cSmrg [BASE_]PREFIX[FLAGS]="" 31009dedec0cSmrgfi 3101e120bd27Smrg 31029dedec0cSmrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 31039dedec0cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 31049dedec0cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 31059dedec0cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 31069dedec0cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 3107e120bd27Smrg 31089dedec0cSmrgAC_LANG_CASE( 31099dedec0cSmrg [C], [ 31109dedec0cSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 31119dedec0cSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 31129dedec0cSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 31139dedec0cSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 31149dedec0cSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd]) 31159dedec0cSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 31169dedec0cSmrg ] 31179dedec0cSmrg) 3118e120bd27Smrg 31199dedec0cSmrg# This chunk adds additional warnings that could catch undesired effects. 31209dedec0cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 31219dedec0cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 31229dedec0cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 31239dedec0cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 31249dedec0cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 31259dedec0cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 31269dedec0cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 3127e120bd27Smrg 31289dedec0cSmrg# These are currently disabled because they are noisy. They will be enabled 31299dedec0cSmrg# in the future once the codebase is sufficiently modernized to silence 31309dedec0cSmrg# them. For now, I don't want them to drown out the other warnings. 31319dedec0cSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 31329dedec0cSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 31339dedec0cSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 3134e120bd27Smrg 31359dedec0cSmrg# Turn some warnings into errors, so we don't accidently get successful builds 31369dedec0cSmrg# when there are problems that should be fixed. 3137e120bd27Smrg 31389dedec0cSmrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 31399dedec0cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 31409dedec0cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 31419dedec0cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 31429dedec0cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 31439dedec0cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 31449dedec0cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 31459dedec0cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 31469dedec0cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 31479dedec0cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 31489dedec0cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 31499dedec0cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 31509dedec0cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 31519dedec0cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 31529dedec0cSmrgelse 31539dedec0cSmrgAC_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]) 31549dedec0cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 31559dedec0cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 31569dedec0cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 31579dedec0cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 31589dedec0cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 31599dedec0cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 31609dedec0cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 31619dedec0cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 31629dedec0cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 31639dedec0cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 31649dedec0cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 31659dedec0cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 31669dedec0cSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 31679dedec0cSmrgfi 3168e120bd27Smrg 31699dedec0cSmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 31709dedec0cSmrg]) # XORG_COMPILER_FLAGS 3171e120bd27Smrg 31729dedec0cSmrg# XORG_CWARNFLAGS 31739dedec0cSmrg# --------------- 31749dedec0cSmrg# Minimum version: 1.2.0 31759dedec0cSmrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 31769dedec0cSmrg# 31779dedec0cSmrg# Defines CWARNFLAGS to enable C compiler warnings. 31789dedec0cSmrg# 31799dedec0cSmrg# This function is deprecated because it defines -fno-strict-aliasing 31809dedec0cSmrg# which alters the code generated by the compiler. If -fno-strict-aliasing 31819dedec0cSmrg# is needed, then it should be added explicitly in the module when 31829dedec0cSmrg# it is updated to use BASE_CFLAGS. 31839dedec0cSmrg# 31849dedec0cSmrgAC_DEFUN([XORG_CWARNFLAGS], [ 31859dedec0cSmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 31869dedec0cSmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 31879dedec0cSmrgAC_LANG_CASE( 31889dedec0cSmrg [C], [ 31899dedec0cSmrg CWARNFLAGS="$BASE_CFLAGS" 31909dedec0cSmrg if test "x$GCC" = xyes ; then 31919dedec0cSmrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 31929dedec0cSmrg fi 31939dedec0cSmrg AC_SUBST(CWARNFLAGS) 31949dedec0cSmrg ] 31959dedec0cSmrg) 31969dedec0cSmrg]) # XORG_CWARNFLAGS 3197e120bd27Smrg 31989dedec0cSmrg# XORG_STRICT_OPTION 31999dedec0cSmrg# ----------------------- 32009dedec0cSmrg# Minimum version: 1.3.0 32019dedec0cSmrg# 32029dedec0cSmrg# Add configure option to enable strict compilation flags, such as treating 32039dedec0cSmrg# warnings as fatal errors. 32049dedec0cSmrg# If --enable-strict-compilation is passed to configure, adds strict flags to 32059dedec0cSmrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 32069dedec0cSmrg# 32079dedec0cSmrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 32089dedec0cSmrg# when strict compilation is unconditionally desired. 32099dedec0cSmrgAC_DEFUN([XORG_STRICT_OPTION], [ 32109dedec0cSmrgAC_REQUIRE([XORG_CWARNFLAGS]) 32119dedec0cSmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 3212e120bd27Smrg 32139dedec0cSmrgAC_ARG_ENABLE(strict-compilation, 32149dedec0cSmrg AS_HELP_STRING([--enable-strict-compilation], 32159dedec0cSmrg [Enable all warnings from compiler and make them errors (default: disabled)]), 32169dedec0cSmrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 3217e120bd27Smrg 32189dedec0cSmrgAC_LANG_CASE( 32199dedec0cSmrg [C], [ 32209dedec0cSmrg define([PREFIX], [C]) 32219dedec0cSmrg ], 32229dedec0cSmrg [C++], [ 32239dedec0cSmrg define([PREFIX], [CXX]) 32249dedec0cSmrg ] 32259dedec0cSmrg) 3226e120bd27Smrg 32279dedec0cSmrg[STRICT_]PREFIX[FLAGS]="" 32289dedec0cSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 32299dedec0cSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 3230e120bd27Smrg 32319dedec0cSmrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 32329dedec0cSmrg# activate it with -Werror, so we add it here explicitly. 32339dedec0cSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 3234e120bd27Smrg 32359dedec0cSmrgif test "x$STRICT_COMPILE" = "xyes"; then 32369dedec0cSmrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 32379dedec0cSmrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 32389dedec0cSmrgfi 32399dedec0cSmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 32409dedec0cSmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 32419dedec0cSmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 32429dedec0cSmrg]) # XORG_STRICT_OPTION 3243198e4c3cSmrg 32449dedec0cSmrg# XORG_DEFAULT_OPTIONS 32459dedec0cSmrg# -------------------- 32469dedec0cSmrg# Minimum version: 1.3.0 32479dedec0cSmrg# 32489dedec0cSmrg# Defines default options for X.Org modules. 32499dedec0cSmrg# 32509dedec0cSmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 32519dedec0cSmrgAC_REQUIRE([AC_PROG_INSTALL]) 32529dedec0cSmrgXORG_COMPILER_FLAGS 32539dedec0cSmrgXORG_CWARNFLAGS 32549dedec0cSmrgXORG_STRICT_OPTION 32559dedec0cSmrgXORG_RELEASE_VERSION 32569dedec0cSmrgXORG_CHANGELOG 32579dedec0cSmrgXORG_INSTALL 32589dedec0cSmrgXORG_MANPAGE_SECTIONS 32599dedec0cSmrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 32609dedec0cSmrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 32619dedec0cSmrg]) # XORG_DEFAULT_OPTIONS 3262e120bd27Smrg 32639dedec0cSmrg# XORG_INSTALL() 32649dedec0cSmrg# ---------------- 32659dedec0cSmrg# Minimum version: 1.4.0 32669dedec0cSmrg# 32679dedec0cSmrg# Defines the variable INSTALL_CMD as the command to copy 32689dedec0cSmrg# INSTALL from $prefix/share/util-macros. 32699dedec0cSmrg# 32709dedec0cSmrgAC_DEFUN([XORG_INSTALL], [ 32719dedec0cSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 32729dedec0cSmrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 32739dedec0cSmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 32749dedec0cSmrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 32759dedec0cSmrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; test -e \$(top_srcdir)/INSTALL || ( \ 32769dedec0cSmrgtouch \$(top_srcdir)/INSTALL; \ 32779dedec0cSmrgecho 'failed to copy INSTALL from util-macros: installing empty INSTALL.' >&2))" 32789dedec0cSmrgAC_SUBST([INSTALL_CMD]) 32799dedec0cSmrg]) # XORG_INSTALL 32809dedec0cSmrgdnl Copyright 2005 Red Hat, Inc 32819dedec0cSmrgdnl 32829dedec0cSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 32839dedec0cSmrgdnl documentation for any purpose is hereby granted without fee, provided that 32849dedec0cSmrgdnl the above copyright notice appear in all copies and that both that 32859dedec0cSmrgdnl copyright notice and this permission notice appear in supporting 32869dedec0cSmrgdnl documentation. 32879dedec0cSmrgdnl 32889dedec0cSmrgdnl The above copyright notice and this permission notice shall be included 32899dedec0cSmrgdnl in all copies or substantial portions of the Software. 32909dedec0cSmrgdnl 32919dedec0cSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 32929dedec0cSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 32939dedec0cSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 32949dedec0cSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 32959dedec0cSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 32969dedec0cSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 32979dedec0cSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 32989dedec0cSmrgdnl 32999dedec0cSmrgdnl Except as contained in this notice, the name of the copyright holders shall 33009dedec0cSmrgdnl not be used in advertising or otherwise to promote the sale, use or 33019dedec0cSmrgdnl other dealings in this Software without prior written authorization 33029dedec0cSmrgdnl from the copyright holders. 33039dedec0cSmrgdnl 3304e120bd27Smrg 33059dedec0cSmrg# XORG_RELEASE_VERSION 33069dedec0cSmrg# -------------------- 33079dedec0cSmrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 3308e120bd27Smrg 33099dedec0cSmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 33109dedec0cSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 33119dedec0cSmrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 33129dedec0cSmrg [Major version of this package]) 33139dedec0cSmrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 33149dedec0cSmrg if test "x$PVM" = "x"; then 33159dedec0cSmrg PVM="0" 33169dedec0cSmrg fi 33179dedec0cSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 33189dedec0cSmrg [$PVM], 33199dedec0cSmrg [Minor version of this package]) 33209dedec0cSmrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 33219dedec0cSmrg if test "x$PVP" = "x"; then 33229dedec0cSmrg PVP="0" 33239dedec0cSmrg fi 33249dedec0cSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 33259dedec0cSmrg [$PVP], 33269dedec0cSmrg [Patch version of this package]) 33279dedec0cSmrg]) 332893493779Smrg 33299dedec0cSmrg# XORG_CHANGELOG() 33309dedec0cSmrg# ---------------- 33319dedec0cSmrg# Minimum version: 1.2.0 33329dedec0cSmrg# 33339dedec0cSmrg# Defines the variable CHANGELOG_CMD as the command to generate 33349dedec0cSmrg# ChangeLog from git. 33359dedec0cSmrg# 33369dedec0cSmrg# 33379dedec0cSmrgAC_DEFUN([XORG_CHANGELOG], [ 33389dedec0cSmrgCHANGELOG_CMD="((GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp) 2>/dev/null && \ 33399dedec0cSmrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 33409dedec0cSmrg|| (rm -f \$(top_srcdir)/.changelog.tmp; test -e \$(top_srcdir)/ChangeLog || ( \ 33419dedec0cSmrgtouch \$(top_srcdir)/ChangeLog; \ 33429dedec0cSmrgecho 'git failed to create ChangeLog: installing empty ChangeLog.' >&2))" 33439dedec0cSmrgAC_SUBST([CHANGELOG_CMD]) 33449dedec0cSmrg]) # XORG_CHANGELOG 33450cc2eac3Smrg 33469dedec0cSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 33479dedec0cSmrg# 33489dedec0cSmrg# Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software 33499dedec0cSmrg# Foundation, Inc. 33509dedec0cSmrg# Written by Gordon Matzigkeit, 1996 33519dedec0cSmrg# 33529dedec0cSmrg# This file is free software; the Free Software Foundation gives 33539dedec0cSmrg# unlimited permission to copy and/or distribute it, with or without 33549dedec0cSmrg# modifications, as long as this notice is preserved. 33550cc2eac3Smrg 33569dedec0cSmrgm4_define([_LT_COPYING], [dnl 33579dedec0cSmrg# Copyright (C) 2014 Free Software Foundation, Inc. 33589dedec0cSmrg# This is free software; see the source for copying conditions. There is NO 33599dedec0cSmrg# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 33606c321187Smrg 33619dedec0cSmrg# GNU Libtool is free software; you can redistribute it and/or modify 33629dedec0cSmrg# it under the terms of the GNU General Public License as published by 33639dedec0cSmrg# the Free Software Foundation; either version 2 of of the License, or 33649dedec0cSmrg# (at your option) any later version. 33659dedec0cSmrg# 33669dedec0cSmrg# As a special exception to the GNU General Public License, if you 33679dedec0cSmrg# distribute this file as part of a program or library that is built 33689dedec0cSmrg# using GNU Libtool, you may include this file under the same 33699dedec0cSmrg# distribution terms that you use for the rest of that program. 33709dedec0cSmrg# 33719dedec0cSmrg# GNU Libtool is distributed in the hope that it will be useful, but 33729dedec0cSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 33739dedec0cSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 33749dedec0cSmrg# GNU General Public License for more details. 33759dedec0cSmrg# 33769dedec0cSmrg# You should have received a copy of the GNU General Public License 33779dedec0cSmrg# along with this program. If not, see <http://www.gnu.org/licenses/>. 33789dedec0cSmrg]) 3379e120bd27Smrg 33809dedec0cSmrg# serial 59 LT_INIT 3381e120bd27Smrg 33826c321187Smrg 33839dedec0cSmrg# LT_PREREQ(VERSION) 33849dedec0cSmrg# ------------------ 33859dedec0cSmrg# Complain and exit if this libtool version is less that VERSION. 33869dedec0cSmrgm4_defun([LT_PREREQ], 33879dedec0cSmrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 33889dedec0cSmrg [m4_default([$3], 33899dedec0cSmrg [m4_fatal([Libtool version $1 or higher is required], 33909dedec0cSmrg 63)])], 33919dedec0cSmrg [$2])]) 33926c321187Smrg 33936c321187Smrg 33949dedec0cSmrg# _LT_CHECK_BUILDDIR 33959dedec0cSmrg# ------------------ 33969dedec0cSmrg# Complain if the absolute build directory name contains unusual characters 33979dedec0cSmrgm4_defun([_LT_CHECK_BUILDDIR], 33989dedec0cSmrg[case `pwd` in 33999dedec0cSmrg *\ * | *\ *) 34009dedec0cSmrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 34019dedec0cSmrgesac 34029dedec0cSmrg]) 34036c321187Smrg 34046c321187Smrg 34059dedec0cSmrg# LT_INIT([OPTIONS]) 34069dedec0cSmrg# ------------------ 34079dedec0cSmrgAC_DEFUN([LT_INIT], 34089dedec0cSmrg[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK 34099dedec0cSmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 34109dedec0cSmrgAC_BEFORE([$0], [LT_LANG])dnl 34119dedec0cSmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 34129dedec0cSmrgAC_BEFORE([$0], [LTDL_INIT])dnl 34139dedec0cSmrgm4_require([_LT_CHECK_BUILDDIR])dnl 3414e120bd27Smrg 34159dedec0cSmrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 34169dedec0cSmrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 34179dedec0cSmrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 34189dedec0cSmrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 34199dedec0cSmrgdnl unless we require an AC_DEFUNed macro: 34209dedec0cSmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 34219dedec0cSmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 34229dedec0cSmrgAC_REQUIRE([LTVERSION_VERSION])dnl 34239dedec0cSmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 34249dedec0cSmrgm4_require([_LT_PROG_LTMAIN])dnl 34256c321187Smrg 34269dedec0cSmrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 34276c321187Smrg 34289dedec0cSmrgdnl Parse OPTIONS 34299dedec0cSmrg_LT_SET_OPTIONS([$0], [$1]) 34306c321187Smrg 34319dedec0cSmrg# This can be used to rebuild libtool when needed 34329dedec0cSmrgLIBTOOL_DEPS=$ltmain 34336c321187Smrg 34349dedec0cSmrg# Always use our own libtool. 34359dedec0cSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 34369dedec0cSmrgAC_SUBST(LIBTOOL)dnl 34376c321187Smrg 34389dedec0cSmrg_LT_SETUP 3439e120bd27Smrg 34409dedec0cSmrg# Only expand once: 34419dedec0cSmrgm4_define([LT_INIT]) 34429dedec0cSmrg])# LT_INIT 3443e120bd27Smrg 34449dedec0cSmrg# Old names: 34459dedec0cSmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 34469dedec0cSmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 34479dedec0cSmrgdnl aclocal-1.4 backwards compatibility: 34489dedec0cSmrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 34499dedec0cSmrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 3450e120bd27Smrg 3451198e4c3cSmrg 34529dedec0cSmrg# _LT_PREPARE_CC_BASENAME 34539dedec0cSmrg# ----------------------- 34549dedec0cSmrgm4_defun([_LT_PREPARE_CC_BASENAME], [ 34559dedec0cSmrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 34569dedec0cSmrgfunc_cc_basename () 34579dedec0cSmrg{ 34589dedec0cSmrg for cc_temp in @S|@*""; do 34599dedec0cSmrg case $cc_temp in 34609dedec0cSmrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 34619dedec0cSmrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 34629dedec0cSmrg \-*) ;; 34639dedec0cSmrg *) break;; 3464198e4c3cSmrg esac 34659dedec0cSmrg done 34669dedec0cSmrg func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 34679dedec0cSmrg} 34689dedec0cSmrg])# _LT_PREPARE_CC_BASENAME 34696c321187Smrg 34706c321187Smrg 34719dedec0cSmrg# _LT_CC_BASENAME(CC) 34729dedec0cSmrg# ------------------- 34739dedec0cSmrg# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, 34749dedec0cSmrg# but that macro is also expanded into generated libtool script, which 34759dedec0cSmrg# arranges for $SED and $ECHO to be set by different means. 34769dedec0cSmrgm4_defun([_LT_CC_BASENAME], 34779dedec0cSmrg[m4_require([_LT_PREPARE_CC_BASENAME])dnl 34789dedec0cSmrgAC_REQUIRE([_LT_DECL_SED])dnl 34799dedec0cSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 34809dedec0cSmrgfunc_cc_basename $1 34819dedec0cSmrgcc_basename=$func_cc_basename_result 34829dedec0cSmrg]) 34836c321187Smrg 3484e120bd27Smrg 34859dedec0cSmrg# _LT_FILEUTILS_DEFAULTS 34869dedec0cSmrg# ---------------------- 34879dedec0cSmrg# It is okay to use these file commands and assume they have been set 34889dedec0cSmrg# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. 34899dedec0cSmrgm4_defun([_LT_FILEUTILS_DEFAULTS], 34909dedec0cSmrg[: ${CP="cp -f"} 34919dedec0cSmrg: ${MV="mv -f"} 34929dedec0cSmrg: ${RM="rm -f"} 34939dedec0cSmrg])# _LT_FILEUTILS_DEFAULTS 34946c321187Smrg 3495198e4c3cSmrg 34969dedec0cSmrg# _LT_SETUP 34979dedec0cSmrg# --------- 34989dedec0cSmrgm4_defun([_LT_SETUP], 34999dedec0cSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 35009dedec0cSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 35019dedec0cSmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 35029dedec0cSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 35039dedec0cSmrg 35049dedec0cSmrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 35059dedec0cSmrgdnl 35069dedec0cSmrg_LT_DECL([], [host_alias], [0], [The host system])dnl 35079dedec0cSmrg_LT_DECL([], [host], [0])dnl 35089dedec0cSmrg_LT_DECL([], [host_os], [0])dnl 35099dedec0cSmrgdnl 35109dedec0cSmrg_LT_DECL([], [build_alias], [0], [The build system])dnl 35119dedec0cSmrg_LT_DECL([], [build], [0])dnl 35129dedec0cSmrg_LT_DECL([], [build_os], [0])dnl 35139dedec0cSmrgdnl 35149dedec0cSmrgAC_REQUIRE([AC_PROG_CC])dnl 35159dedec0cSmrgAC_REQUIRE([LT_PATH_LD])dnl 35169dedec0cSmrgAC_REQUIRE([LT_PATH_NM])dnl 35179dedec0cSmrgdnl 35189dedec0cSmrgAC_REQUIRE([AC_PROG_LN_S])dnl 35199dedec0cSmrgtest -z "$LN_S" && LN_S="ln -s" 35209dedec0cSmrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 35219dedec0cSmrgdnl 35229dedec0cSmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 35239dedec0cSmrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 35249dedec0cSmrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 35259dedec0cSmrgdnl 35269dedec0cSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 35279dedec0cSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 35289dedec0cSmrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 35299dedec0cSmrgm4_require([_LT_CMD_RELOAD])dnl 35309dedec0cSmrgm4_require([_LT_DECL_FILECMD])dnl 35319dedec0cSmrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 35329dedec0cSmrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 35339dedec0cSmrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 35349dedec0cSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 35359dedec0cSmrgm4_require([_LT_WITH_SYSROOT])dnl 35369dedec0cSmrgm4_require([_LT_CMD_TRUNCATE])dnl 35379dedec0cSmrg 35389dedec0cSmrg_LT_CONFIG_LIBTOOL_INIT([ 35399dedec0cSmrg# See if we are running on zsh, and set the options that allow our 35409dedec0cSmrg# commands through without removal of \ escapes INIT. 35419dedec0cSmrgif test -n "\${ZSH_VERSION+set}"; then 35429dedec0cSmrg setopt NO_GLOB_SUBST 35439dedec0cSmrgfi 35449dedec0cSmrg]) 35459dedec0cSmrgif test -n "${ZSH_VERSION+set}"; then 35469dedec0cSmrg setopt NO_GLOB_SUBST 35479dedec0cSmrgfi 35489dedec0cSmrg 35499dedec0cSmrg_LT_CHECK_OBJDIR 35509dedec0cSmrg 35519dedec0cSmrgm4_require([_LT_TAG_COMPILER])dnl 35529dedec0cSmrg 3553198e4c3cSmrgcase $host_os in 35549dedec0cSmrgaix3*) 35559dedec0cSmrg # AIX sometimes has problems with the GCC collect2 program. For some 35569dedec0cSmrg # reason, if we set the COLLECT_NAMES environment variable, the problems 35579dedec0cSmrg # vanish in a puff of smoke. 35589dedec0cSmrg if test set != "${COLLECT_NAMES+set}"; then 35599dedec0cSmrg COLLECT_NAMES= 35609dedec0cSmrg export COLLECT_NAMES 35619dedec0cSmrg fi 35629dedec0cSmrg ;; 3563198e4c3cSmrgesac 3564198e4c3cSmrg 35659dedec0cSmrg# Global variables: 35669dedec0cSmrgofile=libtool 35679dedec0cSmrgcan_build_shared=yes 3568198e4c3cSmrg 35699dedec0cSmrg# All known linkers require a '.a' archive for static linking (except MSVC and 35709dedec0cSmrg# ICC, which need '.lib'). 35719dedec0cSmrglibext=a 3572198e4c3cSmrg 35739dedec0cSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 3574198e4c3cSmrg 35759dedec0cSmrgold_CC=$CC 35769dedec0cSmrgold_CFLAGS=$CFLAGS 3577198e4c3cSmrg 35789dedec0cSmrg# Set sane defaults for various variables 35799dedec0cSmrgtest -z "$CC" && CC=cc 35809dedec0cSmrgtest -z "$LTCC" && LTCC=$CC 35819dedec0cSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 35829dedec0cSmrgtest -z "$LD" && LD=ld 35839dedec0cSmrgtest -z "$ac_objext" && ac_objext=o 3584198e4c3cSmrg 35859dedec0cSmrg_LT_CC_BASENAME([$compiler]) 3586198e4c3cSmrg 35879dedec0cSmrg# Only perform the check for file, if the check method requires it 35889dedec0cSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 35899dedec0cSmrgcase $deplibs_check_method in 35909dedec0cSmrgfile_magic*) 35919dedec0cSmrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 35929dedec0cSmrg _LT_PATH_MAGIC 35939dedec0cSmrg fi 35940cc2eac3Smrg ;; 35959dedec0cSmrgesac 35966c321187Smrg 35979dedec0cSmrg# Use C for the default configuration in the libtool script 35989dedec0cSmrgLT_SUPPORTED_TAG([CC]) 35999dedec0cSmrg_LT_LANG_C_CONFIG 36009dedec0cSmrg_LT_LANG_DEFAULT_CONFIG 36019dedec0cSmrg_LT_CONFIG_COMMANDS 36029dedec0cSmrg])# _LT_SETUP 36036c321187Smrg 3604e120bd27Smrg 36059dedec0cSmrg# _LT_PREPARE_SED_QUOTE_VARS 36069dedec0cSmrg# -------------------------- 36079dedec0cSmrg# Define a few sed substitution that help us do robust quoting. 36089dedec0cSmrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 36099dedec0cSmrg[# Backslashify metacharacters that are still active within 36109dedec0cSmrg# double-quoted strings. 36119dedec0cSmrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 36126c321187Smrg 36139dedec0cSmrg# Same as above, but do not quote variable references. 36149dedec0cSmrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 36156c321187Smrg 36169dedec0cSmrg# Sed substitution to delay expansion of an escaped shell variable in a 36179dedec0cSmrg# double_quote_subst'ed string. 36189dedec0cSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 36196c321187Smrg 36209dedec0cSmrg# Sed substitution to delay expansion of an escaped single quote. 36219dedec0cSmrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 3622e120bd27Smrg 36239dedec0cSmrg# Sed substitution to avoid accidental globbing in evaled expressions 36249dedec0cSmrgno_glob_subst='s/\*/\\\*/g' 36259dedec0cSmrg]) 36266c321187Smrg 36279dedec0cSmrg# _LT_PROG_LTMAIN 36289dedec0cSmrg# --------------- 36299dedec0cSmrg# Note that this code is called both from 'configure', and 'config.status' 36309dedec0cSmrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 36319dedec0cSmrg# 'config.status' has no value for ac_aux_dir unless we are using Automake, 36329dedec0cSmrg# so we pass a copy along to make sure it has a sensible value anyway. 36339dedec0cSmrgm4_defun([_LT_PROG_LTMAIN], 36349dedec0cSmrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 36359dedec0cSmrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 36369dedec0cSmrgltmain=$ac_aux_dir/ltmain.sh 36379dedec0cSmrg])# _LT_PROG_LTMAIN 36386c321187Smrg 36396c321187Smrg 36406c321187Smrg 36419dedec0cSmrg# So that we can recreate a full libtool script including additional 36429dedec0cSmrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 36439dedec0cSmrg# in macros and then make a single call at the end using the 'libtool' 36449dedec0cSmrg# label. 36456c321187Smrg 36466c321187Smrg 36479dedec0cSmrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 36489dedec0cSmrg# ---------------------------------------- 36499dedec0cSmrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 36509dedec0cSmrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 36519dedec0cSmrg[m4_ifval([$1], 36529dedec0cSmrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 36539dedec0cSmrg [$1 36549dedec0cSmrg])])]) 36556c321187Smrg 36569dedec0cSmrg# Initialize. 36579dedec0cSmrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 36586c321187Smrg 36596c321187Smrg 36609dedec0cSmrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 36619dedec0cSmrg# ------------------------------ 36629dedec0cSmrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 36639dedec0cSmrgm4_define([_LT_CONFIG_LIBTOOL], 36649dedec0cSmrg[m4_ifval([$1], 36659dedec0cSmrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 36669dedec0cSmrg [$1 36679dedec0cSmrg])])]) 36686c321187Smrg 36699dedec0cSmrg# Initialize. 36709dedec0cSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 36716c321187Smrg 36726c321187Smrg 36739dedec0cSmrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 36749dedec0cSmrg# ----------------------------------------------------- 36759dedec0cSmrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 36769dedec0cSmrg[_LT_CONFIG_LIBTOOL([$1]) 36779dedec0cSmrg_LT_CONFIG_LIBTOOL_INIT([$2]) 36789dedec0cSmrg]) 36796c321187Smrg 36806c321187Smrg 36819dedec0cSmrg# _LT_FORMAT_COMMENT([COMMENT]) 36829dedec0cSmrg# ----------------------------- 36839dedec0cSmrg# Add leading comment marks to the start of each line, and a trailing 36849dedec0cSmrg# full-stop to the whole comment if one is not present already. 36859dedec0cSmrgm4_define([_LT_FORMAT_COMMENT], 36869dedec0cSmrg[m4_ifval([$1], [ 36879dedec0cSmrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 36889dedec0cSmrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 36899dedec0cSmrg)]) 36900cc2eac3Smrg 36916c321187Smrg 36926c321187Smrg 36936c321187Smrg 36946c321187Smrg 36959dedec0cSmrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 36969dedec0cSmrg# ------------------------------------------------------------------- 36979dedec0cSmrg# CONFIGNAME is the name given to the value in the libtool script. 36989dedec0cSmrg# VARNAME is the (base) name used in the configure script. 36999dedec0cSmrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 37009dedec0cSmrg# VARNAME. Any other value will be used directly. 37019dedec0cSmrgm4_define([_LT_DECL], 37029dedec0cSmrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 37039dedec0cSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 37049dedec0cSmrg [m4_ifval([$1], [$1], [$2])]) 37059dedec0cSmrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 37069dedec0cSmrg m4_ifval([$4], 37079dedec0cSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 37089dedec0cSmrg lt_dict_add_subkey([lt_decl_dict], [$2], 37099dedec0cSmrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 37109dedec0cSmrg]) 37110cc2eac3Smrg 37120cc2eac3Smrg 37139dedec0cSmrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 37149dedec0cSmrg# -------------------------------------------------------- 37159dedec0cSmrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 37160cc2eac3Smrg 37170cc2eac3Smrg 37189dedec0cSmrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 37199dedec0cSmrg# ------------------------------------------------ 37209dedec0cSmrgm4_define([lt_decl_tag_varnames], 37219dedec0cSmrg[_lt_decl_filter([tagged?], [yes], $@)]) 37220cc2eac3Smrg 37239dedec0cSmrg 37249dedec0cSmrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 37259dedec0cSmrg# --------------------------------------------------------- 37269dedec0cSmrgm4_define([_lt_decl_filter], 37279dedec0cSmrg[m4_case([$#], 37289dedec0cSmrg [0], [m4_fatal([$0: too few arguments: $#])], 37299dedec0cSmrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 37309dedec0cSmrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 37319dedec0cSmrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 37329dedec0cSmrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 3733198e4c3cSmrg]) 37346c321187Smrg 37350cc2eac3Smrg 37369dedec0cSmrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 37379dedec0cSmrg# -------------------------------------------------- 37389dedec0cSmrgm4_define([lt_decl_quote_varnames], 37399dedec0cSmrg[_lt_decl_filter([value], [1], $@)]) 37400cc2eac3Smrg 37410cc2eac3Smrg 37429dedec0cSmrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 37439dedec0cSmrg# --------------------------------------------------- 37449dedec0cSmrgm4_define([lt_decl_dquote_varnames], 37459dedec0cSmrg[_lt_decl_filter([value], [2], $@)]) 37466c321187Smrg 37476c321187Smrg 37489dedec0cSmrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 37499dedec0cSmrg# --------------------------------------------------- 37509dedec0cSmrgm4_define([lt_decl_varnames_tagged], 37519dedec0cSmrg[m4_assert([$# <= 2])dnl 37529dedec0cSmrg_$0(m4_quote(m4_default([$1], [[, ]])), 37539dedec0cSmrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 37549dedec0cSmrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 37559dedec0cSmrgm4_define([_lt_decl_varnames_tagged], 37569dedec0cSmrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 37576c321187Smrg 37580cc2eac3Smrg 37599dedec0cSmrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 37609dedec0cSmrg# ------------------------------------------------ 37619dedec0cSmrgm4_define([lt_decl_all_varnames], 37629dedec0cSmrg[_$0(m4_quote(m4_default([$1], [[, ]])), 37639dedec0cSmrg m4_if([$2], [], 37649dedec0cSmrg m4_quote(lt_decl_varnames), 37659dedec0cSmrg m4_quote(m4_shift($@))))[]dnl 37669dedec0cSmrg]) 37679dedec0cSmrgm4_define([_lt_decl_all_varnames], 37689dedec0cSmrg[lt_join($@, lt_decl_varnames_tagged([$1], 37699dedec0cSmrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 37709dedec0cSmrg]) 37710cc2eac3Smrg 37720cc2eac3Smrg 37739dedec0cSmrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 37749dedec0cSmrg# ------------------------------------ 37759dedec0cSmrg# Quote a variable value, and forward it to 'config.status' so that its 37769dedec0cSmrg# declaration there will have the same value as in 'configure'. VARNAME 37779dedec0cSmrg# must have a single quote delimited value for this to work. 37789dedec0cSmrgm4_define([_LT_CONFIG_STATUS_DECLARE], 37799dedec0cSmrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 37800cc2eac3Smrg 37816c321187Smrg 37829dedec0cSmrg# _LT_CONFIG_STATUS_DECLARATIONS 37839dedec0cSmrg# ------------------------------ 37849dedec0cSmrg# We delimit libtool config variables with single quotes, so when 37859dedec0cSmrg# we write them to config.status, we have to be sure to quote all 37869dedec0cSmrg# embedded single quotes properly. In configure, this macro expands 37879dedec0cSmrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 37889dedec0cSmrg# 37899dedec0cSmrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 37909dedec0cSmrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 37919dedec0cSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 37929dedec0cSmrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 37936c321187Smrg 37946c321187Smrg 37959dedec0cSmrg# _LT_LIBTOOL_TAGS 37969dedec0cSmrg# ---------------- 37979dedec0cSmrg# Output comment and list of tags supported by the script 37989dedec0cSmrgm4_defun([_LT_LIBTOOL_TAGS], 37999dedec0cSmrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 38009dedec0cSmrgavailable_tags='_LT_TAGS'dnl 38019dedec0cSmrg]) 38026c321187Smrg 38036c321187Smrg 38049dedec0cSmrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 38059dedec0cSmrg# ----------------------------------- 38069dedec0cSmrg# Extract the dictionary values for VARNAME (optionally with TAG) and 38079dedec0cSmrg# expand to a commented shell variable setting: 38089dedec0cSmrg# 38099dedec0cSmrg# # Some comment about what VAR is for. 38109dedec0cSmrg# visible_name=$lt_internal_name 38119dedec0cSmrgm4_define([_LT_LIBTOOL_DECLARE], 38129dedec0cSmrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 38139dedec0cSmrg [description])))[]dnl 38149dedec0cSmrgm4_pushdef([_libtool_name], 38159dedec0cSmrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 38169dedec0cSmrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 38179dedec0cSmrg [0], [_libtool_name=[$]$1], 38189dedec0cSmrg [1], [_libtool_name=$lt_[]$1], 38199dedec0cSmrg [2], [_libtool_name=$lt_[]$1], 38209dedec0cSmrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 38219dedec0cSmrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 38229dedec0cSmrg]) 38236c321187Smrg 38246c321187Smrg 38259dedec0cSmrg# _LT_LIBTOOL_CONFIG_VARS 38269dedec0cSmrg# ----------------------- 38279dedec0cSmrg# Produce commented declarations of non-tagged libtool config variables 38289dedec0cSmrg# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' 38299dedec0cSmrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 38309dedec0cSmrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 38319dedec0cSmrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 38329dedec0cSmrg[m4_foreach([_lt_var], 38339dedec0cSmrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 38349dedec0cSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 3835e120bd27Smrg 3836e120bd27Smrg 38379dedec0cSmrg# _LT_LIBTOOL_TAG_VARS(TAG) 38389dedec0cSmrg# ------------------------- 38399dedec0cSmrgm4_define([_LT_LIBTOOL_TAG_VARS], 38409dedec0cSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 38419dedec0cSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 38426c321187Smrg 38436c321187Smrg 38449dedec0cSmrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 38459dedec0cSmrg# ------------------------------ 38469dedec0cSmrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 38476c321187Smrg 3848198e4c3cSmrg 38499dedec0cSmrg# _LT_CONFIG_COMMANDS 38509dedec0cSmrg# ------------------- 38519dedec0cSmrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 38529dedec0cSmrg# variables for single and double quote escaping we saved from calls 38539dedec0cSmrg# to _LT_DECL, we can put quote escaped variables declarations 38549dedec0cSmrg# into 'config.status', and then the shell code to quote escape them in 38559dedec0cSmrg# for loops in 'config.status'. Finally, any additional code accumulated 38569dedec0cSmrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 38579dedec0cSmrgm4_defun([_LT_CONFIG_COMMANDS], 38589dedec0cSmrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 38599dedec0cSmrg dnl If the libtool generation code has been placed in $CONFIG_LT, 38609dedec0cSmrg dnl instead of duplicating it all over again into config.status, 38619dedec0cSmrg dnl then we will have config.status run $CONFIG_LT later, so it 38629dedec0cSmrg dnl needs to know what name is stored there: 38639dedec0cSmrg [AC_CONFIG_COMMANDS([libtool], 38649dedec0cSmrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 38659dedec0cSmrg dnl If the libtool generation code is destined for config.status, 38669dedec0cSmrg dnl expand the accumulated commands and init code now: 38679dedec0cSmrg [AC_CONFIG_COMMANDS([libtool], 38689dedec0cSmrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 38699dedec0cSmrg])#_LT_CONFIG_COMMANDS 38706c321187Smrg 38716c321187Smrg 38729dedec0cSmrg# Initialize. 38739dedec0cSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 38749dedec0cSmrg[ 387593493779Smrg 38769dedec0cSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 38779dedec0cSmrg# if CDPATH is set. 38789dedec0cSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 38796c321187Smrg 38809dedec0cSmrgsed_quote_subst='$sed_quote_subst' 38819dedec0cSmrgdouble_quote_subst='$double_quote_subst' 38829dedec0cSmrgdelay_variable_subst='$delay_variable_subst' 38839dedec0cSmrg_LT_CONFIG_STATUS_DECLARATIONS 38849dedec0cSmrgLTCC='$LTCC' 38859dedec0cSmrgLTCFLAGS='$LTCFLAGS' 38869dedec0cSmrgcompiler='$compiler_DEFAULT' 38876c321187Smrg 38889dedec0cSmrg# A function that is used when there is no print builtin or printf. 38899dedec0cSmrgfunc_fallback_echo () 38909dedec0cSmrg{ 38919dedec0cSmrg eval 'cat <<_LTECHO_EOF 38929dedec0cSmrg\$[]1 38939dedec0cSmrg_LTECHO_EOF' 38940cc2eac3Smrg} 38956c321187Smrg 38969dedec0cSmrg# Quote evaled strings. 38979dedec0cSmrgfor var in lt_decl_all_varnames([[ \ 38989dedec0cSmrg]], lt_decl_quote_varnames); do 38999dedec0cSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 39009dedec0cSmrg *[[\\\\\\\`\\"\\\$]]*) 39019dedec0cSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 39029dedec0cSmrg ;; 39039dedec0cSmrg *) 39049dedec0cSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 39059dedec0cSmrg ;; 39069dedec0cSmrg esac 39079dedec0cSmrgdone 39086c321187Smrg 39099dedec0cSmrg# Double-quote double-evaled strings. 39109dedec0cSmrgfor var in lt_decl_all_varnames([[ \ 39119dedec0cSmrg]], lt_decl_dquote_varnames); do 39129dedec0cSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 39139dedec0cSmrg *[[\\\\\\\`\\"\\\$]]*) 39149dedec0cSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 39159dedec0cSmrg ;; 39169dedec0cSmrg *) 39179dedec0cSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 39189dedec0cSmrg ;; 39199dedec0cSmrg esac 39209dedec0cSmrgdone 39216c321187Smrg 39229dedec0cSmrg_LT_OUTPUT_LIBTOOL_INIT 39239dedec0cSmrg]) 39246c321187Smrg 39259dedec0cSmrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 39269dedec0cSmrg# ------------------------------------ 39279dedec0cSmrg# Generate a child script FILE with all initialization necessary to 39289dedec0cSmrg# reuse the environment learned by the parent script, and make the 39299dedec0cSmrg# file executable. If COMMENT is supplied, it is inserted after the 39309dedec0cSmrg# '#!' sequence but before initialization text begins. After this 39319dedec0cSmrg# macro, additional text can be appended to FILE to form the body of 39329dedec0cSmrg# the child script. The macro ends with non-zero status if the 39339dedec0cSmrg# file could not be fully written (such as if the disk is full). 39349dedec0cSmrgm4_ifdef([AS_INIT_GENERATED], 39359dedec0cSmrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 39369dedec0cSmrg[m4_defun([_LT_GENERATED_FILE_INIT], 39379dedec0cSmrg[m4_require([AS_PREPARE])]dnl 39389dedec0cSmrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 39399dedec0cSmrg[lt_write_fail=0 39409dedec0cSmrgcat >$1 <<_ASEOF || lt_write_fail=1 39419dedec0cSmrg#! $SHELL 39429dedec0cSmrg# Generated by $as_me. 39439dedec0cSmrg$2 39449dedec0cSmrgSHELL=\${CONFIG_SHELL-$SHELL} 39459dedec0cSmrgexport SHELL 39469dedec0cSmrg_ASEOF 39479dedec0cSmrgcat >>$1 <<\_ASEOF || lt_write_fail=1 39489dedec0cSmrgAS_SHELL_SANITIZE 39499dedec0cSmrg_AS_PREPARE 39509dedec0cSmrgexec AS_MESSAGE_FD>&1 39519dedec0cSmrg_ASEOF 39529dedec0cSmrgtest 0 = "$lt_write_fail" && chmod +x $1[]dnl 39539dedec0cSmrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 39546c321187Smrg 39559dedec0cSmrg# LT_OUTPUT 39569dedec0cSmrg# --------- 39579dedec0cSmrg# This macro allows early generation of the libtool script (before 39589dedec0cSmrg# AC_OUTPUT is called), incase it is used in configure for compilation 39599dedec0cSmrg# tests. 39609dedec0cSmrgAC_DEFUN([LT_OUTPUT], 39619dedec0cSmrg[: ${CONFIG_LT=./config.lt} 39629dedec0cSmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 39639dedec0cSmrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 39649dedec0cSmrg[# Run this file to recreate a libtool stub with the current configuration.]) 39656c321187Smrg 39669dedec0cSmrgcat >>"$CONFIG_LT" <<\_LTEOF 39679dedec0cSmrglt_cl_silent=false 39689dedec0cSmrgexec AS_MESSAGE_LOG_FD>>config.log 39690cc2eac3Smrg{ 39709dedec0cSmrg echo 39719dedec0cSmrg AS_BOX([Running $as_me.]) 39729dedec0cSmrg} >&AS_MESSAGE_LOG_FD 39736c321187Smrg 39749dedec0cSmrglt_cl_help="\ 39759dedec0cSmrg'$as_me' creates a local libtool stub from the current configuration, 39769dedec0cSmrgfor use in further configure time tests before the real libtool is 39779dedec0cSmrggenerated. 39786c321187Smrg 39799dedec0cSmrgUsage: $[0] [[OPTIONS]] 39806c321187Smrg 39819dedec0cSmrg -h, --help print this help, then exit 39829dedec0cSmrg -V, --version print version number, then exit 39839dedec0cSmrg -q, --quiet do not print progress messages 39849dedec0cSmrg -d, --debug don't remove temporary files 3985e120bd27Smrg 39869dedec0cSmrgReport bugs to <bug-libtool@gnu.org>." 39876c321187Smrg 39889dedec0cSmrglt_cl_version="\ 39899dedec0cSmrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 39909dedec0cSmrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 39919dedec0cSmrgconfigured by $[0], generated by m4_PACKAGE_STRING. 39926c321187Smrg 39939dedec0cSmrgCopyright (C) 2011 Free Software Foundation, Inc. 39949dedec0cSmrgThis config.lt script is free software; the Free Software Foundation 39959dedec0cSmrggives unlimited permision to copy, distribute and modify it." 39966c321187Smrg 39979dedec0cSmrgwhile test 0 != $[#] 39989dedec0cSmrgdo 39999dedec0cSmrg case $[1] in 40009dedec0cSmrg --version | --v* | -V ) 40019dedec0cSmrg echo "$lt_cl_version"; exit 0 ;; 40029dedec0cSmrg --help | --h* | -h ) 40039dedec0cSmrg echo "$lt_cl_help"; exit 0 ;; 40049dedec0cSmrg --debug | --d* | -d ) 40059dedec0cSmrg debug=: ;; 40069dedec0cSmrg --quiet | --q* | --silent | --s* | -q ) 40079dedec0cSmrg lt_cl_silent=: ;; 40086c321187Smrg 40099dedec0cSmrg -*) AC_MSG_ERROR([unrecognized option: $[1] 40109dedec0cSmrgTry '$[0] --help' for more information.]) ;; 40116c321187Smrg 40129dedec0cSmrg *) AC_MSG_ERROR([unrecognized argument: $[1] 40139dedec0cSmrgTry '$[0] --help' for more information.]) ;; 40149dedec0cSmrg esac 40159dedec0cSmrg shift 40169dedec0cSmrgdone 40176c321187Smrg 40189dedec0cSmrgif $lt_cl_silent; then 40199dedec0cSmrg exec AS_MESSAGE_FD>/dev/null 40209dedec0cSmrgfi 40219dedec0cSmrg_LTEOF 40226c321187Smrg 40239dedec0cSmrgcat >>"$CONFIG_LT" <<_LTEOF 40249dedec0cSmrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 40259dedec0cSmrg_LTEOF 40266c321187Smrg 40279dedec0cSmrgcat >>"$CONFIG_LT" <<\_LTEOF 40289dedec0cSmrgAC_MSG_NOTICE([creating $ofile]) 40299dedec0cSmrg_LT_OUTPUT_LIBTOOL_COMMANDS 40309dedec0cSmrgAS_EXIT(0) 40319dedec0cSmrg_LTEOF 40329dedec0cSmrgchmod +x "$CONFIG_LT" 40336c321187Smrg 40349dedec0cSmrg# configure is writing to config.log, but config.lt does its own redirection, 40359dedec0cSmrg# appending to config.log, which fails on DOS, as config.log is still kept 40369dedec0cSmrg# open by configure. Here we exec the FD to /dev/null, effectively closing 40379dedec0cSmrg# config.log, so it can be properly (re)opened and appended to by config.lt. 40389dedec0cSmrglt_cl_success=: 40399dedec0cSmrgtest yes = "$silent" && 40409dedec0cSmrg lt_config_lt_args="$lt_config_lt_args --quiet" 40419dedec0cSmrgexec AS_MESSAGE_LOG_FD>/dev/null 40429dedec0cSmrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 40439dedec0cSmrgexec AS_MESSAGE_LOG_FD>>config.log 40449dedec0cSmrg$lt_cl_success || AS_EXIT(1) 40459dedec0cSmrg])# LT_OUTPUT 40466c321187Smrg 40476c321187Smrg 40489dedec0cSmrg# _LT_CONFIG(TAG) 40499dedec0cSmrg# --------------- 40509dedec0cSmrg# If TAG is the built-in tag, create an initial libtool script with a 40519dedec0cSmrg# default configuration from the untagged config vars. Otherwise add code 40529dedec0cSmrg# to config.status for appending the configuration named by TAG from the 40539dedec0cSmrg# matching tagged config vars. 40549dedec0cSmrgm4_defun([_LT_CONFIG], 40559dedec0cSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 40569dedec0cSmrg_LT_CONFIG_SAVE_COMMANDS([ 40579dedec0cSmrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 40589dedec0cSmrg m4_if(_LT_TAG, [C], [ 40599dedec0cSmrg # See if we are running on zsh, and set the options that allow our 40609dedec0cSmrg # commands through without removal of \ escapes. 40619dedec0cSmrg if test -n "${ZSH_VERSION+set}"; then 40629dedec0cSmrg setopt NO_GLOB_SUBST 40639dedec0cSmrg fi 40640cc2eac3Smrg 40659dedec0cSmrg cfgfile=${ofile}T 40669dedec0cSmrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 40679dedec0cSmrg $RM "$cfgfile" 40680cc2eac3Smrg 40699dedec0cSmrg cat <<_LT_EOF >> "$cfgfile" 40709dedec0cSmrg#! $SHELL 40719dedec0cSmrg# Generated automatically by $as_me ($PACKAGE) $VERSION 40729dedec0cSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 40739dedec0cSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 40740cc2eac3Smrg 40759dedec0cSmrg# Provide generalized library-building support services. 40769dedec0cSmrg# Written by Gordon Matzigkeit, 1996 40770cc2eac3Smrg 40789dedec0cSmrg_LT_COPYING 40799dedec0cSmrg_LT_LIBTOOL_TAGS 40800cc2eac3Smrg 40819dedec0cSmrg# Configured defaults for sys_lib_dlsearch_path munging. 40829dedec0cSmrg: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} 40830cc2eac3Smrg 40849dedec0cSmrg# ### BEGIN LIBTOOL CONFIG 40859dedec0cSmrg_LT_LIBTOOL_CONFIG_VARS 40869dedec0cSmrg_LT_LIBTOOL_TAG_VARS 40879dedec0cSmrg# ### END LIBTOOL CONFIG 40880cc2eac3Smrg 40899dedec0cSmrg_LT_EOF 40900cc2eac3Smrg 40919dedec0cSmrg cat <<'_LT_EOF' >> "$cfgfile" 40920cc2eac3Smrg 40939dedec0cSmrg# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE 40940cc2eac3Smrg 40959dedec0cSmrg_LT_PREPARE_MUNGE_PATH_LIST 40969dedec0cSmrg_LT_PREPARE_CC_BASENAME 4097198e4c3cSmrg 40989dedec0cSmrg# ### END FUNCTIONS SHARED WITH CONFIGURE 40990cc2eac3Smrg 41009dedec0cSmrg_LT_EOF 41010cc2eac3Smrg 41029dedec0cSmrg case $host_os in 41039dedec0cSmrg aix3*) 41049dedec0cSmrg cat <<\_LT_EOF >> "$cfgfile" 41059dedec0cSmrg# AIX sometimes has problems with the GCC collect2 program. For some 41069dedec0cSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems 41079dedec0cSmrg# vanish in a puff of smoke. 41089dedec0cSmrgif test set != "${COLLECT_NAMES+set}"; then 41099dedec0cSmrg COLLECT_NAMES= 41109dedec0cSmrg export COLLECT_NAMES 41119dedec0cSmrgfi 41129dedec0cSmrg_LT_EOF 41139dedec0cSmrg ;; 41149dedec0cSmrg esac 41150cc2eac3Smrg 41169dedec0cSmrg _LT_PROG_LTMAIN 41170cc2eac3Smrg 41189dedec0cSmrg # We use sed instead of cat because bash on DJGPP gets confused if 41199dedec0cSmrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 41209dedec0cSmrg # text mode, it properly converts lines to CR/LF. This bash problem 41219dedec0cSmrg # is reportedly fixed, but why not run on old versions too? 41229dedec0cSmrg $SED '$q' "$ltmain" >> "$cfgfile" \ 41239dedec0cSmrg || (rm -f "$cfgfile"; exit 1) 41240cc2eac3Smrg 41259dedec0cSmrg mv -f "$cfgfile" "$ofile" || 41269dedec0cSmrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 41279dedec0cSmrg chmod +x "$ofile" 41289dedec0cSmrg], 41299dedec0cSmrg[cat <<_LT_EOF >> "$ofile" 41300cc2eac3Smrg 41319dedec0cSmrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 41329dedec0cSmrgdnl in a comment (ie after a #). 41339dedec0cSmrg# ### BEGIN LIBTOOL TAG CONFIG: $1 41349dedec0cSmrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 41359dedec0cSmrg# ### END LIBTOOL TAG CONFIG: $1 41369dedec0cSmrg_LT_EOF 41379dedec0cSmrg])dnl /m4_if 41389dedec0cSmrg], 41399dedec0cSmrg[m4_if([$1], [], [ 41409dedec0cSmrg PACKAGE='$PACKAGE' 41419dedec0cSmrg VERSION='$VERSION' 41429dedec0cSmrg RM='$RM' 41439dedec0cSmrg ofile='$ofile'], []) 41449dedec0cSmrg])dnl /_LT_CONFIG_SAVE_COMMANDS 41459dedec0cSmrg])# _LT_CONFIG 41460cc2eac3Smrg 41470cc2eac3Smrg 41489dedec0cSmrg# LT_SUPPORTED_TAG(TAG) 41499dedec0cSmrg# --------------------- 41509dedec0cSmrg# Trace this macro to discover what tags are supported by the libtool 41519dedec0cSmrg# --tag option, using: 41529dedec0cSmrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 41539dedec0cSmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 41540cc2eac3Smrg 41550cc2eac3Smrg 41569dedec0cSmrg# C support is built-in for now 41579dedec0cSmrgm4_define([_LT_LANG_C_enabled], []) 41589dedec0cSmrgm4_define([_LT_TAGS], []) 41590cc2eac3Smrg 41600cc2eac3Smrg 41619dedec0cSmrg# LT_LANG(LANG) 41629dedec0cSmrg# ------------- 41639dedec0cSmrg# Enable libtool support for the given language if not already enabled. 41649dedec0cSmrgAC_DEFUN([LT_LANG], 41659dedec0cSmrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 41669dedec0cSmrgm4_case([$1], 41679dedec0cSmrg [C], [_LT_LANG(C)], 41689dedec0cSmrg [C++], [_LT_LANG(CXX)], 41699dedec0cSmrg [Go], [_LT_LANG(GO)], 41709dedec0cSmrg [Java], [_LT_LANG(GCJ)], 41719dedec0cSmrg [Fortran 77], [_LT_LANG(F77)], 41729dedec0cSmrg [Fortran], [_LT_LANG(FC)], 41739dedec0cSmrg [Windows Resource], [_LT_LANG(RC)], 41749dedec0cSmrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 41759dedec0cSmrg [_LT_LANG($1)], 41769dedec0cSmrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 41779dedec0cSmrg])# LT_LANG 41780cc2eac3Smrg 41790cc2eac3Smrg 41809dedec0cSmrg# _LT_LANG(LANGNAME) 41819dedec0cSmrg# ------------------ 41829dedec0cSmrgm4_defun([_LT_LANG], 41839dedec0cSmrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 41849dedec0cSmrg [LT_SUPPORTED_TAG([$1])dnl 41859dedec0cSmrg m4_append([_LT_TAGS], [$1 ])dnl 41869dedec0cSmrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 41879dedec0cSmrg _LT_LANG_$1_CONFIG($1)])dnl 41889dedec0cSmrg])# _LT_LANG 41890cc2eac3Smrg 41900cc2eac3Smrg 41919dedec0cSmrgm4_ifndef([AC_PROG_GO], [ 41929dedec0cSmrg# NOTE: This macro has been submitted for inclusion into # 41939dedec0cSmrg# GNU Autoconf as AC_PROG_GO. When it is available in # 41949dedec0cSmrg# a released version of Autoconf we should remove this # 41959dedec0cSmrg# macro and use it instead. # 41969dedec0cSmrgm4_defun([AC_PROG_GO], 41979dedec0cSmrg[AC_LANG_PUSH(Go)dnl 41989dedec0cSmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 41999dedec0cSmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 42009dedec0cSmrg_AC_ARG_VAR_LDFLAGS()dnl 42019dedec0cSmrgAC_CHECK_TOOL(GOC, gccgo) 42029dedec0cSmrgif test -z "$GOC"; then 42039dedec0cSmrg if test -n "$ac_tool_prefix"; then 42049dedec0cSmrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 42059dedec0cSmrg fi 42060cc2eac3Smrgfi 42079dedec0cSmrgif test -z "$GOC"; then 42089dedec0cSmrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 42099dedec0cSmrgfi 42109dedec0cSmrg])#m4_defun 42119dedec0cSmrg])#m4_ifndef 42120cc2eac3Smrg 42130cc2eac3Smrg 42149dedec0cSmrg# _LT_LANG_DEFAULT_CONFIG 42159dedec0cSmrg# ----------------------- 42169dedec0cSmrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 42179dedec0cSmrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 42189dedec0cSmrg [LT_LANG(CXX)], 42199dedec0cSmrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 42200cc2eac3Smrg 42219dedec0cSmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 42229dedec0cSmrg [LT_LANG(F77)], 42239dedec0cSmrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 42240cc2eac3Smrg 42259dedec0cSmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 42269dedec0cSmrg [LT_LANG(FC)], 42279dedec0cSmrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 42280cc2eac3Smrg 42299dedec0cSmrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 42309dedec0cSmrgdnl pulling things in needlessly. 42319dedec0cSmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 42329dedec0cSmrg [LT_LANG(GCJ)], 42339dedec0cSmrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 42349dedec0cSmrg [LT_LANG(GCJ)], 42359dedec0cSmrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 42369dedec0cSmrg [LT_LANG(GCJ)], 42379dedec0cSmrg [m4_ifdef([AC_PROG_GCJ], 42389dedec0cSmrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 42399dedec0cSmrg m4_ifdef([A][M_PROG_GCJ], 42409dedec0cSmrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 42419dedec0cSmrg m4_ifdef([LT_PROG_GCJ], 42429dedec0cSmrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 42430cc2eac3Smrg 42449dedec0cSmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 42459dedec0cSmrg [LT_LANG(GO)], 42469dedec0cSmrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 42470cc2eac3Smrg 42489dedec0cSmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 42499dedec0cSmrg [LT_LANG(RC)], 42509dedec0cSmrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 42519dedec0cSmrg])# _LT_LANG_DEFAULT_CONFIG 42520cc2eac3Smrg 42539dedec0cSmrg# Obsolete macros: 42549dedec0cSmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 42559dedec0cSmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 42569dedec0cSmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 42579dedec0cSmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 42589dedec0cSmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 42599dedec0cSmrgdnl aclocal-1.4 backwards compatibility: 42609dedec0cSmrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 42619dedec0cSmrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 42629dedec0cSmrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 42639dedec0cSmrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 42649dedec0cSmrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 42650cc2eac3Smrg 42660cc2eac3Smrg 42679dedec0cSmrg# _LT_TAG_COMPILER 42689dedec0cSmrg# ---------------- 42699dedec0cSmrgm4_defun([_LT_TAG_COMPILER], 42709dedec0cSmrg[AC_REQUIRE([AC_PROG_CC])dnl 42710cc2eac3Smrg 42729dedec0cSmrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 42739dedec0cSmrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 42749dedec0cSmrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 42759dedec0cSmrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 42760cc2eac3Smrg 42779dedec0cSmrg# If no C compiler was specified, use CC. 42789dedec0cSmrgLTCC=${LTCC-"$CC"} 42790cc2eac3Smrg 42809dedec0cSmrg# If no C compiler flags were specified, use CFLAGS. 42819dedec0cSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 42820cc2eac3Smrg 42839dedec0cSmrg# Allow CC to be a program name with arguments. 42849dedec0cSmrgcompiler=$CC 42859dedec0cSmrg])# _LT_TAG_COMPILER 42860cc2eac3Smrg 42870cc2eac3Smrg 42889dedec0cSmrg# _LT_COMPILER_BOILERPLATE 42899dedec0cSmrg# ------------------------ 42909dedec0cSmrg# Check for compiler boilerplate output or warnings with 42919dedec0cSmrg# the simple compiler test code. 42929dedec0cSmrgm4_defun([_LT_COMPILER_BOILERPLATE], 42939dedec0cSmrg[m4_require([_LT_DECL_SED])dnl 42949dedec0cSmrgac_outfile=conftest.$ac_objext 42959dedec0cSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 42969dedec0cSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 42979dedec0cSmrg_lt_compiler_boilerplate=`cat conftest.err` 42989dedec0cSmrg$RM conftest* 42999dedec0cSmrg])# _LT_COMPILER_BOILERPLATE 43000cc2eac3Smrg 4301198e4c3cSmrg 43029dedec0cSmrg# _LT_LINKER_BOILERPLATE 43039dedec0cSmrg# ---------------------- 43049dedec0cSmrg# Check for linker boilerplate output or warnings with 43059dedec0cSmrg# the simple link test code. 43069dedec0cSmrgm4_defun([_LT_LINKER_BOILERPLATE], 43079dedec0cSmrg[m4_require([_LT_DECL_SED])dnl 43089dedec0cSmrgac_outfile=conftest.$ac_objext 43099dedec0cSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 43109dedec0cSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 43119dedec0cSmrg_lt_linker_boilerplate=`cat conftest.err` 43129dedec0cSmrg$RM -r conftest* 43139dedec0cSmrg])# _LT_LINKER_BOILERPLATE 43140cc2eac3Smrg 43159dedec0cSmrg# _LT_REQUIRED_DARWIN_CHECKS 43169dedec0cSmrg# ------------------------- 43179dedec0cSmrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 43189dedec0cSmrg case $host_os in 43199dedec0cSmrg rhapsody* | darwin*) 43209dedec0cSmrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 43219dedec0cSmrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 43229dedec0cSmrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 43239dedec0cSmrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 43249dedec0cSmrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 43259dedec0cSmrg _LT_DECL([], [DSYMUTIL], [1], 43269dedec0cSmrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 43279dedec0cSmrg _LT_DECL([], [NMEDIT], [1], 43289dedec0cSmrg [Tool to change global to local symbols on Mac OS X]) 43299dedec0cSmrg _LT_DECL([], [LIPO], [1], 43309dedec0cSmrg [Tool to manipulate fat objects and archives on Mac OS X]) 43319dedec0cSmrg _LT_DECL([], [OTOOL], [1], 43329dedec0cSmrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 43339dedec0cSmrg _LT_DECL([], [OTOOL64], [1], 43349dedec0cSmrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 43350cc2eac3Smrg 43369dedec0cSmrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 43379dedec0cSmrg [lt_cv_apple_cc_single_mod=no 43389dedec0cSmrg if test -z "$LT_MULTI_MODULE"; then 43399dedec0cSmrg # By default we will add the -single_module flag. You can override 43409dedec0cSmrg # by either setting the environment variable LT_MULTI_MODULE 43419dedec0cSmrg # non-empty at configure time, or by adding -multi_module to the 43429dedec0cSmrg # link flags. 43439dedec0cSmrg rm -rf libconftest.dylib* 43449dedec0cSmrg echo "int foo(void){return 1;}" > conftest.c 43459dedec0cSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 43469dedec0cSmrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 43479dedec0cSmrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 43489dedec0cSmrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 43499dedec0cSmrg _lt_result=$? 43509dedec0cSmrg # If there is a non-empty error log, and "single_module" 43519dedec0cSmrg # appears in it, assume the flag caused a linker warning 43529dedec0cSmrg if test -s conftest.err && $GREP single_module conftest.err; then 43539dedec0cSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 43549dedec0cSmrg # Otherwise, if the output was created with a 0 exit code from 43559dedec0cSmrg # the compiler, it worked. 43569dedec0cSmrg elif test -f libconftest.dylib && test 0 = "$_lt_result"; then 43579dedec0cSmrg lt_cv_apple_cc_single_mod=yes 43589dedec0cSmrg else 43599dedec0cSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 43609dedec0cSmrg fi 43619dedec0cSmrg rm -rf libconftest.dylib* 43629dedec0cSmrg rm -f conftest.* 43639dedec0cSmrg fi]) 43640cc2eac3Smrg 43659dedec0cSmrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 43669dedec0cSmrg [lt_cv_ld_exported_symbols_list], 43679dedec0cSmrg [lt_cv_ld_exported_symbols_list=no 43689dedec0cSmrg save_LDFLAGS=$LDFLAGS 43699dedec0cSmrg echo "_main" > conftest.sym 43709dedec0cSmrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 43719dedec0cSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 43729dedec0cSmrg [lt_cv_ld_exported_symbols_list=yes], 43739dedec0cSmrg [lt_cv_ld_exported_symbols_list=no]) 43749dedec0cSmrg LDFLAGS=$save_LDFLAGS 43759dedec0cSmrg ]) 43760cc2eac3Smrg 43779dedec0cSmrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 43789dedec0cSmrg [lt_cv_ld_force_load=no 43799dedec0cSmrg cat > conftest.c << _LT_EOF 43809dedec0cSmrgint forced_loaded() { return 2;} 43819dedec0cSmrg_LT_EOF 43829dedec0cSmrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 43839dedec0cSmrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 43849dedec0cSmrg echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 43859dedec0cSmrg $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 43869dedec0cSmrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 43879dedec0cSmrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 43889dedec0cSmrg cat > conftest.c << _LT_EOF 43899dedec0cSmrgint main() { return 0;} 43909dedec0cSmrg_LT_EOF 43919dedec0cSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 43929dedec0cSmrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 43939dedec0cSmrg _lt_result=$? 43949dedec0cSmrg if test -s conftest.err && $GREP force_load conftest.err; then 43959dedec0cSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 43969dedec0cSmrg elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then 43979dedec0cSmrg lt_cv_ld_force_load=yes 43980cc2eac3Smrg else 43999dedec0cSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 44000cc2eac3Smrg fi 44019dedec0cSmrg rm -f conftest.err libconftest.a conftest conftest.c 44029dedec0cSmrg rm -rf conftest.dSYM 44039dedec0cSmrg ]) 44049dedec0cSmrg case $host_os in 44059dedec0cSmrg rhapsody* | darwin1.[[012]]) 44069dedec0cSmrg _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; 44079dedec0cSmrg darwin1.*) 44089dedec0cSmrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 44099dedec0cSmrg darwin*) 44109dedec0cSmrg case $MACOSX_DEPLOYMENT_TARGET,$host in 44119dedec0cSmrg 10.[[012]],*|,*powerpc*-darwin[[5-8]]*) 44129dedec0cSmrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 44139dedec0cSmrg *) 44149dedec0cSmrg _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 44159dedec0cSmrg esac 44169dedec0cSmrg ;; 44179dedec0cSmrg esac 44189dedec0cSmrg if test yes = "$lt_cv_apple_cc_single_mod"; then 44199dedec0cSmrg _lt_dar_single_mod='$single_module' 44209dedec0cSmrg fi 44219dedec0cSmrg if test yes = "$lt_cv_ld_exported_symbols_list"; then 44229dedec0cSmrg _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' 44239dedec0cSmrg else 44249dedec0cSmrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' 44259dedec0cSmrg fi 44269dedec0cSmrg if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then 44279dedec0cSmrg _lt_dsymutil='~$DSYMUTIL $lib || :' 44289dedec0cSmrg else 44299dedec0cSmrg _lt_dsymutil= 44309dedec0cSmrg fi 44319dedec0cSmrg ;; 44329dedec0cSmrg esac 44339dedec0cSmrg]) 44340cc2eac3Smrg 44350cc2eac3Smrg 44369dedec0cSmrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 44379dedec0cSmrg# --------------------------------- 44389dedec0cSmrg# Checks for linker and compiler features on darwin 44399dedec0cSmrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 44409dedec0cSmrg[ 44419dedec0cSmrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 44429dedec0cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 44439dedec0cSmrg _LT_TAGVAR(hardcode_direct, $1)=no 44449dedec0cSmrg _LT_TAGVAR(hardcode_automatic, $1)=yes 44459dedec0cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 44469dedec0cSmrg if test yes = "$lt_cv_ld_force_load"; then 44479dedec0cSmrg _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\"`' 44489dedec0cSmrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 44499dedec0cSmrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 44509dedec0cSmrg else 44519dedec0cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 44529dedec0cSmrg fi 44539dedec0cSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 44549dedec0cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined 44559dedec0cSmrg case $cc_basename in 44569dedec0cSmrg ifort*|nagfor*) _lt_dar_can_shared=yes ;; 44579dedec0cSmrg *) _lt_dar_can_shared=$GCC ;; 44589dedec0cSmrg esac 44599dedec0cSmrg if test yes = "$_lt_dar_can_shared"; then 44609dedec0cSmrg output_verbose_link_cmd=func_echo_all 44619dedec0cSmrg _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" 44629dedec0cSmrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" 44639dedec0cSmrg _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" 44649dedec0cSmrg _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" 44659dedec0cSmrg m4_if([$1], [CXX], 44669dedec0cSmrg[ if test yes != "$lt_cv_apple_cc_single_mod"; then 44679dedec0cSmrg _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" 44689dedec0cSmrg _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" 44699dedec0cSmrg fi 44709dedec0cSmrg],[]) 44719dedec0cSmrg else 44729dedec0cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 44739dedec0cSmrg fi 44749dedec0cSmrg]) 44750cc2eac3Smrg 44769dedec0cSmrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 44779dedec0cSmrg# ---------------------------------- 44789dedec0cSmrg# Links a minimal program and checks the executable 44799dedec0cSmrg# for the system default hardcoded library path. In most cases, 44809dedec0cSmrg# this is /usr/lib:/lib, but when the MPI compilers are used 44819dedec0cSmrg# the location of the communication and MPI libs are included too. 44829dedec0cSmrg# If we don't find anything, use the default library path according 44839dedec0cSmrg# to the aix ld manual. 44849dedec0cSmrg# Store the results from the different compilers for each TAGNAME. 44859dedec0cSmrg# Allow to override them for all tags through lt_cv_aix_libpath. 44869dedec0cSmrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 44879dedec0cSmrg[m4_require([_LT_DECL_SED])dnl 44889dedec0cSmrgif test set = "${lt_cv_aix_libpath+set}"; then 44899dedec0cSmrg aix_libpath=$lt_cv_aix_libpath 44909dedec0cSmrgelse 44919dedec0cSmrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 44929dedec0cSmrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 44939dedec0cSmrg lt_aix_libpath_sed='[ 44949dedec0cSmrg /Import File Strings/,/^$/ { 44959dedec0cSmrg /^0/ { 44969dedec0cSmrg s/^0 *\([^ ]*\) *$/\1/ 44979dedec0cSmrg p 44989dedec0cSmrg } 44999dedec0cSmrg }]' 45009dedec0cSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 45019dedec0cSmrg # Check for a 64-bit object if we didn't find anything. 45029dedec0cSmrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 45039dedec0cSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 45049dedec0cSmrg fi],[]) 45059dedec0cSmrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 45069dedec0cSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib 45079dedec0cSmrg fi 45089dedec0cSmrg ]) 45099dedec0cSmrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 45109dedec0cSmrgfi 45119dedec0cSmrg])# _LT_SYS_MODULE_PATH_AIX 45120cc2eac3Smrg 45130cc2eac3Smrg 45149dedec0cSmrg# _LT_SHELL_INIT(ARG) 45159dedec0cSmrg# ------------------- 45169dedec0cSmrgm4_define([_LT_SHELL_INIT], 45179dedec0cSmrg[m4_divert_text([M4SH-INIT], [$1 45189dedec0cSmrg])])# _LT_SHELL_INIT 45190cc2eac3Smrg 45200cc2eac3Smrg 45210cc2eac3Smrg 45229dedec0cSmrg# _LT_PROG_ECHO_BACKSLASH 45239dedec0cSmrg# ----------------------- 45249dedec0cSmrg# Find how we can fake an echo command that does not interpret backslash. 45259dedec0cSmrg# In particular, with Autoconf 2.60 or later we add some code to the start 45269dedec0cSmrg# of the generated configure script that will find a shell with a builtin 45279dedec0cSmrg# printf (that we can use as an echo command). 45289dedec0cSmrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 45299dedec0cSmrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 45309dedec0cSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 45319dedec0cSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 45320cc2eac3Smrg 45339dedec0cSmrgAC_MSG_CHECKING([how to print strings]) 45349dedec0cSmrg# Test print first, because it will be a builtin if present. 45359dedec0cSmrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 45369dedec0cSmrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 45379dedec0cSmrg ECHO='print -r --' 45389dedec0cSmrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 45399dedec0cSmrg ECHO='printf %s\n' 45409dedec0cSmrgelse 45419dedec0cSmrg # Use this function as a fallback that always works. 45429dedec0cSmrg func_fallback_echo () 45439dedec0cSmrg { 45449dedec0cSmrg eval 'cat <<_LTECHO_EOF 45459dedec0cSmrg$[]1 45469dedec0cSmrg_LTECHO_EOF' 45479dedec0cSmrg } 45489dedec0cSmrg ECHO='func_fallback_echo' 45499dedec0cSmrgfi 45500cc2eac3Smrg 45519dedec0cSmrg# func_echo_all arg... 45529dedec0cSmrg# Invoke $ECHO with all args, space-separated. 45539dedec0cSmrgfunc_echo_all () 45549dedec0cSmrg{ 45559dedec0cSmrg $ECHO "$*" 45569dedec0cSmrg} 45570cc2eac3Smrg 45589dedec0cSmrgcase $ECHO in 45599dedec0cSmrg printf*) AC_MSG_RESULT([printf]) ;; 45609dedec0cSmrg print*) AC_MSG_RESULT([print -r]) ;; 45619dedec0cSmrg *) AC_MSG_RESULT([cat]) ;; 45629dedec0cSmrgesac 45630cc2eac3Smrg 45649dedec0cSmrgm4_ifdef([_AS_DETECT_SUGGESTED], 45659dedec0cSmrg[_AS_DETECT_SUGGESTED([ 45669dedec0cSmrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 45679dedec0cSmrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 45689dedec0cSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 45699dedec0cSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 45709dedec0cSmrg PATH=/empty FPATH=/empty; export PATH FPATH 45719dedec0cSmrg test "X`printf %s $ECHO`" = "X$ECHO" \ 45729dedec0cSmrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 45730cc2eac3Smrg 45749dedec0cSmrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 45759dedec0cSmrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 45769dedec0cSmrg])# _LT_PROG_ECHO_BACKSLASH 45770cc2eac3Smrg 45780cc2eac3Smrg 45799dedec0cSmrg# _LT_WITH_SYSROOT 45809dedec0cSmrg# ---------------- 45819dedec0cSmrgAC_DEFUN([_LT_WITH_SYSROOT], 45829dedec0cSmrg[m4_require([_LT_DECL_SED])dnl 45839dedec0cSmrgAC_MSG_CHECKING([for sysroot]) 45849dedec0cSmrgAC_ARG_WITH([sysroot], 45859dedec0cSmrg[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], 45869dedec0cSmrg [Search for dependent libraries within DIR (or the compiler's sysroot 45879dedec0cSmrg if not specified).])], 45889dedec0cSmrg[], [with_sysroot=no]) 45890cc2eac3Smrg 45909dedec0cSmrgdnl lt_sysroot will always be passed unquoted. We quote it here 45919dedec0cSmrgdnl in case the user passed a directory name. 45929dedec0cSmrglt_sysroot= 45939dedec0cSmrgcase $with_sysroot in #( 45949dedec0cSmrg yes) 45959dedec0cSmrg if test yes = "$GCC"; then 45969dedec0cSmrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 45979dedec0cSmrg fi 45989dedec0cSmrg ;; #( 45999dedec0cSmrg /*) 46009dedec0cSmrg lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` 46019dedec0cSmrg ;; #( 46029dedec0cSmrg no|'') 46039dedec0cSmrg ;; #( 46049dedec0cSmrg *) 46059dedec0cSmrg AC_MSG_RESULT([$with_sysroot]) 46069dedec0cSmrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 46079dedec0cSmrg ;; 46089dedec0cSmrgesac 46090cc2eac3Smrg 46109dedec0cSmrg AC_MSG_RESULT([${lt_sysroot:-no}]) 46119dedec0cSmrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 46129dedec0cSmrg[dependent libraries, and where our libraries should be installed.])]) 46130cc2eac3Smrg 46149dedec0cSmrg# _LT_ENABLE_LOCK 46159dedec0cSmrg# --------------- 46169dedec0cSmrgm4_defun([_LT_ENABLE_LOCK], 46179dedec0cSmrg[AC_ARG_ENABLE([libtool-lock], 46189dedec0cSmrg [AS_HELP_STRING([--disable-libtool-lock], 46199dedec0cSmrg [avoid locking (might break parallel builds)])]) 46209dedec0cSmrgtest no = "$enable_libtool_lock" || enable_libtool_lock=yes 46210cc2eac3Smrg 46229dedec0cSmrg# Some flags need to be propagated to the compiler or linker for good 46239dedec0cSmrg# libtool support. 46249dedec0cSmrgcase $host in 46259dedec0cSmrgia64-*-hpux*) 46269dedec0cSmrg # Find out what ABI is being produced by ac_compile, and set mode 46279dedec0cSmrg # options accordingly. 46289dedec0cSmrg echo 'int i;' > conftest.$ac_ext 46299dedec0cSmrg if AC_TRY_EVAL(ac_compile); then 46309dedec0cSmrg case `$FILECMD conftest.$ac_objext` in 46319dedec0cSmrg *ELF-32*) 46329dedec0cSmrg HPUX_IA64_MODE=32 46330cc2eac3Smrg ;; 46349dedec0cSmrg *ELF-64*) 46359dedec0cSmrg HPUX_IA64_MODE=64 46360cc2eac3Smrg ;; 46379dedec0cSmrg esac 46389dedec0cSmrg fi 46399dedec0cSmrg rm -rf conftest* 46409dedec0cSmrg ;; 46419dedec0cSmrg*-*-irix6*) 46429dedec0cSmrg # Find out what ABI is being produced by ac_compile, and set linker 46439dedec0cSmrg # options accordingly. 46449dedec0cSmrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 46459dedec0cSmrg if AC_TRY_EVAL(ac_compile); then 46469dedec0cSmrg if test yes = "$lt_cv_prog_gnu_ld"; then 46479dedec0cSmrg case `$FILECMD conftest.$ac_objext` in 46489dedec0cSmrg *32-bit*) 46499dedec0cSmrg LD="${LD-ld} -melf32bsmip" 46500cc2eac3Smrg ;; 46519dedec0cSmrg *N32*) 46529dedec0cSmrg LD="${LD-ld} -melf32bmipn32" 46530cc2eac3Smrg ;; 46549dedec0cSmrg *64-bit*) 46559dedec0cSmrg LD="${LD-ld} -melf64bmip" 46569dedec0cSmrg ;; 46579dedec0cSmrg esac 46589dedec0cSmrg else 46599dedec0cSmrg case `$FILECMD conftest.$ac_objext` in 46609dedec0cSmrg *32-bit*) 46619dedec0cSmrg LD="${LD-ld} -32" 46620cc2eac3Smrg ;; 46639dedec0cSmrg *N32*) 46649dedec0cSmrg LD="${LD-ld} -n32" 46650cc2eac3Smrg ;; 46669dedec0cSmrg *64-bit*) 46679dedec0cSmrg LD="${LD-ld} -64" 46680cc2eac3Smrg ;; 46699dedec0cSmrg esac 46709dedec0cSmrg fi 46719dedec0cSmrg fi 46729dedec0cSmrg rm -rf conftest* 46739dedec0cSmrg ;; 46740cc2eac3Smrg 46759dedec0cSmrgmips64*-*linux*) 46769dedec0cSmrg # Find out what ABI is being produced by ac_compile, and set linker 46779dedec0cSmrg # options accordingly. 46789dedec0cSmrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 46799dedec0cSmrg if AC_TRY_EVAL(ac_compile); then 46809dedec0cSmrg emul=elf 46819dedec0cSmrg case `$FILECMD conftest.$ac_objext` in 46829dedec0cSmrg *32-bit*) 46839dedec0cSmrg emul="${emul}32" 46849dedec0cSmrg ;; 46859dedec0cSmrg *64-bit*) 46869dedec0cSmrg emul="${emul}64" 46879dedec0cSmrg ;; 46889dedec0cSmrg esac 46899dedec0cSmrg case `$FILECMD conftest.$ac_objext` in 46909dedec0cSmrg *MSB*) 46919dedec0cSmrg emul="${emul}btsmip" 46929dedec0cSmrg ;; 46939dedec0cSmrg *LSB*) 46949dedec0cSmrg emul="${emul}ltsmip" 46959dedec0cSmrg ;; 46969dedec0cSmrg esac 46979dedec0cSmrg case `$FILECMD conftest.$ac_objext` in 46989dedec0cSmrg *N32*) 46999dedec0cSmrg emul="${emul}n32" 47009dedec0cSmrg ;; 47019dedec0cSmrg esac 47029dedec0cSmrg LD="${LD-ld} -m $emul" 47039dedec0cSmrg fi 47049dedec0cSmrg rm -rf conftest* 47059dedec0cSmrg ;; 47060cc2eac3Smrg 47079dedec0cSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 47089dedec0cSmrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 47099dedec0cSmrg # Find out what ABI is being produced by ac_compile, and set linker 47109dedec0cSmrg # options accordingly. Note that the listed cases only cover the 47119dedec0cSmrg # situations where additional linker options are needed (such as when 47129dedec0cSmrg # doing 32-bit compilation for a host where ld defaults to 64-bit, or 47139dedec0cSmrg # vice versa); the common cases where no linker options are needed do 47149dedec0cSmrg # not appear in the list. 47159dedec0cSmrg echo 'int i;' > conftest.$ac_ext 47169dedec0cSmrg if AC_TRY_EVAL(ac_compile); then 47179dedec0cSmrg case `$FILECMD conftest.o` in 47189dedec0cSmrg *32-bit*) 47199dedec0cSmrg case $host in 47209dedec0cSmrg x86_64-*kfreebsd*-gnu) 47219dedec0cSmrg LD="${LD-ld} -m elf_i386_fbsd" 47229dedec0cSmrg ;; 47239dedec0cSmrg x86_64-*linux*) 47249dedec0cSmrg case `$FILECMD conftest.o` in 47259dedec0cSmrg *x86-64*) 47269dedec0cSmrg LD="${LD-ld} -m elf32_x86_64" 47279dedec0cSmrg ;; 47289dedec0cSmrg *) 47299dedec0cSmrg LD="${LD-ld} -m elf_i386" 47309dedec0cSmrg ;; 47319dedec0cSmrg esac 47329dedec0cSmrg ;; 47339dedec0cSmrg powerpc64le-*linux*) 47349dedec0cSmrg LD="${LD-ld} -m elf32lppclinux" 47359dedec0cSmrg ;; 47369dedec0cSmrg powerpc64-*linux*) 47379dedec0cSmrg LD="${LD-ld} -m elf32ppclinux" 47389dedec0cSmrg ;; 47399dedec0cSmrg s390x-*linux*) 47409dedec0cSmrg LD="${LD-ld} -m elf_s390" 47419dedec0cSmrg ;; 47429dedec0cSmrg sparc64-*linux*) 47439dedec0cSmrg LD="${LD-ld} -m elf32_sparc" 47449dedec0cSmrg ;; 47459dedec0cSmrg esac 47469dedec0cSmrg ;; 47479dedec0cSmrg *64-bit*) 47489dedec0cSmrg case $host in 47499dedec0cSmrg x86_64-*kfreebsd*-gnu) 47509dedec0cSmrg LD="${LD-ld} -m elf_x86_64_fbsd" 47519dedec0cSmrg ;; 47529dedec0cSmrg x86_64-*linux*) 47539dedec0cSmrg LD="${LD-ld} -m elf_x86_64" 47549dedec0cSmrg ;; 47559dedec0cSmrg powerpcle-*linux*) 47569dedec0cSmrg LD="${LD-ld} -m elf64lppc" 47579dedec0cSmrg ;; 47589dedec0cSmrg powerpc-*linux*) 47599dedec0cSmrg LD="${LD-ld} -m elf64ppc" 47609dedec0cSmrg ;; 47619dedec0cSmrg s390*-*linux*|s390*-*tpf*) 47629dedec0cSmrg LD="${LD-ld} -m elf64_s390" 47639dedec0cSmrg ;; 47649dedec0cSmrg sparc*-*linux*) 47659dedec0cSmrg LD="${LD-ld} -m elf64_sparc" 47669dedec0cSmrg ;; 47679dedec0cSmrg esac 47689dedec0cSmrg ;; 47699dedec0cSmrg esac 47709dedec0cSmrg fi 47719dedec0cSmrg rm -rf conftest* 47729dedec0cSmrg ;; 47730cc2eac3Smrg 47749dedec0cSmrg*-*-sco3.2v5*) 47759dedec0cSmrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 47769dedec0cSmrg SAVE_CFLAGS=$CFLAGS 47779dedec0cSmrg CFLAGS="$CFLAGS -belf" 47789dedec0cSmrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 47799dedec0cSmrg [AC_LANG_PUSH(C) 47809dedec0cSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 47819dedec0cSmrg AC_LANG_POP]) 47829dedec0cSmrg if test yes != "$lt_cv_cc_needs_belf"; then 47839dedec0cSmrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 47849dedec0cSmrg CFLAGS=$SAVE_CFLAGS 47859dedec0cSmrg fi 47869dedec0cSmrg ;; 47879dedec0cSmrg*-*solaris*) 47889dedec0cSmrg # Find out what ABI is being produced by ac_compile, and set linker 47899dedec0cSmrg # options accordingly. 47909dedec0cSmrg echo 'int i;' > conftest.$ac_ext 47919dedec0cSmrg if AC_TRY_EVAL(ac_compile); then 47929dedec0cSmrg case `$FILECMD conftest.o` in 47939dedec0cSmrg *64-bit*) 47949dedec0cSmrg case $lt_cv_prog_gnu_ld in 47959dedec0cSmrg yes*) 47969dedec0cSmrg case $host in 47979dedec0cSmrg i?86-*-solaris*|x86_64-*-solaris*) 47989dedec0cSmrg LD="${LD-ld} -m elf_x86_64" 47999dedec0cSmrg ;; 48009dedec0cSmrg sparc*-*-solaris*) 48019dedec0cSmrg LD="${LD-ld} -m elf64_sparc" 48029dedec0cSmrg ;; 48039dedec0cSmrg esac 48049dedec0cSmrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 48059dedec0cSmrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 48069dedec0cSmrg LD=${LD-ld}_sol2 48079dedec0cSmrg fi 48089dedec0cSmrg ;; 48099dedec0cSmrg *) 48109dedec0cSmrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 48119dedec0cSmrg LD="${LD-ld} -64" 48129dedec0cSmrg fi 4813198e4c3cSmrg ;; 4814198e4c3cSmrg esac 4815198e4c3cSmrg ;; 48169dedec0cSmrg esac 48179dedec0cSmrg fi 48189dedec0cSmrg rm -rf conftest* 48199dedec0cSmrg ;; 48209dedec0cSmrgesac 4821198e4c3cSmrg 48229dedec0cSmrgneed_locks=$enable_libtool_lock 48239dedec0cSmrg])# _LT_ENABLE_LOCK 48240cc2eac3Smrg 48250cc2eac3Smrg 48269dedec0cSmrg# _LT_PROG_AR 48279dedec0cSmrg# ----------- 48289dedec0cSmrgm4_defun([_LT_PROG_AR], 48299dedec0cSmrg[AC_CHECK_TOOLS(AR, [ar], false) 48309dedec0cSmrg: ${AR=ar} 48319dedec0cSmrg_LT_DECL([], [AR], [1], [The archiver]) 48320cc2eac3Smrg 48339dedec0cSmrg# Use ARFLAGS variable as AR's operation code to sync the variable naming with 48349dedec0cSmrg# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have 48359dedec0cSmrg# higher priority because thats what people were doing historically (setting 48369dedec0cSmrg# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS 48379dedec0cSmrg# variable obsoleted/removed. 48380cc2eac3Smrg 48399dedec0cSmrgtest ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} 48409dedec0cSmrglt_ar_flags=$AR_FLAGS 48419dedec0cSmrg_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)]) 48420cc2eac3Smrg 48439dedec0cSmrg# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override 48449dedec0cSmrg# by AR_FLAGS because that was never working and AR_FLAGS is about to die. 48459dedec0cSmrg_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}], 48469dedec0cSmrg [Flags to create an archive]) 48470cc2eac3Smrg 48489dedec0cSmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 48499dedec0cSmrg [lt_cv_ar_at_file=no 48509dedec0cSmrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 48519dedec0cSmrg [echo conftest.$ac_objext > conftest.lst 48529dedec0cSmrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 48539dedec0cSmrg AC_TRY_EVAL([lt_ar_try]) 48549dedec0cSmrg if test 0 -eq "$ac_status"; then 48559dedec0cSmrg # Ensure the archiver fails upon bogus file names. 48569dedec0cSmrg rm -f conftest.$ac_objext libconftest.a 48579dedec0cSmrg AC_TRY_EVAL([lt_ar_try]) 48589dedec0cSmrg if test 0 -ne "$ac_status"; then 48599dedec0cSmrg lt_cv_ar_at_file=@ 48609dedec0cSmrg fi 48610cc2eac3Smrg fi 48629dedec0cSmrg rm -f conftest.* libconftest.a 48639dedec0cSmrg ]) 48649dedec0cSmrg ]) 48650cc2eac3Smrg 48669dedec0cSmrgif test no = "$lt_cv_ar_at_file"; then 48679dedec0cSmrg archiver_list_spec= 48689dedec0cSmrgelse 48699dedec0cSmrg archiver_list_spec=$lt_cv_ar_at_file 48709dedec0cSmrgfi 48719dedec0cSmrg_LT_DECL([], [archiver_list_spec], [1], 48729dedec0cSmrg [How to feed a file listing to the archiver]) 48739dedec0cSmrg])# _LT_PROG_AR 48746c321187Smrg 48756c321187Smrg 48769dedec0cSmrg# _LT_CMD_OLD_ARCHIVE 48779dedec0cSmrg# ------------------- 48789dedec0cSmrgm4_defun([_LT_CMD_OLD_ARCHIVE], 48799dedec0cSmrg[_LT_PROG_AR 48806c321187Smrg 48819dedec0cSmrgAC_CHECK_TOOL(STRIP, strip, :) 48829dedec0cSmrgtest -z "$STRIP" && STRIP=: 48839dedec0cSmrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 48840cc2eac3Smrg 48859dedec0cSmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 48869dedec0cSmrgtest -z "$RANLIB" && RANLIB=: 48879dedec0cSmrg_LT_DECL([], [RANLIB], [1], 48889dedec0cSmrg [Commands used to install an old-style archive]) 48896c321187Smrg 48909dedec0cSmrg# Determine commands to create old-style static archives. 48919dedec0cSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 48929dedec0cSmrgold_postinstall_cmds='chmod 644 $oldlib' 48939dedec0cSmrgold_postuninstall_cmds= 48940cc2eac3Smrg 48959dedec0cSmrgif test -n "$RANLIB"; then 48969dedec0cSmrg case $host_os in 48979dedec0cSmrg bitrig* | openbsd*) 48989dedec0cSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 48999dedec0cSmrg ;; 49009dedec0cSmrg *) 49019dedec0cSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 49029dedec0cSmrg ;; 49039dedec0cSmrg esac 49049dedec0cSmrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 49059dedec0cSmrgfi 49066c321187Smrg 49079dedec0cSmrgcase $host_os in 49089dedec0cSmrg darwin*) 49099dedec0cSmrg lock_old_archive_extraction=yes ;; 49109dedec0cSmrg *) 49119dedec0cSmrg lock_old_archive_extraction=no ;; 49129dedec0cSmrgesac 49139dedec0cSmrg_LT_DECL([], [old_postinstall_cmds], [2]) 49149dedec0cSmrg_LT_DECL([], [old_postuninstall_cmds], [2]) 49159dedec0cSmrg_LT_TAGDECL([], [old_archive_cmds], [2], 49169dedec0cSmrg [Commands used to build an old-style archive]) 49179dedec0cSmrg_LT_DECL([], [lock_old_archive_extraction], [0], 49189dedec0cSmrg [Whether to use a lock for old archive extraction]) 49199dedec0cSmrg])# _LT_CMD_OLD_ARCHIVE 49200cc2eac3Smrg 49210cc2eac3Smrg 49229dedec0cSmrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 49239dedec0cSmrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 49249dedec0cSmrg# ---------------------------------------------------------------- 49259dedec0cSmrg# Check whether the given compiler option works 49269dedec0cSmrgAC_DEFUN([_LT_COMPILER_OPTION], 49279dedec0cSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 49289dedec0cSmrgm4_require([_LT_DECL_SED])dnl 49299dedec0cSmrgAC_CACHE_CHECK([$1], [$2], 49309dedec0cSmrg [$2=no 49319dedec0cSmrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 49329dedec0cSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 49339dedec0cSmrg lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment 49349dedec0cSmrg # Insert the option either (1) after the last *FLAGS variable, or 49359dedec0cSmrg # (2) before a word containing "conftest.", or (3) at the end. 49369dedec0cSmrg # Note that $ac_compile itself does not contain backslashes and begins 49379dedec0cSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 49389dedec0cSmrg # The option is referenced via a variable to avoid confusing sed. 49399dedec0cSmrg lt_compile=`echo "$ac_compile" | $SED \ 49409dedec0cSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 49419dedec0cSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 49429dedec0cSmrg -e 's:$: $lt_compiler_flag:'` 49439dedec0cSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 49449dedec0cSmrg (eval "$lt_compile" 2>conftest.err) 49459dedec0cSmrg ac_status=$? 49469dedec0cSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 49479dedec0cSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 49489dedec0cSmrg if (exit $ac_status) && test -s "$ac_outfile"; then 49499dedec0cSmrg # The compiler can only warn and ignore the option if not recognized 49509dedec0cSmrg # So say no if there are warnings other than the usual output. 49519dedec0cSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 49529dedec0cSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 49539dedec0cSmrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 49549dedec0cSmrg $2=yes 49559dedec0cSmrg fi 49569dedec0cSmrg fi 49579dedec0cSmrg $RM conftest* 49580cc2eac3Smrg]) 4959e120bd27Smrg 49609dedec0cSmrgif test yes = "[$]$2"; then 49619dedec0cSmrg m4_if([$5], , :, [$5]) 49629dedec0cSmrgelse 49639dedec0cSmrg m4_if([$6], , :, [$6]) 49649dedec0cSmrgfi 49659dedec0cSmrg])# _LT_COMPILER_OPTION 49660cc2eac3Smrg 49679dedec0cSmrg# Old name: 49689dedec0cSmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 49699dedec0cSmrgdnl aclocal-1.4 backwards compatibility: 49709dedec0cSmrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 49710cc2eac3Smrg 49720cc2eac3Smrg 49739dedec0cSmrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 49749dedec0cSmrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 49759dedec0cSmrg# ---------------------------------------------------- 49769dedec0cSmrg# Check whether the given linker option works 49779dedec0cSmrgAC_DEFUN([_LT_LINKER_OPTION], 49789dedec0cSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 49799dedec0cSmrgm4_require([_LT_DECL_SED])dnl 49809dedec0cSmrgAC_CACHE_CHECK([$1], [$2], 49819dedec0cSmrg [$2=no 49829dedec0cSmrg save_LDFLAGS=$LDFLAGS 49839dedec0cSmrg LDFLAGS="$LDFLAGS $3" 49849dedec0cSmrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 49859dedec0cSmrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 49869dedec0cSmrg # The linker can only warn and ignore the option if not recognized 49879dedec0cSmrg # So say no if there are warnings 49889dedec0cSmrg if test -s conftest.err; then 49899dedec0cSmrg # Append any errors to the config.log. 49909dedec0cSmrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 49919dedec0cSmrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 49929dedec0cSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 49939dedec0cSmrg if diff conftest.exp conftest.er2 >/dev/null; then 49949dedec0cSmrg $2=yes 49959dedec0cSmrg fi 49969dedec0cSmrg else 49979dedec0cSmrg $2=yes 49989dedec0cSmrg fi 49999dedec0cSmrg fi 50009dedec0cSmrg $RM -r conftest* 50019dedec0cSmrg LDFLAGS=$save_LDFLAGS 50029dedec0cSmrg]) 50036c321187Smrg 50049dedec0cSmrgif test yes = "[$]$2"; then 50059dedec0cSmrg m4_if([$4], , :, [$4]) 50069dedec0cSmrgelse 50079dedec0cSmrg m4_if([$5], , :, [$5]) 50089dedec0cSmrgfi 50099dedec0cSmrg])# _LT_LINKER_OPTION 5010e120bd27Smrg 50119dedec0cSmrg# Old name: 50129dedec0cSmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 50139dedec0cSmrgdnl aclocal-1.4 backwards compatibility: 50149dedec0cSmrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 5015e120bd27Smrg 5016e120bd27Smrg 50179dedec0cSmrg# LT_CMD_MAX_LEN 50189dedec0cSmrg#--------------- 50199dedec0cSmrgAC_DEFUN([LT_CMD_MAX_LEN], 50209dedec0cSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 50219dedec0cSmrg# find the maximum length of command line arguments 50229dedec0cSmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 50239dedec0cSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 50249dedec0cSmrg i=0 50259dedec0cSmrg teststring=ABCD 5026e120bd27Smrg 50279dedec0cSmrg case $build_os in 50289dedec0cSmrg msdosdjgpp*) 50299dedec0cSmrg # On DJGPP, this test can blow up pretty badly due to problems in libc 50309dedec0cSmrg # (any single argument exceeding 2000 bytes causes a buffer overrun 50319dedec0cSmrg # during glob expansion). Even if it were fixed, the result of this 50329dedec0cSmrg # check would be larger than it should be. 50339dedec0cSmrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 50349dedec0cSmrg ;; 50356c321187Smrg 50369dedec0cSmrg gnu*) 50379dedec0cSmrg # Under GNU Hurd, this test is not required because there is 50389dedec0cSmrg # no limit to the length of command line arguments. 50399dedec0cSmrg # Libtool will interpret -1 as no limit whatsoever 50409dedec0cSmrg lt_cv_sys_max_cmd_len=-1; 50419dedec0cSmrg ;; 50426c321187Smrg 50439dedec0cSmrg cygwin* | mingw* | cegcc*) 50449dedec0cSmrg # On Win9x/ME, this test blows up -- it succeeds, but takes 50459dedec0cSmrg # about 5 minutes as the teststring grows exponentially. 50469dedec0cSmrg # Worse, since 9x/ME are not pre-emptively multitasking, 50479dedec0cSmrg # you end up with a "frozen" computer, even though with patience 50489dedec0cSmrg # the test eventually succeeds (with a max line length of 256k). 50499dedec0cSmrg # Instead, let's just punt: use the minimum linelength reported by 50509dedec0cSmrg # all of the supported platforms: 8192 (on NT/2K/XP). 50519dedec0cSmrg lt_cv_sys_max_cmd_len=8192; 50529dedec0cSmrg ;; 50536c321187Smrg 50549dedec0cSmrg mint*) 50559dedec0cSmrg # On MiNT this can take a long time and run out of memory. 50569dedec0cSmrg lt_cv_sys_max_cmd_len=8192; 50579dedec0cSmrg ;; 50580cc2eac3Smrg 50599dedec0cSmrg amigaos*) 50609dedec0cSmrg # On AmigaOS with pdksh, this test takes hours, literally. 50619dedec0cSmrg # So we just punt and use a minimum line length of 8192. 50629dedec0cSmrg lt_cv_sys_max_cmd_len=8192; 50639dedec0cSmrg ;; 50640cc2eac3Smrg 50659dedec0cSmrg bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) 50669dedec0cSmrg # This has been around since 386BSD, at least. Likely further. 50679dedec0cSmrg if test -x /sbin/sysctl; then 50689dedec0cSmrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 50699dedec0cSmrg elif test -x /usr/sbin/sysctl; then 50709dedec0cSmrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 50719dedec0cSmrg else 50729dedec0cSmrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 50730cc2eac3Smrg fi 50749dedec0cSmrg # And add a safety zone 50759dedec0cSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 50769dedec0cSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 50770cc2eac3Smrg ;; 50786c321187Smrg 50799dedec0cSmrg interix*) 50809dedec0cSmrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 50819dedec0cSmrg lt_cv_sys_max_cmd_len=196608 50829dedec0cSmrg ;; 50839dedec0cSmrg 50849dedec0cSmrg os2*) 50859dedec0cSmrg # The test takes a long time on OS/2. 50869dedec0cSmrg lt_cv_sys_max_cmd_len=8192 50879dedec0cSmrg ;; 50889dedec0cSmrg 50899dedec0cSmrg osf*) 50909dedec0cSmrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 50919dedec0cSmrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 50929dedec0cSmrg # nice to cause kernel panics so lets avoid the loop below. 50939dedec0cSmrg # First set a reasonable default. 50949dedec0cSmrg lt_cv_sys_max_cmd_len=16384 50959dedec0cSmrg # 50969dedec0cSmrg if test -x /sbin/sysconfig; then 50979dedec0cSmrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 50989dedec0cSmrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 5099198e4c3cSmrg esac 51000cc2eac3Smrg fi 51010cc2eac3Smrg ;; 51029dedec0cSmrg sco3.2v5*) 51039dedec0cSmrg lt_cv_sys_max_cmd_len=102400 51049dedec0cSmrg ;; 51059dedec0cSmrg sysv5* | sco5v6* | sysv4.2uw2*) 51069dedec0cSmrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 51079dedec0cSmrg if test -n "$kargmax"; then 51089dedec0cSmrg lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[ ]]//'` 51099dedec0cSmrg else 51109dedec0cSmrg lt_cv_sys_max_cmd_len=32768 51119dedec0cSmrg fi 51129dedec0cSmrg ;; 51139dedec0cSmrg *) 51149dedec0cSmrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 51159dedec0cSmrg if test -n "$lt_cv_sys_max_cmd_len" && \ 51169dedec0cSmrg test undefined != "$lt_cv_sys_max_cmd_len"; then 51179dedec0cSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 51189dedec0cSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 51199dedec0cSmrg else 51209dedec0cSmrg # Make teststring a little bigger before we do anything with it. 51219dedec0cSmrg # a 1K string should be a reasonable start. 51229dedec0cSmrg for i in 1 2 3 4 5 6 7 8; do 51239dedec0cSmrg teststring=$teststring$teststring 51249dedec0cSmrg done 51259dedec0cSmrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 51269dedec0cSmrg # If test is not a shell built-in, we'll probably end up computing a 51279dedec0cSmrg # maximum length that is only half of the actual maximum length, but 51289dedec0cSmrg # we can't tell. 51299dedec0cSmrg while { test X`env echo "$teststring$teststring" 2>/dev/null` \ 51309dedec0cSmrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 51319dedec0cSmrg test 17 != "$i" # 1/2 MB should be enough 51329dedec0cSmrg do 51339dedec0cSmrg i=`expr $i + 1` 51349dedec0cSmrg teststring=$teststring$teststring 51359dedec0cSmrg done 51369dedec0cSmrg # Only check the string length outside the loop. 51379dedec0cSmrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 51389dedec0cSmrg teststring= 51399dedec0cSmrg # Add a significant safety factor because C++ compilers can tack on 51409dedec0cSmrg # massive amounts of additional arguments before passing them to the 51419dedec0cSmrg # linker. It appears as though 1/2 is a usable value. 51429dedec0cSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 51439dedec0cSmrg fi 51449dedec0cSmrg ;; 51450cc2eac3Smrg esac 51469dedec0cSmrg]) 51479dedec0cSmrgif test -n "$lt_cv_sys_max_cmd_len"; then 51489dedec0cSmrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 51490cc2eac3Smrgelse 51509dedec0cSmrg AC_MSG_RESULT(none) 51510cc2eac3Smrgfi 51529dedec0cSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len 51539dedec0cSmrg_LT_DECL([], [max_cmd_len], [0], 51549dedec0cSmrg [What is the maximum length of a command?]) 51559dedec0cSmrg])# LT_CMD_MAX_LEN 51566c321187Smrg 51579dedec0cSmrg# Old name: 51589dedec0cSmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 51599dedec0cSmrgdnl aclocal-1.4 backwards compatibility: 51609dedec0cSmrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 51616c321187Smrg 51626c321187Smrg 51639dedec0cSmrg# _LT_HEADER_DLFCN 51649dedec0cSmrg# ---------------- 51659dedec0cSmrgm4_defun([_LT_HEADER_DLFCN], 51669dedec0cSmrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 51679dedec0cSmrg])# _LT_HEADER_DLFCN 51686c321187Smrg 516993493779Smrg 51709dedec0cSmrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 51719dedec0cSmrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 51729dedec0cSmrg# ---------------------------------------------------------------- 51739dedec0cSmrgm4_defun([_LT_TRY_DLOPEN_SELF], 51749dedec0cSmrg[m4_require([_LT_HEADER_DLFCN])dnl 51759dedec0cSmrgif test yes = "$cross_compiling"; then : 51769dedec0cSmrg [$4] 51779dedec0cSmrgelse 51789dedec0cSmrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 51799dedec0cSmrg lt_status=$lt_dlunknown 51809dedec0cSmrg cat > conftest.$ac_ext <<_LT_EOF 51819dedec0cSmrg[#line $LINENO "configure" 51829dedec0cSmrg#include "confdefs.h" 51836c321187Smrg 51849dedec0cSmrg#if HAVE_DLFCN_H 51859dedec0cSmrg#include <dlfcn.h> 51869dedec0cSmrg#endif 518793493779Smrg 51889dedec0cSmrg#include <stdio.h> 51896c321187Smrg 51909dedec0cSmrg#ifdef RTLD_GLOBAL 51919dedec0cSmrg# define LT_DLGLOBAL RTLD_GLOBAL 51929dedec0cSmrg#else 51939dedec0cSmrg# ifdef DL_GLOBAL 51949dedec0cSmrg# define LT_DLGLOBAL DL_GLOBAL 51959dedec0cSmrg# else 51969dedec0cSmrg# define LT_DLGLOBAL 0 51979dedec0cSmrg# endif 51989dedec0cSmrg#endif 51996c321187Smrg 52009dedec0cSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 52019dedec0cSmrg find out it does not work in some platform. */ 52029dedec0cSmrg#ifndef LT_DLLAZY_OR_NOW 52039dedec0cSmrg# ifdef RTLD_LAZY 52049dedec0cSmrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 52059dedec0cSmrg# else 52069dedec0cSmrg# ifdef DL_LAZY 52079dedec0cSmrg# define LT_DLLAZY_OR_NOW DL_LAZY 52089dedec0cSmrg# else 52099dedec0cSmrg# ifdef RTLD_NOW 52109dedec0cSmrg# define LT_DLLAZY_OR_NOW RTLD_NOW 52119dedec0cSmrg# else 52129dedec0cSmrg# ifdef DL_NOW 52139dedec0cSmrg# define LT_DLLAZY_OR_NOW DL_NOW 52149dedec0cSmrg# else 52159dedec0cSmrg# define LT_DLLAZY_OR_NOW 0 52169dedec0cSmrg# endif 52179dedec0cSmrg# endif 52189dedec0cSmrg# endif 52199dedec0cSmrg# endif 52209dedec0cSmrg#endif 52216c321187Smrg 52229dedec0cSmrg/* When -fvisibility=hidden is used, assume the code has been annotated 52239dedec0cSmrg correspondingly for the symbols needed. */ 52249dedec0cSmrg#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 52259dedec0cSmrgint fnord () __attribute__((visibility("default"))); 52269dedec0cSmrg#endif 52270cc2eac3Smrg 52289dedec0cSmrgint fnord () { return 42; } 52299dedec0cSmrgint main () 52309dedec0cSmrg{ 52319dedec0cSmrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 52329dedec0cSmrg int status = $lt_dlunknown; 52330cc2eac3Smrg 52349dedec0cSmrg if (self) 52359dedec0cSmrg { 52369dedec0cSmrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 52370cc2eac3Smrg else 52389dedec0cSmrg { 52399dedec0cSmrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 52409dedec0cSmrg else puts (dlerror ()); 52419dedec0cSmrg } 52429dedec0cSmrg /* dlclose (self); */ 52439dedec0cSmrg } 52449dedec0cSmrg else 52459dedec0cSmrg puts (dlerror ()); 52460cc2eac3Smrg 52479dedec0cSmrg return status; 52489dedec0cSmrg}] 52499dedec0cSmrg_LT_EOF 52509dedec0cSmrg if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then 52519dedec0cSmrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 52529dedec0cSmrg lt_status=$? 52539dedec0cSmrg case x$lt_status in 52549dedec0cSmrg x$lt_dlno_uscore) $1 ;; 52559dedec0cSmrg x$lt_dlneed_uscore) $2 ;; 52569dedec0cSmrg x$lt_dlunknown|x*) $3 ;; 52579dedec0cSmrg esac 52589dedec0cSmrg else : 52599dedec0cSmrg # compilation failed 52609dedec0cSmrg $3 52619dedec0cSmrg fi 52629dedec0cSmrgfi 52639dedec0cSmrgrm -fr conftest* 52649dedec0cSmrg])# _LT_TRY_DLOPEN_SELF 52650cc2eac3Smrg 52666c321187Smrg 52679dedec0cSmrg# LT_SYS_DLOPEN_SELF 52689dedec0cSmrg# ------------------ 52699dedec0cSmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 52709dedec0cSmrg[m4_require([_LT_HEADER_DLFCN])dnl 52719dedec0cSmrgif test yes != "$enable_dlopen"; then 52729dedec0cSmrg enable_dlopen=unknown 52739dedec0cSmrg enable_dlopen_self=unknown 52749dedec0cSmrg enable_dlopen_self_static=unknown 52759dedec0cSmrgelse 52769dedec0cSmrg lt_cv_dlopen=no 52779dedec0cSmrg lt_cv_dlopen_libs= 52786c321187Smrg 52799dedec0cSmrg case $host_os in 52809dedec0cSmrg beos*) 52819dedec0cSmrg lt_cv_dlopen=load_add_on 52829dedec0cSmrg lt_cv_dlopen_libs= 52839dedec0cSmrg lt_cv_dlopen_self=yes 52849dedec0cSmrg ;; 52856c321187Smrg 52869dedec0cSmrg mingw* | pw32* | cegcc*) 52879dedec0cSmrg lt_cv_dlopen=LoadLibrary 52889dedec0cSmrg lt_cv_dlopen_libs= 52899dedec0cSmrg ;; 52900cc2eac3Smrg 52919dedec0cSmrg cygwin*) 52929dedec0cSmrg lt_cv_dlopen=dlopen 52939dedec0cSmrg lt_cv_dlopen_libs= 52949dedec0cSmrg ;; 52950cc2eac3Smrg 52969dedec0cSmrg darwin*) 52979dedec0cSmrg # if libdl is installed we need to link against it 52989dedec0cSmrg AC_CHECK_LIB([dl], [dlopen], 52999dedec0cSmrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ 53009dedec0cSmrg lt_cv_dlopen=dyld 53019dedec0cSmrg lt_cv_dlopen_libs= 53029dedec0cSmrg lt_cv_dlopen_self=yes 53039dedec0cSmrg ]) 53049dedec0cSmrg ;; 53050cc2eac3Smrg 53069dedec0cSmrg tpf*) 53079dedec0cSmrg # Don't try to run any link tests for TPF. We know it's impossible 53089dedec0cSmrg # because TPF is a cross-compiler, and we know how we open DSOs. 53099dedec0cSmrg lt_cv_dlopen=dlopen 53109dedec0cSmrg lt_cv_dlopen_libs= 53119dedec0cSmrg lt_cv_dlopen_self=no 53129dedec0cSmrg ;; 53130cc2eac3Smrg 53149dedec0cSmrg *) 53159dedec0cSmrg AC_CHECK_FUNC([shl_load], 53169dedec0cSmrg [lt_cv_dlopen=shl_load], 53179dedec0cSmrg [AC_CHECK_LIB([dld], [shl_load], 53189dedec0cSmrg [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], 53199dedec0cSmrg [AC_CHECK_FUNC([dlopen], 53209dedec0cSmrg [lt_cv_dlopen=dlopen], 53219dedec0cSmrg [AC_CHECK_LIB([dl], [dlopen], 53229dedec0cSmrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], 53239dedec0cSmrg [AC_CHECK_LIB([svld], [dlopen], 53249dedec0cSmrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], 53259dedec0cSmrg [AC_CHECK_LIB([dld], [dld_link], 53269dedec0cSmrg [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) 53279dedec0cSmrg ]) 53289dedec0cSmrg ]) 53299dedec0cSmrg ]) 53309dedec0cSmrg ]) 53319dedec0cSmrg ]) 53329dedec0cSmrg ;; 53339dedec0cSmrg esac 53340cc2eac3Smrg 53359dedec0cSmrg if test no = "$lt_cv_dlopen"; then 53369dedec0cSmrg enable_dlopen=no 53379dedec0cSmrg else 53389dedec0cSmrg enable_dlopen=yes 53399dedec0cSmrg fi 53400cc2eac3Smrg 53419dedec0cSmrg case $lt_cv_dlopen in 53429dedec0cSmrg dlopen) 53439dedec0cSmrg save_CPPFLAGS=$CPPFLAGS 53449dedec0cSmrg test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 53456c321187Smrg 53469dedec0cSmrg save_LDFLAGS=$LDFLAGS 53479dedec0cSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 53486c321187Smrg 53499dedec0cSmrg save_LIBS=$LIBS 53509dedec0cSmrg LIBS="$lt_cv_dlopen_libs $LIBS" 53510cc2eac3Smrg 53529dedec0cSmrg AC_CACHE_CHECK([whether a program can dlopen itself], 53539dedec0cSmrg lt_cv_dlopen_self, [dnl 53549dedec0cSmrg _LT_TRY_DLOPEN_SELF( 53559dedec0cSmrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 53569dedec0cSmrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 53579dedec0cSmrg ]) 53580cc2eac3Smrg 53599dedec0cSmrg if test yes = "$lt_cv_dlopen_self"; then 53609dedec0cSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 53619dedec0cSmrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 53629dedec0cSmrg lt_cv_dlopen_self_static, [dnl 53639dedec0cSmrg _LT_TRY_DLOPEN_SELF( 53649dedec0cSmrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 53659dedec0cSmrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 53669dedec0cSmrg ]) 53679dedec0cSmrg fi 53680cc2eac3Smrg 53699dedec0cSmrg CPPFLAGS=$save_CPPFLAGS 53709dedec0cSmrg LDFLAGS=$save_LDFLAGS 53719dedec0cSmrg LIBS=$save_LIBS 53729dedec0cSmrg ;; 53739dedec0cSmrg esac 5374198e4c3cSmrg 53759dedec0cSmrg case $lt_cv_dlopen_self in 53769dedec0cSmrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 53779dedec0cSmrg *) enable_dlopen_self=unknown ;; 53789dedec0cSmrg esac 53796c321187Smrg 53809dedec0cSmrg case $lt_cv_dlopen_self_static in 53819dedec0cSmrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 53829dedec0cSmrg *) enable_dlopen_self_static=unknown ;; 53839dedec0cSmrg esac 53849dedec0cSmrgfi 53859dedec0cSmrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 53869dedec0cSmrg [Whether dlopen is supported]) 53879dedec0cSmrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 53889dedec0cSmrg [Whether dlopen of programs is supported]) 53899dedec0cSmrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 53909dedec0cSmrg [Whether dlopen of statically linked programs is supported]) 53919dedec0cSmrg])# LT_SYS_DLOPEN_SELF 53926c321187Smrg 53939dedec0cSmrg# Old name: 53949dedec0cSmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 53959dedec0cSmrgdnl aclocal-1.4 backwards compatibility: 53969dedec0cSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 5397e120bd27Smrg 53986c321187Smrg 53999dedec0cSmrg# _LT_COMPILER_C_O([TAGNAME]) 54009dedec0cSmrg# --------------------------- 54019dedec0cSmrg# Check to see if options -c and -o are simultaneously supported by compiler. 54029dedec0cSmrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 54039dedec0cSmrgm4_defun([_LT_COMPILER_C_O], 54049dedec0cSmrg[m4_require([_LT_DECL_SED])dnl 54059dedec0cSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 54069dedec0cSmrgm4_require([_LT_TAG_COMPILER])dnl 54079dedec0cSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 54089dedec0cSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 54099dedec0cSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 54109dedec0cSmrg $RM -r conftest 2>/dev/null 54119dedec0cSmrg mkdir conftest 54129dedec0cSmrg cd conftest 54139dedec0cSmrg mkdir out 54149dedec0cSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 54156c321187Smrg 54169dedec0cSmrg lt_compiler_flag="-o out/conftest2.$ac_objext" 54179dedec0cSmrg # Insert the option either (1) after the last *FLAGS variable, or 54189dedec0cSmrg # (2) before a word containing "conftest.", or (3) at the end. 54199dedec0cSmrg # Note that $ac_compile itself does not contain backslashes and begins 54209dedec0cSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 54219dedec0cSmrg lt_compile=`echo "$ac_compile" | $SED \ 54229dedec0cSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 54239dedec0cSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 54249dedec0cSmrg -e 's:$: $lt_compiler_flag:'` 54259dedec0cSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 54269dedec0cSmrg (eval "$lt_compile" 2>out/conftest.err) 54279dedec0cSmrg ac_status=$? 54289dedec0cSmrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 54299dedec0cSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 54309dedec0cSmrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 54319dedec0cSmrg then 54329dedec0cSmrg # The compiler can only warn and ignore the option if not recognized 54339dedec0cSmrg # So say no if there are warnings 54349dedec0cSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 54359dedec0cSmrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 54369dedec0cSmrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 54379dedec0cSmrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 54389dedec0cSmrg fi 54399dedec0cSmrg fi 54409dedec0cSmrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 54419dedec0cSmrg $RM conftest* 54429dedec0cSmrg # SGI C++ compiler will create directory out/ii_files/ for 54439dedec0cSmrg # template instantiation 54449dedec0cSmrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 54459dedec0cSmrg $RM out/* && rmdir out 54469dedec0cSmrg cd .. 54479dedec0cSmrg $RM -r conftest 54489dedec0cSmrg $RM conftest* 54499dedec0cSmrg]) 54509dedec0cSmrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 54519dedec0cSmrg [Does compiler simultaneously support -c and -o options?]) 54529dedec0cSmrg])# _LT_COMPILER_C_O 54536c321187Smrg 54546c321187Smrg 54559dedec0cSmrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 54569dedec0cSmrg# ---------------------------------- 54579dedec0cSmrg# Check to see if we can do hard links to lock some files if needed 54589dedec0cSmrgm4_defun([_LT_COMPILER_FILE_LOCKS], 54599dedec0cSmrg[m4_require([_LT_ENABLE_LOCK])dnl 54609dedec0cSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 54619dedec0cSmrg_LT_COMPILER_C_O([$1]) 54626c321187Smrg 54639dedec0cSmrghard_links=nottested 54649dedec0cSmrgif test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then 54659dedec0cSmrg # do not overwrite the value of need_locks provided by the user 54669dedec0cSmrg AC_MSG_CHECKING([if we can lock with hard links]) 54679dedec0cSmrg hard_links=yes 54689dedec0cSmrg $RM conftest* 54699dedec0cSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 54709dedec0cSmrg touch conftest.a 54719dedec0cSmrg ln conftest.a conftest.b 2>&5 || hard_links=no 54729dedec0cSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 54739dedec0cSmrg AC_MSG_RESULT([$hard_links]) 54749dedec0cSmrg if test no = "$hard_links"; then 54759dedec0cSmrg AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) 54769dedec0cSmrg need_locks=warn 54779dedec0cSmrg fi 54789dedec0cSmrgelse 54799dedec0cSmrg need_locks=no 54809dedec0cSmrgfi 54819dedec0cSmrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 54829dedec0cSmrg])# _LT_COMPILER_FILE_LOCKS 54836c321187Smrg 54846c321187Smrg 54859dedec0cSmrg# _LT_CHECK_OBJDIR 54869dedec0cSmrg# ---------------- 54879dedec0cSmrgm4_defun([_LT_CHECK_OBJDIR], 54889dedec0cSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 54899dedec0cSmrg[rm -f .libs 2>/dev/null 54909dedec0cSmrgmkdir .libs 2>/dev/null 54919dedec0cSmrgif test -d .libs; then 54929dedec0cSmrg lt_cv_objdir=.libs 54939dedec0cSmrgelse 54949dedec0cSmrg # MS-DOS does not allow filenames that begin with a dot. 54959dedec0cSmrg lt_cv_objdir=_libs 54969dedec0cSmrgfi 54979dedec0cSmrgrmdir .libs 2>/dev/null]) 54989dedec0cSmrgobjdir=$lt_cv_objdir 54999dedec0cSmrg_LT_DECL([], [objdir], [0], 55009dedec0cSmrg [The name of the directory that contains temporary libtool files])dnl 55019dedec0cSmrgm4_pattern_allow([LT_OBJDIR])dnl 55029dedec0cSmrgAC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", 55039dedec0cSmrg [Define to the sub-directory where libtool stores uninstalled libraries.]) 55049dedec0cSmrg])# _LT_CHECK_OBJDIR 55056c321187Smrg 55066c321187Smrg 55079dedec0cSmrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 55089dedec0cSmrg# -------------------------------------- 55099dedec0cSmrg# Check hardcoding attributes. 55109dedec0cSmrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 55119dedec0cSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 55129dedec0cSmrg_LT_TAGVAR(hardcode_action, $1)= 55139dedec0cSmrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 55149dedec0cSmrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 55159dedec0cSmrg test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then 55166c321187Smrg 55179dedec0cSmrg # We can hardcode non-existent directories. 55189dedec0cSmrg if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && 55199dedec0cSmrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 55209dedec0cSmrg # have to relink, otherwise we might link with an installed library 55219dedec0cSmrg # when we should be linking with a yet-to-be-installed one 55229dedec0cSmrg ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && 55239dedec0cSmrg test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then 55249dedec0cSmrg # Linking always hardcodes the temporary library directory. 55259dedec0cSmrg _LT_TAGVAR(hardcode_action, $1)=relink 55269dedec0cSmrg else 55279dedec0cSmrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 55289dedec0cSmrg _LT_TAGVAR(hardcode_action, $1)=immediate 55299dedec0cSmrg fi 55309dedec0cSmrgelse 55319dedec0cSmrg # We cannot hardcode anything, or else we can only hardcode existing 55329dedec0cSmrg # directories. 55339dedec0cSmrg _LT_TAGVAR(hardcode_action, $1)=unsupported 55349dedec0cSmrgfi 55359dedec0cSmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 55366c321187Smrg 55379dedec0cSmrgif test relink = "$_LT_TAGVAR(hardcode_action, $1)" || 55389dedec0cSmrg test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then 55399dedec0cSmrg # Fast installation is not supported 55409dedec0cSmrg enable_fast_install=no 55419dedec0cSmrgelif test yes = "$shlibpath_overrides_runpath" || 55429dedec0cSmrg test no = "$enable_shared"; then 55439dedec0cSmrg # Fast installation is not necessary 55449dedec0cSmrg enable_fast_install=needless 55459dedec0cSmrgfi 55469dedec0cSmrg_LT_TAGDECL([], [hardcode_action], [0], 55479dedec0cSmrg [How to hardcode a shared library path into an executable]) 55489dedec0cSmrg])# _LT_LINKER_HARDCODE_LIBPATH 55496c321187Smrg 55506c321187Smrg 55519dedec0cSmrg# _LT_CMD_STRIPLIB 55529dedec0cSmrg# ---------------- 55539dedec0cSmrgm4_defun([_LT_CMD_STRIPLIB], 55549dedec0cSmrg[m4_require([_LT_DECL_EGREP]) 55559dedec0cSmrgstriplib= 55569dedec0cSmrgold_striplib= 55579dedec0cSmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 55589dedec0cSmrgif test -z "$STRIP"; then 55599dedec0cSmrg AC_MSG_RESULT([no]) 55609dedec0cSmrgelse 55619dedec0cSmrg if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 55629dedec0cSmrg old_striplib="$STRIP --strip-debug" 55639dedec0cSmrg striplib="$STRIP --strip-unneeded" 55649dedec0cSmrg AC_MSG_RESULT([yes]) 55659dedec0cSmrg else 55669dedec0cSmrg case $host_os in 55679dedec0cSmrg darwin*) 55689dedec0cSmrg # FIXME - insert some real tests, host_os isn't really good enough 55699dedec0cSmrg striplib="$STRIP -x" 55709dedec0cSmrg old_striplib="$STRIP -S" 55719dedec0cSmrg AC_MSG_RESULT([yes]) 55729dedec0cSmrg ;; 55739dedec0cSmrg freebsd*) 55749dedec0cSmrg if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then 55759dedec0cSmrg old_striplib="$STRIP --strip-debug" 55769dedec0cSmrg striplib="$STRIP --strip-unneeded" 55779dedec0cSmrg AC_MSG_RESULT([yes]) 55789dedec0cSmrg else 55799dedec0cSmrg AC_MSG_RESULT([no]) 55809dedec0cSmrg fi 55819dedec0cSmrg ;; 55829dedec0cSmrg *) 55839dedec0cSmrg AC_MSG_RESULT([no]) 55849dedec0cSmrg ;; 55859dedec0cSmrg esac 55869dedec0cSmrg fi 55879dedec0cSmrgfi 55889dedec0cSmrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 55899dedec0cSmrg_LT_DECL([], [striplib], [1]) 55909dedec0cSmrg])# _LT_CMD_STRIPLIB 55916c321187Smrg 55926c321187Smrg 55939dedec0cSmrg# _LT_PREPARE_MUNGE_PATH_LIST 55949dedec0cSmrg# --------------------------- 55959dedec0cSmrg# Make sure func_munge_path_list() is defined correctly. 55969dedec0cSmrgm4_defun([_LT_PREPARE_MUNGE_PATH_LIST], 55979dedec0cSmrg[[# func_munge_path_list VARIABLE PATH 55989dedec0cSmrg# ----------------------------------- 55999dedec0cSmrg# VARIABLE is name of variable containing _space_ separated list of 56009dedec0cSmrg# directories to be munged by the contents of PATH, which is string 56019dedec0cSmrg# having a format: 56029dedec0cSmrg# "DIR[:DIR]:" 56039dedec0cSmrg# string "DIR[ DIR]" will be prepended to VARIABLE 56049dedec0cSmrg# ":DIR[:DIR]" 56059dedec0cSmrg# string "DIR[ DIR]" will be appended to VARIABLE 56069dedec0cSmrg# "DIRP[:DIRP]::[DIRA:]DIRA" 56079dedec0cSmrg# string "DIRP[ DIRP]" will be prepended to VARIABLE and string 56089dedec0cSmrg# "DIRA[ DIRA]" will be appended to VARIABLE 56099dedec0cSmrg# "DIR[:DIR]" 56109dedec0cSmrg# VARIABLE will be replaced by "DIR[ DIR]" 56119dedec0cSmrgfunc_munge_path_list () 56129dedec0cSmrg{ 56139dedec0cSmrg case x@S|@2 in 56149dedec0cSmrg x) 56159dedec0cSmrg ;; 56169dedec0cSmrg *:) 56179dedec0cSmrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" 56189dedec0cSmrg ;; 56199dedec0cSmrg x:*) 56209dedec0cSmrg eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" 56219dedec0cSmrg ;; 56229dedec0cSmrg *::*) 56239dedec0cSmrg eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" 56249dedec0cSmrg eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" 56259dedec0cSmrg ;; 56269dedec0cSmrg *) 56279dedec0cSmrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" 56289dedec0cSmrg ;; 56299dedec0cSmrg esac 56309dedec0cSmrg} 56319dedec0cSmrg]])# _LT_PREPARE_PATH_LIST 56326c321187Smrg 56336c321187Smrg 56349dedec0cSmrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 56359dedec0cSmrg# ----------------------------- 56369dedec0cSmrg# PORTME Fill in your ld.so characteristics 56379dedec0cSmrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 56389dedec0cSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 56399dedec0cSmrgm4_require([_LT_DECL_EGREP])dnl 56409dedec0cSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 56419dedec0cSmrgm4_require([_LT_DECL_OBJDUMP])dnl 56429dedec0cSmrgm4_require([_LT_DECL_SED])dnl 56439dedec0cSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 56449dedec0cSmrgm4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl 56459dedec0cSmrgAC_MSG_CHECKING([dynamic linker characteristics]) 56469dedec0cSmrgm4_if([$1], 56479dedec0cSmrg [], [ 56489dedec0cSmrgif test yes = "$GCC"; then 56499dedec0cSmrg case $host_os in 56509dedec0cSmrg darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; 56519dedec0cSmrg *) lt_awk_arg='/^libraries:/' ;; 56529dedec0cSmrg esac 56539dedec0cSmrg case $host_os in 56549dedec0cSmrg mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; 56559dedec0cSmrg *) lt_sed_strip_eq='s|=/|/|g' ;; 56569dedec0cSmrg esac 56579dedec0cSmrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 56589dedec0cSmrg case $lt_search_path_spec in 56599dedec0cSmrg *\;*) 56609dedec0cSmrg # if the path contains ";" then we assume it to be the separator 56619dedec0cSmrg # otherwise default to the standard path separator (i.e. ":") - it is 56629dedec0cSmrg # assumed that no part of a normal pathname contains ";" but that should 56639dedec0cSmrg # okay in the real world where ";" in dirpaths is itself problematic. 56649dedec0cSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 56659dedec0cSmrg ;; 56669dedec0cSmrg *) 56679dedec0cSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 56689dedec0cSmrg ;; 56699dedec0cSmrg esac 56709dedec0cSmrg # Ok, now we have the path, separated by spaces, we can step through it 56719dedec0cSmrg # and add multilib dir if necessary... 56729dedec0cSmrg lt_tmp_lt_search_path_spec= 56739dedec0cSmrg lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 56749dedec0cSmrg # ...but if some path component already ends with the multilib dir we assume 56759dedec0cSmrg # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). 56769dedec0cSmrg case "$lt_multi_os_dir; $lt_search_path_spec " in 56779dedec0cSmrg "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) 56789dedec0cSmrg lt_multi_os_dir= 56799dedec0cSmrg ;; 56809dedec0cSmrg esac 56819dedec0cSmrg for lt_sys_path in $lt_search_path_spec; do 56829dedec0cSmrg if test -d "$lt_sys_path$lt_multi_os_dir"; then 56839dedec0cSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" 56849dedec0cSmrg elif test -n "$lt_multi_os_dir"; then 56859dedec0cSmrg test -d "$lt_sys_path" && \ 56869dedec0cSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 56879dedec0cSmrg fi 56889dedec0cSmrg done 56899dedec0cSmrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 56909dedec0cSmrgBEGIN {RS = " "; FS = "/|\n";} { 56919dedec0cSmrg lt_foo = ""; 56929dedec0cSmrg lt_count = 0; 56939dedec0cSmrg for (lt_i = NF; lt_i > 0; lt_i--) { 56949dedec0cSmrg if ($lt_i != "" && $lt_i != ".") { 56959dedec0cSmrg if ($lt_i == "..") { 56969dedec0cSmrg lt_count++; 56979dedec0cSmrg } else { 56989dedec0cSmrg if (lt_count == 0) { 56999dedec0cSmrg lt_foo = "/" $lt_i lt_foo; 57009dedec0cSmrg } else { 57019dedec0cSmrg lt_count--; 57029dedec0cSmrg } 57039dedec0cSmrg } 57049dedec0cSmrg } 57059dedec0cSmrg } 57069dedec0cSmrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 57079dedec0cSmrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 57089dedec0cSmrg}'` 57099dedec0cSmrg # AWK program above erroneously prepends '/' to C:/dos/paths 57109dedec0cSmrg # for these hosts. 57119dedec0cSmrg case $host_os in 57129dedec0cSmrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 57139dedec0cSmrg $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; 57149dedec0cSmrg esac 57159dedec0cSmrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 57169dedec0cSmrgelse 57179dedec0cSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 57189dedec0cSmrgfi]) 57199dedec0cSmrglibrary_names_spec= 57209dedec0cSmrglibname_spec='lib$name' 57219dedec0cSmrgsoname_spec= 57229dedec0cSmrgshrext_cmds=.so 57239dedec0cSmrgpostinstall_cmds= 57249dedec0cSmrgpostuninstall_cmds= 57259dedec0cSmrgfinish_cmds= 57269dedec0cSmrgfinish_eval= 57279dedec0cSmrgshlibpath_var= 57289dedec0cSmrgshlibpath_overrides_runpath=unknown 57299dedec0cSmrgversion_type=none 57309dedec0cSmrgdynamic_linker="$host_os ld.so" 57319dedec0cSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 57329dedec0cSmrgneed_lib_prefix=unknown 57339dedec0cSmrghardcode_into_libs=no 57346c321187Smrg 57359dedec0cSmrg# when you set need_version to no, make sure it does not cause -set_version 57369dedec0cSmrg# flags to be left without arguments 57379dedec0cSmrgneed_version=unknown 57386c321187Smrg 57399dedec0cSmrgAC_ARG_VAR([LT_SYS_LIBRARY_PATH], 57409dedec0cSmrg[User-defined run-time library search path.]) 57416c321187Smrg 57429dedec0cSmrgcase $host_os in 57439dedec0cSmrgaix3*) 57449dedec0cSmrg version_type=linux # correct to gnu/linux during the next big refactor 57459dedec0cSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname.a' 57469dedec0cSmrg shlibpath_var=LIBPATH 57476c321187Smrg 57489dedec0cSmrg # AIX 3 has no versioning support, so we append a major version to the name. 57499dedec0cSmrg soname_spec='$libname$release$shared_ext$major' 57509dedec0cSmrg ;; 57516c321187Smrg 57529dedec0cSmrgaix[[4-9]]*) 57539dedec0cSmrg version_type=linux # correct to gnu/linux during the next big refactor 57549dedec0cSmrg need_lib_prefix=no 57559dedec0cSmrg need_version=no 57569dedec0cSmrg hardcode_into_libs=yes 57579dedec0cSmrg if test ia64 = "$host_cpu"; then 57589dedec0cSmrg # AIX 5 supports IA64 57599dedec0cSmrg library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' 57609dedec0cSmrg shlibpath_var=LD_LIBRARY_PATH 57619dedec0cSmrg else 57629dedec0cSmrg # With GCC up to 2.95.x, collect2 would create an import file 57639dedec0cSmrg # for dependence libraries. The import file would start with 57649dedec0cSmrg # the line '#! .'. This would cause the generated library to 57659dedec0cSmrg # depend on '.', always an invalid library. This was fixed in 57669dedec0cSmrg # development snapshots of GCC prior to 3.0. 57679dedec0cSmrg case $host_os in 57689dedec0cSmrg aix4 | aix4.[[01]] | aix4.[[01]].*) 57699dedec0cSmrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 57709dedec0cSmrg echo ' yes ' 57719dedec0cSmrg echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then 57729dedec0cSmrg : 57739dedec0cSmrg else 57749dedec0cSmrg can_build_shared=no 57759dedec0cSmrg fi 57769dedec0cSmrg ;; 57779dedec0cSmrg esac 57789dedec0cSmrg # Using Import Files as archive members, it is possible to support 57799dedec0cSmrg # filename-based versioning of shared library archives on AIX. While 57809dedec0cSmrg # this would work for both with and without runtime linking, it will 57819dedec0cSmrg # prevent static linking of such archives. So we do filename-based 57829dedec0cSmrg # shared library versioning with .so extension only, which is used 57839dedec0cSmrg # when both runtime linking and shared linking is enabled. 57849dedec0cSmrg # Unfortunately, runtime linking may impact performance, so we do 57859dedec0cSmrg # not want this to be the default eventually. Also, we use the 57869dedec0cSmrg # versioned .so libs for executables only if there is the -brtl 57879dedec0cSmrg # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. 57889dedec0cSmrg # To allow for filename-based versioning support, we need to create 57899dedec0cSmrg # libNAME.so.V as an archive file, containing: 57909dedec0cSmrg # *) an Import File, referring to the versioned filename of the 57919dedec0cSmrg # archive as well as the shared archive member, telling the 57929dedec0cSmrg # bitwidth (32 or 64) of that shared object, and providing the 57939dedec0cSmrg # list of exported symbols of that shared object, eventually 57949dedec0cSmrg # decorated with the 'weak' keyword 57959dedec0cSmrg # *) the shared object with the F_LOADONLY flag set, to really avoid 57969dedec0cSmrg # it being seen by the linker. 57979dedec0cSmrg # At run time we better use the real file rather than another symlink, 57989dedec0cSmrg # but for link time we create the symlink libNAME.so -> libNAME.so.V 57996c321187Smrg 58009dedec0cSmrg case $with_aix_soname,$aix_use_runtimelinking in 58019dedec0cSmrg # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct 58029dedec0cSmrg # soname into executable. Probably we can add versioning support to 58039dedec0cSmrg # collect2, so additional links can be useful in future. 58049dedec0cSmrg aix,yes) # traditional libtool 58059dedec0cSmrg dynamic_linker='AIX unversionable lib.so' 58069dedec0cSmrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 58079dedec0cSmrg # instead of lib<name>.a to let people know that these are not 58089dedec0cSmrg # typical AIX shared libraries. 58099dedec0cSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 58109dedec0cSmrg ;; 58119dedec0cSmrg aix,no) # traditional AIX only 58129dedec0cSmrg dynamic_linker='AIX lib.a[(]lib.so.V[)]' 58139dedec0cSmrg # We preserve .a as extension for shared libraries through AIX4.2 58149dedec0cSmrg # and later when we are not doing run time linking. 58159dedec0cSmrg library_names_spec='$libname$release.a $libname.a' 58169dedec0cSmrg soname_spec='$libname$release$shared_ext$major' 58179dedec0cSmrg ;; 58189dedec0cSmrg svr4,*) # full svr4 only 58199dedec0cSmrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" 58209dedec0cSmrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 58219dedec0cSmrg # We do not specify a path in Import Files, so LIBPATH fires. 58229dedec0cSmrg shlibpath_overrides_runpath=yes 58239dedec0cSmrg ;; 58249dedec0cSmrg *,yes) # both, prefer svr4 58259dedec0cSmrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" 58269dedec0cSmrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 58279dedec0cSmrg # unpreferred sharedlib libNAME.a needs extra handling 58289dedec0cSmrg 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"' 58299dedec0cSmrg 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"' 58309dedec0cSmrg # We do not specify a path in Import Files, so LIBPATH fires. 58319dedec0cSmrg shlibpath_overrides_runpath=yes 58329dedec0cSmrg ;; 58339dedec0cSmrg *,no) # both, prefer aix 58349dedec0cSmrg dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" 58359dedec0cSmrg library_names_spec='$libname$release.a $libname.a' 58369dedec0cSmrg soname_spec='$libname$release$shared_ext$major' 58379dedec0cSmrg # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling 58389dedec0cSmrg 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)' 58399dedec0cSmrg 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"' 58409dedec0cSmrg ;; 58419dedec0cSmrg esac 58429dedec0cSmrg shlibpath_var=LIBPATH 58439dedec0cSmrg fi 58449dedec0cSmrg ;; 58456c321187Smrg 58469dedec0cSmrgamigaos*) 58479dedec0cSmrg case $host_cpu in 58489dedec0cSmrg powerpc) 58499dedec0cSmrg # Since July 2007 AmigaOS4 officially supports .so libraries. 58509dedec0cSmrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 58519dedec0cSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 58529dedec0cSmrg ;; 58539dedec0cSmrg m68k) 58549dedec0cSmrg library_names_spec='$libname.ixlibrary $libname.a' 58559dedec0cSmrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 58569dedec0cSmrg 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' 58579dedec0cSmrg ;; 58589dedec0cSmrg esac 58599dedec0cSmrg ;; 58606c321187Smrg 58619dedec0cSmrgbeos*) 58629dedec0cSmrg library_names_spec='$libname$shared_ext' 58639dedec0cSmrg dynamic_linker="$host_os ld.so" 58649dedec0cSmrg shlibpath_var=LIBRARY_PATH 58659dedec0cSmrg ;; 58666c321187Smrg 58679dedec0cSmrgbsdi[[45]]*) 58689dedec0cSmrg version_type=linux # correct to gnu/linux during the next big refactor 58699dedec0cSmrg need_version=no 58709dedec0cSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 58719dedec0cSmrg soname_spec='$libname$release$shared_ext$major' 58729dedec0cSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 58739dedec0cSmrg shlibpath_var=LD_LIBRARY_PATH 58749dedec0cSmrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 58759dedec0cSmrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 58769dedec0cSmrg # the default ld.so.conf also contains /usr/contrib/lib and 58779dedec0cSmrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 58789dedec0cSmrg # libtool to hard-code these into programs 58799dedec0cSmrg ;; 58806c321187Smrg 58819dedec0cSmrgcygwin* | mingw* | pw32* | cegcc*) 58829dedec0cSmrg version_type=windows 58839dedec0cSmrg shrext_cmds=.dll 58849dedec0cSmrg need_version=no 58859dedec0cSmrg need_lib_prefix=no 58866c321187Smrg 58879dedec0cSmrg case $GCC,$cc_basename in 58889dedec0cSmrg yes,*) 58899dedec0cSmrg # gcc 58909dedec0cSmrg library_names_spec='$libname.dll.a' 58919dedec0cSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 58929dedec0cSmrg postinstall_cmds='base_file=`basename \$file`~ 58939dedec0cSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 58949dedec0cSmrg dldir=$destdir/`dirname \$dlpath`~ 58959dedec0cSmrg test -d \$dldir || mkdir -p \$dldir~ 58969dedec0cSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 58979dedec0cSmrg chmod a+x \$dldir/$dlname~ 58989dedec0cSmrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 58999dedec0cSmrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 59009dedec0cSmrg fi' 59019dedec0cSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 59029dedec0cSmrg dlpath=$dir/\$dldll~ 59039dedec0cSmrg $RM \$dlpath' 59049dedec0cSmrg shlibpath_overrides_runpath=yes 59056c321187Smrg 59069dedec0cSmrg case $host_os in 59079dedec0cSmrg cygwin*) 59089dedec0cSmrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 59099dedec0cSmrg soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 59109dedec0cSmrgm4_if([$1], [],[ 59119dedec0cSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 59129dedec0cSmrg ;; 59139dedec0cSmrg mingw* | cegcc*) 59149dedec0cSmrg # MinGW DLLs use traditional 'lib' prefix 59159dedec0cSmrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 59169dedec0cSmrg ;; 59179dedec0cSmrg pw32*) 59189dedec0cSmrg # pw32 DLLs use 'pw' prefix rather than 'lib' 59199dedec0cSmrg library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 59209dedec0cSmrg ;; 59219dedec0cSmrg esac 59229dedec0cSmrg dynamic_linker='Win32 ld.exe' 59239dedec0cSmrg ;; 59246c321187Smrg 59259dedec0cSmrg *,cl* | *,icl*) 59269dedec0cSmrg # Native MSVC or ICC 59279dedec0cSmrg libname_spec='$name' 59289dedec0cSmrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 59299dedec0cSmrg library_names_spec='$libname.dll.lib' 59306c321187Smrg 59319dedec0cSmrg case $build_os in 59329dedec0cSmrg mingw*) 59339dedec0cSmrg sys_lib_search_path_spec= 59349dedec0cSmrg lt_save_ifs=$IFS 59359dedec0cSmrg IFS=';' 59369dedec0cSmrg for lt_path in $LIB 59379dedec0cSmrg do 59389dedec0cSmrg IFS=$lt_save_ifs 59399dedec0cSmrg # Let DOS variable expansion print the short 8.3 style file name. 59409dedec0cSmrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 59419dedec0cSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 59429dedec0cSmrg done 59439dedec0cSmrg IFS=$lt_save_ifs 59449dedec0cSmrg # Convert to MSYS style. 59459dedec0cSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 59469dedec0cSmrg ;; 59479dedec0cSmrg cygwin*) 59489dedec0cSmrg # Convert to unix form, then to dos form, then back to unix form 59499dedec0cSmrg # but this time dos style (no spaces!) so that the unix form looks 59509dedec0cSmrg # like /cygdrive/c/PROGRA~1:/cygdr... 59519dedec0cSmrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 59529dedec0cSmrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 59539dedec0cSmrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 59549dedec0cSmrg ;; 59559dedec0cSmrg *) 59569dedec0cSmrg sys_lib_search_path_spec=$LIB 59579dedec0cSmrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 59589dedec0cSmrg # It is most probably a Windows format PATH. 59599dedec0cSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 59609dedec0cSmrg else 59619dedec0cSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 59629dedec0cSmrg fi 59639dedec0cSmrg # FIXME: find the short name or the path components, as spaces are 59649dedec0cSmrg # common. (e.g. "Program Files" -> "PROGRA~1") 5965e120bd27Smrg ;; 59669dedec0cSmrg esac 59676c321187Smrg 59689dedec0cSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 59699dedec0cSmrg postinstall_cmds='base_file=`basename \$file`~ 59709dedec0cSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 59719dedec0cSmrg dldir=$destdir/`dirname \$dlpath`~ 59729dedec0cSmrg test -d \$dldir || mkdir -p \$dldir~ 59739dedec0cSmrg $install_prog $dir/$dlname \$dldir/$dlname' 59749dedec0cSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 59759dedec0cSmrg dlpath=$dir/\$dldll~ 59769dedec0cSmrg $RM \$dlpath' 59779dedec0cSmrg shlibpath_overrides_runpath=yes 59789dedec0cSmrg dynamic_linker='Win32 link.exe' 59799dedec0cSmrg ;; 59806c321187Smrg 59819dedec0cSmrg *) 59829dedec0cSmrg # Assume MSVC and ICC wrapper 59839dedec0cSmrg library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' 59849dedec0cSmrg dynamic_linker='Win32 ld.exe' 59859dedec0cSmrg ;; 59869dedec0cSmrg esac 59879dedec0cSmrg # FIXME: first we should search . and the directory the executable is in 59889dedec0cSmrg shlibpath_var=PATH 59899dedec0cSmrg ;; 59906c321187Smrg 59919dedec0cSmrgdarwin* | rhapsody*) 59929dedec0cSmrg dynamic_linker="$host_os dyld" 59939dedec0cSmrg version_type=darwin 59949dedec0cSmrg need_lib_prefix=no 59959dedec0cSmrg need_version=no 59969dedec0cSmrg library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' 59979dedec0cSmrg soname_spec='$libname$release$major$shared_ext' 59989dedec0cSmrg shlibpath_overrides_runpath=yes 59999dedec0cSmrg shlibpath_var=DYLD_LIBRARY_PATH 60009dedec0cSmrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 60019dedec0cSmrgm4_if([$1], [],[ 60029dedec0cSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 60039dedec0cSmrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 60049dedec0cSmrg ;; 60056c321187Smrg 60069dedec0cSmrgdgux*) 60079dedec0cSmrg version_type=linux # correct to gnu/linux during the next big refactor 60089dedec0cSmrg need_lib_prefix=no 60099dedec0cSmrg need_version=no 60109dedec0cSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 60119dedec0cSmrg soname_spec='$libname$release$shared_ext$major' 60129dedec0cSmrg shlibpath_var=LD_LIBRARY_PATH 60139dedec0cSmrg ;; 60146c321187Smrg 60159dedec0cSmrgfreebsd* | dragonfly* | midnightbsd*) 60169dedec0cSmrg # DragonFly does not have aout. When/if they implement a new 60179dedec0cSmrg # versioning mechanism, adjust this. 60189dedec0cSmrg if test -x /usr/bin/objformat; then 60199dedec0cSmrg objformat=`/usr/bin/objformat` 60209dedec0cSmrg else 60219dedec0cSmrg case $host_os in 60229dedec0cSmrg freebsd[[23]].*) objformat=aout ;; 60239dedec0cSmrg *) objformat=elf ;; 60240cc2eac3Smrg esac 60259dedec0cSmrg fi 60269dedec0cSmrg version_type=freebsd-$objformat 60279dedec0cSmrg case $version_type in 60289dedec0cSmrg freebsd-elf*) 60299dedec0cSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 60309dedec0cSmrg soname_spec='$libname$release$shared_ext$major' 60319dedec0cSmrg need_version=no 60329dedec0cSmrg need_lib_prefix=no 60339dedec0cSmrg ;; 60349dedec0cSmrg freebsd-*) 60359dedec0cSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 60369dedec0cSmrg need_version=yes 60379dedec0cSmrg ;; 60389dedec0cSmrg esac 60399dedec0cSmrg shlibpath_var=LD_LIBRARY_PATH 60409dedec0cSmrg case $host_os in 60419dedec0cSmrg freebsd2.*) 60429dedec0cSmrg shlibpath_overrides_runpath=yes 60439dedec0cSmrg ;; 60449dedec0cSmrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 60459dedec0cSmrg shlibpath_overrides_runpath=yes 60469dedec0cSmrg hardcode_into_libs=yes 60479dedec0cSmrg ;; 60489dedec0cSmrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 60499dedec0cSmrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 60509dedec0cSmrg shlibpath_overrides_runpath=no 60519dedec0cSmrg hardcode_into_libs=yes 60529dedec0cSmrg ;; 60539dedec0cSmrg *) # from 4.6 on, and DragonFly 60549dedec0cSmrg shlibpath_overrides_runpath=yes 60559dedec0cSmrg hardcode_into_libs=yes 60569dedec0cSmrg ;; 60579dedec0cSmrg esac 60589dedec0cSmrg ;; 60596c321187Smrg 60609dedec0cSmrghaiku*) 60619dedec0cSmrg version_type=linux # correct to gnu/linux during the next big refactor 60629dedec0cSmrg need_lib_prefix=no 60639dedec0cSmrg need_version=no 60649dedec0cSmrg dynamic_linker="$host_os runtime_loader" 60659dedec0cSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 60669dedec0cSmrg soname_spec='$libname$release$shared_ext$major' 60679dedec0cSmrg shlibpath_var=LIBRARY_PATH 60689dedec0cSmrg shlibpath_overrides_runpath=no 60699dedec0cSmrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 60709dedec0cSmrg hardcode_into_libs=yes 60719dedec0cSmrg ;; 60726c321187Smrg 60739dedec0cSmrghpux9* | hpux10* | hpux11*) 60749dedec0cSmrg # Give a soname corresponding to the major version so that dld.sl refuses to 60759dedec0cSmrg # link against other versions. 60769dedec0cSmrg version_type=sunos 60779dedec0cSmrg need_lib_prefix=no 60789dedec0cSmrg need_version=no 60799dedec0cSmrg case $host_cpu in 60809dedec0cSmrg ia64*) 60819dedec0cSmrg shrext_cmds='.so' 60829dedec0cSmrg hardcode_into_libs=yes 60839dedec0cSmrg dynamic_linker="$host_os dld.so" 60849dedec0cSmrg shlibpath_var=LD_LIBRARY_PATH 60859dedec0cSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 60869dedec0cSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 60879dedec0cSmrg soname_spec='$libname$release$shared_ext$major' 60889dedec0cSmrg if test 32 = "$HPUX_IA64_MODE"; then 60899dedec0cSmrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 60909dedec0cSmrg sys_lib_dlsearch_path_spec=/usr/lib/hpux32 60919dedec0cSmrg else 60929dedec0cSmrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 60939dedec0cSmrg sys_lib_dlsearch_path_spec=/usr/lib/hpux64 60949dedec0cSmrg fi 60959dedec0cSmrg ;; 60969dedec0cSmrg hppa*64*) 60979dedec0cSmrg shrext_cmds='.sl' 60989dedec0cSmrg hardcode_into_libs=yes 60999dedec0cSmrg dynamic_linker="$host_os dld.sl" 61009dedec0cSmrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 61019dedec0cSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 61029dedec0cSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 61039dedec0cSmrg soname_spec='$libname$release$shared_ext$major' 61049dedec0cSmrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 61059dedec0cSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 61069dedec0cSmrg ;; 61079dedec0cSmrg *) 61089dedec0cSmrg shrext_cmds='.sl' 61099dedec0cSmrg dynamic_linker="$host_os dld.sl" 61109dedec0cSmrg shlibpath_var=SHLIB_PATH 61119dedec0cSmrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 61129dedec0cSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 61139dedec0cSmrg soname_spec='$libname$release$shared_ext$major' 61149dedec0cSmrg ;; 61150cc2eac3Smrg esac 61169dedec0cSmrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 61179dedec0cSmrg postinstall_cmds='chmod 555 $lib' 61189dedec0cSmrg # or fails outright, so override atomically: 61199dedec0cSmrg install_override_mode=555 61209dedec0cSmrg ;; 6121198e4c3cSmrg 61229dedec0cSmrginterix[[3-9]]*) 61239dedec0cSmrg version_type=linux # correct to gnu/linux during the next big refactor 61249dedec0cSmrg need_lib_prefix=no 61259dedec0cSmrg need_version=no 61269dedec0cSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 61279dedec0cSmrg soname_spec='$libname$release$shared_ext$major' 61289dedec0cSmrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 61299dedec0cSmrg shlibpath_var=LD_LIBRARY_PATH 61309dedec0cSmrg shlibpath_overrides_runpath=no 61319dedec0cSmrg hardcode_into_libs=yes 61329dedec0cSmrg ;; 61336c321187Smrg 61349dedec0cSmrgirix5* | irix6* | nonstopux*) 61359dedec0cSmrg case $host_os in 61369dedec0cSmrg nonstopux*) version_type=nonstopux ;; 61379dedec0cSmrg *) 61389dedec0cSmrg if test yes = "$lt_cv_prog_gnu_ld"; then 61399dedec0cSmrg version_type=linux # correct to gnu/linux during the next big refactor 61409dedec0cSmrg else 61419dedec0cSmrg version_type=irix 61429dedec0cSmrg fi ;; 61439dedec0cSmrg esac 61449dedec0cSmrg need_lib_prefix=no 61459dedec0cSmrg need_version=no 61469dedec0cSmrg soname_spec='$libname$release$shared_ext$major' 61479dedec0cSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' 61489dedec0cSmrg case $host_os in 61499dedec0cSmrg irix5* | nonstopux*) 61509dedec0cSmrg libsuff= shlibsuff= 61519dedec0cSmrg ;; 61529dedec0cSmrg *) 61539dedec0cSmrg case $LD in # libtool.m4 will add one of these switches to LD 61549dedec0cSmrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 61559dedec0cSmrg libsuff= shlibsuff= libmagic=32-bit;; 61569dedec0cSmrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 61579dedec0cSmrg libsuff=32 shlibsuff=N32 libmagic=N32;; 61589dedec0cSmrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 61599dedec0cSmrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 61609dedec0cSmrg *) libsuff= shlibsuff= libmagic=never-match;; 61619dedec0cSmrg esac 61629dedec0cSmrg ;; 61639dedec0cSmrg esac 61649dedec0cSmrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 61659dedec0cSmrg shlibpath_overrides_runpath=no 61669dedec0cSmrg sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" 61679dedec0cSmrg sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" 61689dedec0cSmrg hardcode_into_libs=yes 61699dedec0cSmrg ;; 6170e120bd27Smrg 61719dedec0cSmrg# No shared lib support for Linux oldld, aout, or coff. 61729dedec0cSmrglinux*oldld* | linux*aout* | linux*coff*) 61739dedec0cSmrg dynamic_linker=no 61749dedec0cSmrg ;; 6175e120bd27Smrg 61769dedec0cSmrglinux*android*) 61779dedec0cSmrg version_type=none # Android doesn't support versioned libraries. 61789dedec0cSmrg need_lib_prefix=no 61799dedec0cSmrg need_version=no 61809dedec0cSmrg library_names_spec='$libname$release$shared_ext' 61819dedec0cSmrg soname_spec='$libname$release$shared_ext' 61829dedec0cSmrg finish_cmds= 61839dedec0cSmrg shlibpath_var=LD_LIBRARY_PATH 61849dedec0cSmrg shlibpath_overrides_runpath=yes 61856c321187Smrg 61869dedec0cSmrg # This implies no fast_install, which is unacceptable. 61879dedec0cSmrg # Some rework will be needed to allow for fast_install 61889dedec0cSmrg # before this can be enabled. 61899dedec0cSmrg hardcode_into_libs=yes 61906c321187Smrg 61919dedec0cSmrg dynamic_linker='Android linker' 61929dedec0cSmrg # Don't embed -rpath directories since the linker doesn't support them. 61939dedec0cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 61949dedec0cSmrg ;; 61956c321187Smrg 61969dedec0cSmrg# This must be glibc/ELF. 61979dedec0cSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 61989dedec0cSmrg version_type=linux # correct to gnu/linux during the next big refactor 61999dedec0cSmrg need_lib_prefix=no 62009dedec0cSmrg need_version=no 62019dedec0cSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 62029dedec0cSmrg soname_spec='$libname$release$shared_ext$major' 62039dedec0cSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 62049dedec0cSmrg shlibpath_var=LD_LIBRARY_PATH 62059dedec0cSmrg shlibpath_overrides_runpath=no 62066c321187Smrg 62079dedec0cSmrg # Some binutils ld are patched to set DT_RUNPATH 62089dedec0cSmrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 62099dedec0cSmrg [lt_cv_shlibpath_overrides_runpath=no 62109dedec0cSmrg save_LDFLAGS=$LDFLAGS 62119dedec0cSmrg save_libdir=$libdir 62129dedec0cSmrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 62139dedec0cSmrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 62149dedec0cSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 62159dedec0cSmrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 62169dedec0cSmrg [lt_cv_shlibpath_overrides_runpath=yes])]) 62179dedec0cSmrg LDFLAGS=$save_LDFLAGS 62189dedec0cSmrg libdir=$save_libdir 62199dedec0cSmrg ]) 62209dedec0cSmrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 62216c321187Smrg 62229dedec0cSmrg # This implies no fast_install, which is unacceptable. 62239dedec0cSmrg # Some rework will be needed to allow for fast_install 62249dedec0cSmrg # before this can be enabled. 62259dedec0cSmrg hardcode_into_libs=yes 62266c321187Smrg 62279dedec0cSmrg # Ideally, we could use ldconfig to report *all* directores which are 62289dedec0cSmrg # searched for libraries, however this is still not possible. Aside from not 62299dedec0cSmrg # being certain /sbin/ldconfig is available, command 62309dedec0cSmrg # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, 62319dedec0cSmrg # even though it is searched at run-time. Try to do the best guess by 62329dedec0cSmrg # appending ld.so.conf contents (and includes) to the search path. 62339dedec0cSmrg if test -f /etc/ld.so.conf; then 62349dedec0cSmrg 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' ' '` 62359dedec0cSmrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 62369dedec0cSmrg fi 62376c321187Smrg 62389dedec0cSmrg # We used to test for /lib/ld.so.1 and disable shared libraries on 62399dedec0cSmrg # powerpc, because MkLinux only supported shared libraries with the 62409dedec0cSmrg # GNU dynamic linker. Since this was broken with cross compilers, 62419dedec0cSmrg # most powerpc-linux boxes support dynamic linking these days and 62429dedec0cSmrg # people can always --disable-shared, the test was removed, and we 62439dedec0cSmrg # assume the GNU/Linux dynamic linker is in use. 62449dedec0cSmrg dynamic_linker='GNU/Linux ld.so' 62459dedec0cSmrg ;; 6246e120bd27Smrg 62479dedec0cSmrgnetbsd*) 62489dedec0cSmrg version_type=sunos 62499dedec0cSmrg need_lib_prefix=no 62509dedec0cSmrg need_version=no 62519dedec0cSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 62529dedec0cSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 62539dedec0cSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 62549dedec0cSmrg dynamic_linker='NetBSD (a.out) ld.so' 62559dedec0cSmrg else 62569dedec0cSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 62579dedec0cSmrg soname_spec='$libname$release$shared_ext$major' 62589dedec0cSmrg dynamic_linker='NetBSD ld.elf_so' 62599dedec0cSmrg fi 62609dedec0cSmrg shlibpath_var=LD_LIBRARY_PATH 62619dedec0cSmrg shlibpath_overrides_runpath=yes 62629dedec0cSmrg hardcode_into_libs=yes 62639dedec0cSmrg ;; 6264e120bd27Smrg 62659dedec0cSmrgnewsos6) 62669dedec0cSmrg version_type=linux # correct to gnu/linux during the next big refactor 62679dedec0cSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 62689dedec0cSmrg shlibpath_var=LD_LIBRARY_PATH 62699dedec0cSmrg shlibpath_overrides_runpath=yes 62709dedec0cSmrg ;; 6271e120bd27Smrg 62729dedec0cSmrg*nto* | *qnx*) 62739dedec0cSmrg version_type=qnx 62749dedec0cSmrg need_lib_prefix=no 62759dedec0cSmrg need_version=no 62769dedec0cSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 62779dedec0cSmrg soname_spec='$libname$release$shared_ext$major' 62789dedec0cSmrg shlibpath_var=LD_LIBRARY_PATH 62799dedec0cSmrg shlibpath_overrides_runpath=no 62809dedec0cSmrg hardcode_into_libs=yes 62819dedec0cSmrg dynamic_linker='ldqnx.so' 62829dedec0cSmrg ;; 62830cc2eac3Smrg 62849dedec0cSmrgopenbsd* | bitrig*) 62859dedec0cSmrg version_type=sunos 62869dedec0cSmrg sys_lib_dlsearch_path_spec=/usr/lib 62879dedec0cSmrg need_lib_prefix=no 62889dedec0cSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 62899dedec0cSmrg need_version=no 62909dedec0cSmrg else 62919dedec0cSmrg need_version=yes 62929dedec0cSmrg fi 62939dedec0cSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 62949dedec0cSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 62959dedec0cSmrg shlibpath_var=LD_LIBRARY_PATH 62969dedec0cSmrg shlibpath_overrides_runpath=yes 62970cc2eac3Smrg ;; 62986c321187Smrg 62999dedec0cSmrgos2*) 63009dedec0cSmrg libname_spec='$name' 63019dedec0cSmrg version_type=windows 63029dedec0cSmrg shrext_cmds=.dll 63039dedec0cSmrg need_version=no 63049dedec0cSmrg need_lib_prefix=no 63059dedec0cSmrg # OS/2 can only load a DLL with a base name of 8 characters or less. 63069dedec0cSmrg soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; 63079dedec0cSmrg v=$($ECHO $release$versuffix | tr -d .-); 63089dedec0cSmrg n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); 63099dedec0cSmrg $ECHO $n$v`$shared_ext' 63109dedec0cSmrg library_names_spec='${libname}_dll.$libext' 63119dedec0cSmrg dynamic_linker='OS/2 ld.exe' 63129dedec0cSmrg shlibpath_var=BEGINLIBPATH 63139dedec0cSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 63149dedec0cSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 63159dedec0cSmrg postinstall_cmds='base_file=`basename \$file`~ 63169dedec0cSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ 63179dedec0cSmrg dldir=$destdir/`dirname \$dlpath`~ 63189dedec0cSmrg test -d \$dldir || mkdir -p \$dldir~ 63199dedec0cSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 63209dedec0cSmrg chmod a+x \$dldir/$dlname~ 63219dedec0cSmrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 63229dedec0cSmrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 63239dedec0cSmrg fi' 63249dedec0cSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ 63259dedec0cSmrg dlpath=$dir/\$dldll~ 63269dedec0cSmrg $RM \$dlpath' 63279dedec0cSmrg ;; 63286c321187Smrg 63299dedec0cSmrgosf3* | osf4* | osf5*) 63309dedec0cSmrg version_type=osf 63319dedec0cSmrg need_lib_prefix=no 63329dedec0cSmrg need_version=no 63339dedec0cSmrg soname_spec='$libname$release$shared_ext$major' 63349dedec0cSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 63359dedec0cSmrg shlibpath_var=LD_LIBRARY_PATH 63369dedec0cSmrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 63379dedec0cSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 63389dedec0cSmrg ;; 63390cc2eac3Smrg 63409dedec0cSmrgrdos*) 63419dedec0cSmrg dynamic_linker=no 63429dedec0cSmrg ;; 63436c321187Smrg 63449dedec0cSmrgsolaris*) 63459dedec0cSmrg version_type=linux # correct to gnu/linux during the next big refactor 63469dedec0cSmrg need_lib_prefix=no 63479dedec0cSmrg need_version=no 63489dedec0cSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 63499dedec0cSmrg soname_spec='$libname$release$shared_ext$major' 63509dedec0cSmrg shlibpath_var=LD_LIBRARY_PATH 63519dedec0cSmrg shlibpath_overrides_runpath=yes 63529dedec0cSmrg hardcode_into_libs=yes 63539dedec0cSmrg # ldd complains unless libraries are executable 63549dedec0cSmrg postinstall_cmds='chmod +x $lib' 63559dedec0cSmrg ;; 63566c321187Smrg 63579dedec0cSmrgsunos4*) 63589dedec0cSmrg version_type=sunos 63599dedec0cSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 63609dedec0cSmrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 63619dedec0cSmrg shlibpath_var=LD_LIBRARY_PATH 63629dedec0cSmrg shlibpath_overrides_runpath=yes 63639dedec0cSmrg if test yes = "$with_gnu_ld"; then 63649dedec0cSmrg need_lib_prefix=no 63659dedec0cSmrg fi 63669dedec0cSmrg need_version=yes 63679dedec0cSmrg ;; 63686c321187Smrg 63699dedec0cSmrgsysv4 | sysv4.3*) 63709dedec0cSmrg version_type=linux # correct to gnu/linux during the next big refactor 63719dedec0cSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 63729dedec0cSmrg soname_spec='$libname$release$shared_ext$major' 63739dedec0cSmrg shlibpath_var=LD_LIBRARY_PATH 63749dedec0cSmrg case $host_vendor in 63759dedec0cSmrg sni) 63769dedec0cSmrg shlibpath_overrides_runpath=no 63779dedec0cSmrg need_lib_prefix=no 63789dedec0cSmrg runpath_var=LD_RUN_PATH 63799dedec0cSmrg ;; 63809dedec0cSmrg siemens) 63819dedec0cSmrg need_lib_prefix=no 63829dedec0cSmrg ;; 63839dedec0cSmrg motorola) 63849dedec0cSmrg need_lib_prefix=no 63859dedec0cSmrg need_version=no 63869dedec0cSmrg shlibpath_overrides_runpath=no 63879dedec0cSmrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 63889dedec0cSmrg ;; 63899dedec0cSmrg esac 63909dedec0cSmrg ;; 6391e120bd27Smrg 63929dedec0cSmrgsysv4*MP*) 63939dedec0cSmrg if test -d /usr/nec; then 63949dedec0cSmrg version_type=linux # correct to gnu/linux during the next big refactor 63959dedec0cSmrg library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' 63969dedec0cSmrg soname_spec='$libname$shared_ext.$major' 63979dedec0cSmrg shlibpath_var=LD_LIBRARY_PATH 63989dedec0cSmrg fi 63999dedec0cSmrg ;; 6400e120bd27Smrg 64019dedec0cSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 64029dedec0cSmrg version_type=sco 64039dedec0cSmrg need_lib_prefix=no 64049dedec0cSmrg need_version=no 64059dedec0cSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' 64069dedec0cSmrg soname_spec='$libname$release$shared_ext$major' 64079dedec0cSmrg shlibpath_var=LD_LIBRARY_PATH 64089dedec0cSmrg shlibpath_overrides_runpath=yes 64099dedec0cSmrg hardcode_into_libs=yes 64109dedec0cSmrg if test yes = "$with_gnu_ld"; then 64119dedec0cSmrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 64129dedec0cSmrg else 64139dedec0cSmrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 64149dedec0cSmrg case $host_os in 64159dedec0cSmrg sco3.2v5*) 64169dedec0cSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 64179dedec0cSmrg ;; 64189dedec0cSmrg esac 64199dedec0cSmrg fi 64209dedec0cSmrg sys_lib_dlsearch_path_spec='/usr/lib' 64219dedec0cSmrg ;; 6422e120bd27Smrg 64239dedec0cSmrgtpf*) 64249dedec0cSmrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 64259dedec0cSmrg version_type=linux # correct to gnu/linux during the next big refactor 64269dedec0cSmrg need_lib_prefix=no 64279dedec0cSmrg need_version=no 64289dedec0cSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 64299dedec0cSmrg shlibpath_var=LD_LIBRARY_PATH 64309dedec0cSmrg shlibpath_overrides_runpath=no 64319dedec0cSmrg hardcode_into_libs=yes 64329dedec0cSmrg ;; 6433e120bd27Smrg 64349dedec0cSmrguts4*) 64359dedec0cSmrg version_type=linux # correct to gnu/linux during the next big refactor 64369dedec0cSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 64379dedec0cSmrg soname_spec='$libname$release$shared_ext$major' 64389dedec0cSmrg shlibpath_var=LD_LIBRARY_PATH 64399dedec0cSmrg ;; 6440e120bd27Smrg 64419dedec0cSmrg*) 64429dedec0cSmrg dynamic_linker=no 64439dedec0cSmrg ;; 64449dedec0cSmrgesac 64459dedec0cSmrgAC_MSG_RESULT([$dynamic_linker]) 64469dedec0cSmrgtest no = "$dynamic_linker" && can_build_shared=no 64476c321187Smrg 64489dedec0cSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 64499dedec0cSmrgif test yes = "$GCC"; then 64509dedec0cSmrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 64519dedec0cSmrgfi 64526c321187Smrg 64539dedec0cSmrgif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then 64549dedec0cSmrg sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec 64559dedec0cSmrgfi 6456e120bd27Smrg 64579dedec0cSmrgif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then 64589dedec0cSmrg sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec 64599dedec0cSmrgfi 64606c321187Smrg 64619dedec0cSmrg# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... 64629dedec0cSmrgconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec 6463e120bd27Smrg 64649dedec0cSmrg# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code 64659dedec0cSmrgfunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" 64666c321187Smrg 64679dedec0cSmrg# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool 64689dedec0cSmrgconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH 64696c321187Smrg 64709dedec0cSmrg_LT_DECL([], [variables_saved_for_relink], [1], 64719dedec0cSmrg [Variables whose values should be saved in libtool wrapper scripts and 64729dedec0cSmrg restored at link time]) 64739dedec0cSmrg_LT_DECL([], [need_lib_prefix], [0], 64749dedec0cSmrg [Do we need the "lib" prefix for modules?]) 64759dedec0cSmrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 64769dedec0cSmrg_LT_DECL([], [version_type], [0], [Library versioning type]) 64779dedec0cSmrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 64789dedec0cSmrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 64799dedec0cSmrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 64809dedec0cSmrg [Is shlibpath searched before the hard-coded library search path?]) 64819dedec0cSmrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 64829dedec0cSmrg_LT_DECL([], [library_names_spec], [1], 64839dedec0cSmrg [[List of archive names. First name is the real one, the rest are links. 64849dedec0cSmrg The last name is the one that the linker finds with -lNAME]]) 64859dedec0cSmrg_LT_DECL([], [soname_spec], [1], 64869dedec0cSmrg [[The coded name of the library, if different from the real name]]) 64879dedec0cSmrg_LT_DECL([], [install_override_mode], [1], 64889dedec0cSmrg [Permission mode override for installation of shared libraries]) 64899dedec0cSmrg_LT_DECL([], [postinstall_cmds], [2], 64909dedec0cSmrg [Command to use after installation of a shared archive]) 64919dedec0cSmrg_LT_DECL([], [postuninstall_cmds], [2], 64929dedec0cSmrg [Command to use after uninstallation of a shared archive]) 64939dedec0cSmrg_LT_DECL([], [finish_cmds], [2], 64949dedec0cSmrg [Commands used to finish a libtool library installation in a directory]) 64959dedec0cSmrg_LT_DECL([], [finish_eval], [1], 64969dedec0cSmrg [[As "finish_cmds", except a single script fragment to be evaled but 64979dedec0cSmrg not shown]]) 64989dedec0cSmrg_LT_DECL([], [hardcode_into_libs], [0], 64999dedec0cSmrg [Whether we should hardcode library paths into libraries]) 65009dedec0cSmrg_LT_DECL([], [sys_lib_search_path_spec], [2], 65019dedec0cSmrg [Compile-time system search path for libraries]) 65029dedec0cSmrg_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], 65039dedec0cSmrg [Detected run-time system search path for libraries]) 65049dedec0cSmrg_LT_DECL([], [configure_time_lt_sys_library_path], [2], 65059dedec0cSmrg [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) 65069dedec0cSmrg])# _LT_SYS_DYNAMIC_LINKER 65076c321187Smrg 65086c321187Smrg 65099dedec0cSmrg# _LT_PATH_TOOL_PREFIX(TOOL) 65109dedec0cSmrg# -------------------------- 65119dedec0cSmrg# find a file program that can recognize shared library 65129dedec0cSmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 65139dedec0cSmrg[m4_require([_LT_DECL_EGREP])dnl 65149dedec0cSmrgAC_MSG_CHECKING([for $1]) 65159dedec0cSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 65169dedec0cSmrg[case $MAGIC_CMD in 65179dedec0cSmrg[[\\/*] | ?:[\\/]*]) 65189dedec0cSmrg lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. 65199dedec0cSmrg ;; 65209dedec0cSmrg*) 65219dedec0cSmrg lt_save_MAGIC_CMD=$MAGIC_CMD 65229dedec0cSmrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 65239dedec0cSmrgdnl $ac_dummy forces splitting on constant user-supplied paths. 65249dedec0cSmrgdnl POSIX.2 word splitting is done only on the output of word expansions, 65259dedec0cSmrgdnl not every word. This closes a longstanding sh security hole. 65269dedec0cSmrg ac_dummy="m4_if([$2], , $PATH, [$2])" 65279dedec0cSmrg for ac_dir in $ac_dummy; do 65289dedec0cSmrg IFS=$lt_save_ifs 65299dedec0cSmrg test -z "$ac_dir" && ac_dir=. 65309dedec0cSmrg if test -f "$ac_dir/$1"; then 65319dedec0cSmrg lt_cv_path_MAGIC_CMD=$ac_dir/"$1" 65329dedec0cSmrg if test -n "$file_magic_test_file"; then 65339dedec0cSmrg case $deplibs_check_method in 65349dedec0cSmrg "file_magic "*) 65359dedec0cSmrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 65369dedec0cSmrg MAGIC_CMD=$lt_cv_path_MAGIC_CMD 65379dedec0cSmrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 65389dedec0cSmrg $EGREP "$file_magic_regex" > /dev/null; then 65399dedec0cSmrg : 65409dedec0cSmrg else 65419dedec0cSmrg cat <<_LT_EOF 1>&2 65426c321187Smrg 65439dedec0cSmrg*** Warning: the command libtool uses to detect shared libraries, 65449dedec0cSmrg*** $file_magic_cmd, produces output that libtool cannot recognize. 65459dedec0cSmrg*** The result is that libtool may fail to recognize shared libraries 65469dedec0cSmrg*** as such. This will affect the creation of libtool libraries that 65479dedec0cSmrg*** depend on shared libraries, but programs linked with such libtool 65489dedec0cSmrg*** libraries will work regardless of this problem. Nevertheless, you 65499dedec0cSmrg*** may want to report the problem to your system manager and/or to 65509dedec0cSmrg*** bug-libtool@gnu.org 65516c321187Smrg 65529dedec0cSmrg_LT_EOF 65539dedec0cSmrg fi ;; 65549dedec0cSmrg esac 65559dedec0cSmrg fi 65569dedec0cSmrg break 65579dedec0cSmrg fi 65589dedec0cSmrg done 65599dedec0cSmrg IFS=$lt_save_ifs 65609dedec0cSmrg MAGIC_CMD=$lt_save_MAGIC_CMD 65619dedec0cSmrg ;; 65629dedec0cSmrgesac]) 65639dedec0cSmrgMAGIC_CMD=$lt_cv_path_MAGIC_CMD 65649dedec0cSmrgif test -n "$MAGIC_CMD"; then 65659dedec0cSmrg AC_MSG_RESULT($MAGIC_CMD) 65669dedec0cSmrgelse 65679dedec0cSmrg AC_MSG_RESULT(no) 65680cc2eac3Smrgfi 65699dedec0cSmrg_LT_DECL([], [MAGIC_CMD], [0], 65709dedec0cSmrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 65719dedec0cSmrg])# _LT_PATH_TOOL_PREFIX 65726c321187Smrg 65739dedec0cSmrg# Old name: 65749dedec0cSmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 65759dedec0cSmrgdnl aclocal-1.4 backwards compatibility: 65769dedec0cSmrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 657793493779Smrg 65786c321187Smrg 65799dedec0cSmrg# _LT_PATH_MAGIC 65809dedec0cSmrg# -------------- 65819dedec0cSmrg# find a file program that can recognize a shared library 65829dedec0cSmrgm4_defun([_LT_PATH_MAGIC], 65839dedec0cSmrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 65849dedec0cSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then 65859dedec0cSmrg if test -n "$ac_tool_prefix"; then 65869dedec0cSmrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 65879dedec0cSmrg else 65889dedec0cSmrg MAGIC_CMD=: 65899dedec0cSmrg fi 65909dedec0cSmrgfi 65919dedec0cSmrg])# _LT_PATH_MAGIC 65926c321187Smrg 65936c321187Smrg 65949dedec0cSmrg# LT_PATH_LD 65959dedec0cSmrg# ---------- 65969dedec0cSmrg# find the pathname to the GNU or non-GNU linker 65979dedec0cSmrgAC_DEFUN([LT_PATH_LD], 65989dedec0cSmrg[AC_REQUIRE([AC_PROG_CC])dnl 65999dedec0cSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 66009dedec0cSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 66019dedec0cSmrgm4_require([_LT_DECL_SED])dnl 66029dedec0cSmrgm4_require([_LT_DECL_EGREP])dnl 66039dedec0cSmrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 6604e120bd27Smrg 66059dedec0cSmrgAC_ARG_WITH([gnu-ld], 66069dedec0cSmrg [AS_HELP_STRING([--with-gnu-ld], 66079dedec0cSmrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 66089dedec0cSmrg [test no = "$withval" || with_gnu_ld=yes], 66099dedec0cSmrg [with_gnu_ld=no])dnl 6610e120bd27Smrg 66119dedec0cSmrgac_prog=ld 66129dedec0cSmrgif test yes = "$GCC"; then 66139dedec0cSmrg # Check if gcc -print-prog-name=ld gives a path. 66149dedec0cSmrg AC_MSG_CHECKING([for ld used by $CC]) 66159dedec0cSmrg case $host in 66169dedec0cSmrg *-*-mingw*) 66179dedec0cSmrg # gcc leaves a trailing carriage return, which upsets mingw 66189dedec0cSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 66199dedec0cSmrg *) 66209dedec0cSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 66219dedec0cSmrg esac 66229dedec0cSmrg case $ac_prog in 66239dedec0cSmrg # Accept absolute paths. 66249dedec0cSmrg [[\\/]]* | ?:[[\\/]]*) 66259dedec0cSmrg re_direlt='/[[^/]][[^/]]*/\.\./' 66269dedec0cSmrg # Canonicalize the pathname of ld 66279dedec0cSmrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 66289dedec0cSmrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 66299dedec0cSmrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 66309dedec0cSmrg done 66319dedec0cSmrg test -z "$LD" && LD=$ac_prog 66329dedec0cSmrg ;; 66339dedec0cSmrg "") 66349dedec0cSmrg # If it fails, then pretend we aren't using GCC. 66359dedec0cSmrg ac_prog=ld 66369dedec0cSmrg ;; 66379dedec0cSmrg *) 66389dedec0cSmrg # If it is relative, then search for the first ld in PATH. 66399dedec0cSmrg with_gnu_ld=unknown 66409dedec0cSmrg ;; 66419dedec0cSmrg esac 66429dedec0cSmrgelif test yes = "$with_gnu_ld"; then 66439dedec0cSmrg AC_MSG_CHECKING([for GNU ld]) 66449dedec0cSmrgelse 66459dedec0cSmrg AC_MSG_CHECKING([for non-GNU ld]) 66469dedec0cSmrgfi 66479dedec0cSmrgAC_CACHE_VAL(lt_cv_path_LD, 66489dedec0cSmrg[if test -z "$LD"; then 66499dedec0cSmrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 66509dedec0cSmrg for ac_dir in $PATH; do 66519dedec0cSmrg IFS=$lt_save_ifs 66529dedec0cSmrg test -z "$ac_dir" && ac_dir=. 66539dedec0cSmrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 66549dedec0cSmrg lt_cv_path_LD=$ac_dir/$ac_prog 66559dedec0cSmrg # Check to see if the program is GNU ld. I'd rather use --version, 66569dedec0cSmrg # but apparently some variants of GNU ld only accept -v. 66579dedec0cSmrg # Break only if it was the GNU/non-GNU ld that we prefer. 66589dedec0cSmrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 66599dedec0cSmrg *GNU* | *'with BFD'*) 66609dedec0cSmrg test no != "$with_gnu_ld" && break 66619dedec0cSmrg ;; 66629dedec0cSmrg *) 66639dedec0cSmrg test yes != "$with_gnu_ld" && break 66649dedec0cSmrg ;; 66659dedec0cSmrg esac 66669dedec0cSmrg fi 66679dedec0cSmrg done 66689dedec0cSmrg IFS=$lt_save_ifs 66699dedec0cSmrgelse 66709dedec0cSmrg lt_cv_path_LD=$LD # Let the user override the test with a path. 66719dedec0cSmrgfi]) 66729dedec0cSmrgLD=$lt_cv_path_LD 66739dedec0cSmrgif test -n "$LD"; then 66749dedec0cSmrg AC_MSG_RESULT($LD) 66759dedec0cSmrgelse 66769dedec0cSmrg AC_MSG_RESULT(no) 66779dedec0cSmrgfi 66789dedec0cSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 66799dedec0cSmrg_LT_PATH_LD_GNU 66809dedec0cSmrgAC_SUBST([LD]) 66810cc2eac3Smrg 66829dedec0cSmrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 66839dedec0cSmrg])# LT_PATH_LD 66840cc2eac3Smrg 66859dedec0cSmrg# Old names: 66869dedec0cSmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 66879dedec0cSmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 66889dedec0cSmrgdnl aclocal-1.4 backwards compatibility: 66899dedec0cSmrgdnl AC_DEFUN([AM_PROG_LD], []) 66909dedec0cSmrgdnl AC_DEFUN([AC_PROG_LD], []) 66910cc2eac3Smrg 66920cc2eac3Smrg 66939dedec0cSmrg# _LT_PATH_LD_GNU 66949dedec0cSmrg#- -------------- 66959dedec0cSmrgm4_defun([_LT_PATH_LD_GNU], 66969dedec0cSmrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 66979dedec0cSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 66989dedec0cSmrgcase `$LD -v 2>&1 </dev/null` in 66999dedec0cSmrg*GNU* | *'with BFD'*) 67009dedec0cSmrg lt_cv_prog_gnu_ld=yes 67019dedec0cSmrg ;; 67029dedec0cSmrg*) 67039dedec0cSmrg lt_cv_prog_gnu_ld=no 67049dedec0cSmrg ;; 67059dedec0cSmrgesac]) 67069dedec0cSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 67079dedec0cSmrg])# _LT_PATH_LD_GNU 67086c321187Smrg 6709e120bd27Smrg 67109dedec0cSmrg# _LT_CMD_RELOAD 67119dedec0cSmrg# -------------- 67129dedec0cSmrg# find reload flag for linker 67139dedec0cSmrg# -- PORTME Some linkers may need a different reload flag. 67149dedec0cSmrgm4_defun([_LT_CMD_RELOAD], 67159dedec0cSmrg[AC_CACHE_CHECK([for $LD option to reload object files], 67169dedec0cSmrg lt_cv_ld_reload_flag, 67179dedec0cSmrg [lt_cv_ld_reload_flag='-r']) 67189dedec0cSmrgreload_flag=$lt_cv_ld_reload_flag 67199dedec0cSmrgcase $reload_flag in 67209dedec0cSmrg"" | " "*) ;; 67219dedec0cSmrg*) reload_flag=" $reload_flag" ;; 67229dedec0cSmrgesac 67239dedec0cSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 67249dedec0cSmrgcase $host_os in 67259dedec0cSmrg cygwin* | mingw* | pw32* | cegcc*) 67269dedec0cSmrg if test yes != "$GCC"; then 67279dedec0cSmrg reload_cmds=false 67289dedec0cSmrg fi 67299dedec0cSmrg ;; 67309dedec0cSmrg darwin*) 67319dedec0cSmrg if test yes = "$GCC"; then 67329dedec0cSmrg reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' 67339dedec0cSmrg else 67349dedec0cSmrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 67359dedec0cSmrg fi 67369dedec0cSmrg ;; 67379dedec0cSmrgesac 67389dedec0cSmrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 67399dedec0cSmrg_LT_TAGDECL([], [reload_cmds], [2])dnl 67409dedec0cSmrg])# _LT_CMD_RELOAD 67416c321187Smrg 67426c321187Smrg 67439dedec0cSmrg# _LT_PATH_DD 67449dedec0cSmrg# ----------- 67459dedec0cSmrg# find a working dd 67469dedec0cSmrgm4_defun([_LT_PATH_DD], 67479dedec0cSmrg[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD], 67489dedec0cSmrg[printf 0123456789abcdef0123456789abcdef >conftest.i 67499dedec0cSmrgcat conftest.i conftest.i >conftest2.i 67509dedec0cSmrg: ${lt_DD:=$DD} 67519dedec0cSmrgAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], 67529dedec0cSmrg[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 67539dedec0cSmrg cmp -s conftest.i conftest.out \ 67549dedec0cSmrg && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: 67559dedec0cSmrgfi]) 67569dedec0cSmrgrm -f conftest.i conftest2.i conftest.out]) 67579dedec0cSmrg])# _LT_PATH_DD 6758e120bd27Smrg 6759e120bd27Smrg 67609dedec0cSmrg# _LT_CMD_TRUNCATE 67619dedec0cSmrg# ---------------- 67629dedec0cSmrg# find command to truncate a binary pipe 67639dedec0cSmrgm4_defun([_LT_CMD_TRUNCATE], 67649dedec0cSmrg[m4_require([_LT_PATH_DD]) 67659dedec0cSmrgAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], 67669dedec0cSmrg[printf 0123456789abcdef0123456789abcdef >conftest.i 67679dedec0cSmrgcat conftest.i conftest.i >conftest2.i 67689dedec0cSmrglt_cv_truncate_bin= 67699dedec0cSmrgif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 67709dedec0cSmrg cmp -s conftest.i conftest.out \ 67719dedec0cSmrg && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" 67729dedec0cSmrgfi 67739dedec0cSmrgrm -f conftest.i conftest2.i conftest.out 67749dedec0cSmrgtest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) 67759dedec0cSmrg_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], 67769dedec0cSmrg [Command to truncate a binary pipe]) 67779dedec0cSmrg])# _LT_CMD_TRUNCATE 67786c321187Smrg 67796c321187Smrg 67809dedec0cSmrg# _LT_CHECK_MAGIC_METHOD 67819dedec0cSmrg# ---------------------- 67829dedec0cSmrg# how to check for library dependencies 67839dedec0cSmrg# -- PORTME fill in with the dynamic library characteristics 67849dedec0cSmrgm4_defun([_LT_CHECK_MAGIC_METHOD], 67859dedec0cSmrg[m4_require([_LT_DECL_EGREP]) 67869dedec0cSmrgm4_require([_LT_DECL_OBJDUMP]) 67879dedec0cSmrgAC_CACHE_CHECK([how to recognize dependent libraries], 67889dedec0cSmrglt_cv_deplibs_check_method, 67899dedec0cSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 67909dedec0cSmrglt_cv_file_magic_test_file= 67919dedec0cSmrglt_cv_deplibs_check_method='unknown' 67929dedec0cSmrg# Need to set the preceding variable on all platforms that support 67939dedec0cSmrg# interlibrary dependencies. 67949dedec0cSmrg# 'none' -- dependencies not supported. 67959dedec0cSmrg# 'unknown' -- same as none, but documents that we really don't know. 67969dedec0cSmrg# 'pass_all' -- all dependencies passed with no checks. 67979dedec0cSmrg# 'test_compile' -- check by making test program. 67989dedec0cSmrg# 'file_magic [[regex]]' -- check by looking for files in library path 67999dedec0cSmrg# that responds to the $file_magic_cmd with a given extended regex. 68009dedec0cSmrg# If you have 'file' or equivalent on your system and you're not sure 68019dedec0cSmrg# whether 'pass_all' will *always* work, you probably want this one. 68026c321187Smrg 68039dedec0cSmrgcase $host_os in 68049dedec0cSmrgaix[[4-9]]*) 68059dedec0cSmrg lt_cv_deplibs_check_method=pass_all 68069dedec0cSmrg ;; 68070cc2eac3Smrg 68089dedec0cSmrgbeos*) 68099dedec0cSmrg lt_cv_deplibs_check_method=pass_all 68109dedec0cSmrg ;; 68110cc2eac3Smrg 68129dedec0cSmrgbsdi[[45]]*) 68139dedec0cSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 68149dedec0cSmrg lt_cv_file_magic_cmd='$FILECMD -L' 68159dedec0cSmrg lt_cv_file_magic_test_file=/shlib/libc.so 68169dedec0cSmrg ;; 68170cc2eac3Smrg 68189dedec0cSmrgcygwin*) 68199dedec0cSmrg # func_win32_libid is a shell function defined in ltmain.sh 68209dedec0cSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 68219dedec0cSmrg lt_cv_file_magic_cmd='func_win32_libid' 68229dedec0cSmrg ;; 68230cc2eac3Smrg 68249dedec0cSmrgmingw* | pw32*) 68259dedec0cSmrg # Base MSYS/MinGW do not provide the 'file' command needed by 68269dedec0cSmrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 68279dedec0cSmrg # unless we find 'file', for example because we are cross-compiling. 68289dedec0cSmrg if ( file / ) >/dev/null 2>&1; then 68299dedec0cSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 68309dedec0cSmrg lt_cv_file_magic_cmd='func_win32_libid' 68319dedec0cSmrg else 68329dedec0cSmrg # Keep this pattern in sync with the one in func_win32_libid. 68339dedec0cSmrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 68349dedec0cSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 68359dedec0cSmrg fi 68369dedec0cSmrg ;; 68370cc2eac3Smrg 68389dedec0cSmrgcegcc*) 68399dedec0cSmrg # use the weaker test based on 'objdump'. See mingw*. 68409dedec0cSmrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 68419dedec0cSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 68429dedec0cSmrg ;; 68430cc2eac3Smrg 68449dedec0cSmrgdarwin* | rhapsody*) 68459dedec0cSmrg lt_cv_deplibs_check_method=pass_all 68469dedec0cSmrg ;; 68470cc2eac3Smrg 68489dedec0cSmrgfreebsd* | dragonfly* | midnightbsd*) 68499dedec0cSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 68509dedec0cSmrg case $host_cpu in 68519dedec0cSmrg i*86 ) 68529dedec0cSmrg # Not sure whether the presence of OpenBSD here was a mistake. 68539dedec0cSmrg # Let's accept both of them until this is cleared up. 68549dedec0cSmrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 68559dedec0cSmrg lt_cv_file_magic_cmd=$FILECMD 68569dedec0cSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 68579dedec0cSmrg ;; 68589dedec0cSmrg esac 68599dedec0cSmrg else 68609dedec0cSmrg lt_cv_deplibs_check_method=pass_all 68619dedec0cSmrg fi 68629dedec0cSmrg ;; 68630cc2eac3Smrg 68649dedec0cSmrghaiku*) 68659dedec0cSmrg lt_cv_deplibs_check_method=pass_all 68669dedec0cSmrg ;; 68670cc2eac3Smrg 68689dedec0cSmrghpux10.20* | hpux11*) 68699dedec0cSmrg lt_cv_file_magic_cmd=$FILECMD 68709dedec0cSmrg case $host_cpu in 68719dedec0cSmrg ia64*) 68729dedec0cSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 68739dedec0cSmrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 68749dedec0cSmrg ;; 68759dedec0cSmrg hppa*64*) 68769dedec0cSmrg [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]'] 68779dedec0cSmrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 68789dedec0cSmrg ;; 68799dedec0cSmrg *) 68809dedec0cSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 68819dedec0cSmrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 68829dedec0cSmrg ;; 68839dedec0cSmrg esac 68849dedec0cSmrg ;; 68850cc2eac3Smrg 68869dedec0cSmrginterix[[3-9]]*) 68879dedec0cSmrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 68889dedec0cSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 68899dedec0cSmrg ;; 68900cc2eac3Smrg 68919dedec0cSmrgirix5* | irix6* | nonstopux*) 68929dedec0cSmrg case $LD in 68939dedec0cSmrg *-32|*"-32 ") libmagic=32-bit;; 68949dedec0cSmrg *-n32|*"-n32 ") libmagic=N32;; 68959dedec0cSmrg *-64|*"-64 ") libmagic=64-bit;; 68969dedec0cSmrg *) libmagic=never-match;; 68979dedec0cSmrg esac 68989dedec0cSmrg lt_cv_deplibs_check_method=pass_all 68999dedec0cSmrg ;; 69000cc2eac3Smrg 69019dedec0cSmrg# This must be glibc/ELF. 69029dedec0cSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 69039dedec0cSmrg lt_cv_deplibs_check_method=pass_all 69049dedec0cSmrg ;; 6905e120bd27Smrg 69069dedec0cSmrgnetbsd*) 69079dedec0cSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 69089dedec0cSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 69099dedec0cSmrg else 69109dedec0cSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 69119dedec0cSmrg fi 69129dedec0cSmrg ;; 6913e120bd27Smrg 69149dedec0cSmrgnewos6*) 69159dedec0cSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 69169dedec0cSmrg lt_cv_file_magic_cmd=$FILECMD 69179dedec0cSmrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 69189dedec0cSmrg ;; 69199d0b5e55Smrg 69209dedec0cSmrg*nto* | *qnx*) 69219dedec0cSmrg lt_cv_deplibs_check_method=pass_all 69229dedec0cSmrg ;; 69239d0b5e55Smrg 69249dedec0cSmrgopenbsd* | bitrig*) 69259dedec0cSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 69269dedec0cSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 69279dedec0cSmrg else 69289dedec0cSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 69299dedec0cSmrg fi 69309dedec0cSmrg ;; 69319d0b5e55Smrg 69329dedec0cSmrgosf3* | osf4* | osf5*) 69339dedec0cSmrg lt_cv_deplibs_check_method=pass_all 69349dedec0cSmrg ;; 69359d0b5e55Smrg 69369dedec0cSmrgrdos*) 69379dedec0cSmrg lt_cv_deplibs_check_method=pass_all 69389dedec0cSmrg ;; 69399d0b5e55Smrg 69409dedec0cSmrgsolaris*) 69419dedec0cSmrg lt_cv_deplibs_check_method=pass_all 69429dedec0cSmrg ;; 69439d0b5e55Smrg 69449dedec0cSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 69459dedec0cSmrg lt_cv_deplibs_check_method=pass_all 69469dedec0cSmrg ;; 69479d0b5e55Smrg 69489dedec0cSmrgsysv4 | sysv4.3*) 69499dedec0cSmrg case $host_vendor in 69509dedec0cSmrg motorola) 69519dedec0cSmrg 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]]' 69529dedec0cSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 69539dedec0cSmrg ;; 69549dedec0cSmrg ncr) 69559dedec0cSmrg lt_cv_deplibs_check_method=pass_all 69569dedec0cSmrg ;; 69579dedec0cSmrg sequent) 69589dedec0cSmrg lt_cv_file_magic_cmd='/bin/file' 69599dedec0cSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 69609dedec0cSmrg ;; 69619dedec0cSmrg sni) 69629dedec0cSmrg lt_cv_file_magic_cmd='/bin/file' 69639dedec0cSmrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 69649dedec0cSmrg lt_cv_file_magic_test_file=/lib/libc.so 69659dedec0cSmrg ;; 69669dedec0cSmrg siemens) 69679dedec0cSmrg lt_cv_deplibs_check_method=pass_all 69689dedec0cSmrg ;; 69699dedec0cSmrg pc) 69709dedec0cSmrg lt_cv_deplibs_check_method=pass_all 69719dedec0cSmrg ;; 69729dedec0cSmrg esac 69739dedec0cSmrg ;; 69749d0b5e55Smrg 69759dedec0cSmrgtpf*) 69769dedec0cSmrg lt_cv_deplibs_check_method=pass_all 69779dedec0cSmrg ;; 69789dedec0cSmrgos2*) 69799dedec0cSmrg lt_cv_deplibs_check_method=pass_all 69809dedec0cSmrg ;; 69819dedec0cSmrgesac 69829dedec0cSmrg]) 69839d0b5e55Smrg 69849dedec0cSmrgfile_magic_glob= 69859dedec0cSmrgwant_nocaseglob=no 69869dedec0cSmrgif test "$build" = "$host"; then 69879dedec0cSmrg case $host_os in 69889dedec0cSmrg mingw* | pw32*) 69899dedec0cSmrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 69909dedec0cSmrg want_nocaseglob=yes 69919dedec0cSmrg else 69929dedec0cSmrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 69939dedec0cSmrg fi 69949dedec0cSmrg ;; 69959dedec0cSmrg esac 69969d0b5e55Smrgfi 69979d0b5e55Smrg 69989dedec0cSmrgfile_magic_cmd=$lt_cv_file_magic_cmd 69999dedec0cSmrgdeplibs_check_method=$lt_cv_deplibs_check_method 70009dedec0cSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 70019d0b5e55Smrg 70029dedec0cSmrg_LT_DECL([], [deplibs_check_method], [1], 70039dedec0cSmrg [Method to check whether dependent libraries are shared objects]) 70049dedec0cSmrg_LT_DECL([], [file_magic_cmd], [1], 70059dedec0cSmrg [Command to use when deplibs_check_method = "file_magic"]) 70069dedec0cSmrg_LT_DECL([], [file_magic_glob], [1], 70079dedec0cSmrg [How to find potential files when deplibs_check_method = "file_magic"]) 70089dedec0cSmrg_LT_DECL([], [want_nocaseglob], [1], 70099dedec0cSmrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 70109dedec0cSmrg])# _LT_CHECK_MAGIC_METHOD 70119d0b5e55Smrg 70126c321187Smrg 70139dedec0cSmrg# LT_PATH_NM 70149dedec0cSmrg# ---------- 70159dedec0cSmrg# find the pathname to a BSD- or MS-compatible name lister 70169dedec0cSmrgAC_DEFUN([LT_PATH_NM], 70179dedec0cSmrg[AC_REQUIRE([AC_PROG_CC])dnl 70189dedec0cSmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 70199dedec0cSmrg[if test -n "$NM"; then 70209dedec0cSmrg # Let the user override the test. 70219dedec0cSmrg lt_cv_path_NM=$NM 70229dedec0cSmrgelse 70239dedec0cSmrg lt_nm_to_check=${ac_tool_prefix}nm 70249dedec0cSmrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 70259dedec0cSmrg lt_nm_to_check="$lt_nm_to_check nm" 70269dedec0cSmrg fi 70279dedec0cSmrg for lt_tmp_nm in $lt_nm_to_check; do 70289dedec0cSmrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 70299dedec0cSmrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 70309dedec0cSmrg IFS=$lt_save_ifs 70319dedec0cSmrg test -z "$ac_dir" && ac_dir=. 70329dedec0cSmrg tmp_nm=$ac_dir/$lt_tmp_nm 70339dedec0cSmrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then 70349dedec0cSmrg # Check to see if the nm accepts a BSD-compat flag. 70359dedec0cSmrg # Adding the 'sed 1q' prevents false positives on HP-UX, which says: 70369dedec0cSmrg # nm: unknown option "B" ignored 70379dedec0cSmrg # Tru64's nm complains that /dev/null is an invalid object file 70389dedec0cSmrg # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty 70399dedec0cSmrg case $build_os in 70409dedec0cSmrg mingw*) lt_bad_file=conftest.nm/nofile ;; 70419dedec0cSmrg *) lt_bad_file=/dev/null ;; 70429dedec0cSmrg esac 70439dedec0cSmrg case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in 70449dedec0cSmrg *$lt_bad_file* | *'Invalid file or object type'*) 70459dedec0cSmrg lt_cv_path_NM="$tmp_nm -B" 70469dedec0cSmrg break 2 70479dedec0cSmrg ;; 70489dedec0cSmrg *) 70499dedec0cSmrg case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in 70509dedec0cSmrg */dev/null*) 70519dedec0cSmrg lt_cv_path_NM="$tmp_nm -p" 70529dedec0cSmrg break 2 70539dedec0cSmrg ;; 70549dedec0cSmrg *) 70559dedec0cSmrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 70569dedec0cSmrg continue # so that we can try to find one that supports BSD flags 70579dedec0cSmrg ;; 70589dedec0cSmrg esac 70599dedec0cSmrg ;; 70609dedec0cSmrg esac 70619dedec0cSmrg fi 70629dedec0cSmrg done 70639dedec0cSmrg IFS=$lt_save_ifs 70649dedec0cSmrg done 70659dedec0cSmrg : ${lt_cv_path_NM=no} 70669dedec0cSmrgfi]) 70679dedec0cSmrgif test no != "$lt_cv_path_NM"; then 70689dedec0cSmrg NM=$lt_cv_path_NM 70699dedec0cSmrgelse 70709dedec0cSmrg # Didn't find any BSD compatible name lister, look for dumpbin. 70719dedec0cSmrg if test -n "$DUMPBIN"; then : 70729dedec0cSmrg # Let the user override the test. 70739dedec0cSmrg else 70749dedec0cSmrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 70759dedec0cSmrg case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in 70769dedec0cSmrg *COFF*) 70779dedec0cSmrg DUMPBIN="$DUMPBIN -symbols -headers" 70789dedec0cSmrg ;; 70799dedec0cSmrg *) 70809dedec0cSmrg DUMPBIN=: 70819dedec0cSmrg ;; 70829dedec0cSmrg esac 70839dedec0cSmrg fi 70849dedec0cSmrg AC_SUBST([DUMPBIN]) 70859dedec0cSmrg if test : != "$DUMPBIN"; then 70869dedec0cSmrg NM=$DUMPBIN 70879dedec0cSmrg fi 70889dedec0cSmrgfi 70899dedec0cSmrgtest -z "$NM" && NM=nm 70909dedec0cSmrgAC_SUBST([NM]) 70919dedec0cSmrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 70926c321187Smrg 70939dedec0cSmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 70949dedec0cSmrg [lt_cv_nm_interface="BSD nm" 70959dedec0cSmrg echo "int some_variable = 0;" > conftest.$ac_ext 70969dedec0cSmrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 70979dedec0cSmrg (eval "$ac_compile" 2>conftest.err) 70989dedec0cSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 70999dedec0cSmrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 71009dedec0cSmrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 71019dedec0cSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 71029dedec0cSmrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 71039dedec0cSmrg cat conftest.out >&AS_MESSAGE_LOG_FD 71049dedec0cSmrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 71059dedec0cSmrg lt_cv_nm_interface="MS dumpbin" 71069dedec0cSmrg fi 71079dedec0cSmrg rm -f conftest*]) 71089dedec0cSmrg])# LT_PATH_NM 71096c321187Smrg 71109dedec0cSmrg# Old names: 71119dedec0cSmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 71129dedec0cSmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 71139dedec0cSmrgdnl aclocal-1.4 backwards compatibility: 71149dedec0cSmrgdnl AC_DEFUN([AM_PROG_NM], []) 71159dedec0cSmrgdnl AC_DEFUN([AC_PROG_NM], []) 71166c321187Smrg 71179dedec0cSmrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 71189dedec0cSmrg# -------------------------------- 71199dedec0cSmrg# how to determine the name of the shared library 71209dedec0cSmrg# associated with a specific link library. 71219dedec0cSmrg# -- PORTME fill in with the dynamic library characteristics 71229dedec0cSmrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 71239dedec0cSmrg[m4_require([_LT_DECL_EGREP]) 71249dedec0cSmrgm4_require([_LT_DECL_OBJDUMP]) 71259dedec0cSmrgm4_require([_LT_DECL_DLLTOOL]) 71269dedec0cSmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 71279dedec0cSmrglt_cv_sharedlib_from_linklib_cmd, 71289dedec0cSmrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 71296c321187Smrg 71309dedec0cSmrgcase $host_os in 71319dedec0cSmrgcygwin* | mingw* | pw32* | cegcc*) 71329dedec0cSmrg # two different shell functions defined in ltmain.sh; 71339dedec0cSmrg # decide which one to use based on capabilities of $DLLTOOL 71349dedec0cSmrg case `$DLLTOOL --help 2>&1` in 71359dedec0cSmrg *--identify-strict*) 71369dedec0cSmrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 71379dedec0cSmrg ;; 71389dedec0cSmrg *) 71399dedec0cSmrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 71409dedec0cSmrg ;; 71419dedec0cSmrg esac 71429dedec0cSmrg ;; 71439dedec0cSmrg*) 71449dedec0cSmrg # fallback: assume linklib IS sharedlib 71459dedec0cSmrg lt_cv_sharedlib_from_linklib_cmd=$ECHO 71469dedec0cSmrg ;; 71479dedec0cSmrgesac 71489dedec0cSmrg]) 71499dedec0cSmrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 71509dedec0cSmrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 71516c321187Smrg 71529dedec0cSmrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 71539dedec0cSmrg [Command to associate shared and link libraries]) 71549dedec0cSmrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 71556c321187Smrg 71566c321187Smrg 71579dedec0cSmrg# _LT_PATH_MANIFEST_TOOL 71589dedec0cSmrg# ---------------------- 71599dedec0cSmrg# locate the manifest tool 71609dedec0cSmrgm4_defun([_LT_PATH_MANIFEST_TOOL], 71619dedec0cSmrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 71629dedec0cSmrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 71639dedec0cSmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 71649dedec0cSmrg [lt_cv_path_mainfest_tool=no 71659dedec0cSmrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 71669dedec0cSmrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 71679dedec0cSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 71689dedec0cSmrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 71699dedec0cSmrg lt_cv_path_mainfest_tool=yes 71709dedec0cSmrg fi 71719dedec0cSmrg rm -f conftest*]) 71729dedec0cSmrgif test yes != "$lt_cv_path_mainfest_tool"; then 71739dedec0cSmrg MANIFEST_TOOL=: 71740cc2eac3Smrgfi 71759dedec0cSmrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 71769dedec0cSmrg])# _LT_PATH_MANIFEST_TOOL 7177e120bd27Smrg 7178e120bd27Smrg 71799dedec0cSmrg# _LT_DLL_DEF_P([FILE]) 71809dedec0cSmrg# --------------------- 71819dedec0cSmrg# True iff FILE is a Windows DLL '.def' file. 71829dedec0cSmrg# Keep in sync with func_dll_def_p in the libtool script 71839dedec0cSmrgAC_DEFUN([_LT_DLL_DEF_P], 71849dedec0cSmrg[dnl 71859dedec0cSmrg test DEF = "`$SED -n dnl 71869dedec0cSmrg -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace 71879dedec0cSmrg -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments 71889dedec0cSmrg -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl 71899dedec0cSmrg -e q dnl Only consider the first "real" line 71909dedec0cSmrg $1`" dnl 71919dedec0cSmrg])# _LT_DLL_DEF_P 7192e120bd27Smrg 71939dedec0cSmrg 71949dedec0cSmrg# LT_LIB_M 71959dedec0cSmrg# -------- 71969dedec0cSmrg# check for math library 71979dedec0cSmrgAC_DEFUN([LT_LIB_M], 71989dedec0cSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 71999dedec0cSmrgLIBM= 72009dedec0cSmrgcase $host in 72019dedec0cSmrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 72029dedec0cSmrg # These system don't have libm, or don't need it 72039dedec0cSmrg ;; 72049dedec0cSmrg*-ncr-sysv4.3*) 72059dedec0cSmrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) 72069dedec0cSmrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 72079dedec0cSmrg ;; 72089dedec0cSmrg*) 72099dedec0cSmrg AC_CHECK_LIB(m, cos, LIBM=-lm) 72109dedec0cSmrg ;; 72119dedec0cSmrgesac 72129dedec0cSmrgAC_SUBST([LIBM]) 72139dedec0cSmrg])# LT_LIB_M 72146c321187Smrg 72150cc2eac3Smrg# Old name: 72169dedec0cSmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 72170cc2eac3Smrgdnl aclocal-1.4 backwards compatibility: 72189dedec0cSmrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 72199d0b5e55Smrg 72209d0b5e55Smrg 72219dedec0cSmrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 72229dedec0cSmrg# ------------------------------- 72239dedec0cSmrgm4_defun([_LT_COMPILER_NO_RTTI], 72249dedec0cSmrg[m4_require([_LT_TAG_COMPILER])dnl 7225e120bd27Smrg 72269dedec0cSmrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 7227e120bd27Smrg 72289dedec0cSmrgif test yes = "$GCC"; then 72299dedec0cSmrg case $cc_basename in 72309dedec0cSmrg nvcc*) 72319dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 72329dedec0cSmrg *) 72339dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 72349dedec0cSmrg esac 72356c321187Smrg 72369dedec0cSmrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 72379dedec0cSmrg lt_cv_prog_compiler_rtti_exceptions, 72389dedec0cSmrg [-fno-rtti -fno-exceptions], [], 72399dedec0cSmrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 72409dedec0cSmrgfi 72419dedec0cSmrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 72429dedec0cSmrg [Compiler flag to turn off builtin functions]) 72439dedec0cSmrg])# _LT_COMPILER_NO_RTTI 72446c321187Smrg 72456c321187Smrg 72469dedec0cSmrg# _LT_CMD_GLOBAL_SYMBOLS 72479dedec0cSmrg# ---------------------- 72489dedec0cSmrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 72499dedec0cSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 72509dedec0cSmrgAC_REQUIRE([AC_PROG_CC])dnl 72519dedec0cSmrgAC_REQUIRE([AC_PROG_AWK])dnl 72529dedec0cSmrgAC_REQUIRE([LT_PATH_NM])dnl 72539dedec0cSmrgAC_REQUIRE([LT_PATH_LD])dnl 72549dedec0cSmrgm4_require([_LT_DECL_SED])dnl 72559dedec0cSmrgm4_require([_LT_DECL_EGREP])dnl 72569dedec0cSmrgm4_require([_LT_TAG_COMPILER])dnl 7257e120bd27Smrg 72589dedec0cSmrg# Check for command to grab the raw symbol name followed by C symbol from nm. 72599dedec0cSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 72609dedec0cSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 72619dedec0cSmrg[ 72629dedec0cSmrg# These are sane defaults that work on at least a few old systems. 72639dedec0cSmrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 72646c321187Smrg 72659dedec0cSmrg# Character class describing NM global symbol codes. 72669dedec0cSmrgsymcode='[[BCDEGRST]]' 72676c321187Smrg 72689dedec0cSmrg# Regexp to match symbols that can be accessed directly from C. 72699dedec0cSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 72706c321187Smrg 72719dedec0cSmrg# Define system-specific variables. 72729dedec0cSmrgcase $host_os in 72739dedec0cSmrgaix*) 72749dedec0cSmrg symcode='[[BCDT]]' 72759dedec0cSmrg ;; 72769dedec0cSmrgcygwin* | mingw* | pw32* | cegcc*) 72779dedec0cSmrg symcode='[[ABCDGISTW]]' 72789dedec0cSmrg ;; 72799dedec0cSmrghpux*) 72809dedec0cSmrg if test ia64 = "$host_cpu"; then 72819dedec0cSmrg symcode='[[ABCDEGRST]]' 72820cc2eac3Smrg fi 72839dedec0cSmrg ;; 72849dedec0cSmrgirix* | nonstopux*) 72859dedec0cSmrg symcode='[[BCDEGRST]]' 72869dedec0cSmrg ;; 72879dedec0cSmrgosf*) 72889dedec0cSmrg symcode='[[BCDEGQRST]]' 72899dedec0cSmrg ;; 72909dedec0cSmrgsolaris*) 72919dedec0cSmrg symcode='[[BDRT]]' 72929dedec0cSmrg ;; 72939dedec0cSmrgsco3.2v5*) 72949dedec0cSmrg symcode='[[DT]]' 72959dedec0cSmrg ;; 72969dedec0cSmrgsysv4.2uw2*) 72979dedec0cSmrg symcode='[[DT]]' 72989dedec0cSmrg ;; 72999dedec0cSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 73009dedec0cSmrg symcode='[[ABDT]]' 73019dedec0cSmrg ;; 73029dedec0cSmrgsysv4) 73039dedec0cSmrg symcode='[[DFNSTU]]' 73049dedec0cSmrg ;; 73059dedec0cSmrgesac 7306e120bd27Smrg 73079dedec0cSmrg# If we're using GNU nm, then use its standard symbol codes. 73089dedec0cSmrgcase `$NM -V 2>&1` in 73099dedec0cSmrg*GNU* | *'with BFD'*) 73109dedec0cSmrg symcode='[[ABCDGIRSTW]]' ;; 73119dedec0cSmrgesac 7312e120bd27Smrg 73139dedec0cSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 73149dedec0cSmrg # Gets list of data symbols to import. 73159dedec0cSmrg lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'" 73169dedec0cSmrg # Adjust the below global symbol transforms to fixup imported variables. 73179dedec0cSmrg lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" 73189dedec0cSmrg lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" 73199dedec0cSmrg lt_c_name_lib_hook="\ 73209dedec0cSmrg -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ 73219dedec0cSmrg -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" 73220cc2eac3Smrgelse 73239dedec0cSmrg # Disable hooks by default. 73249dedec0cSmrg lt_cv_sys_global_symbol_to_import= 73259dedec0cSmrg lt_cdecl_hook= 73269dedec0cSmrg lt_c_name_hook= 73279dedec0cSmrg lt_c_name_lib_hook= 73280cc2eac3Smrgfi 73296c321187Smrg 73309dedec0cSmrg# Transform an extracted symbol line into a proper C declaration. 73319dedec0cSmrg# Some systems (esp. on ia64) link data and code symbols differently, 73329dedec0cSmrg# so use this general approach. 73339dedec0cSmrglt_cv_sys_global_symbol_to_cdecl="$SED -n"\ 73349dedec0cSmrg$lt_cdecl_hook\ 73359dedec0cSmrg" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ 73369dedec0cSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" 73379dedec0cSmrg 73389dedec0cSmrg# Transform an extracted symbol line into symbol name and symbol address 73399dedec0cSmrglt_cv_sys_global_symbol_to_c_name_address="$SED -n"\ 73409dedec0cSmrg$lt_c_name_hook\ 73419dedec0cSmrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 73429dedec0cSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" 73439dedec0cSmrg 73449dedec0cSmrg# Transform an extracted symbol line into symbol name with lib prefix and 73459dedec0cSmrg# symbol address. 73469dedec0cSmrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\ 73479dedec0cSmrg$lt_c_name_lib_hook\ 73489dedec0cSmrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 73499dedec0cSmrg" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ 73509dedec0cSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" 73519dedec0cSmrg 73529dedec0cSmrg# Handle CRLF in mingw tool chain 73539dedec0cSmrgopt_cr= 73549dedec0cSmrgcase $build_os in 73559dedec0cSmrgmingw*) 73569dedec0cSmrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 73570cc2eac3Smrg ;; 73580cc2eac3Smrgesac 73596c321187Smrg 73609dedec0cSmrg# Try without a prefix underscore, then with it. 73619dedec0cSmrgfor ac_symprfx in "" "_"; do 73629dedec0cSmrg 73639dedec0cSmrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 73649dedec0cSmrg symxfrm="\\1 $ac_symprfx\\2 \\2" 73659dedec0cSmrg 73669dedec0cSmrg # Write the raw and C identifiers. 73679dedec0cSmrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 73689dedec0cSmrg # Fake it for dumpbin and say T for any non-static function, 73699dedec0cSmrg # D for any global variable and I for any imported variable. 73709dedec0cSmrg # Also find C++ and __fastcall symbols from MSVC++ or ICC, 73719dedec0cSmrg # which start with @ or ?. 73729dedec0cSmrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 73739dedec0cSmrg" {last_section=section; section=\$ 3};"\ 73749dedec0cSmrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 73759dedec0cSmrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 73769dedec0cSmrg" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ 73779dedec0cSmrg" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ 73789dedec0cSmrg" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ 73799dedec0cSmrg" \$ 0!~/External *\|/{next};"\ 73809dedec0cSmrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 73819dedec0cSmrg" {if(hide[section]) next};"\ 73829dedec0cSmrg" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ 73839dedec0cSmrg" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ 73849dedec0cSmrg" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ 73859dedec0cSmrg" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ 73869dedec0cSmrg" ' prfx=^$ac_symprfx]" 73879dedec0cSmrg else 73889dedec0cSmrg lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 73899dedec0cSmrg fi 73909dedec0cSmrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'" 73919dedec0cSmrg 73929dedec0cSmrg # Check to see that the pipe works correctly. 73939dedec0cSmrg pipe_works=no 73949dedec0cSmrg 73959dedec0cSmrg rm -f conftest* 73969dedec0cSmrg cat > conftest.$ac_ext <<_LT_EOF 73979dedec0cSmrg#ifdef __cplusplus 73989dedec0cSmrgextern "C" { 73999dedec0cSmrg#endif 74009dedec0cSmrgchar nm_test_var; 74019dedec0cSmrgvoid nm_test_func(void); 74029dedec0cSmrgvoid nm_test_func(void){} 74039dedec0cSmrg#ifdef __cplusplus 74049dedec0cSmrg} 74059dedec0cSmrg#endif 74069dedec0cSmrgint main(){nm_test_var='a';nm_test_func();return(0);} 74079dedec0cSmrg_LT_EOF 74089dedec0cSmrg 74099dedec0cSmrg if AC_TRY_EVAL(ac_compile); then 74109dedec0cSmrg # Now try to grab the symbols. 74119dedec0cSmrg nlist=conftest.nm 74129dedec0cSmrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 74139dedec0cSmrg # Try sorting and uniquifying the output. 74149dedec0cSmrg if sort "$nlist" | uniq > "$nlist"T; then 74159dedec0cSmrg mv -f "$nlist"T "$nlist" 74169dedec0cSmrg else 74179dedec0cSmrg rm -f "$nlist"T 74189dedec0cSmrg fi 74199dedec0cSmrg 74209dedec0cSmrg # Make sure that we snagged all the symbols we need. 74219dedec0cSmrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 74229dedec0cSmrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 74239dedec0cSmrg cat <<_LT_EOF > conftest.$ac_ext 74249dedec0cSmrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 74259dedec0cSmrg#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE 74269dedec0cSmrg/* DATA imports from DLLs on WIN32 can't be const, because runtime 74279dedec0cSmrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 74289dedec0cSmrg# define LT@&t@_DLSYM_CONST 74299dedec0cSmrg#elif defined __osf__ 74309dedec0cSmrg/* This system does not cope well with relocations in const data. */ 74319dedec0cSmrg# define LT@&t@_DLSYM_CONST 74329dedec0cSmrg#else 74339dedec0cSmrg# define LT@&t@_DLSYM_CONST const 74349dedec0cSmrg#endif 74359dedec0cSmrg 74369dedec0cSmrg#ifdef __cplusplus 74379dedec0cSmrgextern "C" { 74389dedec0cSmrg#endif 74399dedec0cSmrg 74409dedec0cSmrg_LT_EOF 74419dedec0cSmrg # Now generate the symbol file. 74429dedec0cSmrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 74439dedec0cSmrg 74449dedec0cSmrg cat <<_LT_EOF >> conftest.$ac_ext 74459dedec0cSmrg 74469dedec0cSmrg/* The mapping between symbol names and symbols. */ 74479dedec0cSmrgLT@&t@_DLSYM_CONST struct { 74489dedec0cSmrg const char *name; 74499dedec0cSmrg void *address; 74509dedec0cSmrg} 74519dedec0cSmrglt__PROGRAM__LTX_preloaded_symbols[[]] = 74529dedec0cSmrg{ 74539dedec0cSmrg { "@PROGRAM@", (void *) 0 }, 74549dedec0cSmrg_LT_EOF 74559dedec0cSmrg $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 74569dedec0cSmrg cat <<\_LT_EOF >> conftest.$ac_ext 74579dedec0cSmrg {0, (void *) 0} 74589dedec0cSmrg}; 74599dedec0cSmrg 74609dedec0cSmrg/* This works around a problem in FreeBSD linker */ 74619dedec0cSmrg#ifdef FREEBSD_WORKAROUND 74629dedec0cSmrgstatic const void *lt_preloaded_setup() { 74639dedec0cSmrg return lt__PROGRAM__LTX_preloaded_symbols; 74649dedec0cSmrg} 74659dedec0cSmrg#endif 74669dedec0cSmrg 74679dedec0cSmrg#ifdef __cplusplus 74689dedec0cSmrg} 74699dedec0cSmrg#endif 74709dedec0cSmrg_LT_EOF 74719dedec0cSmrg # Now try linking the two files. 74729dedec0cSmrg mv conftest.$ac_objext conftstm.$ac_objext 74739dedec0cSmrg lt_globsym_save_LIBS=$LIBS 74749dedec0cSmrg lt_globsym_save_CFLAGS=$CFLAGS 74759dedec0cSmrg LIBS=conftstm.$ac_objext 74769dedec0cSmrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 74779dedec0cSmrg if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then 74789dedec0cSmrg pipe_works=yes 74799dedec0cSmrg fi 74809dedec0cSmrg LIBS=$lt_globsym_save_LIBS 74819dedec0cSmrg CFLAGS=$lt_globsym_save_CFLAGS 74829dedec0cSmrg else 74839dedec0cSmrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 74849dedec0cSmrg fi 74859dedec0cSmrg else 74869dedec0cSmrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 74879dedec0cSmrg fi 74889dedec0cSmrg else 74899dedec0cSmrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 74909dedec0cSmrg fi 74919dedec0cSmrg else 74929dedec0cSmrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 74939dedec0cSmrg cat conftest.$ac_ext >&5 74949dedec0cSmrg fi 74959dedec0cSmrg rm -rf conftest* conftst* 74969dedec0cSmrg 74979dedec0cSmrg # Do not use the global_symbol_pipe unless it works. 74989dedec0cSmrg if test yes = "$pipe_works"; then 74999dedec0cSmrg break 75009dedec0cSmrg else 75019dedec0cSmrg lt_cv_sys_global_symbol_pipe= 75029dedec0cSmrg fi 75039dedec0cSmrgdone 75049dedec0cSmrg]) 75059dedec0cSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 75069dedec0cSmrg lt_cv_sys_global_symbol_to_cdecl= 75079dedec0cSmrgfi 75089dedec0cSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 75099dedec0cSmrg AC_MSG_RESULT(failed) 75109dedec0cSmrgelse 75119dedec0cSmrg AC_MSG_RESULT(ok) 75129dedec0cSmrgfi 75139dedec0cSmrg 75149dedec0cSmrg# Response file support. 75159dedec0cSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 75169dedec0cSmrg nm_file_list_spec='@' 75179dedec0cSmrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 75189dedec0cSmrg nm_file_list_spec='@' 75199dedec0cSmrgfi 75209dedec0cSmrg 75219dedec0cSmrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 75229dedec0cSmrg [Take the output of nm and produce a listing of raw symbols and C names]) 75239dedec0cSmrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 75249dedec0cSmrg [Transform the output of nm in a proper C declaration]) 75259dedec0cSmrg_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], 75269dedec0cSmrg [Transform the output of nm into a list of symbols to manually relocate]) 75279dedec0cSmrg_LT_DECL([global_symbol_to_c_name_address], 75289dedec0cSmrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 75299dedec0cSmrg [Transform the output of nm in a C name address pair]) 75309dedec0cSmrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 75319dedec0cSmrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 75329dedec0cSmrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 75339dedec0cSmrg_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], 75349dedec0cSmrg [The name lister interface]) 75359dedec0cSmrg_LT_DECL([], [nm_file_list_spec], [1], 75369dedec0cSmrg [Specify filename containing input files for $NM]) 75379dedec0cSmrg]) # _LT_CMD_GLOBAL_SYMBOLS 75389dedec0cSmrg 75399dedec0cSmrg 75409dedec0cSmrg# _LT_COMPILER_PIC([TAGNAME]) 75419dedec0cSmrg# --------------------------- 75429dedec0cSmrgm4_defun([_LT_COMPILER_PIC], 75439dedec0cSmrg[m4_require([_LT_TAG_COMPILER])dnl 75449dedec0cSmrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 75459dedec0cSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 75469dedec0cSmrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 75479dedec0cSmrg 75489dedec0cSmrgm4_if([$1], [CXX], [ 75499dedec0cSmrg # C++ specific cases for pic, static, wl, etc. 75509dedec0cSmrg if test yes = "$GXX"; then 75519dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 75529dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 75539dedec0cSmrg 75549dedec0cSmrg case $host_os in 75559dedec0cSmrg aix*) 75569dedec0cSmrg # All AIX code is PIC. 75579dedec0cSmrg if test ia64 = "$host_cpu"; then 75589dedec0cSmrg # AIX 5 now supports IA64 processor 75599dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 75609dedec0cSmrg fi 75619dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 75629dedec0cSmrg ;; 75639dedec0cSmrg 75649dedec0cSmrg amigaos*) 75659dedec0cSmrg case $host_cpu in 75669dedec0cSmrg powerpc) 75679dedec0cSmrg # see comment about AmigaOS4 .so support 75689dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 75699dedec0cSmrg ;; 75709dedec0cSmrg m68k) 75719dedec0cSmrg # FIXME: we need at least 68020 code to build shared libraries, but 75729dedec0cSmrg # adding the '-m68020' flag to GCC prevents building anything better, 75739dedec0cSmrg # like '-m68040'. 75749dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 75759dedec0cSmrg ;; 75769dedec0cSmrg esac 75779dedec0cSmrg ;; 75789dedec0cSmrg 75799dedec0cSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 75809dedec0cSmrg # PIC is the default for these OSes. 75819dedec0cSmrg ;; 75829dedec0cSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 75839dedec0cSmrg # This hack is so that the source file can tell whether it is being 75849dedec0cSmrg # built for inclusion in a dll (and should export symbols for example). 75859dedec0cSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 75869dedec0cSmrg # (--disable-auto-import) libraries 75879dedec0cSmrg m4_if([$1], [GCJ], [], 75889dedec0cSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 75899dedec0cSmrg case $host_os in 75909dedec0cSmrg os2*) 75919dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 75929dedec0cSmrg ;; 75939dedec0cSmrg esac 75949dedec0cSmrg ;; 75959dedec0cSmrg darwin* | rhapsody*) 75969dedec0cSmrg # PIC is the default on this platform 75979dedec0cSmrg # Common symbols not allowed in MH_DYLIB files 75989dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 75999dedec0cSmrg ;; 76009dedec0cSmrg *djgpp*) 76019dedec0cSmrg # DJGPP does not support shared libraries at all 76029dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 76039dedec0cSmrg ;; 76049dedec0cSmrg haiku*) 76059dedec0cSmrg # PIC is the default for Haiku. 76069dedec0cSmrg # The "-static" flag exists, but is broken. 76079dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 76089dedec0cSmrg ;; 76099dedec0cSmrg interix[[3-9]]*) 76109dedec0cSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 76119dedec0cSmrg # Instead, we relocate shared libraries at runtime. 76129dedec0cSmrg ;; 76139dedec0cSmrg sysv4*MP*) 76149dedec0cSmrg if test -d /usr/nec; then 76159dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 76169dedec0cSmrg fi 76179dedec0cSmrg ;; 76189dedec0cSmrg hpux*) 76199dedec0cSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 76209dedec0cSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 76219dedec0cSmrg # sets the default TLS model and affects inlining. 76229dedec0cSmrg case $host_cpu in 76239dedec0cSmrg hppa*64*) 76249dedec0cSmrg ;; 76259dedec0cSmrg *) 76269dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 76279dedec0cSmrg ;; 76289dedec0cSmrg esac 76299dedec0cSmrg ;; 76309dedec0cSmrg *qnx* | *nto*) 76319dedec0cSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 76329dedec0cSmrg # it will coredump. 76339dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 76349dedec0cSmrg ;; 76359dedec0cSmrg *) 76369dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 76379dedec0cSmrg ;; 76389dedec0cSmrg esac 76399dedec0cSmrg else 76409dedec0cSmrg case $host_os in 76419dedec0cSmrg aix[[4-9]]*) 76429dedec0cSmrg # All AIX code is PIC. 76439dedec0cSmrg if test ia64 = "$host_cpu"; then 76449dedec0cSmrg # AIX 5 now supports IA64 processor 76459dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 76469dedec0cSmrg else 76479dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 76489dedec0cSmrg fi 76499dedec0cSmrg ;; 76509dedec0cSmrg chorus*) 76519dedec0cSmrg case $cc_basename in 76529dedec0cSmrg cxch68*) 76539dedec0cSmrg # Green Hills C++ Compiler 76549dedec0cSmrg # _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" 76559dedec0cSmrg ;; 76569dedec0cSmrg esac 76579dedec0cSmrg ;; 76589dedec0cSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 76599dedec0cSmrg # This hack is so that the source file can tell whether it is being 76609dedec0cSmrg # built for inclusion in a dll (and should export symbols for example). 76619dedec0cSmrg m4_if([$1], [GCJ], [], 76629dedec0cSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 76639dedec0cSmrg ;; 76649dedec0cSmrg dgux*) 76659dedec0cSmrg case $cc_basename in 76669dedec0cSmrg ec++*) 76679dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 76689dedec0cSmrg ;; 76699dedec0cSmrg ghcx*) 76709dedec0cSmrg # Green Hills C++ Compiler 76719dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 76729dedec0cSmrg ;; 76739dedec0cSmrg *) 76749dedec0cSmrg ;; 76759dedec0cSmrg esac 76769dedec0cSmrg ;; 76779dedec0cSmrg freebsd* | dragonfly* | midnightbsd*) 76789dedec0cSmrg # FreeBSD uses GNU C++ 76799dedec0cSmrg ;; 76809dedec0cSmrg hpux9* | hpux10* | hpux11*) 76819dedec0cSmrg case $cc_basename in 76829dedec0cSmrg CC*) 76839dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 76849dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 76859dedec0cSmrg if test ia64 != "$host_cpu"; then 76869dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 76879dedec0cSmrg fi 76889dedec0cSmrg ;; 76899dedec0cSmrg aCC*) 76909dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 76919dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 76929dedec0cSmrg case $host_cpu in 76939dedec0cSmrg hppa*64*|ia64*) 76949dedec0cSmrg # +Z the default 76959dedec0cSmrg ;; 76969dedec0cSmrg *) 76979dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 76989dedec0cSmrg ;; 76999dedec0cSmrg esac 77009dedec0cSmrg ;; 77019dedec0cSmrg *) 77029dedec0cSmrg ;; 77039dedec0cSmrg esac 77049dedec0cSmrg ;; 77059dedec0cSmrg interix*) 77069dedec0cSmrg # This is c89, which is MS Visual C++ (no shared libs) 77079dedec0cSmrg # Anyone wants to do a port? 77089dedec0cSmrg ;; 77099dedec0cSmrg irix5* | irix6* | nonstopux*) 77109dedec0cSmrg case $cc_basename in 77119dedec0cSmrg CC*) 77129dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 77139dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 77149dedec0cSmrg # CC pic flag -KPIC is the default. 77159dedec0cSmrg ;; 77169dedec0cSmrg *) 77179dedec0cSmrg ;; 77189dedec0cSmrg esac 77199dedec0cSmrg ;; 77209dedec0cSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 77219dedec0cSmrg case $cc_basename in 77229dedec0cSmrg KCC*) 77239dedec0cSmrg # KAI C++ Compiler 77249dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 77259dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 77269dedec0cSmrg ;; 77279dedec0cSmrg ecpc* ) 77289dedec0cSmrg # old Intel C++ for x86_64, which still supported -KPIC. 77299dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 77309dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 77319dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 77329dedec0cSmrg ;; 77339dedec0cSmrg icpc* ) 77349dedec0cSmrg # Intel C++, used to be incompatible with GCC. 77359dedec0cSmrg # ICC 10 doesn't accept -KPIC any more. 77369dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 77379dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 77389dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 77399dedec0cSmrg ;; 77409dedec0cSmrg pgCC* | pgcpp*) 77419dedec0cSmrg # Portland Group C++ compiler 77429dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 77439dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 77449dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 77459dedec0cSmrg ;; 77469dedec0cSmrg cxx*) 77479dedec0cSmrg # Compaq C++ 77489dedec0cSmrg # Make sure the PIC flag is empty. It appears that all Alpha 77499dedec0cSmrg # Linux and Compaq Tru64 Unix objects are PIC. 77509dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 77519dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 77529dedec0cSmrg ;; 77539dedec0cSmrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 77549dedec0cSmrg # IBM XL 8.0, 9.0 on PPC and BlueGene 77559dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 77569dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 77579dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 77589dedec0cSmrg ;; 77599dedec0cSmrg *) 77609dedec0cSmrg case `$CC -V 2>&1 | $SED 5q` in 77619dedec0cSmrg *Sun\ C*) 77629dedec0cSmrg # Sun C++ 5.9 77639dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 77649dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 77659dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 77669dedec0cSmrg ;; 77679dedec0cSmrg esac 77689dedec0cSmrg ;; 77699dedec0cSmrg esac 77709dedec0cSmrg ;; 77719dedec0cSmrg lynxos*) 77729dedec0cSmrg ;; 77739dedec0cSmrg m88k*) 77749dedec0cSmrg ;; 77759dedec0cSmrg mvs*) 77769dedec0cSmrg case $cc_basename in 77779dedec0cSmrg cxx*) 77789dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 77799dedec0cSmrg ;; 77809dedec0cSmrg *) 77819dedec0cSmrg ;; 77829dedec0cSmrg esac 77839dedec0cSmrg ;; 77849dedec0cSmrg netbsd*) 77859dedec0cSmrg ;; 77869dedec0cSmrg *qnx* | *nto*) 77879dedec0cSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 77889dedec0cSmrg # it will coredump. 77899dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 77909dedec0cSmrg ;; 77919dedec0cSmrg osf3* | osf4* | osf5*) 77929dedec0cSmrg case $cc_basename in 77939dedec0cSmrg KCC*) 77949dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 77959dedec0cSmrg ;; 77969dedec0cSmrg RCC*) 77979dedec0cSmrg # Rational C++ 2.4.1 77989dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 77999dedec0cSmrg ;; 78009dedec0cSmrg cxx*) 78019dedec0cSmrg # Digital/Compaq C++ 78029dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 78039dedec0cSmrg # Make sure the PIC flag is empty. It appears that all Alpha 78049dedec0cSmrg # Linux and Compaq Tru64 Unix objects are PIC. 78059dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 78069dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 78079dedec0cSmrg ;; 78089dedec0cSmrg *) 78099dedec0cSmrg ;; 78109dedec0cSmrg esac 78119dedec0cSmrg ;; 78129dedec0cSmrg psos*) 78139dedec0cSmrg ;; 78149dedec0cSmrg solaris*) 78159dedec0cSmrg case $cc_basename in 78169dedec0cSmrg CC* | sunCC*) 78179dedec0cSmrg # Sun C++ 4.2, 5.x and Centerline C++ 78189dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 78199dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 78209dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 78219dedec0cSmrg ;; 78229dedec0cSmrg gcx*) 78239dedec0cSmrg # Green Hills C++ Compiler 78249dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 78259dedec0cSmrg ;; 78269dedec0cSmrg *) 78279dedec0cSmrg ;; 78289dedec0cSmrg esac 78299dedec0cSmrg ;; 78309dedec0cSmrg sunos4*) 78319dedec0cSmrg case $cc_basename in 78329dedec0cSmrg CC*) 78339dedec0cSmrg # Sun C++ 4.x 78349dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 78359dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 78369dedec0cSmrg ;; 78379dedec0cSmrg lcc*) 78389dedec0cSmrg # Lucid 78399dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 78409dedec0cSmrg ;; 78419dedec0cSmrg *) 78429dedec0cSmrg ;; 78439dedec0cSmrg esac 78449dedec0cSmrg ;; 78459dedec0cSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 78469dedec0cSmrg case $cc_basename in 78479dedec0cSmrg CC*) 78489dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 78499dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 78509dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 78519dedec0cSmrg ;; 78529dedec0cSmrg esac 78539dedec0cSmrg ;; 78549dedec0cSmrg tandem*) 78559dedec0cSmrg case $cc_basename in 78569dedec0cSmrg NCC*) 78579dedec0cSmrg # NonStop-UX NCC 3.20 78589dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 78599dedec0cSmrg ;; 78609dedec0cSmrg *) 78619dedec0cSmrg ;; 78629dedec0cSmrg esac 78639dedec0cSmrg ;; 78649dedec0cSmrg vxworks*) 78659dedec0cSmrg ;; 78669dedec0cSmrg *) 78679dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 78689dedec0cSmrg ;; 78699dedec0cSmrg esac 78709dedec0cSmrg fi 78719dedec0cSmrg], 78729dedec0cSmrg[ 78739dedec0cSmrg if test yes = "$GCC"; then 78749dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 78759dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 78769dedec0cSmrg 78779dedec0cSmrg case $host_os in 78789dedec0cSmrg aix*) 78799dedec0cSmrg # All AIX code is PIC. 78809dedec0cSmrg if test ia64 = "$host_cpu"; then 78819dedec0cSmrg # AIX 5 now supports IA64 processor 78829dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 78839dedec0cSmrg fi 78849dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 78859dedec0cSmrg ;; 78866c321187Smrg 78879dedec0cSmrg amigaos*) 78889dedec0cSmrg case $host_cpu in 78899dedec0cSmrg powerpc) 78909dedec0cSmrg # see comment about AmigaOS4 .so support 78919dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 78920cc2eac3Smrg ;; 78939dedec0cSmrg m68k) 78949dedec0cSmrg # FIXME: we need at least 68020 code to build shared libraries, but 78959dedec0cSmrg # adding the '-m68020' flag to GCC prevents building anything better, 78969dedec0cSmrg # like '-m68040'. 78979dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 78980cc2eac3Smrg ;; 78999dedec0cSmrg esac 79009dedec0cSmrg ;; 7901e120bd27Smrg 79029dedec0cSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 79039dedec0cSmrg # PIC is the default for these OSes. 79049dedec0cSmrg ;; 7905e120bd27Smrg 79069dedec0cSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 79079dedec0cSmrg # This hack is so that the source file can tell whether it is being 79089dedec0cSmrg # built for inclusion in a dll (and should export symbols for example). 79099dedec0cSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 79109dedec0cSmrg # (--disable-auto-import) libraries 79119dedec0cSmrg m4_if([$1], [GCJ], [], 79129dedec0cSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 79139dedec0cSmrg case $host_os in 79149dedec0cSmrg os2*) 79159dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 79169dedec0cSmrg ;; 79179dedec0cSmrg esac 79189dedec0cSmrg ;; 7919e120bd27Smrg 79209dedec0cSmrg darwin* | rhapsody*) 79219dedec0cSmrg # PIC is the default on this platform 79229dedec0cSmrg # Common symbols not allowed in MH_DYLIB files 79239dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 79249dedec0cSmrg ;; 79250cc2eac3Smrg 79269dedec0cSmrg haiku*) 79279dedec0cSmrg # PIC is the default for Haiku. 79289dedec0cSmrg # The "-static" flag exists, but is broken. 79299dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 79309dedec0cSmrg ;; 7931e120bd27Smrg 79329dedec0cSmrg hpux*) 79339dedec0cSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 79349dedec0cSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 79359dedec0cSmrg # sets the default TLS model and affects inlining. 79369dedec0cSmrg case $host_cpu in 79379dedec0cSmrg hppa*64*) 79389dedec0cSmrg # +Z the default 79399dedec0cSmrg ;; 79409dedec0cSmrg *) 79419dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 79429dedec0cSmrg ;; 79439dedec0cSmrg esac 79449dedec0cSmrg ;; 7945e120bd27Smrg 79469dedec0cSmrg interix[[3-9]]*) 79479dedec0cSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 79489dedec0cSmrg # Instead, we relocate shared libraries at runtime. 79499dedec0cSmrg ;; 79506c321187Smrg 79519dedec0cSmrg msdosdjgpp*) 79529dedec0cSmrg # Just because we use GCC doesn't mean we suddenly get shared libraries 79539dedec0cSmrg # on systems that don't support them. 79549dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 79559dedec0cSmrg enable_shared=no 79569dedec0cSmrg ;; 79576c321187Smrg 79589dedec0cSmrg *nto* | *qnx*) 79599dedec0cSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 79609dedec0cSmrg # it will coredump. 79619dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 79629dedec0cSmrg ;; 7963e120bd27Smrg 79649dedec0cSmrg sysv4*MP*) 79659dedec0cSmrg if test -d /usr/nec; then 79669dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 79679dedec0cSmrg fi 79689dedec0cSmrg ;; 7969e120bd27Smrg 79709dedec0cSmrg *) 79719dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 79729dedec0cSmrg ;; 79739dedec0cSmrg esac 79746c321187Smrg 79759dedec0cSmrg case $cc_basename in 79769dedec0cSmrg nvcc*) # Cuda Compiler Driver 2.2 79779dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 79789dedec0cSmrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 79799dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 79809dedec0cSmrg fi 79819dedec0cSmrg ;; 79829dedec0cSmrg esac 79839dedec0cSmrg else 79849dedec0cSmrg # PORTME Check for flag to pass linker flags through the system compiler. 79859dedec0cSmrg case $host_os in 79869dedec0cSmrg aix*) 79879dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 79889dedec0cSmrg if test ia64 = "$host_cpu"; then 79899dedec0cSmrg # AIX 5 now supports IA64 processor 79909dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 79919dedec0cSmrg else 79929dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 79939dedec0cSmrg fi 79949dedec0cSmrg ;; 79956c321187Smrg 79969dedec0cSmrg darwin* | rhapsody*) 79979dedec0cSmrg # PIC is the default on this platform 79989dedec0cSmrg # Common symbols not allowed in MH_DYLIB files 79999dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 80009dedec0cSmrg case $cc_basename in 80019dedec0cSmrg nagfor*) 80029dedec0cSmrg # NAG Fortran compiler 80039dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 80049dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 80059dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 80069dedec0cSmrg ;; 80079dedec0cSmrg esac 80089dedec0cSmrg ;; 80096c321187Smrg 80109dedec0cSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 80119dedec0cSmrg # This hack is so that the source file can tell whether it is being 80129dedec0cSmrg # built for inclusion in a dll (and should export symbols for example). 80139dedec0cSmrg m4_if([$1], [GCJ], [], 80149dedec0cSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 80159dedec0cSmrg case $host_os in 80169dedec0cSmrg os2*) 80179dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 80189dedec0cSmrg ;; 80199dedec0cSmrg esac 80209dedec0cSmrg ;; 8021e120bd27Smrg 80229dedec0cSmrg hpux9* | hpux10* | hpux11*) 80239dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 80249dedec0cSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 80259dedec0cSmrg # not for PA HP-UX. 80269dedec0cSmrg case $host_cpu in 80279dedec0cSmrg hppa*64*|ia64*) 80289dedec0cSmrg # +Z the default 80299dedec0cSmrg ;; 80309dedec0cSmrg *) 80319dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 80329dedec0cSmrg ;; 80339dedec0cSmrg esac 80349dedec0cSmrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 80359dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 80369dedec0cSmrg ;; 80376c321187Smrg 80389dedec0cSmrg irix5* | irix6* | nonstopux*) 80399dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 80409dedec0cSmrg # PIC (with -KPIC) is the default. 80419dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 80429dedec0cSmrg ;; 80436c321187Smrg 80449dedec0cSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 80459dedec0cSmrg case $cc_basename in 80469dedec0cSmrg # old Intel for x86_64, which still supported -KPIC. 80479dedec0cSmrg ecc*) 80489dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 80499dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 80509dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 80519dedec0cSmrg ;; 80529dedec0cSmrg # icc used to be incompatible with GCC. 80539dedec0cSmrg # ICC 10 doesn't accept -KPIC any more. 80549dedec0cSmrg icc* | ifort*) 80559dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 80569dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 80579dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 80589dedec0cSmrg ;; 80599dedec0cSmrg # Lahey Fortran 8.1. 80609dedec0cSmrg lf95*) 80619dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 80629dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 80639dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 80649dedec0cSmrg ;; 80659dedec0cSmrg nagfor*) 80669dedec0cSmrg # NAG Fortran compiler 80679dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 80689dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 80699dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 80709dedec0cSmrg ;; 80719dedec0cSmrg tcc*) 80729dedec0cSmrg # Fabrice Bellard et al's Tiny C Compiler 80739dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 80749dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 80759dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 80769dedec0cSmrg ;; 80779dedec0cSmrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 80789dedec0cSmrg # Portland Group compilers (*not* the Pentium gcc compiler, 80799dedec0cSmrg # which looks to be a dead project) 80809dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 80819dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 80829dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 80839dedec0cSmrg ;; 80849dedec0cSmrg ccc*) 80859dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 80869dedec0cSmrg # All Alpha code is PIC. 80879dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 80889dedec0cSmrg ;; 80899dedec0cSmrg xl* | bgxl* | bgf* | mpixl*) 80909dedec0cSmrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 80919dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 80929dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 80939dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 80949dedec0cSmrg ;; 80959dedec0cSmrg *) 80969dedec0cSmrg case `$CC -V 2>&1 | $SED 5q` in 80979dedec0cSmrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 80989dedec0cSmrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 80999dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 81009dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 81019dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 81029dedec0cSmrg ;; 81039dedec0cSmrg *Sun\ F* | *Sun*Fortran*) 81049dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 81059dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 81069dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 81079dedec0cSmrg ;; 81089dedec0cSmrg *Sun\ C*) 81099dedec0cSmrg # Sun C 5.9 81109dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 81119dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 81129dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 81139dedec0cSmrg ;; 81149dedec0cSmrg *Intel*\ [[CF]]*Compiler*) 81159dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 81169dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 81179dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 81189dedec0cSmrg ;; 81199dedec0cSmrg *Portland\ Group*) 81209dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 81219dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 81229dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 81239dedec0cSmrg ;; 81249dedec0cSmrg esac 81259dedec0cSmrg ;; 81269dedec0cSmrg esac 81279dedec0cSmrg ;; 81286c321187Smrg 81299dedec0cSmrg newsos6) 81309dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 81319dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 81329dedec0cSmrg ;; 81336c321187Smrg 81349dedec0cSmrg *nto* | *qnx*) 81359dedec0cSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 81369dedec0cSmrg # it will coredump. 81379dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 81389dedec0cSmrg ;; 81396c321187Smrg 81409dedec0cSmrg osf3* | osf4* | osf5*) 81419dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 81429dedec0cSmrg # All OSF/1 code is PIC. 81439dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 81449dedec0cSmrg ;; 81456c321187Smrg 81469dedec0cSmrg rdos*) 81479dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 81489dedec0cSmrg ;; 8149e120bd27Smrg 81509dedec0cSmrg solaris*) 81519dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 81529dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 81539dedec0cSmrg case $cc_basename in 81549dedec0cSmrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 81559dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 81569dedec0cSmrg *) 81579dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 81589dedec0cSmrg esac 81599dedec0cSmrg ;; 8160e120bd27Smrg 81619dedec0cSmrg sunos4*) 81629dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 81639dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 81649dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 81659dedec0cSmrg ;; 8166e120bd27Smrg 81679dedec0cSmrg sysv4 | sysv4.2uw2* | sysv4.3*) 81689dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 81699dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 81709dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 81710cc2eac3Smrg ;; 8172e120bd27Smrg 81739dedec0cSmrg sysv4*MP*) 81749dedec0cSmrg if test -d /usr/nec; then 81759dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 81769dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 81779dedec0cSmrg fi 81789dedec0cSmrg ;; 8179e120bd27Smrg 81809dedec0cSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 81819dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 81829dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 81839dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 81849dedec0cSmrg ;; 81856c321187Smrg 81869dedec0cSmrg unicos*) 81879dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 81889dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 81899dedec0cSmrg ;; 81906c321187Smrg 81919dedec0cSmrg uts4*) 81929dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 81939dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 81949dedec0cSmrg ;; 81959dedec0cSmrg 81969dedec0cSmrg *) 81979dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 81989dedec0cSmrg ;; 81999dedec0cSmrg esac 82009dedec0cSmrg fi 82010cc2eac3Smrg]) 82029dedec0cSmrgcase $host_os in 82039dedec0cSmrg # For platforms that do not support PIC, -DPIC is meaningless: 82049dedec0cSmrg *djgpp*) 82059dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 82069dedec0cSmrg ;; 82079dedec0cSmrg *) 82089dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 82099dedec0cSmrg ;; 82109dedec0cSmrgesac 82116c321187Smrg 82129dedec0cSmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 82139dedec0cSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 82149dedec0cSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 82159dedec0cSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 8216e120bd27Smrg 82179dedec0cSmrg# 82189dedec0cSmrg# Check to make sure the PIC flag actually works. 82199dedec0cSmrg# 82209dedec0cSmrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 82219dedec0cSmrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 82229dedec0cSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 82239dedec0cSmrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 82249dedec0cSmrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 82259dedec0cSmrg "" | " "*) ;; 82269dedec0cSmrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 82279dedec0cSmrg esac], 82289dedec0cSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 82299dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 82309dedec0cSmrgfi 82319dedec0cSmrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 82329dedec0cSmrg [Additional compiler flags for building library objects]) 82336c321187Smrg 82349dedec0cSmrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 82359dedec0cSmrg [How to pass a linker flag through the compiler]) 82369dedec0cSmrg# 82379dedec0cSmrg# Check to make sure the static flag actually works. 82389dedec0cSmrg# 82399dedec0cSmrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 82409dedec0cSmrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 82419dedec0cSmrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 82429dedec0cSmrg $lt_tmp_static_flag, 82439dedec0cSmrg [], 82449dedec0cSmrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 82459dedec0cSmrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 82469dedec0cSmrg [Compiler flag to prevent dynamic linking]) 82479dedec0cSmrg])# _LT_COMPILER_PIC 8248e120bd27Smrg 8249e120bd27Smrg 82509dedec0cSmrg# _LT_LINKER_SHLIBS([TAGNAME]) 82510cc2eac3Smrg# ---------------------------- 82529dedec0cSmrg# See if the linker supports building shared libraries. 82539dedec0cSmrgm4_defun([_LT_LINKER_SHLIBS], 82549dedec0cSmrg[AC_REQUIRE([LT_PATH_LD])dnl 82559dedec0cSmrgAC_REQUIRE([LT_PATH_NM])dnl 82569dedec0cSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 82579dedec0cSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 82589dedec0cSmrgm4_require([_LT_DECL_EGREP])dnl 82599dedec0cSmrgm4_require([_LT_DECL_SED])dnl 82609dedec0cSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 82619dedec0cSmrgm4_require([_LT_TAG_COMPILER])dnl 82629dedec0cSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 82639dedec0cSmrgm4_if([$1], [CXX], [ 82649dedec0cSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 82659dedec0cSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 82669dedec0cSmrg case $host_os in 82679dedec0cSmrg aix[[4-9]]*) 82689dedec0cSmrg # If we're using GNU nm, then we don't want the "-C" option. 82699dedec0cSmrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 82709dedec0cSmrg # Without the "-l" option, or with the "-B" option, AIX nm treats 82719dedec0cSmrg # weak defined symbols like other global defined symbols, whereas 82729dedec0cSmrg # GNU nm marks them as "W". 82739dedec0cSmrg # While the 'weak' keyword is ignored in the Export File, we need 82749dedec0cSmrg # it in the Import File for the 'aix-soname' feature, so we have 82759dedec0cSmrg # to replace the "-B" option with "-P" for AIX nm. 82769dedec0cSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 82779dedec0cSmrg _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' 82789dedec0cSmrg else 82799dedec0cSmrg _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' 82809dedec0cSmrg fi 82819dedec0cSmrg ;; 82829dedec0cSmrg pw32*) 82839dedec0cSmrg _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds 82849dedec0cSmrg ;; 82859dedec0cSmrg cygwin* | mingw* | cegcc*) 82869dedec0cSmrg case $cc_basename in 82879dedec0cSmrg cl* | icl*) 82889dedec0cSmrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 82899dedec0cSmrg ;; 82900cc2eac3Smrg *) 82919dedec0cSmrg _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' 82929dedec0cSmrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 82930cc2eac3Smrg ;; 82949dedec0cSmrg esac 82959dedec0cSmrg ;; 82969dedec0cSmrg *) 82979dedec0cSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 82989dedec0cSmrg ;; 82999dedec0cSmrg esac 83009dedec0cSmrg], [ 83019dedec0cSmrg runpath_var= 83029dedec0cSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 83039dedec0cSmrg _LT_TAGVAR(always_export_symbols, $1)=no 83049dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)= 83059dedec0cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)= 83069dedec0cSmrg _LT_TAGVAR(compiler_needs_object, $1)=no 83079dedec0cSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 83089dedec0cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 83099dedec0cSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 83109dedec0cSmrg _LT_TAGVAR(hardcode_automatic, $1)=no 83119dedec0cSmrg _LT_TAGVAR(hardcode_direct, $1)=no 83129dedec0cSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 83139dedec0cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 83149dedec0cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 83159dedec0cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=no 83169dedec0cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 83179dedec0cSmrg _LT_TAGVAR(inherit_rpath, $1)=no 83189dedec0cSmrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 83199dedec0cSmrg _LT_TAGVAR(module_cmds, $1)= 83209dedec0cSmrg _LT_TAGVAR(module_expsym_cmds, $1)= 83219dedec0cSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 83229dedec0cSmrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 83239dedec0cSmrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 83249dedec0cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 83259dedec0cSmrg # include_expsyms should be a list of space-separated symbols to be *always* 83269dedec0cSmrg # included in the symbol list 83279dedec0cSmrg _LT_TAGVAR(include_expsyms, $1)= 83289dedec0cSmrg # exclude_expsyms can be an extended regexp of symbols to exclude 83299dedec0cSmrg # it will be wrapped by ' (' and ')$', so one must not match beginning or 83309dedec0cSmrg # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', 83319dedec0cSmrg # as well as any symbol that contains 'd'. 83329dedec0cSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 83339dedec0cSmrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 83349dedec0cSmrg # platforms (ab)use it in PIC code, but their linkers get confused if 83359dedec0cSmrg # the symbol is explicitly referenced. Since portable code cannot 83369dedec0cSmrg # rely on this symbol name, it's probably fine to never include it in 83379dedec0cSmrg # preloaded symbol tables. 83389dedec0cSmrg # Exclude shared library initialization/finalization symbols. 83399dedec0cSmrgdnl Note also adjust exclude_expsyms for C++ above. 83409dedec0cSmrg extract_expsyms_cmds= 83419dedec0cSmrg 83429dedec0cSmrg case $host_os in 83439dedec0cSmrg cygwin* | mingw* | pw32* | cegcc*) 83449dedec0cSmrg # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time 83459dedec0cSmrg # When not using gcc, we currently assume that we are using 83469dedec0cSmrg # Microsoft Visual C++ or Intel C++ Compiler. 83479dedec0cSmrg if test yes != "$GCC"; then 83489dedec0cSmrg with_gnu_ld=no 83499dedec0cSmrg fi 83509dedec0cSmrg ;; 83519dedec0cSmrg interix*) 83529dedec0cSmrg # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) 83539dedec0cSmrg with_gnu_ld=yes 83549dedec0cSmrg ;; 83559dedec0cSmrg openbsd* | bitrig*) 83569dedec0cSmrg with_gnu_ld=no 83579dedec0cSmrg ;; 83589dedec0cSmrg esac 83599dedec0cSmrg 83609dedec0cSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 83619dedec0cSmrg 83629dedec0cSmrg # On some targets, GNU ld is compatible enough with the native linker 83639dedec0cSmrg # that we're better off using the native interface for both. 83649dedec0cSmrg lt_use_gnu_ld_interface=no 83659dedec0cSmrg if test yes = "$with_gnu_ld"; then 83669dedec0cSmrg case $host_os in 83679dedec0cSmrg aix*) 83689dedec0cSmrg # The AIX port of GNU ld has always aspired to compatibility 83699dedec0cSmrg # with the native linker. However, as the warning in the GNU ld 83709dedec0cSmrg # block says, versions before 2.19.5* couldn't really create working 83719dedec0cSmrg # shared libraries, regardless of the interface used. 83729dedec0cSmrg case `$LD -v 2>&1` in 83739dedec0cSmrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 83749dedec0cSmrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 83759dedec0cSmrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 83769dedec0cSmrg *) 83779dedec0cSmrg lt_use_gnu_ld_interface=yes 83789dedec0cSmrg ;; 83799dedec0cSmrg esac 83809dedec0cSmrg ;; 83819dedec0cSmrg *) 83829dedec0cSmrg lt_use_gnu_ld_interface=yes 83839dedec0cSmrg ;; 83849dedec0cSmrg esac 83859dedec0cSmrg fi 83869dedec0cSmrg 83879dedec0cSmrg if test yes = "$lt_use_gnu_ld_interface"; then 83889dedec0cSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 83899dedec0cSmrg wlarc='$wl' 83909dedec0cSmrg 83919dedec0cSmrg # Set some defaults for GNU ld with shared library support. These 83929dedec0cSmrg # are reset later if shared libraries are not supported. Putting them 83939dedec0cSmrg # here allows them to be overridden if necessary. 83949dedec0cSmrg runpath_var=LD_RUN_PATH 83959dedec0cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 83969dedec0cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 83979dedec0cSmrg # ancient GNU ld didn't support --whole-archive et. al. 83989dedec0cSmrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 83999dedec0cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 84009dedec0cSmrg else 84019dedec0cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 84029dedec0cSmrg fi 84039dedec0cSmrg supports_anon_versioning=no 84049dedec0cSmrg case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in 84059dedec0cSmrg *GNU\ gold*) supports_anon_versioning=yes ;; 84069dedec0cSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 84079dedec0cSmrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 84089dedec0cSmrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 84099dedec0cSmrg *\ 2.11.*) ;; # other 2.11 versions 84109dedec0cSmrg *) supports_anon_versioning=yes ;; 84119dedec0cSmrg esac 8412e120bd27Smrg 84139dedec0cSmrg # See if GNU ld supports shared libraries. 84149dedec0cSmrg case $host_os in 84159dedec0cSmrg aix[[3-9]]*) 84169dedec0cSmrg # On AIX/PPC, the GNU linker is very broken 84179dedec0cSmrg if test ia64 != "$host_cpu"; then 84189dedec0cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 84199dedec0cSmrg cat <<_LT_EOF 1>&2 8420e120bd27Smrg 84219dedec0cSmrg*** Warning: the GNU linker, at least up to release 2.19, is reported 84229dedec0cSmrg*** to be unable to reliably create shared libraries on AIX. 84239dedec0cSmrg*** Therefore, libtool is disabling shared libraries support. If you 84249dedec0cSmrg*** really care for shared libraries, you may want to install binutils 84259dedec0cSmrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 84269dedec0cSmrg*** You will then need to restart the configuration process. 84276c321187Smrg 84289dedec0cSmrg_LT_EOF 84299dedec0cSmrg fi 84309dedec0cSmrg ;; 84316c321187Smrg 84329dedec0cSmrg amigaos*) 84339dedec0cSmrg case $host_cpu in 84349dedec0cSmrg powerpc) 84359dedec0cSmrg # see comment about AmigaOS4 .so support 84369dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 84379dedec0cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 84389dedec0cSmrg ;; 84399dedec0cSmrg m68k) 84409dedec0cSmrg _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)' 84419dedec0cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 84429dedec0cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 84439dedec0cSmrg ;; 84449dedec0cSmrg esac 84459dedec0cSmrg ;; 84466c321187Smrg 84479dedec0cSmrg beos*) 84489dedec0cSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 84499dedec0cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 84509dedec0cSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 84519dedec0cSmrg # support --undefined. This deserves some investigation. FIXME 84529dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 84539dedec0cSmrg else 84549dedec0cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 84559dedec0cSmrg fi 84569dedec0cSmrg ;; 8457e120bd27Smrg 84589dedec0cSmrg cygwin* | mingw* | pw32* | cegcc*) 84599dedec0cSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 84609dedec0cSmrg # as there is no search path for DLLs. 84619dedec0cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 84629dedec0cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 84639dedec0cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 84649dedec0cSmrg _LT_TAGVAR(always_export_symbols, $1)=no 84659dedec0cSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 84669dedec0cSmrg _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' 84679dedec0cSmrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 8468e120bd27Smrg 84699dedec0cSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 84709dedec0cSmrg _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' 84719dedec0cSmrg # If the export-symbols file already is a .def file, use it as 84729dedec0cSmrg # is; otherwise, prepend EXPORTS... 84739dedec0cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 84749dedec0cSmrg cp $export_symbols $output_objdir/$soname.def; 84759dedec0cSmrg else 84769dedec0cSmrg echo EXPORTS > $output_objdir/$soname.def; 84779dedec0cSmrg cat $export_symbols >> $output_objdir/$soname.def; 84789dedec0cSmrg fi~ 84799dedec0cSmrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 84809dedec0cSmrg else 84819dedec0cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 84829dedec0cSmrg fi 84839dedec0cSmrg ;; 8484e120bd27Smrg 84859dedec0cSmrg haiku*) 84869dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 84879dedec0cSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 84889dedec0cSmrg ;; 8489e120bd27Smrg 84909dedec0cSmrg os2*) 84919dedec0cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 84929dedec0cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 84939dedec0cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 84949dedec0cSmrg shrext_cmds=.dll 84959dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 84969dedec0cSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 84979dedec0cSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 84989dedec0cSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 84999dedec0cSmrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 85009dedec0cSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 85019dedec0cSmrg emximp -o $lib $output_objdir/$libname.def' 85029dedec0cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 85039dedec0cSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 85049dedec0cSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 85059dedec0cSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 85069dedec0cSmrg prefix_cmds="$SED"~ 85079dedec0cSmrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 85089dedec0cSmrg prefix_cmds="$prefix_cmds -e 1d"; 85099dedec0cSmrg fi~ 85109dedec0cSmrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 85119dedec0cSmrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 85129dedec0cSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 85139dedec0cSmrg emximp -o $lib $output_objdir/$libname.def' 85149dedec0cSmrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 85159dedec0cSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 85169dedec0cSmrg _LT_TAGVAR(file_list_spec, $1)='@' 85170cc2eac3Smrg ;; 8518e120bd27Smrg 85199dedec0cSmrg interix[[3-9]]*) 85209dedec0cSmrg _LT_TAGVAR(hardcode_direct, $1)=no 85219dedec0cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 85229dedec0cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 85239dedec0cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 85249dedec0cSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 85259dedec0cSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 85269dedec0cSmrg # default) and relocated if they conflict, which is a slow very memory 85279dedec0cSmrg # consuming and fragmenting process. To avoid this, we pick a random, 85289dedec0cSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 85299dedec0cSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 85309dedec0cSmrg _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' 85319dedec0cSmrg _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' 85329dedec0cSmrg ;; 8533e120bd27Smrg 85349dedec0cSmrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 85359dedec0cSmrg tmp_diet=no 85369dedec0cSmrg if test linux-dietlibc = "$host_os"; then 85379dedec0cSmrg case $cc_basename in 85389dedec0cSmrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 85399dedec0cSmrg esac 85409dedec0cSmrg fi 85419dedec0cSmrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 85429dedec0cSmrg && test no = "$tmp_diet" 85439dedec0cSmrg then 85449dedec0cSmrg tmp_addflag=' $pic_flag' 85459dedec0cSmrg tmp_sharedflag='-shared' 85469dedec0cSmrg case $cc_basename,$host_cpu in 85479dedec0cSmrg pgcc*) # Portland Group C compiler 85489dedec0cSmrg _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' 85499dedec0cSmrg tmp_addflag=' $pic_flag' 85509dedec0cSmrg ;; 85519dedec0cSmrg pgf77* | pgf90* | pgf95* | pgfortran*) 85529dedec0cSmrg # Portland Group f77 and f90 compilers 85539dedec0cSmrg _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' 85549dedec0cSmrg tmp_addflag=' $pic_flag -Mnomain' ;; 85559dedec0cSmrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 85569dedec0cSmrg tmp_addflag=' -i_dynamic' ;; 85579dedec0cSmrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 85589dedec0cSmrg tmp_addflag=' -i_dynamic -nofor_main' ;; 85599dedec0cSmrg ifc* | ifort*) # Intel Fortran compiler 85609dedec0cSmrg tmp_addflag=' -nofor_main' ;; 85619dedec0cSmrg lf95*) # Lahey Fortran 8.1 85629dedec0cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 85639dedec0cSmrg tmp_sharedflag='--shared' ;; 85649dedec0cSmrg nagfor*) # NAGFOR 5.3 85659dedec0cSmrg tmp_sharedflag='-Wl,-shared' ;; 85669dedec0cSmrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 85679dedec0cSmrg tmp_sharedflag='-qmkshrobj' 85689dedec0cSmrg tmp_addflag= ;; 85699dedec0cSmrg nvcc*) # Cuda Compiler Driver 2.2 85709dedec0cSmrg _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' 85719dedec0cSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 85729dedec0cSmrg ;; 85739dedec0cSmrg esac 85749dedec0cSmrg case `$CC -V 2>&1 | $SED 5q` in 85759dedec0cSmrg *Sun\ C*) # Sun C 5.9 85769dedec0cSmrg _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' 85779dedec0cSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 85789dedec0cSmrg tmp_sharedflag='-G' ;; 85799dedec0cSmrg *Sun\ F*) # Sun Fortran 8.3 85809dedec0cSmrg tmp_sharedflag='-G' ;; 85819dedec0cSmrg esac 85829dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8583e120bd27Smrg 85849dedec0cSmrg if test yes = "$supports_anon_versioning"; then 85859dedec0cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 85869dedec0cSmrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 85879dedec0cSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 85889dedec0cSmrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 85899dedec0cSmrg fi 8590e120bd27Smrg 85919dedec0cSmrg case $cc_basename in 85929dedec0cSmrg tcc*) 85939dedec0cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' 85949dedec0cSmrg ;; 85959dedec0cSmrg xlf* | bgf* | bgxlf* | mpixlf*) 85969dedec0cSmrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 85979dedec0cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 85989dedec0cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 85999dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 86009dedec0cSmrg if test yes = "$supports_anon_versioning"; then 86019dedec0cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 86029dedec0cSmrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 86039dedec0cSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 86049dedec0cSmrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 86059dedec0cSmrg fi 86069dedec0cSmrg ;; 86079dedec0cSmrg esac 86089dedec0cSmrg else 86099dedec0cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 86109dedec0cSmrg fi 86119dedec0cSmrg ;; 86129dedec0cSmrg 86139dedec0cSmrg netbsd*) 86149dedec0cSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 86159dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 86169dedec0cSmrg wlarc= 86179dedec0cSmrg else 86189dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 86199dedec0cSmrg _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' 86209dedec0cSmrg fi 86219dedec0cSmrg ;; 8622e120bd27Smrg 86239dedec0cSmrg solaris*) 86249dedec0cSmrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 86259dedec0cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 86269dedec0cSmrg cat <<_LT_EOF 1>&2 86276c321187Smrg 86289dedec0cSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 86299dedec0cSmrg*** create shared libraries on Solaris systems. Therefore, libtool 86309dedec0cSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 86319dedec0cSmrg*** binutils to release 2.9.1 or newer. Another option is to modify 86329dedec0cSmrg*** your PATH or compiler configuration so that the native linker is 86339dedec0cSmrg*** used, and then restart. 86346c321187Smrg 86359dedec0cSmrg_LT_EOF 86369dedec0cSmrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 86379dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 86389dedec0cSmrg _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' 86399dedec0cSmrg else 86409dedec0cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 86419dedec0cSmrg fi 8642198e4c3cSmrg ;; 8643198e4c3cSmrg 86449dedec0cSmrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 86459dedec0cSmrg case `$LD -v 2>&1` in 86469dedec0cSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 86479dedec0cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 86489dedec0cSmrg cat <<_LT_EOF 1>&2 8649198e4c3cSmrg 86509dedec0cSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot 86519dedec0cSmrg*** reliably create shared libraries on SCO systems. Therefore, libtool 86529dedec0cSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 86539dedec0cSmrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 86549dedec0cSmrg*** your PATH or compiler configuration so that the native linker is 86559dedec0cSmrg*** used, and then restart. 86569dedec0cSmrg 86579dedec0cSmrg_LT_EOF 86589dedec0cSmrg ;; 86599dedec0cSmrg *) 86609dedec0cSmrg # For security reasons, it is highly recommended that you always 86619dedec0cSmrg # use absolute paths for naming shared libraries, and exclude the 86629dedec0cSmrg # DT_RUNPATH tag from executables and libraries. But doing so 86639dedec0cSmrg # requires that you compile everything twice, which is a pain. 86649dedec0cSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 86659dedec0cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 86669dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 86679dedec0cSmrg _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' 86689dedec0cSmrg else 86699dedec0cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 86709dedec0cSmrg fi 86719dedec0cSmrg ;; 86729dedec0cSmrg esac 86739dedec0cSmrg ;; 8674198e4c3cSmrg 86759dedec0cSmrg sunos4*) 86769dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 86779dedec0cSmrg wlarc= 86789dedec0cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 86799dedec0cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 86809dedec0cSmrg ;; 8681198e4c3cSmrg 86829d0b5e55Smrg *) 86839dedec0cSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 86849dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 86859dedec0cSmrg _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' 86869dedec0cSmrg else 86879dedec0cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 86889dedec0cSmrg fi 86899d0b5e55Smrg ;; 86909dedec0cSmrg esac 86916c321187Smrg 86929dedec0cSmrg if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then 86939dedec0cSmrg runpath_var= 86949dedec0cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 86959dedec0cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 86969dedec0cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 86979dedec0cSmrg fi 86989dedec0cSmrg else 86999dedec0cSmrg # PORTME fill in a description of your system's linker (not GNU ld) 87009dedec0cSmrg case $host_os in 87019dedec0cSmrg aix3*) 87029dedec0cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 87039dedec0cSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 87049dedec0cSmrg _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' 87059dedec0cSmrg # Note: this linker hardcodes the directories in LIBPATH if there 87069dedec0cSmrg # are no directories specified by -L. 87079dedec0cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 87089dedec0cSmrg if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then 87099dedec0cSmrg # Neither direct hardcoding nor static linking is supported with a 87109dedec0cSmrg # broken collect2. 87119dedec0cSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 87129dedec0cSmrg fi 87139dedec0cSmrg ;; 87146c321187Smrg 87159dedec0cSmrg aix[[4-9]]*) 87169dedec0cSmrg if test ia64 = "$host_cpu"; then 87179dedec0cSmrg # On IA64, the linker does run time linking by default, so we don't 87189dedec0cSmrg # have to do anything special. 87199dedec0cSmrg aix_use_runtimelinking=no 87209dedec0cSmrg exp_sym_flag='-Bexport' 87219dedec0cSmrg no_entry_flag= 87229dedec0cSmrg else 87239dedec0cSmrg # If we're using GNU nm, then we don't want the "-C" option. 87249dedec0cSmrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 87259dedec0cSmrg # Without the "-l" option, or with the "-B" option, AIX nm treats 87269dedec0cSmrg # weak defined symbols like other global defined symbols, whereas 87279dedec0cSmrg # GNU nm marks them as "W". 87289dedec0cSmrg # While the 'weak' keyword is ignored in the Export File, we need 87299dedec0cSmrg # it in the Import File for the 'aix-soname' feature, so we have 87309dedec0cSmrg # to replace the "-B" option with "-P" for AIX nm. 87319dedec0cSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 87329dedec0cSmrg _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' 87339dedec0cSmrg else 87349dedec0cSmrg _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' 87359dedec0cSmrg fi 87369dedec0cSmrg aix_use_runtimelinking=no 87376c321187Smrg 87389dedec0cSmrg # Test if we are trying to use run time linking or normal 87399dedec0cSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 87409dedec0cSmrg # have runtime linking enabled, and use it for executables. 87419dedec0cSmrg # For shared libraries, we enable/disable runtime linking 87429dedec0cSmrg # depending on the kind of the shared library created - 87439dedec0cSmrg # when "with_aix_soname,aix_use_runtimelinking" is: 87449dedec0cSmrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 87459dedec0cSmrg # "aix,yes" lib.so shared, rtl:yes, for executables 87469dedec0cSmrg # lib.a static archive 87479dedec0cSmrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 87489dedec0cSmrg # lib.a(lib.so.V) shared, rtl:no, for executables 87499dedec0cSmrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 87509dedec0cSmrg # lib.a(lib.so.V) shared, rtl:no 87519dedec0cSmrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 87529dedec0cSmrg # lib.a static archive 87539dedec0cSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 87549dedec0cSmrg for ld_flag in $LDFLAGS; do 87559dedec0cSmrg if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then 87569dedec0cSmrg aix_use_runtimelinking=yes 87579dedec0cSmrg break 87589dedec0cSmrg fi 87599dedec0cSmrg done 87609dedec0cSmrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 87619dedec0cSmrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 87629dedec0cSmrg # so we don't have lib.a shared libs to link our executables. 87639dedec0cSmrg # We have to force runtime linking in this case. 87649dedec0cSmrg aix_use_runtimelinking=yes 87659dedec0cSmrg LDFLAGS="$LDFLAGS -Wl,-brtl" 87669dedec0cSmrg fi 87679dedec0cSmrg ;; 87689dedec0cSmrg esac 87696c321187Smrg 87709dedec0cSmrg exp_sym_flag='-bexport' 87719dedec0cSmrg no_entry_flag='-bnoentry' 87729dedec0cSmrg fi 87736c321187Smrg 87749dedec0cSmrg # When large executables or shared objects are built, AIX ld can 87759dedec0cSmrg # have problems creating the table of contents. If linking a library 87769dedec0cSmrg # or program results in "error TOC overflow" add -mminimal-toc to 87779dedec0cSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 87789dedec0cSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 87796c321187Smrg 87809dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='' 87819dedec0cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 87829dedec0cSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 87839dedec0cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 87849dedec0cSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 87859dedec0cSmrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 87869dedec0cSmrg case $with_aix_soname,$aix_use_runtimelinking in 87879dedec0cSmrg aix,*) ;; # traditional, no import file 87889dedec0cSmrg svr4,* | *,yes) # use import file 87899dedec0cSmrg # The Import File defines what to hardcode. 87909dedec0cSmrg _LT_TAGVAR(hardcode_direct, $1)=no 87919dedec0cSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 87929dedec0cSmrg ;; 87939dedec0cSmrg esac 87946c321187Smrg 87959dedec0cSmrg if test yes = "$GCC"; then 87969dedec0cSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 87979dedec0cSmrg # We only want to do this on AIX 4.2 and lower, the check 87989dedec0cSmrg # below for broken collect2 doesn't work under 4.3+ 87999dedec0cSmrg collect2name=`$CC -print-prog-name=collect2` 88009dedec0cSmrg if test -f "$collect2name" && 88019dedec0cSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 88029dedec0cSmrg then 88039dedec0cSmrg # We have reworked collect2 88049dedec0cSmrg : 88059dedec0cSmrg else 88069dedec0cSmrg # We have old collect2 88079dedec0cSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 88089dedec0cSmrg # It fails to find uninstalled libraries when the uninstalled 88099dedec0cSmrg # path is not listed in the libpath. Setting hardcode_minus_L 88109dedec0cSmrg # to unsupported forces relinking 88119dedec0cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 88129dedec0cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 88139dedec0cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 88149dedec0cSmrg fi 88159dedec0cSmrg ;; 88169dedec0cSmrg esac 88179dedec0cSmrg shared_flag='-shared' 88189dedec0cSmrg if test yes = "$aix_use_runtimelinking"; then 88199dedec0cSmrg shared_flag="$shared_flag "'$wl-G' 88209dedec0cSmrg fi 88219dedec0cSmrg # Need to ensure runtime linking is disabled for the traditional 88229dedec0cSmrg # shared library, or the linker may eventually find shared libraries 88239dedec0cSmrg # /with/ Import File - we do not want to mix them. 88249dedec0cSmrg shared_flag_aix='-shared' 88259dedec0cSmrg shared_flag_svr4='-shared $wl-G' 88269dedec0cSmrg else 88279dedec0cSmrg # not using gcc 88289dedec0cSmrg if test ia64 = "$host_cpu"; then 88299dedec0cSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 88309dedec0cSmrg # chokes on -Wl,-G. The following line is correct: 88319dedec0cSmrg shared_flag='-G' 88329dedec0cSmrg else 88339dedec0cSmrg if test yes = "$aix_use_runtimelinking"; then 88349dedec0cSmrg shared_flag='$wl-G' 88359dedec0cSmrg else 88369dedec0cSmrg shared_flag='$wl-bM:SRE' 88379dedec0cSmrg fi 88389dedec0cSmrg shared_flag_aix='$wl-bM:SRE' 88399dedec0cSmrg shared_flag_svr4='$wl-G' 88409dedec0cSmrg fi 88419dedec0cSmrg fi 88426c321187Smrg 88439dedec0cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 88449dedec0cSmrg # It seems that -bexpall does not export symbols beginning with 88459dedec0cSmrg # underscore (_), so it is better to generate a list of symbols to export. 88469dedec0cSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 88479dedec0cSmrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 88489dedec0cSmrg # Warning - without using the other runtime loading flags (-brtl), 88499dedec0cSmrg # -berok will link without error, but may produce a broken library. 88509dedec0cSmrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 88519dedec0cSmrg # Determine the default libpath from the value encoded in an 88529dedec0cSmrg # empty executable. 88539dedec0cSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 88549dedec0cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 88559dedec0cSmrg _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 88569dedec0cSmrg else 88579dedec0cSmrg if test ia64 = "$host_cpu"; then 88589dedec0cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 88599dedec0cSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 88609dedec0cSmrg _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" 88619dedec0cSmrg else 88629dedec0cSmrg # Determine the default libpath from the value encoded in an 88639dedec0cSmrg # empty executable. 88649dedec0cSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 88659dedec0cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 88669dedec0cSmrg # Warning - without using the other run time loading flags, 88679dedec0cSmrg # -berok will link without error, but may produce a broken library. 88689dedec0cSmrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 88699dedec0cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 88709dedec0cSmrg if test yes = "$with_gnu_ld"; then 88719dedec0cSmrg # We only use this code for GNU lds that support --whole-archive. 88729dedec0cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 88739dedec0cSmrg else 88749dedec0cSmrg # Exported symbols can be pulled into shared objects from archives 88759dedec0cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 88769dedec0cSmrg fi 88779dedec0cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 88789dedec0cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 88799dedec0cSmrg # -brtl affects multiple linker settings, -berok does not and is overridden later 88809dedec0cSmrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 88819dedec0cSmrg if test svr4 != "$with_aix_soname"; then 88829dedec0cSmrg # This is similar to how AIX traditionally builds its shared libraries. 88839dedec0cSmrg _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' 88849dedec0cSmrg fi 88859dedec0cSmrg if test aix != "$with_aix_soname"; then 88869dedec0cSmrg _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' 88879dedec0cSmrg else 88889dedec0cSmrg # used by -dlpreopen to get the symbols 88899dedec0cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 88909dedec0cSmrg fi 88919dedec0cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 88929dedec0cSmrg fi 88939dedec0cSmrg fi 88949dedec0cSmrg ;; 8895e120bd27Smrg 88969dedec0cSmrg amigaos*) 88979dedec0cSmrg case $host_cpu in 88989dedec0cSmrg powerpc) 88999dedec0cSmrg # see comment about AmigaOS4 .so support 89009dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 89019dedec0cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 89029dedec0cSmrg ;; 89039dedec0cSmrg m68k) 89049dedec0cSmrg _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)' 89059dedec0cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 89069dedec0cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 89079dedec0cSmrg ;; 89089dedec0cSmrg esac 89099dedec0cSmrg ;; 8910e120bd27Smrg 89119dedec0cSmrg bsdi[[45]]*) 89129dedec0cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 89139dedec0cSmrg ;; 8914e120bd27Smrg 89159dedec0cSmrg cygwin* | mingw* | pw32* | cegcc*) 89169dedec0cSmrg # When not using gcc, we currently assume that we are using 89179dedec0cSmrg # Microsoft Visual C++ or Intel C++ Compiler. 89189dedec0cSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 89199dedec0cSmrg # no search path for DLLs. 89209dedec0cSmrg case $cc_basename in 89219dedec0cSmrg cl* | icl*) 89229dedec0cSmrg # Native MSVC or ICC 89239dedec0cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 89249dedec0cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 89259dedec0cSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 89269dedec0cSmrg _LT_TAGVAR(file_list_spec, $1)='@' 89279dedec0cSmrg # Tell ltmain to make .lib files, not .a files. 89289dedec0cSmrg libext=lib 89299dedec0cSmrg # Tell ltmain to make .dll files, not .so files. 89309dedec0cSmrg shrext_cmds=.dll 89319dedec0cSmrg # FIXME: Setting linknames here is a bad hack. 89329dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 89339dedec0cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 89349dedec0cSmrg cp "$export_symbols" "$output_objdir/$soname.def"; 89359dedec0cSmrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 89369dedec0cSmrg else 89379dedec0cSmrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 89389dedec0cSmrg fi~ 89399dedec0cSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 89409dedec0cSmrg linknames=' 89419dedec0cSmrg # The linker will not automatically build a static lib if we build a DLL. 89429dedec0cSmrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 89439dedec0cSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 89449dedec0cSmrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 89459dedec0cSmrg _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' 89469dedec0cSmrg # Don't use ranlib 89479dedec0cSmrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 89489dedec0cSmrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 89499dedec0cSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 89509dedec0cSmrg case $lt_outputfile in 89519dedec0cSmrg *.exe|*.EXE) ;; 89529dedec0cSmrg *) 89539dedec0cSmrg lt_outputfile=$lt_outputfile.exe 89549dedec0cSmrg lt_tool_outputfile=$lt_tool_outputfile.exe 89559dedec0cSmrg ;; 89569dedec0cSmrg esac~ 89579dedec0cSmrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 89589dedec0cSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 89599dedec0cSmrg $RM "$lt_outputfile.manifest"; 89609dedec0cSmrg fi' 89619dedec0cSmrg ;; 89629dedec0cSmrg *) 89639dedec0cSmrg # Assume MSVC and ICC wrapper 89649dedec0cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 89659dedec0cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 89669dedec0cSmrg # Tell ltmain to make .lib files, not .a files. 89679dedec0cSmrg libext=lib 89689dedec0cSmrg # Tell ltmain to make .dll files, not .so files. 89699dedec0cSmrg shrext_cmds=.dll 89709dedec0cSmrg # FIXME: Setting linknames here is a bad hack. 89719dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 89729dedec0cSmrg # The linker will automatically build a .lib file if we build a DLL. 89739dedec0cSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 89749dedec0cSmrg # FIXME: Should let the user specify the lib program. 89759dedec0cSmrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 89769dedec0cSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 89779dedec0cSmrg ;; 89789dedec0cSmrg esac 89799dedec0cSmrg ;; 8980e120bd27Smrg 89819dedec0cSmrg darwin* | rhapsody*) 89829dedec0cSmrg _LT_DARWIN_LINKER_FEATURES($1) 89839dedec0cSmrg ;; 8984e120bd27Smrg 89859dedec0cSmrg dgux*) 89869dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 89879dedec0cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 89889dedec0cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 89899dedec0cSmrg ;; 8990e120bd27Smrg 89919dedec0cSmrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 89929dedec0cSmrg # support. Future versions do this automatically, but an explicit c++rt0.o 89939dedec0cSmrg # does not break anything, and helps significantly (at the cost of a little 89949dedec0cSmrg # extra space). 89959dedec0cSmrg freebsd2.2*) 89969dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 89979dedec0cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 89989dedec0cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 89999dedec0cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 90009dedec0cSmrg ;; 90016c321187Smrg 90029dedec0cSmrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 90039dedec0cSmrg freebsd2.*) 90049dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 90059dedec0cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 90069dedec0cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 90079dedec0cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 90089dedec0cSmrg ;; 90096c321187Smrg 90109dedec0cSmrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 90119dedec0cSmrg freebsd* | dragonfly* | midnightbsd*) 90129dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 90139dedec0cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 90149dedec0cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 90159dedec0cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 90169dedec0cSmrg ;; 90176c321187Smrg 90189dedec0cSmrg hpux9*) 90199dedec0cSmrg if test yes = "$GCC"; then 90209dedec0cSmrg _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' 90219dedec0cSmrg else 90229dedec0cSmrg _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' 90239dedec0cSmrg fi 90249dedec0cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 90259dedec0cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 90269dedec0cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 90276c321187Smrg 90289dedec0cSmrg # hardcode_minus_L: Not really in the search PATH, 90299dedec0cSmrg # but as the default location of the library. 90309dedec0cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 90319dedec0cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 90329dedec0cSmrg ;; 90336c321187Smrg 90349dedec0cSmrg hpux10*) 90359dedec0cSmrg if test yes,no = "$GCC,$with_gnu_ld"; then 90369dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 90379dedec0cSmrg else 90389dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 90399dedec0cSmrg fi 90409dedec0cSmrg if test no = "$with_gnu_ld"; then 90419dedec0cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 90429dedec0cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 90439dedec0cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 90449dedec0cSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 90459dedec0cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 90469dedec0cSmrg # hardcode_minus_L: Not really in the search PATH, 90479dedec0cSmrg # but as the default location of the library. 90489dedec0cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 90499dedec0cSmrg fi 90509dedec0cSmrg ;; 90516c321187Smrg 90529dedec0cSmrg hpux11*) 90539dedec0cSmrg if test yes,no = "$GCC,$with_gnu_ld"; then 90549dedec0cSmrg case $host_cpu in 90559dedec0cSmrg hppa*64*) 90569dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 90579dedec0cSmrg ;; 90589dedec0cSmrg ia64*) 90599dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 90609dedec0cSmrg ;; 90619dedec0cSmrg *) 90629dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 90639dedec0cSmrg ;; 90649dedec0cSmrg esac 90659dedec0cSmrg else 90669dedec0cSmrg case $host_cpu in 90679dedec0cSmrg hppa*64*) 90689dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 90699dedec0cSmrg ;; 90709dedec0cSmrg ia64*) 90719dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 90729dedec0cSmrg ;; 90739dedec0cSmrg *) 90749dedec0cSmrg m4_if($1, [], [ 90759dedec0cSmrg # Older versions of the 11.00 compiler do not understand -b yet 90769dedec0cSmrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 90779dedec0cSmrg _LT_LINKER_OPTION([if $CC understands -b], 90789dedec0cSmrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 90799dedec0cSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 90809dedec0cSmrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 90819dedec0cSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 90829dedec0cSmrg ;; 90839dedec0cSmrg esac 90849dedec0cSmrg fi 90859dedec0cSmrg if test no = "$with_gnu_ld"; then 90869dedec0cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 90879dedec0cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 90886c321187Smrg 90899dedec0cSmrg case $host_cpu in 90909dedec0cSmrg hppa*64*|ia64*) 90919dedec0cSmrg _LT_TAGVAR(hardcode_direct, $1)=no 90929dedec0cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 90939dedec0cSmrg ;; 90949dedec0cSmrg *) 90959dedec0cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 90969dedec0cSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 90979dedec0cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 909893493779Smrg 90999dedec0cSmrg # hardcode_minus_L: Not really in the search PATH, 91009dedec0cSmrg # but as the default location of the library. 91019dedec0cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 91029dedec0cSmrg ;; 91039dedec0cSmrg esac 91049dedec0cSmrg fi 91059dedec0cSmrg ;; 91066c321187Smrg 91079dedec0cSmrg irix5* | irix6* | nonstopux*) 91089dedec0cSmrg if test yes = "$GCC"; then 91099dedec0cSmrg _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' 91109dedec0cSmrg # Try to use the -exported_symbol ld option, if it does not 91119dedec0cSmrg # work, assume that -exports_file does not work either and 91129dedec0cSmrg # implicitly export all symbols. 91139dedec0cSmrg # This should be the same for all languages, so no per-tag cache variable. 91149dedec0cSmrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 91159dedec0cSmrg [lt_cv_irix_exported_symbol], 91169dedec0cSmrg [save_LDFLAGS=$LDFLAGS 91179dedec0cSmrg LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" 91189dedec0cSmrg AC_LINK_IFELSE( 91199dedec0cSmrg [AC_LANG_SOURCE( 91209dedec0cSmrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 91219dedec0cSmrg [C++], [[int foo (void) { return 0; }]], 91229dedec0cSmrg [Fortran 77], [[ 91239dedec0cSmrg subroutine foo 91249dedec0cSmrg end]], 91259dedec0cSmrg [Fortran], [[ 91269dedec0cSmrg subroutine foo 91279dedec0cSmrg end]])])], 91289dedec0cSmrg [lt_cv_irix_exported_symbol=yes], 91299dedec0cSmrg [lt_cv_irix_exported_symbol=no]) 91309dedec0cSmrg LDFLAGS=$save_LDFLAGS]) 91319dedec0cSmrg if test yes = "$lt_cv_irix_exported_symbol"; then 91329dedec0cSmrg _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' 91339dedec0cSmrg fi 91349dedec0cSmrg else 91359dedec0cSmrg _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' 91369dedec0cSmrg _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' 91379dedec0cSmrg fi 91389dedec0cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 91399dedec0cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 91409dedec0cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 91419dedec0cSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 91429dedec0cSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 91439dedec0cSmrg ;; 91449dedec0cSmrg 91459dedec0cSmrg linux*) 91469dedec0cSmrg case $cc_basename in 91479dedec0cSmrg tcc*) 91489dedec0cSmrg # Fabrice Bellard et al's Tiny C Compiler 91499dedec0cSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 91509dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 91519dedec0cSmrg ;; 91529dedec0cSmrg esac 91539dedec0cSmrg ;; 91546c321187Smrg 91559dedec0cSmrg netbsd*) 91569dedec0cSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 91579dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 91589dedec0cSmrg else 91599dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 91609dedec0cSmrg fi 91619dedec0cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 91629dedec0cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 91639dedec0cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 91649dedec0cSmrg ;; 91656c321187Smrg 91669dedec0cSmrg newsos6) 91679dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 91689dedec0cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 91699dedec0cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 91709dedec0cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 91719dedec0cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 91729dedec0cSmrg ;; 91736c321187Smrg 91749dedec0cSmrg *nto* | *qnx*) 91759dedec0cSmrg ;; 91766c321187Smrg 91779dedec0cSmrg openbsd* | bitrig*) 91789dedec0cSmrg if test -f /usr/libexec/ld.so; then 91799dedec0cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 91809dedec0cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 91819dedec0cSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 91829dedec0cSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 91839dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 91849dedec0cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' 91859dedec0cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 91869dedec0cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 91879dedec0cSmrg else 91889dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 91899dedec0cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 91909dedec0cSmrg fi 91919dedec0cSmrg else 91929dedec0cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 91939dedec0cSmrg fi 91949dedec0cSmrg ;; 91956c321187Smrg 91969dedec0cSmrg os2*) 91979dedec0cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 91989dedec0cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 91999dedec0cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 92009dedec0cSmrg shrext_cmds=.dll 92019dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 92029dedec0cSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 92039dedec0cSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 92049dedec0cSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 92059dedec0cSmrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 92069dedec0cSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 92079dedec0cSmrg emximp -o $lib $output_objdir/$libname.def' 92089dedec0cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 92099dedec0cSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 92109dedec0cSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 92119dedec0cSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 92129dedec0cSmrg prefix_cmds="$SED"~ 92139dedec0cSmrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 92149dedec0cSmrg prefix_cmds="$prefix_cmds -e 1d"; 92159dedec0cSmrg fi~ 92169dedec0cSmrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 92179dedec0cSmrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 92189dedec0cSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 92199dedec0cSmrg emximp -o $lib $output_objdir/$libname.def' 92209dedec0cSmrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 92219dedec0cSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 92229dedec0cSmrg _LT_TAGVAR(file_list_spec, $1)='@' 92239dedec0cSmrg ;; 92240cc2eac3Smrg 92259dedec0cSmrg osf3*) 92269dedec0cSmrg if test yes = "$GCC"; then 92279dedec0cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 92289dedec0cSmrg _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' 92299dedec0cSmrg else 92309dedec0cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 92319dedec0cSmrg _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' 92329dedec0cSmrg fi 92339dedec0cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 92349dedec0cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 92359dedec0cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 92369dedec0cSmrg ;; 92376c321187Smrg 92389dedec0cSmrg osf4* | osf5*) # as osf3* with the addition of -msym flag 92399dedec0cSmrg if test yes = "$GCC"; then 92409dedec0cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 92419dedec0cSmrg _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' 92429dedec0cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 92439dedec0cSmrg else 92449dedec0cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 92459dedec0cSmrg _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' 92469dedec0cSmrg _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~ 92479dedec0cSmrg $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' 9248e120bd27Smrg 92499dedec0cSmrg # Both c and cxx compiler support -rpath directly 92509dedec0cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 92519dedec0cSmrg fi 92529dedec0cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 92539dedec0cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 92549dedec0cSmrg ;; 92556c321187Smrg 92569dedec0cSmrg solaris*) 92579dedec0cSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 92589dedec0cSmrg if test yes = "$GCC"; then 92599dedec0cSmrg wlarc='$wl' 92609dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 92619dedec0cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 92629dedec0cSmrg $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' 92639dedec0cSmrg else 92649dedec0cSmrg case `$CC -V 2>&1` in 92659dedec0cSmrg *"Compilers 5.0"*) 92669dedec0cSmrg wlarc='' 92679dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' 92689dedec0cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 92699dedec0cSmrg $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 92709dedec0cSmrg ;; 92719dedec0cSmrg *) 92729dedec0cSmrg wlarc='$wl' 92739dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' 92749dedec0cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 92759dedec0cSmrg $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 92769dedec0cSmrg ;; 92779dedec0cSmrg esac 92789dedec0cSmrg fi 92799dedec0cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 92809dedec0cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 92819dedec0cSmrg case $host_os in 92829dedec0cSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 92839dedec0cSmrg *) 92849dedec0cSmrg # The compiler driver will combine and reorder linker options, 92859dedec0cSmrg # but understands '-z linker_flag'. GCC discards it without '$wl', 92869dedec0cSmrg # but is careful enough not to reorder. 92879dedec0cSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 92889dedec0cSmrg if test yes = "$GCC"; then 92899dedec0cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 92909dedec0cSmrg else 92919dedec0cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 92929dedec0cSmrg fi 92939dedec0cSmrg ;; 92949dedec0cSmrg esac 92959dedec0cSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 92969dedec0cSmrg ;; 92976c321187Smrg 92989dedec0cSmrg sunos4*) 92999dedec0cSmrg if test sequent = "$host_vendor"; then 93009dedec0cSmrg # Use $CC to link under sequent, because it throws in some extra .o 93019dedec0cSmrg # files that make .init and .fini sections work. 93029dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' 93039dedec0cSmrg else 93049dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 93059dedec0cSmrg fi 93069dedec0cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 93079dedec0cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 93089dedec0cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 93099dedec0cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 93109dedec0cSmrg ;; 9311e120bd27Smrg 93129dedec0cSmrg sysv4) 93139dedec0cSmrg case $host_vendor in 93149dedec0cSmrg sni) 93159dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 93169dedec0cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 93179dedec0cSmrg ;; 93189dedec0cSmrg siemens) 93199dedec0cSmrg ## LD is ld it makes a PLAMLIB 93209dedec0cSmrg ## CC just makes a GrossModule. 93219dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 93229dedec0cSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 93239dedec0cSmrg _LT_TAGVAR(hardcode_direct, $1)=no 93249dedec0cSmrg ;; 93259dedec0cSmrg motorola) 93269dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 93279dedec0cSmrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 93289dedec0cSmrg ;; 93299dedec0cSmrg esac 93309dedec0cSmrg runpath_var='LD_RUN_PATH' 93319dedec0cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 93329dedec0cSmrg ;; 93336c321187Smrg 93349dedec0cSmrg sysv4.3*) 93359dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 93369dedec0cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 93379dedec0cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 93389dedec0cSmrg ;; 93396c321187Smrg 93409dedec0cSmrg sysv4*MP*) 93419dedec0cSmrg if test -d /usr/nec; then 93429dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 93439dedec0cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 93449dedec0cSmrg runpath_var=LD_RUN_PATH 93459dedec0cSmrg hardcode_runpath_var=yes 93469dedec0cSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 93479dedec0cSmrg fi 93489dedec0cSmrg ;; 9349e120bd27Smrg 93509dedec0cSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 93519dedec0cSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 93529dedec0cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 93539dedec0cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 93549dedec0cSmrg runpath_var='LD_RUN_PATH' 93550cc2eac3Smrg 93569dedec0cSmrg if test yes = "$GCC"; then 93579dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 93589dedec0cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 93599dedec0cSmrg else 93609dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 93619dedec0cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 93629dedec0cSmrg fi 93639dedec0cSmrg ;; 9364e120bd27Smrg 93659dedec0cSmrg sysv5* | sco3.2v5* | sco5v6*) 93669dedec0cSmrg # Note: We CANNOT use -z defs as we might desire, because we do not 93679dedec0cSmrg # link with -lc, and that would cause any symbols used from libc to 93689dedec0cSmrg # always be unresolved, which means just about no library would 93699dedec0cSmrg # ever link correctly. If we're not using GNU ld we use -z text 93709dedec0cSmrg # though, which does catch some bad symbols but isn't as heavy-handed 93719dedec0cSmrg # as -z defs. 93729dedec0cSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 93739dedec0cSmrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 93749dedec0cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 93759dedec0cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 93769dedec0cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 93779dedec0cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 93789dedec0cSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 93799dedec0cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 93809dedec0cSmrg runpath_var='LD_RUN_PATH' 9381e120bd27Smrg 93829dedec0cSmrg if test yes = "$GCC"; then 93839dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 93849dedec0cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 93859dedec0cSmrg else 93869dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 93879dedec0cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 93889dedec0cSmrg fi 93899dedec0cSmrg ;; 9390e120bd27Smrg 93919dedec0cSmrg uts4*) 93929dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 93939dedec0cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 93949dedec0cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 93959dedec0cSmrg ;; 9396e120bd27Smrg 93979dedec0cSmrg *) 93989dedec0cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 93999dedec0cSmrg ;; 94009dedec0cSmrg esac 9401198e4c3cSmrg 94029dedec0cSmrg if test sni = "$host_vendor"; then 94039dedec0cSmrg case $host in 94049dedec0cSmrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 94059dedec0cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' 94069dedec0cSmrg ;; 94079dedec0cSmrg esac 94089dedec0cSmrg fi 94099dedec0cSmrg fi 94109dedec0cSmrg]) 94119dedec0cSmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 94129dedec0cSmrgtest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 9413198e4c3cSmrg 94149dedec0cSmrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 9415198e4c3cSmrg 94169dedec0cSmrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 94179dedec0cSmrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 94189dedec0cSmrg_LT_DECL([], [extract_expsyms_cmds], [2], 94199dedec0cSmrg [The commands to extract the exported symbol list from a shared archive]) 94209dedec0cSmrg 94219dedec0cSmrg# 94229dedec0cSmrg# Do we need to explicitly link libc? 94239dedec0cSmrg# 94249dedec0cSmrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 94259dedec0cSmrgx|xyes) 94269dedec0cSmrg # Assume -lc should be added 94279dedec0cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 94289dedec0cSmrg 94299dedec0cSmrg if test yes,yes = "$GCC,$enable_shared"; then 94309dedec0cSmrg case $_LT_TAGVAR(archive_cmds, $1) in 94319dedec0cSmrg *'~'*) 94329dedec0cSmrg # FIXME: we may have to deal with multi-command sequences. 94339dedec0cSmrg ;; 94349dedec0cSmrg '$CC '*) 94359dedec0cSmrg # Test whether the compiler implicitly links with -lc since on some 94369dedec0cSmrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 94379dedec0cSmrg # to ld, don't add -lc before -lgcc. 94389dedec0cSmrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 94399dedec0cSmrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 94409dedec0cSmrg [$RM conftest* 94419dedec0cSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 94429dedec0cSmrg 94439dedec0cSmrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 94449dedec0cSmrg soname=conftest 94459dedec0cSmrg lib=conftest 94469dedec0cSmrg libobjs=conftest.$ac_objext 94479dedec0cSmrg deplibs= 94489dedec0cSmrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 94499dedec0cSmrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 94509dedec0cSmrg compiler_flags=-v 94519dedec0cSmrg linker_flags=-v 94529dedec0cSmrg verstring= 94539dedec0cSmrg output_objdir=. 94549dedec0cSmrg libname=conftest 94559dedec0cSmrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 94569dedec0cSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 94579dedec0cSmrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 94589dedec0cSmrg then 94599dedec0cSmrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 94609dedec0cSmrg else 94619dedec0cSmrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 94629dedec0cSmrg fi 94639dedec0cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 94649d0b5e55Smrg else 94659dedec0cSmrg cat conftest.err 1>&5 94669d0b5e55Smrg fi 94679dedec0cSmrg $RM conftest* 94689dedec0cSmrg ]) 94699dedec0cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 94709dedec0cSmrg ;; 94719dedec0cSmrg esac 94729dedec0cSmrg fi 94739dedec0cSmrg ;; 94749dedec0cSmrgesac 94759d0b5e55Smrg 94769dedec0cSmrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 94779dedec0cSmrg [Whether or not to add -lc for building shared libraries]) 94789dedec0cSmrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 94799dedec0cSmrg [enable_shared_with_static_runtimes], [0], 94809dedec0cSmrg [Whether or not to disallow shared libs when runtime libs are static]) 94819dedec0cSmrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 94829dedec0cSmrg [Compiler flag to allow reflexive dlopens]) 94839dedec0cSmrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 94849dedec0cSmrg [Compiler flag to generate shared objects directly from archives]) 94859dedec0cSmrg_LT_TAGDECL([], [compiler_needs_object], [1], 94869dedec0cSmrg [Whether the compiler copes with passing no objects directly]) 94879dedec0cSmrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 94889dedec0cSmrg [Create an old-style archive from a shared archive]) 94899dedec0cSmrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 94909dedec0cSmrg [Create a temporary old-style archive to link instead of a shared archive]) 94919dedec0cSmrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 94929dedec0cSmrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 94939dedec0cSmrg_LT_TAGDECL([], [module_cmds], [2], 94949dedec0cSmrg [Commands used to build a loadable module if different from building 94959dedec0cSmrg a shared archive.]) 94969dedec0cSmrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 94979dedec0cSmrg_LT_TAGDECL([], [with_gnu_ld], [1], 94989dedec0cSmrg [Whether we are building with GNU ld or not]) 94999dedec0cSmrg_LT_TAGDECL([], [allow_undefined_flag], [1], 95009dedec0cSmrg [Flag that allows shared libraries with undefined symbols to be built]) 95019dedec0cSmrg_LT_TAGDECL([], [no_undefined_flag], [1], 95029dedec0cSmrg [Flag that enforces no undefined symbols]) 95039dedec0cSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 95049dedec0cSmrg [Flag to hardcode $libdir into a binary during linking. 95059dedec0cSmrg This must work even if $libdir does not exist]) 95069dedec0cSmrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 95079dedec0cSmrg [Whether we need a single "-rpath" flag with a separated argument]) 95089dedec0cSmrg_LT_TAGDECL([], [hardcode_direct], [0], 95099dedec0cSmrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 95109dedec0cSmrg DIR into the resulting binary]) 95119dedec0cSmrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 95129dedec0cSmrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 95139dedec0cSmrg DIR into the resulting binary and the resulting library dependency is 95149dedec0cSmrg "absolute", i.e impossible to change by setting $shlibpath_var if the 95159dedec0cSmrg library is relocated]) 95169dedec0cSmrg_LT_TAGDECL([], [hardcode_minus_L], [0], 95179dedec0cSmrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 95189dedec0cSmrg into the resulting binary]) 95199dedec0cSmrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 95209dedec0cSmrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 95219dedec0cSmrg into the resulting binary]) 95229dedec0cSmrg_LT_TAGDECL([], [hardcode_automatic], [0], 95239dedec0cSmrg [Set to "yes" if building a shared library automatically hardcodes DIR 95249dedec0cSmrg into the library and all subsequent libraries and executables linked 95259dedec0cSmrg against it]) 95269dedec0cSmrg_LT_TAGDECL([], [inherit_rpath], [0], 95279dedec0cSmrg [Set to yes if linker adds runtime paths of dependent libraries 95289dedec0cSmrg to runtime path list]) 95299dedec0cSmrg_LT_TAGDECL([], [link_all_deplibs], [0], 95309dedec0cSmrg [Whether libtool must link a program against all its dependency libraries]) 95319dedec0cSmrg_LT_TAGDECL([], [always_export_symbols], [0], 95329dedec0cSmrg [Set to "yes" if exported symbols are required]) 95339dedec0cSmrg_LT_TAGDECL([], [export_symbols_cmds], [2], 95349dedec0cSmrg [The commands to list exported symbols]) 95359dedec0cSmrg_LT_TAGDECL([], [exclude_expsyms], [1], 95369dedec0cSmrg [Symbols that should not be listed in the preloaded symbols]) 95379dedec0cSmrg_LT_TAGDECL([], [include_expsyms], [1], 95389dedec0cSmrg [Symbols that must always be exported]) 95399dedec0cSmrg_LT_TAGDECL([], [prelink_cmds], [2], 95409dedec0cSmrg [Commands necessary for linking programs (against libraries) with templates]) 95419dedec0cSmrg_LT_TAGDECL([], [postlink_cmds], [2], 95429dedec0cSmrg [Commands necessary for finishing linking programs]) 95439dedec0cSmrg_LT_TAGDECL([], [file_list_spec], [1], 95449dedec0cSmrg [Specify filename containing input files]) 95459dedec0cSmrgdnl FIXME: Not yet implemented 95469dedec0cSmrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 95479dedec0cSmrgdnl [Compiler flag to generate thread safe objects]) 95489dedec0cSmrg])# _LT_LINKER_SHLIBS 95499dedec0cSmrg 95509dedec0cSmrg 95519dedec0cSmrg# _LT_LANG_C_CONFIG([TAG]) 95529dedec0cSmrg# ------------------------ 95539dedec0cSmrg# Ensure that the configuration variables for a C compiler are suitably 95549dedec0cSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 95559dedec0cSmrg# the compiler configuration to 'libtool'. 95569dedec0cSmrgm4_defun([_LT_LANG_C_CONFIG], 95579dedec0cSmrg[m4_require([_LT_DECL_EGREP])dnl 95589dedec0cSmrglt_save_CC=$CC 95599dedec0cSmrgAC_LANG_PUSH(C) 95609dedec0cSmrg 95619dedec0cSmrg# Source file extension for C test sources. 95629dedec0cSmrgac_ext=c 95639d0b5e55Smrg 95649dedec0cSmrg# Object file extension for compiled C test sources. 95659dedec0cSmrgobjext=o 95669dedec0cSmrg_LT_TAGVAR(objext, $1)=$objext 95679d0b5e55Smrg 95689dedec0cSmrg# Code to be used in simple compile tests 95699dedec0cSmrglt_simple_compile_test_code="int some_variable = 0;" 95709d0b5e55Smrg 95719dedec0cSmrg# Code to be used in simple link tests 95729dedec0cSmrglt_simple_link_test_code='int main(){return(0);}' 95739d0b5e55Smrg 95749dedec0cSmrg_LT_TAG_COMPILER 95759dedec0cSmrg# Save the default compiler, since it gets overwritten when the other 95769dedec0cSmrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 95779dedec0cSmrgcompiler_DEFAULT=$CC 95789d0b5e55Smrg 95799dedec0cSmrg# save warnings/boilerplate of simple test code 95809dedec0cSmrg_LT_COMPILER_BOILERPLATE 95819dedec0cSmrg_LT_LINKER_BOILERPLATE 95829d0b5e55Smrg 95839dedec0cSmrgif test -n "$compiler"; then 95849dedec0cSmrg _LT_COMPILER_NO_RTTI($1) 95859dedec0cSmrg _LT_COMPILER_PIC($1) 95869dedec0cSmrg _LT_COMPILER_C_O($1) 95879dedec0cSmrg _LT_COMPILER_FILE_LOCKS($1) 95889dedec0cSmrg _LT_LINKER_SHLIBS($1) 95899dedec0cSmrg _LT_SYS_DYNAMIC_LINKER($1) 95909dedec0cSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 95919dedec0cSmrg LT_SYS_DLOPEN_SELF 95929dedec0cSmrg _LT_CMD_STRIPLIB 95939d0b5e55Smrg 95949dedec0cSmrg # Report what library types will actually be built 95959dedec0cSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 95969dedec0cSmrg AC_MSG_RESULT([$can_build_shared]) 95979d0b5e55Smrg 95989dedec0cSmrg AC_MSG_CHECKING([whether to build shared libraries]) 95999dedec0cSmrg test no = "$can_build_shared" && enable_shared=no 96009d0b5e55Smrg 96019dedec0cSmrg # On AIX, shared libraries and static libraries use the same namespace, and 96029dedec0cSmrg # are all built from PIC. 96039dedec0cSmrg case $host_os in 96049dedec0cSmrg aix3*) 96059dedec0cSmrg test yes = "$enable_shared" && enable_static=no 96069dedec0cSmrg if test -n "$RANLIB"; then 96079dedec0cSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 96089dedec0cSmrg postinstall_cmds='$RANLIB $lib' 96099dedec0cSmrg fi 96109dedec0cSmrg ;; 96119d0b5e55Smrg 96129dedec0cSmrg aix[[4-9]]*) 96139dedec0cSmrg if test ia64 != "$host_cpu"; then 96149dedec0cSmrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 96159dedec0cSmrg yes,aix,yes) ;; # shared object as lib.so file only 96169dedec0cSmrg yes,svr4,*) ;; # shared object as lib.so archive member only 96179dedec0cSmrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 96189dedec0cSmrg esac 96199dedec0cSmrg fi 96209dedec0cSmrg ;; 96219dedec0cSmrg esac 96229dedec0cSmrg AC_MSG_RESULT([$enable_shared]) 96239d0b5e55Smrg 96249dedec0cSmrg AC_MSG_CHECKING([whether to build static libraries]) 96259dedec0cSmrg # Make sure either enable_shared or enable_static is yes. 96269dedec0cSmrg test yes = "$enable_shared" || enable_static=yes 96279dedec0cSmrg AC_MSG_RESULT([$enable_static]) 96289d0b5e55Smrg 96299dedec0cSmrg _LT_CONFIG($1) 96309dedec0cSmrgfi 96319dedec0cSmrgAC_LANG_POP 96329dedec0cSmrgCC=$lt_save_CC 96339dedec0cSmrg])# _LT_LANG_C_CONFIG 96349d0b5e55Smrg 96359d0b5e55Smrg 96369dedec0cSmrg# _LT_LANG_CXX_CONFIG([TAG]) 96379dedec0cSmrg# -------------------------- 96389dedec0cSmrg# Ensure that the configuration variables for a C++ compiler are suitably 96399dedec0cSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 96409dedec0cSmrg# the compiler configuration to 'libtool'. 96419dedec0cSmrgm4_defun([_LT_LANG_CXX_CONFIG], 96429dedec0cSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 96439dedec0cSmrgm4_require([_LT_DECL_EGREP])dnl 96449dedec0cSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 96459dedec0cSmrgif test -n "$CXX" && ( test no != "$CXX" && 96469dedec0cSmrg ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || 96479dedec0cSmrg (test g++ != "$CXX"))); then 96489dedec0cSmrg AC_PROG_CXXCPP 96499d0b5e55Smrgelse 96509dedec0cSmrg _lt_caught_CXX_error=yes 96519dedec0cSmrgfi 9652198e4c3cSmrg 96539dedec0cSmrgAC_LANG_PUSH(C++) 96549dedec0cSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 96559dedec0cSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 96569dedec0cSmrg_LT_TAGVAR(always_export_symbols, $1)=no 96579dedec0cSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 96589dedec0cSmrg_LT_TAGVAR(compiler_needs_object, $1)=no 96599dedec0cSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 96609dedec0cSmrg_LT_TAGVAR(hardcode_direct, $1)=no 96619dedec0cSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 96629dedec0cSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 96639dedec0cSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 96649dedec0cSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 96659dedec0cSmrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 96669dedec0cSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 96679dedec0cSmrg_LT_TAGVAR(inherit_rpath, $1)=no 96689dedec0cSmrg_LT_TAGVAR(module_cmds, $1)= 96699dedec0cSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 96709dedec0cSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 96719dedec0cSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 96729dedec0cSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 96739dedec0cSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 96749dedec0cSmrg_LT_TAGVAR(no_undefined_flag, $1)= 96759dedec0cSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 96769dedec0cSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 9677198e4c3cSmrg 96789dedec0cSmrg# Source file extension for C++ test sources. 96799dedec0cSmrgac_ext=cpp 96809dedec0cSmrg 96819dedec0cSmrg# Object file extension for compiled C++ test sources. 96829dedec0cSmrgobjext=o 96839dedec0cSmrg_LT_TAGVAR(objext, $1)=$objext 96849dedec0cSmrg 96859dedec0cSmrg# No sense in running all these tests if we already determined that 96869dedec0cSmrg# the CXX compiler isn't working. Some variables (like enable_shared) 96879dedec0cSmrg# are currently assumed to apply to all compilers on this platform, 96889dedec0cSmrg# and will be corrupted by setting them based on a non-working compiler. 96899dedec0cSmrgif test yes != "$_lt_caught_CXX_error"; then 96909dedec0cSmrg # Code to be used in simple compile tests 96919dedec0cSmrg lt_simple_compile_test_code="int some_variable = 0;" 96929dedec0cSmrg 96939dedec0cSmrg # Code to be used in simple link tests 96949dedec0cSmrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 96959dedec0cSmrg 96969dedec0cSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 96979dedec0cSmrg _LT_TAG_COMPILER 96989dedec0cSmrg 96999dedec0cSmrg # save warnings/boilerplate of simple test code 97009dedec0cSmrg _LT_COMPILER_BOILERPLATE 97019dedec0cSmrg _LT_LINKER_BOILERPLATE 97029dedec0cSmrg 97039dedec0cSmrg # Allow CC to be a program name with arguments. 97049dedec0cSmrg lt_save_CC=$CC 97059dedec0cSmrg lt_save_CFLAGS=$CFLAGS 97069dedec0cSmrg lt_save_LD=$LD 97079dedec0cSmrg lt_save_GCC=$GCC 97089dedec0cSmrg GCC=$GXX 97099dedec0cSmrg lt_save_with_gnu_ld=$with_gnu_ld 97109dedec0cSmrg lt_save_path_LD=$lt_cv_path_LD 97119dedec0cSmrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 97129dedec0cSmrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 97139dedec0cSmrg else 97149dedec0cSmrg $as_unset lt_cv_prog_gnu_ld 97159dedec0cSmrg fi 97169dedec0cSmrg if test -n "${lt_cv_path_LDCXX+set}"; then 97179dedec0cSmrg lt_cv_path_LD=$lt_cv_path_LDCXX 97189dedec0cSmrg else 97199dedec0cSmrg $as_unset lt_cv_path_LD 97209dedec0cSmrg fi 97219dedec0cSmrg test -z "${LDCXX+set}" || LD=$LDCXX 97229dedec0cSmrg CC=${CXX-"c++"} 97239dedec0cSmrg CFLAGS=$CXXFLAGS 97249dedec0cSmrg compiler=$CC 97259dedec0cSmrg _LT_TAGVAR(compiler, $1)=$CC 97269dedec0cSmrg _LT_CC_BASENAME([$compiler]) 97279dedec0cSmrg 97289dedec0cSmrg if test -n "$compiler"; then 97299dedec0cSmrg # We don't want -fno-exception when compiling C++ code, so set the 97309dedec0cSmrg # no_builtin_flag separately 97319dedec0cSmrg if test yes = "$GXX"; then 97329dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 97339dedec0cSmrg else 97349dedec0cSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 97359dedec0cSmrg fi 9736198e4c3cSmrg 97379dedec0cSmrg if test yes = "$GXX"; then 97389dedec0cSmrg # Set up default GNU C++ configuration 9739198e4c3cSmrg 97409dedec0cSmrg LT_PATH_LD 9741198e4c3cSmrg 97429dedec0cSmrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 97439dedec0cSmrg # archiving commands below assume that GNU ld is being used. 97449dedec0cSmrg if test yes = "$with_gnu_ld"; then 97459dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 97469dedec0cSmrg _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' 9747198e4c3cSmrg 97489dedec0cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 97499dedec0cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 9750198e4c3cSmrg 97519dedec0cSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 97529dedec0cSmrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 97539dedec0cSmrg # investigate it a little bit more. (MM) 97549dedec0cSmrg wlarc='$wl' 9755198e4c3cSmrg 97569dedec0cSmrg # ancient GNU ld didn't support --whole-archive et. al. 97579dedec0cSmrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 97589dedec0cSmrg $GREP 'no-whole-archive' > /dev/null; then 97599dedec0cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 97609dedec0cSmrg else 97619dedec0cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 97629dedec0cSmrg fi 97639dedec0cSmrg else 97649dedec0cSmrg with_gnu_ld=no 97659dedec0cSmrg wlarc= 9766198e4c3cSmrg 97679dedec0cSmrg # A generic and very simple default shared library creation 97689dedec0cSmrg # command for GNU C++ for the case where it uses the native 97699dedec0cSmrg # linker, instead of GNU ld. If possible, this setting should 97709dedec0cSmrg # overridden to take advantage of the native linker features on 97719dedec0cSmrg # the platform it is being used on. 97729dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 97739dedec0cSmrg fi 9774198e4c3cSmrg 97759dedec0cSmrg # Commands to make compiler produce verbose output that lists 97769dedec0cSmrg # what "hidden" libraries, object files and flags are used when 97779dedec0cSmrg # linking a shared library. 97789dedec0cSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 97799d0b5e55Smrg 97809dedec0cSmrg else 97819dedec0cSmrg GXX=no 97829dedec0cSmrg with_gnu_ld=no 97839dedec0cSmrg wlarc= 97849dedec0cSmrg fi 9785e120bd27Smrg 97869dedec0cSmrg # PORTME: fill in a description of your system's C++ link characteristics 97879dedec0cSmrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 97889dedec0cSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 97899dedec0cSmrg case $host_os in 97909dedec0cSmrg aix3*) 97919dedec0cSmrg # FIXME: insert proper C++ library support 97929dedec0cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 97939dedec0cSmrg ;; 97949dedec0cSmrg aix[[4-9]]*) 97959dedec0cSmrg if test ia64 = "$host_cpu"; then 97969dedec0cSmrg # On IA64, the linker does run time linking by default, so we don't 97979dedec0cSmrg # have to do anything special. 97989dedec0cSmrg aix_use_runtimelinking=no 97999dedec0cSmrg exp_sym_flag='-Bexport' 98009dedec0cSmrg no_entry_flag= 98019dedec0cSmrg else 98029dedec0cSmrg aix_use_runtimelinking=no 98039dedec0cSmrg 98049dedec0cSmrg # Test if we are trying to use run time linking or normal 98059dedec0cSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 98069dedec0cSmrg # have runtime linking enabled, and use it for executables. 98079dedec0cSmrg # For shared libraries, we enable/disable runtime linking 98089dedec0cSmrg # depending on the kind of the shared library created - 98099dedec0cSmrg # when "with_aix_soname,aix_use_runtimelinking" is: 98109dedec0cSmrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 98119dedec0cSmrg # "aix,yes" lib.so shared, rtl:yes, for executables 98129dedec0cSmrg # lib.a static archive 98139dedec0cSmrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 98149dedec0cSmrg # lib.a(lib.so.V) shared, rtl:no, for executables 98159dedec0cSmrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 98169dedec0cSmrg # lib.a(lib.so.V) shared, rtl:no 98179dedec0cSmrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 98189dedec0cSmrg # lib.a static archive 98199dedec0cSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 98209dedec0cSmrg for ld_flag in $LDFLAGS; do 98219dedec0cSmrg case $ld_flag in 98229dedec0cSmrg *-brtl*) 98239dedec0cSmrg aix_use_runtimelinking=yes 98249dedec0cSmrg break 98259dedec0cSmrg ;; 98269dedec0cSmrg esac 98279dedec0cSmrg done 98289dedec0cSmrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 98299dedec0cSmrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 98309dedec0cSmrg # so we don't have lib.a shared libs to link our executables. 98319dedec0cSmrg # We have to force runtime linking in this case. 98329dedec0cSmrg aix_use_runtimelinking=yes 98339dedec0cSmrg LDFLAGS="$LDFLAGS -Wl,-brtl" 98349dedec0cSmrg fi 98359dedec0cSmrg ;; 98369dedec0cSmrg esac 98379dedec0cSmrg 98389dedec0cSmrg exp_sym_flag='-bexport' 98399dedec0cSmrg no_entry_flag='-bnoentry' 98409dedec0cSmrg fi 98419dedec0cSmrg 98429dedec0cSmrg # When large executables or shared objects are built, AIX ld can 98439dedec0cSmrg # have problems creating the table of contents. If linking a library 98449dedec0cSmrg # or program results in "error TOC overflow" add -mminimal-toc to 98459dedec0cSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 98469dedec0cSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 98479dedec0cSmrg 98489dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='' 98499dedec0cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 98509dedec0cSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 98519dedec0cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 98529dedec0cSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 98539dedec0cSmrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 98549dedec0cSmrg case $with_aix_soname,$aix_use_runtimelinking in 98559dedec0cSmrg aix,*) ;; # no import file 98569dedec0cSmrg svr4,* | *,yes) # use import file 98579dedec0cSmrg # The Import File defines what to hardcode. 98589dedec0cSmrg _LT_TAGVAR(hardcode_direct, $1)=no 98599dedec0cSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 98609dedec0cSmrg ;; 98619dedec0cSmrg esac 98629dedec0cSmrg 98639dedec0cSmrg if test yes = "$GXX"; then 98649dedec0cSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 98659dedec0cSmrg # We only want to do this on AIX 4.2 and lower, the check 98669dedec0cSmrg # below for broken collect2 doesn't work under 4.3+ 98679dedec0cSmrg collect2name=`$CC -print-prog-name=collect2` 98689dedec0cSmrg if test -f "$collect2name" && 98699dedec0cSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 98709dedec0cSmrg then 98719dedec0cSmrg # We have reworked collect2 98729dedec0cSmrg : 98739dedec0cSmrg else 98749dedec0cSmrg # We have old collect2 98759dedec0cSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 98769dedec0cSmrg # It fails to find uninstalled libraries when the uninstalled 98779dedec0cSmrg # path is not listed in the libpath. Setting hardcode_minus_L 98789dedec0cSmrg # to unsupported forces relinking 98799dedec0cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 98809dedec0cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 98819dedec0cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 98829dedec0cSmrg fi 98839dedec0cSmrg esac 98849dedec0cSmrg shared_flag='-shared' 98859dedec0cSmrg if test yes = "$aix_use_runtimelinking"; then 98869dedec0cSmrg shared_flag=$shared_flag' $wl-G' 98879dedec0cSmrg fi 98889dedec0cSmrg # Need to ensure runtime linking is disabled for the traditional 98899dedec0cSmrg # shared library, or the linker may eventually find shared libraries 98909dedec0cSmrg # /with/ Import File - we do not want to mix them. 98919dedec0cSmrg shared_flag_aix='-shared' 98929dedec0cSmrg shared_flag_svr4='-shared $wl-G' 98939dedec0cSmrg else 98949dedec0cSmrg # not using gcc 98959dedec0cSmrg if test ia64 = "$host_cpu"; then 98969dedec0cSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 98979dedec0cSmrg # chokes on -Wl,-G. The following line is correct: 98989dedec0cSmrg shared_flag='-G' 98999dedec0cSmrg else 99009dedec0cSmrg if test yes = "$aix_use_runtimelinking"; then 99019dedec0cSmrg shared_flag='$wl-G' 99029dedec0cSmrg else 99039dedec0cSmrg shared_flag='$wl-bM:SRE' 99049dedec0cSmrg fi 99059dedec0cSmrg shared_flag_aix='$wl-bM:SRE' 99069dedec0cSmrg shared_flag_svr4='$wl-G' 99079dedec0cSmrg fi 99089dedec0cSmrg fi 9909e120bd27Smrg 99109dedec0cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 99119dedec0cSmrg # It seems that -bexpall does not export symbols beginning with 99129dedec0cSmrg # underscore (_), so it is better to generate a list of symbols to 99139dedec0cSmrg # export. 99149dedec0cSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 99159dedec0cSmrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 99169dedec0cSmrg # Warning - without using the other runtime loading flags (-brtl), 99179dedec0cSmrg # -berok will link without error, but may produce a broken library. 99189dedec0cSmrg # The "-G" linker flag allows undefined symbols. 99199dedec0cSmrg _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' 99209dedec0cSmrg # Determine the default libpath from the value encoded in an empty 99219dedec0cSmrg # executable. 99229dedec0cSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 99239dedec0cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 9924e120bd27Smrg 99259dedec0cSmrg _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 99269dedec0cSmrg else 99279dedec0cSmrg if test ia64 = "$host_cpu"; then 99289dedec0cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 99299dedec0cSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 99309dedec0cSmrg _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" 99319dedec0cSmrg else 99329dedec0cSmrg # Determine the default libpath from the value encoded in an 99339dedec0cSmrg # empty executable. 99349dedec0cSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 99359dedec0cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 99369dedec0cSmrg # Warning - without using the other run time loading flags, 99379dedec0cSmrg # -berok will link without error, but may produce a broken library. 99389dedec0cSmrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 99399dedec0cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 99409dedec0cSmrg if test yes = "$with_gnu_ld"; then 99419dedec0cSmrg # We only use this code for GNU lds that support --whole-archive. 99429dedec0cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 99439dedec0cSmrg else 99449dedec0cSmrg # Exported symbols can be pulled into shared objects from archives 99459dedec0cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 99469dedec0cSmrg fi 99479dedec0cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 99489dedec0cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 99499dedec0cSmrg # -brtl affects multiple linker settings, -berok does not and is overridden later 99509dedec0cSmrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 99519dedec0cSmrg if test svr4 != "$with_aix_soname"; then 99529dedec0cSmrg # This is similar to how AIX traditionally builds its shared 99539dedec0cSmrg # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. 99549dedec0cSmrg _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' 99559dedec0cSmrg fi 99569dedec0cSmrg if test aix != "$with_aix_soname"; then 99579dedec0cSmrg _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' 99589dedec0cSmrg else 99599dedec0cSmrg # used by -dlpreopen to get the symbols 99609dedec0cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 99619dedec0cSmrg fi 99629dedec0cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 99639dedec0cSmrg fi 99649dedec0cSmrg fi 99659dedec0cSmrg ;; 9966e120bd27Smrg 99679dedec0cSmrg beos*) 99689dedec0cSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 99699dedec0cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 99709dedec0cSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 99719dedec0cSmrg # support --undefined. This deserves some investigation. FIXME 99729dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 99730cc2eac3Smrg else 99749dedec0cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 99750cc2eac3Smrg fi 99769dedec0cSmrg ;; 99776c321187Smrg 99789dedec0cSmrg chorus*) 99799dedec0cSmrg case $cc_basename in 99809dedec0cSmrg *) 99819dedec0cSmrg # FIXME: insert proper C++ library support 99829dedec0cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 99839dedec0cSmrg ;; 99849dedec0cSmrg esac 99859dedec0cSmrg ;; 9986e120bd27Smrg 99879dedec0cSmrg cygwin* | mingw* | pw32* | cegcc*) 99889dedec0cSmrg case $GXX,$cc_basename in 99899dedec0cSmrg ,cl* | no,cl* | ,icl* | no,icl*) 99909dedec0cSmrg # Native MSVC or ICC 99919dedec0cSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 99929dedec0cSmrg # no search path for DLLs. 99939dedec0cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 99949dedec0cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 99959dedec0cSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 99969dedec0cSmrg _LT_TAGVAR(file_list_spec, $1)='@' 99979dedec0cSmrg # Tell ltmain to make .lib files, not .a files. 99989dedec0cSmrg libext=lib 99999dedec0cSmrg # Tell ltmain to make .dll files, not .so files. 100009dedec0cSmrg shrext_cmds=.dll 100019dedec0cSmrg # FIXME: Setting linknames here is a bad hack. 100029dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 100039dedec0cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 100049dedec0cSmrg cp "$export_symbols" "$output_objdir/$soname.def"; 100059dedec0cSmrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 100069dedec0cSmrg else 100079dedec0cSmrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 100089dedec0cSmrg fi~ 100099dedec0cSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 100109dedec0cSmrg linknames=' 100119dedec0cSmrg # The linker will not automatically build a static lib if we build a DLL. 100129dedec0cSmrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 100139dedec0cSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 100149dedec0cSmrg # Don't use ranlib 100159dedec0cSmrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 100169dedec0cSmrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 100179dedec0cSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 100189dedec0cSmrg case $lt_outputfile in 100199dedec0cSmrg *.exe|*.EXE) ;; 100209dedec0cSmrg *) 100219dedec0cSmrg lt_outputfile=$lt_outputfile.exe 100229dedec0cSmrg lt_tool_outputfile=$lt_tool_outputfile.exe 100239dedec0cSmrg ;; 100249dedec0cSmrg esac~ 100259dedec0cSmrg func_to_tool_file "$lt_outputfile"~ 100269dedec0cSmrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 100279dedec0cSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 100289dedec0cSmrg $RM "$lt_outputfile.manifest"; 100299dedec0cSmrg fi' 100309dedec0cSmrg ;; 100319dedec0cSmrg *) 100329dedec0cSmrg # g++ 100339dedec0cSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 100349dedec0cSmrg # as there is no search path for DLLs. 100359dedec0cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 100369dedec0cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 100379dedec0cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 100389dedec0cSmrg _LT_TAGVAR(always_export_symbols, $1)=no 100399dedec0cSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 10040e120bd27Smrg 100419dedec0cSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 100429dedec0cSmrg _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' 100439dedec0cSmrg # If the export-symbols file already is a .def file, use it as 100449dedec0cSmrg # is; otherwise, prepend EXPORTS... 100459dedec0cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 100469dedec0cSmrg cp $export_symbols $output_objdir/$soname.def; 100479dedec0cSmrg else 100489dedec0cSmrg echo EXPORTS > $output_objdir/$soname.def; 100499dedec0cSmrg cat $export_symbols >> $output_objdir/$soname.def; 100509dedec0cSmrg fi~ 100519dedec0cSmrg $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' 100529dedec0cSmrg else 100539dedec0cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 100549dedec0cSmrg fi 100559dedec0cSmrg ;; 100569dedec0cSmrg esac 100579dedec0cSmrg ;; 100589dedec0cSmrg darwin* | rhapsody*) 100599dedec0cSmrg _LT_DARWIN_LINKER_FEATURES($1) 100609dedec0cSmrg ;; 100616c321187Smrg 100629dedec0cSmrg os2*) 100639dedec0cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 100649dedec0cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 100659dedec0cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 100669dedec0cSmrg shrext_cmds=.dll 100679dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 100689dedec0cSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 100699dedec0cSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 100709dedec0cSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 100719dedec0cSmrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 100729dedec0cSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 100739dedec0cSmrg emximp -o $lib $output_objdir/$libname.def' 100749dedec0cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 100759dedec0cSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 100769dedec0cSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 100779dedec0cSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 100789dedec0cSmrg prefix_cmds="$SED"~ 100799dedec0cSmrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 100809dedec0cSmrg prefix_cmds="$prefix_cmds -e 1d"; 100819dedec0cSmrg fi~ 100829dedec0cSmrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 100839dedec0cSmrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 100849dedec0cSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 100859dedec0cSmrg emximp -o $lib $output_objdir/$libname.def' 100869dedec0cSmrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 100879dedec0cSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 100889dedec0cSmrg _LT_TAGVAR(file_list_spec, $1)='@' 100899dedec0cSmrg ;; 100909dedec0cSmrg 100919dedec0cSmrg dgux*) 100929dedec0cSmrg case $cc_basename in 100939dedec0cSmrg ec++*) 100949dedec0cSmrg # FIXME: insert proper C++ library support 100959dedec0cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 100969dedec0cSmrg ;; 100979dedec0cSmrg ghcx*) 100989dedec0cSmrg # Green Hills C++ Compiler 100999dedec0cSmrg # FIXME: insert proper C++ library support 101009dedec0cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 101019dedec0cSmrg ;; 101029dedec0cSmrg *) 101039dedec0cSmrg # FIXME: insert proper C++ library support 101049dedec0cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 101059dedec0cSmrg ;; 101069dedec0cSmrg esac 101079dedec0cSmrg ;; 101086c321187Smrg 101099dedec0cSmrg freebsd2.*) 101109dedec0cSmrg # C++ shared libraries reported to be fairly broken before 101119dedec0cSmrg # switch to ELF 101129dedec0cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 101139dedec0cSmrg ;; 101146c321187Smrg 101159dedec0cSmrg freebsd-elf*) 101169dedec0cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 101179dedec0cSmrg ;; 101186c321187Smrg 101199dedec0cSmrg freebsd* | dragonfly* | midnightbsd*) 101209dedec0cSmrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 101219dedec0cSmrg # conventions 101229dedec0cSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 101239dedec0cSmrg ;; 101246c321187Smrg 101259dedec0cSmrg haiku*) 101269dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 101279dedec0cSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 101289dedec0cSmrg ;; 101296c321187Smrg 101309dedec0cSmrg hpux9*) 101319dedec0cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 101329dedec0cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 101339dedec0cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 101349dedec0cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 101359dedec0cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 101369dedec0cSmrg # but as the default 101379dedec0cSmrg # location of the library. 101386c321187Smrg 101399dedec0cSmrg case $cc_basename in 101409dedec0cSmrg CC*) 101419dedec0cSmrg # FIXME: insert proper C++ library support 101429dedec0cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 101439dedec0cSmrg ;; 101449dedec0cSmrg aCC*) 101459dedec0cSmrg _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' 101469dedec0cSmrg # Commands to make compiler produce verbose output that lists 101479dedec0cSmrg # what "hidden" libraries, object files and flags are used when 101489dedec0cSmrg # linking a shared library. 101499dedec0cSmrg # 101509dedec0cSmrg # There doesn't appear to be a way to prevent this compiler from 101519dedec0cSmrg # explicitly linking system object files so we need to strip them 101529dedec0cSmrg # from the output so that they don't get included in the library 101539dedec0cSmrg # dependencies. 101549dedec0cSmrg 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"' 101559dedec0cSmrg ;; 101569dedec0cSmrg *) 101579dedec0cSmrg if test yes = "$GXX"; then 101589dedec0cSmrg _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' 101599dedec0cSmrg else 101609dedec0cSmrg # FIXME: insert proper C++ library support 101619dedec0cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 101629dedec0cSmrg fi 101639dedec0cSmrg ;; 101649dedec0cSmrg esac 101659dedec0cSmrg ;; 10166e120bd27Smrg 101679dedec0cSmrg hpux10*|hpux11*) 101689dedec0cSmrg if test no = "$with_gnu_ld"; then 101699dedec0cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 101709dedec0cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 101716c321187Smrg 101729dedec0cSmrg case $host_cpu in 101739dedec0cSmrg hppa*64*|ia64*) 101749dedec0cSmrg ;; 101759dedec0cSmrg *) 101769dedec0cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 101779dedec0cSmrg ;; 101789dedec0cSmrg esac 101799dedec0cSmrg fi 101809dedec0cSmrg case $host_cpu in 101819dedec0cSmrg hppa*64*|ia64*) 101829dedec0cSmrg _LT_TAGVAR(hardcode_direct, $1)=no 101839dedec0cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 101849dedec0cSmrg ;; 101859dedec0cSmrg *) 101869dedec0cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 101879dedec0cSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 101889dedec0cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 101899dedec0cSmrg # but as the default 101909dedec0cSmrg # location of the library. 101919dedec0cSmrg ;; 101929dedec0cSmrg esac 101936c321187Smrg 101949dedec0cSmrg case $cc_basename in 101959dedec0cSmrg CC*) 101969dedec0cSmrg # FIXME: insert proper C++ library support 101979dedec0cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 101989dedec0cSmrg ;; 101999dedec0cSmrg aCC*) 102009dedec0cSmrg case $host_cpu in 102019dedec0cSmrg hppa*64*) 102029dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 102039dedec0cSmrg ;; 102049dedec0cSmrg ia64*) 102059dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 102069dedec0cSmrg ;; 102079dedec0cSmrg *) 102089dedec0cSmrg _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' 102099dedec0cSmrg ;; 102109dedec0cSmrg esac 102119dedec0cSmrg # Commands to make compiler produce verbose output that lists 102129dedec0cSmrg # what "hidden" libraries, object files and flags are used when 102139dedec0cSmrg # linking a shared library. 102149dedec0cSmrg # 102159dedec0cSmrg # There doesn't appear to be a way to prevent this compiler from 102169dedec0cSmrg # explicitly linking system object files so we need to strip them 102179dedec0cSmrg # from the output so that they don't get included in the library 102189dedec0cSmrg # dependencies. 102199dedec0cSmrg 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"' 102209dedec0cSmrg ;; 102219dedec0cSmrg *) 102229dedec0cSmrg if test yes = "$GXX"; then 102239dedec0cSmrg if test no = "$with_gnu_ld"; then 102249dedec0cSmrg case $host_cpu in 102259dedec0cSmrg hppa*64*) 102269dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 102279dedec0cSmrg ;; 102289dedec0cSmrg ia64*) 102299dedec0cSmrg _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' 102309dedec0cSmrg ;; 102319dedec0cSmrg *) 102329dedec0cSmrg _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' 102339dedec0cSmrg ;; 102349dedec0cSmrg esac 102359dedec0cSmrg fi 102369dedec0cSmrg else 102379dedec0cSmrg # FIXME: insert proper C++ library support 102389dedec0cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 102399dedec0cSmrg fi 102409dedec0cSmrg ;; 102419dedec0cSmrg esac 102429dedec0cSmrg ;; 102436c321187Smrg 102449dedec0cSmrg interix[[3-9]]*) 102459dedec0cSmrg _LT_TAGVAR(hardcode_direct, $1)=no 102469dedec0cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 102479dedec0cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 102489dedec0cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 102499dedec0cSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 102509dedec0cSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 102519dedec0cSmrg # default) and relocated if they conflict, which is a slow very memory 102529dedec0cSmrg # consuming and fragmenting process. To avoid this, we pick a random, 102539dedec0cSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 102549dedec0cSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 102559dedec0cSmrg _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' 102569dedec0cSmrg _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' 102579dedec0cSmrg ;; 102589dedec0cSmrg irix5* | irix6*) 102599dedec0cSmrg case $cc_basename in 102609dedec0cSmrg CC*) 102619dedec0cSmrg # SGI C++ 102629dedec0cSmrg _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' 102636c321187Smrg 102649dedec0cSmrg # Archives containing C++ object files must be created using 102659dedec0cSmrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 102669dedec0cSmrg # necessary to make sure instantiated templates are included 102679dedec0cSmrg # in the archive. 102689dedec0cSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 102699dedec0cSmrg ;; 102709dedec0cSmrg *) 102719dedec0cSmrg if test yes = "$GXX"; then 102729dedec0cSmrg if test no = "$with_gnu_ld"; then 102739dedec0cSmrg _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' 102749dedec0cSmrg else 102759dedec0cSmrg _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' 102769dedec0cSmrg fi 102779dedec0cSmrg fi 102789dedec0cSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 102799dedec0cSmrg ;; 102809dedec0cSmrg esac 102819dedec0cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 102829dedec0cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 102839dedec0cSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 102849dedec0cSmrg ;; 102856c321187Smrg 102869dedec0cSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 102879dedec0cSmrg case $cc_basename in 102889dedec0cSmrg KCC*) 102899dedec0cSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 102906c321187Smrg 102919dedec0cSmrg # KCC will only create a shared library if the output file 102929dedec0cSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 102939dedec0cSmrg # to its proper name (with version) after linking. 102949dedec0cSmrg _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' 102959dedec0cSmrg _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' 102969dedec0cSmrg # Commands to make compiler produce verbose output that lists 102979dedec0cSmrg # what "hidden" libraries, object files and flags are used when 102989dedec0cSmrg # linking a shared library. 102999dedec0cSmrg # 103009dedec0cSmrg # There doesn't appear to be a way to prevent this compiler from 103019dedec0cSmrg # explicitly linking system object files so we need to strip them 103029dedec0cSmrg # from the output so that they don't get included in the library 103039dedec0cSmrg # dependencies. 103049dedec0cSmrg 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"' 103056c321187Smrg 103069dedec0cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 103079dedec0cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 103086c321187Smrg 103099dedec0cSmrg # Archives containing C++ object files must be created using 103109dedec0cSmrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 103119dedec0cSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 103129dedec0cSmrg ;; 103139dedec0cSmrg icpc* | ecpc* ) 103149dedec0cSmrg # Intel C++ 103159dedec0cSmrg with_gnu_ld=yes 103169dedec0cSmrg # version 8.0 and above of icpc choke on multiply defined symbols 103179dedec0cSmrg # if we add $predep_objects and $postdep_objects, however 7.1 and 103189dedec0cSmrg # earlier do not add the objects themselves. 103199dedec0cSmrg case `$CC -V 2>&1` in 103209dedec0cSmrg *"Version 7."*) 103219dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 103229dedec0cSmrg _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' 103239dedec0cSmrg ;; 103249dedec0cSmrg *) # Version 8.0 or newer 103259dedec0cSmrg tmp_idyn= 103269dedec0cSmrg case $host_cpu in 103279dedec0cSmrg ia64*) tmp_idyn=' -i_dynamic';; 103289dedec0cSmrg esac 103299dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 103309dedec0cSmrg _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' 103319dedec0cSmrg ;; 103329dedec0cSmrg esac 103339dedec0cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 103349dedec0cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 103359dedec0cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 103369dedec0cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 103379dedec0cSmrg ;; 103389dedec0cSmrg pgCC* | pgcpp*) 103399dedec0cSmrg # Portland Group C++ compiler 103409dedec0cSmrg case `$CC -V` in 103419dedec0cSmrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 103429dedec0cSmrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 103439dedec0cSmrg rm -rf $tpldir~ 103449dedec0cSmrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 103459dedec0cSmrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 103469dedec0cSmrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 103479dedec0cSmrg rm -rf $tpldir~ 103489dedec0cSmrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 103499dedec0cSmrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 103509dedec0cSmrg $RANLIB $oldlib' 103519dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 103529dedec0cSmrg rm -rf $tpldir~ 103539dedec0cSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 103549dedec0cSmrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 103559dedec0cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 103569dedec0cSmrg rm -rf $tpldir~ 103579dedec0cSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 103589dedec0cSmrg $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' 103599dedec0cSmrg ;; 103609dedec0cSmrg *) # Version 6 and above use weak symbols 103619dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 103629dedec0cSmrg _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' 103639dedec0cSmrg ;; 103649dedec0cSmrg esac 103656c321187Smrg 103669dedec0cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' 103679dedec0cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 103689dedec0cSmrg _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' 103699dedec0cSmrg ;; 103709dedec0cSmrg cxx*) 103719dedec0cSmrg # Compaq C++ 103729dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 103739dedec0cSmrg _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' 10374e120bd27Smrg 103759dedec0cSmrg runpath_var=LD_RUN_PATH 103769dedec0cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 103779dedec0cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 103786c321187Smrg 103799dedec0cSmrg # Commands to make compiler produce verbose output that lists 103809dedec0cSmrg # what "hidden" libraries, object files and flags are used when 103819dedec0cSmrg # linking a shared library. 103829dedec0cSmrg # 103839dedec0cSmrg # There doesn't appear to be a way to prevent this compiler from 103849dedec0cSmrg # explicitly linking system object files so we need to strip them 103859dedec0cSmrg # from the output so that they don't get included in the library 103869dedec0cSmrg # dependencies. 103879dedec0cSmrg 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' 103889dedec0cSmrg ;; 103899dedec0cSmrg xl* | mpixl* | bgxl*) 103909dedec0cSmrg # IBM XL 8.0 on PPC, with GNU ld 103919dedec0cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 103929dedec0cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 103939dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 103949dedec0cSmrg if test yes = "$supports_anon_versioning"; then 103959dedec0cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 103969dedec0cSmrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 103979dedec0cSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 103989dedec0cSmrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 103999dedec0cSmrg fi 104009dedec0cSmrg ;; 104019dedec0cSmrg *) 104029dedec0cSmrg case `$CC -V 2>&1 | $SED 5q` in 104039dedec0cSmrg *Sun\ C*) 104049dedec0cSmrg # Sun C++ 5.9 104059dedec0cSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 104069dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 104079dedec0cSmrg _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' 104089dedec0cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 104099dedec0cSmrg _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' 104109dedec0cSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 104116c321187Smrg 104129dedec0cSmrg # Not sure whether something based on 104139dedec0cSmrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 104149dedec0cSmrg # would be better. 104159dedec0cSmrg output_verbose_link_cmd='func_echo_all' 104166c321187Smrg 104179dedec0cSmrg # Archives containing C++ object files must be created using 104189dedec0cSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 104199dedec0cSmrg # necessary to make sure instantiated templates are included 104209dedec0cSmrg # in the archive. 104219dedec0cSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 104229dedec0cSmrg ;; 104239dedec0cSmrg esac 104249dedec0cSmrg ;; 104259dedec0cSmrg esac 104269dedec0cSmrg ;; 104276c321187Smrg 104289dedec0cSmrg lynxos*) 104299dedec0cSmrg # FIXME: insert proper C++ library support 104309dedec0cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 104319dedec0cSmrg ;; 104326c321187Smrg 104339dedec0cSmrg m88k*) 104349dedec0cSmrg # FIXME: insert proper C++ library support 104359dedec0cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 104369dedec0cSmrg ;; 104376c321187Smrg 104389dedec0cSmrg mvs*) 104399dedec0cSmrg case $cc_basename in 104409dedec0cSmrg cxx*) 104419dedec0cSmrg # FIXME: insert proper C++ library support 104429dedec0cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 104439dedec0cSmrg ;; 104449dedec0cSmrg *) 104459dedec0cSmrg # FIXME: insert proper C++ library support 104469dedec0cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 104479dedec0cSmrg ;; 104489dedec0cSmrg esac 104499dedec0cSmrg ;; 104506c321187Smrg 104519dedec0cSmrg netbsd*) 104529dedec0cSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 104539dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 104549dedec0cSmrg wlarc= 104559dedec0cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 104569dedec0cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 104579dedec0cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 104589dedec0cSmrg fi 104599dedec0cSmrg # Workaround some broken pre-1.5 toolchains 104609dedec0cSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 104619dedec0cSmrg ;; 104626c321187Smrg 104639dedec0cSmrg *nto* | *qnx*) 104649dedec0cSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 104659dedec0cSmrg ;; 104666c321187Smrg 104679dedec0cSmrg openbsd* | bitrig*) 104689dedec0cSmrg if test -f /usr/libexec/ld.so; then 104699dedec0cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 104709dedec0cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 104719dedec0cSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 104729dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 104739dedec0cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 104749dedec0cSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then 104759dedec0cSmrg _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' 104769dedec0cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 104779dedec0cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 104789dedec0cSmrg fi 104799dedec0cSmrg output_verbose_link_cmd=func_echo_all 104809dedec0cSmrg else 104819dedec0cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 104829dedec0cSmrg fi 104839dedec0cSmrg ;; 104846c321187Smrg 104859dedec0cSmrg osf3* | osf4* | osf5*) 104869dedec0cSmrg case $cc_basename in 104879dedec0cSmrg KCC*) 104889dedec0cSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 10489e120bd27Smrg 104909dedec0cSmrg # KCC will only create a shared library if the output file 104919dedec0cSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 104929dedec0cSmrg # to its proper name (with version) after linking. 104939dedec0cSmrg _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' 10494e120bd27Smrg 104959dedec0cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 104969dedec0cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 104976c321187Smrg 104989dedec0cSmrg # Archives containing C++ object files must be created using 104999dedec0cSmrg # the KAI C++ compiler. 105009dedec0cSmrg case $host in 105019dedec0cSmrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 105029dedec0cSmrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 105039dedec0cSmrg esac 105049dedec0cSmrg ;; 105059dedec0cSmrg RCC*) 105069dedec0cSmrg # Rational C++ 2.4.1 105079dedec0cSmrg # FIXME: insert proper C++ library support 105089dedec0cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 105099dedec0cSmrg ;; 105109dedec0cSmrg cxx*) 105119dedec0cSmrg case $host in 105129dedec0cSmrg osf3*) 105139dedec0cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 105149dedec0cSmrg _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' 105159dedec0cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 105169dedec0cSmrg ;; 105179dedec0cSmrg *) 105189dedec0cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 105199dedec0cSmrg _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' 105209dedec0cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 105219dedec0cSmrg echo "-hidden">> $lib.exp~ 105229dedec0cSmrg $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~ 105239dedec0cSmrg $RM $lib.exp' 105249dedec0cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 105259dedec0cSmrg ;; 105269dedec0cSmrg esac 105276c321187Smrg 105289dedec0cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10529e120bd27Smrg 105309dedec0cSmrg # Commands to make compiler produce verbose output that lists 105319dedec0cSmrg # what "hidden" libraries, object files and flags are used when 105329dedec0cSmrg # linking a shared library. 105339dedec0cSmrg # 105349dedec0cSmrg # There doesn't appear to be a way to prevent this compiler from 105359dedec0cSmrg # explicitly linking system object files so we need to strip them 105369dedec0cSmrg # from the output so that they don't get included in the library 105379dedec0cSmrg # dependencies. 105389dedec0cSmrg 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"' 105399dedec0cSmrg ;; 105409dedec0cSmrg *) 105419dedec0cSmrg if test yes,no = "$GXX,$with_gnu_ld"; then 105429dedec0cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 105439dedec0cSmrg case $host in 105449dedec0cSmrg osf3*) 105459dedec0cSmrg _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' 105469dedec0cSmrg ;; 105479dedec0cSmrg *) 105489dedec0cSmrg _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' 105499dedec0cSmrg ;; 105509dedec0cSmrg esac 10551e120bd27Smrg 105529dedec0cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 105539dedec0cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10554e120bd27Smrg 105559dedec0cSmrg # Commands to make compiler produce verbose output that lists 105569dedec0cSmrg # what "hidden" libraries, object files and flags are used when 105579dedec0cSmrg # linking a shared library. 105589dedec0cSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 10559e120bd27Smrg 105609dedec0cSmrg else 105619dedec0cSmrg # FIXME: insert proper C++ library support 105629dedec0cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 105639dedec0cSmrg fi 105649dedec0cSmrg ;; 105659dedec0cSmrg esac 105669dedec0cSmrg ;; 105676c321187Smrg 105689dedec0cSmrg psos*) 105699dedec0cSmrg # FIXME: insert proper C++ library support 105709dedec0cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 105719dedec0cSmrg ;; 105726c321187Smrg 105739dedec0cSmrg sunos4*) 105749dedec0cSmrg case $cc_basename in 105759dedec0cSmrg CC*) 105769dedec0cSmrg # Sun C++ 4.x 105779dedec0cSmrg # FIXME: insert proper C++ library support 105789dedec0cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 105799dedec0cSmrg ;; 105809dedec0cSmrg lcc*) 105819dedec0cSmrg # Lucid 105829dedec0cSmrg # FIXME: insert proper C++ library support 105839dedec0cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 105849dedec0cSmrg ;; 105859dedec0cSmrg *) 105869dedec0cSmrg # FIXME: insert proper C++ library support 105879dedec0cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 105889dedec0cSmrg ;; 105899dedec0cSmrg esac 105909dedec0cSmrg ;; 105919dedec0cSmrg 105929dedec0cSmrg solaris*) 105939dedec0cSmrg case $cc_basename in 105949dedec0cSmrg CC* | sunCC*) 105959dedec0cSmrg # Sun C++ 4.2, 5.x and Centerline C++ 105969dedec0cSmrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 105979dedec0cSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 105989dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 105999dedec0cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 106009dedec0cSmrg $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' 106016c321187Smrg 106029dedec0cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 106039dedec0cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 106049dedec0cSmrg case $host_os in 106059dedec0cSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 106069dedec0cSmrg *) 106079dedec0cSmrg # The compiler driver will combine and reorder linker options, 106089dedec0cSmrg # but understands '-z linker_flag'. 106099dedec0cSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 106109dedec0cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 106119dedec0cSmrg ;; 106129dedec0cSmrg esac 106139dedec0cSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 106146c321187Smrg 106159dedec0cSmrg output_verbose_link_cmd='func_echo_all' 106166c321187Smrg 106179dedec0cSmrg # Archives containing C++ object files must be created using 106189dedec0cSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 106199dedec0cSmrg # necessary to make sure instantiated templates are included 106209dedec0cSmrg # in the archive. 106219dedec0cSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 106229dedec0cSmrg ;; 106239dedec0cSmrg gcx*) 106249dedec0cSmrg # Green Hills C++ Compiler 106259dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 106266c321187Smrg 106279dedec0cSmrg # The C++ compiler must be used to create the archive. 106289dedec0cSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 106299dedec0cSmrg ;; 106309dedec0cSmrg *) 106319dedec0cSmrg # GNU C++ compiler with Solaris linker 106329dedec0cSmrg if test yes,no = "$GXX,$with_gnu_ld"; then 106339dedec0cSmrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' 106349dedec0cSmrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 106359dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 106369dedec0cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 106379dedec0cSmrg $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' 106386c321187Smrg 106399dedec0cSmrg # Commands to make compiler produce verbose output that lists 106409dedec0cSmrg # what "hidden" libraries, object files and flags are used when 106419dedec0cSmrg # linking a shared library. 106429dedec0cSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 106439dedec0cSmrg else 106449dedec0cSmrg # g++ 2.7 appears to require '-G' NOT '-shared' on this 106459dedec0cSmrg # platform. 106469dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 106479dedec0cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 106489dedec0cSmrg $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' 106496c321187Smrg 106509dedec0cSmrg # Commands to make compiler produce verbose output that lists 106519dedec0cSmrg # what "hidden" libraries, object files and flags are used when 106529dedec0cSmrg # linking a shared library. 106539dedec0cSmrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 106549dedec0cSmrg fi 106556c321187Smrg 106569dedec0cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' 106579dedec0cSmrg case $host_os in 106589dedec0cSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 106599dedec0cSmrg *) 106609dedec0cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 106619dedec0cSmrg ;; 106629dedec0cSmrg esac 106639dedec0cSmrg fi 106649dedec0cSmrg ;; 106659dedec0cSmrg esac 106669dedec0cSmrg ;; 106676c321187Smrg 106689dedec0cSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 106699dedec0cSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 106709dedec0cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 106719dedec0cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 106729dedec0cSmrg runpath_var='LD_RUN_PATH' 106739dedec0cSmrg 106749dedec0cSmrg case $cc_basename in 106759dedec0cSmrg CC*) 106769dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 106779dedec0cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 106789dedec0cSmrg ;; 106799dedec0cSmrg *) 106809dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 106819dedec0cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 106829dedec0cSmrg ;; 106839dedec0cSmrg esac 106849dedec0cSmrg ;; 106859dedec0cSmrg 106869dedec0cSmrg sysv5* | sco3.2v5* | sco5v6*) 106879dedec0cSmrg # Note: We CANNOT use -z defs as we might desire, because we do not 106889dedec0cSmrg # link with -lc, and that would cause any symbols used from libc to 106899dedec0cSmrg # always be unresolved, which means just about no library would 106909dedec0cSmrg # ever link correctly. If we're not using GNU ld we use -z text 106919dedec0cSmrg # though, which does catch some bad symbols but isn't as heavy-handed 106929dedec0cSmrg # as -z defs. 106939dedec0cSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 106949dedec0cSmrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 106959dedec0cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 106969dedec0cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 106979dedec0cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 106989dedec0cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 106999dedec0cSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 107009dedec0cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 107019dedec0cSmrg runpath_var='LD_RUN_PATH' 107026c321187Smrg 107039dedec0cSmrg case $cc_basename in 107049dedec0cSmrg CC*) 107059dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 107069dedec0cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 107079dedec0cSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 107089dedec0cSmrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 107099dedec0cSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 107109dedec0cSmrg '"$_LT_TAGVAR(reload_cmds, $1)" 107119dedec0cSmrg ;; 107129dedec0cSmrg *) 107139dedec0cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 107149dedec0cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 107159dedec0cSmrg ;; 107169dedec0cSmrg esac 107179dedec0cSmrg ;; 10718198e4c3cSmrg 107199dedec0cSmrg tandem*) 107209dedec0cSmrg case $cc_basename in 107219dedec0cSmrg NCC*) 107229dedec0cSmrg # NonStop-UX NCC 3.20 107239dedec0cSmrg # FIXME: insert proper C++ library support 107249dedec0cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 107259dedec0cSmrg ;; 107269dedec0cSmrg *) 107279dedec0cSmrg # FIXME: insert proper C++ library support 107289dedec0cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 107299dedec0cSmrg ;; 107309dedec0cSmrg esac 107319dedec0cSmrg ;; 10732198e4c3cSmrg 107339dedec0cSmrg vxworks*) 107349dedec0cSmrg # FIXME: insert proper C++ library support 107359dedec0cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 107369dedec0cSmrg ;; 107376c321187Smrg 107389dedec0cSmrg *) 107399dedec0cSmrg # FIXME: insert proper C++ library support 107409dedec0cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 107419dedec0cSmrg ;; 107429dedec0cSmrg esac 107436c321187Smrg 107449dedec0cSmrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 107459dedec0cSmrg test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 107466c321187Smrg 107479dedec0cSmrg _LT_TAGVAR(GCC, $1)=$GXX 107489dedec0cSmrg _LT_TAGVAR(LD, $1)=$LD 107496c321187Smrg 107509dedec0cSmrg ## CAVEAT EMPTOR: 107519dedec0cSmrg ## There is no encapsulation within the following macros, do not change 107529dedec0cSmrg ## the running order or otherwise move them around unless you know exactly 107539dedec0cSmrg ## what you are doing... 107549dedec0cSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 107559dedec0cSmrg _LT_COMPILER_PIC($1) 107569dedec0cSmrg _LT_COMPILER_C_O($1) 107579dedec0cSmrg _LT_COMPILER_FILE_LOCKS($1) 107589dedec0cSmrg _LT_LINKER_SHLIBS($1) 107599dedec0cSmrg _LT_SYS_DYNAMIC_LINKER($1) 107609dedec0cSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 107616c321187Smrg 107629dedec0cSmrg _LT_CONFIG($1) 107639dedec0cSmrg fi # test -n "$compiler" 107646c321187Smrg 107659dedec0cSmrg CC=$lt_save_CC 107669dedec0cSmrg CFLAGS=$lt_save_CFLAGS 107679dedec0cSmrg LDCXX=$LD 107689dedec0cSmrg LD=$lt_save_LD 107699dedec0cSmrg GCC=$lt_save_GCC 107709dedec0cSmrg with_gnu_ld=$lt_save_with_gnu_ld 107719dedec0cSmrg lt_cv_path_LDCXX=$lt_cv_path_LD 107729dedec0cSmrg lt_cv_path_LD=$lt_save_path_LD 107739dedec0cSmrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 107749dedec0cSmrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 107759dedec0cSmrgfi # test yes != "$_lt_caught_CXX_error" 107766c321187Smrg 107779dedec0cSmrgAC_LANG_POP 107789dedec0cSmrg])# _LT_LANG_CXX_CONFIG 107796c321187Smrg 107806c321187Smrg 107819dedec0cSmrg# _LT_FUNC_STRIPNAME_CNF 107829dedec0cSmrg# ---------------------- 107839dedec0cSmrg# func_stripname_cnf prefix suffix name 107849dedec0cSmrg# strip PREFIX and SUFFIX off of NAME. 107859dedec0cSmrg# PREFIX and SUFFIX must not contain globbing or regex special 107869dedec0cSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading 107879dedec0cSmrg# dot (in which case that matches only a dot). 10788198e4c3cSmrg# 107899dedec0cSmrg# This function is identical to the (non-XSI) version of func_stripname, 107909dedec0cSmrg# except this one can be used by m4 code that may be executed by configure, 107919dedec0cSmrg# rather than the libtool script. 107929dedec0cSmrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 107939dedec0cSmrgAC_REQUIRE([_LT_DECL_SED]) 107949dedec0cSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 107959dedec0cSmrgfunc_stripname_cnf () 107969dedec0cSmrg{ 107979dedec0cSmrg case @S|@2 in 107989dedec0cSmrg .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; 107999dedec0cSmrg *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; 108009dedec0cSmrg esac 108019dedec0cSmrg} # func_stripname_cnf 108029dedec0cSmrg])# _LT_FUNC_STRIPNAME_CNF 10803198e4c3cSmrg 10804198e4c3cSmrg 108059dedec0cSmrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 108069dedec0cSmrg# --------------------------------- 108079dedec0cSmrg# Figure out "hidden" library dependencies from verbose 108089dedec0cSmrg# compiler output when linking a shared library. 108099dedec0cSmrg# Parse the compiler output and extract the necessary 108109dedec0cSmrg# objects, libraries and library flags. 108119dedec0cSmrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 108129dedec0cSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 108139dedec0cSmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 108149dedec0cSmrg# Dependencies to place before and after the object being linked: 108159dedec0cSmrg_LT_TAGVAR(predep_objects, $1)= 108169dedec0cSmrg_LT_TAGVAR(postdep_objects, $1)= 108179dedec0cSmrg_LT_TAGVAR(predeps, $1)= 108189dedec0cSmrg_LT_TAGVAR(postdeps, $1)= 108199dedec0cSmrg_LT_TAGVAR(compiler_lib_search_path, $1)= 108206c321187Smrg 108219dedec0cSmrgdnl we can't use the lt_simple_compile_test_code here, 108229dedec0cSmrgdnl because it contains code intended for an executable, 108239dedec0cSmrgdnl not a library. It's possible we should let each 108249dedec0cSmrgdnl tag define a new lt_????_link_test_code variable, 108259dedec0cSmrgdnl but it's only used here... 108269dedec0cSmrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 108279dedec0cSmrgint a; 108289dedec0cSmrgvoid foo (void) { a = 0; } 108299dedec0cSmrg_LT_EOF 108309dedec0cSmrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 108319dedec0cSmrgclass Foo 108329dedec0cSmrg{ 108339dedec0cSmrgpublic: 108349dedec0cSmrg Foo (void) { a = 0; } 108359dedec0cSmrgprivate: 108369dedec0cSmrg int a; 108379dedec0cSmrg}; 108389dedec0cSmrg_LT_EOF 108399dedec0cSmrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 108409dedec0cSmrg subroutine foo 108419dedec0cSmrg implicit none 108429dedec0cSmrg integer*4 a 108439dedec0cSmrg a=0 108449dedec0cSmrg return 108459dedec0cSmrg end 108469dedec0cSmrg_LT_EOF 108479dedec0cSmrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 108489dedec0cSmrg subroutine foo 108499dedec0cSmrg implicit none 108509dedec0cSmrg integer a 108519dedec0cSmrg a=0 108529dedec0cSmrg return 108539dedec0cSmrg end 108549dedec0cSmrg_LT_EOF 108559dedec0cSmrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 108569dedec0cSmrgpublic class foo { 108579dedec0cSmrg private int a; 108589dedec0cSmrg public void bar (void) { 108599dedec0cSmrg a = 0; 108609dedec0cSmrg } 108619dedec0cSmrg}; 108629dedec0cSmrg_LT_EOF 108639dedec0cSmrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 108649dedec0cSmrgpackage foo 108659dedec0cSmrgfunc foo() { 108669dedec0cSmrg} 108679dedec0cSmrg_LT_EOF 108689dedec0cSmrg]) 108696c321187Smrg 108709dedec0cSmrg_lt_libdeps_save_CFLAGS=$CFLAGS 108719dedec0cSmrgcase "$CC $CFLAGS " in #( 108729dedec0cSmrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 108739dedec0cSmrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 108749dedec0cSmrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 108759dedec0cSmrgesac 108769dedec0cSmrg 108779dedec0cSmrgdnl Parse the compiler output and extract the necessary 108789dedec0cSmrgdnl objects, libraries and library flags. 108799dedec0cSmrgif AC_TRY_EVAL(ac_compile); then 108809dedec0cSmrg # Parse the compiler output and extract the necessary 108819dedec0cSmrg # objects, libraries and library flags. 108829dedec0cSmrg 108839dedec0cSmrg # Sentinel used to keep track of whether or not we are before 108849dedec0cSmrg # the conftest object file. 108859dedec0cSmrg pre_test_object_deps_done=no 108869dedec0cSmrg 108879dedec0cSmrg for p in `eval "$output_verbose_link_cmd"`; do 108889dedec0cSmrg case $prev$p in 108896c321187Smrg 108909dedec0cSmrg -L* | -R* | -l*) 108919dedec0cSmrg # Some compilers place space between "-{L,R}" and the path. 108929dedec0cSmrg # Remove the space. 108939dedec0cSmrg if test x-L = "$p" || 108949dedec0cSmrg test x-R = "$p"; then 108959dedec0cSmrg prev=$p 108969dedec0cSmrg continue 108979dedec0cSmrg fi 108986c321187Smrg 108999dedec0cSmrg # Expand the sysroot to ease extracting the directories later. 109009dedec0cSmrg if test -z "$prev"; then 109019dedec0cSmrg case $p in 109029dedec0cSmrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 109039dedec0cSmrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 109049dedec0cSmrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 109059dedec0cSmrg esac 109069dedec0cSmrg fi 109079dedec0cSmrg case $p in 109089dedec0cSmrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 109099dedec0cSmrg esac 109109dedec0cSmrg if test no = "$pre_test_object_deps_done"; then 109119dedec0cSmrg case $prev in 109129dedec0cSmrg -L | -R) 109139dedec0cSmrg # Internal compiler library paths should come after those 109149dedec0cSmrg # provided the user. The postdeps already come after the 109159dedec0cSmrg # user supplied libs so there is no need to process them. 109169dedec0cSmrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 109179dedec0cSmrg _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p 109189dedec0cSmrg else 109199dedec0cSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" 109209dedec0cSmrg fi 109219dedec0cSmrg ;; 109229dedec0cSmrg # The "-l" case would never come before the object being 109239dedec0cSmrg # linked, so don't bother handling this case. 109249dedec0cSmrg esac 109259dedec0cSmrg else 109269dedec0cSmrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 109279dedec0cSmrg _LT_TAGVAR(postdeps, $1)=$prev$p 109289dedec0cSmrg else 109299dedec0cSmrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" 109309dedec0cSmrg fi 109319dedec0cSmrg fi 109329dedec0cSmrg prev= 109339dedec0cSmrg ;; 109346c321187Smrg 109359dedec0cSmrg *.lto.$objext) ;; # Ignore GCC LTO objects 109369dedec0cSmrg *.$objext) 109379dedec0cSmrg # This assumes that the test object file only shows up 109389dedec0cSmrg # once in the compiler output. 109399dedec0cSmrg if test "$p" = "conftest.$objext"; then 109409dedec0cSmrg pre_test_object_deps_done=yes 109419dedec0cSmrg continue 109429dedec0cSmrg fi 109436c321187Smrg 109449dedec0cSmrg if test no = "$pre_test_object_deps_done"; then 109459dedec0cSmrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 109469dedec0cSmrg _LT_TAGVAR(predep_objects, $1)=$p 109479dedec0cSmrg else 109489dedec0cSmrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 109499dedec0cSmrg fi 109509dedec0cSmrg else 109519dedec0cSmrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 109529dedec0cSmrg _LT_TAGVAR(postdep_objects, $1)=$p 109539dedec0cSmrg else 109549dedec0cSmrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 109559dedec0cSmrg fi 109569dedec0cSmrg fi 109579dedec0cSmrg ;; 109589d0b5e55Smrg 109599dedec0cSmrg *) ;; # Ignore the rest. 109606c321187Smrg 109619dedec0cSmrg esac 109629dedec0cSmrg done 109639dedec0cSmrg 109649dedec0cSmrg # Clean up. 109659dedec0cSmrg rm -f a.out a.exe 109669dedec0cSmrgelse 109679dedec0cSmrg echo "libtool.m4: error: problem compiling $1 test program" 109680cc2eac3Smrgfi 109696c321187Smrg 109709dedec0cSmrg$RM -f confest.$objext 109719dedec0cSmrgCFLAGS=$_lt_libdeps_save_CFLAGS 109729dedec0cSmrg 109739dedec0cSmrg# PORTME: override above test on systems where it is broken 109749dedec0cSmrgm4_if([$1], [CXX], 109759dedec0cSmrg[case $host_os in 109769dedec0cSmrginterix[[3-9]]*) 109779dedec0cSmrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 109789dedec0cSmrg # hack all around it, let's just trust "g++" to DTRT. 109799dedec0cSmrg _LT_TAGVAR(predep_objects,$1)= 109809dedec0cSmrg _LT_TAGVAR(postdep_objects,$1)= 109819dedec0cSmrg _LT_TAGVAR(postdeps,$1)= 109829dedec0cSmrg ;; 109839dedec0cSmrgesac 109849dedec0cSmrg]) 109859dedec0cSmrg 109869dedec0cSmrgcase " $_LT_TAGVAR(postdeps, $1) " in 109879dedec0cSmrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 109889dedec0cSmrgesac 109899dedec0cSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 109909dedec0cSmrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 109919dedec0cSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` 109920cc2eac3Smrgfi 109939dedec0cSmrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 109949dedec0cSmrg [The directories searched by this compiler when creating a shared library]) 109959dedec0cSmrg_LT_TAGDECL([], [predep_objects], [1], 109969dedec0cSmrg [Dependencies to place before and after the objects being linked to 109979dedec0cSmrg create a shared library]) 109989dedec0cSmrg_LT_TAGDECL([], [postdep_objects], [1]) 109999dedec0cSmrg_LT_TAGDECL([], [predeps], [1]) 110009dedec0cSmrg_LT_TAGDECL([], [postdeps], [1]) 110019dedec0cSmrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 110029dedec0cSmrg [The library search path used internally by the compiler when linking 110039dedec0cSmrg a shared library]) 110049dedec0cSmrg])# _LT_SYS_HIDDEN_LIBDEPS 110056c321187Smrg 110066c321187Smrg 110079dedec0cSmrg# _LT_LANG_F77_CONFIG([TAG]) 110089dedec0cSmrg# -------------------------- 110099dedec0cSmrg# Ensure that the configuration variables for a Fortran 77 compiler are 110109dedec0cSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 110119dedec0cSmrg# to write the compiler configuration to 'libtool'. 110129dedec0cSmrgm4_defun([_LT_LANG_F77_CONFIG], 110139dedec0cSmrg[AC_LANG_PUSH(Fortran 77) 110149dedec0cSmrgif test -z "$F77" || test no = "$F77"; then 110159dedec0cSmrg _lt_disable_F77=yes 110160cc2eac3Smrgfi 110176c321187Smrg 110189dedec0cSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 110199dedec0cSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 110209dedec0cSmrg_LT_TAGVAR(always_export_symbols, $1)=no 110219dedec0cSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 110229dedec0cSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 110239dedec0cSmrg_LT_TAGVAR(hardcode_direct, $1)=no 110249dedec0cSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 110259dedec0cSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 110269dedec0cSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 110279dedec0cSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 110289dedec0cSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 110299dedec0cSmrg_LT_TAGVAR(inherit_rpath, $1)=no 110309dedec0cSmrg_LT_TAGVAR(module_cmds, $1)= 110319dedec0cSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 110329dedec0cSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 110339dedec0cSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 110349dedec0cSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 110359dedec0cSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 110369dedec0cSmrg_LT_TAGVAR(no_undefined_flag, $1)= 110379dedec0cSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 110389dedec0cSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 110396c321187Smrg 110409dedec0cSmrg# Source file extension for f77 test sources. 110419dedec0cSmrgac_ext=f 110426c321187Smrg 110439dedec0cSmrg# Object file extension for compiled f77 test sources. 110449dedec0cSmrgobjext=o 110459dedec0cSmrg_LT_TAGVAR(objext, $1)=$objext 110466c321187Smrg 110479dedec0cSmrg# No sense in running all these tests if we already determined that 110489dedec0cSmrg# the F77 compiler isn't working. Some variables (like enable_shared) 110499dedec0cSmrg# are currently assumed to apply to all compilers on this platform, 110509dedec0cSmrg# and will be corrupted by setting them based on a non-working compiler. 110519dedec0cSmrgif test yes != "$_lt_disable_F77"; then 110529dedec0cSmrg # Code to be used in simple compile tests 110539dedec0cSmrg lt_simple_compile_test_code="\ 110549dedec0cSmrg subroutine t 110559dedec0cSmrg return 110569dedec0cSmrg end 110579dedec0cSmrg" 110586c321187Smrg 110599dedec0cSmrg # Code to be used in simple link tests 110609dedec0cSmrg lt_simple_link_test_code="\ 110619dedec0cSmrg program t 110629dedec0cSmrg end 110639dedec0cSmrg" 110646c321187Smrg 110659dedec0cSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 110669dedec0cSmrg _LT_TAG_COMPILER 110679dedec0cSmrg 110689dedec0cSmrg # save warnings/boilerplate of simple test code 110699dedec0cSmrg _LT_COMPILER_BOILERPLATE 110709dedec0cSmrg _LT_LINKER_BOILERPLATE 110719dedec0cSmrg 110729dedec0cSmrg # Allow CC to be a program name with arguments. 110739dedec0cSmrg lt_save_CC=$CC 110749dedec0cSmrg lt_save_GCC=$GCC 110759dedec0cSmrg lt_save_CFLAGS=$CFLAGS 110769dedec0cSmrg CC=${F77-"f77"} 110779dedec0cSmrg CFLAGS=$FFLAGS 110789dedec0cSmrg compiler=$CC 110799dedec0cSmrg _LT_TAGVAR(compiler, $1)=$CC 110809dedec0cSmrg _LT_CC_BASENAME([$compiler]) 110819dedec0cSmrg GCC=$G77 110829dedec0cSmrg if test -n "$compiler"; then 110839dedec0cSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 110849dedec0cSmrg AC_MSG_RESULT([$can_build_shared]) 110859dedec0cSmrg 110869dedec0cSmrg AC_MSG_CHECKING([whether to build shared libraries]) 110879dedec0cSmrg test no = "$can_build_shared" && enable_shared=no 110889dedec0cSmrg 110899dedec0cSmrg # On AIX, shared libraries and static libraries use the same namespace, and 110909dedec0cSmrg # are all built from PIC. 110919dedec0cSmrg case $host_os in 110929dedec0cSmrg aix3*) 110939dedec0cSmrg test yes = "$enable_shared" && enable_static=no 110949dedec0cSmrg if test -n "$RANLIB"; then 110959dedec0cSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 110969dedec0cSmrg postinstall_cmds='$RANLIB $lib' 110979dedec0cSmrg fi 110980cc2eac3Smrg ;; 110999dedec0cSmrg aix[[4-9]]*) 111009dedec0cSmrg if test ia64 != "$host_cpu"; then 111019dedec0cSmrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 111029dedec0cSmrg yes,aix,yes) ;; # shared object as lib.so file only 111039dedec0cSmrg yes,svr4,*) ;; # shared object as lib.so archive member only 111049dedec0cSmrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 111059dedec0cSmrg esac 111069dedec0cSmrg fi 111070cc2eac3Smrg ;; 111089dedec0cSmrg esac 111099dedec0cSmrg AC_MSG_RESULT([$enable_shared]) 111106c321187Smrg 111119dedec0cSmrg AC_MSG_CHECKING([whether to build static libraries]) 111129dedec0cSmrg # Make sure either enable_shared or enable_static is yes. 111139dedec0cSmrg test yes = "$enable_shared" || enable_static=yes 111149dedec0cSmrg AC_MSG_RESULT([$enable_static]) 111156c321187Smrg 111169dedec0cSmrg _LT_TAGVAR(GCC, $1)=$G77 111179dedec0cSmrg _LT_TAGVAR(LD, $1)=$LD 111186c321187Smrg 111199dedec0cSmrg ## CAVEAT EMPTOR: 111209dedec0cSmrg ## There is no encapsulation within the following macros, do not change 111219dedec0cSmrg ## the running order or otherwise move them around unless you know exactly 111229dedec0cSmrg ## what you are doing... 111239dedec0cSmrg _LT_COMPILER_PIC($1) 111249dedec0cSmrg _LT_COMPILER_C_O($1) 111259dedec0cSmrg _LT_COMPILER_FILE_LOCKS($1) 111269dedec0cSmrg _LT_LINKER_SHLIBS($1) 111279dedec0cSmrg _LT_SYS_DYNAMIC_LINKER($1) 111289dedec0cSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 111296c321187Smrg 111309dedec0cSmrg _LT_CONFIG($1) 111319dedec0cSmrg fi # test -n "$compiler" 111326c321187Smrg 111339dedec0cSmrg GCC=$lt_save_GCC 111349dedec0cSmrg CC=$lt_save_CC 111359dedec0cSmrg CFLAGS=$lt_save_CFLAGS 111369dedec0cSmrgfi # test yes != "$_lt_disable_F77" 111376c321187Smrg 111389dedec0cSmrgAC_LANG_POP 111399dedec0cSmrg])# _LT_LANG_F77_CONFIG 111406c321187Smrg 1114193493779Smrg 111429dedec0cSmrg# _LT_LANG_FC_CONFIG([TAG]) 111439dedec0cSmrg# ------------------------- 111449dedec0cSmrg# Ensure that the configuration variables for a Fortran compiler are 111459dedec0cSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 111469dedec0cSmrg# to write the compiler configuration to 'libtool'. 111479dedec0cSmrgm4_defun([_LT_LANG_FC_CONFIG], 111489dedec0cSmrg[AC_LANG_PUSH(Fortran) 1114993493779Smrg 111509dedec0cSmrgif test -z "$FC" || test no = "$FC"; then 111519dedec0cSmrg _lt_disable_FC=yes 111520cc2eac3Smrgfi 1115393493779Smrg 111549dedec0cSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 111559dedec0cSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 111569dedec0cSmrg_LT_TAGVAR(always_export_symbols, $1)=no 111579dedec0cSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 111589dedec0cSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 111599dedec0cSmrg_LT_TAGVAR(hardcode_direct, $1)=no 111609dedec0cSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 111619dedec0cSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 111629dedec0cSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 111639dedec0cSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 111649dedec0cSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 111659dedec0cSmrg_LT_TAGVAR(inherit_rpath, $1)=no 111669dedec0cSmrg_LT_TAGVAR(module_cmds, $1)= 111679dedec0cSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 111689dedec0cSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 111699dedec0cSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 111709dedec0cSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 111719dedec0cSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 111729dedec0cSmrg_LT_TAGVAR(no_undefined_flag, $1)= 111739dedec0cSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 111749dedec0cSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 111756c321187Smrg 111769dedec0cSmrg# Source file extension for fc test sources. 111779dedec0cSmrgac_ext=${ac_fc_srcext-f} 111786c321187Smrg 111799dedec0cSmrg# Object file extension for compiled fc test sources. 111809dedec0cSmrgobjext=o 111819dedec0cSmrg_LT_TAGVAR(objext, $1)=$objext 11182e120bd27Smrg 111839dedec0cSmrg# No sense in running all these tests if we already determined that 111849dedec0cSmrg# the FC compiler isn't working. Some variables (like enable_shared) 111859dedec0cSmrg# are currently assumed to apply to all compilers on this platform, 111869dedec0cSmrg# and will be corrupted by setting them based on a non-working compiler. 111879dedec0cSmrgif test yes != "$_lt_disable_FC"; then 111889dedec0cSmrg # Code to be used in simple compile tests 111899dedec0cSmrg lt_simple_compile_test_code="\ 111909dedec0cSmrg subroutine t 111919dedec0cSmrg return 111929dedec0cSmrg end 111939dedec0cSmrg" 11194e120bd27Smrg 111959dedec0cSmrg # Code to be used in simple link tests 111969dedec0cSmrg lt_simple_link_test_code="\ 111979dedec0cSmrg program t 111989dedec0cSmrg end 111999dedec0cSmrg" 11200e120bd27Smrg 112019dedec0cSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 112029dedec0cSmrg _LT_TAG_COMPILER 11203e120bd27Smrg 112049dedec0cSmrg # save warnings/boilerplate of simple test code 112059dedec0cSmrg _LT_COMPILER_BOILERPLATE 112069dedec0cSmrg _LT_LINKER_BOILERPLATE 112070cc2eac3Smrg 112089dedec0cSmrg # Allow CC to be a program name with arguments. 112099dedec0cSmrg lt_save_CC=$CC 112109dedec0cSmrg lt_save_GCC=$GCC 112119dedec0cSmrg lt_save_CFLAGS=$CFLAGS 112129dedec0cSmrg CC=${FC-"f95"} 112139dedec0cSmrg CFLAGS=$FCFLAGS 112149dedec0cSmrg compiler=$CC 112159dedec0cSmrg GCC=$ac_cv_fc_compiler_gnu 112160cc2eac3Smrg 112179dedec0cSmrg _LT_TAGVAR(compiler, $1)=$CC 112189dedec0cSmrg _LT_CC_BASENAME([$compiler]) 11219e120bd27Smrg 112209dedec0cSmrg if test -n "$compiler"; then 112219dedec0cSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 112229dedec0cSmrg AC_MSG_RESULT([$can_build_shared]) 112230cc2eac3Smrg 112249dedec0cSmrg AC_MSG_CHECKING([whether to build shared libraries]) 112259dedec0cSmrg test no = "$can_build_shared" && enable_shared=no 11226e120bd27Smrg 112279dedec0cSmrg # On AIX, shared libraries and static libraries use the same namespace, and 112289dedec0cSmrg # are all built from PIC. 112299dedec0cSmrg case $host_os in 112309dedec0cSmrg aix3*) 112319dedec0cSmrg test yes = "$enable_shared" && enable_static=no 112329dedec0cSmrg if test -n "$RANLIB"; then 112339dedec0cSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 112349dedec0cSmrg postinstall_cmds='$RANLIB $lib' 112359dedec0cSmrg fi 112369dedec0cSmrg ;; 112379dedec0cSmrg aix[[4-9]]*) 112389dedec0cSmrg if test ia64 != "$host_cpu"; then 112399dedec0cSmrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 112409dedec0cSmrg yes,aix,yes) ;; # shared object as lib.so file only 112419dedec0cSmrg yes,svr4,*) ;; # shared object as lib.so archive member only 112429dedec0cSmrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 112439dedec0cSmrg esac 112440cc2eac3Smrg fi 112459dedec0cSmrg ;; 112469dedec0cSmrg esac 112479dedec0cSmrg AC_MSG_RESULT([$enable_shared]) 11248e120bd27Smrg 112499dedec0cSmrg AC_MSG_CHECKING([whether to build static libraries]) 112509dedec0cSmrg # Make sure either enable_shared or enable_static is yes. 112519dedec0cSmrg test yes = "$enable_shared" || enable_static=yes 112529dedec0cSmrg AC_MSG_RESULT([$enable_static]) 112530cc2eac3Smrg 112549dedec0cSmrg _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu 112559dedec0cSmrg _LT_TAGVAR(LD, $1)=$LD 112560cc2eac3Smrg 112579dedec0cSmrg ## CAVEAT EMPTOR: 112589dedec0cSmrg ## There is no encapsulation within the following macros, do not change 112599dedec0cSmrg ## the running order or otherwise move them around unless you know exactly 112609dedec0cSmrg ## what you are doing... 112619dedec0cSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 112629dedec0cSmrg _LT_COMPILER_PIC($1) 112639dedec0cSmrg _LT_COMPILER_C_O($1) 112649dedec0cSmrg _LT_COMPILER_FILE_LOCKS($1) 112659dedec0cSmrg _LT_LINKER_SHLIBS($1) 112669dedec0cSmrg _LT_SYS_DYNAMIC_LINKER($1) 112679dedec0cSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 112680cc2eac3Smrg 112699dedec0cSmrg _LT_CONFIG($1) 112709dedec0cSmrg fi # test -n "$compiler" 112710cc2eac3Smrg 112729dedec0cSmrg GCC=$lt_save_GCC 112739dedec0cSmrg CC=$lt_save_CC 112749dedec0cSmrg CFLAGS=$lt_save_CFLAGS 112759dedec0cSmrgfi # test yes != "$_lt_disable_FC" 112760cc2eac3Smrg 112779dedec0cSmrgAC_LANG_POP 112789dedec0cSmrg])# _LT_LANG_FC_CONFIG 11279e120bd27Smrg 112800cc2eac3Smrg 112819dedec0cSmrg# _LT_LANG_GCJ_CONFIG([TAG]) 112829dedec0cSmrg# -------------------------- 112839dedec0cSmrg# Ensure that the configuration variables for the GNU Java Compiler compiler 112849dedec0cSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 112859dedec0cSmrg# to write the compiler configuration to 'libtool'. 112869dedec0cSmrgm4_defun([_LT_LANG_GCJ_CONFIG], 112879dedec0cSmrg[AC_REQUIRE([LT_PROG_GCJ])dnl 112889dedec0cSmrgAC_LANG_SAVE 112890cc2eac3Smrg 112909dedec0cSmrg# Source file extension for Java test sources. 112919dedec0cSmrgac_ext=java 11292e120bd27Smrg 112939dedec0cSmrg# Object file extension for compiled Java test sources. 112949dedec0cSmrgobjext=o 112959dedec0cSmrg_LT_TAGVAR(objext, $1)=$objext 112960cc2eac3Smrg 112979dedec0cSmrg# Code to be used in simple compile tests 112989dedec0cSmrglt_simple_compile_test_code="class foo {}" 11299e120bd27Smrg 113009dedec0cSmrg# Code to be used in simple link tests 113019dedec0cSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 113020cc2eac3Smrg 113039dedec0cSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 113049dedec0cSmrg_LT_TAG_COMPILER 113050cc2eac3Smrg 113069dedec0cSmrg# save warnings/boilerplate of simple test code 113079dedec0cSmrg_LT_COMPILER_BOILERPLATE 113089dedec0cSmrg_LT_LINKER_BOILERPLATE 113099dedec0cSmrg 113109dedec0cSmrg# Allow CC to be a program name with arguments. 113119dedec0cSmrglt_save_CC=$CC 113129dedec0cSmrglt_save_CFLAGS=$CFLAGS 113139dedec0cSmrglt_save_GCC=$GCC 113149dedec0cSmrgGCC=yes 113159dedec0cSmrgCC=${GCJ-"gcj"} 113169dedec0cSmrgCFLAGS=$GCJFLAGS 113179dedec0cSmrgcompiler=$CC 113189dedec0cSmrg_LT_TAGVAR(compiler, $1)=$CC 113199dedec0cSmrg_LT_TAGVAR(LD, $1)=$LD 113209dedec0cSmrg_LT_CC_BASENAME([$compiler]) 113219dedec0cSmrg 113229dedec0cSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 113239dedec0cSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 113249dedec0cSmrg 113259dedec0cSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 113269dedec0cSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 113279dedec0cSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 113289dedec0cSmrg 113299dedec0cSmrgif test -n "$compiler"; then 113309dedec0cSmrg _LT_COMPILER_NO_RTTI($1) 113319dedec0cSmrg _LT_COMPILER_PIC($1) 113329dedec0cSmrg _LT_COMPILER_C_O($1) 113339dedec0cSmrg _LT_COMPILER_FILE_LOCKS($1) 113349dedec0cSmrg _LT_LINKER_SHLIBS($1) 113359dedec0cSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 113360cc2eac3Smrg 113379dedec0cSmrg _LT_CONFIG($1) 113380cc2eac3Smrgfi 11339e120bd27Smrg 113409dedec0cSmrgAC_LANG_RESTORE 11341e120bd27Smrg 113429dedec0cSmrgGCC=$lt_save_GCC 113439dedec0cSmrgCC=$lt_save_CC 113449dedec0cSmrgCFLAGS=$lt_save_CFLAGS 113459dedec0cSmrg])# _LT_LANG_GCJ_CONFIG 11346e120bd27Smrg 113476c321187Smrg 113489dedec0cSmrg# _LT_LANG_GO_CONFIG([TAG]) 113499dedec0cSmrg# -------------------------- 113509dedec0cSmrg# Ensure that the configuration variables for the GNU Go compiler 113519dedec0cSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 113529dedec0cSmrg# to write the compiler configuration to 'libtool'. 113539dedec0cSmrgm4_defun([_LT_LANG_GO_CONFIG], 113549dedec0cSmrg[AC_REQUIRE([LT_PROG_GO])dnl 113559dedec0cSmrgAC_LANG_SAVE 113566c321187Smrg 113579dedec0cSmrg# Source file extension for Go test sources. 113589dedec0cSmrgac_ext=go 113596c321187Smrg 113609dedec0cSmrg# Object file extension for compiled Go test sources. 113619dedec0cSmrgobjext=o 113629dedec0cSmrg_LT_TAGVAR(objext, $1)=$objext 1136393493779Smrg 113649dedec0cSmrg# Code to be used in simple compile tests 113659dedec0cSmrglt_simple_compile_test_code="package main; func main() { }" 1136693493779Smrg 113679dedec0cSmrg# Code to be used in simple link tests 113689dedec0cSmrglt_simple_link_test_code='package main; func main() { }' 113696c321187Smrg 113709dedec0cSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 113719dedec0cSmrg_LT_TAG_COMPILER 113726c321187Smrg 113739dedec0cSmrg# save warnings/boilerplate of simple test code 113749dedec0cSmrg_LT_COMPILER_BOILERPLATE 113759dedec0cSmrg_LT_LINKER_BOILERPLATE 113766c321187Smrg 113779dedec0cSmrg# Allow CC to be a program name with arguments. 113789dedec0cSmrglt_save_CC=$CC 113799dedec0cSmrglt_save_CFLAGS=$CFLAGS 113809dedec0cSmrglt_save_GCC=$GCC 113819dedec0cSmrgGCC=yes 113829dedec0cSmrgCC=${GOC-"gccgo"} 113839dedec0cSmrgCFLAGS=$GOFLAGS 113849dedec0cSmrgcompiler=$CC 113859dedec0cSmrg_LT_TAGVAR(compiler, $1)=$CC 113869dedec0cSmrg_LT_TAGVAR(LD, $1)=$LD 113879dedec0cSmrg_LT_CC_BASENAME([$compiler]) 113889d0b5e55Smrg 113899dedec0cSmrg# Go did not exist at the time GCC didn't implicitly link libc in. 113909dedec0cSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 1139193493779Smrg 113929dedec0cSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 113939dedec0cSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 113949dedec0cSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 11395198e4c3cSmrg 113969dedec0cSmrgif test -n "$compiler"; then 113979dedec0cSmrg _LT_COMPILER_NO_RTTI($1) 113989dedec0cSmrg _LT_COMPILER_PIC($1) 113999dedec0cSmrg _LT_COMPILER_C_O($1) 114009dedec0cSmrg _LT_COMPILER_FILE_LOCKS($1) 114019dedec0cSmrg _LT_LINKER_SHLIBS($1) 114029dedec0cSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 11403198e4c3cSmrg 114049dedec0cSmrg _LT_CONFIG($1) 114059dedec0cSmrgfi 114069dedec0cSmrg 114079dedec0cSmrgAC_LANG_RESTORE 114089dedec0cSmrg 114099dedec0cSmrgGCC=$lt_save_GCC 114109dedec0cSmrgCC=$lt_save_CC 114119dedec0cSmrgCFLAGS=$lt_save_CFLAGS 114129dedec0cSmrg])# _LT_LANG_GO_CONFIG 114139dedec0cSmrg 114149dedec0cSmrg 114159dedec0cSmrg# _LT_LANG_RC_CONFIG([TAG]) 11416198e4c3cSmrg# ------------------------- 114179dedec0cSmrg# Ensure that the configuration variables for the Windows resource compiler 114189dedec0cSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 114199dedec0cSmrg# to write the compiler configuration to 'libtool'. 114209dedec0cSmrgm4_defun([_LT_LANG_RC_CONFIG], 114219dedec0cSmrg[AC_REQUIRE([LT_PROG_RC])dnl 114229dedec0cSmrgAC_LANG_SAVE 11423198e4c3cSmrg 114249dedec0cSmrg# Source file extension for RC test sources. 114259dedec0cSmrgac_ext=rc 11426198e4c3cSmrg 114279dedec0cSmrg# Object file extension for compiled RC test sources. 114289dedec0cSmrgobjext=o 114299dedec0cSmrg_LT_TAGVAR(objext, $1)=$objext 11430198e4c3cSmrg 114319dedec0cSmrg# Code to be used in simple compile tests 114329dedec0cSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 11433198e4c3cSmrg 114349dedec0cSmrg# Code to be used in simple link tests 114359dedec0cSmrglt_simple_link_test_code=$lt_simple_compile_test_code 11436198e4c3cSmrg 114379dedec0cSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 114389dedec0cSmrg_LT_TAG_COMPILER 11439198e4c3cSmrg 114409dedec0cSmrg# save warnings/boilerplate of simple test code 114419dedec0cSmrg_LT_COMPILER_BOILERPLATE 114429dedec0cSmrg_LT_LINKER_BOILERPLATE 11443198e4c3cSmrg 114449dedec0cSmrg# Allow CC to be a program name with arguments. 114459dedec0cSmrglt_save_CC=$CC 114469dedec0cSmrglt_save_CFLAGS=$CFLAGS 114479dedec0cSmrglt_save_GCC=$GCC 114489dedec0cSmrgGCC= 114499dedec0cSmrgCC=${RC-"windres"} 114509dedec0cSmrgCFLAGS= 114519dedec0cSmrgcompiler=$CC 114529dedec0cSmrg_LT_TAGVAR(compiler, $1)=$CC 114539dedec0cSmrg_LT_CC_BASENAME([$compiler]) 114549dedec0cSmrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 11455198e4c3cSmrg 114569dedec0cSmrgif test -n "$compiler"; then 114579dedec0cSmrg : 114589dedec0cSmrg _LT_CONFIG($1) 114599dedec0cSmrgfi 11460198e4c3cSmrg 114619dedec0cSmrgGCC=$lt_save_GCC 114629dedec0cSmrgAC_LANG_RESTORE 114639dedec0cSmrgCC=$lt_save_CC 114649dedec0cSmrgCFLAGS=$lt_save_CFLAGS 114659dedec0cSmrg])# _LT_LANG_RC_CONFIG 114669dedec0cSmrg 114679dedec0cSmrg 114689dedec0cSmrg# LT_PROG_GCJ 114699dedec0cSmrg# ----------- 114709dedec0cSmrgAC_DEFUN([LT_PROG_GCJ], 114719dedec0cSmrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 114729dedec0cSmrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 114739dedec0cSmrg [AC_CHECK_TOOL(GCJ, gcj,) 114749dedec0cSmrg test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" 114759dedec0cSmrg AC_SUBST(GCJFLAGS)])])[]dnl 11476198e4c3cSmrg]) 11477198e4c3cSmrg 114789dedec0cSmrg# Old name: 114799dedec0cSmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 114809dedec0cSmrgdnl aclocal-1.4 backwards compatibility: 114819dedec0cSmrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 11482198e4c3cSmrg 11483198e4c3cSmrg 114849dedec0cSmrg# LT_PROG_GO 114859dedec0cSmrg# ---------- 114869dedec0cSmrgAC_DEFUN([LT_PROG_GO], 114879dedec0cSmrg[AC_CHECK_TOOL(GOC, gccgo,) 114889dedec0cSmrg]) 11489198e4c3cSmrg 11490198e4c3cSmrg 114919dedec0cSmrg# LT_PROG_RC 114929dedec0cSmrg# ---------- 114939dedec0cSmrgAC_DEFUN([LT_PROG_RC], 114949dedec0cSmrg[AC_CHECK_TOOL(RC, windres,) 114959dedec0cSmrg]) 11496198e4c3cSmrg 114979dedec0cSmrg# Old name: 114989dedec0cSmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 114999dedec0cSmrgdnl aclocal-1.4 backwards compatibility: 115009dedec0cSmrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 11501198e4c3cSmrg 11502198e4c3cSmrg 115039dedec0cSmrg# _LT_DECL_EGREP 115049dedec0cSmrg# -------------- 115059dedec0cSmrg# If we don't have a new enough Autoconf to choose the best grep 115069dedec0cSmrg# available, choose the one first in the user's PATH. 115079dedec0cSmrgm4_defun([_LT_DECL_EGREP], 115089dedec0cSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl 115099dedec0cSmrgAC_REQUIRE([AC_PROG_FGREP])dnl 115109dedec0cSmrgtest -z "$GREP" && GREP=grep 115119dedec0cSmrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 115129dedec0cSmrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 115139dedec0cSmrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 115149dedec0cSmrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 115159dedec0cSmrgAC_SUBST([GREP]) 115169dedec0cSmrg]) 11517198e4c3cSmrg 11518198e4c3cSmrg 115199dedec0cSmrg# _LT_DECL_OBJDUMP 115209dedec0cSmrg# -------------- 115219dedec0cSmrg# If we don't have a new enough Autoconf to choose the best objdump 115229dedec0cSmrg# available, choose the one first in the user's PATH. 115239dedec0cSmrgm4_defun([_LT_DECL_OBJDUMP], 115249dedec0cSmrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 115259dedec0cSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 115269dedec0cSmrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 115279dedec0cSmrgAC_SUBST([OBJDUMP]) 115289dedec0cSmrg]) 115299dedec0cSmrg 115309dedec0cSmrg# _LT_DECL_DLLTOOL 115319dedec0cSmrg# ---------------- 115329dedec0cSmrg# Ensure DLLTOOL variable is set. 115339dedec0cSmrgm4_defun([_LT_DECL_DLLTOOL], 115349dedec0cSmrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 115359dedec0cSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 115369dedec0cSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 115379dedec0cSmrgAC_SUBST([DLLTOOL]) 115389dedec0cSmrg]) 115399dedec0cSmrg 115409dedec0cSmrg# _LT_DECL_FILECMD 115419dedec0cSmrg# ---------------- 115429dedec0cSmrg# Check for a file(cmd) program that can be used to detect file type and magic 115439dedec0cSmrgm4_defun([_LT_DECL_FILECMD], 115449dedec0cSmrg[AC_CHECK_TOOL([FILECMD], [file], [:]) 115459dedec0cSmrg_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types]) 115469dedec0cSmrg])# _LD_DECL_FILECMD 11547198e4c3cSmrg 115489dedec0cSmrg# _LT_DECL_SED 115499dedec0cSmrg# ------------ 115509dedec0cSmrg# Check for a fully-functional sed program, that truncates 115519dedec0cSmrg# as few characters as possible. Prefer GNU sed if found. 115529dedec0cSmrgm4_defun([_LT_DECL_SED], 115539dedec0cSmrg[AC_PROG_SED 115549dedec0cSmrgtest -z "$SED" && SED=sed 115559dedec0cSmrgXsed="$SED -e 1s/^X//" 115569dedec0cSmrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 115579dedec0cSmrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 115589dedec0cSmrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 115599dedec0cSmrg])# _LT_DECL_SED 11560198e4c3cSmrg 115619dedec0cSmrgm4_ifndef([AC_PROG_SED], [ 115629dedec0cSmrg# NOTE: This macro has been submitted for inclusion into # 115639dedec0cSmrg# GNU Autoconf as AC_PROG_SED. When it is available in # 115649dedec0cSmrg# a released version of Autoconf we should remove this # 115659dedec0cSmrg# macro and use it instead. # 11566198e4c3cSmrg 115679dedec0cSmrgm4_defun([AC_PROG_SED], 115689dedec0cSmrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 115699dedec0cSmrgAC_CACHE_VAL(lt_cv_path_SED, 115709dedec0cSmrg[# Loop through the user's path and test for sed and gsed. 115719dedec0cSmrg# Then use that list of sed's as ones to test for truncation. 115729dedec0cSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 115739dedec0cSmrgfor as_dir in $PATH 115749dedec0cSmrgdo 115759dedec0cSmrg IFS=$as_save_IFS 115769dedec0cSmrg test -z "$as_dir" && as_dir=. 115779dedec0cSmrg for lt_ac_prog in sed gsed; do 115789dedec0cSmrg for ac_exec_ext in '' $ac_executable_extensions; do 115799dedec0cSmrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 115809dedec0cSmrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 11581198e4c3cSmrg fi 115829dedec0cSmrg done 115839dedec0cSmrg done 115849dedec0cSmrgdone 115859dedec0cSmrgIFS=$as_save_IFS 115869dedec0cSmrglt_ac_max=0 115879dedec0cSmrglt_ac_count=0 115889dedec0cSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 115899dedec0cSmrg# along with /bin/sed that truncates output. 115909dedec0cSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 115919dedec0cSmrg test ! -f "$lt_ac_sed" && continue 115929dedec0cSmrg cat /dev/null > conftest.in 115939dedec0cSmrg lt_ac_count=0 115949dedec0cSmrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 115959dedec0cSmrg # Check for GNU sed and select it if it is found. 115969dedec0cSmrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 115979dedec0cSmrg lt_cv_path_SED=$lt_ac_sed 115989dedec0cSmrg break 115999dedec0cSmrg fi 116009dedec0cSmrg while true; do 116019dedec0cSmrg cat conftest.in conftest.in >conftest.tmp 116029dedec0cSmrg mv conftest.tmp conftest.in 116039dedec0cSmrg cp conftest.in conftest.nl 116049dedec0cSmrg echo >>conftest.nl 116059dedec0cSmrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 116069dedec0cSmrg cmp -s conftest.out conftest.nl || break 116079dedec0cSmrg # 10000 chars as input seems more than enough 116089dedec0cSmrg test 10 -lt "$lt_ac_count" && break 116099dedec0cSmrg lt_ac_count=`expr $lt_ac_count + 1` 116109dedec0cSmrg if test "$lt_ac_count" -gt "$lt_ac_max"; then 116119dedec0cSmrg lt_ac_max=$lt_ac_count 116129dedec0cSmrg lt_cv_path_SED=$lt_ac_sed 11613198e4c3cSmrg fi 11614198e4c3cSmrg done 116159dedec0cSmrgdone 116169dedec0cSmrg]) 116179dedec0cSmrgSED=$lt_cv_path_SED 116189dedec0cSmrgAC_SUBST([SED]) 116199dedec0cSmrgAC_MSG_RESULT([$SED]) 116209dedec0cSmrg])#AC_PROG_SED 116219dedec0cSmrg])#m4_ifndef 11622198e4c3cSmrg 116239dedec0cSmrg# Old name: 116249dedec0cSmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 116259dedec0cSmrgdnl aclocal-1.4 backwards compatibility: 116269dedec0cSmrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 116279dedec0cSmrg 116289dedec0cSmrg 116299dedec0cSmrg# _LT_CHECK_SHELL_FEATURES 116309dedec0cSmrg# ------------------------ 116319dedec0cSmrg# Find out whether the shell is Bourne or XSI compatible, 116329dedec0cSmrg# or has some other useful features. 116339dedec0cSmrgm4_defun([_LT_CHECK_SHELL_FEATURES], 116349dedec0cSmrg[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 116359dedec0cSmrg lt_unset=unset 11636198e4c3cSmrgelse 116379dedec0cSmrg lt_unset=false 11638198e4c3cSmrgfi 116399dedec0cSmrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 116409dedec0cSmrg 116419dedec0cSmrg# test EBCDIC or ASCII 116429dedec0cSmrgcase `echo X|tr X '\101'` in 116439dedec0cSmrg A) # ASCII based system 116449dedec0cSmrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 116459dedec0cSmrg lt_SP2NL='tr \040 \012' 116469dedec0cSmrg lt_NL2SP='tr \015\012 \040\040' 116479dedec0cSmrg ;; 116489dedec0cSmrg *) # EBCDIC based system 116499dedec0cSmrg lt_SP2NL='tr \100 \n' 116509dedec0cSmrg lt_NL2SP='tr \r\n \100\100' 116519dedec0cSmrg ;; 116529dedec0cSmrgesac 116539dedec0cSmrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 116549dedec0cSmrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 116559dedec0cSmrg])# _LT_CHECK_SHELL_FEATURES 116569dedec0cSmrg 116579dedec0cSmrg 116589dedec0cSmrg# _LT_PATH_CONVERSION_FUNCTIONS 116599dedec0cSmrg# ----------------------------- 116609dedec0cSmrg# Determine what file name conversion functions should be used by 116619dedec0cSmrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 116629dedec0cSmrg# for certain cross-compile configurations and native mingw. 116639dedec0cSmrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 116649dedec0cSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 116659dedec0cSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 116669dedec0cSmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 116679dedec0cSmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 116689dedec0cSmrg[case $host in 116699dedec0cSmrg *-*-mingw* ) 116709dedec0cSmrg case $build in 116719dedec0cSmrg *-*-mingw* ) # actually msys 116729dedec0cSmrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 116739dedec0cSmrg ;; 116749dedec0cSmrg *-*-cygwin* ) 116759dedec0cSmrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 116769dedec0cSmrg ;; 116779dedec0cSmrg * ) # otherwise, assume *nix 116789dedec0cSmrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 116799dedec0cSmrg ;; 116809dedec0cSmrg esac 116819dedec0cSmrg ;; 116829dedec0cSmrg *-*-cygwin* ) 116839dedec0cSmrg case $build in 116849dedec0cSmrg *-*-mingw* ) # actually msys 116859dedec0cSmrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 116869dedec0cSmrg ;; 116879dedec0cSmrg *-*-cygwin* ) 116889dedec0cSmrg lt_cv_to_host_file_cmd=func_convert_file_noop 116899dedec0cSmrg ;; 116909dedec0cSmrg * ) # otherwise, assume *nix 116919dedec0cSmrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 116929dedec0cSmrg ;; 116939dedec0cSmrg esac 116949dedec0cSmrg ;; 116959dedec0cSmrg * ) # unhandled hosts (and "normal" native builds) 116969dedec0cSmrg lt_cv_to_host_file_cmd=func_convert_file_noop 116979dedec0cSmrg ;; 116989dedec0cSmrgesac 11699198e4c3cSmrg]) 117009dedec0cSmrgto_host_file_cmd=$lt_cv_to_host_file_cmd 117019dedec0cSmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 117029dedec0cSmrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 117039dedec0cSmrg [0], [convert $build file names to $host format])dnl 117049dedec0cSmrg 117059dedec0cSmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 117069dedec0cSmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 117079dedec0cSmrg[#assume ordinary cross tools, or native build. 117089dedec0cSmrglt_cv_to_tool_file_cmd=func_convert_file_noop 117099dedec0cSmrgcase $host in 117109dedec0cSmrg *-*-mingw* ) 117119dedec0cSmrg case $build in 117129dedec0cSmrg *-*-mingw* ) # actually msys 117139dedec0cSmrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 117149dedec0cSmrg ;; 117159dedec0cSmrg esac 117169dedec0cSmrg ;; 117179dedec0cSmrgesac 11718198e4c3cSmrg]) 117199dedec0cSmrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 117209dedec0cSmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 117219dedec0cSmrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 117229dedec0cSmrg [0], [convert $build files to toolchain format])dnl 117239dedec0cSmrg])# _LT_PATH_CONVERSION_FUNCTIONS 11724198e4c3cSmrg 117259dedec0cSmrg# Helper functions for option handling. -*- Autoconf -*- 117269dedec0cSmrg# 117279dedec0cSmrg# Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2022 Free 117289dedec0cSmrg# Software Foundation, Inc. 117299dedec0cSmrg# Written by Gary V. Vaughan, 2004 117309dedec0cSmrg# 117319dedec0cSmrg# This file is free software; the Free Software Foundation gives 117329dedec0cSmrg# unlimited permission to copy and/or distribute it, with or without 117339dedec0cSmrg# modifications, as long as this notice is preserved. 11734198e4c3cSmrg 117359dedec0cSmrg# serial 8 ltoptions.m4 117369dedec0cSmrg 117379dedec0cSmrg# This is to help aclocal find these macros, as it can't see m4_define. 117389dedec0cSmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 117399dedec0cSmrg 117409dedec0cSmrg 117419dedec0cSmrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 117429dedec0cSmrg# ------------------------------------------ 117439dedec0cSmrgm4_define([_LT_MANGLE_OPTION], 117449dedec0cSmrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 117459dedec0cSmrg 117469dedec0cSmrg 117479dedec0cSmrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 117489dedec0cSmrg# --------------------------------------- 117499dedec0cSmrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 117509dedec0cSmrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 117519dedec0cSmrg# saved as a flag. 117529dedec0cSmrgm4_define([_LT_SET_OPTION], 117539dedec0cSmrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 117549dedec0cSmrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 117559dedec0cSmrg _LT_MANGLE_DEFUN([$1], [$2]), 117569dedec0cSmrg [m4_warning([Unknown $1 option '$2'])])[]dnl 11757198e4c3cSmrg]) 11758198e4c3cSmrg 11759198e4c3cSmrg 117609dedec0cSmrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 117619dedec0cSmrg# ------------------------------------------------------------ 117629dedec0cSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 117639dedec0cSmrgm4_define([_LT_IF_OPTION], 117649dedec0cSmrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 117659dedec0cSmrg 117669dedec0cSmrg 117679dedec0cSmrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 117689dedec0cSmrg# ------------------------------------------------------- 117699dedec0cSmrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 117709dedec0cSmrg# are set. 117719dedec0cSmrgm4_define([_LT_UNLESS_OPTIONS], 117729dedec0cSmrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 117739dedec0cSmrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 117749dedec0cSmrg [m4_define([$0_found])])])[]dnl 117759dedec0cSmrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 117769dedec0cSmrg])[]dnl 11777198e4c3cSmrg]) 11778198e4c3cSmrg 11779198e4c3cSmrg 117809dedec0cSmrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 117819dedec0cSmrg# ---------------------------------------- 117829dedec0cSmrg# OPTION-LIST is a space-separated list of Libtool options associated 117839dedec0cSmrg# with MACRO-NAME. If any OPTION has a matching handler declared with 117849dedec0cSmrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 117859dedec0cSmrg# the unknown option and exit. 117869dedec0cSmrgm4_defun([_LT_SET_OPTIONS], 117879dedec0cSmrg[# Set options 117889dedec0cSmrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 117899dedec0cSmrg [_LT_SET_OPTION([$1], _LT_Option)]) 117909dedec0cSmrg 117919dedec0cSmrgm4_if([$1],[LT_INIT],[ 117929dedec0cSmrg dnl 117939dedec0cSmrg dnl Simply set some default values (i.e off) if boolean options were not 117949dedec0cSmrg dnl specified: 117959dedec0cSmrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 117969dedec0cSmrg ]) 117979dedec0cSmrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 117989dedec0cSmrg ]) 117999dedec0cSmrg dnl 118009dedec0cSmrg dnl If no reference was made to various pairs of opposing options, then 118019dedec0cSmrg dnl we run the default mode handler for the pair. For example, if neither 118029dedec0cSmrg dnl 'shared' nor 'disable-shared' was passed, we enable building of shared 118039dedec0cSmrg dnl archives by default: 118049dedec0cSmrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 118059dedec0cSmrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 118069dedec0cSmrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 118079dedec0cSmrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 118089dedec0cSmrg [_LT_ENABLE_FAST_INSTALL]) 118099dedec0cSmrg _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], 118109dedec0cSmrg [_LT_WITH_AIX_SONAME([aix])]) 118119dedec0cSmrg ]) 118129dedec0cSmrg])# _LT_SET_OPTIONS 11813198e4c3cSmrg 11814198e4c3cSmrg 11815198e4c3cSmrg 118169dedec0cSmrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 118179dedec0cSmrg# ----------------------------------------- 118189dedec0cSmrgm4_define([_LT_MANGLE_DEFUN], 118199dedec0cSmrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 11820198e4c3cSmrg 118219dedec0cSmrg 118229dedec0cSmrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 118239dedec0cSmrg# ----------------------------------------------- 118249dedec0cSmrgm4_define([LT_OPTION_DEFINE], 118259dedec0cSmrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 118269dedec0cSmrg])# LT_OPTION_DEFINE 118279dedec0cSmrg 118289dedec0cSmrg 118299dedec0cSmrg# dlopen 118309dedec0cSmrg# ------ 118319dedec0cSmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 11832198e4c3cSmrg]) 11833198e4c3cSmrg 118349dedec0cSmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 118359dedec0cSmrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 118369dedec0cSmrgAC_DIAGNOSE([obsolete], 118379dedec0cSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 118389dedec0cSmrgput the 'dlopen' option into LT_INIT's first parameter.]) 118399dedec0cSmrg]) 11840198e4c3cSmrg 118419dedec0cSmrgdnl aclocal-1.4 backwards compatibility: 118429dedec0cSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 11843198e4c3cSmrg 11844198e4c3cSmrg 118459dedec0cSmrg# win32-dll 118469dedec0cSmrg# --------- 118479dedec0cSmrg# Declare package support for building win32 dll's. 118489dedec0cSmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 118499dedec0cSmrg[enable_win32_dll=yes 118509dedec0cSmrg 118519dedec0cSmrgcase $host in 118529dedec0cSmrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 118539dedec0cSmrg AC_CHECK_TOOL(AS, as, false) 118549dedec0cSmrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 118559dedec0cSmrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 118569dedec0cSmrg ;; 118579dedec0cSmrgesac 118589dedec0cSmrg 118599dedec0cSmrgtest -z "$AS" && AS=as 118609dedec0cSmrg_LT_DECL([], [AS], [1], [Assembler program])dnl 118619dedec0cSmrg 118629dedec0cSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 118639dedec0cSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 118649dedec0cSmrg 118659dedec0cSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 118669dedec0cSmrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 118679dedec0cSmrg])# win32-dll 118689dedec0cSmrg 118699dedec0cSmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 118709dedec0cSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 118719dedec0cSmrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 118729dedec0cSmrgAC_DIAGNOSE([obsolete], 118739dedec0cSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 118749dedec0cSmrgput the 'win32-dll' option into LT_INIT's first parameter.]) 11875198e4c3cSmrg]) 11876198e4c3cSmrg 118779dedec0cSmrgdnl aclocal-1.4 backwards compatibility: 118789dedec0cSmrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 118799dedec0cSmrg 118809dedec0cSmrg 118819dedec0cSmrg# _LT_ENABLE_SHARED([DEFAULT]) 118829dedec0cSmrg# ---------------------------- 118839dedec0cSmrg# implement the --enable-shared flag, and supports the 'shared' and 118849dedec0cSmrg# 'disable-shared' LT_INIT options. 118859dedec0cSmrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 118869dedec0cSmrgm4_define([_LT_ENABLE_SHARED], 118879dedec0cSmrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 118889dedec0cSmrgAC_ARG_ENABLE([shared], 118899dedec0cSmrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 118909dedec0cSmrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 118919dedec0cSmrg [p=${PACKAGE-default} 118929dedec0cSmrg case $enableval in 118939dedec0cSmrg yes) enable_shared=yes ;; 118949dedec0cSmrg no) enable_shared=no ;; 118959dedec0cSmrg *) 118969dedec0cSmrg enable_shared=no 118979dedec0cSmrg # Look at the argument we got. We use all the common list separators. 118989dedec0cSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 118999dedec0cSmrg for pkg in $enableval; do 119009dedec0cSmrg IFS=$lt_save_ifs 119019dedec0cSmrg if test "X$pkg" = "X$p"; then 119029dedec0cSmrg enable_shared=yes 119039dedec0cSmrg fi 119049dedec0cSmrg done 119059dedec0cSmrg IFS=$lt_save_ifs 119069dedec0cSmrg ;; 119079dedec0cSmrg esac], 119089dedec0cSmrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 11909198e4c3cSmrg 119109dedec0cSmrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 119119dedec0cSmrg [Whether or not to build shared libraries]) 119129dedec0cSmrg])# _LT_ENABLE_SHARED 11913198e4c3cSmrg 119149dedec0cSmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 119159dedec0cSmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 11916198e4c3cSmrg 119179dedec0cSmrg# Old names: 119189dedec0cSmrgAC_DEFUN([AC_ENABLE_SHARED], 119199dedec0cSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 119209dedec0cSmrg]) 11921198e4c3cSmrg 119229dedec0cSmrgAC_DEFUN([AC_DISABLE_SHARED], 119239dedec0cSmrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 11924198e4c3cSmrg]) 11925198e4c3cSmrg 119269dedec0cSmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 119279dedec0cSmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 11928198e4c3cSmrg 119299dedec0cSmrgdnl aclocal-1.4 backwards compatibility: 119309dedec0cSmrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 119319dedec0cSmrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 11932198e4c3cSmrg 11933198e4c3cSmrg 11934198e4c3cSmrg 119359dedec0cSmrg# _LT_ENABLE_STATIC([DEFAULT]) 119369dedec0cSmrg# ---------------------------- 119379dedec0cSmrg# implement the --enable-static flag, and support the 'static' and 119389dedec0cSmrg# 'disable-static' LT_INIT options. 119399dedec0cSmrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 119409dedec0cSmrgm4_define([_LT_ENABLE_STATIC], 119419dedec0cSmrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 119429dedec0cSmrgAC_ARG_ENABLE([static], 119439dedec0cSmrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 119449dedec0cSmrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 119459dedec0cSmrg [p=${PACKAGE-default} 119469dedec0cSmrg case $enableval in 119479dedec0cSmrg yes) enable_static=yes ;; 119489dedec0cSmrg no) enable_static=no ;; 119499dedec0cSmrg *) 119509dedec0cSmrg enable_static=no 119519dedec0cSmrg # Look at the argument we got. We use all the common list separators. 119529dedec0cSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 119539dedec0cSmrg for pkg in $enableval; do 119549dedec0cSmrg IFS=$lt_save_ifs 119559dedec0cSmrg if test "X$pkg" = "X$p"; then 119569dedec0cSmrg enable_static=yes 119579dedec0cSmrg fi 119589dedec0cSmrg done 119599dedec0cSmrg IFS=$lt_save_ifs 119609dedec0cSmrg ;; 119619dedec0cSmrg esac], 119629dedec0cSmrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 11963198e4c3cSmrg 119649dedec0cSmrg _LT_DECL([build_old_libs], [enable_static], [0], 119659dedec0cSmrg [Whether or not to build static libraries]) 119669dedec0cSmrg])# _LT_ENABLE_STATIC 11967198e4c3cSmrg 119689dedec0cSmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 119699dedec0cSmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 11970198e4c3cSmrg 119719dedec0cSmrg# Old names: 119729dedec0cSmrgAC_DEFUN([AC_ENABLE_STATIC], 119739dedec0cSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 119749dedec0cSmrg]) 11975198e4c3cSmrg 119769dedec0cSmrgAC_DEFUN([AC_DISABLE_STATIC], 119779dedec0cSmrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 119789dedec0cSmrg]) 11979198e4c3cSmrg 119809dedec0cSmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 119819dedec0cSmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 11982198e4c3cSmrg 119839dedec0cSmrgdnl aclocal-1.4 backwards compatibility: 119849dedec0cSmrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 119859dedec0cSmrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 11986198e4c3cSmrg 11987198e4c3cSmrg 11988198e4c3cSmrg 119899dedec0cSmrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 119909dedec0cSmrg# ---------------------------------- 119919dedec0cSmrg# implement the --enable-fast-install flag, and support the 'fast-install' 119929dedec0cSmrg# and 'disable-fast-install' LT_INIT options. 119939dedec0cSmrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 119949dedec0cSmrgm4_define([_LT_ENABLE_FAST_INSTALL], 119959dedec0cSmrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 119969dedec0cSmrgAC_ARG_ENABLE([fast-install], 119979dedec0cSmrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 119989dedec0cSmrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 119999dedec0cSmrg [p=${PACKAGE-default} 120009dedec0cSmrg case $enableval in 120019dedec0cSmrg yes) enable_fast_install=yes ;; 120029dedec0cSmrg no) enable_fast_install=no ;; 120039dedec0cSmrg *) 120049dedec0cSmrg enable_fast_install=no 120059dedec0cSmrg # Look at the argument we got. We use all the common list separators. 120069dedec0cSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 120079dedec0cSmrg for pkg in $enableval; do 120089dedec0cSmrg IFS=$lt_save_ifs 120099dedec0cSmrg if test "X$pkg" = "X$p"; then 120109dedec0cSmrg enable_fast_install=yes 120119dedec0cSmrg fi 120129dedec0cSmrg done 120139dedec0cSmrg IFS=$lt_save_ifs 120149dedec0cSmrg ;; 120159dedec0cSmrg esac], 120169dedec0cSmrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 12017198e4c3cSmrg 120189dedec0cSmrg_LT_DECL([fast_install], [enable_fast_install], [0], 120199dedec0cSmrg [Whether or not to optimize for fast installation])dnl 120209dedec0cSmrg])# _LT_ENABLE_FAST_INSTALL 12021198e4c3cSmrg 120229dedec0cSmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 120239dedec0cSmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 12024198e4c3cSmrg 120259dedec0cSmrg# Old names: 120269dedec0cSmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 120279dedec0cSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 120289dedec0cSmrgAC_DIAGNOSE([obsolete], 120299dedec0cSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 120309dedec0cSmrgthe 'fast-install' option into LT_INIT's first parameter.]) 12031198e4c3cSmrg]) 12032198e4c3cSmrg 120339dedec0cSmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 120349dedec0cSmrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 120359dedec0cSmrgAC_DIAGNOSE([obsolete], 120369dedec0cSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 120379dedec0cSmrgthe 'disable-fast-install' option into LT_INIT's first parameter.]) 120389dedec0cSmrg]) 12039198e4c3cSmrg 120409dedec0cSmrgdnl aclocal-1.4 backwards compatibility: 120419dedec0cSmrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 120429dedec0cSmrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 12043198e4c3cSmrg 12044198e4c3cSmrg 120459dedec0cSmrg# _LT_WITH_AIX_SONAME([DEFAULT]) 120469dedec0cSmrg# ---------------------------------- 120479dedec0cSmrg# implement the --with-aix-soname flag, and support the `aix-soname=aix' 120489dedec0cSmrg# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT 120499dedec0cSmrg# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. 120509dedec0cSmrgm4_define([_LT_WITH_AIX_SONAME], 120519dedec0cSmrg[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl 120529dedec0cSmrgshared_archive_member_spec= 120539dedec0cSmrgcase $host,$enable_shared in 120549dedec0cSmrgpower*-*-aix[[5-9]]*,yes) 120559dedec0cSmrg AC_MSG_CHECKING([which variant of shared library versioning to provide]) 120569dedec0cSmrg AC_ARG_WITH([aix-soname], 120579dedec0cSmrg [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], 120589dedec0cSmrg [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], 120599dedec0cSmrg [case $withval in 120609dedec0cSmrg aix|svr4|both) 120619dedec0cSmrg ;; 120629dedec0cSmrg *) 120639dedec0cSmrg AC_MSG_ERROR([Unknown argument to --with-aix-soname]) 120649dedec0cSmrg ;; 120659dedec0cSmrg esac 120669dedec0cSmrg lt_cv_with_aix_soname=$with_aix_soname], 120679dedec0cSmrg [AC_CACHE_VAL([lt_cv_with_aix_soname], 120689dedec0cSmrg [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) 120699dedec0cSmrg with_aix_soname=$lt_cv_with_aix_soname]) 120709dedec0cSmrg AC_MSG_RESULT([$with_aix_soname]) 120719dedec0cSmrg if test aix != "$with_aix_soname"; then 120729dedec0cSmrg # For the AIX way of multilib, we name the shared archive member 120739dedec0cSmrg # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', 120749dedec0cSmrg # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. 120759dedec0cSmrg # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, 120769dedec0cSmrg # the AIX toolchain works better with OBJECT_MODE set (default 32). 120779dedec0cSmrg if test 64 = "${OBJECT_MODE-32}"; then 120789dedec0cSmrg shared_archive_member_spec=shr_64 120799dedec0cSmrg else 120809dedec0cSmrg shared_archive_member_spec=shr 120819dedec0cSmrg fi 120829dedec0cSmrg fi 120839dedec0cSmrg ;; 120849dedec0cSmrg*) 120859dedec0cSmrg with_aix_soname=aix 120869dedec0cSmrg ;; 120879dedec0cSmrgesac 12088198e4c3cSmrg 120899dedec0cSmrg_LT_DECL([], [shared_archive_member_spec], [0], 120909dedec0cSmrg [Shared archive member basename, for filename based shared library versioning on AIX])dnl 120919dedec0cSmrg])# _LT_WITH_AIX_SONAME 12092198e4c3cSmrg 120939dedec0cSmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) 120949dedec0cSmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) 120959dedec0cSmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) 12096198e4c3cSmrg 12097198e4c3cSmrg 120989dedec0cSmrg# _LT_WITH_PIC([MODE]) 12099198e4c3cSmrg# -------------------- 121009dedec0cSmrg# implement the --with-pic flag, and support the 'pic-only' and 'no-pic' 121019dedec0cSmrg# LT_INIT options. 121029dedec0cSmrg# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. 121039dedec0cSmrgm4_define([_LT_WITH_PIC], 121049dedec0cSmrg[AC_ARG_WITH([pic], 121059dedec0cSmrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 121069dedec0cSmrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 121079dedec0cSmrg [lt_p=${PACKAGE-default} 121089dedec0cSmrg case $withval in 121099dedec0cSmrg yes|no) pic_mode=$withval ;; 121109dedec0cSmrg *) 121119dedec0cSmrg pic_mode=default 121129dedec0cSmrg # Look at the argument we got. We use all the common list separators. 121139dedec0cSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 121149dedec0cSmrg for lt_pkg in $withval; do 121159dedec0cSmrg IFS=$lt_save_ifs 121169dedec0cSmrg if test "X$lt_pkg" = "X$lt_p"; then 121179dedec0cSmrg pic_mode=yes 121189dedec0cSmrg fi 121199dedec0cSmrg done 121209dedec0cSmrg IFS=$lt_save_ifs 121219dedec0cSmrg ;; 121229dedec0cSmrg esac], 121239dedec0cSmrg [pic_mode=m4_default([$1], [default])]) 12124198e4c3cSmrg 121259dedec0cSmrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 121269dedec0cSmrg])# _LT_WITH_PIC 12127198e4c3cSmrg 121289dedec0cSmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 121299dedec0cSmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 12130198e4c3cSmrg 121319dedec0cSmrg# Old name: 121329dedec0cSmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 121339dedec0cSmrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 121349dedec0cSmrgAC_DIAGNOSE([obsolete], 121359dedec0cSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 121369dedec0cSmrgput the 'pic-only' option into LT_INIT's first parameter.]) 121379dedec0cSmrg]) 12138198e4c3cSmrg 121399dedec0cSmrgdnl aclocal-1.4 backwards compatibility: 121409dedec0cSmrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 12141198e4c3cSmrg 12142198e4c3cSmrg 121439dedec0cSmrgm4_define([_LTDL_MODE], []) 121449dedec0cSmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 121459dedec0cSmrg [m4_define([_LTDL_MODE], [nonrecursive])]) 121469dedec0cSmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 121479dedec0cSmrg [m4_define([_LTDL_MODE], [recursive])]) 121489dedec0cSmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 121499dedec0cSmrg [m4_define([_LTDL_MODE], [subproject])]) 121509dedec0cSmrg 121519dedec0cSmrgm4_define([_LTDL_TYPE], []) 121529dedec0cSmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 121539dedec0cSmrg [m4_define([_LTDL_TYPE], [installable])]) 121549dedec0cSmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 121559dedec0cSmrg [m4_define([_LTDL_TYPE], [convenience])]) 121569dedec0cSmrg 121579dedec0cSmrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 12158198e4c3cSmrg# 121599dedec0cSmrg# Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2022 Free Software 121609dedec0cSmrg# Foundation, Inc. 121619dedec0cSmrg# Written by Gary V. Vaughan, 2004 121629dedec0cSmrg# 121639dedec0cSmrg# This file is free software; the Free Software Foundation gives 121649dedec0cSmrg# unlimited permission to copy and/or distribute it, with or without 121659dedec0cSmrg# modifications, as long as this notice is preserved. 12166198e4c3cSmrg 121679dedec0cSmrg# serial 6 ltsugar.m4 12168198e4c3cSmrg 121699dedec0cSmrg# This is to help aclocal find these macros, as it can't see m4_define. 121709dedec0cSmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 12171198e4c3cSmrg 12172198e4c3cSmrg 121739dedec0cSmrg# lt_join(SEP, ARG1, [ARG2...]) 121749dedec0cSmrg# ----------------------------- 121759dedec0cSmrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 121769dedec0cSmrg# associated separator. 121779dedec0cSmrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 121789dedec0cSmrg# versions in m4sugar had bugs. 121799dedec0cSmrgm4_define([lt_join], 121809dedec0cSmrg[m4_if([$#], [1], [], 121819dedec0cSmrg [$#], [2], [[$2]], 121829dedec0cSmrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 121839dedec0cSmrgm4_define([_lt_join], 121849dedec0cSmrg[m4_if([$#$2], [2], [], 121859dedec0cSmrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 12186198e4c3cSmrg 12187198e4c3cSmrg 121889dedec0cSmrg# lt_car(LIST) 121899dedec0cSmrg# lt_cdr(LIST) 121909dedec0cSmrg# ------------ 121919dedec0cSmrg# Manipulate m4 lists. 121929dedec0cSmrg# These macros are necessary as long as will still need to support 121939dedec0cSmrg# Autoconf-2.59, which quotes differently. 121949dedec0cSmrgm4_define([lt_car], [[$1]]) 121959dedec0cSmrgm4_define([lt_cdr], 121969dedec0cSmrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 121979dedec0cSmrg [$#], 1, [], 121989dedec0cSmrg [m4_dquote(m4_shift($@))])]) 121999dedec0cSmrgm4_define([lt_unquote], $1) 122009dedec0cSmrg 12201198e4c3cSmrg 122029dedec0cSmrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 122039dedec0cSmrg# ------------------------------------------ 122049dedec0cSmrg# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. 122059dedec0cSmrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 122069dedec0cSmrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 122079dedec0cSmrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 122089dedec0cSmrg# than defined and empty). 12209198e4c3cSmrg# 122109dedec0cSmrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 122119dedec0cSmrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 122129dedec0cSmrgm4_define([lt_append], 122139dedec0cSmrg[m4_define([$1], 122149dedec0cSmrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 12215198e4c3cSmrg 12216198e4c3cSmrg 12217198e4c3cSmrg 122189dedec0cSmrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 122199dedec0cSmrg# ---------------------------------------------------------- 122209dedec0cSmrg# Produce a SEP delimited list of all paired combinations of elements of 122219dedec0cSmrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 122229dedec0cSmrg# has the form PREFIXmINFIXSUFFIXn. 122239dedec0cSmrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 122249dedec0cSmrgm4_define([lt_combine], 122259dedec0cSmrg[m4_if(m4_eval([$# > 3]), [1], 122269dedec0cSmrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 122279dedec0cSmrg[[m4_foreach([_Lt_prefix], [$2], 122289dedec0cSmrg [m4_foreach([_Lt_suffix], 122299dedec0cSmrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 122309dedec0cSmrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 122319dedec0cSmrg 122329dedec0cSmrg 122339dedec0cSmrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 122349dedec0cSmrg# ----------------------------------------------------------------------- 122359dedec0cSmrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 122369dedec0cSmrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 122379dedec0cSmrgm4_define([lt_if_append_uniq], 122389dedec0cSmrg[m4_ifdef([$1], 122399dedec0cSmrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 122409dedec0cSmrg [lt_append([$1], [$2], [$3])$4], 122419dedec0cSmrg [$5])], 122429dedec0cSmrg [lt_append([$1], [$2], [$3])$4])]) 122439dedec0cSmrg 122449dedec0cSmrg 122459dedec0cSmrg# lt_dict_add(DICT, KEY, VALUE) 122469dedec0cSmrg# ----------------------------- 122479dedec0cSmrgm4_define([lt_dict_add], 122489dedec0cSmrg[m4_define([$1($2)], [$3])]) 12249198e4c3cSmrg 12250198e4c3cSmrg 122519dedec0cSmrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 122529dedec0cSmrg# -------------------------------------------- 122539dedec0cSmrgm4_define([lt_dict_add_subkey], 122549dedec0cSmrg[m4_define([$1($2:$3)], [$4])]) 12255198e4c3cSmrg 12256198e4c3cSmrg 122579dedec0cSmrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 122589dedec0cSmrg# ---------------------------------- 122599dedec0cSmrgm4_define([lt_dict_fetch], 122609dedec0cSmrg[m4_ifval([$3], 122619dedec0cSmrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 122629dedec0cSmrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 12263198e4c3cSmrg 12264198e4c3cSmrg 122659dedec0cSmrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 122669dedec0cSmrg# ----------------------------------------------------------------- 122679dedec0cSmrgm4_define([lt_if_dict_fetch], 122689dedec0cSmrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 122699dedec0cSmrg [$5], 122709dedec0cSmrg [$6])]) 122716c321187Smrg 1227293493779Smrg 122739dedec0cSmrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 122749dedec0cSmrg# -------------------------------------------------------------- 122759dedec0cSmrgm4_define([lt_dict_filter], 122769dedec0cSmrg[m4_if([$5], [], [], 122779dedec0cSmrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 122789dedec0cSmrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 122799dedec0cSmrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 122809dedec0cSmrg]) 1228193493779Smrg 122829dedec0cSmrg# ltversion.m4 -- version numbers -*- Autoconf -*- 122839dedec0cSmrg# 122849dedec0cSmrg# Copyright (C) 2004, 2011-2019, 2021-2022 Free Software Foundation, 122859dedec0cSmrg# Inc. 122869dedec0cSmrg# Written by Scott James Remnant, 2004 122879dedec0cSmrg# 122889dedec0cSmrg# This file is free software; the Free Software Foundation gives 122899dedec0cSmrg# unlimited permission to copy and/or distribute it, with or without 122909dedec0cSmrg# modifications, as long as this notice is preserved. 122916c321187Smrg 122929dedec0cSmrg# @configure_input@ 122936c321187Smrg 122949dedec0cSmrg# serial 4245 ltversion.m4 122959dedec0cSmrg# This file is part of GNU Libtool 122966c321187Smrg 122979dedec0cSmrgm4_define([LT_PACKAGE_VERSION], [2.4.7]) 122989dedec0cSmrgm4_define([LT_PACKAGE_REVISION], [2.4.7]) 12299e120bd27Smrg 123009dedec0cSmrgAC_DEFUN([LTVERSION_VERSION], 123019dedec0cSmrg[macro_version='2.4.7' 123029dedec0cSmrgmacro_revision='2.4.7' 123039dedec0cSmrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 123049dedec0cSmrg_LT_DECL(, macro_revision, 0) 123059dedec0cSmrg]) 12306e120bd27Smrg 123079dedec0cSmrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 123089dedec0cSmrg# 123099dedec0cSmrg# Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2022 Free 123109dedec0cSmrg# Software Foundation, Inc. 123119dedec0cSmrg# Written by Scott James Remnant, 2004. 123129dedec0cSmrg# 123139dedec0cSmrg# This file is free software; the Free Software Foundation gives 123149dedec0cSmrg# unlimited permission to copy and/or distribute it, with or without 123159dedec0cSmrg# modifications, as long as this notice is preserved. 123160cc2eac3Smrg 123179dedec0cSmrg# serial 5 lt~obsolete.m4 123180cc2eac3Smrg 123199dedec0cSmrg# These exist entirely to fool aclocal when bootstrapping libtool. 123209dedec0cSmrg# 123219dedec0cSmrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), 123229dedec0cSmrg# which have later been changed to m4_define as they aren't part of the 123239dedec0cSmrg# exported API, or moved to Autoconf or Automake where they belong. 123249dedec0cSmrg# 123259dedec0cSmrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 123269dedec0cSmrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 123279dedec0cSmrg# using a macro with the same name in our local m4/libtool.m4 it'll 123289dedec0cSmrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 123299dedec0cSmrg# and doesn't know about Autoconf macros at all.) 123309dedec0cSmrg# 123319dedec0cSmrg# So we provide this file, which has a silly filename so it's always 123329dedec0cSmrg# included after everything else. This provides aclocal with the 123339dedec0cSmrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 123349dedec0cSmrg# because those macros already exist, or will be overwritten later. 123359dedec0cSmrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 123369dedec0cSmrg# 123379dedec0cSmrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 123389dedec0cSmrg# Yes, that means every name once taken will need to remain here until 123399dedec0cSmrg# we give up compatibility with versions before 1.7, at which point 123409dedec0cSmrg# we need to keep only those names which we still refer to. 123410cc2eac3Smrg 123429dedec0cSmrg# This is to help aclocal find these macros, as it can't see m4_define. 123439dedec0cSmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 12344e120bd27Smrg 123459dedec0cSmrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 123469dedec0cSmrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 123479dedec0cSmrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 123489dedec0cSmrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 123499dedec0cSmrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 123509dedec0cSmrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 123519dedec0cSmrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 123529dedec0cSmrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 123539dedec0cSmrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 123549dedec0cSmrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 123559dedec0cSmrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 123569dedec0cSmrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 123579dedec0cSmrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 123589dedec0cSmrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 123599dedec0cSmrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 123609dedec0cSmrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 123619dedec0cSmrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 123629dedec0cSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 123639dedec0cSmrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 123649dedec0cSmrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 123659dedec0cSmrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 123669dedec0cSmrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 123679dedec0cSmrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 123689dedec0cSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 123699dedec0cSmrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 123709dedec0cSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 123719dedec0cSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 123729dedec0cSmrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 123739dedec0cSmrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 123749dedec0cSmrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 123759dedec0cSmrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 123769dedec0cSmrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 123779dedec0cSmrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 123789dedec0cSmrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 123799dedec0cSmrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 123809dedec0cSmrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 123819dedec0cSmrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 123829dedec0cSmrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 123839dedec0cSmrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 123849dedec0cSmrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 123859dedec0cSmrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 123869dedec0cSmrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 123879dedec0cSmrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 123889dedec0cSmrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 123899dedec0cSmrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 123909dedec0cSmrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 123919dedec0cSmrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 123929dedec0cSmrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 123939dedec0cSmrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 123949dedec0cSmrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 123959dedec0cSmrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 123969dedec0cSmrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 123979dedec0cSmrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 123989dedec0cSmrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 123999dedec0cSmrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 124009dedec0cSmrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 124019dedec0cSmrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 124029dedec0cSmrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 124039dedec0cSmrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 124049dedec0cSmrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 124059dedec0cSmrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 124066c321187Smrg 12407