12b2b4fcbSmrg# generated automatically by aclocal 1.16.5 -*- Autoconf -*- 21e449e82Smrg 32b2b4fcbSmrg# Copyright (C) 1996-2021 Free Software Foundation, Inc. 4ab47cfaaSmrg 5ab47cfaaSmrg# This file is free software; the Free Software Foundation 6ab47cfaaSmrg# gives unlimited permission to copy and/or distribute it, 7ab47cfaaSmrg# with or without modifications, as long as this notice is preserved. 8ab47cfaaSmrg 9ab47cfaaSmrg# This program is distributed in the hope that it will be useful, 10ab47cfaaSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11ab47cfaaSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12ab47cfaaSmrg# PARTICULAR PURPOSE. 13ab47cfaaSmrg 141e449e82Smrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 158697ee19Smrgm4_ifndef([AC_AUTOCONF_VERSION], 168697ee19Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 175c8a776cSmrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.72],, 185c8a776cSmrg[m4_warning([this file was generated for autoconf 2.72. 198697ee19SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 208697ee19SmrgIf you have problems, you may need to regenerate the build system entirely. 211e449e82SmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])]) 228697ee19Smrg 232b2b4fcbSmrg# Copyright (C) 2002-2021 Free Software Foundation, Inc. 246aec45a7Smrg# 252b2b4fcbSmrg# This file is free software; the Free Software Foundation 262b2b4fcbSmrg# gives unlimited permission to copy and/or distribute it, 272b2b4fcbSmrg# with or without modifications, as long as this notice is preserved. 28300bf1aeSmrg 292b2b4fcbSmrg# AM_AUTOMAKE_VERSION(VERSION) 302b2b4fcbSmrg# ---------------------------- 312b2b4fcbSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 322b2b4fcbSmrg# generated from the m4 files accompanying Automake X.Y. 332b2b4fcbSmrg# (This private macro should not be called outside this file.) 342b2b4fcbSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 352b2b4fcbSmrg[am__api_version='1.16' 362b2b4fcbSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 372b2b4fcbSmrgdnl require some minimum version. Point them to the right macro. 382b2b4fcbSmrgm4_if([$1], [1.16.5], [], 392b2b4fcbSmrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 406aec45a7Smrg]) 41ab47cfaaSmrg 422b2b4fcbSmrg# _AM_AUTOCONF_VERSION(VERSION) 432b2b4fcbSmrg# ----------------------------- 442b2b4fcbSmrg# aclocal traces this macro to find the Autoconf version. 452b2b4fcbSmrg# This is a private macro too. Using m4_define simplifies 462b2b4fcbSmrg# the logic in aclocal, which can simply ignore this definition. 472b2b4fcbSmrgm4_define([_AM_AUTOCONF_VERSION], []) 48ab47cfaaSmrg 492b2b4fcbSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION 502b2b4fcbSmrg# ------------------------------- 512b2b4fcbSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 522b2b4fcbSmrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 532b2b4fcbSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 542b2b4fcbSmrg[AM_AUTOMAKE_VERSION([1.16.5])dnl 552b2b4fcbSmrgm4_ifndef([AC_AUTOCONF_VERSION], 562b2b4fcbSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 572b2b4fcbSmrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 58ab47cfaaSmrg 592b2b4fcbSmrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 601473d951Smrg 612b2b4fcbSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 622b2b4fcbSmrg# 632b2b4fcbSmrg# This file is free software; the Free Software Foundation 642b2b4fcbSmrg# gives unlimited permission to copy and/or distribute it, 652b2b4fcbSmrg# with or without modifications, as long as this notice is preserved. 661473d951Smrg 672b2b4fcbSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 682b2b4fcbSmrg# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 692b2b4fcbSmrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 702b2b4fcbSmrg# 712b2b4fcbSmrg# Of course, Automake must honor this variable whenever it calls a 722b2b4fcbSmrg# tool from the auxiliary directory. The problem is that $srcdir (and 732b2b4fcbSmrg# therefore $ac_aux_dir as well) can be either absolute or relative, 742b2b4fcbSmrg# depending on how configure is run. This is pretty annoying, since 752b2b4fcbSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 762b2b4fcbSmrg# source directory, any form will work fine, but in subdirectories a 772b2b4fcbSmrg# relative path needs to be adjusted first. 782b2b4fcbSmrg# 792b2b4fcbSmrg# $ac_aux_dir/missing 802b2b4fcbSmrg# fails when called from a subdirectory if $ac_aux_dir is relative 812b2b4fcbSmrg# $top_srcdir/$ac_aux_dir/missing 822b2b4fcbSmrg# fails if $ac_aux_dir is absolute, 832b2b4fcbSmrg# fails when called from a subdirectory in a VPATH build with 842b2b4fcbSmrg# a relative $ac_aux_dir 852b2b4fcbSmrg# 862b2b4fcbSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 872b2b4fcbSmrg# are both prefixed by $srcdir. In an in-source build this is usually 882b2b4fcbSmrg# harmless because $srcdir is '.', but things will broke when you 892b2b4fcbSmrg# start a VPATH build or use an absolute $srcdir. 902b2b4fcbSmrg# 912b2b4fcbSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 922b2b4fcbSmrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 932b2b4fcbSmrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 942b2b4fcbSmrg# and then we would define $MISSING as 952b2b4fcbSmrg# MISSING="\${SHELL} $am_aux_dir/missing" 962b2b4fcbSmrg# This will work as long as MISSING is not called from configure, because 972b2b4fcbSmrg# unfortunately $(top_srcdir) has no meaning in configure. 982b2b4fcbSmrg# However there are other variables, like CC, which are often used in 992b2b4fcbSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 1002b2b4fcbSmrg# 1012b2b4fcbSmrg# Another solution, used here, is to always expand $ac_aux_dir to an 1022b2b4fcbSmrg# absolute PATH. The drawback is that using absolute paths prevent a 1032b2b4fcbSmrg# configured tree to be moved without reconfiguration. 1042b2b4fcbSmrg 1052b2b4fcbSmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 1062b2b4fcbSmrg[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 1072b2b4fcbSmrg# Expand $ac_aux_dir to an absolute path. 1082b2b4fcbSmrgam_aux_dir=`cd "$ac_aux_dir" && pwd` 1096aec45a7Smrg]) 1106aec45a7Smrg 1112b2b4fcbSmrg# AM_CONDITIONAL -*- Autoconf -*- 1126aec45a7Smrg 1132b2b4fcbSmrg# Copyright (C) 1997-2021 Free Software Foundation, Inc. 1142b2b4fcbSmrg# 1152b2b4fcbSmrg# This file is free software; the Free Software Foundation 1162b2b4fcbSmrg# gives unlimited permission to copy and/or distribute it, 1172b2b4fcbSmrg# with or without modifications, as long as this notice is preserved. 1186aec45a7Smrg 1192b2b4fcbSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 1202b2b4fcbSmrg# ------------------------------------- 1212b2b4fcbSmrg# Define a conditional. 1222b2b4fcbSmrgAC_DEFUN([AM_CONDITIONAL], 1232b2b4fcbSmrg[AC_PREREQ([2.52])dnl 1242b2b4fcbSmrg m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 1252b2b4fcbSmrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 1262b2b4fcbSmrgAC_SUBST([$1_TRUE])dnl 1272b2b4fcbSmrgAC_SUBST([$1_FALSE])dnl 1282b2b4fcbSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 1292b2b4fcbSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 1302b2b4fcbSmrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 1312b2b4fcbSmrgif $2; then 1322b2b4fcbSmrg $1_TRUE= 1332b2b4fcbSmrg $1_FALSE='#' 1342b2b4fcbSmrgelse 1352b2b4fcbSmrg $1_TRUE='#' 1362b2b4fcbSmrg $1_FALSE= 1372b2b4fcbSmrgfi 1382b2b4fcbSmrgAC_CONFIG_COMMANDS_PRE( 1392b2b4fcbSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 1402b2b4fcbSmrg AC_MSG_ERROR([[conditional "$1" was never defined. 1412b2b4fcbSmrgUsually this means the macro was only invoked conditionally.]]) 1422b2b4fcbSmrgfi])]) 1436aec45a7Smrg 1442b2b4fcbSmrg# Copyright (C) 1999-2021 Free Software Foundation, Inc. 1452b2b4fcbSmrg# 1462b2b4fcbSmrg# This file is free software; the Free Software Foundation 1472b2b4fcbSmrg# gives unlimited permission to copy and/or distribute it, 1482b2b4fcbSmrg# with or without modifications, as long as this notice is preserved. 1496aec45a7Smrg 150ab47cfaaSmrg 1512b2b4fcbSmrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 1522b2b4fcbSmrg# written in clear, in which case automake, when reading aclocal.m4, 1532b2b4fcbSmrg# will think it sees a *use*, and therefore will trigger all it's 1542b2b4fcbSmrg# C support machinery. Also note that it means that autoscan, seeing 1552b2b4fcbSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 156ab47cfaaSmrg 157ab47cfaaSmrg 1582b2b4fcbSmrg# _AM_DEPENDENCIES(NAME) 1592b2b4fcbSmrg# ---------------------- 1602b2b4fcbSmrg# See how the compiler implements dependency checking. 1612b2b4fcbSmrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 1622b2b4fcbSmrg# We try a few techniques and use that to set a single cache variable. 1632b2b4fcbSmrg# 1642b2b4fcbSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 1652b2b4fcbSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 1662b2b4fcbSmrg# dependency, and given that the user is not expected to run this macro, 1672b2b4fcbSmrg# just rely on AC_PROG_CC. 1682b2b4fcbSmrgAC_DEFUN([_AM_DEPENDENCIES], 1692b2b4fcbSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 1702b2b4fcbSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 1712b2b4fcbSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 1722b2b4fcbSmrgAC_REQUIRE([AM_DEP_TRACK])dnl 1731473d951Smrg 1742b2b4fcbSmrgm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 1752b2b4fcbSmrg [$1], [CXX], [depcc="$CXX" am_compiler_list=], 1762b2b4fcbSmrg [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 1772b2b4fcbSmrg [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 1782b2b4fcbSmrg [$1], [UPC], [depcc="$UPC" am_compiler_list=], 1792b2b4fcbSmrg [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 1802b2b4fcbSmrg [depcc="$$1" am_compiler_list=]) 1811473d951Smrg 1822b2b4fcbSmrgAC_CACHE_CHECK([dependency style of $depcc], 1832b2b4fcbSmrg [am_cv_$1_dependencies_compiler_type], 1842b2b4fcbSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 1852b2b4fcbSmrg # We make a subdir and do the tests there. Otherwise we can end up 1862b2b4fcbSmrg # making bogus files that we don't know about and never remove. For 1872b2b4fcbSmrg # instance it was reported that on HP-UX the gcc test will end up 1882b2b4fcbSmrg # making a dummy file named 'D' -- because '-MD' means "put the output 1892b2b4fcbSmrg # in D". 1902b2b4fcbSmrg rm -rf conftest.dir 1912b2b4fcbSmrg mkdir conftest.dir 1922b2b4fcbSmrg # Copy depcomp to subdir because otherwise we won't find it if we're 1932b2b4fcbSmrg # using a relative directory. 1942b2b4fcbSmrg cp "$am_depcomp" conftest.dir 1952b2b4fcbSmrg cd conftest.dir 1962b2b4fcbSmrg # We will build objects and dependencies in a subdirectory because 1972b2b4fcbSmrg # it helps to detect inapplicable dependency modes. For instance 1982b2b4fcbSmrg # both Tru64's cc and ICC support -MD to output dependencies as a 1992b2b4fcbSmrg # side effect of compilation, but ICC will put the dependencies in 2002b2b4fcbSmrg # the current directory while Tru64 will put them in the object 2012b2b4fcbSmrg # directory. 2022b2b4fcbSmrg mkdir sub 2036aec45a7Smrg 2042b2b4fcbSmrg am_cv_$1_dependencies_compiler_type=none 2052b2b4fcbSmrg if test "$am_compiler_list" = ""; then 2062b2b4fcbSmrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 2072b2b4fcbSmrg fi 2082b2b4fcbSmrg am__universal=false 2092b2b4fcbSmrg m4_case([$1], [CC], 2102b2b4fcbSmrg [case " $depcc " in #( 2112b2b4fcbSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 2122b2b4fcbSmrg esac], 2132b2b4fcbSmrg [CXX], 2142b2b4fcbSmrg [case " $depcc " in #( 2152b2b4fcbSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 2162b2b4fcbSmrg esac]) 2176aec45a7Smrg 2182b2b4fcbSmrg for depmode in $am_compiler_list; do 2192b2b4fcbSmrg # Setup a source with many dependencies, because some compilers 2202b2b4fcbSmrg # like to wrap large dependency lists on column 80 (with \), and 2212b2b4fcbSmrg # we should not choose a depcomp mode which is confused by this. 2222b2b4fcbSmrg # 2232b2b4fcbSmrg # We need to recreate these files for each test, as the compiler may 2242b2b4fcbSmrg # overwrite some of them when testing with obscure command lines. 2252b2b4fcbSmrg # This happens at least with the AIX C compiler. 2262b2b4fcbSmrg : > sub/conftest.c 2272b2b4fcbSmrg for i in 1 2 3 4 5 6; do 2282b2b4fcbSmrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 2292b2b4fcbSmrg # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 2302b2b4fcbSmrg # Solaris 10 /bin/sh. 2312b2b4fcbSmrg echo '/* dummy */' > sub/conftst$i.h 232300bf1aeSmrg done 2332b2b4fcbSmrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 234300bf1aeSmrg 2352b2b4fcbSmrg # We check with '-c' and '-o' for the sake of the "dashmstdout" 2362b2b4fcbSmrg # mode. It turns out that the SunPro C++ compiler does not properly 2372b2b4fcbSmrg # handle '-M -o', and we need to detect this. Also, some Intel 2382b2b4fcbSmrg # versions had trouble with output in subdirs. 2392b2b4fcbSmrg am__obj=sub/conftest.${OBJEXT-o} 2402b2b4fcbSmrg am__minus_obj="-o $am__obj" 2412b2b4fcbSmrg case $depmode in 2422b2b4fcbSmrg gcc) 2432b2b4fcbSmrg # This depmode causes a compiler race in universal mode. 2442b2b4fcbSmrg test "$am__universal" = false || continue 2452b2b4fcbSmrg ;; 2462b2b4fcbSmrg nosideeffect) 2472b2b4fcbSmrg # After this tag, mechanisms are not by side-effect, so they'll 2482b2b4fcbSmrg # only be used when explicitly requested. 2492b2b4fcbSmrg if test "x$enable_dependency_tracking" = xyes; then 2502b2b4fcbSmrg continue 2512b2b4fcbSmrg else 2522b2b4fcbSmrg break 2532b2b4fcbSmrg fi 2542b2b4fcbSmrg ;; 2552b2b4fcbSmrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 2562b2b4fcbSmrg # This compiler won't grok '-c -o', but also, the minuso test has 2572b2b4fcbSmrg # not run yet. These depmodes are late enough in the game, and 2582b2b4fcbSmrg # so weak that their functioning should not be impacted. 2592b2b4fcbSmrg am__obj=conftest.${OBJEXT-o} 2602b2b4fcbSmrg am__minus_obj= 2612b2b4fcbSmrg ;; 2622b2b4fcbSmrg none) break ;; 2632b2b4fcbSmrg esac 2642b2b4fcbSmrg if depmode=$depmode \ 2652b2b4fcbSmrg source=sub/conftest.c object=$am__obj \ 2662b2b4fcbSmrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 2672b2b4fcbSmrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 2682b2b4fcbSmrg >/dev/null 2>conftest.err && 2692b2b4fcbSmrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 2702b2b4fcbSmrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 2712b2b4fcbSmrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 2722b2b4fcbSmrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 2732b2b4fcbSmrg # icc doesn't choke on unknown options, it will just issue warnings 2742b2b4fcbSmrg # or remarks (even with -Werror). So we grep stderr for any message 2752b2b4fcbSmrg # that says an option was ignored or not supported. 2762b2b4fcbSmrg # When given -MP, icc 7.0 and 7.1 complain thusly: 2772b2b4fcbSmrg # icc: Command line warning: ignoring option '-M'; no argument required 2782b2b4fcbSmrg # The diagnosis changed in icc 8.0: 2792b2b4fcbSmrg # icc: Command line remark: option '-MP' not supported 2802b2b4fcbSmrg if (grep 'ignoring option' conftest.err || 2812b2b4fcbSmrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 2822b2b4fcbSmrg am_cv_$1_dependencies_compiler_type=$depmode 2832b2b4fcbSmrg break 2842b2b4fcbSmrg fi 2852b2b4fcbSmrg fi 2862b2b4fcbSmrg done 287300bf1aeSmrg 2882b2b4fcbSmrg cd .. 2892b2b4fcbSmrg rm -rf conftest.dir 2902b2b4fcbSmrgelse 2912b2b4fcbSmrg am_cv_$1_dependencies_compiler_type=none 2922b2b4fcbSmrgfi 2932b2b4fcbSmrg]) 2942b2b4fcbSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 2952b2b4fcbSmrgAM_CONDITIONAL([am__fastdep$1], [ 2962b2b4fcbSmrg test "x$enable_dependency_tracking" != xno \ 2972b2b4fcbSmrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 2986aec45a7Smrg]) 2996aec45a7Smrg 3006aec45a7Smrg 3012b2b4fcbSmrg# AM_SET_DEPDIR 3022b2b4fcbSmrg# ------------- 3032b2b4fcbSmrg# Choose a directory name for dependency files. 3042b2b4fcbSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 3052b2b4fcbSmrgAC_DEFUN([AM_SET_DEPDIR], 3062b2b4fcbSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 3072b2b4fcbSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 3082b2b4fcbSmrg]) 3095c42550eSmrg 3106aec45a7Smrg 3112b2b4fcbSmrg# AM_DEP_TRACK 3122b2b4fcbSmrg# ------------ 3132b2b4fcbSmrgAC_DEFUN([AM_DEP_TRACK], 3142b2b4fcbSmrg[AC_ARG_ENABLE([dependency-tracking], [dnl 3152b2b4fcbSmrgAS_HELP_STRING( 3162b2b4fcbSmrg [--enable-dependency-tracking], 3172b2b4fcbSmrg [do not reject slow dependency extractors]) 3182b2b4fcbSmrgAS_HELP_STRING( 3192b2b4fcbSmrg [--disable-dependency-tracking], 3202b2b4fcbSmrg [speeds up one-time build])]) 3212b2b4fcbSmrgif test "x$enable_dependency_tracking" != xno; then 3222b2b4fcbSmrg am_depcomp="$ac_aux_dir/depcomp" 3232b2b4fcbSmrg AMDEPBACKSLASH='\' 3242b2b4fcbSmrg am__nodep='_no' 3256aec45a7Smrgfi 3262b2b4fcbSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 3272b2b4fcbSmrgAC_SUBST([AMDEPBACKSLASH])dnl 3282b2b4fcbSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 3292b2b4fcbSmrgAC_SUBST([am__nodep])dnl 3302b2b4fcbSmrg_AM_SUBST_NOTMAKE([am__nodep])dnl 3316aec45a7Smrg]) 3326aec45a7Smrg 3332b2b4fcbSmrg# Generate code to set up dependency tracking. -*- Autoconf -*- 334ab47cfaaSmrg 3352b2b4fcbSmrg# Copyright (C) 1999-2021 Free Software Foundation, Inc. 3362b2b4fcbSmrg# 3372b2b4fcbSmrg# This file is free software; the Free Software Foundation 3382b2b4fcbSmrg# gives unlimited permission to copy and/or distribute it, 3392b2b4fcbSmrg# with or without modifications, as long as this notice is preserved. 340ab47cfaaSmrg 3412b2b4fcbSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 3422b2b4fcbSmrg# ------------------------------ 3432b2b4fcbSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 3442b2b4fcbSmrg[{ 3452b2b4fcbSmrg # Older Autoconf quotes --file arguments for eval, but not when files 3462b2b4fcbSmrg # are listed without --file. Let's play safe and only enable the eval 3472b2b4fcbSmrg # if we detect the quoting. 3482b2b4fcbSmrg # TODO: see whether this extra hack can be removed once we start 3492b2b4fcbSmrg # requiring Autoconf 2.70 or later. 3502b2b4fcbSmrg AS_CASE([$CONFIG_FILES], 3512b2b4fcbSmrg [*\'*], [eval set x "$CONFIG_FILES"], 3522b2b4fcbSmrg [*], [set x $CONFIG_FILES]) 3532b2b4fcbSmrg shift 3542b2b4fcbSmrg # Used to flag and report bootstrapping failures. 3552b2b4fcbSmrg am_rc=0 3562b2b4fcbSmrg for am_mf 3572b2b4fcbSmrg do 3582b2b4fcbSmrg # Strip MF so we end up with the name of the file. 3592b2b4fcbSmrg am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` 3602b2b4fcbSmrg # Check whether this is an Automake generated Makefile which includes 3612b2b4fcbSmrg # dependency-tracking related rules and includes. 3622b2b4fcbSmrg # Grep'ing the whole file directly is not great: AIX grep has a line 3632b2b4fcbSmrg # limit of 2048, but all sed's we know have understand at least 4000. 3642b2b4fcbSmrg sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ 3652b2b4fcbSmrg || continue 3662b2b4fcbSmrg am_dirpart=`AS_DIRNAME(["$am_mf"])` 3672b2b4fcbSmrg am_filepart=`AS_BASENAME(["$am_mf"])` 3682b2b4fcbSmrg AM_RUN_LOG([cd "$am_dirpart" \ 3692b2b4fcbSmrg && sed -e '/# am--include-marker/d' "$am_filepart" \ 3702b2b4fcbSmrg | $MAKE -f - am--depfiles]) || am_rc=$? 3712b2b4fcbSmrg done 3722b2b4fcbSmrg if test $am_rc -ne 0; then 3732b2b4fcbSmrg AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments 3742b2b4fcbSmrg for automatic dependency tracking. If GNU make was not used, consider 3752b2b4fcbSmrg re-running the configure script with MAKE="gmake" (or whatever is 3762b2b4fcbSmrg necessary). You can also try re-running configure with the 3772b2b4fcbSmrg '--disable-dependency-tracking' option to at least be able to build 3782b2b4fcbSmrg the package (albeit without support for automatic dependency tracking).]) 379ab47cfaaSmrg fi 3802b2b4fcbSmrg AS_UNSET([am_dirpart]) 3812b2b4fcbSmrg AS_UNSET([am_filepart]) 3822b2b4fcbSmrg AS_UNSET([am_mf]) 3832b2b4fcbSmrg AS_UNSET([am_rc]) 3842b2b4fcbSmrg rm -f conftest-deps.mk 3852b2b4fcbSmrg} 3862b2b4fcbSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 387ab47cfaaSmrg 388ab47cfaaSmrg 3892b2b4fcbSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS 3902b2b4fcbSmrg# ----------------------------- 3912b2b4fcbSmrg# This macro should only be invoked once -- use via AC_REQUIRE. 3922b2b4fcbSmrg# 3932b2b4fcbSmrg# This code is only required when automatic dependency tracking is enabled. 3942b2b4fcbSmrg# This creates each '.Po' and '.Plo' makefile fragment that we'll need in 3952b2b4fcbSmrg# order to bootstrap the dependency handling code. 3962b2b4fcbSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 3972b2b4fcbSmrg[AC_CONFIG_COMMANDS([depfiles], 3982b2b4fcbSmrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 3992b2b4fcbSmrg [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) 4005c42550eSmrg 4012b2b4fcbSmrg# Do all the work for Automake. -*- Autoconf -*- 402ab47cfaaSmrg 4032b2b4fcbSmrg# Copyright (C) 1996-2021 Free Software Foundation, Inc. 4042b2b4fcbSmrg# 4052b2b4fcbSmrg# This file is free software; the Free Software Foundation 4062b2b4fcbSmrg# gives unlimited permission to copy and/or distribute it, 4072b2b4fcbSmrg# with or without modifications, as long as this notice is preserved. 408ab47cfaaSmrg 4092b2b4fcbSmrg# This macro actually does too much. Some checks are only needed if 4102b2b4fcbSmrg# your package does certain things. But this isn't really a big deal. 411ab47cfaaSmrg 4122b2b4fcbSmrgdnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 4132b2b4fcbSmrgm4_define([AC_PROG_CC], 4142b2b4fcbSmrgm4_defn([AC_PROG_CC]) 4152b2b4fcbSmrg[_AM_PROG_CC_C_O 4162b2b4fcbSmrg]) 417ab47cfaaSmrg 4182b2b4fcbSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 4192b2b4fcbSmrg# AM_INIT_AUTOMAKE([OPTIONS]) 4202b2b4fcbSmrg# ----------------------------------------------- 4212b2b4fcbSmrg# The call with PACKAGE and VERSION arguments is the old style 4222b2b4fcbSmrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 4232b2b4fcbSmrg# and VERSION should now be passed to AC_INIT and removed from 4242b2b4fcbSmrg# the call to AM_INIT_AUTOMAKE. 4252b2b4fcbSmrg# We support both call styles for the transition. After 4262b2b4fcbSmrg# the next Automake release, Autoconf can make the AC_INIT 4272b2b4fcbSmrg# arguments mandatory, and then we can depend on a new Autoconf 4282b2b4fcbSmrg# release and drop the old call support. 4292b2b4fcbSmrgAC_DEFUN([AM_INIT_AUTOMAKE], 4302b2b4fcbSmrg[AC_PREREQ([2.65])dnl 4312b2b4fcbSmrgm4_ifdef([_$0_ALREADY_INIT], 4322b2b4fcbSmrg [m4_fatal([$0 expanded multiple times 4332b2b4fcbSmrg]m4_defn([_$0_ALREADY_INIT]))], 4342b2b4fcbSmrg [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl 4352b2b4fcbSmrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 4362b2b4fcbSmrgdnl the ones we care about. 4372b2b4fcbSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 4382b2b4fcbSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 4392b2b4fcbSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 4402b2b4fcbSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 4412b2b4fcbSmrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 4422b2b4fcbSmrg # is not polluted with repeated "-I." 4432b2b4fcbSmrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 4442b2b4fcbSmrg # test to see if srcdir already configured 4452b2b4fcbSmrg if test -f $srcdir/config.status; then 4462b2b4fcbSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 4472b2b4fcbSmrg fi 4482b2b4fcbSmrgfi 4491473d951Smrg 4502b2b4fcbSmrg# test whether we have cygpath 4512b2b4fcbSmrgif test -z "$CYGPATH_W"; then 4522b2b4fcbSmrg if (cygpath --version) >/dev/null 2>/dev/null; then 4532b2b4fcbSmrg CYGPATH_W='cygpath -w' 4542b2b4fcbSmrg else 4552b2b4fcbSmrg CYGPATH_W=echo 4562b2b4fcbSmrg fi 4572b2b4fcbSmrgfi 4582b2b4fcbSmrgAC_SUBST([CYGPATH_W]) 4591473d951Smrg 4602b2b4fcbSmrg# Define the identity of the package. 4612b2b4fcbSmrgdnl Distinguish between old-style and new-style calls. 4622b2b4fcbSmrgm4_ifval([$2], 4632b2b4fcbSmrg[AC_DIAGNOSE([obsolete], 4642b2b4fcbSmrg [$0: two- and three-arguments forms are deprecated.]) 4652b2b4fcbSmrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 4662b2b4fcbSmrg AC_SUBST([PACKAGE], [$1])dnl 4672b2b4fcbSmrg AC_SUBST([VERSION], [$2])], 4682b2b4fcbSmrg[_AM_SET_OPTIONS([$1])dnl 4692b2b4fcbSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 4702b2b4fcbSmrgm4_if( 4712b2b4fcbSmrg m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]), 4722b2b4fcbSmrg [ok:ok],, 4732b2b4fcbSmrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 4742b2b4fcbSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 4752b2b4fcbSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 4761473d951Smrg 4772b2b4fcbSmrg_AM_IF_OPTION([no-define],, 4782b2b4fcbSmrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 4792b2b4fcbSmrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 4801473d951Smrg 4812b2b4fcbSmrg# Some tools Automake needs. 4822b2b4fcbSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 4832b2b4fcbSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 4842b2b4fcbSmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 4852b2b4fcbSmrgAM_MISSING_PROG([AUTOCONF], [autoconf]) 4862b2b4fcbSmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 4872b2b4fcbSmrgAM_MISSING_PROG([AUTOHEADER], [autoheader]) 4882b2b4fcbSmrgAM_MISSING_PROG([MAKEINFO], [makeinfo]) 4892b2b4fcbSmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 4902b2b4fcbSmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 4912b2b4fcbSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 4922b2b4fcbSmrg# For better backward compatibility. To be removed once Automake 1.9.x 4932b2b4fcbSmrg# dies out for good. For more background, see: 4942b2b4fcbSmrg# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 4952b2b4fcbSmrg# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 4962b2b4fcbSmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 4972b2b4fcbSmrg# We need awk for the "check" target (and possibly the TAP driver). The 4982b2b4fcbSmrg# system "awk" is bad on some platforms. 4992b2b4fcbSmrgAC_REQUIRE([AC_PROG_AWK])dnl 5002b2b4fcbSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 5012b2b4fcbSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 5022b2b4fcbSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 5032b2b4fcbSmrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 5042b2b4fcbSmrg [_AM_PROG_TAR([v7])])]) 5052b2b4fcbSmrg_AM_IF_OPTION([no-dependencies],, 5062b2b4fcbSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 5072b2b4fcbSmrg [_AM_DEPENDENCIES([CC])], 5082b2b4fcbSmrg [m4_define([AC_PROG_CC], 5092b2b4fcbSmrg m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 5102b2b4fcbSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 5112b2b4fcbSmrg [_AM_DEPENDENCIES([CXX])], 5122b2b4fcbSmrg [m4_define([AC_PROG_CXX], 5132b2b4fcbSmrg m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 5142b2b4fcbSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 5152b2b4fcbSmrg [_AM_DEPENDENCIES([OBJC])], 5162b2b4fcbSmrg [m4_define([AC_PROG_OBJC], 5172b2b4fcbSmrg m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 5182b2b4fcbSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 5192b2b4fcbSmrg [_AM_DEPENDENCIES([OBJCXX])], 5202b2b4fcbSmrg [m4_define([AC_PROG_OBJCXX], 5212b2b4fcbSmrg m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 5226aec45a7Smrg]) 5232b2b4fcbSmrg# Variables for tags utilities; see am/tags.am 5242b2b4fcbSmrgif test -z "$CTAGS"; then 5252b2b4fcbSmrg CTAGS=ctags 5262b2b4fcbSmrgfi 5272b2b4fcbSmrgAC_SUBST([CTAGS]) 5282b2b4fcbSmrgif test -z "$ETAGS"; then 5292b2b4fcbSmrg ETAGS=etags 5302b2b4fcbSmrgfi 5312b2b4fcbSmrgAC_SUBST([ETAGS]) 5322b2b4fcbSmrgif test -z "$CSCOPE"; then 5332b2b4fcbSmrg CSCOPE=cscope 5342b2b4fcbSmrgfi 5352b2b4fcbSmrgAC_SUBST([CSCOPE]) 536ab47cfaaSmrg 5372b2b4fcbSmrgAC_REQUIRE([AM_SILENT_RULES])dnl 5382b2b4fcbSmrgdnl The testsuite driver may need to know about EXEEXT, so add the 5392b2b4fcbSmrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 5402b2b4fcbSmrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 5412b2b4fcbSmrgAC_CONFIG_COMMANDS_PRE(dnl 5422b2b4fcbSmrg[m4_provide_if([_AM_COMPILER_EXEEXT], 5432b2b4fcbSmrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 544ab47cfaaSmrg 5452b2b4fcbSmrg# POSIX will say in a future version that running "rm -f" with no argument 5462b2b4fcbSmrg# is OK; and we want to be able to make that assumption in our Makefile 5472b2b4fcbSmrg# recipes. So use an aggressive probe to check that the usage we want is 5482b2b4fcbSmrg# actually supported "in the wild" to an acceptable degree. 5492b2b4fcbSmrg# See automake bug#10828. 5502b2b4fcbSmrg# To make any issue more visible, cause the running configure to be aborted 5512b2b4fcbSmrg# by default if the 'rm' program in use doesn't match our expectations; the 5522b2b4fcbSmrg# user can still override this though. 5532b2b4fcbSmrgif rm -f && rm -fr && rm -rf; then : OK; else 5542b2b4fcbSmrg cat >&2 <<'END' 5552b2b4fcbSmrgOops! 556ab47cfaaSmrg 5572b2b4fcbSmrgYour 'rm' program seems unable to run without file operands specified 5582b2b4fcbSmrgon the command line, even when the '-f' option is present. This is contrary 5592b2b4fcbSmrgto the behaviour of most rm programs out there, and not conforming with 5602b2b4fcbSmrgthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 561ab47cfaaSmrg 5622b2b4fcbSmrgPlease tell bug-automake@gnu.org about your system, including the value 5632b2b4fcbSmrgof your $PATH and any error possibly output before this message. This 5642b2b4fcbSmrgcan help us improve future automake versions. 565ab47cfaaSmrg 5662b2b4fcbSmrgEND 5672b2b4fcbSmrg if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 5682b2b4fcbSmrg echo 'Configuration will proceed anyway, since you have set the' >&2 5692b2b4fcbSmrg echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 5702b2b4fcbSmrg echo >&2 5712b2b4fcbSmrg else 5722b2b4fcbSmrg cat >&2 <<'END' 5732b2b4fcbSmrgAborting the configuration process, to ensure you take notice of the issue. 5746aec45a7Smrg 5752b2b4fcbSmrgYou can download and install GNU coreutils to get an 'rm' implementation 5762b2b4fcbSmrgthat behaves properly: <https://www.gnu.org/software/coreutils/>. 5776aec45a7Smrg 5782b2b4fcbSmrgIf you want to complete the configuration process using your problematic 5792b2b4fcbSmrg'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 5802b2b4fcbSmrgto "yes", and re-run configure. 5816aec45a7Smrg 5822b2b4fcbSmrgEND 5832b2b4fcbSmrg AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 5842b2b4fcbSmrg fi 5852b2b4fcbSmrgfi 5862b2b4fcbSmrgdnl The trailing newline in this macro's definition is deliberate, for 5872b2b4fcbSmrgdnl backward compatibility and to allow trailing 'dnl'-style comments 5882b2b4fcbSmrgdnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. 5896aec45a7Smrg]) 590ab47cfaaSmrg 5912b2b4fcbSmrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 5922b2b4fcbSmrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 5932b2b4fcbSmrgdnl mangled by Autoconf and run in a shell conditional statement. 5942b2b4fcbSmrgm4_define([_AC_COMPILER_EXEEXT], 5952b2b4fcbSmrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 5961473d951Smrg 5972b2b4fcbSmrg# When config.status generates a header, we must update the stamp-h file. 5982b2b4fcbSmrg# This file resides in the same directory as the config header 5992b2b4fcbSmrg# that is generated. The stamp files are numbered to have different names. 6006aec45a7Smrg 6012b2b4fcbSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 6022b2b4fcbSmrg# loop where config.status creates the headers, so we can generate 6032b2b4fcbSmrg# our stamp files there. 6042b2b4fcbSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 6052b2b4fcbSmrg[# Compute $1's index in $config_headers. 6062b2b4fcbSmrg_am_arg=$1 6072b2b4fcbSmrg_am_stamp_count=1 6082b2b4fcbSmrgfor _am_header in $config_headers :; do 6092b2b4fcbSmrg case $_am_header in 6102b2b4fcbSmrg $_am_arg | $_am_arg:* ) 6112b2b4fcbSmrg break ;; 6122b2b4fcbSmrg * ) 6132b2b4fcbSmrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 6142b2b4fcbSmrg esac 6152b2b4fcbSmrgdone 6162b2b4fcbSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 6176aec45a7Smrg 6182b2b4fcbSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 6192b2b4fcbSmrg# 6202b2b4fcbSmrg# This file is free software; the Free Software Foundation 6212b2b4fcbSmrg# gives unlimited permission to copy and/or distribute it, 6222b2b4fcbSmrg# with or without modifications, as long as this notice is preserved. 6236aec45a7Smrg 6242b2b4fcbSmrg# AM_PROG_INSTALL_SH 6252b2b4fcbSmrg# ------------------ 6262b2b4fcbSmrg# Define $install_sh. 6272b2b4fcbSmrgAC_DEFUN([AM_PROG_INSTALL_SH], 6282b2b4fcbSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 6292b2b4fcbSmrgif test x"${install_sh+set}" != xset; then 6302b2b4fcbSmrg case $am_aux_dir in 6312b2b4fcbSmrg *\ * | *\ *) 6322b2b4fcbSmrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 6332b2b4fcbSmrg *) 6342b2b4fcbSmrg install_sh="\${SHELL} $am_aux_dir/install-sh" 6352b2b4fcbSmrg esac 6362b2b4fcbSmrgfi 6372b2b4fcbSmrgAC_SUBST([install_sh])]) 6381473d951Smrg 6392b2b4fcbSmrg# Copyright (C) 2003-2021 Free Software Foundation, Inc. 6402b2b4fcbSmrg# 6412b2b4fcbSmrg# This file is free software; the Free Software Foundation 6422b2b4fcbSmrg# gives unlimited permission to copy and/or distribute it, 6432b2b4fcbSmrg# with or without modifications, as long as this notice is preserved. 644ab47cfaaSmrg 6452b2b4fcbSmrg# Check whether the underlying file-system supports filenames 6462b2b4fcbSmrg# with a leading dot. For instance MS-DOS doesn't. 6472b2b4fcbSmrgAC_DEFUN([AM_SET_LEADING_DOT], 6482b2b4fcbSmrg[rm -rf .tst 2>/dev/null 6492b2b4fcbSmrgmkdir .tst 2>/dev/null 6502b2b4fcbSmrgif test -d .tst; then 6512b2b4fcbSmrg am__leading_dot=. 6522b2b4fcbSmrgelse 6532b2b4fcbSmrg am__leading_dot=_ 6542b2b4fcbSmrgfi 6552b2b4fcbSmrgrmdir .tst 2>/dev/null 6562b2b4fcbSmrgAC_SUBST([am__leading_dot])]) 657ab47cfaaSmrg 6582b2b4fcbSmrg# Check to see how 'make' treats includes. -*- Autoconf -*- 659ab47cfaaSmrg 6602b2b4fcbSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 6612b2b4fcbSmrg# 6622b2b4fcbSmrg# This file is free software; the Free Software Foundation 6632b2b4fcbSmrg# gives unlimited permission to copy and/or distribute it, 6642b2b4fcbSmrg# with or without modifications, as long as this notice is preserved. 665ab47cfaaSmrg 6662b2b4fcbSmrg# AM_MAKE_INCLUDE() 6672b2b4fcbSmrg# ----------------- 6682b2b4fcbSmrg# Check whether make has an 'include' directive that can support all 6692b2b4fcbSmrg# the idioms we need for our automatic dependency tracking code. 6702b2b4fcbSmrgAC_DEFUN([AM_MAKE_INCLUDE], 6712b2b4fcbSmrg[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) 6722b2b4fcbSmrgcat > confinc.mk << 'END' 6732b2b4fcbSmrgam__doit: 6742b2b4fcbSmrg @echo this is the am__doit target >confinc.out 6752b2b4fcbSmrg.PHONY: am__doit 6762b2b4fcbSmrgEND 6772b2b4fcbSmrgam__include="#" 6782b2b4fcbSmrgam__quote= 6792b2b4fcbSmrg# BSD make does it like this. 6802b2b4fcbSmrgecho '.include "confinc.mk" # ignored' > confmf.BSD 6812b2b4fcbSmrg# Other make implementations (GNU, Solaris 10, AIX) do it like this. 6822b2b4fcbSmrgecho 'include confinc.mk # ignored' > confmf.GNU 6832b2b4fcbSmrg_am_result=no 6842b2b4fcbSmrgfor s in GNU BSD; do 6852b2b4fcbSmrg AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) 6862b2b4fcbSmrg AS_CASE([$?:`cat confinc.out 2>/dev/null`], 6872b2b4fcbSmrg ['0:this is the am__doit target'], 6882b2b4fcbSmrg [AS_CASE([$s], 6892b2b4fcbSmrg [BSD], [am__include='.include' am__quote='"'], 6902b2b4fcbSmrg [am__include='include' am__quote=''])]) 6912b2b4fcbSmrg if test "$am__include" != "#"; then 6922b2b4fcbSmrg _am_result="yes ($s style)" 6932b2b4fcbSmrg break 6942b2b4fcbSmrg fi 6952b2b4fcbSmrgdone 6962b2b4fcbSmrgrm -f confinc.* confmf.* 6972b2b4fcbSmrgAC_MSG_RESULT([${_am_result}]) 6982b2b4fcbSmrgAC_SUBST([am__include])]) 6992b2b4fcbSmrgAC_SUBST([am__quote])]) 700ab47cfaaSmrg 7012b2b4fcbSmrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 702ab47cfaaSmrg 7032b2b4fcbSmrg# Copyright (C) 1997-2021 Free Software Foundation, Inc. 7042b2b4fcbSmrg# 7052b2b4fcbSmrg# This file is free software; the Free Software Foundation 7062b2b4fcbSmrg# gives unlimited permission to copy and/or distribute it, 7072b2b4fcbSmrg# with or without modifications, as long as this notice is preserved. 708ab47cfaaSmrg 7092b2b4fcbSmrg# AM_MISSING_PROG(NAME, PROGRAM) 7102b2b4fcbSmrg# ------------------------------ 7112b2b4fcbSmrgAC_DEFUN([AM_MISSING_PROG], 7122b2b4fcbSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 7132b2b4fcbSmrg$1=${$1-"${am_missing_run}$2"} 7142b2b4fcbSmrgAC_SUBST($1)]) 7152b2b4fcbSmrg 7162b2b4fcbSmrg# AM_MISSING_HAS_RUN 7172b2b4fcbSmrg# ------------------ 7182b2b4fcbSmrg# Define MISSING if not defined so far and test if it is modern enough. 7192b2b4fcbSmrg# If it is, set am_missing_run to use it, otherwise, to nothing. 7202b2b4fcbSmrgAC_DEFUN([AM_MISSING_HAS_RUN], 7212b2b4fcbSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 7222b2b4fcbSmrgAC_REQUIRE_AUX_FILE([missing])dnl 7232b2b4fcbSmrgif test x"${MISSING+set}" != xset; then 7242b2b4fcbSmrg MISSING="\${SHELL} '$am_aux_dir/missing'" 7252b2b4fcbSmrgfi 7262b2b4fcbSmrg# Use eval to expand $SHELL 7272b2b4fcbSmrgif eval "$MISSING --is-lightweight"; then 7282b2b4fcbSmrg am_missing_run="$MISSING " 7292b2b4fcbSmrgelse 7302b2b4fcbSmrg am_missing_run= 7312b2b4fcbSmrg AC_MSG_WARN(['missing' script is too old or missing]) 7322b2b4fcbSmrgfi 7332b2b4fcbSmrg]) 734ab47cfaaSmrg 7352b2b4fcbSmrg# Helper functions for option handling. -*- Autoconf -*- 736ab47cfaaSmrg 7372b2b4fcbSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 7382b2b4fcbSmrg# 7392b2b4fcbSmrg# This file is free software; the Free Software Foundation 7402b2b4fcbSmrg# gives unlimited permission to copy and/or distribute it, 7412b2b4fcbSmrg# with or without modifications, as long as this notice is preserved. 742ab47cfaaSmrg 7432b2b4fcbSmrg# _AM_MANGLE_OPTION(NAME) 7442b2b4fcbSmrg# ----------------------- 7452b2b4fcbSmrgAC_DEFUN([_AM_MANGLE_OPTION], 7462b2b4fcbSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 747ab47cfaaSmrg 7482b2b4fcbSmrg# _AM_SET_OPTION(NAME) 7492b2b4fcbSmrg# -------------------- 7502b2b4fcbSmrg# Set option NAME. Presently that only means defining a flag for this option. 7512b2b4fcbSmrgAC_DEFUN([_AM_SET_OPTION], 7522b2b4fcbSmrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 753ab47cfaaSmrg 7542b2b4fcbSmrg# _AM_SET_OPTIONS(OPTIONS) 7552b2b4fcbSmrg# ------------------------ 7562b2b4fcbSmrg# OPTIONS is a space-separated list of Automake options. 7572b2b4fcbSmrgAC_DEFUN([_AM_SET_OPTIONS], 7582b2b4fcbSmrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 7595c42550eSmrg 7602b2b4fcbSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 7612b2b4fcbSmrg# ------------------------------------------- 7622b2b4fcbSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 7632b2b4fcbSmrgAC_DEFUN([_AM_IF_OPTION], 7642b2b4fcbSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 765ab47cfaaSmrg 7662b2b4fcbSmrg# Copyright (C) 1999-2021 Free Software Foundation, Inc. 7672b2b4fcbSmrg# 7682b2b4fcbSmrg# This file is free software; the Free Software Foundation 7692b2b4fcbSmrg# gives unlimited permission to copy and/or distribute it, 7702b2b4fcbSmrg# with or without modifications, as long as this notice is preserved. 771ab47cfaaSmrg 7722b2b4fcbSmrg# _AM_PROG_CC_C_O 7732b2b4fcbSmrg# --------------- 7742b2b4fcbSmrg# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 7752b2b4fcbSmrg# to automatically call this. 7762b2b4fcbSmrgAC_DEFUN([_AM_PROG_CC_C_O], 7772b2b4fcbSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 7782b2b4fcbSmrgAC_REQUIRE_AUX_FILE([compile])dnl 7792b2b4fcbSmrgAC_LANG_PUSH([C])dnl 7802b2b4fcbSmrgAC_CACHE_CHECK( 7812b2b4fcbSmrg [whether $CC understands -c and -o together], 7822b2b4fcbSmrg [am_cv_prog_cc_c_o], 7832b2b4fcbSmrg [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 7842b2b4fcbSmrg # Make sure it works both with $CC and with simple cc. 7852b2b4fcbSmrg # Following AC_PROG_CC_C_O, we do the test twice because some 7862b2b4fcbSmrg # compilers refuse to overwrite an existing .o file with -o, 7872b2b4fcbSmrg # though they will create one. 7882b2b4fcbSmrg am_cv_prog_cc_c_o=yes 7892b2b4fcbSmrg for am_i in 1 2; do 7902b2b4fcbSmrg if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 7912b2b4fcbSmrg && test -f conftest2.$ac_objext; then 7922b2b4fcbSmrg : OK 7932b2b4fcbSmrg else 7942b2b4fcbSmrg am_cv_prog_cc_c_o=no 7952b2b4fcbSmrg break 7962b2b4fcbSmrg fi 7972b2b4fcbSmrg done 7982b2b4fcbSmrg rm -f core conftest* 7992b2b4fcbSmrg unset am_i]) 8002b2b4fcbSmrgif test "$am_cv_prog_cc_c_o" != yes; then 8012b2b4fcbSmrg # Losing compiler, so override with the script. 8022b2b4fcbSmrg # FIXME: It is wrong to rewrite CC. 8032b2b4fcbSmrg # But if we don't then we get into trouble of one sort or another. 8042b2b4fcbSmrg # A longer-term fix would be to have automake use am__CC in this case, 8052b2b4fcbSmrg # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 8062b2b4fcbSmrg CC="$am_aux_dir/compile $CC" 8072b2b4fcbSmrgfi 8082b2b4fcbSmrgAC_LANG_POP([C])]) 809ab47cfaaSmrg 8102b2b4fcbSmrg# For backward compatibility. 8112b2b4fcbSmrgAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 812ab47cfaaSmrg 8132b2b4fcbSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 8146aec45a7Smrg# 8152b2b4fcbSmrg# This file is free software; the Free Software Foundation 8162b2b4fcbSmrg# gives unlimited permission to copy and/or distribute it, 8172b2b4fcbSmrg# with or without modifications, as long as this notice is preserved. 8186aec45a7Smrg 8192b2b4fcbSmrg# AM_RUN_LOG(COMMAND) 8202b2b4fcbSmrg# ------------------- 8212b2b4fcbSmrg# Run COMMAND, save the exit status in ac_status, and log it. 8222b2b4fcbSmrg# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 8232b2b4fcbSmrgAC_DEFUN([AM_RUN_LOG], 8242b2b4fcbSmrg[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 8252b2b4fcbSmrg ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 8262b2b4fcbSmrg ac_status=$? 8272b2b4fcbSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 8282b2b4fcbSmrg (exit $ac_status); }]) 8296aec45a7Smrg 8302b2b4fcbSmrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 8316aec45a7Smrg 8322b2b4fcbSmrg# Copyright (C) 1996-2021 Free Software Foundation, Inc. 8336aec45a7Smrg# 8342b2b4fcbSmrg# This file is free software; the Free Software Foundation 8352b2b4fcbSmrg# gives unlimited permission to copy and/or distribute it, 8362b2b4fcbSmrg# with or without modifications, as long as this notice is preserved. 8376aec45a7Smrg 8382b2b4fcbSmrg# AM_SANITY_CHECK 8392b2b4fcbSmrg# --------------- 8402b2b4fcbSmrgAC_DEFUN([AM_SANITY_CHECK], 8412b2b4fcbSmrg[AC_MSG_CHECKING([whether build environment is sane]) 8422b2b4fcbSmrg# Reject unsafe characters in $srcdir or the absolute working directory 8432b2b4fcbSmrg# name. Accept space and tab only in the latter. 8442b2b4fcbSmrgam_lf=' 8452b2b4fcbSmrg' 8462b2b4fcbSmrgcase `pwd` in 8472b2b4fcbSmrg *[[\\\"\#\$\&\'\`$am_lf]]*) 8482b2b4fcbSmrg AC_MSG_ERROR([unsafe absolute working directory name]);; 8492b2b4fcbSmrgesac 8502b2b4fcbSmrgcase $srcdir in 8512b2b4fcbSmrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 8522b2b4fcbSmrg AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 8532b2b4fcbSmrgesac 8546aec45a7Smrg 8552b2b4fcbSmrg# Do 'set' in a subshell so we don't clobber the current shell's 8562b2b4fcbSmrg# arguments. Must try -L first in case configure is actually a 8572b2b4fcbSmrg# symlink; some systems play weird games with the mod time of symlinks 8582b2b4fcbSmrg# (eg FreeBSD returns the mod time of the symlink's containing 8592b2b4fcbSmrg# directory). 8602b2b4fcbSmrgif ( 8612b2b4fcbSmrg am_has_slept=no 8622b2b4fcbSmrg for am_try in 1 2; do 8632b2b4fcbSmrg echo "timestamp, slept: $am_has_slept" > conftest.file 8642b2b4fcbSmrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 8652b2b4fcbSmrg if test "$[*]" = "X"; then 8662b2b4fcbSmrg # -L didn't work. 8672b2b4fcbSmrg set X `ls -t "$srcdir/configure" conftest.file` 8682b2b4fcbSmrg fi 8692b2b4fcbSmrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 8702b2b4fcbSmrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 8716aec45a7Smrg 8722b2b4fcbSmrg # If neither matched, then we have a broken ls. This can happen 8732b2b4fcbSmrg # if, for instance, CONFIG_SHELL is bash and it inherits a 8742b2b4fcbSmrg # broken ls alias from the environment. This has actually 8752b2b4fcbSmrg # happened. Such a system could not be considered "sane". 8762b2b4fcbSmrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 8772b2b4fcbSmrg alias in your environment]) 8782b2b4fcbSmrg fi 8792b2b4fcbSmrg if test "$[2]" = conftest.file || test $am_try -eq 2; then 8802b2b4fcbSmrg break 8812b2b4fcbSmrg fi 8822b2b4fcbSmrg # Just in case. 8832b2b4fcbSmrg sleep 1 8842b2b4fcbSmrg am_has_slept=yes 8852b2b4fcbSmrg done 8862b2b4fcbSmrg test "$[2]" = conftest.file 8872b2b4fcbSmrg ) 8882b2b4fcbSmrgthen 8892b2b4fcbSmrg # Ok. 8902b2b4fcbSmrg : 8912b2b4fcbSmrgelse 8922b2b4fcbSmrg AC_MSG_ERROR([newly created file is older than distributed files! 8932b2b4fcbSmrgCheck your system clock]) 8942b2b4fcbSmrgfi 8952b2b4fcbSmrgAC_MSG_RESULT([yes]) 8962b2b4fcbSmrg# If we didn't sleep, we still need to ensure time stamps of config.status and 8972b2b4fcbSmrg# generated files are strictly newer. 8982b2b4fcbSmrgam_sleep_pid= 8992b2b4fcbSmrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then 9002b2b4fcbSmrg ( sleep 1 ) & 9012b2b4fcbSmrg am_sleep_pid=$! 9022b2b4fcbSmrgfi 9032b2b4fcbSmrgAC_CONFIG_COMMANDS_PRE( 9042b2b4fcbSmrg [AC_MSG_CHECKING([that generated files are newer than configure]) 9052b2b4fcbSmrg if test -n "$am_sleep_pid"; then 9062b2b4fcbSmrg # Hide warnings about reused PIDs. 9072b2b4fcbSmrg wait $am_sleep_pid 2>/dev/null 9082b2b4fcbSmrg fi 9092b2b4fcbSmrg AC_MSG_RESULT([done])]) 9102b2b4fcbSmrgrm -f conftest.file 9112b2b4fcbSmrg]) 9126aec45a7Smrg 9132b2b4fcbSmrg# Copyright (C) 2009-2021 Free Software Foundation, Inc. 9142b2b4fcbSmrg# 9152b2b4fcbSmrg# This file is free software; the Free Software Foundation 9162b2b4fcbSmrg# gives unlimited permission to copy and/or distribute it, 9172b2b4fcbSmrg# with or without modifications, as long as this notice is preserved. 9186aec45a7Smrg 9192b2b4fcbSmrg# AM_SILENT_RULES([DEFAULT]) 9202b2b4fcbSmrg# -------------------------- 9212b2b4fcbSmrg# Enable less verbose build rules; with the default set to DEFAULT 9222b2b4fcbSmrg# ("yes" being less verbose, "no" or empty being verbose). 9232b2b4fcbSmrgAC_DEFUN([AM_SILENT_RULES], 9242b2b4fcbSmrg[AC_ARG_ENABLE([silent-rules], [dnl 9252b2b4fcbSmrgAS_HELP_STRING( 9262b2b4fcbSmrg [--enable-silent-rules], 9272b2b4fcbSmrg [less verbose build output (undo: "make V=1")]) 9282b2b4fcbSmrgAS_HELP_STRING( 9292b2b4fcbSmrg [--disable-silent-rules], 9302b2b4fcbSmrg [verbose build output (undo: "make V=0")])dnl 9312b2b4fcbSmrg]) 9322b2b4fcbSmrgcase $enable_silent_rules in @%:@ ((( 9332b2b4fcbSmrg yes) AM_DEFAULT_VERBOSITY=0;; 9342b2b4fcbSmrg no) AM_DEFAULT_VERBOSITY=1;; 9352b2b4fcbSmrg *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 9362b2b4fcbSmrgesac 9372b2b4fcbSmrgdnl 9382b2b4fcbSmrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 9392b2b4fcbSmrgdnl do not support nested variable expansions. 9402b2b4fcbSmrgdnl See automake bug#9928 and bug#10237. 9412b2b4fcbSmrgam_make=${MAKE-make} 9422b2b4fcbSmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 9432b2b4fcbSmrg [am_cv_make_support_nested_variables], 9442b2b4fcbSmrg [if AS_ECHO([['TRUE=$(BAR$(V)) 9452b2b4fcbSmrgBAR0=false 9462b2b4fcbSmrgBAR1=true 9472b2b4fcbSmrgV=1 9482b2b4fcbSmrgam__doit: 9492b2b4fcbSmrg @$(TRUE) 9502b2b4fcbSmrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 9512b2b4fcbSmrg am_cv_make_support_nested_variables=yes 9522b2b4fcbSmrgelse 9532b2b4fcbSmrg am_cv_make_support_nested_variables=no 9542b2b4fcbSmrgfi]) 9552b2b4fcbSmrgif test $am_cv_make_support_nested_variables = yes; then 9562b2b4fcbSmrg dnl Using '$V' instead of '$(V)' breaks IRIX make. 9572b2b4fcbSmrg AM_V='$(V)' 9582b2b4fcbSmrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 9592b2b4fcbSmrgelse 9602b2b4fcbSmrg AM_V=$AM_DEFAULT_VERBOSITY 9612b2b4fcbSmrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 9622b2b4fcbSmrgfi 9632b2b4fcbSmrgAC_SUBST([AM_V])dnl 9642b2b4fcbSmrgAM_SUBST_NOTMAKE([AM_V])dnl 9652b2b4fcbSmrgAC_SUBST([AM_DEFAULT_V])dnl 9662b2b4fcbSmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 9672b2b4fcbSmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 9682b2b4fcbSmrgAM_BACKSLASH='\' 9692b2b4fcbSmrgAC_SUBST([AM_BACKSLASH])dnl 9702b2b4fcbSmrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 9712b2b4fcbSmrg]) 9726aec45a7Smrg 9732b2b4fcbSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 9742b2b4fcbSmrg# 9752b2b4fcbSmrg# This file is free software; the Free Software Foundation 9762b2b4fcbSmrg# gives unlimited permission to copy and/or distribute it, 9772b2b4fcbSmrg# with or without modifications, as long as this notice is preserved. 9786aec45a7Smrg 9792b2b4fcbSmrg# AM_PROG_INSTALL_STRIP 9802b2b4fcbSmrg# --------------------- 9812b2b4fcbSmrg# One issue with vendor 'install' (even GNU) is that you can't 9822b2b4fcbSmrg# specify the program used to strip binaries. This is especially 9832b2b4fcbSmrg# annoying in cross-compiling environments, where the build's strip 9842b2b4fcbSmrg# is unlikely to handle the host's binaries. 9852b2b4fcbSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we 9862b2b4fcbSmrg# always use install-sh in "make install-strip", and initialize 9872b2b4fcbSmrg# STRIPPROG with the value of the STRIP variable (set by the user). 9882b2b4fcbSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 9892b2b4fcbSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 9902b2b4fcbSmrg# Installed binaries are usually stripped using 'strip' when the user 9912b2b4fcbSmrg# run "make install-strip". However 'strip' might not be the right 9922b2b4fcbSmrg# tool to use in cross-compilation environments, therefore Automake 9932b2b4fcbSmrg# will honor the 'STRIP' environment variable to overrule this program. 9942b2b4fcbSmrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 9952b2b4fcbSmrgif test "$cross_compiling" != no; then 9962b2b4fcbSmrg AC_CHECK_TOOL([STRIP], [strip], :) 9972b2b4fcbSmrgfi 9982b2b4fcbSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 9992b2b4fcbSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 10006aec45a7Smrg 10012b2b4fcbSmrg# Copyright (C) 2006-2021 Free Software Foundation, Inc. 10022b2b4fcbSmrg# 10032b2b4fcbSmrg# This file is free software; the Free Software Foundation 10042b2b4fcbSmrg# gives unlimited permission to copy and/or distribute it, 10052b2b4fcbSmrg# with or without modifications, as long as this notice is preserved. 10066aec45a7Smrg 10072b2b4fcbSmrg# _AM_SUBST_NOTMAKE(VARIABLE) 10082b2b4fcbSmrg# --------------------------- 10092b2b4fcbSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 10102b2b4fcbSmrg# This macro is traced by Automake. 10112b2b4fcbSmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 10126aec45a7Smrg 10132b2b4fcbSmrg# AM_SUBST_NOTMAKE(VARIABLE) 10142b2b4fcbSmrg# -------------------------- 10152b2b4fcbSmrg# Public sister of _AM_SUBST_NOTMAKE. 10162b2b4fcbSmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 10176aec45a7Smrg 10182b2b4fcbSmrg# Check how to create a tarball. -*- Autoconf -*- 10196aec45a7Smrg 10202b2b4fcbSmrg# Copyright (C) 2004-2021 Free Software Foundation, Inc. 10212b2b4fcbSmrg# 10222b2b4fcbSmrg# This file is free software; the Free Software Foundation 10232b2b4fcbSmrg# gives unlimited permission to copy and/or distribute it, 10242b2b4fcbSmrg# with or without modifications, as long as this notice is preserved. 1025ab47cfaaSmrg 10262b2b4fcbSmrg# _AM_PROG_TAR(FORMAT) 10272b2b4fcbSmrg# -------------------- 10282b2b4fcbSmrg# Check how to create a tarball in format FORMAT. 10292b2b4fcbSmrg# FORMAT should be one of 'v7', 'ustar', or 'pax'. 10302b2b4fcbSmrg# 10312b2b4fcbSmrg# Substitute a variable $(am__tar) that is a command 10322b2b4fcbSmrg# writing to stdout a FORMAT-tarball containing the directory 10332b2b4fcbSmrg# $tardir. 10342b2b4fcbSmrg# tardir=directory && $(am__tar) > result.tar 10352b2b4fcbSmrg# 10362b2b4fcbSmrg# Substitute a variable $(am__untar) that extract such 10372b2b4fcbSmrg# a tarball read from stdin. 10382b2b4fcbSmrg# $(am__untar) < result.tar 10392b2b4fcbSmrg# 10402b2b4fcbSmrgAC_DEFUN([_AM_PROG_TAR], 10412b2b4fcbSmrg[# Always define AMTAR for backward compatibility. Yes, it's still used 10422b2b4fcbSmrg# in the wild :-( We should find a proper way to deprecate it ... 10432b2b4fcbSmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 10445c42550eSmrg 10452b2b4fcbSmrg# We'll loop over all known methods to create a tar archive until one works. 10462b2b4fcbSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 10476aec45a7Smrg 10482b2b4fcbSmrgm4_if([$1], [v7], 10492b2b4fcbSmrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 10506aec45a7Smrg 10512b2b4fcbSmrg [m4_case([$1], 10522b2b4fcbSmrg [ustar], 10532b2b4fcbSmrg [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 10542b2b4fcbSmrg # There is notably a 21 bits limit for the UID and the GID. In fact, 10552b2b4fcbSmrg # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 10562b2b4fcbSmrg # and bug#13588). 10572b2b4fcbSmrg am_max_uid=2097151 # 2^21 - 1 10582b2b4fcbSmrg am_max_gid=$am_max_uid 10592b2b4fcbSmrg # The $UID and $GID variables are not portable, so we need to resort 10602b2b4fcbSmrg # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 10612b2b4fcbSmrg # below are definitely unexpected, so allow the users to see them 10622b2b4fcbSmrg # (that is, avoid stderr redirection). 10632b2b4fcbSmrg am_uid=`id -u || echo unknown` 10642b2b4fcbSmrg am_gid=`id -g || echo unknown` 10652b2b4fcbSmrg AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 10662b2b4fcbSmrg if test $am_uid -le $am_max_uid; then 10672b2b4fcbSmrg AC_MSG_RESULT([yes]) 10682b2b4fcbSmrg else 10692b2b4fcbSmrg AC_MSG_RESULT([no]) 10702b2b4fcbSmrg _am_tools=none 10712b2b4fcbSmrg fi 10722b2b4fcbSmrg AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 10732b2b4fcbSmrg if test $am_gid -le $am_max_gid; then 10742b2b4fcbSmrg AC_MSG_RESULT([yes]) 10752b2b4fcbSmrg else 10762b2b4fcbSmrg AC_MSG_RESULT([no]) 10772b2b4fcbSmrg _am_tools=none 10782b2b4fcbSmrg fi], 1079ab47cfaaSmrg 10802b2b4fcbSmrg [pax], 10812b2b4fcbSmrg [], 10821473d951Smrg 10832b2b4fcbSmrg [m4_fatal([Unknown tar format])]) 1084ab47cfaaSmrg 10852b2b4fcbSmrg AC_MSG_CHECKING([how to create a $1 tar archive]) 1086ab47cfaaSmrg 10872b2b4fcbSmrg # Go ahead even if we have the value already cached. We do so because we 10882b2b4fcbSmrg # need to set the values for the 'am__tar' and 'am__untar' variables. 10892b2b4fcbSmrg _am_tools=${am_cv_prog_tar_$1-$_am_tools} 1090ab47cfaaSmrg 10912b2b4fcbSmrg for _am_tool in $_am_tools; do 10922b2b4fcbSmrg case $_am_tool in 10932b2b4fcbSmrg gnutar) 10942b2b4fcbSmrg for _am_tar in tar gnutar gtar; do 10952b2b4fcbSmrg AM_RUN_LOG([$_am_tar --version]) && break 10962b2b4fcbSmrg done 10972b2b4fcbSmrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 10982b2b4fcbSmrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 10992b2b4fcbSmrg am__untar="$_am_tar -xf -" 11002b2b4fcbSmrg ;; 11012b2b4fcbSmrg plaintar) 11022b2b4fcbSmrg # Must skip GNU tar: if it does not support --format= it doesn't create 11032b2b4fcbSmrg # ustar tarball either. 11042b2b4fcbSmrg (tar --version) >/dev/null 2>&1 && continue 11052b2b4fcbSmrg am__tar='tar chf - "$$tardir"' 11062b2b4fcbSmrg am__tar_='tar chf - "$tardir"' 11072b2b4fcbSmrg am__untar='tar xf -' 11082b2b4fcbSmrg ;; 11092b2b4fcbSmrg pax) 11102b2b4fcbSmrg am__tar='pax -L -x $1 -w "$$tardir"' 11112b2b4fcbSmrg am__tar_='pax -L -x $1 -w "$tardir"' 11122b2b4fcbSmrg am__untar='pax -r' 11132b2b4fcbSmrg ;; 11142b2b4fcbSmrg cpio) 11152b2b4fcbSmrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 11162b2b4fcbSmrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 11172b2b4fcbSmrg am__untar='cpio -i -H $1 -d' 11182b2b4fcbSmrg ;; 11192b2b4fcbSmrg none) 11202b2b4fcbSmrg am__tar=false 11212b2b4fcbSmrg am__tar_=false 11222b2b4fcbSmrg am__untar=false 11232b2b4fcbSmrg ;; 11242b2b4fcbSmrg esac 1125ab47cfaaSmrg 11262b2b4fcbSmrg # If the value was cached, stop now. We just wanted to have am__tar 11272b2b4fcbSmrg # and am__untar set. 11282b2b4fcbSmrg test -n "${am_cv_prog_tar_$1}" && break 11291473d951Smrg 11302b2b4fcbSmrg # tar/untar a dummy directory, and stop if the command works. 11312b2b4fcbSmrg rm -rf conftest.dir 11322b2b4fcbSmrg mkdir conftest.dir 11332b2b4fcbSmrg echo GrepMe > conftest.dir/file 11342b2b4fcbSmrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 11352b2b4fcbSmrg rm -rf conftest.dir 11362b2b4fcbSmrg if test -s conftest.tar; then 11372b2b4fcbSmrg AM_RUN_LOG([$am__untar <conftest.tar]) 11382b2b4fcbSmrg AM_RUN_LOG([cat conftest.dir/file]) 11392b2b4fcbSmrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 11402b2b4fcbSmrg fi 11412b2b4fcbSmrg done 11422b2b4fcbSmrg rm -rf conftest.dir 11436aec45a7Smrg 11442b2b4fcbSmrg AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 11452b2b4fcbSmrg AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 11466aec45a7Smrg 11472b2b4fcbSmrgAC_SUBST([am__tar]) 11482b2b4fcbSmrgAC_SUBST([am__untar]) 11492b2b4fcbSmrg]) # _AM_PROG_TAR 1150ab47cfaaSmrg 11512b2b4fcbSmrgdnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 11522b2b4fcbSmrgdnl serial 11 (pkg-config-0.29) 11532b2b4fcbSmrgdnl 11542b2b4fcbSmrgdnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 11552b2b4fcbSmrgdnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> 11562b2b4fcbSmrgdnl 11572b2b4fcbSmrgdnl This program is free software; you can redistribute it and/or modify 11582b2b4fcbSmrgdnl it under the terms of the GNU General Public License as published by 11592b2b4fcbSmrgdnl the Free Software Foundation; either version 2 of the License, or 11602b2b4fcbSmrgdnl (at your option) any later version. 11612b2b4fcbSmrgdnl 11622b2b4fcbSmrgdnl This program is distributed in the hope that it will be useful, but 11632b2b4fcbSmrgdnl WITHOUT ANY WARRANTY; without even the implied warranty of 11642b2b4fcbSmrgdnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11652b2b4fcbSmrgdnl General Public License for more details. 11662b2b4fcbSmrgdnl 11672b2b4fcbSmrgdnl You should have received a copy of the GNU General Public License 11682b2b4fcbSmrgdnl along with this program; if not, write to the Free Software 11692b2b4fcbSmrgdnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 11702b2b4fcbSmrgdnl 02111-1307, USA. 11712b2b4fcbSmrgdnl 11722b2b4fcbSmrgdnl As a special exception to the GNU General Public License, if you 11732b2b4fcbSmrgdnl distribute this file as part of a program that contains a 11742b2b4fcbSmrgdnl configuration script generated by Autoconf, you may include it under 11752b2b4fcbSmrgdnl the same distribution terms that you use for the rest of that 11762b2b4fcbSmrgdnl program. 11772b2b4fcbSmrg 11782b2b4fcbSmrgdnl PKG_PREREQ(MIN-VERSION) 11792b2b4fcbSmrgdnl ----------------------- 11802b2b4fcbSmrgdnl Since: 0.29 11812b2b4fcbSmrgdnl 11822b2b4fcbSmrgdnl Verify that the version of the pkg-config macros are at least 11832b2b4fcbSmrgdnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's 11842b2b4fcbSmrgdnl installed version of pkg-config, this checks the developer's version 11852b2b4fcbSmrgdnl of pkg.m4 when generating configure. 11862b2b4fcbSmrgdnl 11872b2b4fcbSmrgdnl To ensure that this macro is defined, also add: 11882b2b4fcbSmrgdnl m4_ifndef([PKG_PREREQ], 11892b2b4fcbSmrgdnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) 11902b2b4fcbSmrgdnl 11912b2b4fcbSmrgdnl See the "Since" comment for each macro you use to see what version 11922b2b4fcbSmrgdnl of the macros you require. 11932b2b4fcbSmrgm4_defun([PKG_PREREQ], 11942b2b4fcbSmrg[m4_define([PKG_MACROS_VERSION], [0.29]) 11952b2b4fcbSmrgm4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, 11962b2b4fcbSmrg [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) 11972b2b4fcbSmrg])dnl PKG_PREREQ 11982b2b4fcbSmrg 11992b2b4fcbSmrgdnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) 12002b2b4fcbSmrgdnl ---------------------------------- 12012b2b4fcbSmrgdnl Since: 0.16 12022b2b4fcbSmrgdnl 12032b2b4fcbSmrgdnl Search for the pkg-config tool and set the PKG_CONFIG variable to 12042b2b4fcbSmrgdnl first found in the path. Checks that the version of pkg-config found 12052b2b4fcbSmrgdnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is 12062b2b4fcbSmrgdnl used since that's the first version where most current features of 12072b2b4fcbSmrgdnl pkg-config existed. 12082b2b4fcbSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 12092b2b4fcbSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 12102b2b4fcbSmrgm4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 12112b2b4fcbSmrgm4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 12122b2b4fcbSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 12132b2b4fcbSmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 12142b2b4fcbSmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 12156aec45a7Smrg 12162b2b4fcbSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 12172b2b4fcbSmrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 12182b2b4fcbSmrgfi 12192b2b4fcbSmrgif test -n "$PKG_CONFIG"; then 12202b2b4fcbSmrg _pkg_min_version=m4_default([$1], [0.9.0]) 12212b2b4fcbSmrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 12222b2b4fcbSmrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 12232b2b4fcbSmrg AC_MSG_RESULT([yes]) 12242b2b4fcbSmrg else 12252b2b4fcbSmrg AC_MSG_RESULT([no]) 12262b2b4fcbSmrg PKG_CONFIG="" 12272b2b4fcbSmrg fi 12282b2b4fcbSmrgfi[]dnl 12292b2b4fcbSmrg])dnl PKG_PROG_PKG_CONFIG 12306aec45a7Smrg 12312b2b4fcbSmrgdnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 12322b2b4fcbSmrgdnl ------------------------------------------------------------------- 12332b2b4fcbSmrgdnl Since: 0.18 12342b2b4fcbSmrgdnl 12352b2b4fcbSmrgdnl Check to see whether a particular set of modules exists. Similar to 12362b2b4fcbSmrgdnl PKG_CHECK_MODULES(), but does not set variables or print errors. 12372b2b4fcbSmrgdnl 12382b2b4fcbSmrgdnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 12392b2b4fcbSmrgdnl only at the first occurence in configure.ac, so if the first place 12402b2b4fcbSmrgdnl it's called might be skipped (such as if it is within an "if", you 12412b2b4fcbSmrgdnl have to call PKG_CHECK_EXISTS manually 12422b2b4fcbSmrgAC_DEFUN([PKG_CHECK_EXISTS], 12432b2b4fcbSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 12442b2b4fcbSmrgif test -n "$PKG_CONFIG" && \ 12452b2b4fcbSmrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 12462b2b4fcbSmrg m4_default([$2], [:]) 12472b2b4fcbSmrgm4_ifvaln([$3], [else 12482b2b4fcbSmrg $3])dnl 12492b2b4fcbSmrgfi]) 1250ab47cfaaSmrg 12512b2b4fcbSmrgdnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 12522b2b4fcbSmrgdnl --------------------------------------------- 12532b2b4fcbSmrgdnl Internal wrapper calling pkg-config via PKG_CONFIG and setting 12542b2b4fcbSmrgdnl pkg_failed based on the result. 12552b2b4fcbSmrgm4_define([_PKG_CONFIG], 12562b2b4fcbSmrg[if test -n "$$1"; then 12572b2b4fcbSmrg pkg_cv_[]$1="$$1" 12582b2b4fcbSmrg elif test -n "$PKG_CONFIG"; then 12592b2b4fcbSmrg PKG_CHECK_EXISTS([$3], 12602b2b4fcbSmrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 12612b2b4fcbSmrg test "x$?" != "x0" && pkg_failed=yes ], 12622b2b4fcbSmrg [pkg_failed=yes]) 12632b2b4fcbSmrg else 12642b2b4fcbSmrg pkg_failed=untried 12652b2b4fcbSmrgfi[]dnl 12662b2b4fcbSmrg])dnl _PKG_CONFIG 1267ab47cfaaSmrg 12682b2b4fcbSmrgdnl _PKG_SHORT_ERRORS_SUPPORTED 12692b2b4fcbSmrgdnl --------------------------- 12702b2b4fcbSmrgdnl Internal check to see if pkg-config supports short errors. 12712b2b4fcbSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 12722b2b4fcbSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 12732b2b4fcbSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 12742b2b4fcbSmrg _pkg_short_errors_supported=yes 12752b2b4fcbSmrgelse 12762b2b4fcbSmrg _pkg_short_errors_supported=no 12772b2b4fcbSmrgfi[]dnl 12782b2b4fcbSmrg])dnl _PKG_SHORT_ERRORS_SUPPORTED 1279300bf1aeSmrg 1280300bf1aeSmrg 12812b2b4fcbSmrgdnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 12822b2b4fcbSmrgdnl [ACTION-IF-NOT-FOUND]) 12832b2b4fcbSmrgdnl -------------------------------------------------------------- 12842b2b4fcbSmrgdnl Since: 0.4.0 12852b2b4fcbSmrgdnl 12862b2b4fcbSmrgdnl Note that if there is a possibility the first call to 12872b2b4fcbSmrgdnl PKG_CHECK_MODULES might not happen, you should be sure to include an 12882b2b4fcbSmrgdnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 12892b2b4fcbSmrgAC_DEFUN([PKG_CHECK_MODULES], 12902b2b4fcbSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 12912b2b4fcbSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 12922b2b4fcbSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 1293ab47cfaaSmrg 12942b2b4fcbSmrgpkg_failed=no 12952b2b4fcbSmrgAC_MSG_CHECKING([for $1]) 1296300bf1aeSmrg 12972b2b4fcbSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 12982b2b4fcbSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 1299ab47cfaaSmrg 13002b2b4fcbSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 13012b2b4fcbSmrgand $1[]_LIBS to avoid the need to call pkg-config. 13022b2b4fcbSmrgSee the pkg-config man page for more details.]) 1303300bf1aeSmrg 13042b2b4fcbSmrgif test $pkg_failed = yes; then 13052b2b4fcbSmrg AC_MSG_RESULT([no]) 13062b2b4fcbSmrg _PKG_SHORT_ERRORS_SUPPORTED 13072b2b4fcbSmrg if test $_pkg_short_errors_supported = yes; then 13082b2b4fcbSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 13092b2b4fcbSmrg else 13102b2b4fcbSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 13112b2b4fcbSmrg fi 13122b2b4fcbSmrg # Put the nasty error message in config.log where it belongs 13132b2b4fcbSmrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 1314300bf1aeSmrg 13152b2b4fcbSmrg m4_default([$4], [AC_MSG_ERROR( 13162b2b4fcbSmrg[Package requirements ($2) were not met: 1317300bf1aeSmrg 13182b2b4fcbSmrg$$1_PKG_ERRORS 1319300bf1aeSmrg 13202b2b4fcbSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 13212b2b4fcbSmrginstalled software in a non-standard prefix. 1322300bf1aeSmrg 13232b2b4fcbSmrg_PKG_TEXT])[]dnl 13242b2b4fcbSmrg ]) 13252b2b4fcbSmrgelif test $pkg_failed = untried; then 13262b2b4fcbSmrg AC_MSG_RESULT([no]) 13272b2b4fcbSmrg m4_default([$4], [AC_MSG_FAILURE( 13282b2b4fcbSmrg[The pkg-config script could not be found or is too old. Make sure it 13292b2b4fcbSmrgis in your PATH or set the PKG_CONFIG environment variable to the full 13302b2b4fcbSmrgpath to pkg-config. 1331ab47cfaaSmrg 13322b2b4fcbSmrg_PKG_TEXT 1333ab47cfaaSmrg 13342b2b4fcbSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 13352b2b4fcbSmrg ]) 13362b2b4fcbSmrgelse 13372b2b4fcbSmrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 13382b2b4fcbSmrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 13392b2b4fcbSmrg AC_MSG_RESULT([yes]) 13402b2b4fcbSmrg $3 13412b2b4fcbSmrgfi[]dnl 13422b2b4fcbSmrg])dnl PKG_CHECK_MODULES 1343ab47cfaaSmrg 1344ab47cfaaSmrg 13452b2b4fcbSmrgdnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 13462b2b4fcbSmrgdnl [ACTION-IF-NOT-FOUND]) 13472b2b4fcbSmrgdnl --------------------------------------------------------------------- 13482b2b4fcbSmrgdnl Since: 0.29 13492b2b4fcbSmrgdnl 13502b2b4fcbSmrgdnl Checks for existence of MODULES and gathers its build flags with 13512b2b4fcbSmrgdnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags 13522b2b4fcbSmrgdnl and VARIABLE-PREFIX_LIBS from --libs. 13532b2b4fcbSmrgdnl 13542b2b4fcbSmrgdnl Note that if there is a possibility the first call to 13552b2b4fcbSmrgdnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to 13562b2b4fcbSmrgdnl include an explicit call to PKG_PROG_PKG_CONFIG in your 13572b2b4fcbSmrgdnl configure.ac. 13582b2b4fcbSmrgAC_DEFUN([PKG_CHECK_MODULES_STATIC], 13592b2b4fcbSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 13602b2b4fcbSmrg_save_PKG_CONFIG=$PKG_CONFIG 13612b2b4fcbSmrgPKG_CONFIG="$PKG_CONFIG --static" 13622b2b4fcbSmrgPKG_CHECK_MODULES($@) 13632b2b4fcbSmrgPKG_CONFIG=$_save_PKG_CONFIG[]dnl 13642b2b4fcbSmrg])dnl PKG_CHECK_MODULES_STATIC 1365ab47cfaaSmrg 1366ab47cfaaSmrg 13672b2b4fcbSmrgdnl PKG_INSTALLDIR([DIRECTORY]) 13682b2b4fcbSmrgdnl ------------------------- 13692b2b4fcbSmrgdnl Since: 0.27 13702b2b4fcbSmrgdnl 13712b2b4fcbSmrgdnl Substitutes the variable pkgconfigdir as the location where a module 13722b2b4fcbSmrgdnl should install pkg-config .pc files. By default the directory is 13732b2b4fcbSmrgdnl $libdir/pkgconfig, but the default can be changed by passing 13742b2b4fcbSmrgdnl DIRECTORY. The user can override through the --with-pkgconfigdir 13752b2b4fcbSmrgdnl parameter. 13762b2b4fcbSmrgAC_DEFUN([PKG_INSTALLDIR], 13772b2b4fcbSmrg[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) 13782b2b4fcbSmrgm4_pushdef([pkg_description], 13792b2b4fcbSmrg [pkg-config installation directory @<:@]pkg_default[@:>@]) 13802b2b4fcbSmrgAC_ARG_WITH([pkgconfigdir], 13812b2b4fcbSmrg [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, 13822b2b4fcbSmrg [with_pkgconfigdir=]pkg_default) 13832b2b4fcbSmrgAC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) 13842b2b4fcbSmrgm4_popdef([pkg_default]) 13852b2b4fcbSmrgm4_popdef([pkg_description]) 13862b2b4fcbSmrg])dnl PKG_INSTALLDIR 1387ab47cfaaSmrg 1388ab47cfaaSmrg 13892b2b4fcbSmrgdnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) 13902b2b4fcbSmrgdnl -------------------------------- 13912b2b4fcbSmrgdnl Since: 0.27 13922b2b4fcbSmrgdnl 13932b2b4fcbSmrgdnl Substitutes the variable noarch_pkgconfigdir as the location where a 13942b2b4fcbSmrgdnl module should install arch-independent pkg-config .pc files. By 13952b2b4fcbSmrgdnl default the directory is $datadir/pkgconfig, but the default can be 13962b2b4fcbSmrgdnl changed by passing DIRECTORY. The user can override through the 13972b2b4fcbSmrgdnl --with-noarch-pkgconfigdir parameter. 13982b2b4fcbSmrgAC_DEFUN([PKG_NOARCH_INSTALLDIR], 13992b2b4fcbSmrg[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) 14002b2b4fcbSmrgm4_pushdef([pkg_description], 14012b2b4fcbSmrg [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) 14022b2b4fcbSmrgAC_ARG_WITH([noarch-pkgconfigdir], 14032b2b4fcbSmrg [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, 14042b2b4fcbSmrg [with_noarch_pkgconfigdir=]pkg_default) 14052b2b4fcbSmrgAC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) 14062b2b4fcbSmrgm4_popdef([pkg_default]) 14072b2b4fcbSmrgm4_popdef([pkg_description]) 14082b2b4fcbSmrg])dnl PKG_NOARCH_INSTALLDIR 1409ab47cfaaSmrg 1410ab47cfaaSmrg 14112b2b4fcbSmrgdnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, 14122b2b4fcbSmrgdnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 14132b2b4fcbSmrgdnl ------------------------------------------- 14142b2b4fcbSmrgdnl Since: 0.28 14152b2b4fcbSmrgdnl 14162b2b4fcbSmrgdnl Retrieves the value of the pkg-config variable for the given module. 14172b2b4fcbSmrgAC_DEFUN([PKG_CHECK_VAR], 14182b2b4fcbSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 14192b2b4fcbSmrgAC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl 14205c42550eSmrg 14212b2b4fcbSmrg_PKG_CONFIG([$1], [variable="][$3]["], [$2]) 14222b2b4fcbSmrgAS_VAR_COPY([$1], [pkg_cv_][$1]) 14236aec45a7Smrg 14242b2b4fcbSmrgAS_VAR_IF([$1], [""], [$5], [$4])dnl 14252b2b4fcbSmrg])dnl PKG_CHECK_VAR 14266aec45a7Smrg 14272b2b4fcbSmrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 14282b2b4fcbSmrgdnl 14292b2b4fcbSmrgdnl Copyright (c) 2005, 2023, Oracle and/or its affiliates. 14302b2b4fcbSmrgdnl 14312b2b4fcbSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 14322b2b4fcbSmrgdnl copy of this software and associated documentation files (the "Software"), 14332b2b4fcbSmrgdnl to deal in the Software without restriction, including without limitation 14342b2b4fcbSmrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 14352b2b4fcbSmrgdnl and/or sell copies of the Software, and to permit persons to whom the 14362b2b4fcbSmrgdnl Software is furnished to do so, subject to the following conditions: 14372b2b4fcbSmrgdnl 14382b2b4fcbSmrgdnl The above copyright notice and this permission notice (including the next 14392b2b4fcbSmrgdnl paragraph) shall be included in all copies or substantial portions of the 14402b2b4fcbSmrgdnl Software. 14412b2b4fcbSmrgdnl 14422b2b4fcbSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14432b2b4fcbSmrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 14442b2b4fcbSmrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 14452b2b4fcbSmrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 14462b2b4fcbSmrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 14472b2b4fcbSmrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 14482b2b4fcbSmrgdnl DEALINGS IN THE SOFTWARE. 1449ab47cfaaSmrg 14502b2b4fcbSmrg# XORG_MACROS_VERSION(required-version) 14512b2b4fcbSmrg# ------------------------------------- 14522b2b4fcbSmrg# Minimum version: 1.1.0 14532b2b4fcbSmrg# 14542b2b4fcbSmrg# If you're using a macro added in Version 1.1 or newer, include this in 14552b2b4fcbSmrg# your configure.ac with the minimum required version, such as: 14562b2b4fcbSmrg# XORG_MACROS_VERSION(1.1) 14572b2b4fcbSmrg# 14582b2b4fcbSmrg# To ensure that this macro is defined, also add: 14592b2b4fcbSmrg# m4_ifndef([XORG_MACROS_VERSION], 14602b2b4fcbSmrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 14612b2b4fcbSmrg# 14622b2b4fcbSmrg# 14632b2b4fcbSmrg# See the "minimum version" comment for each macro you use to see what 14642b2b4fcbSmrg# version you require. 14652b2b4fcbSmrgm4_defun([XORG_MACROS_VERSION],[ 14662b2b4fcbSmrgm4_define([vers_have], [1.20.0]) 14672b2b4fcbSmrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 14682b2b4fcbSmrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 14692b2b4fcbSmrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 14702b2b4fcbSmrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 14712b2b4fcbSmrgm4_if(m4_version_compare(vers_have, [$1]), -1, 14722b2b4fcbSmrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 14732b2b4fcbSmrgm4_undefine([vers_have]) 14742b2b4fcbSmrgm4_undefine([maj_have]) 14752b2b4fcbSmrgm4_undefine([maj_needed]) 14762b2b4fcbSmrg]) # XORG_MACROS_VERSION 1477ab47cfaaSmrg 14782b2b4fcbSmrg# XORG_PROG_RAWCPP() 14792b2b4fcbSmrg# ------------------ 14802b2b4fcbSmrg# Minimum version: 1.0.0 14812b2b4fcbSmrg# 14822b2b4fcbSmrg# Find cpp program and necessary flags for use in pre-processing text files 14832b2b4fcbSmrg# such as man pages and config files 14842b2b4fcbSmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 14852b2b4fcbSmrgAC_REQUIRE([AC_PROG_CPP]) 14862b2b4fcbSmrgAC_PATH_TOOL(RAWCPP, [cpp], [${CPP}], 14872b2b4fcbSmrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 14882b2b4fcbSmrg 14892b2b4fcbSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 14902b2b4fcbSmrg# which is not the best choice for supporting other OS'es, but covers most 14912b2b4fcbSmrg# of the ones we need for now. 14922b2b4fcbSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 14932b2b4fcbSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 14942b2b4fcbSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 14952b2b4fcbSmrg AC_MSG_RESULT([no]) 14962b2b4fcbSmrgelse 14972b2b4fcbSmrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 14982b2b4fcbSmrg RAWCPPFLAGS=-undef 14992b2b4fcbSmrg AC_MSG_RESULT([yes]) 15002b2b4fcbSmrg # under Cygwin unix is still defined even with -undef 15012b2b4fcbSmrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 15022b2b4fcbSmrg RAWCPPFLAGS="-undef -ansi" 15032b2b4fcbSmrg AC_MSG_RESULT([yes, with -ansi]) 15042b2b4fcbSmrg else 15052b2b4fcbSmrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 15062b2b4fcbSmrg fi 1507aa9e3350Smrgfi 15082b2b4fcbSmrgrm -f conftest.$ac_ext 1509aa9e3350Smrg 15102b2b4fcbSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 15112b2b4fcbSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 15125c8a776cSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve "'` -eq 1 ; then 15132b2b4fcbSmrg AC_MSG_RESULT([no]) 15142b2b4fcbSmrgelse 15155c8a776cSmrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve "'` -eq 1 ; then 15162b2b4fcbSmrg TRADITIONALCPPFLAGS="-traditional" 15172b2b4fcbSmrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 15182b2b4fcbSmrg AC_MSG_RESULT([yes]) 15192b2b4fcbSmrg else 15202b2b4fcbSmrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 15212b2b4fcbSmrg fi 15222b2b4fcbSmrgfi 15232b2b4fcbSmrgrm -f conftest.$ac_ext 15242b2b4fcbSmrgAC_SUBST(RAWCPPFLAGS) 15252b2b4fcbSmrgAC_SUBST(TRADITIONALCPPFLAGS) 15262b2b4fcbSmrg]) # XORG_PROG_RAWCPP 1527aa9e3350Smrg 15282b2b4fcbSmrg# XORG_MANPAGE_SECTIONS() 15296aec45a7Smrg# ----------------------- 15302b2b4fcbSmrg# Minimum version: 1.0.0 15312b2b4fcbSmrg# 15322b2b4fcbSmrg# Determine which sections man pages go in for the different man page types 15332b2b4fcbSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 15342b2b4fcbSmrg# Not sure if there's any better way than just hardcoding by OS name. 15352b2b4fcbSmrg# Override default settings by setting environment variables 15362b2b4fcbSmrg# Added MAN_SUBSTS in version 1.8 15372b2b4fcbSmrg# Added AC_PROG_SED in version 1.8 15386aec45a7Smrg 15392b2b4fcbSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 15402b2b4fcbSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 15412b2b4fcbSmrgAC_REQUIRE([AC_PROG_SED]) 15426aec45a7Smrg 15432b2b4fcbSmrgcase $host_os in 15442b2b4fcbSmrg solaris*) 15452b2b4fcbSmrg # Solaris 2.0 - 11.3 use SysV man page section numbers, so we 15462b2b4fcbSmrg # check for a man page file found in later versions that use 15472b2b4fcbSmrg # traditional section numbers instead 15482b2b4fcbSmrg AC_CHECK_FILE([/usr/share/man/man7/attributes.7], 15492b2b4fcbSmrg [SYSV_MAN_SECTIONS=false], [SYSV_MAN_SECTIONS=true]) 15502b2b4fcbSmrg ;; 15512b2b4fcbSmrg *) SYSV_MAN_SECTIONS=false ;; 15522b2b4fcbSmrgesac 15536aec45a7Smrg 15542b2b4fcbSmrgif test x$APP_MAN_SUFFIX = x ; then 15552b2b4fcbSmrg APP_MAN_SUFFIX=1 15562b2b4fcbSmrgfi 15572b2b4fcbSmrgif test x$APP_MAN_DIR = x ; then 15582b2b4fcbSmrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 15592b2b4fcbSmrgfi 15606aec45a7Smrg 15612b2b4fcbSmrgif test x$LIB_MAN_SUFFIX = x ; then 15622b2b4fcbSmrg LIB_MAN_SUFFIX=3 15632b2b4fcbSmrgfi 15642b2b4fcbSmrgif test x$LIB_MAN_DIR = x ; then 15652b2b4fcbSmrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 15662b2b4fcbSmrgfi 1567aa9e3350Smrg 15682b2b4fcbSmrgif test x$FILE_MAN_SUFFIX = x ; then 15692b2b4fcbSmrg case $SYSV_MAN_SECTIONS in 15702b2b4fcbSmrg true) FILE_MAN_SUFFIX=4 ;; 15712b2b4fcbSmrg *) FILE_MAN_SUFFIX=5 ;; 15722b2b4fcbSmrg esac 15732b2b4fcbSmrgfi 15742b2b4fcbSmrgif test x$FILE_MAN_DIR = x ; then 15752b2b4fcbSmrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 15762b2b4fcbSmrgfi 15776aec45a7Smrg 15782b2b4fcbSmrgif test x$MISC_MAN_SUFFIX = x ; then 15792b2b4fcbSmrg case $SYSV_MAN_SECTIONS in 15802b2b4fcbSmrg true) MISC_MAN_SUFFIX=5 ;; 15812b2b4fcbSmrg *) MISC_MAN_SUFFIX=7 ;; 15822b2b4fcbSmrg esac 15832b2b4fcbSmrgfi 15842b2b4fcbSmrgif test x$MISC_MAN_DIR = x ; then 15852b2b4fcbSmrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 15862b2b4fcbSmrgfi 15876aec45a7Smrg 15882b2b4fcbSmrgif test x$DRIVER_MAN_SUFFIX = x ; then 15892b2b4fcbSmrg case $SYSV_MAN_SECTIONS in 15902b2b4fcbSmrg true) DRIVER_MAN_SUFFIX=7 ;; 15912b2b4fcbSmrg *) DRIVER_MAN_SUFFIX=4 ;; 15922b2b4fcbSmrg esac 15932b2b4fcbSmrgfi 15942b2b4fcbSmrgif test x$DRIVER_MAN_DIR = x ; then 15952b2b4fcbSmrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 15962b2b4fcbSmrgfi 15976aec45a7Smrg 15982b2b4fcbSmrgif test x$ADMIN_MAN_SUFFIX = x ; then 15992b2b4fcbSmrg case $SYSV_MAN_SECTIONS in 16002b2b4fcbSmrg true) ADMIN_MAN_SUFFIX=1m ;; 16012b2b4fcbSmrg *) ADMIN_MAN_SUFFIX=8 ;; 16022b2b4fcbSmrg esac 16032b2b4fcbSmrgfi 16042b2b4fcbSmrgif test x$ADMIN_MAN_DIR = x ; then 16052b2b4fcbSmrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 16062b2b4fcbSmrgfi 1607ab47cfaaSmrg 1608ab47cfaaSmrg 16092b2b4fcbSmrgAC_SUBST([APP_MAN_SUFFIX]) 16102b2b4fcbSmrgAC_SUBST([LIB_MAN_SUFFIX]) 16112b2b4fcbSmrgAC_SUBST([FILE_MAN_SUFFIX]) 16122b2b4fcbSmrgAC_SUBST([MISC_MAN_SUFFIX]) 16132b2b4fcbSmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 16142b2b4fcbSmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 16152b2b4fcbSmrgAC_SUBST([APP_MAN_DIR]) 16162b2b4fcbSmrgAC_SUBST([LIB_MAN_DIR]) 16172b2b4fcbSmrgAC_SUBST([FILE_MAN_DIR]) 16182b2b4fcbSmrgAC_SUBST([MISC_MAN_DIR]) 16192b2b4fcbSmrgAC_SUBST([DRIVER_MAN_DIR]) 16202b2b4fcbSmrgAC_SUBST([ADMIN_MAN_DIR]) 1621ab47cfaaSmrg 16222b2b4fcbSmrgXORG_MAN_PAGE="X Version 11" 16232b2b4fcbSmrgAC_SUBST([XORG_MAN_PAGE]) 16242b2b4fcbSmrgMAN_SUBSTS="\ 16252b2b4fcbSmrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 16262b2b4fcbSmrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 16272b2b4fcbSmrg -e 's|__xservername__|Xorg|g' \ 16282b2b4fcbSmrg -e 's|__xconfigfile__|xorg.conf|g' \ 16292b2b4fcbSmrg -e 's|__projectroot__|\$(prefix)|g' \ 16302b2b4fcbSmrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 16312b2b4fcbSmrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 16322b2b4fcbSmrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 16332b2b4fcbSmrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 16342b2b4fcbSmrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 16352b2b4fcbSmrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 16362b2b4fcbSmrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 16372b2b4fcbSmrgAC_SUBST([MAN_SUBSTS]) 1638ab47cfaaSmrg 16392b2b4fcbSmrg]) # XORG_MANPAGE_SECTIONS 1640ab47cfaaSmrg 16412b2b4fcbSmrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 16426aec45a7Smrg# ------------------------ 16432b2b4fcbSmrg# Minimum version: 1.7.0 16442b2b4fcbSmrg# 16452b2b4fcbSmrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 16462b2b4fcbSmrg# provided by xorg-sgml-doctools, if installed. 16472b2b4fcbSmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 16482b2b4fcbSmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 16492b2b4fcbSmrgXORG_SGML_PATH= 16502b2b4fcbSmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 16512b2b4fcbSmrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 16522b2b4fcbSmrg [m4_ifval([$1],[:], 16532b2b4fcbSmrg [if test x"$cross_compiling" != x"yes" ; then 16542b2b4fcbSmrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 16552b2b4fcbSmrg [XORG_SGML_PATH=$prefix/share/sgml]) 16562b2b4fcbSmrg fi]) 16576aec45a7Smrg ]) 1658ab47cfaaSmrg 16592b2b4fcbSmrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 16602b2b4fcbSmrg# the path and the name of the doc stylesheet 16612b2b4fcbSmrgif test "x$XORG_SGML_PATH" != "x" ; then 16622b2b4fcbSmrg AC_MSG_RESULT([$XORG_SGML_PATH]) 16632b2b4fcbSmrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 16642b2b4fcbSmrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 1665aa9e3350Smrgelse 16662b2b4fcbSmrg AC_MSG_RESULT([no]) 1667aa9e3350Smrgfi 1668ab47cfaaSmrg 16692b2b4fcbSmrgAC_SUBST(XORG_SGML_PATH) 16702b2b4fcbSmrgAC_SUBST(STYLESHEET_SRCDIR) 16712b2b4fcbSmrgAC_SUBST(XSL_STYLESHEET) 16722b2b4fcbSmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 16732b2b4fcbSmrg]) # XORG_CHECK_SGML_DOCTOOLS 1674ab47cfaaSmrg 16752b2b4fcbSmrg# XORG_CHECK_LINUXDOC 16766aec45a7Smrg# ------------------- 16772b2b4fcbSmrg# Minimum version: 1.0.0 16782b2b4fcbSmrg# 16792b2b4fcbSmrg# Defines the variable MAKE_TEXT if the necessary tools and 16802b2b4fcbSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 16812b2b4fcbSmrg# Whether or not the necessary tools and files are found can be checked 16822b2b4fcbSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 16832b2b4fcbSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 16842b2b4fcbSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 16852b2b4fcbSmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 1686ab47cfaaSmrg 16872b2b4fcbSmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 16886aec45a7Smrg 16892b2b4fcbSmrgAC_MSG_CHECKING([whether to build documentation]) 16906aec45a7Smrg 16912b2b4fcbSmrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 16922b2b4fcbSmrg BUILDDOC=yes 16932b2b4fcbSmrgelse 16942b2b4fcbSmrg BUILDDOC=no 16952b2b4fcbSmrgfi 16966aec45a7Smrg 16972b2b4fcbSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 16982b2b4fcbSmrg 16992b2b4fcbSmrgAC_MSG_RESULT([$BUILDDOC]) 17002b2b4fcbSmrg 17012b2b4fcbSmrgAC_MSG_CHECKING([whether to build pdf documentation]) 17022b2b4fcbSmrg 17032b2b4fcbSmrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 17042b2b4fcbSmrg BUILDPDFDOC=yes 17056aec45a7Smrgelse 17062b2b4fcbSmrg BUILDPDFDOC=no 17076aec45a7Smrgfi 17086aec45a7Smrg 17092b2b4fcbSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 17106aec45a7Smrg 17112b2b4fcbSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 17126aec45a7Smrg 17132b2b4fcbSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 17142b2b4fcbSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 17152b2b4fcbSmrgMAKE_PDF="$PS2PDF" 17162b2b4fcbSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 17176aec45a7Smrg 17182b2b4fcbSmrgAC_SUBST(MAKE_TEXT) 17192b2b4fcbSmrgAC_SUBST(MAKE_PS) 17202b2b4fcbSmrgAC_SUBST(MAKE_PDF) 17212b2b4fcbSmrgAC_SUBST(MAKE_HTML) 17222b2b4fcbSmrg]) # XORG_CHECK_LINUXDOC 17236aec45a7Smrg 17242b2b4fcbSmrg# XORG_CHECK_DOCBOOK 17252b2b4fcbSmrg# ------------------- 17262b2b4fcbSmrg# Minimum version: 1.0.0 17272b2b4fcbSmrg# 17282b2b4fcbSmrg# Checks for the ability to build output formats from SGML DocBook source. 17292b2b4fcbSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 17302b2b4fcbSmrg# indicates whether the necessary tools and files are found and, if set, 17312b2b4fcbSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 17322b2b4fcbSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 17332b2b4fcbSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 17346aec45a7Smrg 17352b2b4fcbSmrgBUILDTXTDOC=no 17362b2b4fcbSmrgBUILDPDFDOC=no 17372b2b4fcbSmrgBUILDPSDOC=no 17382b2b4fcbSmrgBUILDHTMLDOC=no 1739aa9e3350Smrg 17402b2b4fcbSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 17412b2b4fcbSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 17422b2b4fcbSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 17432b2b4fcbSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 1744aa9e3350Smrg 17452b2b4fcbSmrgAC_MSG_CHECKING([whether to build text documentation]) 17462b2b4fcbSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 17472b2b4fcbSmrg test x$BUILD_TXTDOC != xno; then 17482b2b4fcbSmrg BUILDTXTDOC=yes 17492b2b4fcbSmrgfi 17502b2b4fcbSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 17512b2b4fcbSmrgAC_MSG_RESULT([$BUILDTXTDOC]) 1752aa9e3350Smrg 17532b2b4fcbSmrgAC_MSG_CHECKING([whether to build PDF documentation]) 17542b2b4fcbSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 17552b2b4fcbSmrg test x$BUILD_PDFDOC != xno; then 17562b2b4fcbSmrg BUILDPDFDOC=yes 17572b2b4fcbSmrgfi 17582b2b4fcbSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 17592b2b4fcbSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 17606aec45a7Smrg 17612b2b4fcbSmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 17622b2b4fcbSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 17632b2b4fcbSmrg test x$BUILD_PSDOC != xno; then 17642b2b4fcbSmrg BUILDPSDOC=yes 17652b2b4fcbSmrgfi 17662b2b4fcbSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 17672b2b4fcbSmrgAC_MSG_RESULT([$BUILDPSDOC]) 1768ab47cfaaSmrg 17692b2b4fcbSmrgAC_MSG_CHECKING([whether to build HTML documentation]) 17702b2b4fcbSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 17712b2b4fcbSmrg test x$BUILD_HTMLDOC != xno; then 17722b2b4fcbSmrg BUILDHTMLDOC=yes 17732b2b4fcbSmrgfi 17742b2b4fcbSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 17752b2b4fcbSmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 17766aec45a7Smrg 17772b2b4fcbSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 17782b2b4fcbSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 17792b2b4fcbSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 17802b2b4fcbSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 17816aec45a7Smrg 17822b2b4fcbSmrgAC_SUBST(MAKE_TEXT) 17832b2b4fcbSmrgAC_SUBST(MAKE_PS) 17842b2b4fcbSmrgAC_SUBST(MAKE_PDF) 17852b2b4fcbSmrgAC_SUBST(MAKE_HTML) 17862b2b4fcbSmrg]) # XORG_CHECK_DOCBOOK 1787aa9e3350Smrg 17882b2b4fcbSmrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 17892b2b4fcbSmrg# ---------------- 17902b2b4fcbSmrg# Minimum version: 1.5.0 17912b2b4fcbSmrg# Minimum version for optional DEFAULT argument: 1.11.0 17922b2b4fcbSmrg# 17932b2b4fcbSmrg# Documentation tools are not always available on all platforms and sometimes 17942b2b4fcbSmrg# not at the appropriate level. This macro enables a module to test for the 17952b2b4fcbSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 17962b2b4fcbSmrg# the --with-xmlto option, it allows maximum flexibility in making decisions 17972b2b4fcbSmrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 17982b2b4fcbSmrg# --with-xmlto assumes 'auto'. 17992b2b4fcbSmrg# 18002b2b4fcbSmrg# Interface to module: 18012b2b4fcbSmrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 18022b2b4fcbSmrg# XMLTO: returns the path of the xmlto program found 18032b2b4fcbSmrg# returns the path set by the user in the environment 18042b2b4fcbSmrg# --with-xmlto: 'yes' user instructs the module to use xmlto 18052b2b4fcbSmrg# 'no' user instructs the module not to use xmlto 18062b2b4fcbSmrg# 18072b2b4fcbSmrg# Added in version 1.10.0 18082b2b4fcbSmrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 18092b2b4fcbSmrg# xmlto for text output requires either lynx, links, or w3m browsers 18102b2b4fcbSmrg# 18112b2b4fcbSmrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 18122b2b4fcbSmrg# 18132b2b4fcbSmrgAC_DEFUN([XORG_WITH_XMLTO],[ 18142b2b4fcbSmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 18152b2b4fcbSmrgm4_define([_defopt], m4_default([$2], [auto])) 18162b2b4fcbSmrgAC_ARG_WITH(xmlto, 18172b2b4fcbSmrg AS_HELP_STRING([--with-xmlto], 18182b2b4fcbSmrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 18192b2b4fcbSmrg [use_xmlto=$withval], [use_xmlto=]_defopt) 18202b2b4fcbSmrgm4_undefine([_defopt]) 1821aa9e3350Smrg 18222b2b4fcbSmrgif test "x$use_xmlto" = x"auto"; then 18232b2b4fcbSmrg AC_PATH_PROG([XMLTO], [xmlto]) 18242b2b4fcbSmrg if test "x$XMLTO" = "x"; then 18252b2b4fcbSmrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 18262b2b4fcbSmrg have_xmlto=no 18272b2b4fcbSmrg else 18282b2b4fcbSmrg have_xmlto=yes 18292b2b4fcbSmrg fi 18302b2b4fcbSmrgelif test "x$use_xmlto" = x"yes" ; then 18312b2b4fcbSmrg AC_PATH_PROG([XMLTO], [xmlto]) 18322b2b4fcbSmrg if test "x$XMLTO" = "x"; then 18332b2b4fcbSmrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 18342b2b4fcbSmrg fi 18352b2b4fcbSmrg have_xmlto=yes 18362b2b4fcbSmrgelif test "x$use_xmlto" = x"no" ; then 18372b2b4fcbSmrg if test "x$XMLTO" != "x"; then 18382b2b4fcbSmrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 18392b2b4fcbSmrg fi 18402b2b4fcbSmrg have_xmlto=no 1841aa9e3350Smrgelse 18422b2b4fcbSmrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 1843aa9e3350Smrgfi 18446aec45a7Smrg 18452b2b4fcbSmrg# Test for a minimum version of xmlto, if provided. 18462b2b4fcbSmrgm4_ifval([$1], 18472b2b4fcbSmrg[if test "$have_xmlto" = yes; then 18482b2b4fcbSmrg # scrape the xmlto version 18492b2b4fcbSmrg AC_MSG_CHECKING([the xmlto version]) 18502b2b4fcbSmrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 18512b2b4fcbSmrg AC_MSG_RESULT([$xmlto_version]) 18522b2b4fcbSmrg AS_VERSION_COMPARE([$xmlto_version], [$1], 18532b2b4fcbSmrg [if test "x$use_xmlto" = xauto; then 18542b2b4fcbSmrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 18552b2b4fcbSmrg have_xmlto=no 18562b2b4fcbSmrg else 18572b2b4fcbSmrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 18582b2b4fcbSmrg fi]) 18592b2b4fcbSmrgfi]) 18606aec45a7Smrg 18612b2b4fcbSmrg# Test for the ability of xmlto to generate a text target 18622b2b4fcbSmrg# 18632b2b4fcbSmrg# NOTE: xmlto 0.0.27 or higher return a non-zero return code in the 18642b2b4fcbSmrg# following test for empty XML docbook files. 18652b2b4fcbSmrg# For compatibility reasons use the following empty XML docbook file and if 18662b2b4fcbSmrg# it fails try it again with a non-empty XML file. 18672b2b4fcbSmrghave_xmlto_text=no 18682b2b4fcbSmrgcat > conftest.xml << "EOF" 18692b2b4fcbSmrgEOF 18702b2b4fcbSmrgAS_IF([test "$have_xmlto" = yes], 18712b2b4fcbSmrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 18722b2b4fcbSmrg [have_xmlto_text=yes], 18732b2b4fcbSmrg [# Try it again with a non-empty XML file. 18742b2b4fcbSmrg cat > conftest.xml << "EOF" 18752b2b4fcbSmrg<x></x> 18762b2b4fcbSmrgEOF 18772b2b4fcbSmrg AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 18782b2b4fcbSmrg [have_xmlto_text=yes], 18792b2b4fcbSmrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])]) 18802b2b4fcbSmrgrm -f conftest.xml 18812b2b4fcbSmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 18822b2b4fcbSmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 18832b2b4fcbSmrg]) # XORG_WITH_XMLTO 18846aec45a7Smrg 18852b2b4fcbSmrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 18862b2b4fcbSmrg# -------------------------------------------- 18872b2b4fcbSmrg# Minimum version: 1.12.0 18882b2b4fcbSmrg# Minimum version for optional DEFAULT argument: 1.12.0 18892b2b4fcbSmrg# 18902b2b4fcbSmrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 18912b2b4fcbSmrg# XML-based language used for the transformation of XML documents. 18922b2b4fcbSmrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 18932b2b4fcbSmrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 18942b2b4fcbSmrg# The XSLT processor is often used as a standalone tool for transformations. 18952b2b4fcbSmrg# It should not be assumed that this tool is used only to work with documnetation. 18962b2b4fcbSmrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 18972b2b4fcbSmrg# 18982b2b4fcbSmrg# Interface to module: 18992b2b4fcbSmrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 19002b2b4fcbSmrg# XSLTPROC: returns the path of the xsltproc program found 19012b2b4fcbSmrg# returns the path set by the user in the environment 19022b2b4fcbSmrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 19032b2b4fcbSmrg# 'no' user instructs the module not to use xsltproc 19042b2b4fcbSmrg# have_xsltproc: returns yes if xsltproc found in PATH or no 19052b2b4fcbSmrg# 19062b2b4fcbSmrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 19072b2b4fcbSmrg# 19082b2b4fcbSmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 19092b2b4fcbSmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 19102b2b4fcbSmrg# Preserves the interface, should it be implemented later 19112b2b4fcbSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 19122b2b4fcbSmrgm4_define([_defopt], m4_default([$2], [auto])) 19132b2b4fcbSmrgAC_ARG_WITH(xsltproc, 19142b2b4fcbSmrg AS_HELP_STRING([--with-xsltproc], 19152b2b4fcbSmrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 19162b2b4fcbSmrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 19172b2b4fcbSmrgm4_undefine([_defopt]) 19186aec45a7Smrg 19192b2b4fcbSmrgif test "x$use_xsltproc" = x"auto"; then 19202b2b4fcbSmrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 19212b2b4fcbSmrg if test "x$XSLTPROC" = "x"; then 19222b2b4fcbSmrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 19232b2b4fcbSmrg have_xsltproc=no 19242b2b4fcbSmrg else 19252b2b4fcbSmrg have_xsltproc=yes 19262b2b4fcbSmrg fi 19272b2b4fcbSmrgelif test "x$use_xsltproc" = x"yes" ; then 19282b2b4fcbSmrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 19292b2b4fcbSmrg if test "x$XSLTPROC" = "x"; then 19302b2b4fcbSmrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 19312b2b4fcbSmrg fi 19322b2b4fcbSmrg have_xsltproc=yes 19332b2b4fcbSmrgelif test "x$use_xsltproc" = x"no" ; then 19342b2b4fcbSmrg if test "x$XSLTPROC" != "x"; then 19352b2b4fcbSmrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 19362b2b4fcbSmrg fi 19372b2b4fcbSmrg have_xsltproc=no 19382b2b4fcbSmrgelse 19392b2b4fcbSmrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 1940ab47cfaaSmrgfi 1941ab47cfaaSmrg 19422b2b4fcbSmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 19432b2b4fcbSmrg]) # XORG_WITH_XSLTPROC 19441473d951Smrg 19452b2b4fcbSmrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 19462b2b4fcbSmrg# ---------------------------------------- 19472b2b4fcbSmrg# Minimum version: 1.15.0 19482b2b4fcbSmrg# 19492b2b4fcbSmrg# PERL (Practical Extraction and Report Language) is a language optimized for 19502b2b4fcbSmrg# scanning arbitrary text files, extracting information from those text files, 19512b2b4fcbSmrg# and printing reports based on that information. 19522b2b4fcbSmrg# 19532b2b4fcbSmrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 19542b2b4fcbSmrg# 19552b2b4fcbSmrg# Interface to module: 19562b2b4fcbSmrg# HAVE_PERL: used in makefiles to conditionally scan text files 19572b2b4fcbSmrg# PERL: returns the path of the perl program found 19582b2b4fcbSmrg# returns the path set by the user in the environment 19592b2b4fcbSmrg# --with-perl: 'yes' user instructs the module to use perl 19602b2b4fcbSmrg# 'no' user instructs the module not to use perl 19612b2b4fcbSmrg# have_perl: returns yes if perl found in PATH or no 19622b2b4fcbSmrg# 19632b2b4fcbSmrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 19642b2b4fcbSmrg# 19652b2b4fcbSmrgAC_DEFUN([XORG_WITH_PERL],[ 19662b2b4fcbSmrgAC_ARG_VAR([PERL], [Path to perl command]) 19672b2b4fcbSmrg# Preserves the interface, should it be implemented later 19682b2b4fcbSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 19692b2b4fcbSmrgm4_define([_defopt], m4_default([$2], [auto])) 19702b2b4fcbSmrgAC_ARG_WITH(perl, 19712b2b4fcbSmrg AS_HELP_STRING([--with-perl], 19722b2b4fcbSmrg [Use perl for extracting information from files (default: ]_defopt[)]), 19732b2b4fcbSmrg [use_perl=$withval], [use_perl=]_defopt) 19742b2b4fcbSmrgm4_undefine([_defopt]) 1975ab47cfaaSmrg 19762b2b4fcbSmrgif test "x$use_perl" = x"auto"; then 19772b2b4fcbSmrg AC_PATH_PROG([PERL], [perl]) 19782b2b4fcbSmrg if test "x$PERL" = "x"; then 19792b2b4fcbSmrg AC_MSG_WARN([perl not found - cannot extract information and report]) 19802b2b4fcbSmrg have_perl=no 19812b2b4fcbSmrg else 19822b2b4fcbSmrg have_perl=yes 1983ab47cfaaSmrg fi 19842b2b4fcbSmrgelif test "x$use_perl" = x"yes" ; then 19852b2b4fcbSmrg AC_PATH_PROG([PERL], [perl]) 19862b2b4fcbSmrg if test "x$PERL" = "x"; then 19872b2b4fcbSmrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 19882b2b4fcbSmrg fi 19892b2b4fcbSmrg have_perl=yes 19902b2b4fcbSmrgelif test "x$use_perl" = x"no" ; then 19912b2b4fcbSmrg if test "x$PERL" != "x"; then 19922b2b4fcbSmrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 19932b2b4fcbSmrg fi 19942b2b4fcbSmrg have_perl=no 1995ab47cfaaSmrgelse 19962b2b4fcbSmrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 1997ab47cfaaSmrgfi 1998ab47cfaaSmrg 19992b2b4fcbSmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 20002b2b4fcbSmrg]) # XORG_WITH_PERL 2001ab47cfaaSmrg 20022b2b4fcbSmrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 20032b2b4fcbSmrg# ---------------- 20042b2b4fcbSmrg# Minimum version: 1.5.0 20052b2b4fcbSmrg# Minimum version for optional DEFAULT argument: 1.11.0 20062b2b4fcbSmrg# 20072b2b4fcbSmrg# Documentation tools are not always available on all platforms and sometimes 20082b2b4fcbSmrg# not at the appropriate level. This macro enables a module to test for the 20092b2b4fcbSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 20102b2b4fcbSmrg# the --with-asciidoc option, it allows maximum flexibility in making decisions 20112b2b4fcbSmrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 20122b2b4fcbSmrg# --with-asciidoc assumes 'auto'. 20132b2b4fcbSmrg# 20142b2b4fcbSmrg# Interface to module: 20152b2b4fcbSmrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 20162b2b4fcbSmrg# ASCIIDOC: returns the path of the asciidoc program found 20172b2b4fcbSmrg# returns the path set by the user in the environment 20182b2b4fcbSmrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 20192b2b4fcbSmrg# 'no' user instructs the module not to use asciidoc 20202b2b4fcbSmrg# 20212b2b4fcbSmrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 20222b2b4fcbSmrg# 20232b2b4fcbSmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 20242b2b4fcbSmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 20252b2b4fcbSmrgm4_define([_defopt], m4_default([$2], [auto])) 20262b2b4fcbSmrgAC_ARG_WITH(asciidoc, 20272b2b4fcbSmrg AS_HELP_STRING([--with-asciidoc], 20282b2b4fcbSmrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 20292b2b4fcbSmrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 20302b2b4fcbSmrgm4_undefine([_defopt]) 2031ab47cfaaSmrg 20322b2b4fcbSmrgif test "x$use_asciidoc" = x"auto"; then 20332b2b4fcbSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 20342b2b4fcbSmrg if test "x$ASCIIDOC" = "x"; then 20352b2b4fcbSmrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 20362b2b4fcbSmrg have_asciidoc=no 20372b2b4fcbSmrg else 20382b2b4fcbSmrg have_asciidoc=yes 20396aec45a7Smrg fi 20402b2b4fcbSmrgelif test "x$use_asciidoc" = x"yes" ; then 20412b2b4fcbSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 20422b2b4fcbSmrg if test "x$ASCIIDOC" = "x"; then 20432b2b4fcbSmrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 20442b2b4fcbSmrg fi 20452b2b4fcbSmrg have_asciidoc=yes 20462b2b4fcbSmrgelif test "x$use_asciidoc" = x"no" ; then 20472b2b4fcbSmrg if test "x$ASCIIDOC" != "x"; then 20482b2b4fcbSmrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 20492b2b4fcbSmrg fi 20502b2b4fcbSmrg have_asciidoc=no 2051ab47cfaaSmrgelse 20522b2b4fcbSmrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 2053ab47cfaaSmrgfi 20542b2b4fcbSmrgm4_ifval([$1], 20552b2b4fcbSmrg[if test "$have_asciidoc" = yes; then 20562b2b4fcbSmrg # scrape the asciidoc version 20572b2b4fcbSmrg AC_MSG_CHECKING([the asciidoc version]) 20582b2b4fcbSmrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 20592b2b4fcbSmrg AC_MSG_RESULT([$asciidoc_version]) 20602b2b4fcbSmrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 20612b2b4fcbSmrg [if test "x$use_asciidoc" = xauto; then 20622b2b4fcbSmrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 20632b2b4fcbSmrg have_asciidoc=no 20642b2b4fcbSmrg else 20652b2b4fcbSmrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 20662b2b4fcbSmrg fi]) 20672b2b4fcbSmrgfi]) 20682b2b4fcbSmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 20692b2b4fcbSmrg]) # XORG_WITH_ASCIIDOC 2070ab47cfaaSmrg 20712b2b4fcbSmrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 20722b2b4fcbSmrg# ------------------------------------------- 20732b2b4fcbSmrg# Minimum version: 1.5.0 20742b2b4fcbSmrg# Minimum version for optional DEFAULT argument: 1.11.0 20752b2b4fcbSmrg# Minimum version for optional DOT checking: 1.18.0 20762b2b4fcbSmrg# 20772b2b4fcbSmrg# Documentation tools are not always available on all platforms and sometimes 20782b2b4fcbSmrg# not at the appropriate level. This macro enables a module to test for the 20792b2b4fcbSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 20802b2b4fcbSmrg# the --with-doxygen option, it allows maximum flexibility in making decisions 20812b2b4fcbSmrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 20822b2b4fcbSmrg# --with-doxygen assumes 'auto'. 20832b2b4fcbSmrg# 20842b2b4fcbSmrg# Interface to module: 20852b2b4fcbSmrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 20862b2b4fcbSmrg# DOXYGEN: returns the path of the doxygen program found 20872b2b4fcbSmrg# returns the path set by the user in the environment 20882b2b4fcbSmrg# --with-doxygen: 'yes' user instructs the module to use doxygen 20892b2b4fcbSmrg# 'no' user instructs the module not to use doxygen 20902b2b4fcbSmrg# 20912b2b4fcbSmrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 20922b2b4fcbSmrg# 20932b2b4fcbSmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 20942b2b4fcbSmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 20952b2b4fcbSmrgAC_ARG_VAR([DOT], [Path to the dot graphics utility]) 20962b2b4fcbSmrgm4_define([_defopt], m4_default([$2], [auto])) 20972b2b4fcbSmrgAC_ARG_WITH(doxygen, 20982b2b4fcbSmrg AS_HELP_STRING([--with-doxygen], 20992b2b4fcbSmrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 21002b2b4fcbSmrg [use_doxygen=$withval], [use_doxygen=]_defopt) 21012b2b4fcbSmrgm4_undefine([_defopt]) 2102ab47cfaaSmrg 21032b2b4fcbSmrgif test "x$use_doxygen" = x"auto"; then 21042b2b4fcbSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 21052b2b4fcbSmrg if test "x$DOXYGEN" = "x"; then 21062b2b4fcbSmrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 21072b2b4fcbSmrg have_doxygen=no 21082b2b4fcbSmrg else 21092b2b4fcbSmrg have_doxygen=yes 21102b2b4fcbSmrg fi 21112b2b4fcbSmrgelif test "x$use_doxygen" = x"yes" ; then 21122b2b4fcbSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 21132b2b4fcbSmrg if test "x$DOXYGEN" = "x"; then 21142b2b4fcbSmrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 21152b2b4fcbSmrg fi 21162b2b4fcbSmrg have_doxygen=yes 21172b2b4fcbSmrgelif test "x$use_doxygen" = x"no" ; then 21182b2b4fcbSmrg if test "x$DOXYGEN" != "x"; then 21192b2b4fcbSmrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 21202b2b4fcbSmrg fi 21212b2b4fcbSmrg have_doxygen=no 21222b2b4fcbSmrgelse 21232b2b4fcbSmrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 21242b2b4fcbSmrgfi 21252b2b4fcbSmrgm4_ifval([$1], 21262b2b4fcbSmrg[if test "$have_doxygen" = yes; then 21272b2b4fcbSmrg # scrape the doxygen version 21282b2b4fcbSmrg AC_MSG_CHECKING([the doxygen version]) 21292b2b4fcbSmrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 21302b2b4fcbSmrg AC_MSG_RESULT([$doxygen_version]) 21312b2b4fcbSmrg AS_VERSION_COMPARE([$doxygen_version], [$1], 21322b2b4fcbSmrg [if test "x$use_doxygen" = xauto; then 21332b2b4fcbSmrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 21342b2b4fcbSmrg have_doxygen=no 21352b2b4fcbSmrg else 21362b2b4fcbSmrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 21372b2b4fcbSmrg fi]) 21382b2b4fcbSmrgfi]) 2139ab47cfaaSmrg 21402b2b4fcbSmrgdnl Check for DOT if we have doxygen. The caller decides if it is mandatory 21412b2b4fcbSmrgdnl HAVE_DOT is a variable that can be used in your doxygen.in config file: 21422b2b4fcbSmrgdnl HAVE_DOT = @HAVE_DOT@ 21432b2b4fcbSmrgHAVE_DOT=no 21442b2b4fcbSmrgif test "x$have_doxygen" = "xyes"; then 21452b2b4fcbSmrg AC_PATH_PROG([DOT], [dot]) 21462b2b4fcbSmrg if test "x$DOT" != "x"; then 21472b2b4fcbSmrg HAVE_DOT=yes 21482b2b4fcbSmrg fi 21492b2b4fcbSmrgfi 2150ab47cfaaSmrg 21512b2b4fcbSmrgAC_SUBST([HAVE_DOT]) 21522b2b4fcbSmrgAM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"]) 21532b2b4fcbSmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 21542b2b4fcbSmrg]) # XORG_WITH_DOXYGEN 2155ab47cfaaSmrg 21562b2b4fcbSmrg# XORG_WITH_GROFF([DEFAULT]) 21572b2b4fcbSmrg# ---------------- 21582b2b4fcbSmrg# Minimum version: 1.6.0 21592b2b4fcbSmrg# Minimum version for optional DEFAULT argument: 1.11.0 21602b2b4fcbSmrg# 21612b2b4fcbSmrg# Documentation tools are not always available on all platforms and sometimes 21622b2b4fcbSmrg# not at the appropriate level. This macro enables a module to test for the 21632b2b4fcbSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 21642b2b4fcbSmrg# the --with-groff option, it allows maximum flexibility in making decisions 21652b2b4fcbSmrg# as whether or not to use the groff package. When DEFAULT is not specified, 21662b2b4fcbSmrg# --with-groff assumes 'auto'. 21672b2b4fcbSmrg# 21682b2b4fcbSmrg# Interface to module: 21692b2b4fcbSmrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 21702b2b4fcbSmrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 21712b2b4fcbSmrg# HAVE_GROFF_MS: the -ms macros package 21722b2b4fcbSmrg# GROFF: returns the path of the groff program found 21732b2b4fcbSmrg# returns the path set by the user in the environment 21742b2b4fcbSmrg# --with-groff: 'yes' user instructs the module to use groff 21752b2b4fcbSmrg# 'no' user instructs the module not to use groff 21762b2b4fcbSmrg# 21772b2b4fcbSmrg# Added in version 1.9.0: 21782b2b4fcbSmrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 21792b2b4fcbSmrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 21802b2b4fcbSmrg# psselect from the psutils package. 21812b2b4fcbSmrg# the ghostcript package. Refer to the grohtml man pages 21822b2b4fcbSmrg# 21832b2b4fcbSmrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 21842b2b4fcbSmrg# 21852b2b4fcbSmrg# OS and distros often splits groff in a basic and full package, the former 21862b2b4fcbSmrg# having the groff program and the later having devices, fonts and macros 21872b2b4fcbSmrg# Checking for the groff executable is not enough. 21882b2b4fcbSmrg# 21892b2b4fcbSmrg# If macros are missing, we cannot assume that groff is useless, so we don't 21902b2b4fcbSmrg# unset HAVE_GROFF or GROFF env variables. 21912b2b4fcbSmrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 21922b2b4fcbSmrg# 21932b2b4fcbSmrgAC_DEFUN([XORG_WITH_GROFF],[ 21942b2b4fcbSmrgAC_ARG_VAR([GROFF], [Path to groff command]) 21952b2b4fcbSmrgm4_define([_defopt], m4_default([$1], [auto])) 21962b2b4fcbSmrgAC_ARG_WITH(groff, 21972b2b4fcbSmrg AS_HELP_STRING([--with-groff], 21982b2b4fcbSmrg [Use groff to regenerate documentation (default: ]_defopt[)]), 21992b2b4fcbSmrg [use_groff=$withval], [use_groff=]_defopt) 22002b2b4fcbSmrgm4_undefine([_defopt]) 2201ab47cfaaSmrg 22022b2b4fcbSmrgif test "x$use_groff" = x"auto"; then 22032b2b4fcbSmrg AC_PATH_PROG([GROFF], [groff]) 22042b2b4fcbSmrg if test "x$GROFF" = "x"; then 22052b2b4fcbSmrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 22062b2b4fcbSmrg have_groff=no 22072b2b4fcbSmrg else 22082b2b4fcbSmrg have_groff=yes 22092b2b4fcbSmrg fi 22102b2b4fcbSmrgelif test "x$use_groff" = x"yes" ; then 22112b2b4fcbSmrg AC_PATH_PROG([GROFF], [groff]) 22122b2b4fcbSmrg if test "x$GROFF" = "x"; then 22132b2b4fcbSmrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 22142b2b4fcbSmrg fi 22152b2b4fcbSmrg have_groff=yes 22162b2b4fcbSmrgelif test "x$use_groff" = x"no" ; then 22172b2b4fcbSmrg if test "x$GROFF" != "x"; then 22182b2b4fcbSmrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 22192b2b4fcbSmrg fi 22202b2b4fcbSmrg have_groff=no 22212b2b4fcbSmrgelse 22222b2b4fcbSmrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 22232b2b4fcbSmrgfi 22242b2b4fcbSmrg 22252b2b4fcbSmrg# We have groff, test for the presence of the macro packages 22262b2b4fcbSmrgif test "x$have_groff" = x"yes"; then 22272b2b4fcbSmrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 22282b2b4fcbSmrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 22292b2b4fcbSmrg groff_ms_works=yes 2230ab47cfaaSmrg else 22312b2b4fcbSmrg groff_ms_works=no 2232ab47cfaaSmrg fi 22332b2b4fcbSmrg AC_MSG_RESULT([$groff_ms_works]) 22342b2b4fcbSmrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 22352b2b4fcbSmrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 22362b2b4fcbSmrg groff_mm_works=yes 22372b2b4fcbSmrg else 22382b2b4fcbSmrg groff_mm_works=no 22392b2b4fcbSmrg fi 22402b2b4fcbSmrg AC_MSG_RESULT([$groff_mm_works]) 22412b2b4fcbSmrgfi 2242ab47cfaaSmrg 22432b2b4fcbSmrg# We have groff, test for HTML dependencies, one command per package 22442b2b4fcbSmrgif test "x$have_groff" = x"yes"; then 22452b2b4fcbSmrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 22462b2b4fcbSmrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 22472b2b4fcbSmrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 22482b2b4fcbSmrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 22492b2b4fcbSmrg have_groff_html=yes 22502b2b4fcbSmrg else 22512b2b4fcbSmrg have_groff_html=no 22522b2b4fcbSmrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 22532b2b4fcbSmrg fi 22542b2b4fcbSmrgfi 2255ab47cfaaSmrg 22562b2b4fcbSmrg# Set Automake conditionals for Makefiles 22572b2b4fcbSmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 22582b2b4fcbSmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 22592b2b4fcbSmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 22602b2b4fcbSmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 22612b2b4fcbSmrg]) # XORG_WITH_GROFF 2262aa9e3350Smrg 22632b2b4fcbSmrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 22642b2b4fcbSmrg# --------------------------------------- 22652b2b4fcbSmrg# Minimum version: 1.6.0 22662b2b4fcbSmrg# Minimum version for optional DEFAULT argument: 1.11.0 22672b2b4fcbSmrg# Minimum version for optional MIN-VERSION argument: 1.15.0 22682b2b4fcbSmrg# 22692b2b4fcbSmrg# Documentation tools are not always available on all platforms and sometimes 22702b2b4fcbSmrg# not at the appropriate level. This macro enables a module to test for the 22712b2b4fcbSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 22722b2b4fcbSmrg# the --with-fop option, it allows maximum flexibility in making decisions 22732b2b4fcbSmrg# as whether or not to use the fop package. When DEFAULT is not specified, 22742b2b4fcbSmrg# --with-fop assumes 'auto'. 22752b2b4fcbSmrg# 22762b2b4fcbSmrg# Interface to module: 22772b2b4fcbSmrg# HAVE_FOP: used in makefiles to conditionally generate documentation 22782b2b4fcbSmrg# FOP: returns the path of the fop program found 22792b2b4fcbSmrg# returns the path set by the user in the environment 22802b2b4fcbSmrg# --with-fop: 'yes' user instructs the module to use fop 22812b2b4fcbSmrg# 'no' user instructs the module not to use fop 22822b2b4fcbSmrg# 22832b2b4fcbSmrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 22842b2b4fcbSmrg# 22852b2b4fcbSmrgAC_DEFUN([XORG_WITH_FOP],[ 22862b2b4fcbSmrgAC_ARG_VAR([FOP], [Path to fop command]) 22872b2b4fcbSmrgm4_define([_defopt], m4_default([$2], [auto])) 22882b2b4fcbSmrgAC_ARG_WITH(fop, 22892b2b4fcbSmrg AS_HELP_STRING([--with-fop], 22902b2b4fcbSmrg [Use fop to regenerate documentation (default: ]_defopt[)]), 22912b2b4fcbSmrg [use_fop=$withval], [use_fop=]_defopt) 22922b2b4fcbSmrgm4_undefine([_defopt]) 22932b2b4fcbSmrg 22942b2b4fcbSmrgif test "x$use_fop" = x"auto"; then 22952b2b4fcbSmrg AC_PATH_PROG([FOP], [fop]) 22962b2b4fcbSmrg if test "x$FOP" = "x"; then 22972b2b4fcbSmrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 22982b2b4fcbSmrg have_fop=no 22992b2b4fcbSmrg else 23002b2b4fcbSmrg have_fop=yes 23012b2b4fcbSmrg fi 23022b2b4fcbSmrgelif test "x$use_fop" = x"yes" ; then 23032b2b4fcbSmrg AC_PATH_PROG([FOP], [fop]) 23042b2b4fcbSmrg if test "x$FOP" = "x"; then 23052b2b4fcbSmrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 23062b2b4fcbSmrg fi 23072b2b4fcbSmrg have_fop=yes 23082b2b4fcbSmrgelif test "x$use_fop" = x"no" ; then 23092b2b4fcbSmrg if test "x$FOP" != "x"; then 23102b2b4fcbSmrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 23112b2b4fcbSmrg fi 23122b2b4fcbSmrg have_fop=no 23136aec45a7Smrgelse 23142b2b4fcbSmrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 23156aec45a7Smrgfi 2316ab47cfaaSmrg 23172b2b4fcbSmrg# Test for a minimum version of fop, if provided. 23182b2b4fcbSmrgm4_ifval([$1], 23192b2b4fcbSmrg[if test "$have_fop" = yes; then 23202b2b4fcbSmrg # scrape the fop version 23212b2b4fcbSmrg AC_MSG_CHECKING([for fop minimum version]) 23222b2b4fcbSmrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 23232b2b4fcbSmrg AC_MSG_RESULT([$fop_version]) 23242b2b4fcbSmrg AS_VERSION_COMPARE([$fop_version], [$1], 23252b2b4fcbSmrg [if test "x$use_fop" = xauto; then 23262b2b4fcbSmrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 23272b2b4fcbSmrg have_fop=no 23282b2b4fcbSmrg else 23292b2b4fcbSmrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 23302b2b4fcbSmrg fi]) 23312b2b4fcbSmrgfi]) 23322b2b4fcbSmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 23332b2b4fcbSmrg]) # XORG_WITH_FOP 23342b2b4fcbSmrg 23352b2b4fcbSmrg# XORG_WITH_M4([MIN-VERSION]) 23362b2b4fcbSmrg# --------------------------- 23372b2b4fcbSmrg# Minimum version: 1.19.0 23382b2b4fcbSmrg# 23392b2b4fcbSmrg# This macro attempts to locate an m4 macro processor which supports 23402b2b4fcbSmrg# -I option and is only useful for modules relying on M4 in order to 23412b2b4fcbSmrg# expand macros in source code files. 23422b2b4fcbSmrg# 23432b2b4fcbSmrg# Interface to module: 23442b2b4fcbSmrg# M4: returns the path of the m4 program found 23452b2b4fcbSmrg# returns the path set by the user in the environment 23462b2b4fcbSmrg# 23472b2b4fcbSmrgAC_DEFUN([XORG_WITH_M4], [ 23482b2b4fcbSmrgAC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4], 23492b2b4fcbSmrg [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4], 23502b2b4fcbSmrg [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \ 23512b2b4fcbSmrg ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]], 23522b2b4fcbSmrg [AC_MSG_ERROR([could not find m4 that supports -I option])], 23532b2b4fcbSmrg [$PATH:/usr/gnu/bin])]) 2354ab47cfaaSmrg 23552b2b4fcbSmrgAC_SUBST([M4], [$ac_cv_path_M4]) 23562b2b4fcbSmrg]) # XORG_WITH_M4 2357ab47cfaaSmrg 23582b2b4fcbSmrg# XORG_WITH_PS2PDF([DEFAULT]) 23596aec45a7Smrg# ---------------- 23602b2b4fcbSmrg# Minimum version: 1.6.0 23612b2b4fcbSmrg# Minimum version for optional DEFAULT argument: 1.11.0 23622b2b4fcbSmrg# 23632b2b4fcbSmrg# Documentation tools are not always available on all platforms and sometimes 23642b2b4fcbSmrg# not at the appropriate level. This macro enables a module to test for the 23652b2b4fcbSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 23662b2b4fcbSmrg# the --with-ps2pdf option, it allows maximum flexibility in making decisions 23672b2b4fcbSmrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 23682b2b4fcbSmrg# --with-ps2pdf assumes 'auto'. 23692b2b4fcbSmrg# 23702b2b4fcbSmrg# Interface to module: 23712b2b4fcbSmrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 23722b2b4fcbSmrg# PS2PDF: returns the path of the ps2pdf program found 23732b2b4fcbSmrg# returns the path set by the user in the environment 23742b2b4fcbSmrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 23752b2b4fcbSmrg# 'no' user instructs the module not to use ps2pdf 23762b2b4fcbSmrg# 23772b2b4fcbSmrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 23782b2b4fcbSmrg# 23792b2b4fcbSmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 23802b2b4fcbSmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 23812b2b4fcbSmrgm4_define([_defopt], m4_default([$1], [auto])) 23822b2b4fcbSmrgAC_ARG_WITH(ps2pdf, 23832b2b4fcbSmrg AS_HELP_STRING([--with-ps2pdf], 23842b2b4fcbSmrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 23852b2b4fcbSmrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 23862b2b4fcbSmrgm4_undefine([_defopt]) 23876aec45a7Smrg 23882b2b4fcbSmrgif test "x$use_ps2pdf" = x"auto"; then 23892b2b4fcbSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 23902b2b4fcbSmrg if test "x$PS2PDF" = "x"; then 23912b2b4fcbSmrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 23922b2b4fcbSmrg have_ps2pdf=no 23932b2b4fcbSmrg else 23942b2b4fcbSmrg have_ps2pdf=yes 23952b2b4fcbSmrg fi 23962b2b4fcbSmrgelif test "x$use_ps2pdf" = x"yes" ; then 23972b2b4fcbSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 23982b2b4fcbSmrg if test "x$PS2PDF" = "x"; then 23992b2b4fcbSmrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 24002b2b4fcbSmrg fi 24012b2b4fcbSmrg have_ps2pdf=yes 24022b2b4fcbSmrgelif test "x$use_ps2pdf" = x"no" ; then 24032b2b4fcbSmrg if test "x$PS2PDF" != "x"; then 24042b2b4fcbSmrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 24052b2b4fcbSmrg fi 24062b2b4fcbSmrg have_ps2pdf=no 24076aec45a7Smrgelse 24082b2b4fcbSmrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 24092b2b4fcbSmrgfi 24102b2b4fcbSmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 24112b2b4fcbSmrg]) # XORG_WITH_PS2PDF 24126aec45a7Smrg 24132b2b4fcbSmrg# XORG_ENABLE_DOCS (enable_docs=yes) 24142b2b4fcbSmrg# ---------------- 24152b2b4fcbSmrg# Minimum version: 1.6.0 24162b2b4fcbSmrg# 24172b2b4fcbSmrg# Documentation tools are not always available on all platforms and sometimes 24182b2b4fcbSmrg# not at the appropriate level. This macro enables a builder to skip all 24192b2b4fcbSmrg# documentation targets except traditional man pages. 24202b2b4fcbSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 24212b2b4fcbSmrg# maximum flexibility in controlling documentation building. 24222b2b4fcbSmrg# Refer to: 24232b2b4fcbSmrg# XORG_WITH_XMLTO --with-xmlto 24242b2b4fcbSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 24252b2b4fcbSmrg# XORG_WITH_DOXYGEN --with-doxygen 24262b2b4fcbSmrg# XORG_WITH_FOP --with-fop 24272b2b4fcbSmrg# XORG_WITH_GROFF --with-groff 24282b2b4fcbSmrg# XORG_WITH_PS2PDF --with-ps2pdf 24292b2b4fcbSmrg# 24302b2b4fcbSmrg# Interface to module: 24312b2b4fcbSmrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 24322b2b4fcbSmrg# --enable-docs: 'yes' user instructs the module to generate docs 24332b2b4fcbSmrg# 'no' user instructs the module not to generate docs 24342b2b4fcbSmrg# parm1: specify the default value, yes or no. 24352b2b4fcbSmrg# 24362b2b4fcbSmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 24372b2b4fcbSmrgm4_define([docs_default], m4_default([$1], [yes])) 24382b2b4fcbSmrgAC_ARG_ENABLE(docs, 24392b2b4fcbSmrg AS_HELP_STRING([--enable-docs], 24402b2b4fcbSmrg [Enable building the documentation (default: ]docs_default[)]), 24412b2b4fcbSmrg [build_docs=$enableval], [build_docs=]docs_default) 24422b2b4fcbSmrgm4_undefine([docs_default]) 24432b2b4fcbSmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 24442b2b4fcbSmrgAC_MSG_CHECKING([whether to build documentation]) 24452b2b4fcbSmrgAC_MSG_RESULT([$build_docs]) 24462b2b4fcbSmrg]) # XORG_ENABLE_DOCS 24476aec45a7Smrg 24482b2b4fcbSmrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 24492b2b4fcbSmrg# ---------------- 24502b2b4fcbSmrg# Minimum version: 1.6.0 24512b2b4fcbSmrg# 24522b2b4fcbSmrg# This macro enables a builder to skip all developer documentation. 24532b2b4fcbSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 24542b2b4fcbSmrg# maximum flexibility in controlling documentation building. 24552b2b4fcbSmrg# Refer to: 24562b2b4fcbSmrg# XORG_WITH_XMLTO --with-xmlto 24572b2b4fcbSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 24582b2b4fcbSmrg# XORG_WITH_DOXYGEN --with-doxygen 24592b2b4fcbSmrg# XORG_WITH_FOP --with-fop 24602b2b4fcbSmrg# XORG_WITH_GROFF --with-groff 24612b2b4fcbSmrg# XORG_WITH_PS2PDF --with-ps2pdf 24622b2b4fcbSmrg# 24632b2b4fcbSmrg# Interface to module: 24642b2b4fcbSmrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 24652b2b4fcbSmrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 24662b2b4fcbSmrg# 'no' user instructs the module not to generate developer docs 24672b2b4fcbSmrg# parm1: specify the default value, yes or no. 24682b2b4fcbSmrg# 24692b2b4fcbSmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 24702b2b4fcbSmrgm4_define([devel_default], m4_default([$1], [yes])) 24712b2b4fcbSmrgAC_ARG_ENABLE(devel-docs, 24722b2b4fcbSmrg AS_HELP_STRING([--enable-devel-docs], 24732b2b4fcbSmrg [Enable building the developer documentation (default: ]devel_default[)]), 24742b2b4fcbSmrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 24752b2b4fcbSmrgm4_undefine([devel_default]) 24762b2b4fcbSmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 24772b2b4fcbSmrgAC_MSG_CHECKING([whether to build developer documentation]) 24782b2b4fcbSmrgAC_MSG_RESULT([$build_devel_docs]) 24792b2b4fcbSmrg]) # XORG_ENABLE_DEVEL_DOCS 24806aec45a7Smrg 24812b2b4fcbSmrg# XORG_ENABLE_SPECS (enable_specs=yes) 24822b2b4fcbSmrg# ---------------- 24832b2b4fcbSmrg# Minimum version: 1.6.0 24842b2b4fcbSmrg# 24852b2b4fcbSmrg# This macro enables a builder to skip all functional specification targets. 24862b2b4fcbSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 24872b2b4fcbSmrg# maximum flexibility in controlling documentation building. 24882b2b4fcbSmrg# Refer to: 24892b2b4fcbSmrg# XORG_WITH_XMLTO --with-xmlto 24902b2b4fcbSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 24912b2b4fcbSmrg# XORG_WITH_DOXYGEN --with-doxygen 24922b2b4fcbSmrg# XORG_WITH_FOP --with-fop 24932b2b4fcbSmrg# XORG_WITH_GROFF --with-groff 24942b2b4fcbSmrg# XORG_WITH_PS2PDF --with-ps2pdf 24952b2b4fcbSmrg# 24962b2b4fcbSmrg# Interface to module: 24972b2b4fcbSmrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 24982b2b4fcbSmrg# --enable-specs: 'yes' user instructs the module to generate specs 24992b2b4fcbSmrg# 'no' user instructs the module not to generate specs 25002b2b4fcbSmrg# parm1: specify the default value, yes or no. 25012b2b4fcbSmrg# 25022b2b4fcbSmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 25032b2b4fcbSmrgm4_define([spec_default], m4_default([$1], [yes])) 25042b2b4fcbSmrgAC_ARG_ENABLE(specs, 25052b2b4fcbSmrg AS_HELP_STRING([--enable-specs], 25062b2b4fcbSmrg [Enable building the specs (default: ]spec_default[)]), 25072b2b4fcbSmrg [build_specs=$enableval], [build_specs=]spec_default) 25082b2b4fcbSmrgm4_undefine([spec_default]) 25092b2b4fcbSmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 25102b2b4fcbSmrgAC_MSG_CHECKING([whether to build functional specifications]) 25112b2b4fcbSmrgAC_MSG_RESULT([$build_specs]) 25122b2b4fcbSmrg]) # XORG_ENABLE_SPECS 25136aec45a7Smrg 25142b2b4fcbSmrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 25152b2b4fcbSmrg# ---------------------------------------------- 25162b2b4fcbSmrg# Minimum version: 1.13.0 25172b2b4fcbSmrg# 25182b2b4fcbSmrg# This macro enables a builder to enable/disable unit testing 25192b2b4fcbSmrg# It makes no assumption about the test cases implementation 25202b2b4fcbSmrg# Test cases may or may not use Automake "Support for test suites" 25212b2b4fcbSmrg# They may or may not use the software utility library GLib 25222b2b4fcbSmrg# 25232b2b4fcbSmrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 25242b2b4fcbSmrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 25252b2b4fcbSmrg# The variable enable_unit_tests is used by other macros in this file. 25262b2b4fcbSmrg# 25272b2b4fcbSmrg# Interface to module: 25282b2b4fcbSmrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 25292b2b4fcbSmrg# enable_unit_tests: used in configure.ac for additional configuration 25302b2b4fcbSmrg# --enable-unit-tests: 'yes' user instructs the module to build tests 25312b2b4fcbSmrg# 'no' user instructs the module not to build tests 25322b2b4fcbSmrg# parm1: specify the default value, yes or no. 25332b2b4fcbSmrg# 25342b2b4fcbSmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 25352b2b4fcbSmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 25362b2b4fcbSmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 25372b2b4fcbSmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 25382b2b4fcbSmrgm4_define([_defopt], m4_default([$1], [auto])) 25392b2b4fcbSmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 25402b2b4fcbSmrg [Enable building unit test cases (default: ]_defopt[)]), 25412b2b4fcbSmrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 25422b2b4fcbSmrgm4_undefine([_defopt]) 25432b2b4fcbSmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 25442b2b4fcbSmrgAC_MSG_CHECKING([whether to build unit test cases]) 25452b2b4fcbSmrgAC_MSG_RESULT([$enable_unit_tests]) 25462b2b4fcbSmrg]) # XORG_ENABLE_UNIT_TESTS 25476aec45a7Smrg 25482b2b4fcbSmrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 25492b2b4fcbSmrg# ------------------------------------------------------ 25502b2b4fcbSmrg# Minimum version: 1.17.0 25512b2b4fcbSmrg# 25522b2b4fcbSmrg# This macro enables a builder to enable/disable integration testing 25532b2b4fcbSmrg# It makes no assumption about the test cases' implementation 25542b2b4fcbSmrg# Test cases may or may not use Automake "Support for test suites" 25552b2b4fcbSmrg# 25562b2b4fcbSmrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 25572b2b4fcbSmrg# usually requires less dependencies and may be built and run under less 25582b2b4fcbSmrg# stringent environments than integration tests. 25592b2b4fcbSmrg# 25602b2b4fcbSmrg# Interface to module: 25612b2b4fcbSmrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 25622b2b4fcbSmrg# enable_integration_tests: used in configure.ac for additional configuration 25632b2b4fcbSmrg# --enable-integration-tests: 'yes' user instructs the module to build tests 25642b2b4fcbSmrg# 'no' user instructs the module not to build tests 25652b2b4fcbSmrg# parm1: specify the default value, yes or no. 25662b2b4fcbSmrg# 25672b2b4fcbSmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 25682b2b4fcbSmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 25692b2b4fcbSmrgm4_define([_defopt], m4_default([$1], [auto])) 25702b2b4fcbSmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 25712b2b4fcbSmrg [Enable building integration test cases (default: ]_defopt[)]), 25722b2b4fcbSmrg [enable_integration_tests=$enableval], 25732b2b4fcbSmrg [enable_integration_tests=]_defopt) 25742b2b4fcbSmrgm4_undefine([_defopt]) 25752b2b4fcbSmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 25762b2b4fcbSmrg [test "x$enable_integration_tests" != xno]) 25772b2b4fcbSmrgAC_MSG_CHECKING([whether to build unit test cases]) 25782b2b4fcbSmrgAC_MSG_RESULT([$enable_integration_tests]) 25792b2b4fcbSmrg]) # XORG_ENABLE_INTEGRATION_TESTS 25806aec45a7Smrg 25812b2b4fcbSmrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 25822b2b4fcbSmrg# ---------------------------------------- 25832b2b4fcbSmrg# Minimum version: 1.13.0 25842b2b4fcbSmrg# 25852b2b4fcbSmrg# GLib is a library which provides advanced data structures and functions. 25862b2b4fcbSmrg# This macro enables a module to test for the presence of Glib. 25872b2b4fcbSmrg# 25882b2b4fcbSmrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 25892b2b4fcbSmrg# Otherwise the value of $enable_unit_tests is blank. 25902b2b4fcbSmrg# 25912b2b4fcbSmrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 25922b2b4fcbSmrg# test support usually requires less dependencies and may be built and run under 25932b2b4fcbSmrg# less stringent environments than integration tests. 25942b2b4fcbSmrg# 25952b2b4fcbSmrg# Interface to module: 25962b2b4fcbSmrg# HAVE_GLIB: used in makefiles to conditionally build targets 25972b2b4fcbSmrg# with_glib: used in configure.ac to know if GLib has been found 25982b2b4fcbSmrg# --with-glib: 'yes' user instructs the module to use glib 25992b2b4fcbSmrg# 'no' user instructs the module not to use glib 26002b2b4fcbSmrg# 26012b2b4fcbSmrgAC_DEFUN([XORG_WITH_GLIB],[ 26022b2b4fcbSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 26032b2b4fcbSmrgm4_define([_defopt], m4_default([$2], [auto])) 26042b2b4fcbSmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 26052b2b4fcbSmrg [Use GLib library for unit testing (default: ]_defopt[)]), 26062b2b4fcbSmrg [with_glib=$withval], [with_glib=]_defopt) 26072b2b4fcbSmrgm4_undefine([_defopt]) 26082b2b4fcbSmrg 26092b2b4fcbSmrghave_glib=no 26102b2b4fcbSmrg# Do not probe GLib if user explicitly disabled unit testing 26112b2b4fcbSmrgif test "x$enable_unit_tests" != x"no"; then 26122b2b4fcbSmrg # Do not probe GLib if user explicitly disabled it 26132b2b4fcbSmrg if test "x$with_glib" != x"no"; then 26142b2b4fcbSmrg m4_ifval( 26152b2b4fcbSmrg [$1], 26162b2b4fcbSmrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 26172b2b4fcbSmrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 26182b2b4fcbSmrg ) 2619ab47cfaaSmrg fi 26206aec45a7Smrgfi 26216aec45a7Smrg 26222b2b4fcbSmrg# Not having GLib when unit testing has been explicitly requested is an error 26232b2b4fcbSmrgif test "x$enable_unit_tests" = x"yes"; then 26242b2b4fcbSmrg if test "x$have_glib" = x"no"; then 26252b2b4fcbSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 26262b2b4fcbSmrg fi 26272b2b4fcbSmrgfi 26286aec45a7Smrg 26292b2b4fcbSmrg# Having unit testing disabled when GLib has been explicitly requested is an error 26302b2b4fcbSmrgif test "x$enable_unit_tests" = x"no"; then 26312b2b4fcbSmrg if test "x$with_glib" = x"yes"; then 26322b2b4fcbSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 26332b2b4fcbSmrg fi 26342b2b4fcbSmrgfi 26356aec45a7Smrg 26362b2b4fcbSmrg# Not having GLib when it has been explicitly requested is an error 26372b2b4fcbSmrgif test "x$with_glib" = x"yes"; then 26382b2b4fcbSmrg if test "x$have_glib" = x"no"; then 26392b2b4fcbSmrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 26402b2b4fcbSmrg fi 26412b2b4fcbSmrgfi 26426aec45a7Smrg 26432b2b4fcbSmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 26442b2b4fcbSmrg]) # XORG_WITH_GLIB 26456aec45a7Smrg 26462b2b4fcbSmrg# XORG_LD_WRAP([required|optional]) 26472b2b4fcbSmrg# --------------------------------- 26482b2b4fcbSmrg# Minimum version: 1.13.0 26492b2b4fcbSmrg# 26502b2b4fcbSmrg# Check if linker supports -wrap, passed via compiler flags 26512b2b4fcbSmrg# 26522b2b4fcbSmrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 26532b2b4fcbSmrg# Otherwise the value of $enable_unit_tests is blank. 26542b2b4fcbSmrg# 26552b2b4fcbSmrg# Argument added in 1.16.0 - default is "required", to match existing behavior 26562b2b4fcbSmrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 26572b2b4fcbSmrg# available, an argument of "optional" allows use when some unit tests require 26582b2b4fcbSmrg# ld -wrap and others do not. 26592b2b4fcbSmrg# 26602b2b4fcbSmrgAC_DEFUN([XORG_LD_WRAP],[ 26612b2b4fcbSmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 26622b2b4fcbSmrg [AC_LANG_PROGRAM([#include <stdlib.h> 26632b2b4fcbSmrg void __wrap_exit(int status) { return; }], 26642b2b4fcbSmrg [exit(0);])]) 26652b2b4fcbSmrg# Not having ld wrap when unit testing has been explicitly requested is an error 26662b2b4fcbSmrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 26672b2b4fcbSmrg if test "x$have_ld_wrap" = x"no"; then 26682b2b4fcbSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 26696aec45a7Smrg fi 26702b2b4fcbSmrgfi 26712b2b4fcbSmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 26722b2b4fcbSmrg# 26732b2b4fcbSmrg]) # XORG_LD_WRAP 2674ab47cfaaSmrg 26752b2b4fcbSmrg# XORG_CHECK_LINKER_FLAGS 26762b2b4fcbSmrg# ----------------------- 26772b2b4fcbSmrg# SYNOPSIS 26782b2b4fcbSmrg# 26792b2b4fcbSmrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 26802b2b4fcbSmrg# 26812b2b4fcbSmrg# DESCRIPTION 26822b2b4fcbSmrg# 26832b2b4fcbSmrg# Check whether the given linker FLAGS work with the current language's 26842b2b4fcbSmrg# linker, or whether they give an error. 26852b2b4fcbSmrg# 26862b2b4fcbSmrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 26872b2b4fcbSmrg# success/failure. 26882b2b4fcbSmrg# 26892b2b4fcbSmrg# PROGRAM-SOURCE is the program source to link with, if needed 26902b2b4fcbSmrg# 26912b2b4fcbSmrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 26922b2b4fcbSmrg# 26932b2b4fcbSmrg# LICENSE 26942b2b4fcbSmrg# 26952b2b4fcbSmrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 26962b2b4fcbSmrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 26972b2b4fcbSmrg# Copyright (c) 2009 Matteo Frigo 26982b2b4fcbSmrg# 26992b2b4fcbSmrg# This program is free software: you can redistribute it and/or modify it 27002b2b4fcbSmrg# under the terms of the GNU General Public License as published by the 27012b2b4fcbSmrg# Free Software Foundation, either version 3 of the License, or (at your 27022b2b4fcbSmrg# option) any later version. 27032b2b4fcbSmrg# 27042b2b4fcbSmrg# This program is distributed in the hope that it will be useful, but 27052b2b4fcbSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 27062b2b4fcbSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 27072b2b4fcbSmrg# Public License for more details. 27082b2b4fcbSmrg# 27092b2b4fcbSmrg# You should have received a copy of the GNU General Public License along 27102b2b4fcbSmrg# with this program. If not, see <http://www.gnu.org/licenses/>. 27112b2b4fcbSmrg# 27122b2b4fcbSmrg# As a special exception, the respective Autoconf Macro's copyright owner 27132b2b4fcbSmrg# gives unlimited permission to copy, distribute and modify the configure 27142b2b4fcbSmrg# scripts that are the output of Autoconf when processing the Macro. You 27152b2b4fcbSmrg# need not follow the terms of the GNU General Public License when using 27162b2b4fcbSmrg# or distributing such scripts, even though portions of the text of the 27172b2b4fcbSmrg# Macro appear in them. The GNU General Public License (GPL) does govern 27182b2b4fcbSmrg# all other use of the material that constitutes the Autoconf Macro. 27192b2b4fcbSmrg# 27202b2b4fcbSmrg# This special exception to the GPL applies to versions of the Autoconf 27212b2b4fcbSmrg# Macro released by the Autoconf Archive. When you make and distribute a 27222b2b4fcbSmrg# modified version of the Autoconf Macro, you may extend this special 27232b2b4fcbSmrg# exception to the GPL to apply to your modified version as well.# 27242b2b4fcbSmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 27252b2b4fcbSmrg[AC_MSG_CHECKING([whether the linker accepts $1]) 27262b2b4fcbSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 27272b2b4fcbSmrgAS_LITERAL_IF([$1], 27282b2b4fcbSmrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 27292b2b4fcbSmrg ax_save_FLAGS=$LDFLAGS 27302b2b4fcbSmrg LDFLAGS="$1" 27312b2b4fcbSmrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 27322b2b4fcbSmrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 27332b2b4fcbSmrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 27342b2b4fcbSmrg LDFLAGS=$ax_save_FLAGS])], 27352b2b4fcbSmrg [ax_save_FLAGS=$LDFLAGS 27362b2b4fcbSmrg LDFLAGS="$1" 27372b2b4fcbSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 27382b2b4fcbSmrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 27392b2b4fcbSmrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 27402b2b4fcbSmrg LDFLAGS=$ax_save_FLAGS]) 27412b2b4fcbSmrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 27422b2b4fcbSmrgAC_MSG_RESULT($xorg_check_linker_flags) 27432b2b4fcbSmrgif test "x$xorg_check_linker_flags" = xyes; then 27442b2b4fcbSmrg m4_default([$2], :) 27452b2b4fcbSmrgelse 27462b2b4fcbSmrg m4_default([$3], :) 27472b2b4fcbSmrgfi 27482b2b4fcbSmrg]) # XORG_CHECK_LINKER_FLAGS 27496aec45a7Smrg 27502b2b4fcbSmrg# XORG_MEMORY_CHECK_FLAGS 27512b2b4fcbSmrg# ----------------------- 27522b2b4fcbSmrg# Minimum version: 1.16.0 27532b2b4fcbSmrg# 27542b2b4fcbSmrg# This macro attempts to find appropriate memory checking functionality 27552b2b4fcbSmrg# for various platforms which unit testing code may use to catch various 27562b2b4fcbSmrg# forms of memory allocation and access errors in testing. 27572b2b4fcbSmrg# 27582b2b4fcbSmrg# Interface to module: 27592b2b4fcbSmrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 27602b2b4fcbSmrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 27612b2b4fcbSmrg# 27622b2b4fcbSmrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 27632b2b4fcbSmrg# 27642b2b4fcbSmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 27656aec45a7Smrg 27662b2b4fcbSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 27672b2b4fcbSmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 27682b2b4fcbSmrg [Environment variables to enable memory checking in tests]) 2769ab47cfaaSmrg 27702b2b4fcbSmrg# Check for different types of support on different platforms 27712b2b4fcbSmrgcase $host_os in 27722b2b4fcbSmrg solaris*) 27732b2b4fcbSmrg AC_CHECK_LIB([umem], [umem_alloc], 27742b2b4fcbSmrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 27752b2b4fcbSmrg ;; 27762b2b4fcbSmrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 27772b2b4fcbSmrg # both directly and inverted, so should not be 0 or 255. 27782b2b4fcbSmrg malloc_debug_env='MALLOC_PERTURB_=15' 27792b2b4fcbSmrg ;; 27802b2b4fcbSmrg darwin*) 27812b2b4fcbSmrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 27822b2b4fcbSmrg ;; 27832b2b4fcbSmrg *bsd*) 27842b2b4fcbSmrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 27852b2b4fcbSmrg ;; 27862b2b4fcbSmrgesac 27876aec45a7Smrg 27882b2b4fcbSmrg# User supplied flags override default flags 27892b2b4fcbSmrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 27902b2b4fcbSmrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 27916aec45a7Smrgfi 2792ab47cfaaSmrg 27932b2b4fcbSmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 27942b2b4fcbSmrg]) # XORG_WITH_LINT 2795ab47cfaaSmrg 27962b2b4fcbSmrg# XORG_CHECK_MALLOC_ZERO 27972b2b4fcbSmrg# ---------------------- 27982b2b4fcbSmrg# Minimum version: 1.0.0 27992b2b4fcbSmrg# 28002b2b4fcbSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 28012b2b4fcbSmrg# malloc(0) returns NULL. Packages should add one of these cflags to 28022b2b4fcbSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 28032b2b4fcbSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 28042b2b4fcbSmrgAC_ARG_ENABLE(malloc0returnsnull, 28052b2b4fcbSmrg AS_HELP_STRING([--enable-malloc0returnsnull], 28062b2b4fcbSmrg [malloc(0) returns NULL (default: auto)]), 28072b2b4fcbSmrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 28082b2b4fcbSmrg [MALLOC_ZERO_RETURNS_NULL=auto]) 2809ab47cfaaSmrg 28102b2b4fcbSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 28112b2b4fcbSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 28122b2b4fcbSmrgAC_CACHE_VAL([xorg_cv_malloc0_returns_null], 28132b2b4fcbSmrg [AC_RUN_IFELSE([AC_LANG_PROGRAM([ 28142b2b4fcbSmrg#include <stdlib.h> 28152b2b4fcbSmrg],[ 28162b2b4fcbSmrg char *m0, *r0, *c0, *p; 28172b2b4fcbSmrg m0 = malloc(0); 28182b2b4fcbSmrg p = malloc(10); 28192b2b4fcbSmrg r0 = realloc(p,0); 28202b2b4fcbSmrg c0 = calloc(0,10); 28212b2b4fcbSmrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 28222b2b4fcbSmrg])], 28232b2b4fcbSmrg [xorg_cv_malloc0_returns_null=yes], 28242b2b4fcbSmrg [xorg_cv_malloc0_returns_null=no])]) 28252b2b4fcbSmrgMALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null 28262b2b4fcbSmrgfi 28272b2b4fcbSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 28286aec45a7Smrg 28292b2b4fcbSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 28302b2b4fcbSmrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 28312b2b4fcbSmrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 28322b2b4fcbSmrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 28336aec45a7Smrgelse 28342b2b4fcbSmrg MALLOC_ZERO_CFLAGS="" 28352b2b4fcbSmrg XMALLOC_ZERO_CFLAGS="" 28362b2b4fcbSmrg XTMALLOC_ZERO_CFLAGS="" 28376aec45a7Smrgfi 2838ab47cfaaSmrg 28392b2b4fcbSmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 28402b2b4fcbSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 28412b2b4fcbSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 28422b2b4fcbSmrg]) # XORG_CHECK_MALLOC_ZERO 2843ab47cfaaSmrg 28442b2b4fcbSmrg# XORG_WITH_LINT() 28456aec45a7Smrg# ---------------- 28462b2b4fcbSmrg# Minimum version: 1.1.0 28472b2b4fcbSmrg# 28482b2b4fcbSmrg# This macro enables the use of a tool that flags some suspicious and 28492b2b4fcbSmrg# non-portable constructs (likely to be bugs) in C language source code. 28502b2b4fcbSmrg# It will attempt to locate the tool and use appropriate options. 28512b2b4fcbSmrg# There are various lint type tools on different platforms. 28522b2b4fcbSmrg# 28532b2b4fcbSmrg# Interface to module: 28542b2b4fcbSmrg# LINT: returns the path to the tool found on the platform 28552b2b4fcbSmrg# or the value set to LINT on the configure cmd line 28562b2b4fcbSmrg# also an Automake conditional 28572b2b4fcbSmrg# LINT_FLAGS: an Automake variable with appropriate flags 28582b2b4fcbSmrg# 28592b2b4fcbSmrg# --with-lint: 'yes' user instructs the module to use lint 28602b2b4fcbSmrg# 'no' user instructs the module not to use lint (default) 28612b2b4fcbSmrg# 28622b2b4fcbSmrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 28632b2b4fcbSmrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 28642b2b4fcbSmrg# 28652b2b4fcbSmrgAC_DEFUN([XORG_WITH_LINT],[ 28666aec45a7Smrg 28672b2b4fcbSmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 28682b2b4fcbSmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 28692b2b4fcbSmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 28702b2b4fcbSmrg [Use a lint-style source code checker (default: disabled)])], 28712b2b4fcbSmrg [use_lint=$withval], [use_lint=no]) 28726aec45a7Smrg 28732b2b4fcbSmrg# Obtain platform specific info like program name and options 28742b2b4fcbSmrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 28752b2b4fcbSmrgcase $host_os in 28762b2b4fcbSmrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 28772b2b4fcbSmrg lint_name=splint 28782b2b4fcbSmrg lint_options="-badflag" 28792b2b4fcbSmrg ;; 28802b2b4fcbSmrg *freebsd* | *netbsd*) 28812b2b4fcbSmrg lint_name=lint 28822b2b4fcbSmrg lint_options="-u -b" 28832b2b4fcbSmrg ;; 28842b2b4fcbSmrg *solaris*) 28852b2b4fcbSmrg lint_name=lint 28862b2b4fcbSmrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 28872b2b4fcbSmrg ;; 28882b2b4fcbSmrgesac 28896aec45a7Smrg 28902b2b4fcbSmrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 28912b2b4fcbSmrgif test "x$use_lint" = x"yes" ; then 28922b2b4fcbSmrg AC_PATH_PROG([LINT], [$lint_name]) 28932b2b4fcbSmrg if test "x$LINT" = "x"; then 28942b2b4fcbSmrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 28952b2b4fcbSmrg fi 28962b2b4fcbSmrgelif test "x$use_lint" = x"no" ; then 28972b2b4fcbSmrg if test "x$LINT" != "x"; then 28982b2b4fcbSmrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 28992b2b4fcbSmrg fi 29006aec45a7Smrgelse 29012b2b4fcbSmrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 29026aec45a7Smrgfi 2903ab47cfaaSmrg 29042b2b4fcbSmrg# User supplied flags override default flags 29052b2b4fcbSmrgif test "x$LINT_FLAGS" != "x"; then 29062b2b4fcbSmrg lint_options=$LINT_FLAGS 29076aec45a7Smrgfi 29086aec45a7Smrg 29092b2b4fcbSmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 29102b2b4fcbSmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 29116aec45a7Smrg 29122b2b4fcbSmrg]) # XORG_WITH_LINT 29136aec45a7Smrg 29142b2b4fcbSmrg# XORG_LINT_LIBRARY(LIBNAME) 29152b2b4fcbSmrg# -------------------------- 29162b2b4fcbSmrg# Minimum version: 1.1.0 29172b2b4fcbSmrg# 29182b2b4fcbSmrg# Sets up flags for building lint libraries for checking programs that call 29192b2b4fcbSmrg# functions in the library. 29202b2b4fcbSmrg# 29212b2b4fcbSmrg# Interface to module: 29222b2b4fcbSmrg# LINTLIB - Automake variable with the name of lint library file to make 29232b2b4fcbSmrg# MAKE_LINT_LIB - Automake conditional 29242b2b4fcbSmrg# 29252b2b4fcbSmrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 29262b2b4fcbSmrg# - 'no' user instructs the module not to create a lint library (default) 2927300bf1aeSmrg 29282b2b4fcbSmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 29292b2b4fcbSmrgAC_REQUIRE([XORG_WITH_LINT]) 29302b2b4fcbSmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 29312b2b4fcbSmrg [Create lint library (default: disabled)])], 29322b2b4fcbSmrg [make_lint_lib=$enableval], [make_lint_lib=no]) 2933300bf1aeSmrg 29342b2b4fcbSmrgif test "x$make_lint_lib" = x"yes" ; then 29352b2b4fcbSmrg LINTLIB=llib-l$1.ln 29362b2b4fcbSmrg if test "x$LINT" = "x"; then 29372b2b4fcbSmrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 29382b2b4fcbSmrg fi 29392b2b4fcbSmrgelif test "x$make_lint_lib" != x"no" ; then 29402b2b4fcbSmrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 29412b2b4fcbSmrgfi 29426aec45a7Smrg 29432b2b4fcbSmrgAC_SUBST(LINTLIB) 29442b2b4fcbSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 29456aec45a7Smrg 29462b2b4fcbSmrg]) # XORG_LINT_LIBRARY 2947300bf1aeSmrg 29482b2b4fcbSmrg# XORG_COMPILER_BRAND 29492b2b4fcbSmrg# ------------------- 29502b2b4fcbSmrg# Minimum version: 1.14.0 29512b2b4fcbSmrg# 29522b2b4fcbSmrg# Checks for various brands of compilers and sets flags as appropriate: 29532b2b4fcbSmrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 29542b2b4fcbSmrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 29552b2b4fcbSmrg# clang compiler - sets CLANGCC to "yes" 29562b2b4fcbSmrg# Intel compiler - sets INTELCC to "yes" 29572b2b4fcbSmrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 29582b2b4fcbSmrg# 29592b2b4fcbSmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 29602b2b4fcbSmrgAC_LANG_CASE( 29612b2b4fcbSmrg [C], [ 29622b2b4fcbSmrg dnl autoconf-2.70 folded AC_PROG_CC_C99 into AC_PROG_CC 29632b2b4fcbSmrg dnl and complains that AC_PROG_CC_C99 is obsolete 29642b2b4fcbSmrg m4_version_prereq([2.70], 29652b2b4fcbSmrg [AC_REQUIRE([AC_PROG_CC])], 29662b2b4fcbSmrg [AC_REQUIRE([AC_PROG_CC_C99])]) 29672b2b4fcbSmrg ], 29682b2b4fcbSmrg [C++], [ 29692b2b4fcbSmrg AC_REQUIRE([AC_PROG_CXX]) 29702b2b4fcbSmrg ] 29712b2b4fcbSmrg) 29722b2b4fcbSmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 29732b2b4fcbSmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 29742b2b4fcbSmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 29752b2b4fcbSmrg]) # XORG_COMPILER_BRAND 29766aec45a7Smrg 29772b2b4fcbSmrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 29782b2b4fcbSmrg# --------------- 29792b2b4fcbSmrg# Minimum version: 1.16.0 29802b2b4fcbSmrg# 29812b2b4fcbSmrg# Test if the compiler works when passed the given flag as a command line argument. 29822b2b4fcbSmrg# If it succeeds, the flag is appended to the given variable. If not, it tries the 29832b2b4fcbSmrg# next flag in the list until there are no more options. 29842b2b4fcbSmrg# 29852b2b4fcbSmrg# Note that this does not guarantee that the compiler supports the flag as some 29862b2b4fcbSmrg# compilers will simply ignore arguments that they do not understand, but we do 29872b2b4fcbSmrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 29882b2b4fcbSmrg# -Werror=unused-command-line-argument 29892b2b4fcbSmrg# 29902b2b4fcbSmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 29912b2b4fcbSmrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 29922b2b4fcbSmrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 2993ab47cfaaSmrg 29942b2b4fcbSmrgAC_LANG_COMPILER_REQUIRE 2995300bf1aeSmrg 29962b2b4fcbSmrgAC_LANG_CASE( 29972b2b4fcbSmrg [C], [ 29982b2b4fcbSmrg dnl autoconf-2.70 folded AC_PROG_CC_C99 into AC_PROG_CC 29992b2b4fcbSmrg dnl and complains that AC_PROG_CC_C99 is obsolete 30002b2b4fcbSmrg m4_version_prereq([2.70], 30012b2b4fcbSmrg [AC_REQUIRE([AC_PROG_CC])], 30022b2b4fcbSmrg [AC_REQUIRE([AC_PROG_CC_C99])]) 30032b2b4fcbSmrg define([PREFIX], [C]) 30042b2b4fcbSmrg define([CACHE_PREFIX], [cc]) 30052b2b4fcbSmrg define([COMPILER], [$CC]) 30062b2b4fcbSmrg ], 30072b2b4fcbSmrg [C++], [ 30082b2b4fcbSmrg define([PREFIX], [CXX]) 30092b2b4fcbSmrg define([CACHE_PREFIX], [cxx]) 30102b2b4fcbSmrg define([COMPILER], [$CXX]) 30112b2b4fcbSmrg ] 30122b2b4fcbSmrg) 3013ab47cfaaSmrg 30142b2b4fcbSmrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 3015ab47cfaaSmrg 30162b2b4fcbSmrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 30172b2b4fcbSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 30182b2b4fcbSmrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 30192b2b4fcbSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 30202b2b4fcbSmrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 30212b2b4fcbSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 30222b2b4fcbSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 30232b2b4fcbSmrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 30242b2b4fcbSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 30252b2b4fcbSmrgfi 30266aec45a7Smrg 30272b2b4fcbSmrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 30282b2b4fcbSmrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 30292b2b4fcbSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 30302b2b4fcbSmrg fi 30312b2b4fcbSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 30322b2b4fcbSmrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 30332b2b4fcbSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 30342b2b4fcbSmrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 30352b2b4fcbSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 30362b2b4fcbSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 30372b2b4fcbSmrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 30382b2b4fcbSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 30392b2b4fcbSmrgfi 3040ab47cfaaSmrg 30412b2b4fcbSmrgfound="no" 30422b2b4fcbSmrgm4_foreach([flag], m4_cdr($@), [ 30432b2b4fcbSmrg if test $found = "no" ; then 30442b2b4fcbSmrg if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then 30452b2b4fcbSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 30462b2b4fcbSmrg fi 30476aec45a7Smrg 30482b2b4fcbSmrg if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then 30492b2b4fcbSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 30502b2b4fcbSmrg fi 30516aec45a7Smrg 30522b2b4fcbSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 3053aa9e3350Smrg 30542b2b4fcbSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 30552b2b4fcbSmrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 30562b2b4fcbSmrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 30572b2b4fcbSmrg AC_CACHE_VAL($cacheid, 30582b2b4fcbSmrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 30592b2b4fcbSmrg [eval $cacheid=yes], 30602b2b4fcbSmrg [eval $cacheid=no])]) 3061aa9e3350Smrg 30622b2b4fcbSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 3063aa9e3350Smrg 30642b2b4fcbSmrg eval supported=\$$cacheid 30652b2b4fcbSmrg AC_MSG_RESULT([$supported]) 30662b2b4fcbSmrg if test "$supported" = "yes" ; then 30672b2b4fcbSmrg $1="$$1 ]flag[" 30682b2b4fcbSmrg found="yes" 30692b2b4fcbSmrg fi 30702b2b4fcbSmrg fi 30712b2b4fcbSmrg]) 30722b2b4fcbSmrg]) # XORG_TESTSET_CFLAG 30736aec45a7Smrg 30742b2b4fcbSmrg# XORG_COMPILER_FLAGS 30752b2b4fcbSmrg# --------------- 30762b2b4fcbSmrg# Minimum version: 1.16.0 30772b2b4fcbSmrg# 30782b2b4fcbSmrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 30792b2b4fcbSmrg# arguments supported by the selected compiler which do NOT alter the generated 30802b2b4fcbSmrg# code. These arguments will cause the compiler to print various warnings 30812b2b4fcbSmrg# during compilation AND turn a conservative set of warnings into errors. 30822b2b4fcbSmrg# 30832b2b4fcbSmrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 30842b2b4fcbSmrg# future versions of util-macros as options are added to new compilers. 30852b2b4fcbSmrg# 30862b2b4fcbSmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 30872b2b4fcbSmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 30888697ee19Smrg 30892b2b4fcbSmrgAC_ARG_ENABLE(selective-werror, 30902b2b4fcbSmrg AS_HELP_STRING([--disable-selective-werror], 30912b2b4fcbSmrg [Turn off selective compiler errors. (default: enabled)]), 30922b2b4fcbSmrg [SELECTIVE_WERROR=$enableval], 30932b2b4fcbSmrg [SELECTIVE_WERROR=yes]) 3094ab47cfaaSmrg 30952b2b4fcbSmrgAC_LANG_CASE( 30962b2b4fcbSmrg [C], [ 30972b2b4fcbSmrg define([PREFIX], [C]) 30982b2b4fcbSmrg ], 30992b2b4fcbSmrg [C++], [ 31002b2b4fcbSmrg define([PREFIX], [CXX]) 31012b2b4fcbSmrg ] 31022b2b4fcbSmrg) 31032b2b4fcbSmrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 31042b2b4fcbSmrgif test "x$SUNCC" = "xyes"; then 31052b2b4fcbSmrg [BASE_]PREFIX[FLAGS]="-v" 31062b2b4fcbSmrgelse 31072b2b4fcbSmrg [BASE_]PREFIX[FLAGS]="" 31082b2b4fcbSmrgfi 3109300bf1aeSmrg 31102b2b4fcbSmrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 31112b2b4fcbSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 31122b2b4fcbSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 31132b2b4fcbSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 31142b2b4fcbSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 3115ab47cfaaSmrg 31162b2b4fcbSmrgAC_LANG_CASE( 31172b2b4fcbSmrg [C], [ 31182b2b4fcbSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 31192b2b4fcbSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 31202b2b4fcbSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 31212b2b4fcbSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 31222b2b4fcbSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd]) 31232b2b4fcbSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 31242b2b4fcbSmrg ] 31252b2b4fcbSmrg) 31265c42550eSmrg 31272b2b4fcbSmrg# This chunk adds additional warnings that could catch undesired effects. 31282b2b4fcbSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 31292b2b4fcbSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 31302b2b4fcbSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 31312b2b4fcbSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 31322b2b4fcbSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 31332b2b4fcbSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 31342b2b4fcbSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 31355c42550eSmrg 31362b2b4fcbSmrg# These are currently disabled because they are noisy. They will be enabled 31372b2b4fcbSmrg# in the future once the codebase is sufficiently modernized to silence 31382b2b4fcbSmrg# them. For now, I don't want them to drown out the other warnings. 31392b2b4fcbSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 31402b2b4fcbSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 31412b2b4fcbSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 31425c42550eSmrg 31432b2b4fcbSmrg# Turn some warnings into errors, so we don't accidentally get successful builds 31442b2b4fcbSmrg# when there are problems that should be fixed. 31455c42550eSmrg 31462b2b4fcbSmrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 31472b2b4fcbSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 31482b2b4fcbSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 31492b2b4fcbSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 31502b2b4fcbSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 31512b2b4fcbSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 31522b2b4fcbSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 31532b2b4fcbSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 31542b2b4fcbSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 31552b2b4fcbSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 31562b2b4fcbSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 31572b2b4fcbSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 31582b2b4fcbSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 31592b2b4fcbSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 31602b2b4fcbSmrgelse 31612b2b4fcbSmrgAC_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]) 31622b2b4fcbSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 31632b2b4fcbSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 31642b2b4fcbSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 31652b2b4fcbSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 31662b2b4fcbSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 31672b2b4fcbSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 31682b2b4fcbSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 31692b2b4fcbSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 31702b2b4fcbSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 31712b2b4fcbSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 31722b2b4fcbSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 31732b2b4fcbSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 31742b2b4fcbSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 31752b2b4fcbSmrgfi 31765c42550eSmrg 31772b2b4fcbSmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 31782b2b4fcbSmrg]) # XORG_COMPILER_FLAGS 3179300bf1aeSmrg 31802b2b4fcbSmrg# XORG_CWARNFLAGS 31812b2b4fcbSmrg# --------------- 31822b2b4fcbSmrg# Minimum version: 1.2.0 31832b2b4fcbSmrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 31842b2b4fcbSmrg# 31852b2b4fcbSmrg# Defines CWARNFLAGS to enable C compiler warnings. 31862b2b4fcbSmrg# 31872b2b4fcbSmrg# This function is deprecated because it defines -fno-strict-aliasing 31882b2b4fcbSmrg# which alters the code generated by the compiler. If -fno-strict-aliasing 31892b2b4fcbSmrg# is needed, then it should be added explicitly in the module when 31902b2b4fcbSmrg# it is updated to use BASE_CFLAGS. 31912b2b4fcbSmrg# 31922b2b4fcbSmrgAC_DEFUN([XORG_CWARNFLAGS], [ 31932b2b4fcbSmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 31942b2b4fcbSmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 31952b2b4fcbSmrgAC_LANG_CASE( 31962b2b4fcbSmrg [C], [ 31972b2b4fcbSmrg CWARNFLAGS="$BASE_CFLAGS" 31982b2b4fcbSmrg if test "x$GCC" = xyes ; then 31992b2b4fcbSmrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 32002b2b4fcbSmrg fi 32012b2b4fcbSmrg AC_SUBST(CWARNFLAGS) 32022b2b4fcbSmrg ] 32032b2b4fcbSmrg) 32042b2b4fcbSmrg]) # XORG_CWARNFLAGS 3205300bf1aeSmrg 32062b2b4fcbSmrg# XORG_STRICT_OPTION 32072b2b4fcbSmrg# ----------------------- 32082b2b4fcbSmrg# Minimum version: 1.3.0 32092b2b4fcbSmrg# 32102b2b4fcbSmrg# Add configure option to enable strict compilation flags, such as treating 32112b2b4fcbSmrg# warnings as fatal errors. 32122b2b4fcbSmrg# If --enable-strict-compilation is passed to configure, adds strict flags to 32132b2b4fcbSmrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 32142b2b4fcbSmrg# 32152b2b4fcbSmrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 32162b2b4fcbSmrg# when strict compilation is unconditionally desired. 32172b2b4fcbSmrgAC_DEFUN([XORG_STRICT_OPTION], [ 32182b2b4fcbSmrgAC_REQUIRE([XORG_CWARNFLAGS]) 32192b2b4fcbSmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 3220300bf1aeSmrg 32212b2b4fcbSmrgAC_ARG_ENABLE(strict-compilation, 32222b2b4fcbSmrg AS_HELP_STRING([--enable-strict-compilation], 32232b2b4fcbSmrg [Enable all warnings from compiler and make them errors (default: disabled)]), 32242b2b4fcbSmrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 32255c42550eSmrg 32262b2b4fcbSmrgAC_LANG_CASE( 32272b2b4fcbSmrg [C], [ 32282b2b4fcbSmrg define([PREFIX], [C]) 32292b2b4fcbSmrg ], 32302b2b4fcbSmrg [C++], [ 32312b2b4fcbSmrg define([PREFIX], [CXX]) 32322b2b4fcbSmrg ] 32332b2b4fcbSmrg) 32345c42550eSmrg 32352b2b4fcbSmrg[STRICT_]PREFIX[FLAGS]="" 32362b2b4fcbSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 32372b2b4fcbSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 32385c42550eSmrg 32392b2b4fcbSmrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 32402b2b4fcbSmrg# activate it with -Werror, so we add it here explicitly. 32412b2b4fcbSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 32425c42550eSmrg 32432b2b4fcbSmrgif test "x$STRICT_COMPILE" = "xyes"; then 32442b2b4fcbSmrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 32452b2b4fcbSmrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 32462b2b4fcbSmrgfi 32472b2b4fcbSmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 32482b2b4fcbSmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 32492b2b4fcbSmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 32502b2b4fcbSmrg]) # XORG_STRICT_OPTION 32515c42550eSmrg 32522b2b4fcbSmrg# XORG_DEFAULT_NOCODE_OPTIONS 32532b2b4fcbSmrg# --------------------------- 32542b2b4fcbSmrg# Minimum version: 1.20.0 32552b2b4fcbSmrg# 32562b2b4fcbSmrg# Defines default options for X.Org modules which don't compile code, 32572b2b4fcbSmrg# such as fonts, bitmaps, cursors, and docs. 32582b2b4fcbSmrg# 32592b2b4fcbSmrgAC_DEFUN([XORG_DEFAULT_NOCODE_OPTIONS], [ 32602b2b4fcbSmrgAC_REQUIRE([AC_PROG_INSTALL]) 32612b2b4fcbSmrgXORG_RELEASE_VERSION 32622b2b4fcbSmrgXORG_CHANGELOG 32632b2b4fcbSmrgXORG_INSTALL 32642b2b4fcbSmrgXORG_MANPAGE_SECTIONS 32652b2b4fcbSmrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 32662b2b4fcbSmrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 32672b2b4fcbSmrg]) # XORG_DEFAULT_NOCODE_OPTIONS 32685c42550eSmrg 32692b2b4fcbSmrg# XORG_DEFAULT_OPTIONS 32702b2b4fcbSmrg# -------------------- 32712b2b4fcbSmrg# Minimum version: 1.3.0 32722b2b4fcbSmrg# 32732b2b4fcbSmrg# Defines default options for X.Org modules which compile code. 32742b2b4fcbSmrg# 32752b2b4fcbSmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 32762b2b4fcbSmrgAC_REQUIRE([AC_PROG_INSTALL]) 32772b2b4fcbSmrgXORG_COMPILER_FLAGS 32782b2b4fcbSmrgXORG_CWARNFLAGS 32792b2b4fcbSmrgXORG_STRICT_OPTION 32802b2b4fcbSmrgXORG_DEFAULT_NOCODE_OPTIONS 32812b2b4fcbSmrg]) # XORG_DEFAULT_OPTIONS 32825c42550eSmrg 32832b2b4fcbSmrg# XORG_INSTALL() 32842b2b4fcbSmrg# ---------------- 32852b2b4fcbSmrg# Minimum version: 1.4.0 32862b2b4fcbSmrg# 32872b2b4fcbSmrg# Defines the variable INSTALL_CMD as the command to copy 32882b2b4fcbSmrg# INSTALL from $prefix/share/util-macros. 32892b2b4fcbSmrg# 32902b2b4fcbSmrgAC_DEFUN([XORG_INSTALL], [ 32912b2b4fcbSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 32922b2b4fcbSmrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 32932b2b4fcbSmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 32942b2b4fcbSmrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 32952b2b4fcbSmrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; test -e \$(top_srcdir)/INSTALL || ( \ 32962b2b4fcbSmrgtouch \$(top_srcdir)/INSTALL; \ 32972b2b4fcbSmrgecho 'failed to copy INSTALL from util-macros: installing empty INSTALL.' >&2))" 32982b2b4fcbSmrgAC_SUBST([INSTALL_CMD]) 32992b2b4fcbSmrg]) # XORG_INSTALL 33002b2b4fcbSmrgdnl Copyright 2005 Red Hat, Inc 33012b2b4fcbSmrgdnl 33022b2b4fcbSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 33032b2b4fcbSmrgdnl documentation for any purpose is hereby granted without fee, provided that 33042b2b4fcbSmrgdnl the above copyright notice appear in all copies and that both that 33052b2b4fcbSmrgdnl copyright notice and this permission notice appear in supporting 33062b2b4fcbSmrgdnl documentation. 33072b2b4fcbSmrgdnl 33082b2b4fcbSmrgdnl The above copyright notice and this permission notice shall be included 33092b2b4fcbSmrgdnl in all copies or substantial portions of the Software. 33102b2b4fcbSmrgdnl 33112b2b4fcbSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 33122b2b4fcbSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 33132b2b4fcbSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 33142b2b4fcbSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 33152b2b4fcbSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 33162b2b4fcbSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 33172b2b4fcbSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 33182b2b4fcbSmrgdnl 33192b2b4fcbSmrgdnl Except as contained in this notice, the name of the copyright holders shall 33202b2b4fcbSmrgdnl not be used in advertising or otherwise to promote the sale, use or 33212b2b4fcbSmrgdnl other dealings in this Software without prior written authorization 33222b2b4fcbSmrgdnl from the copyright holders. 33232b2b4fcbSmrgdnl 33245c42550eSmrg 33252b2b4fcbSmrg# XORG_RELEASE_VERSION 33262b2b4fcbSmrg# -------------------- 33272b2b4fcbSmrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 33285c42550eSmrg 33292b2b4fcbSmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 33302b2b4fcbSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 33312b2b4fcbSmrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 33322b2b4fcbSmrg [Major version of this package]) 33332b2b4fcbSmrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 33342b2b4fcbSmrg if test "x$PVM" = "x"; then 33352b2b4fcbSmrg PVM="0" 33362b2b4fcbSmrg fi 33372b2b4fcbSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 33382b2b4fcbSmrg [$PVM], 33392b2b4fcbSmrg [Minor version of this package]) 33402b2b4fcbSmrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 33412b2b4fcbSmrg if test "x$PVP" = "x"; then 33422b2b4fcbSmrg PVP="0" 33432b2b4fcbSmrg fi 33442b2b4fcbSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 33452b2b4fcbSmrg [$PVP], 33462b2b4fcbSmrg [Patch version of this package]) 33472b2b4fcbSmrg]) 33485c42550eSmrg 33492b2b4fcbSmrg# XORG_CHANGELOG() 33502b2b4fcbSmrg# ---------------- 33512b2b4fcbSmrg# Minimum version: 1.2.0 33522b2b4fcbSmrg# 33532b2b4fcbSmrg# Defines the variable CHANGELOG_CMD as the command to generate 33542b2b4fcbSmrg# ChangeLog from git. 33552b2b4fcbSmrg# 33562b2b4fcbSmrg# 33572b2b4fcbSmrgAC_DEFUN([XORG_CHANGELOG], [ 33582b2b4fcbSmrgCHANGELOG_CMD="((GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp) 2>/dev/null && \ 33592b2b4fcbSmrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 33602b2b4fcbSmrg|| (rm -f \$(top_srcdir)/.changelog.tmp; test -e \$(top_srcdir)/ChangeLog || ( \ 33612b2b4fcbSmrgtouch \$(top_srcdir)/ChangeLog; \ 33622b2b4fcbSmrgecho 'git failed to create ChangeLog: installing empty ChangeLog.' >&2))" 33632b2b4fcbSmrgAC_SUBST([CHANGELOG_CMD]) 33642b2b4fcbSmrg]) # XORG_CHANGELOG 33655c42550eSmrg 33665c8a776cSmrgdnl Copyright 2005 Red Hat, Inc 33675c8a776cSmrgdnl 33685c8a776cSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 33695c8a776cSmrgdnl documentation for any purpose is hereby granted without fee, provided that 33705c8a776cSmrgdnl the above copyright notice appear in all copies and that both that 33715c8a776cSmrgdnl copyright notice and this permission notice appear in supporting 33725c8a776cSmrgdnl documentation. 33735c8a776cSmrgdnl 33745c8a776cSmrgdnl The above copyright notice and this permission notice shall be included 33755c8a776cSmrgdnl in all copies or substantial portions of the Software. 33765c8a776cSmrgdnl 33775c8a776cSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 33785c8a776cSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 33795c8a776cSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 33805c8a776cSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 33815c8a776cSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 33825c8a776cSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 33835c8a776cSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 33845c8a776cSmrgdnl 33855c8a776cSmrgdnl Except as contained in this notice, the name of the copyright holders shall 33865c8a776cSmrgdnl not be used in advertising or otherwise to promote the sale, use or 33875c8a776cSmrgdnl other dealings in this Software without prior written authorization 33885c8a776cSmrgdnl from the copyright holders. 33895c8a776cSmrgdnl 33905c8a776cSmrg 33915c8a776cSmrg# XORG_DRIVER_CHECK_EXT(MACRO, PROTO) 33925c8a776cSmrg# -------------------------- 33935c8a776cSmrg# Checks for the MACRO define in xorg-server.h (from the sdk). If it 33945c8a776cSmrg# is defined, then add the given PROTO to $REQUIRED_MODULES. 33955c8a776cSmrg 33965c8a776cSmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 33975c8a776cSmrg AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 33985c8a776cSmrg SAVE_CFLAGS="$CFLAGS" 33995c8a776cSmrg CFLAGS="$CFLAGS `$PKG_CONFIG --cflags xorg-server`" 34005c8a776cSmrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 34015c8a776cSmrg#include "xorg-server.h" 34025c8a776cSmrg#if !defined $1 34035c8a776cSmrg#error $1 not defined 34045c8a776cSmrg#endif 34055c8a776cSmrg ]])], 34065c8a776cSmrg [_EXT_CHECK=yes], 34075c8a776cSmrg [_EXT_CHECK=no]) 34085c8a776cSmrg CFLAGS="$SAVE_CFLAGS" 34095c8a776cSmrg AC_MSG_CHECKING([if $1 is defined]) 34105c8a776cSmrg AC_MSG_RESULT([$_EXT_CHECK]) 34115c8a776cSmrg if test "$_EXT_CHECK" != no; then 34125c8a776cSmrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 34135c8a776cSmrg fi 34145c8a776cSmrg]) 34155c8a776cSmrg 34162b2b4fcbSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 34172b2b4fcbSmrg# 34182b2b4fcbSmrg# Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software 34192b2b4fcbSmrg# Foundation, Inc. 34202b2b4fcbSmrg# Written by Gordon Matzigkeit, 1996 34212b2b4fcbSmrg# 34222b2b4fcbSmrg# This file is free software; the Free Software Foundation gives 34232b2b4fcbSmrg# unlimited permission to copy and/or distribute it, with or without 34242b2b4fcbSmrg# modifications, as long as this notice is preserved. 34255c42550eSmrg 34262b2b4fcbSmrgm4_define([_LT_COPYING], [dnl 34272b2b4fcbSmrg# Copyright (C) 2014 Free Software Foundation, Inc. 34282b2b4fcbSmrg# This is free software; see the source for copying conditions. There is NO 34292b2b4fcbSmrg# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 34305c42550eSmrg 34312b2b4fcbSmrg# GNU Libtool is free software; you can redistribute it and/or modify 34322b2b4fcbSmrg# it under the terms of the GNU General Public License as published by 34332b2b4fcbSmrg# the Free Software Foundation; either version 2 of of the License, or 34342b2b4fcbSmrg# (at your option) any later version. 34352b2b4fcbSmrg# 34362b2b4fcbSmrg# As a special exception to the GNU General Public License, if you 34372b2b4fcbSmrg# distribute this file as part of a program or library that is built 34382b2b4fcbSmrg# using GNU Libtool, you may include this file under the same 34392b2b4fcbSmrg# distribution terms that you use for the rest of that program. 34402b2b4fcbSmrg# 34412b2b4fcbSmrg# GNU Libtool is distributed in the hope that it will be useful, but 34422b2b4fcbSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 34432b2b4fcbSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 34442b2b4fcbSmrg# GNU General Public License for more details. 34452b2b4fcbSmrg# 34462b2b4fcbSmrg# You should have received a copy of the GNU General Public License 34472b2b4fcbSmrg# along with this program. If not, see <http://www.gnu.org/licenses/>. 34482b2b4fcbSmrg]) 34495c42550eSmrg 34502b2b4fcbSmrg# serial 59 LT_INIT 34515c42550eSmrg 34525c42550eSmrg 34532b2b4fcbSmrg# LT_PREREQ(VERSION) 34542b2b4fcbSmrg# ------------------ 34552b2b4fcbSmrg# Complain and exit if this libtool version is less that VERSION. 34562b2b4fcbSmrgm4_defun([LT_PREREQ], 34572b2b4fcbSmrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 34582b2b4fcbSmrg [m4_default([$3], 34592b2b4fcbSmrg [m4_fatal([Libtool version $1 or higher is required], 34602b2b4fcbSmrg 63)])], 34612b2b4fcbSmrg [$2])]) 34625c42550eSmrg 34635c42550eSmrg 34642b2b4fcbSmrg# _LT_CHECK_BUILDDIR 34652b2b4fcbSmrg# ------------------ 34662b2b4fcbSmrg# Complain if the absolute build directory name contains unusual characters 34672b2b4fcbSmrgm4_defun([_LT_CHECK_BUILDDIR], 34682b2b4fcbSmrg[case `pwd` in 34692b2b4fcbSmrg *\ * | *\ *) 34702b2b4fcbSmrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 34716aec45a7Smrgesac 34722b2b4fcbSmrg]) 34735c42550eSmrg 34745c42550eSmrg 34752b2b4fcbSmrg# LT_INIT([OPTIONS]) 34762b2b4fcbSmrg# ------------------ 34772b2b4fcbSmrgAC_DEFUN([LT_INIT], 34782b2b4fcbSmrg[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK 34792b2b4fcbSmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 34802b2b4fcbSmrgAC_BEFORE([$0], [LT_LANG])dnl 34812b2b4fcbSmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 34822b2b4fcbSmrgAC_BEFORE([$0], [LTDL_INIT])dnl 34832b2b4fcbSmrgm4_require([_LT_CHECK_BUILDDIR])dnl 3484300bf1aeSmrg 34852b2b4fcbSmrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 34862b2b4fcbSmrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 34872b2b4fcbSmrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 34882b2b4fcbSmrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 34892b2b4fcbSmrgdnl unless we require an AC_DEFUNed macro: 34902b2b4fcbSmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 34912b2b4fcbSmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 34922b2b4fcbSmrgAC_REQUIRE([LTVERSION_VERSION])dnl 34932b2b4fcbSmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 34942b2b4fcbSmrgm4_require([_LT_PROG_LTMAIN])dnl 34955c42550eSmrg 34962b2b4fcbSmrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 3497300bf1aeSmrg 34982b2b4fcbSmrgdnl Parse OPTIONS 34992b2b4fcbSmrg_LT_SET_OPTIONS([$0], [$1]) 3500300bf1aeSmrg 35012b2b4fcbSmrg# This can be used to rebuild libtool when needed 35022b2b4fcbSmrgLIBTOOL_DEPS=$ltmain 3503300bf1aeSmrg 35042b2b4fcbSmrg# Always use our own libtool. 35052b2b4fcbSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 35062b2b4fcbSmrgAC_SUBST(LIBTOOL)dnl 3507ab47cfaaSmrg 35082b2b4fcbSmrg_LT_SETUP 3509ab47cfaaSmrg 35102b2b4fcbSmrg# Only expand once: 35112b2b4fcbSmrgm4_define([LT_INIT]) 35122b2b4fcbSmrg])# LT_INIT 3513ab47cfaaSmrg 35142b2b4fcbSmrg# Old names: 35152b2b4fcbSmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 35162b2b4fcbSmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 35176aec45a7Smrgdnl aclocal-1.4 backwards compatibility: 35182b2b4fcbSmrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 35192b2b4fcbSmrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 35206aec45a7Smrg 3521ab47cfaaSmrg 35222b2b4fcbSmrg# _LT_PREPARE_CC_BASENAME 35232b2b4fcbSmrg# ----------------------- 35242b2b4fcbSmrgm4_defun([_LT_PREPARE_CC_BASENAME], [ 35252b2b4fcbSmrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 35262b2b4fcbSmrgfunc_cc_basename () 35272b2b4fcbSmrg{ 35282b2b4fcbSmrg for cc_temp in @S|@*""; do 35292b2b4fcbSmrg case $cc_temp in 35302b2b4fcbSmrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 35312b2b4fcbSmrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 35322b2b4fcbSmrg \-*) ;; 35332b2b4fcbSmrg *) break;; 35342b2b4fcbSmrg esac 35352b2b4fcbSmrg done 35362b2b4fcbSmrg func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 35372b2b4fcbSmrg} 35382b2b4fcbSmrg])# _LT_PREPARE_CC_BASENAME 3539ab47cfaaSmrg 35406aec45a7Smrg 35412b2b4fcbSmrg# _LT_CC_BASENAME(CC) 35422b2b4fcbSmrg# ------------------- 35432b2b4fcbSmrg# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, 35442b2b4fcbSmrg# but that macro is also expanded into generated libtool script, which 35452b2b4fcbSmrg# arranges for $SED and $ECHO to be set by different means. 35462b2b4fcbSmrgm4_defun([_LT_CC_BASENAME], 35472b2b4fcbSmrg[m4_require([_LT_PREPARE_CC_BASENAME])dnl 35482b2b4fcbSmrgAC_REQUIRE([_LT_DECL_SED])dnl 35492b2b4fcbSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 35502b2b4fcbSmrgfunc_cc_basename $1 35512b2b4fcbSmrgcc_basename=$func_cc_basename_result 35522b2b4fcbSmrg]) 35536aec45a7Smrg 3554ab47cfaaSmrg 35552b2b4fcbSmrg# _LT_FILEUTILS_DEFAULTS 35562b2b4fcbSmrg# ---------------------- 35572b2b4fcbSmrg# It is okay to use these file commands and assume they have been set 35582b2b4fcbSmrg# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. 35592b2b4fcbSmrgm4_defun([_LT_FILEUTILS_DEFAULTS], 35602b2b4fcbSmrg[: ${CP="cp -f"} 35612b2b4fcbSmrg: ${MV="mv -f"} 35622b2b4fcbSmrg: ${RM="rm -f"} 35632b2b4fcbSmrg])# _LT_FILEUTILS_DEFAULTS 3564ab47cfaaSmrg 35656aec45a7Smrg 35662b2b4fcbSmrg# _LT_SETUP 35672b2b4fcbSmrg# --------- 35682b2b4fcbSmrgm4_defun([_LT_SETUP], 35692b2b4fcbSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 35702b2b4fcbSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 35712b2b4fcbSmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 35722b2b4fcbSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 35736aec45a7Smrg 35742b2b4fcbSmrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 35752b2b4fcbSmrgdnl 35762b2b4fcbSmrg_LT_DECL([], [host_alias], [0], [The host system])dnl 35772b2b4fcbSmrg_LT_DECL([], [host], [0])dnl 35782b2b4fcbSmrg_LT_DECL([], [host_os], [0])dnl 35792b2b4fcbSmrgdnl 35802b2b4fcbSmrg_LT_DECL([], [build_alias], [0], [The build system])dnl 35812b2b4fcbSmrg_LT_DECL([], [build], [0])dnl 35822b2b4fcbSmrg_LT_DECL([], [build_os], [0])dnl 35832b2b4fcbSmrgdnl 35842b2b4fcbSmrgAC_REQUIRE([AC_PROG_CC])dnl 35852b2b4fcbSmrgAC_REQUIRE([LT_PATH_LD])dnl 35862b2b4fcbSmrgAC_REQUIRE([LT_PATH_NM])dnl 35872b2b4fcbSmrgdnl 35882b2b4fcbSmrgAC_REQUIRE([AC_PROG_LN_S])dnl 35892b2b4fcbSmrgtest -z "$LN_S" && LN_S="ln -s" 35902b2b4fcbSmrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 35912b2b4fcbSmrgdnl 35922b2b4fcbSmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 35932b2b4fcbSmrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 35942b2b4fcbSmrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 35952b2b4fcbSmrgdnl 35962b2b4fcbSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 35972b2b4fcbSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 35982b2b4fcbSmrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 35992b2b4fcbSmrgm4_require([_LT_CMD_RELOAD])dnl 36002b2b4fcbSmrgm4_require([_LT_DECL_FILECMD])dnl 36012b2b4fcbSmrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 36022b2b4fcbSmrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 36032b2b4fcbSmrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 36042b2b4fcbSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 36052b2b4fcbSmrgm4_require([_LT_WITH_SYSROOT])dnl 36062b2b4fcbSmrgm4_require([_LT_CMD_TRUNCATE])dnl 3607300bf1aeSmrg 36082b2b4fcbSmrg_LT_CONFIG_LIBTOOL_INIT([ 36092b2b4fcbSmrg# See if we are running on zsh, and set the options that allow our 36102b2b4fcbSmrg# commands through without removal of \ escapes INIT. 36112b2b4fcbSmrgif test -n "\${ZSH_VERSION+set}"; then 36122b2b4fcbSmrg setopt NO_GLOB_SUBST 36132b2b4fcbSmrgfi 36142b2b4fcbSmrg]) 36152b2b4fcbSmrgif test -n "${ZSH_VERSION+set}"; then 36162b2b4fcbSmrg setopt NO_GLOB_SUBST 3617300bf1aeSmrgfi 3618300bf1aeSmrg 36192b2b4fcbSmrg_LT_CHECK_OBJDIR 3620300bf1aeSmrg 36212b2b4fcbSmrgm4_require([_LT_TAG_COMPILER])dnl 3622ab47cfaaSmrg 3623ab47cfaaSmrgcase $host_os in 36242b2b4fcbSmrgaix3*) 36252b2b4fcbSmrg # AIX sometimes has problems with the GCC collect2 program. For some 36262b2b4fcbSmrg # reason, if we set the COLLECT_NAMES environment variable, the problems 36272b2b4fcbSmrg # vanish in a puff of smoke. 36282b2b4fcbSmrg if test set != "${COLLECT_NAMES+set}"; then 36292b2b4fcbSmrg COLLECT_NAMES= 36302b2b4fcbSmrg export COLLECT_NAMES 36312b2b4fcbSmrg fi 3632ab47cfaaSmrg ;; 36332b2b4fcbSmrgesac 3634ab47cfaaSmrg 36352b2b4fcbSmrg# Global variables: 36362b2b4fcbSmrgofile=libtool 36372b2b4fcbSmrgcan_build_shared=yes 3638ab47cfaaSmrg 36392b2b4fcbSmrg# All known linkers require a '.a' archive for static linking (except MSVC and 36402b2b4fcbSmrg# ICC, which need '.lib'). 36412b2b4fcbSmrglibext=a 3642ab47cfaaSmrg 36432b2b4fcbSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 3644ab47cfaaSmrg 36452b2b4fcbSmrgold_CC=$CC 36462b2b4fcbSmrgold_CFLAGS=$CFLAGS 3647ab47cfaaSmrg 36482b2b4fcbSmrg# Set sane defaults for various variables 36492b2b4fcbSmrgtest -z "$CC" && CC=cc 36502b2b4fcbSmrgtest -z "$LTCC" && LTCC=$CC 36512b2b4fcbSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 36522b2b4fcbSmrgtest -z "$LD" && LD=ld 36532b2b4fcbSmrgtest -z "$ac_objext" && ac_objext=o 36546aec45a7Smrg 36552b2b4fcbSmrg_LT_CC_BASENAME([$compiler]) 3656ab47cfaaSmrg 36572b2b4fcbSmrg# Only perform the check for file, if the check method requires it 36582b2b4fcbSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 36592b2b4fcbSmrgcase $deplibs_check_method in 36602b2b4fcbSmrgfile_magic*) 36612b2b4fcbSmrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 36622b2b4fcbSmrg _LT_PATH_MAGIC 3663ab47cfaaSmrg fi 3664ab47cfaaSmrg ;; 36652b2b4fcbSmrgesac 3666ab47cfaaSmrg 36672b2b4fcbSmrg# Use C for the default configuration in the libtool script 36682b2b4fcbSmrgLT_SUPPORTED_TAG([CC]) 36692b2b4fcbSmrg_LT_LANG_C_CONFIG 36702b2b4fcbSmrg_LT_LANG_DEFAULT_CONFIG 36712b2b4fcbSmrg_LT_CONFIG_COMMANDS 36722b2b4fcbSmrg])# _LT_SETUP 36736aec45a7Smrg 3674ab47cfaaSmrg 36752b2b4fcbSmrg# _LT_PREPARE_SED_QUOTE_VARS 36762b2b4fcbSmrg# -------------------------- 36772b2b4fcbSmrg# Define a few sed substitution that help us do robust quoting. 36782b2b4fcbSmrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 36792b2b4fcbSmrg[# Backslashify metacharacters that are still active within 36802b2b4fcbSmrg# double-quoted strings. 36812b2b4fcbSmrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 3682ab47cfaaSmrg 36832b2b4fcbSmrg# Same as above, but do not quote variable references. 36842b2b4fcbSmrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 3685ab47cfaaSmrg 36862b2b4fcbSmrg# Sed substitution to delay expansion of an escaped shell variable in a 36872b2b4fcbSmrg# double_quote_subst'ed string. 36882b2b4fcbSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 3689ab47cfaaSmrg 36902b2b4fcbSmrg# Sed substitution to delay expansion of an escaped single quote. 36912b2b4fcbSmrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 3692ab47cfaaSmrg 36932b2b4fcbSmrg# Sed substitution to avoid accidental globbing in evaled expressions 36942b2b4fcbSmrgno_glob_subst='s/\*/\\\*/g' 36952b2b4fcbSmrg]) 3696ab47cfaaSmrg 36972b2b4fcbSmrg# _LT_PROG_LTMAIN 36982b2b4fcbSmrg# --------------- 36992b2b4fcbSmrg# Note that this code is called both from 'configure', and 'config.status' 37002b2b4fcbSmrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 37012b2b4fcbSmrg# 'config.status' has no value for ac_aux_dir unless we are using Automake, 37022b2b4fcbSmrg# so we pass a copy along to make sure it has a sensible value anyway. 37032b2b4fcbSmrgm4_defun([_LT_PROG_LTMAIN], 37042b2b4fcbSmrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 37052b2b4fcbSmrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 37062b2b4fcbSmrgltmain=$ac_aux_dir/ltmain.sh 37072b2b4fcbSmrg])# _LT_PROG_LTMAIN 3708ab47cfaaSmrg 3709ab47cfaaSmrg 3710ab47cfaaSmrg 37112b2b4fcbSmrg# So that we can recreate a full libtool script including additional 37122b2b4fcbSmrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 37132b2b4fcbSmrg# in macros and then make a single call at the end using the 'libtool' 37142b2b4fcbSmrg# label. 37158697ee19Smrg 3716ab47cfaaSmrg 37172b2b4fcbSmrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 37182b2b4fcbSmrg# ---------------------------------------- 37192b2b4fcbSmrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 37202b2b4fcbSmrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 37212b2b4fcbSmrg[m4_ifval([$1], 37222b2b4fcbSmrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 37232b2b4fcbSmrg [$1 37242b2b4fcbSmrg])])]) 37256aec45a7Smrg 37262b2b4fcbSmrg# Initialize. 37272b2b4fcbSmrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 3728ab47cfaaSmrg 3729aa9e3350Smrg 37302b2b4fcbSmrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 37312b2b4fcbSmrg# ------------------------------ 37322b2b4fcbSmrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 37332b2b4fcbSmrgm4_define([_LT_CONFIG_LIBTOOL], 37342b2b4fcbSmrg[m4_ifval([$1], 37352b2b4fcbSmrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 37362b2b4fcbSmrg [$1 37372b2b4fcbSmrg])])]) 3738aa9e3350Smrg 37392b2b4fcbSmrg# Initialize. 37402b2b4fcbSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 37416aec45a7Smrg 3742ab47cfaaSmrg 37432b2b4fcbSmrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 37442b2b4fcbSmrg# ----------------------------------------------------- 37452b2b4fcbSmrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 37462b2b4fcbSmrg[_LT_CONFIG_LIBTOOL([$1]) 37472b2b4fcbSmrg_LT_CONFIG_LIBTOOL_INIT([$2]) 37482b2b4fcbSmrg]) 3749ab47cfaaSmrg 37506aec45a7Smrg 37512b2b4fcbSmrg# _LT_FORMAT_COMMENT([COMMENT]) 37522b2b4fcbSmrg# ----------------------------- 37532b2b4fcbSmrg# Add leading comment marks to the start of each line, and a trailing 37542b2b4fcbSmrg# full-stop to the whole comment if one is not present already. 37552b2b4fcbSmrgm4_define([_LT_FORMAT_COMMENT], 37562b2b4fcbSmrg[m4_ifval([$1], [ 37572b2b4fcbSmrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 37582b2b4fcbSmrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 37592b2b4fcbSmrg)]) 3760ab47cfaaSmrg 37611473d951Smrg 3762aa9e3350Smrg 37632b2b4fcbSmrg 37642b2b4fcbSmrg 37652b2b4fcbSmrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 37662b2b4fcbSmrg# ------------------------------------------------------------------- 37672b2b4fcbSmrg# CONFIGNAME is the name given to the value in the libtool script. 37682b2b4fcbSmrg# VARNAME is the (base) name used in the configure script. 37692b2b4fcbSmrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 37702b2b4fcbSmrg# VARNAME. Any other value will be used directly. 37712b2b4fcbSmrgm4_define([_LT_DECL], 37722b2b4fcbSmrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 37732b2b4fcbSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 37742b2b4fcbSmrg [m4_ifval([$1], [$1], [$2])]) 37752b2b4fcbSmrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 37762b2b4fcbSmrg m4_ifval([$4], 37772b2b4fcbSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 37782b2b4fcbSmrg lt_dict_add_subkey([lt_decl_dict], [$2], 37792b2b4fcbSmrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 3780aa9e3350Smrg]) 3781aa9e3350Smrg 3782aa9e3350Smrg 37832b2b4fcbSmrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 37842b2b4fcbSmrg# -------------------------------------------------------- 37852b2b4fcbSmrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 3786aa9e3350Smrg 3787aa9e3350Smrg 37882b2b4fcbSmrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 37892b2b4fcbSmrg# ------------------------------------------------ 37902b2b4fcbSmrgm4_define([lt_decl_tag_varnames], 37912b2b4fcbSmrg[_lt_decl_filter([tagged?], [yes], $@)]) 37926aec45a7Smrg 3793300bf1aeSmrg 37942b2b4fcbSmrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 37952b2b4fcbSmrg# --------------------------------------------------------- 37962b2b4fcbSmrgm4_define([_lt_decl_filter], 37972b2b4fcbSmrg[m4_case([$#], 37982b2b4fcbSmrg [0], [m4_fatal([$0: too few arguments: $#])], 37992b2b4fcbSmrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 38002b2b4fcbSmrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 38012b2b4fcbSmrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 38022b2b4fcbSmrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 38032b2b4fcbSmrg]) 3804300bf1aeSmrg 3805ab47cfaaSmrg 38062b2b4fcbSmrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 38072b2b4fcbSmrg# -------------------------------------------------- 38082b2b4fcbSmrgm4_define([lt_decl_quote_varnames], 38092b2b4fcbSmrg[_lt_decl_filter([value], [1], $@)]) 3810ab47cfaaSmrg 3811ab47cfaaSmrg 38122b2b4fcbSmrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 38132b2b4fcbSmrg# --------------------------------------------------- 38142b2b4fcbSmrgm4_define([lt_decl_dquote_varnames], 38152b2b4fcbSmrg[_lt_decl_filter([value], [2], $@)]) 3816ab47cfaaSmrg 3817ab47cfaaSmrg 38182b2b4fcbSmrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 38192b2b4fcbSmrg# --------------------------------------------------- 38202b2b4fcbSmrgm4_define([lt_decl_varnames_tagged], 38212b2b4fcbSmrg[m4_assert([$# <= 2])dnl 38222b2b4fcbSmrg_$0(m4_quote(m4_default([$1], [[, ]])), 38232b2b4fcbSmrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 38242b2b4fcbSmrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 38252b2b4fcbSmrgm4_define([_lt_decl_varnames_tagged], 38262b2b4fcbSmrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 3827ab47cfaaSmrg 3828ab47cfaaSmrg 38292b2b4fcbSmrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 38302b2b4fcbSmrg# ------------------------------------------------ 38312b2b4fcbSmrgm4_define([lt_decl_all_varnames], 38322b2b4fcbSmrg[_$0(m4_quote(m4_default([$1], [[, ]])), 38332b2b4fcbSmrg m4_if([$2], [], 38342b2b4fcbSmrg m4_quote(lt_decl_varnames), 38352b2b4fcbSmrg m4_quote(m4_shift($@))))[]dnl 38362b2b4fcbSmrg]) 38372b2b4fcbSmrgm4_define([_lt_decl_all_varnames], 38382b2b4fcbSmrg[lt_join($@, lt_decl_varnames_tagged([$1], 38392b2b4fcbSmrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 38402b2b4fcbSmrg]) 3841ab47cfaaSmrg 38425c42550eSmrg 38432b2b4fcbSmrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 38442b2b4fcbSmrg# ------------------------------------ 38452b2b4fcbSmrg# Quote a variable value, and forward it to 'config.status' so that its 38462b2b4fcbSmrg# declaration there will have the same value as in 'configure'. VARNAME 38472b2b4fcbSmrg# must have a single quote delimited value for this to work. 38482b2b4fcbSmrgm4_define([_LT_CONFIG_STATUS_DECLARE], 38492b2b4fcbSmrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 38505c42550eSmrg 38515c42550eSmrg 38522b2b4fcbSmrg# _LT_CONFIG_STATUS_DECLARATIONS 38532b2b4fcbSmrg# ------------------------------ 38542b2b4fcbSmrg# We delimit libtool config variables with single quotes, so when 38552b2b4fcbSmrg# we write them to config.status, we have to be sure to quote all 38562b2b4fcbSmrg# embedded single quotes properly. In configure, this macro expands 38572b2b4fcbSmrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 38582b2b4fcbSmrg# 38592b2b4fcbSmrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 38602b2b4fcbSmrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 38612b2b4fcbSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 38622b2b4fcbSmrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 38635c42550eSmrg 3864ab47cfaaSmrg 38652b2b4fcbSmrg# _LT_LIBTOOL_TAGS 38662b2b4fcbSmrg# ---------------- 38672b2b4fcbSmrg# Output comment and list of tags supported by the script 38682b2b4fcbSmrgm4_defun([_LT_LIBTOOL_TAGS], 38692b2b4fcbSmrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 38702b2b4fcbSmrgavailable_tags='_LT_TAGS'dnl 38712b2b4fcbSmrg]) 3872300bf1aeSmrg 3873ab47cfaaSmrg 38742b2b4fcbSmrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 38752b2b4fcbSmrg# ----------------------------------- 38762b2b4fcbSmrg# Extract the dictionary values for VARNAME (optionally with TAG) and 38772b2b4fcbSmrg# expand to a commented shell variable setting: 38782b2b4fcbSmrg# 38792b2b4fcbSmrg# # Some comment about what VAR is for. 38802b2b4fcbSmrg# visible_name=$lt_internal_name 38812b2b4fcbSmrgm4_define([_LT_LIBTOOL_DECLARE], 38822b2b4fcbSmrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 38832b2b4fcbSmrg [description])))[]dnl 38842b2b4fcbSmrgm4_pushdef([_libtool_name], 38852b2b4fcbSmrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 38862b2b4fcbSmrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 38872b2b4fcbSmrg [0], [_libtool_name=[$]$1], 38882b2b4fcbSmrg [1], [_libtool_name=$lt_[]$1], 38892b2b4fcbSmrg [2], [_libtool_name=$lt_[]$1], 38902b2b4fcbSmrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 38912b2b4fcbSmrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 38922b2b4fcbSmrg]) 3893300bf1aeSmrg 3894ab47cfaaSmrg 38952b2b4fcbSmrg# _LT_LIBTOOL_CONFIG_VARS 38962b2b4fcbSmrg# ----------------------- 38972b2b4fcbSmrg# Produce commented declarations of non-tagged libtool config variables 38982b2b4fcbSmrg# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' 38992b2b4fcbSmrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 39002b2b4fcbSmrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 39012b2b4fcbSmrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 39022b2b4fcbSmrg[m4_foreach([_lt_var], 39032b2b4fcbSmrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 39042b2b4fcbSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 39055c42550eSmrg 39065c42550eSmrg 39072b2b4fcbSmrg# _LT_LIBTOOL_TAG_VARS(TAG) 39082b2b4fcbSmrg# ------------------------- 39092b2b4fcbSmrgm4_define([_LT_LIBTOOL_TAG_VARS], 39102b2b4fcbSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 39112b2b4fcbSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 39125c42550eSmrg 39135c42550eSmrg 39142b2b4fcbSmrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 39152b2b4fcbSmrg# ------------------------------ 39162b2b4fcbSmrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 39175c42550eSmrg 39185c42550eSmrg 39192b2b4fcbSmrg# _LT_CONFIG_COMMANDS 39202b2b4fcbSmrg# ------------------- 39212b2b4fcbSmrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 39222b2b4fcbSmrg# variables for single and double quote escaping we saved from calls 39232b2b4fcbSmrg# to _LT_DECL, we can put quote escaped variables declarations 39242b2b4fcbSmrg# into 'config.status', and then the shell code to quote escape them in 39252b2b4fcbSmrg# for loops in 'config.status'. Finally, any additional code accumulated 39262b2b4fcbSmrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 39272b2b4fcbSmrgm4_defun([_LT_CONFIG_COMMANDS], 39282b2b4fcbSmrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 39292b2b4fcbSmrg dnl If the libtool generation code has been placed in $CONFIG_LT, 39302b2b4fcbSmrg dnl instead of duplicating it all over again into config.status, 39312b2b4fcbSmrg dnl then we will have config.status run $CONFIG_LT later, so it 39322b2b4fcbSmrg dnl needs to know what name is stored there: 39332b2b4fcbSmrg [AC_CONFIG_COMMANDS([libtool], 39342b2b4fcbSmrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 39352b2b4fcbSmrg dnl If the libtool generation code is destined for config.status, 39362b2b4fcbSmrg dnl expand the accumulated commands and init code now: 39372b2b4fcbSmrg [AC_CONFIG_COMMANDS([libtool], 39382b2b4fcbSmrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 39392b2b4fcbSmrg])#_LT_CONFIG_COMMANDS 39405c42550eSmrg 3941aa9e3350Smrg 39422b2b4fcbSmrg# Initialize. 39432b2b4fcbSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 39442b2b4fcbSmrg[ 39455c42550eSmrg 39462b2b4fcbSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 39472b2b4fcbSmrg# if CDPATH is set. 39482b2b4fcbSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 39495c42550eSmrg 39502b2b4fcbSmrgsed_quote_subst='$sed_quote_subst' 39512b2b4fcbSmrgdouble_quote_subst='$double_quote_subst' 39522b2b4fcbSmrgdelay_variable_subst='$delay_variable_subst' 39532b2b4fcbSmrg_LT_CONFIG_STATUS_DECLARATIONS 39542b2b4fcbSmrgLTCC='$LTCC' 39552b2b4fcbSmrgLTCFLAGS='$LTCFLAGS' 39562b2b4fcbSmrgcompiler='$compiler_DEFAULT' 39575c42550eSmrg 39582b2b4fcbSmrg# A function that is used when there is no print builtin or printf. 39592b2b4fcbSmrgfunc_fallback_echo () 39606aec45a7Smrg{ 39612b2b4fcbSmrg eval 'cat <<_LTECHO_EOF 39622b2b4fcbSmrg\$[]1 39632b2b4fcbSmrg_LTECHO_EOF' 39646aec45a7Smrg} 3965ab47cfaaSmrg 39662b2b4fcbSmrg# Quote evaled strings. 39672b2b4fcbSmrgfor var in lt_decl_all_varnames([[ \ 39682b2b4fcbSmrg]], lt_decl_quote_varnames); do 39692b2b4fcbSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 39702b2b4fcbSmrg *[[\\\\\\\`\\"\\\$]]*) 39712b2b4fcbSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 39722b2b4fcbSmrg ;; 39732b2b4fcbSmrg *) 39742b2b4fcbSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 39752b2b4fcbSmrg ;; 39762b2b4fcbSmrg esac 39772b2b4fcbSmrgdone 3978ab47cfaaSmrg 39792b2b4fcbSmrg# Double-quote double-evaled strings. 39802b2b4fcbSmrgfor var in lt_decl_all_varnames([[ \ 39812b2b4fcbSmrg]], lt_decl_dquote_varnames); do 39822b2b4fcbSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 39832b2b4fcbSmrg *[[\\\\\\\`\\"\\\$]]*) 39842b2b4fcbSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 39852b2b4fcbSmrg ;; 39862b2b4fcbSmrg *) 39872b2b4fcbSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 39882b2b4fcbSmrg ;; 39892b2b4fcbSmrg esac 39902b2b4fcbSmrgdone 39912b2b4fcbSmrg 39922b2b4fcbSmrg_LT_OUTPUT_LIBTOOL_INIT 39932b2b4fcbSmrg]) 39942b2b4fcbSmrg 39952b2b4fcbSmrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 39962b2b4fcbSmrg# ------------------------------------ 39972b2b4fcbSmrg# Generate a child script FILE with all initialization necessary to 39982b2b4fcbSmrg# reuse the environment learned by the parent script, and make the 39992b2b4fcbSmrg# file executable. If COMMENT is supplied, it is inserted after the 40002b2b4fcbSmrg# '#!' sequence but before initialization text begins. After this 40012b2b4fcbSmrg# macro, additional text can be appended to FILE to form the body of 40022b2b4fcbSmrg# the child script. The macro ends with non-zero status if the 40032b2b4fcbSmrg# file could not be fully written (such as if the disk is full). 40042b2b4fcbSmrgm4_ifdef([AS_INIT_GENERATED], 40052b2b4fcbSmrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 40062b2b4fcbSmrg[m4_defun([_LT_GENERATED_FILE_INIT], 40072b2b4fcbSmrg[m4_require([AS_PREPARE])]dnl 40082b2b4fcbSmrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 40092b2b4fcbSmrg[lt_write_fail=0 40102b2b4fcbSmrgcat >$1 <<_ASEOF || lt_write_fail=1 40112b2b4fcbSmrg#! $SHELL 40122b2b4fcbSmrg# Generated by $as_me. 40132b2b4fcbSmrg$2 40142b2b4fcbSmrgSHELL=\${CONFIG_SHELL-$SHELL} 40152b2b4fcbSmrgexport SHELL 40162b2b4fcbSmrg_ASEOF 40172b2b4fcbSmrgcat >>$1 <<\_ASEOF || lt_write_fail=1 40182b2b4fcbSmrgAS_SHELL_SANITIZE 40192b2b4fcbSmrg_AS_PREPARE 40202b2b4fcbSmrgexec AS_MESSAGE_FD>&1 40212b2b4fcbSmrg_ASEOF 40222b2b4fcbSmrgtest 0 = "$lt_write_fail" && chmod +x $1[]dnl 40232b2b4fcbSmrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 40242b2b4fcbSmrg 40252b2b4fcbSmrg# LT_OUTPUT 40262b2b4fcbSmrg# --------- 40272b2b4fcbSmrg# This macro allows early generation of the libtool script (before 40282b2b4fcbSmrg# AC_OUTPUT is called), incase it is used in configure for compilation 40292b2b4fcbSmrg# tests. 40302b2b4fcbSmrgAC_DEFUN([LT_OUTPUT], 40312b2b4fcbSmrg[: ${CONFIG_LT=./config.lt} 40322b2b4fcbSmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 40332b2b4fcbSmrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 40342b2b4fcbSmrg[# Run this file to recreate a libtool stub with the current configuration.]) 40352b2b4fcbSmrg 40362b2b4fcbSmrgcat >>"$CONFIG_LT" <<\_LTEOF 40372b2b4fcbSmrglt_cl_silent=false 40382b2b4fcbSmrgexec AS_MESSAGE_LOG_FD>>config.log 40392b2b4fcbSmrg{ 40402b2b4fcbSmrg echo 40412b2b4fcbSmrg AS_BOX([Running $as_me.]) 40422b2b4fcbSmrg} >&AS_MESSAGE_LOG_FD 40432b2b4fcbSmrg 40442b2b4fcbSmrglt_cl_help="\ 40452b2b4fcbSmrg'$as_me' creates a local libtool stub from the current configuration, 40462b2b4fcbSmrgfor use in further configure time tests before the real libtool is 40472b2b4fcbSmrggenerated. 40482b2b4fcbSmrg 40492b2b4fcbSmrgUsage: $[0] [[OPTIONS]] 40502b2b4fcbSmrg 40512b2b4fcbSmrg -h, --help print this help, then exit 40522b2b4fcbSmrg -V, --version print version number, then exit 40532b2b4fcbSmrg -q, --quiet do not print progress messages 40542b2b4fcbSmrg -d, --debug don't remove temporary files 40552b2b4fcbSmrg 40562b2b4fcbSmrgReport bugs to <bug-libtool@gnu.org>." 40572b2b4fcbSmrg 40582b2b4fcbSmrglt_cl_version="\ 40592b2b4fcbSmrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 40602b2b4fcbSmrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 40612b2b4fcbSmrgconfigured by $[0], generated by m4_PACKAGE_STRING. 40622b2b4fcbSmrg 40632b2b4fcbSmrgCopyright (C) 2011 Free Software Foundation, Inc. 40642b2b4fcbSmrgThis config.lt script is free software; the Free Software Foundation 40652b2b4fcbSmrggives unlimited permision to copy, distribute and modify it." 40662b2b4fcbSmrg 40672b2b4fcbSmrgwhile test 0 != $[#] 40682b2b4fcbSmrgdo 40692b2b4fcbSmrg case $[1] in 40702b2b4fcbSmrg --version | --v* | -V ) 40712b2b4fcbSmrg echo "$lt_cl_version"; exit 0 ;; 40722b2b4fcbSmrg --help | --h* | -h ) 40732b2b4fcbSmrg echo "$lt_cl_help"; exit 0 ;; 40742b2b4fcbSmrg --debug | --d* | -d ) 40752b2b4fcbSmrg debug=: ;; 40762b2b4fcbSmrg --quiet | --q* | --silent | --s* | -q ) 40772b2b4fcbSmrg lt_cl_silent=: ;; 40782b2b4fcbSmrg 40792b2b4fcbSmrg -*) AC_MSG_ERROR([unrecognized option: $[1] 40802b2b4fcbSmrgTry '$[0] --help' for more information.]) ;; 40812b2b4fcbSmrg 40822b2b4fcbSmrg *) AC_MSG_ERROR([unrecognized argument: $[1] 40832b2b4fcbSmrgTry '$[0] --help' for more information.]) ;; 40842b2b4fcbSmrg esac 40852b2b4fcbSmrg shift 40862b2b4fcbSmrgdone 40872b2b4fcbSmrg 40882b2b4fcbSmrgif $lt_cl_silent; then 40892b2b4fcbSmrg exec AS_MESSAGE_FD>/dev/null 4090aa9e3350Smrgfi 40912b2b4fcbSmrg_LTEOF 4092aa9e3350Smrg 40932b2b4fcbSmrgcat >>"$CONFIG_LT" <<_LTEOF 40942b2b4fcbSmrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 40952b2b4fcbSmrg_LTEOF 4096ab47cfaaSmrg 40972b2b4fcbSmrgcat >>"$CONFIG_LT" <<\_LTEOF 40982b2b4fcbSmrgAC_MSG_NOTICE([creating $ofile]) 40992b2b4fcbSmrg_LT_OUTPUT_LIBTOOL_COMMANDS 41002b2b4fcbSmrgAS_EXIT(0) 41012b2b4fcbSmrg_LTEOF 41022b2b4fcbSmrgchmod +x "$CONFIG_LT" 4103ab47cfaaSmrg 41042b2b4fcbSmrg# configure is writing to config.log, but config.lt does its own redirection, 41052b2b4fcbSmrg# appending to config.log, which fails on DOS, as config.log is still kept 41062b2b4fcbSmrg# open by configure. Here we exec the FD to /dev/null, effectively closing 41072b2b4fcbSmrg# config.log, so it can be properly (re)opened and appended to by config.lt. 41082b2b4fcbSmrglt_cl_success=: 41092b2b4fcbSmrgtest yes = "$silent" && 41102b2b4fcbSmrg lt_config_lt_args="$lt_config_lt_args --quiet" 41112b2b4fcbSmrgexec AS_MESSAGE_LOG_FD>/dev/null 41122b2b4fcbSmrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 41132b2b4fcbSmrgexec AS_MESSAGE_LOG_FD>>config.log 41142b2b4fcbSmrg$lt_cl_success || AS_EXIT(1) 41152b2b4fcbSmrg])# LT_OUTPUT 4116ab47cfaaSmrg 41175c42550eSmrg 41182b2b4fcbSmrg# _LT_CONFIG(TAG) 41192b2b4fcbSmrg# --------------- 41202b2b4fcbSmrg# If TAG is the built-in tag, create an initial libtool script with a 41212b2b4fcbSmrg# default configuration from the untagged config vars. Otherwise add code 41222b2b4fcbSmrg# to config.status for appending the configuration named by TAG from the 41232b2b4fcbSmrg# matching tagged config vars. 41242b2b4fcbSmrgm4_defun([_LT_CONFIG], 41252b2b4fcbSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 41262b2b4fcbSmrg_LT_CONFIG_SAVE_COMMANDS([ 41272b2b4fcbSmrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 41282b2b4fcbSmrg m4_if(_LT_TAG, [C], [ 41292b2b4fcbSmrg # See if we are running on zsh, and set the options that allow our 41302b2b4fcbSmrg # commands through without removal of \ escapes. 41312b2b4fcbSmrg if test -n "${ZSH_VERSION+set}"; then 41322b2b4fcbSmrg setopt NO_GLOB_SUBST 41332b2b4fcbSmrg fi 41345c42550eSmrg 41352b2b4fcbSmrg cfgfile=${ofile}T 41362b2b4fcbSmrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 41372b2b4fcbSmrg $RM "$cfgfile" 41385c42550eSmrg 41392b2b4fcbSmrg cat <<_LT_EOF >> "$cfgfile" 41402b2b4fcbSmrg#! $SHELL 41412b2b4fcbSmrg# Generated automatically by $as_me ($PACKAGE) $VERSION 41422b2b4fcbSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 41432b2b4fcbSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 4144ab47cfaaSmrg 41452b2b4fcbSmrg# Provide generalized library-building support services. 41462b2b4fcbSmrg# Written by Gordon Matzigkeit, 1996 4147ab47cfaaSmrg 41482b2b4fcbSmrg_LT_COPYING 41492b2b4fcbSmrg_LT_LIBTOOL_TAGS 4150300bf1aeSmrg 41512b2b4fcbSmrg# Configured defaults for sys_lib_dlsearch_path munging. 41522b2b4fcbSmrg: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} 4153ab47cfaaSmrg 41542b2b4fcbSmrg# ### BEGIN LIBTOOL CONFIG 41552b2b4fcbSmrg_LT_LIBTOOL_CONFIG_VARS 41562b2b4fcbSmrg_LT_LIBTOOL_TAG_VARS 41572b2b4fcbSmrg# ### END LIBTOOL CONFIG 4158ab47cfaaSmrg 41592b2b4fcbSmrg_LT_EOF 4160ab47cfaaSmrg 41612b2b4fcbSmrg cat <<'_LT_EOF' >> "$cfgfile" 4162ab47cfaaSmrg 41632b2b4fcbSmrg# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE 4164ab47cfaaSmrg 41652b2b4fcbSmrg_LT_PREPARE_MUNGE_PATH_LIST 41662b2b4fcbSmrg_LT_PREPARE_CC_BASENAME 4167ab47cfaaSmrg 41682b2b4fcbSmrg# ### END FUNCTIONS SHARED WITH CONFIGURE 4169ab47cfaaSmrg 41706aec45a7Smrg_LT_EOF 4171ab47cfaaSmrg 41722b2b4fcbSmrg case $host_os in 41732b2b4fcbSmrg aix3*) 41742b2b4fcbSmrg cat <<\_LT_EOF >> "$cfgfile" 41752b2b4fcbSmrg# AIX sometimes has problems with the GCC collect2 program. For some 41762b2b4fcbSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems 41772b2b4fcbSmrg# vanish in a puff of smoke. 41782b2b4fcbSmrgif test set != "${COLLECT_NAMES+set}"; then 41792b2b4fcbSmrg COLLECT_NAMES= 41802b2b4fcbSmrg export COLLECT_NAMES 41812b2b4fcbSmrgfi 41826aec45a7Smrg_LT_EOF 41832b2b4fcbSmrg ;; 41842b2b4fcbSmrg esac 4185ab47cfaaSmrg 41862b2b4fcbSmrg _LT_PROG_LTMAIN 41872b2b4fcbSmrg 41882b2b4fcbSmrg # We use sed instead of cat because bash on DJGPP gets confused if 41892b2b4fcbSmrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 41902b2b4fcbSmrg # text mode, it properly converts lines to CR/LF. This bash problem 41912b2b4fcbSmrg # is reportedly fixed, but why not run on old versions too? 41922b2b4fcbSmrg $SED '$q' "$ltmain" >> "$cfgfile" \ 41932b2b4fcbSmrg || (rm -f "$cfgfile"; exit 1) 4194ab47cfaaSmrg 41952b2b4fcbSmrg mv -f "$cfgfile" "$ofile" || 41962b2b4fcbSmrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 41972b2b4fcbSmrg chmod +x "$ofile" 41982b2b4fcbSmrg], 41992b2b4fcbSmrg[cat <<_LT_EOF >> "$ofile" 4200ab47cfaaSmrg 42012b2b4fcbSmrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 42022b2b4fcbSmrgdnl in a comment (ie after a #). 42032b2b4fcbSmrg# ### BEGIN LIBTOOL TAG CONFIG: $1 42042b2b4fcbSmrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 42052b2b4fcbSmrg# ### END LIBTOOL TAG CONFIG: $1 42062b2b4fcbSmrg_LT_EOF 42072b2b4fcbSmrg])dnl /m4_if 42082b2b4fcbSmrg], 42092b2b4fcbSmrg[m4_if([$1], [], [ 42102b2b4fcbSmrg PACKAGE='$PACKAGE' 42112b2b4fcbSmrg VERSION='$VERSION' 42122b2b4fcbSmrg RM='$RM' 42132b2b4fcbSmrg ofile='$ofile'], []) 42142b2b4fcbSmrg])dnl /_LT_CONFIG_SAVE_COMMANDS 42152b2b4fcbSmrg])# _LT_CONFIG 4216ab47cfaaSmrg 4217ab47cfaaSmrg 42182b2b4fcbSmrg# LT_SUPPORTED_TAG(TAG) 42192b2b4fcbSmrg# --------------------- 42202b2b4fcbSmrg# Trace this macro to discover what tags are supported by the libtool 42212b2b4fcbSmrg# --tag option, using: 42222b2b4fcbSmrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 42232b2b4fcbSmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 4224ab47cfaaSmrg 4225ab47cfaaSmrg 42262b2b4fcbSmrg# C support is built-in for now 42272b2b4fcbSmrgm4_define([_LT_LANG_C_enabled], []) 42282b2b4fcbSmrgm4_define([_LT_TAGS], []) 4229ab47cfaaSmrg 4230ab47cfaaSmrg 42312b2b4fcbSmrg# LT_LANG(LANG) 42322b2b4fcbSmrg# ------------- 42332b2b4fcbSmrg# Enable libtool support for the given language if not already enabled. 42342b2b4fcbSmrgAC_DEFUN([LT_LANG], 42352b2b4fcbSmrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 42362b2b4fcbSmrgm4_case([$1], 42372b2b4fcbSmrg [C], [_LT_LANG(C)], 42382b2b4fcbSmrg [C++], [_LT_LANG(CXX)], 42392b2b4fcbSmrg [Go], [_LT_LANG(GO)], 42402b2b4fcbSmrg [Java], [_LT_LANG(GCJ)], 42412b2b4fcbSmrg [Fortran 77], [_LT_LANG(F77)], 42422b2b4fcbSmrg [Fortran], [_LT_LANG(FC)], 42432b2b4fcbSmrg [Windows Resource], [_LT_LANG(RC)], 42442b2b4fcbSmrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 42452b2b4fcbSmrg [_LT_LANG($1)], 42462b2b4fcbSmrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 42472b2b4fcbSmrg])# LT_LANG 4248ab47cfaaSmrg 4249ab47cfaaSmrg 42502b2b4fcbSmrg# _LT_LANG(LANGNAME) 42512b2b4fcbSmrg# ------------------ 42522b2b4fcbSmrgm4_defun([_LT_LANG], 42532b2b4fcbSmrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 42542b2b4fcbSmrg [LT_SUPPORTED_TAG([$1])dnl 42552b2b4fcbSmrg m4_append([_LT_TAGS], [$1 ])dnl 42562b2b4fcbSmrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 42572b2b4fcbSmrg _LT_LANG_$1_CONFIG($1)])dnl 42582b2b4fcbSmrg])# _LT_LANG 42592b2b4fcbSmrg 4260ab47cfaaSmrg 42612b2b4fcbSmrgm4_ifndef([AC_PROG_GO], [ 42622b2b4fcbSmrg# NOTE: This macro has been submitted for inclusion into # 42632b2b4fcbSmrg# GNU Autoconf as AC_PROG_GO. When it is available in # 42642b2b4fcbSmrg# a released version of Autoconf we should remove this # 42652b2b4fcbSmrg# macro and use it instead. # 42662b2b4fcbSmrgm4_defun([AC_PROG_GO], 42672b2b4fcbSmrg[AC_LANG_PUSH(Go)dnl 42682b2b4fcbSmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 42692b2b4fcbSmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 42702b2b4fcbSmrg_AC_ARG_VAR_LDFLAGS()dnl 42712b2b4fcbSmrgAC_CHECK_TOOL(GOC, gccgo) 42722b2b4fcbSmrgif test -z "$GOC"; then 42732b2b4fcbSmrg if test -n "$ac_tool_prefix"; then 42742b2b4fcbSmrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 42752b2b4fcbSmrg fi 42762b2b4fcbSmrgfi 42772b2b4fcbSmrgif test -z "$GOC"; then 42782b2b4fcbSmrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 42792b2b4fcbSmrgfi 42802b2b4fcbSmrg])#m4_defun 42812b2b4fcbSmrg])#m4_ifndef 4282ab47cfaaSmrg 4283ab47cfaaSmrg 42842b2b4fcbSmrg# _LT_LANG_DEFAULT_CONFIG 42852b2b4fcbSmrg# ----------------------- 42862b2b4fcbSmrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 42872b2b4fcbSmrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 42882b2b4fcbSmrg [LT_LANG(CXX)], 42892b2b4fcbSmrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 4290ab47cfaaSmrg 42912b2b4fcbSmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 42922b2b4fcbSmrg [LT_LANG(F77)], 42932b2b4fcbSmrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 4294ab47cfaaSmrg 42952b2b4fcbSmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 42962b2b4fcbSmrg [LT_LANG(FC)], 42972b2b4fcbSmrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 42986aec45a7Smrg 42992b2b4fcbSmrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 43002b2b4fcbSmrgdnl pulling things in needlessly. 43012b2b4fcbSmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 43022b2b4fcbSmrg [LT_LANG(GCJ)], 43032b2b4fcbSmrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 43042b2b4fcbSmrg [LT_LANG(GCJ)], 43052b2b4fcbSmrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 43062b2b4fcbSmrg [LT_LANG(GCJ)], 43072b2b4fcbSmrg [m4_ifdef([AC_PROG_GCJ], 43082b2b4fcbSmrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 43092b2b4fcbSmrg m4_ifdef([A][M_PROG_GCJ], 43102b2b4fcbSmrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 43112b2b4fcbSmrg m4_ifdef([LT_PROG_GCJ], 43122b2b4fcbSmrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 43131473d951Smrg 43142b2b4fcbSmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 43152b2b4fcbSmrg [LT_LANG(GO)], 43162b2b4fcbSmrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 4317ab47cfaaSmrg 43182b2b4fcbSmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 43192b2b4fcbSmrg [LT_LANG(RC)], 43202b2b4fcbSmrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 43212b2b4fcbSmrg])# _LT_LANG_DEFAULT_CONFIG 4322ab47cfaaSmrg 43232b2b4fcbSmrg# Obsolete macros: 43242b2b4fcbSmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 43252b2b4fcbSmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 43262b2b4fcbSmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 43272b2b4fcbSmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 43282b2b4fcbSmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 43292b2b4fcbSmrgdnl aclocal-1.4 backwards compatibility: 43302b2b4fcbSmrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 43312b2b4fcbSmrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 43322b2b4fcbSmrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 43332b2b4fcbSmrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 43342b2b4fcbSmrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 4335ab47cfaaSmrg 4336ab47cfaaSmrg 43372b2b4fcbSmrg# _LT_TAG_COMPILER 43382b2b4fcbSmrg# ---------------- 43392b2b4fcbSmrgm4_defun([_LT_TAG_COMPILER], 43402b2b4fcbSmrg[AC_REQUIRE([AC_PROG_CC])dnl 43412b2b4fcbSmrg 43422b2b4fcbSmrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 43432b2b4fcbSmrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 43442b2b4fcbSmrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 43452b2b4fcbSmrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 4346ab47cfaaSmrg 43472b2b4fcbSmrg# If no C compiler was specified, use CC. 43482b2b4fcbSmrgLTCC=${LTCC-"$CC"} 4349ab47cfaaSmrg 43502b2b4fcbSmrg# If no C compiler flags were specified, use CFLAGS. 43512b2b4fcbSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 4352ab47cfaaSmrg 43532b2b4fcbSmrg# Allow CC to be a program name with arguments. 43542b2b4fcbSmrgcompiler=$CC 43552b2b4fcbSmrg])# _LT_TAG_COMPILER 4356ab47cfaaSmrg 4357300bf1aeSmrg 43582b2b4fcbSmrg# _LT_COMPILER_BOILERPLATE 43592b2b4fcbSmrg# ------------------------ 43602b2b4fcbSmrg# Check for compiler boilerplate output or warnings with 43612b2b4fcbSmrg# the simple compiler test code. 43622b2b4fcbSmrgm4_defun([_LT_COMPILER_BOILERPLATE], 43632b2b4fcbSmrg[m4_require([_LT_DECL_SED])dnl 43642b2b4fcbSmrgac_outfile=conftest.$ac_objext 43652b2b4fcbSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 43662b2b4fcbSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 43672b2b4fcbSmrg_lt_compiler_boilerplate=`cat conftest.err` 43682b2b4fcbSmrg$RM conftest* 43692b2b4fcbSmrg])# _LT_COMPILER_BOILERPLATE 4370ab47cfaaSmrg 4371ab47cfaaSmrg 43722b2b4fcbSmrg# _LT_LINKER_BOILERPLATE 43732b2b4fcbSmrg# ---------------------- 43742b2b4fcbSmrg# Check for linker boilerplate output or warnings with 43752b2b4fcbSmrg# the simple link test code. 43762b2b4fcbSmrgm4_defun([_LT_LINKER_BOILERPLATE], 43772b2b4fcbSmrg[m4_require([_LT_DECL_SED])dnl 43782b2b4fcbSmrgac_outfile=conftest.$ac_objext 43792b2b4fcbSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 43802b2b4fcbSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 43812b2b4fcbSmrg_lt_linker_boilerplate=`cat conftest.err` 43822b2b4fcbSmrg$RM -r conftest* 43832b2b4fcbSmrg])# _LT_LINKER_BOILERPLATE 4384ab47cfaaSmrg 43852b2b4fcbSmrg# _LT_REQUIRED_DARWIN_CHECKS 43862b2b4fcbSmrg# ------------------------- 43872b2b4fcbSmrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 43882b2b4fcbSmrg case $host_os in 43892b2b4fcbSmrg rhapsody* | darwin*) 43902b2b4fcbSmrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 43912b2b4fcbSmrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 43922b2b4fcbSmrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 43932b2b4fcbSmrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 43942b2b4fcbSmrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 43952b2b4fcbSmrg _LT_DECL([], [DSYMUTIL], [1], 43962b2b4fcbSmrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 43972b2b4fcbSmrg _LT_DECL([], [NMEDIT], [1], 43982b2b4fcbSmrg [Tool to change global to local symbols on Mac OS X]) 43992b2b4fcbSmrg _LT_DECL([], [LIPO], [1], 44002b2b4fcbSmrg [Tool to manipulate fat objects and archives on Mac OS X]) 44012b2b4fcbSmrg _LT_DECL([], [OTOOL], [1], 44022b2b4fcbSmrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 44032b2b4fcbSmrg _LT_DECL([], [OTOOL64], [1], 44042b2b4fcbSmrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 44052b2b4fcbSmrg 44062b2b4fcbSmrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 44072b2b4fcbSmrg [lt_cv_apple_cc_single_mod=no 44082b2b4fcbSmrg if test -z "$LT_MULTI_MODULE"; then 44092b2b4fcbSmrg # By default we will add the -single_module flag. You can override 44102b2b4fcbSmrg # by either setting the environment variable LT_MULTI_MODULE 44112b2b4fcbSmrg # non-empty at configure time, or by adding -multi_module to the 44122b2b4fcbSmrg # link flags. 44132b2b4fcbSmrg rm -rf libconftest.dylib* 44142b2b4fcbSmrg echo "int foo(void){return 1;}" > conftest.c 44152b2b4fcbSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 44162b2b4fcbSmrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 44172b2b4fcbSmrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 44182b2b4fcbSmrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 44192b2b4fcbSmrg _lt_result=$? 44202b2b4fcbSmrg # If there is a non-empty error log, and "single_module" 44212b2b4fcbSmrg # appears in it, assume the flag caused a linker warning 44222b2b4fcbSmrg if test -s conftest.err && $GREP single_module conftest.err; then 44232b2b4fcbSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 44242b2b4fcbSmrg # Otherwise, if the output was created with a 0 exit code from 44252b2b4fcbSmrg # the compiler, it worked. 44262b2b4fcbSmrg elif test -f libconftest.dylib && test 0 = "$_lt_result"; then 44272b2b4fcbSmrg lt_cv_apple_cc_single_mod=yes 44286aec45a7Smrg else 44292b2b4fcbSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 44306aec45a7Smrg fi 44312b2b4fcbSmrg rm -rf libconftest.dylib* 44322b2b4fcbSmrg rm -f conftest.* 44332b2b4fcbSmrg fi]) 44342b2b4fcbSmrg 44352b2b4fcbSmrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 44362b2b4fcbSmrg [lt_cv_ld_exported_symbols_list], 44372b2b4fcbSmrg [lt_cv_ld_exported_symbols_list=no 44382b2b4fcbSmrg save_LDFLAGS=$LDFLAGS 44392b2b4fcbSmrg echo "_main" > conftest.sym 44402b2b4fcbSmrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 44412b2b4fcbSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 44422b2b4fcbSmrg [lt_cv_ld_exported_symbols_list=yes], 44432b2b4fcbSmrg [lt_cv_ld_exported_symbols_list=no]) 44442b2b4fcbSmrg LDFLAGS=$save_LDFLAGS 44452b2b4fcbSmrg ]) 44462b2b4fcbSmrg 44472b2b4fcbSmrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 44482b2b4fcbSmrg [lt_cv_ld_force_load=no 44492b2b4fcbSmrg cat > conftest.c << _LT_EOF 44502b2b4fcbSmrgint forced_loaded() { return 2;} 44512b2b4fcbSmrg_LT_EOF 44522b2b4fcbSmrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 44532b2b4fcbSmrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 44542b2b4fcbSmrg echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 44552b2b4fcbSmrg $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 44562b2b4fcbSmrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 44572b2b4fcbSmrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 44582b2b4fcbSmrg cat > conftest.c << _LT_EOF 44592b2b4fcbSmrgint main() { return 0;} 44602b2b4fcbSmrg_LT_EOF 44612b2b4fcbSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 44622b2b4fcbSmrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 44632b2b4fcbSmrg _lt_result=$? 44642b2b4fcbSmrg if test -s conftest.err && $GREP force_load conftest.err; then 44652b2b4fcbSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 44662b2b4fcbSmrg elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then 44672b2b4fcbSmrg lt_cv_ld_force_load=yes 44686aec45a7Smrg else 44692b2b4fcbSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 44706aec45a7Smrg fi 44712b2b4fcbSmrg rm -f conftest.err libconftest.a conftest conftest.c 44722b2b4fcbSmrg rm -rf conftest.dSYM 44732b2b4fcbSmrg ]) 44742b2b4fcbSmrg case $host_os in 44752b2b4fcbSmrg rhapsody* | darwin1.[[012]]) 44762b2b4fcbSmrg _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; 44772b2b4fcbSmrg darwin1.*) 44782b2b4fcbSmrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 44792b2b4fcbSmrg darwin*) 44802b2b4fcbSmrg case $MACOSX_DEPLOYMENT_TARGET,$host in 44812b2b4fcbSmrg 10.[[012]],*|,*powerpc*-darwin[[5-8]]*) 44822b2b4fcbSmrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 44832b2b4fcbSmrg *) 44842b2b4fcbSmrg _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 44852b2b4fcbSmrg esac 44862b2b4fcbSmrg ;; 44872b2b4fcbSmrg esac 44882b2b4fcbSmrg if test yes = "$lt_cv_apple_cc_single_mod"; then 44892b2b4fcbSmrg _lt_dar_single_mod='$single_module' 44902b2b4fcbSmrg fi 44912b2b4fcbSmrg if test yes = "$lt_cv_ld_exported_symbols_list"; then 44922b2b4fcbSmrg _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' 44932b2b4fcbSmrg else 44942b2b4fcbSmrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' 44952b2b4fcbSmrg fi 44962b2b4fcbSmrg if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then 44972b2b4fcbSmrg _lt_dsymutil='~$DSYMUTIL $lib || :' 44982b2b4fcbSmrg else 44992b2b4fcbSmrg _lt_dsymutil= 45002b2b4fcbSmrg fi 45012b2b4fcbSmrg ;; 45022b2b4fcbSmrg esac 45032b2b4fcbSmrg]) 45042b2b4fcbSmrg 45052b2b4fcbSmrg 45062b2b4fcbSmrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 45072b2b4fcbSmrg# --------------------------------- 45082b2b4fcbSmrg# Checks for linker and compiler features on darwin 45092b2b4fcbSmrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 45102b2b4fcbSmrg[ 45112b2b4fcbSmrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 45122b2b4fcbSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 45132b2b4fcbSmrg _LT_TAGVAR(hardcode_direct, $1)=no 45142b2b4fcbSmrg _LT_TAGVAR(hardcode_automatic, $1)=yes 45152b2b4fcbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 45162b2b4fcbSmrg if test yes = "$lt_cv_ld_force_load"; then 45172b2b4fcbSmrg _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\"`' 45182b2b4fcbSmrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 45192b2b4fcbSmrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 45202b2b4fcbSmrg else 45212b2b4fcbSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 45222b2b4fcbSmrg fi 45232b2b4fcbSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 45242b2b4fcbSmrg _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined 45252b2b4fcbSmrg case $cc_basename in 45262b2b4fcbSmrg ifort*|nagfor*) _lt_dar_can_shared=yes ;; 45272b2b4fcbSmrg *) _lt_dar_can_shared=$GCC ;; 45282b2b4fcbSmrg esac 45292b2b4fcbSmrg if test yes = "$_lt_dar_can_shared"; then 45302b2b4fcbSmrg output_verbose_link_cmd=func_echo_all 45312b2b4fcbSmrg _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" 45322b2b4fcbSmrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" 45332b2b4fcbSmrg _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" 45342b2b4fcbSmrg _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" 45352b2b4fcbSmrg m4_if([$1], [CXX], 45362b2b4fcbSmrg[ if test yes != "$lt_cv_apple_cc_single_mod"; then 45372b2b4fcbSmrg _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" 45382b2b4fcbSmrg _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" 45392b2b4fcbSmrg fi 45402b2b4fcbSmrg],[]) 45412b2b4fcbSmrg else 45422b2b4fcbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 45432b2b4fcbSmrg fi 45442b2b4fcbSmrg]) 4545ab47cfaaSmrg 45462b2b4fcbSmrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 45472b2b4fcbSmrg# ---------------------------------- 45482b2b4fcbSmrg# Links a minimal program and checks the executable 45492b2b4fcbSmrg# for the system default hardcoded library path. In most cases, 45502b2b4fcbSmrg# this is /usr/lib:/lib, but when the MPI compilers are used 45512b2b4fcbSmrg# the location of the communication and MPI libs are included too. 45522b2b4fcbSmrg# If we don't find anything, use the default library path according 45532b2b4fcbSmrg# to the aix ld manual. 45542b2b4fcbSmrg# Store the results from the different compilers for each TAGNAME. 45552b2b4fcbSmrg# Allow to override them for all tags through lt_cv_aix_libpath. 45562b2b4fcbSmrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 45572b2b4fcbSmrg[m4_require([_LT_DECL_SED])dnl 45582b2b4fcbSmrgif test set = "${lt_cv_aix_libpath+set}"; then 45592b2b4fcbSmrg aix_libpath=$lt_cv_aix_libpath 45602b2b4fcbSmrgelse 45612b2b4fcbSmrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 45622b2b4fcbSmrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 45632b2b4fcbSmrg lt_aix_libpath_sed='[ 45642b2b4fcbSmrg /Import File Strings/,/^$/ { 45652b2b4fcbSmrg /^0/ { 45662b2b4fcbSmrg s/^0 *\([^ ]*\) *$/\1/ 45672b2b4fcbSmrg p 45682b2b4fcbSmrg } 45692b2b4fcbSmrg }]' 45702b2b4fcbSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 45712b2b4fcbSmrg # Check for a 64-bit object if we didn't find anything. 45722b2b4fcbSmrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 45732b2b4fcbSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 45742b2b4fcbSmrg fi],[]) 45752b2b4fcbSmrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 45762b2b4fcbSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib 45772b2b4fcbSmrg fi 45782b2b4fcbSmrg ]) 45792b2b4fcbSmrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 45802b2b4fcbSmrgfi 45812b2b4fcbSmrg])# _LT_SYS_MODULE_PATH_AIX 4582ab47cfaaSmrg 4583ab47cfaaSmrg 45842b2b4fcbSmrg# _LT_SHELL_INIT(ARG) 45852b2b4fcbSmrg# ------------------- 45862b2b4fcbSmrgm4_define([_LT_SHELL_INIT], 45872b2b4fcbSmrg[m4_divert_text([M4SH-INIT], [$1 45882b2b4fcbSmrg])])# _LT_SHELL_INIT 4589ab47cfaaSmrg 4590ab47cfaaSmrg 4591ab47cfaaSmrg 45922b2b4fcbSmrg# _LT_PROG_ECHO_BACKSLASH 45932b2b4fcbSmrg# ----------------------- 45942b2b4fcbSmrg# Find how we can fake an echo command that does not interpret backslash. 45952b2b4fcbSmrg# In particular, with Autoconf 2.60 or later we add some code to the start 45962b2b4fcbSmrg# of the generated configure script that will find a shell with a builtin 45972b2b4fcbSmrg# printf (that we can use as an echo command). 45982b2b4fcbSmrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 45992b2b4fcbSmrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 46002b2b4fcbSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 46012b2b4fcbSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 4602ab47cfaaSmrg 46032b2b4fcbSmrgAC_MSG_CHECKING([how to print strings]) 46042b2b4fcbSmrg# Test print first, because it will be a builtin if present. 46052b2b4fcbSmrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 46062b2b4fcbSmrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 46072b2b4fcbSmrg ECHO='print -r --' 46082b2b4fcbSmrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 46092b2b4fcbSmrg ECHO='printf %s\n' 46102b2b4fcbSmrgelse 46112b2b4fcbSmrg # Use this function as a fallback that always works. 46122b2b4fcbSmrg func_fallback_echo () 46132b2b4fcbSmrg { 46142b2b4fcbSmrg eval 'cat <<_LTECHO_EOF 46152b2b4fcbSmrg$[]1 46162b2b4fcbSmrg_LTECHO_EOF' 46172b2b4fcbSmrg } 46182b2b4fcbSmrg ECHO='func_fallback_echo' 46192b2b4fcbSmrgfi 4620ab47cfaaSmrg 46212b2b4fcbSmrg# func_echo_all arg... 46222b2b4fcbSmrg# Invoke $ECHO with all args, space-separated. 46232b2b4fcbSmrgfunc_echo_all () 46242b2b4fcbSmrg{ 46252b2b4fcbSmrg $ECHO "$*" 46262b2b4fcbSmrg} 4627ab47cfaaSmrg 46282b2b4fcbSmrgcase $ECHO in 46292b2b4fcbSmrg printf*) AC_MSG_RESULT([printf]) ;; 46302b2b4fcbSmrg print*) AC_MSG_RESULT([print -r]) ;; 46312b2b4fcbSmrg *) AC_MSG_RESULT([cat]) ;; 46322b2b4fcbSmrgesac 4633ab47cfaaSmrg 46342b2b4fcbSmrgm4_ifdef([_AS_DETECT_SUGGESTED], 46352b2b4fcbSmrg[_AS_DETECT_SUGGESTED([ 46362b2b4fcbSmrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 46372b2b4fcbSmrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 46382b2b4fcbSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 46392b2b4fcbSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 46402b2b4fcbSmrg PATH=/empty FPATH=/empty; export PATH FPATH 46412b2b4fcbSmrg test "X`printf %s $ECHO`" = "X$ECHO" \ 46422b2b4fcbSmrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 46432b2b4fcbSmrg 46442b2b4fcbSmrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 46452b2b4fcbSmrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 46462b2b4fcbSmrg])# _LT_PROG_ECHO_BACKSLASH 4647ab47cfaaSmrg 4648ab47cfaaSmrg 46492b2b4fcbSmrg# _LT_WITH_SYSROOT 46502b2b4fcbSmrg# ---------------- 46512b2b4fcbSmrgAC_DEFUN([_LT_WITH_SYSROOT], 46522b2b4fcbSmrg[m4_require([_LT_DECL_SED])dnl 46532b2b4fcbSmrgAC_MSG_CHECKING([for sysroot]) 46542b2b4fcbSmrgAC_ARG_WITH([sysroot], 46552b2b4fcbSmrg[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], 46562b2b4fcbSmrg [Search for dependent libraries within DIR (or the compiler's sysroot 46572b2b4fcbSmrg if not specified).])], 46582b2b4fcbSmrg[], [with_sysroot=no]) 4659ab47cfaaSmrg 46602b2b4fcbSmrgdnl lt_sysroot will always be passed unquoted. We quote it here 46612b2b4fcbSmrgdnl in case the user passed a directory name. 46622b2b4fcbSmrglt_sysroot= 46632b2b4fcbSmrgcase $with_sysroot in #( 46642b2b4fcbSmrg yes) 46652b2b4fcbSmrg if test yes = "$GCC"; then 46662b2b4fcbSmrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 46672b2b4fcbSmrg fi 46682b2b4fcbSmrg ;; #( 46692b2b4fcbSmrg /*) 46702b2b4fcbSmrg lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` 46712b2b4fcbSmrg ;; #( 46722b2b4fcbSmrg no|'') 46732b2b4fcbSmrg ;; #( 46742b2b4fcbSmrg *) 46752b2b4fcbSmrg AC_MSG_RESULT([$with_sysroot]) 46762b2b4fcbSmrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 46772b2b4fcbSmrg ;; 46782b2b4fcbSmrgesac 4679ab47cfaaSmrg 46802b2b4fcbSmrg AC_MSG_RESULT([${lt_sysroot:-no}]) 46812b2b4fcbSmrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 46822b2b4fcbSmrg[dependent libraries, and where our libraries should be installed.])]) 4683ab47cfaaSmrg 46842b2b4fcbSmrg# _LT_ENABLE_LOCK 46852b2b4fcbSmrg# --------------- 46862b2b4fcbSmrgm4_defun([_LT_ENABLE_LOCK], 46872b2b4fcbSmrg[AC_ARG_ENABLE([libtool-lock], 46882b2b4fcbSmrg [AS_HELP_STRING([--disable-libtool-lock], 46892b2b4fcbSmrg [avoid locking (might break parallel builds)])]) 46902b2b4fcbSmrgtest no = "$enable_libtool_lock" || enable_libtool_lock=yes 4691ab47cfaaSmrg 46922b2b4fcbSmrg# Some flags need to be propagated to the compiler or linker for good 46932b2b4fcbSmrg# libtool support. 46942b2b4fcbSmrgcase $host in 46952b2b4fcbSmrgia64-*-hpux*) 46962b2b4fcbSmrg # Find out what ABI is being produced by ac_compile, and set mode 46972b2b4fcbSmrg # options accordingly. 46982b2b4fcbSmrg echo 'int i;' > conftest.$ac_ext 46992b2b4fcbSmrg if AC_TRY_EVAL(ac_compile); then 47002b2b4fcbSmrg case `$FILECMD conftest.$ac_objext` in 47012b2b4fcbSmrg *ELF-32*) 47022b2b4fcbSmrg HPUX_IA64_MODE=32 47032b2b4fcbSmrg ;; 47042b2b4fcbSmrg *ELF-64*) 47052b2b4fcbSmrg HPUX_IA64_MODE=64 47066aec45a7Smrg ;; 47072b2b4fcbSmrg esac 47082b2b4fcbSmrg fi 47092b2b4fcbSmrg rm -rf conftest* 47102b2b4fcbSmrg ;; 47112b2b4fcbSmrg*-*-irix6*) 47122b2b4fcbSmrg # Find out what ABI is being produced by ac_compile, and set linker 47132b2b4fcbSmrg # options accordingly. 47142b2b4fcbSmrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 47152b2b4fcbSmrg if AC_TRY_EVAL(ac_compile); then 47162b2b4fcbSmrg if test yes = "$lt_cv_prog_gnu_ld"; then 47172b2b4fcbSmrg case `$FILECMD conftest.$ac_objext` in 47182b2b4fcbSmrg *32-bit*) 47192b2b4fcbSmrg LD="${LD-ld} -melf32bsmip" 47202b2b4fcbSmrg ;; 47212b2b4fcbSmrg *N32*) 47222b2b4fcbSmrg LD="${LD-ld} -melf32bmipn32" 47232b2b4fcbSmrg ;; 47242b2b4fcbSmrg *64-bit*) 47252b2b4fcbSmrg LD="${LD-ld} -melf64bmip" 47262b2b4fcbSmrg ;; 47272b2b4fcbSmrg esac 47282b2b4fcbSmrg else 47292b2b4fcbSmrg case `$FILECMD conftest.$ac_objext` in 47302b2b4fcbSmrg *32-bit*) 47312b2b4fcbSmrg LD="${LD-ld} -32" 47322b2b4fcbSmrg ;; 47332b2b4fcbSmrg *N32*) 47342b2b4fcbSmrg LD="${LD-ld} -n32" 47352b2b4fcbSmrg ;; 47362b2b4fcbSmrg *64-bit*) 47372b2b4fcbSmrg LD="${LD-ld} -64" 47382b2b4fcbSmrg ;; 47396aec45a7Smrg esac 47406aec45a7Smrg fi 47416aec45a7Smrg fi 47422b2b4fcbSmrg rm -rf conftest* 47432b2b4fcbSmrg ;; 4744ab47cfaaSmrg 47452b2b4fcbSmrgmips64*-*linux*) 47462b2b4fcbSmrg # Find out what ABI is being produced by ac_compile, and set linker 47472b2b4fcbSmrg # options accordingly. 47482b2b4fcbSmrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 47492b2b4fcbSmrg if AC_TRY_EVAL(ac_compile); then 47502b2b4fcbSmrg emul=elf 47512b2b4fcbSmrg case `$FILECMD conftest.$ac_objext` in 47522b2b4fcbSmrg *32-bit*) 47532b2b4fcbSmrg emul="${emul}32" 47542b2b4fcbSmrg ;; 47552b2b4fcbSmrg *64-bit*) 47562b2b4fcbSmrg emul="${emul}64" 47572b2b4fcbSmrg ;; 47582b2b4fcbSmrg esac 47592b2b4fcbSmrg case `$FILECMD conftest.$ac_objext` in 47602b2b4fcbSmrg *MSB*) 47612b2b4fcbSmrg emul="${emul}btsmip" 47622b2b4fcbSmrg ;; 47632b2b4fcbSmrg *LSB*) 47642b2b4fcbSmrg emul="${emul}ltsmip" 47652b2b4fcbSmrg ;; 47662b2b4fcbSmrg esac 47672b2b4fcbSmrg case `$FILECMD conftest.$ac_objext` in 47682b2b4fcbSmrg *N32*) 47692b2b4fcbSmrg emul="${emul}n32" 47702b2b4fcbSmrg ;; 47712b2b4fcbSmrg esac 47722b2b4fcbSmrg LD="${LD-ld} -m $emul" 47732b2b4fcbSmrg fi 47742b2b4fcbSmrg rm -rf conftest* 47752b2b4fcbSmrg ;; 47766aec45a7Smrg 47772b2b4fcbSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 47782b2b4fcbSmrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 47792b2b4fcbSmrg # Find out what ABI is being produced by ac_compile, and set linker 47802b2b4fcbSmrg # options accordingly. Note that the listed cases only cover the 47812b2b4fcbSmrg # situations where additional linker options are needed (such as when 47822b2b4fcbSmrg # doing 32-bit compilation for a host where ld defaults to 64-bit, or 47832b2b4fcbSmrg # vice versa); the common cases where no linker options are needed do 47842b2b4fcbSmrg # not appear in the list. 47852b2b4fcbSmrg echo 'int i;' > conftest.$ac_ext 47862b2b4fcbSmrg if AC_TRY_EVAL(ac_compile); then 47872b2b4fcbSmrg case `$FILECMD conftest.o` in 47882b2b4fcbSmrg *32-bit*) 47892b2b4fcbSmrg case $host in 47902b2b4fcbSmrg x86_64-*kfreebsd*-gnu) 47912b2b4fcbSmrg LD="${LD-ld} -m elf_i386_fbsd" 47922b2b4fcbSmrg ;; 47932b2b4fcbSmrg x86_64-*linux*) 47942b2b4fcbSmrg case `$FILECMD conftest.o` in 47952b2b4fcbSmrg *x86-64*) 47962b2b4fcbSmrg LD="${LD-ld} -m elf32_x86_64" 47972b2b4fcbSmrg ;; 47982b2b4fcbSmrg *) 47992b2b4fcbSmrg LD="${LD-ld} -m elf_i386" 48002b2b4fcbSmrg ;; 48012b2b4fcbSmrg esac 48022b2b4fcbSmrg ;; 48032b2b4fcbSmrg powerpc64le-*linux*) 48042b2b4fcbSmrg LD="${LD-ld} -m elf32lppclinux" 48052b2b4fcbSmrg ;; 48062b2b4fcbSmrg powerpc64-*linux*) 48072b2b4fcbSmrg LD="${LD-ld} -m elf32ppclinux" 48082b2b4fcbSmrg ;; 48092b2b4fcbSmrg s390x-*linux*) 48102b2b4fcbSmrg LD="${LD-ld} -m elf_s390" 48112b2b4fcbSmrg ;; 48122b2b4fcbSmrg sparc64-*linux*) 48132b2b4fcbSmrg LD="${LD-ld} -m elf32_sparc" 48142b2b4fcbSmrg ;; 48152b2b4fcbSmrg esac 48162b2b4fcbSmrg ;; 48172b2b4fcbSmrg *64-bit*) 48182b2b4fcbSmrg case $host in 48192b2b4fcbSmrg x86_64-*kfreebsd*-gnu) 48202b2b4fcbSmrg LD="${LD-ld} -m elf_x86_64_fbsd" 48212b2b4fcbSmrg ;; 48222b2b4fcbSmrg x86_64-*linux*) 48232b2b4fcbSmrg LD="${LD-ld} -m elf_x86_64" 48242b2b4fcbSmrg ;; 48252b2b4fcbSmrg powerpcle-*linux*) 48262b2b4fcbSmrg LD="${LD-ld} -m elf64lppc" 48272b2b4fcbSmrg ;; 48282b2b4fcbSmrg powerpc-*linux*) 48292b2b4fcbSmrg LD="${LD-ld} -m elf64ppc" 48302b2b4fcbSmrg ;; 48312b2b4fcbSmrg s390*-*linux*|s390*-*tpf*) 48322b2b4fcbSmrg LD="${LD-ld} -m elf64_s390" 48332b2b4fcbSmrg ;; 48342b2b4fcbSmrg sparc*-*linux*) 48352b2b4fcbSmrg LD="${LD-ld} -m elf64_sparc" 48362b2b4fcbSmrg ;; 48372b2b4fcbSmrg esac 48382b2b4fcbSmrg ;; 48392b2b4fcbSmrg esac 48402b2b4fcbSmrg fi 48412b2b4fcbSmrg rm -rf conftest* 48422b2b4fcbSmrg ;; 48432b2b4fcbSmrg 48442b2b4fcbSmrg*-*-sco3.2v5*) 48452b2b4fcbSmrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 48462b2b4fcbSmrg SAVE_CFLAGS=$CFLAGS 48472b2b4fcbSmrg CFLAGS="$CFLAGS -belf" 48482b2b4fcbSmrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 48492b2b4fcbSmrg [AC_LANG_PUSH(C) 48502b2b4fcbSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 48512b2b4fcbSmrg AC_LANG_POP]) 48522b2b4fcbSmrg if test yes != "$lt_cv_cc_needs_belf"; then 48532b2b4fcbSmrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 48542b2b4fcbSmrg CFLAGS=$SAVE_CFLAGS 48552b2b4fcbSmrg fi 48562b2b4fcbSmrg ;; 48572b2b4fcbSmrg*-*solaris*) 48582b2b4fcbSmrg # Find out what ABI is being produced by ac_compile, and set linker 48592b2b4fcbSmrg # options accordingly. 48602b2b4fcbSmrg echo 'int i;' > conftest.$ac_ext 48612b2b4fcbSmrg if AC_TRY_EVAL(ac_compile); then 48622b2b4fcbSmrg case `$FILECMD conftest.o` in 48632b2b4fcbSmrg *64-bit*) 48642b2b4fcbSmrg case $lt_cv_prog_gnu_ld in 48652b2b4fcbSmrg yes*) 48662b2b4fcbSmrg case $host in 48672b2b4fcbSmrg i?86-*-solaris*|x86_64-*-solaris*) 48682b2b4fcbSmrg LD="${LD-ld} -m elf_x86_64" 48692b2b4fcbSmrg ;; 48702b2b4fcbSmrg sparc*-*-solaris*) 48712b2b4fcbSmrg LD="${LD-ld} -m elf64_sparc" 48722b2b4fcbSmrg ;; 48732b2b4fcbSmrg esac 48742b2b4fcbSmrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 48752b2b4fcbSmrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 48762b2b4fcbSmrg LD=${LD-ld}_sol2 48772b2b4fcbSmrg fi 48782b2b4fcbSmrg ;; 48792b2b4fcbSmrg *) 48802b2b4fcbSmrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 48812b2b4fcbSmrg LD="${LD-ld} -64" 48826aec45a7Smrg fi 48832b2b4fcbSmrg ;; 48842b2b4fcbSmrg esac 48856aec45a7Smrg ;; 48866aec45a7Smrg esac 48876aec45a7Smrg fi 48882b2b4fcbSmrg rm -rf conftest* 48896aec45a7Smrg ;; 48906aec45a7Smrgesac 4891ab47cfaaSmrg 48922b2b4fcbSmrgneed_locks=$enable_libtool_lock 48932b2b4fcbSmrg])# _LT_ENABLE_LOCK 48946aec45a7Smrg 48956aec45a7Smrg 48962b2b4fcbSmrg# _LT_PROG_AR 48972b2b4fcbSmrg# ----------- 48982b2b4fcbSmrgm4_defun([_LT_PROG_AR], 48992b2b4fcbSmrg[AC_CHECK_TOOLS(AR, [ar], false) 49002b2b4fcbSmrg: ${AR=ar} 49012b2b4fcbSmrg_LT_DECL([], [AR], [1], [The archiver]) 4902ab47cfaaSmrg 49032b2b4fcbSmrg# Use ARFLAGS variable as AR's operation code to sync the variable naming with 49042b2b4fcbSmrg# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have 49052b2b4fcbSmrg# higher priority because thats what people were doing historically (setting 49062b2b4fcbSmrg# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS 49072b2b4fcbSmrg# variable obsoleted/removed. 4908ab47cfaaSmrg 49092b2b4fcbSmrgtest ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} 49102b2b4fcbSmrglt_ar_flags=$AR_FLAGS 49112b2b4fcbSmrg_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)]) 4912ab47cfaaSmrg 49132b2b4fcbSmrg# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override 49142b2b4fcbSmrg# by AR_FLAGS because that was never working and AR_FLAGS is about to die. 49152b2b4fcbSmrg_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}], 49162b2b4fcbSmrg [Flags to create an archive]) 4917ab47cfaaSmrg 49182b2b4fcbSmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 49192b2b4fcbSmrg [lt_cv_ar_at_file=no 49202b2b4fcbSmrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 49212b2b4fcbSmrg [echo conftest.$ac_objext > conftest.lst 49222b2b4fcbSmrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 49232b2b4fcbSmrg AC_TRY_EVAL([lt_ar_try]) 49242b2b4fcbSmrg if test 0 -eq "$ac_status"; then 49252b2b4fcbSmrg # Ensure the archiver fails upon bogus file names. 49262b2b4fcbSmrg rm -f conftest.$ac_objext libconftest.a 49272b2b4fcbSmrg AC_TRY_EVAL([lt_ar_try]) 49282b2b4fcbSmrg if test 0 -ne "$ac_status"; then 49292b2b4fcbSmrg lt_cv_ar_at_file=@ 49302b2b4fcbSmrg fi 49312b2b4fcbSmrg fi 49322b2b4fcbSmrg rm -f conftest.* libconftest.a 49332b2b4fcbSmrg ]) 49342b2b4fcbSmrg ]) 4935ab47cfaaSmrg 49362b2b4fcbSmrgif test no = "$lt_cv_ar_at_file"; then 49372b2b4fcbSmrg archiver_list_spec= 49382b2b4fcbSmrgelse 49392b2b4fcbSmrg archiver_list_spec=$lt_cv_ar_at_file 49402b2b4fcbSmrgfi 49412b2b4fcbSmrg_LT_DECL([], [archiver_list_spec], [1], 49422b2b4fcbSmrg [How to feed a file listing to the archiver]) 49432b2b4fcbSmrg])# _LT_PROG_AR 4944ab47cfaaSmrg 4945ab47cfaaSmrg 49462b2b4fcbSmrg# _LT_CMD_OLD_ARCHIVE 49472b2b4fcbSmrg# ------------------- 49482b2b4fcbSmrgm4_defun([_LT_CMD_OLD_ARCHIVE], 49492b2b4fcbSmrg[_LT_PROG_AR 49506aec45a7Smrg 49512b2b4fcbSmrgAC_CHECK_TOOL(STRIP, strip, :) 49522b2b4fcbSmrgtest -z "$STRIP" && STRIP=: 49532b2b4fcbSmrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 49546aec45a7Smrg 49552b2b4fcbSmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 49562b2b4fcbSmrgtest -z "$RANLIB" && RANLIB=: 49572b2b4fcbSmrg_LT_DECL([], [RANLIB], [1], 49582b2b4fcbSmrg [Commands used to install an old-style archive]) 49596aec45a7Smrg 49602b2b4fcbSmrg# Determine commands to create old-style static archives. 49612b2b4fcbSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 49622b2b4fcbSmrgold_postinstall_cmds='chmod 644 $oldlib' 49632b2b4fcbSmrgold_postuninstall_cmds= 4964ab47cfaaSmrg 49652b2b4fcbSmrgif test -n "$RANLIB"; then 49662b2b4fcbSmrg case $host_os in 49672b2b4fcbSmrg bitrig* | openbsd*) 49682b2b4fcbSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 49696aec45a7Smrg ;; 49702b2b4fcbSmrg *) 49712b2b4fcbSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 49722b2b4fcbSmrg ;; 49732b2b4fcbSmrg esac 49742b2b4fcbSmrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 49756aec45a7Smrgfi 49762b2b4fcbSmrg 49772b2b4fcbSmrgcase $host_os in 49782b2b4fcbSmrg darwin*) 49792b2b4fcbSmrg lock_old_archive_extraction=yes ;; 49802b2b4fcbSmrg *) 49812b2b4fcbSmrg lock_old_archive_extraction=no ;; 49822b2b4fcbSmrgesac 49832b2b4fcbSmrg_LT_DECL([], [old_postinstall_cmds], [2]) 49842b2b4fcbSmrg_LT_DECL([], [old_postuninstall_cmds], [2]) 49852b2b4fcbSmrg_LT_TAGDECL([], [old_archive_cmds], [2], 49862b2b4fcbSmrg [Commands used to build an old-style archive]) 49872b2b4fcbSmrg_LT_DECL([], [lock_old_archive_extraction], [0], 49882b2b4fcbSmrg [Whether to use a lock for old archive extraction]) 49892b2b4fcbSmrg])# _LT_CMD_OLD_ARCHIVE 4990ab47cfaaSmrg 4991ab47cfaaSmrg 49922b2b4fcbSmrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 49932b2b4fcbSmrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 49942b2b4fcbSmrg# ---------------------------------------------------------------- 49952b2b4fcbSmrg# Check whether the given compiler option works 49962b2b4fcbSmrgAC_DEFUN([_LT_COMPILER_OPTION], 49976aec45a7Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 49982b2b4fcbSmrgm4_require([_LT_DECL_SED])dnl 49992b2b4fcbSmrgAC_CACHE_CHECK([$1], [$2], 50002b2b4fcbSmrg [$2=no 50012b2b4fcbSmrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 50022b2b4fcbSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 50032b2b4fcbSmrg lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment 50042b2b4fcbSmrg # Insert the option either (1) after the last *FLAGS variable, or 50052b2b4fcbSmrg # (2) before a word containing "conftest.", or (3) at the end. 50062b2b4fcbSmrg # Note that $ac_compile itself does not contain backslashes and begins 50072b2b4fcbSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 50082b2b4fcbSmrg # The option is referenced via a variable to avoid confusing sed. 50092b2b4fcbSmrg lt_compile=`echo "$ac_compile" | $SED \ 50102b2b4fcbSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 50112b2b4fcbSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 50122b2b4fcbSmrg -e 's:$: $lt_compiler_flag:'` 50132b2b4fcbSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 50142b2b4fcbSmrg (eval "$lt_compile" 2>conftest.err) 50152b2b4fcbSmrg ac_status=$? 50162b2b4fcbSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 50172b2b4fcbSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 50182b2b4fcbSmrg if (exit $ac_status) && test -s "$ac_outfile"; then 50192b2b4fcbSmrg # The compiler can only warn and ignore the option if not recognized 50202b2b4fcbSmrg # So say no if there are warnings other than the usual output. 50212b2b4fcbSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 50222b2b4fcbSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 50232b2b4fcbSmrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 50242b2b4fcbSmrg $2=yes 50252b2b4fcbSmrg fi 50262b2b4fcbSmrg fi 50272b2b4fcbSmrg $RM conftest* 50282b2b4fcbSmrg]) 50292b2b4fcbSmrg 50302b2b4fcbSmrgif test yes = "[$]$2"; then 50312b2b4fcbSmrg m4_if([$5], , :, [$5]) 50326aec45a7Smrgelse 50332b2b4fcbSmrg m4_if([$6], , :, [$6]) 50346aec45a7Smrgfi 50352b2b4fcbSmrg])# _LT_COMPILER_OPTION 5036ab47cfaaSmrg 50372b2b4fcbSmrg# Old name: 50382b2b4fcbSmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 50392b2b4fcbSmrgdnl aclocal-1.4 backwards compatibility: 50402b2b4fcbSmrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 50416aec45a7Smrg 50426aec45a7Smrg 50432b2b4fcbSmrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 50442b2b4fcbSmrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 50452b2b4fcbSmrg# ---------------------------------------------------- 50462b2b4fcbSmrg# Check whether the given linker option works 50472b2b4fcbSmrgAC_DEFUN([_LT_LINKER_OPTION], 50482b2b4fcbSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 50492b2b4fcbSmrgm4_require([_LT_DECL_SED])dnl 50502b2b4fcbSmrgAC_CACHE_CHECK([$1], [$2], 50512b2b4fcbSmrg [$2=no 50522b2b4fcbSmrg save_LDFLAGS=$LDFLAGS 50532b2b4fcbSmrg LDFLAGS="$LDFLAGS $3" 50542b2b4fcbSmrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 50552b2b4fcbSmrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 50562b2b4fcbSmrg # The linker can only warn and ignore the option if not recognized 50572b2b4fcbSmrg # So say no if there are warnings 50582b2b4fcbSmrg if test -s conftest.err; then 50592b2b4fcbSmrg # Append any errors to the config.log. 50602b2b4fcbSmrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 50612b2b4fcbSmrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 50622b2b4fcbSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 50632b2b4fcbSmrg if diff conftest.exp conftest.er2 >/dev/null; then 50642b2b4fcbSmrg $2=yes 50652b2b4fcbSmrg fi 50662b2b4fcbSmrg else 50672b2b4fcbSmrg $2=yes 50682b2b4fcbSmrg fi 50692b2b4fcbSmrg fi 50702b2b4fcbSmrg $RM -r conftest* 50712b2b4fcbSmrg LDFLAGS=$save_LDFLAGS 50722b2b4fcbSmrg]) 50736aec45a7Smrg 50742b2b4fcbSmrgif test yes = "[$]$2"; then 50752b2b4fcbSmrg m4_if([$4], , :, [$4]) 50762b2b4fcbSmrgelse 50772b2b4fcbSmrg m4_if([$5], , :, [$5]) 50782b2b4fcbSmrgfi 50792b2b4fcbSmrg])# _LT_LINKER_OPTION 5080ab47cfaaSmrg 50812b2b4fcbSmrg# Old name: 50822b2b4fcbSmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 50832b2b4fcbSmrgdnl aclocal-1.4 backwards compatibility: 50842b2b4fcbSmrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 5085ab47cfaaSmrg 5086ab47cfaaSmrg 50872b2b4fcbSmrg# LT_CMD_MAX_LEN 50882b2b4fcbSmrg#--------------- 50892b2b4fcbSmrgAC_DEFUN([LT_CMD_MAX_LEN], 50902b2b4fcbSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 50912b2b4fcbSmrg# find the maximum length of command line arguments 50922b2b4fcbSmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 50932b2b4fcbSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 50942b2b4fcbSmrg i=0 50952b2b4fcbSmrg teststring=ABCD 5096ab47cfaaSmrg 50972b2b4fcbSmrg case $build_os in 50982b2b4fcbSmrg msdosdjgpp*) 50992b2b4fcbSmrg # On DJGPP, this test can blow up pretty badly due to problems in libc 51002b2b4fcbSmrg # (any single argument exceeding 2000 bytes causes a buffer overrun 51012b2b4fcbSmrg # during glob expansion). Even if it were fixed, the result of this 51022b2b4fcbSmrg # check would be larger than it should be. 51032b2b4fcbSmrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 51042b2b4fcbSmrg ;; 5105ab47cfaaSmrg 51062b2b4fcbSmrg gnu*) 51072b2b4fcbSmrg # Under GNU Hurd, this test is not required because there is 51082b2b4fcbSmrg # no limit to the length of command line arguments. 51092b2b4fcbSmrg # Libtool will interpret -1 as no limit whatsoever 51102b2b4fcbSmrg lt_cv_sys_max_cmd_len=-1; 51112b2b4fcbSmrg ;; 5112ab47cfaaSmrg 51132b2b4fcbSmrg cygwin* | mingw* | cegcc*) 51142b2b4fcbSmrg # On Win9x/ME, this test blows up -- it succeeds, but takes 51152b2b4fcbSmrg # about 5 minutes as the teststring grows exponentially. 51162b2b4fcbSmrg # Worse, since 9x/ME are not pre-emptively multitasking, 51172b2b4fcbSmrg # you end up with a "frozen" computer, even though with patience 51182b2b4fcbSmrg # the test eventually succeeds (with a max line length of 256k). 51192b2b4fcbSmrg # Instead, let's just punt: use the minimum linelength reported by 51202b2b4fcbSmrg # all of the supported platforms: 8192 (on NT/2K/XP). 51212b2b4fcbSmrg lt_cv_sys_max_cmd_len=8192; 51222b2b4fcbSmrg ;; 5123ab47cfaaSmrg 51242b2b4fcbSmrg mint*) 51252b2b4fcbSmrg # On MiNT this can take a long time and run out of memory. 51262b2b4fcbSmrg lt_cv_sys_max_cmd_len=8192; 51272b2b4fcbSmrg ;; 51286aec45a7Smrg 51292b2b4fcbSmrg amigaos*) 51302b2b4fcbSmrg # On AmigaOS with pdksh, this test takes hours, literally. 51312b2b4fcbSmrg # So we just punt and use a minimum line length of 8192. 51322b2b4fcbSmrg lt_cv_sys_max_cmd_len=8192; 51332b2b4fcbSmrg ;; 5134ab47cfaaSmrg 51352b2b4fcbSmrg bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) 51362b2b4fcbSmrg # This has been around since 386BSD, at least. Likely further. 51372b2b4fcbSmrg if test -x /sbin/sysctl; then 51382b2b4fcbSmrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 51392b2b4fcbSmrg elif test -x /usr/sbin/sysctl; then 51402b2b4fcbSmrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 51412b2b4fcbSmrg else 51422b2b4fcbSmrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 51432b2b4fcbSmrg fi 51442b2b4fcbSmrg # And add a safety zone 51452b2b4fcbSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 51462b2b4fcbSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 51472b2b4fcbSmrg ;; 51482b2b4fcbSmrg 51492b2b4fcbSmrg interix*) 51502b2b4fcbSmrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 51512b2b4fcbSmrg lt_cv_sys_max_cmd_len=196608 51522b2b4fcbSmrg ;; 51532b2b4fcbSmrg 51542b2b4fcbSmrg os2*) 51552b2b4fcbSmrg # The test takes a long time on OS/2. 51562b2b4fcbSmrg lt_cv_sys_max_cmd_len=8192 51572b2b4fcbSmrg ;; 5158ab47cfaaSmrg 51592b2b4fcbSmrg osf*) 51602b2b4fcbSmrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 51612b2b4fcbSmrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 51622b2b4fcbSmrg # nice to cause kernel panics so lets avoid the loop below. 51632b2b4fcbSmrg # First set a reasonable default. 51642b2b4fcbSmrg lt_cv_sys_max_cmd_len=16384 51652b2b4fcbSmrg # 51662b2b4fcbSmrg if test -x /sbin/sysconfig; then 51672b2b4fcbSmrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 51682b2b4fcbSmrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 51692b2b4fcbSmrg esac 51702b2b4fcbSmrg fi 51712b2b4fcbSmrg ;; 51722b2b4fcbSmrg sco3.2v5*) 51732b2b4fcbSmrg lt_cv_sys_max_cmd_len=102400 51742b2b4fcbSmrg ;; 51752b2b4fcbSmrg sysv5* | sco5v6* | sysv4.2uw2*) 51762b2b4fcbSmrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 51772b2b4fcbSmrg if test -n "$kargmax"; then 51782b2b4fcbSmrg lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[ ]]//'` 51796aec45a7Smrg else 51802b2b4fcbSmrg lt_cv_sys_max_cmd_len=32768 51812b2b4fcbSmrg fi 51822b2b4fcbSmrg ;; 51832b2b4fcbSmrg *) 51842b2b4fcbSmrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 51852b2b4fcbSmrg if test -n "$lt_cv_sys_max_cmd_len" && \ 51862b2b4fcbSmrg test undefined != "$lt_cv_sys_max_cmd_len"; then 51872b2b4fcbSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 51882b2b4fcbSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 51892b2b4fcbSmrg else 51902b2b4fcbSmrg # Make teststring a little bigger before we do anything with it. 51912b2b4fcbSmrg # a 1K string should be a reasonable start. 51922b2b4fcbSmrg for i in 1 2 3 4 5 6 7 8; do 51932b2b4fcbSmrg teststring=$teststring$teststring 51942b2b4fcbSmrg done 51952b2b4fcbSmrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 51962b2b4fcbSmrg # If test is not a shell built-in, we'll probably end up computing a 51972b2b4fcbSmrg # maximum length that is only half of the actual maximum length, but 51982b2b4fcbSmrg # we can't tell. 51992b2b4fcbSmrg while { test X`env echo "$teststring$teststring" 2>/dev/null` \ 52002b2b4fcbSmrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 52012b2b4fcbSmrg test 17 != "$i" # 1/2 MB should be enough 52022b2b4fcbSmrg do 52032b2b4fcbSmrg i=`expr $i + 1` 52042b2b4fcbSmrg teststring=$teststring$teststring 52052b2b4fcbSmrg done 52062b2b4fcbSmrg # Only check the string length outside the loop. 52072b2b4fcbSmrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 52082b2b4fcbSmrg teststring= 52092b2b4fcbSmrg # Add a significant safety factor because C++ compilers can tack on 52102b2b4fcbSmrg # massive amounts of additional arguments before passing them to the 52112b2b4fcbSmrg # linker. It appears as though 1/2 is a usable value. 52122b2b4fcbSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 52136aec45a7Smrg fi 52142b2b4fcbSmrg ;; 52152b2b4fcbSmrg esac 52162b2b4fcbSmrg]) 52172b2b4fcbSmrgif test -n "$lt_cv_sys_max_cmd_len"; then 52182b2b4fcbSmrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 52192b2b4fcbSmrgelse 52202b2b4fcbSmrg AC_MSG_RESULT(none) 52212b2b4fcbSmrgfi 52222b2b4fcbSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len 52232b2b4fcbSmrg_LT_DECL([], [max_cmd_len], [0], 52242b2b4fcbSmrg [What is the maximum length of a command?]) 52252b2b4fcbSmrg])# LT_CMD_MAX_LEN 5226ab47cfaaSmrg 52272b2b4fcbSmrg# Old name: 52282b2b4fcbSmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 52292b2b4fcbSmrgdnl aclocal-1.4 backwards compatibility: 52302b2b4fcbSmrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 52316aec45a7Smrg 5232ab47cfaaSmrg 52332b2b4fcbSmrg# _LT_HEADER_DLFCN 52342b2b4fcbSmrg# ---------------- 52352b2b4fcbSmrgm4_defun([_LT_HEADER_DLFCN], 52362b2b4fcbSmrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 52372b2b4fcbSmrg])# _LT_HEADER_DLFCN 5238ab47cfaaSmrg 52396aec45a7Smrg 52402b2b4fcbSmrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 52412b2b4fcbSmrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 52422b2b4fcbSmrg# ---------------------------------------------------------------- 52432b2b4fcbSmrgm4_defun([_LT_TRY_DLOPEN_SELF], 52442b2b4fcbSmrg[m4_require([_LT_HEADER_DLFCN])dnl 52452b2b4fcbSmrgif test yes = "$cross_compiling"; then : 52462b2b4fcbSmrg [$4] 52472b2b4fcbSmrgelse 52482b2b4fcbSmrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 52492b2b4fcbSmrg lt_status=$lt_dlunknown 52502b2b4fcbSmrg cat > conftest.$ac_ext <<_LT_EOF 52512b2b4fcbSmrg[#line $LINENO "configure" 52522b2b4fcbSmrg#include "confdefs.h" 52536aec45a7Smrg 52542b2b4fcbSmrg#if HAVE_DLFCN_H 52552b2b4fcbSmrg#include <dlfcn.h> 52562b2b4fcbSmrg#endif 52572b2b4fcbSmrg 52582b2b4fcbSmrg#include <stdio.h> 52592b2b4fcbSmrg 52602b2b4fcbSmrg#ifdef RTLD_GLOBAL 52612b2b4fcbSmrg# define LT_DLGLOBAL RTLD_GLOBAL 52622b2b4fcbSmrg#else 52632b2b4fcbSmrg# ifdef DL_GLOBAL 52642b2b4fcbSmrg# define LT_DLGLOBAL DL_GLOBAL 52652b2b4fcbSmrg# else 52662b2b4fcbSmrg# define LT_DLGLOBAL 0 52672b2b4fcbSmrg# endif 52682b2b4fcbSmrg#endif 5269ab47cfaaSmrg 52702b2b4fcbSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 52712b2b4fcbSmrg find out it does not work in some platform. */ 52722b2b4fcbSmrg#ifndef LT_DLLAZY_OR_NOW 52732b2b4fcbSmrg# ifdef RTLD_LAZY 52742b2b4fcbSmrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 52752b2b4fcbSmrg# else 52762b2b4fcbSmrg# ifdef DL_LAZY 52772b2b4fcbSmrg# define LT_DLLAZY_OR_NOW DL_LAZY 52782b2b4fcbSmrg# else 52792b2b4fcbSmrg# ifdef RTLD_NOW 52802b2b4fcbSmrg# define LT_DLLAZY_OR_NOW RTLD_NOW 52812b2b4fcbSmrg# else 52822b2b4fcbSmrg# ifdef DL_NOW 52832b2b4fcbSmrg# define LT_DLLAZY_OR_NOW DL_NOW 52842b2b4fcbSmrg# else 52852b2b4fcbSmrg# define LT_DLLAZY_OR_NOW 0 52862b2b4fcbSmrg# endif 52872b2b4fcbSmrg# endif 52882b2b4fcbSmrg# endif 52892b2b4fcbSmrg# endif 52902b2b4fcbSmrg#endif 52916aec45a7Smrg 52922b2b4fcbSmrg/* When -fvisibility=hidden is used, assume the code has been annotated 52932b2b4fcbSmrg correspondingly for the symbols needed. */ 52942b2b4fcbSmrg#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 52952b2b4fcbSmrgint fnord () __attribute__((visibility("default"))); 52962b2b4fcbSmrg#endif 5297ab47cfaaSmrg 52982b2b4fcbSmrgint fnord () { return 42; } 52992b2b4fcbSmrgint main () 53002b2b4fcbSmrg{ 53012b2b4fcbSmrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 53022b2b4fcbSmrg int status = $lt_dlunknown; 5303ab47cfaaSmrg 53042b2b4fcbSmrg if (self) 53052b2b4fcbSmrg { 53062b2b4fcbSmrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 53072b2b4fcbSmrg else 53082b2b4fcbSmrg { 53092b2b4fcbSmrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 53102b2b4fcbSmrg else puts (dlerror ()); 53112b2b4fcbSmrg } 53122b2b4fcbSmrg /* dlclose (self); */ 53132b2b4fcbSmrg } 53142b2b4fcbSmrg else 53152b2b4fcbSmrg puts (dlerror ()); 5316ab47cfaaSmrg 53172b2b4fcbSmrg return status; 53182b2b4fcbSmrg}] 53192b2b4fcbSmrg_LT_EOF 53202b2b4fcbSmrg if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then 53212b2b4fcbSmrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 53222b2b4fcbSmrg lt_status=$? 53232b2b4fcbSmrg case x$lt_status in 53242b2b4fcbSmrg x$lt_dlno_uscore) $1 ;; 53252b2b4fcbSmrg x$lt_dlneed_uscore) $2 ;; 53262b2b4fcbSmrg x$lt_dlunknown|x*) $3 ;; 53272b2b4fcbSmrg esac 53282b2b4fcbSmrg else : 53292b2b4fcbSmrg # compilation failed 53302b2b4fcbSmrg $3 53312b2b4fcbSmrg fi 53322b2b4fcbSmrgfi 53332b2b4fcbSmrgrm -fr conftest* 53342b2b4fcbSmrg])# _LT_TRY_DLOPEN_SELF 5335aa9e3350Smrg 5336ab47cfaaSmrg 53372b2b4fcbSmrg# LT_SYS_DLOPEN_SELF 53382b2b4fcbSmrg# ------------------ 53392b2b4fcbSmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 53402b2b4fcbSmrg[m4_require([_LT_HEADER_DLFCN])dnl 53412b2b4fcbSmrgif test yes != "$enable_dlopen"; then 53422b2b4fcbSmrg enable_dlopen=unknown 53432b2b4fcbSmrg enable_dlopen_self=unknown 53442b2b4fcbSmrg enable_dlopen_self_static=unknown 53452b2b4fcbSmrgelse 53462b2b4fcbSmrg lt_cv_dlopen=no 53472b2b4fcbSmrg lt_cv_dlopen_libs= 53482b2b4fcbSmrg 53492b2b4fcbSmrg case $host_os in 53502b2b4fcbSmrg beos*) 53512b2b4fcbSmrg lt_cv_dlopen=load_add_on 53522b2b4fcbSmrg lt_cv_dlopen_libs= 53532b2b4fcbSmrg lt_cv_dlopen_self=yes 53542b2b4fcbSmrg ;; 5355300bf1aeSmrg 53562b2b4fcbSmrg mingw* | pw32* | cegcc*) 53572b2b4fcbSmrg lt_cv_dlopen=LoadLibrary 53582b2b4fcbSmrg lt_cv_dlopen_libs= 53592b2b4fcbSmrg ;; 5360ab47cfaaSmrg 53612b2b4fcbSmrg cygwin*) 53622b2b4fcbSmrg lt_cv_dlopen=dlopen 53632b2b4fcbSmrg lt_cv_dlopen_libs= 53642b2b4fcbSmrg ;; 5365ab47cfaaSmrg 53662b2b4fcbSmrg darwin*) 53672b2b4fcbSmrg # if libdl is installed we need to link against it 53682b2b4fcbSmrg AC_CHECK_LIB([dl], [dlopen], 53692b2b4fcbSmrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ 53702b2b4fcbSmrg lt_cv_dlopen=dyld 53712b2b4fcbSmrg lt_cv_dlopen_libs= 53722b2b4fcbSmrg lt_cv_dlopen_self=yes 53732b2b4fcbSmrg ]) 53742b2b4fcbSmrg ;; 5375ab47cfaaSmrg 53762b2b4fcbSmrg tpf*) 53772b2b4fcbSmrg # Don't try to run any link tests for TPF. We know it's impossible 53782b2b4fcbSmrg # because TPF is a cross-compiler, and we know how we open DSOs. 53792b2b4fcbSmrg lt_cv_dlopen=dlopen 53802b2b4fcbSmrg lt_cv_dlopen_libs= 53812b2b4fcbSmrg lt_cv_dlopen_self=no 53822b2b4fcbSmrg ;; 5383ab47cfaaSmrg 53842b2b4fcbSmrg *) 53852b2b4fcbSmrg AC_CHECK_FUNC([shl_load], 53862b2b4fcbSmrg [lt_cv_dlopen=shl_load], 53872b2b4fcbSmrg [AC_CHECK_LIB([dld], [shl_load], 53882b2b4fcbSmrg [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], 53892b2b4fcbSmrg [AC_CHECK_FUNC([dlopen], 53902b2b4fcbSmrg [lt_cv_dlopen=dlopen], 53912b2b4fcbSmrg [AC_CHECK_LIB([dl], [dlopen], 53922b2b4fcbSmrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], 53932b2b4fcbSmrg [AC_CHECK_LIB([svld], [dlopen], 53942b2b4fcbSmrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], 53952b2b4fcbSmrg [AC_CHECK_LIB([dld], [dld_link], 53962b2b4fcbSmrg [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) 53972b2b4fcbSmrg ]) 53982b2b4fcbSmrg ]) 53992b2b4fcbSmrg ]) 54002b2b4fcbSmrg ]) 54012b2b4fcbSmrg ]) 54022b2b4fcbSmrg ;; 54032b2b4fcbSmrg esac 5404ab47cfaaSmrg 54052b2b4fcbSmrg if test no = "$lt_cv_dlopen"; then 54062b2b4fcbSmrg enable_dlopen=no 54072b2b4fcbSmrg else 54082b2b4fcbSmrg enable_dlopen=yes 54092b2b4fcbSmrg fi 54106aec45a7Smrg 54112b2b4fcbSmrg case $lt_cv_dlopen in 54122b2b4fcbSmrg dlopen) 54132b2b4fcbSmrg save_CPPFLAGS=$CPPFLAGS 54142b2b4fcbSmrg test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 5415ab47cfaaSmrg 54162b2b4fcbSmrg save_LDFLAGS=$LDFLAGS 54172b2b4fcbSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 54186aec45a7Smrg 54192b2b4fcbSmrg save_LIBS=$LIBS 54202b2b4fcbSmrg LIBS="$lt_cv_dlopen_libs $LIBS" 54216aec45a7Smrg 54222b2b4fcbSmrg AC_CACHE_CHECK([whether a program can dlopen itself], 54232b2b4fcbSmrg lt_cv_dlopen_self, [dnl 54242b2b4fcbSmrg _LT_TRY_DLOPEN_SELF( 54252b2b4fcbSmrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 54262b2b4fcbSmrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 54272b2b4fcbSmrg ]) 5428ab47cfaaSmrg 54292b2b4fcbSmrg if test yes = "$lt_cv_dlopen_self"; then 54302b2b4fcbSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 54312b2b4fcbSmrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 54322b2b4fcbSmrg lt_cv_dlopen_self_static, [dnl 54332b2b4fcbSmrg _LT_TRY_DLOPEN_SELF( 54342b2b4fcbSmrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 54352b2b4fcbSmrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 54362b2b4fcbSmrg ]) 54372b2b4fcbSmrg fi 54386aec45a7Smrg 54392b2b4fcbSmrg CPPFLAGS=$save_CPPFLAGS 54402b2b4fcbSmrg LDFLAGS=$save_LDFLAGS 54412b2b4fcbSmrg LIBS=$save_LIBS 54422b2b4fcbSmrg ;; 54432b2b4fcbSmrg esac 5444ab47cfaaSmrg 54452b2b4fcbSmrg case $lt_cv_dlopen_self in 54462b2b4fcbSmrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 54472b2b4fcbSmrg *) enable_dlopen_self=unknown ;; 54482b2b4fcbSmrg esac 5449ab47cfaaSmrg 54502b2b4fcbSmrg case $lt_cv_dlopen_self_static in 54512b2b4fcbSmrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 54522b2b4fcbSmrg *) enable_dlopen_self_static=unknown ;; 54532b2b4fcbSmrg esac 54542b2b4fcbSmrgfi 54552b2b4fcbSmrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 54562b2b4fcbSmrg [Whether dlopen is supported]) 54572b2b4fcbSmrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 54582b2b4fcbSmrg [Whether dlopen of programs is supported]) 54592b2b4fcbSmrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 54602b2b4fcbSmrg [Whether dlopen of statically linked programs is supported]) 54612b2b4fcbSmrg])# LT_SYS_DLOPEN_SELF 54626aec45a7Smrg 54632b2b4fcbSmrg# Old name: 54642b2b4fcbSmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 54652b2b4fcbSmrgdnl aclocal-1.4 backwards compatibility: 54662b2b4fcbSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 54676aec45a7Smrg 5468ab47cfaaSmrg 54692b2b4fcbSmrg# _LT_COMPILER_C_O([TAGNAME]) 54702b2b4fcbSmrg# --------------------------- 54712b2b4fcbSmrg# Check to see if options -c and -o are simultaneously supported by compiler. 54722b2b4fcbSmrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 54732b2b4fcbSmrgm4_defun([_LT_COMPILER_C_O], 54742b2b4fcbSmrg[m4_require([_LT_DECL_SED])dnl 54752b2b4fcbSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 54762b2b4fcbSmrgm4_require([_LT_TAG_COMPILER])dnl 54772b2b4fcbSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 54782b2b4fcbSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 54792b2b4fcbSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 54802b2b4fcbSmrg $RM -r conftest 2>/dev/null 54812b2b4fcbSmrg mkdir conftest 54822b2b4fcbSmrg cd conftest 54832b2b4fcbSmrg mkdir out 54842b2b4fcbSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 5485ab47cfaaSmrg 54862b2b4fcbSmrg lt_compiler_flag="-o out/conftest2.$ac_objext" 54872b2b4fcbSmrg # Insert the option either (1) after the last *FLAGS variable, or 54882b2b4fcbSmrg # (2) before a word containing "conftest.", or (3) at the end. 54892b2b4fcbSmrg # Note that $ac_compile itself does not contain backslashes and begins 54902b2b4fcbSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 54912b2b4fcbSmrg lt_compile=`echo "$ac_compile" | $SED \ 54922b2b4fcbSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 54932b2b4fcbSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 54942b2b4fcbSmrg -e 's:$: $lt_compiler_flag:'` 54952b2b4fcbSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 54962b2b4fcbSmrg (eval "$lt_compile" 2>out/conftest.err) 54972b2b4fcbSmrg ac_status=$? 54982b2b4fcbSmrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 54992b2b4fcbSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 55002b2b4fcbSmrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 55012b2b4fcbSmrg then 55022b2b4fcbSmrg # The compiler can only warn and ignore the option if not recognized 55032b2b4fcbSmrg # So say no if there are warnings 55042b2b4fcbSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 55052b2b4fcbSmrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 55062b2b4fcbSmrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 55072b2b4fcbSmrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 55082b2b4fcbSmrg fi 55092b2b4fcbSmrg fi 55102b2b4fcbSmrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 55112b2b4fcbSmrg $RM conftest* 55122b2b4fcbSmrg # SGI C++ compiler will create directory out/ii_files/ for 55132b2b4fcbSmrg # template instantiation 55142b2b4fcbSmrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 55152b2b4fcbSmrg $RM out/* && rmdir out 55162b2b4fcbSmrg cd .. 55172b2b4fcbSmrg $RM -r conftest 55182b2b4fcbSmrg $RM conftest* 55192b2b4fcbSmrg]) 55202b2b4fcbSmrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 55212b2b4fcbSmrg [Does compiler simultaneously support -c and -o options?]) 55222b2b4fcbSmrg])# _LT_COMPILER_C_O 5523ab47cfaaSmrg 55246aec45a7Smrg 55252b2b4fcbSmrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 55262b2b4fcbSmrg# ---------------------------------- 55272b2b4fcbSmrg# Check to see if we can do hard links to lock some files if needed 55282b2b4fcbSmrgm4_defun([_LT_COMPILER_FILE_LOCKS], 55292b2b4fcbSmrg[m4_require([_LT_ENABLE_LOCK])dnl 55302b2b4fcbSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 55312b2b4fcbSmrg_LT_COMPILER_C_O([$1]) 55326aec45a7Smrg 55332b2b4fcbSmrghard_links=nottested 55342b2b4fcbSmrgif test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then 55352b2b4fcbSmrg # do not overwrite the value of need_locks provided by the user 55362b2b4fcbSmrg AC_MSG_CHECKING([if we can lock with hard links]) 55372b2b4fcbSmrg hard_links=yes 55382b2b4fcbSmrg $RM conftest* 55392b2b4fcbSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 55402b2b4fcbSmrg touch conftest.a 55412b2b4fcbSmrg ln conftest.a conftest.b 2>&5 || hard_links=no 55422b2b4fcbSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 55432b2b4fcbSmrg AC_MSG_RESULT([$hard_links]) 55442b2b4fcbSmrg if test no = "$hard_links"; then 55452b2b4fcbSmrg AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) 55462b2b4fcbSmrg need_locks=warn 55472b2b4fcbSmrg fi 55482b2b4fcbSmrgelse 55492b2b4fcbSmrg need_locks=no 55502b2b4fcbSmrgfi 55512b2b4fcbSmrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 55522b2b4fcbSmrg])# _LT_COMPILER_FILE_LOCKS 5553ab47cfaaSmrg 5554ab47cfaaSmrg 55552b2b4fcbSmrg# _LT_CHECK_OBJDIR 55562b2b4fcbSmrg# ---------------- 55572b2b4fcbSmrgm4_defun([_LT_CHECK_OBJDIR], 55582b2b4fcbSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 55592b2b4fcbSmrg[rm -f .libs 2>/dev/null 55602b2b4fcbSmrgmkdir .libs 2>/dev/null 55612b2b4fcbSmrgif test -d .libs; then 55622b2b4fcbSmrg lt_cv_objdir=.libs 55632b2b4fcbSmrgelse 55642b2b4fcbSmrg # MS-DOS does not allow filenames that begin with a dot. 55652b2b4fcbSmrg lt_cv_objdir=_libs 55662b2b4fcbSmrgfi 55672b2b4fcbSmrgrmdir .libs 2>/dev/null]) 55682b2b4fcbSmrgobjdir=$lt_cv_objdir 55692b2b4fcbSmrg_LT_DECL([], [objdir], [0], 55702b2b4fcbSmrg [The name of the directory that contains temporary libtool files])dnl 55712b2b4fcbSmrgm4_pattern_allow([LT_OBJDIR])dnl 55722b2b4fcbSmrgAC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", 55732b2b4fcbSmrg [Define to the sub-directory where libtool stores uninstalled libraries.]) 55742b2b4fcbSmrg])# _LT_CHECK_OBJDIR 55752b2b4fcbSmrg 5576ab47cfaaSmrg 55772b2b4fcbSmrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 55782b2b4fcbSmrg# -------------------------------------- 55792b2b4fcbSmrg# Check hardcoding attributes. 55802b2b4fcbSmrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 55812b2b4fcbSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 55822b2b4fcbSmrg_LT_TAGVAR(hardcode_action, $1)= 55832b2b4fcbSmrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 55842b2b4fcbSmrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 55852b2b4fcbSmrg test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then 5586ab47cfaaSmrg 55872b2b4fcbSmrg # We can hardcode non-existent directories. 55882b2b4fcbSmrg if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && 55892b2b4fcbSmrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 55902b2b4fcbSmrg # have to relink, otherwise we might link with an installed library 55912b2b4fcbSmrg # when we should be linking with a yet-to-be-installed one 55922b2b4fcbSmrg ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && 55932b2b4fcbSmrg test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then 55942b2b4fcbSmrg # Linking always hardcodes the temporary library directory. 55952b2b4fcbSmrg _LT_TAGVAR(hardcode_action, $1)=relink 55962b2b4fcbSmrg else 55972b2b4fcbSmrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 55982b2b4fcbSmrg _LT_TAGVAR(hardcode_action, $1)=immediate 55992b2b4fcbSmrg fi 56002b2b4fcbSmrgelse 56012b2b4fcbSmrg # We cannot hardcode anything, or else we can only hardcode existing 56022b2b4fcbSmrg # directories. 56032b2b4fcbSmrg _LT_TAGVAR(hardcode_action, $1)=unsupported 56042b2b4fcbSmrgfi 56052b2b4fcbSmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 5606ab47cfaaSmrg 56072b2b4fcbSmrgif test relink = "$_LT_TAGVAR(hardcode_action, $1)" || 56082b2b4fcbSmrg test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then 56092b2b4fcbSmrg # Fast installation is not supported 56102b2b4fcbSmrg enable_fast_install=no 56112b2b4fcbSmrgelif test yes = "$shlibpath_overrides_runpath" || 56122b2b4fcbSmrg test no = "$enable_shared"; then 56132b2b4fcbSmrg # Fast installation is not necessary 56142b2b4fcbSmrg enable_fast_install=needless 56152b2b4fcbSmrgfi 56162b2b4fcbSmrg_LT_TAGDECL([], [hardcode_action], [0], 56172b2b4fcbSmrg [How to hardcode a shared library path into an executable]) 56182b2b4fcbSmrg])# _LT_LINKER_HARDCODE_LIBPATH 5619ab47cfaaSmrg 5620ab47cfaaSmrg 56212b2b4fcbSmrg# _LT_CMD_STRIPLIB 56222b2b4fcbSmrg# ---------------- 56232b2b4fcbSmrgm4_defun([_LT_CMD_STRIPLIB], 56242b2b4fcbSmrg[m4_require([_LT_DECL_EGREP]) 56252b2b4fcbSmrgstriplib= 56262b2b4fcbSmrgold_striplib= 56272b2b4fcbSmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 56282b2b4fcbSmrgif test -z "$STRIP"; then 56292b2b4fcbSmrg AC_MSG_RESULT([no]) 56302b2b4fcbSmrgelse 56312b2b4fcbSmrg if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 56322b2b4fcbSmrg old_striplib="$STRIP --strip-debug" 56332b2b4fcbSmrg striplib="$STRIP --strip-unneeded" 56342b2b4fcbSmrg AC_MSG_RESULT([yes]) 56352b2b4fcbSmrg else 56362b2b4fcbSmrg case $host_os in 56372b2b4fcbSmrg darwin*) 56382b2b4fcbSmrg # FIXME - insert some real tests, host_os isn't really good enough 56392b2b4fcbSmrg striplib="$STRIP -x" 56402b2b4fcbSmrg old_striplib="$STRIP -S" 56412b2b4fcbSmrg AC_MSG_RESULT([yes]) 56422b2b4fcbSmrg ;; 56432b2b4fcbSmrg freebsd*) 56442b2b4fcbSmrg if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then 56452b2b4fcbSmrg old_striplib="$STRIP --strip-debug" 56462b2b4fcbSmrg striplib="$STRIP --strip-unneeded" 56472b2b4fcbSmrg AC_MSG_RESULT([yes]) 56482b2b4fcbSmrg else 56492b2b4fcbSmrg AC_MSG_RESULT([no]) 56502b2b4fcbSmrg fi 56512b2b4fcbSmrg ;; 56522b2b4fcbSmrg *) 56532b2b4fcbSmrg AC_MSG_RESULT([no]) 56542b2b4fcbSmrg ;; 56552b2b4fcbSmrg esac 56562b2b4fcbSmrg fi 56572b2b4fcbSmrgfi 56582b2b4fcbSmrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 56592b2b4fcbSmrg_LT_DECL([], [striplib], [1]) 56602b2b4fcbSmrg])# _LT_CMD_STRIPLIB 56616aec45a7Smrg 56626aec45a7Smrg 56632b2b4fcbSmrg# _LT_PREPARE_MUNGE_PATH_LIST 56642b2b4fcbSmrg# --------------------------- 56652b2b4fcbSmrg# Make sure func_munge_path_list() is defined correctly. 56662b2b4fcbSmrgm4_defun([_LT_PREPARE_MUNGE_PATH_LIST], 56672b2b4fcbSmrg[[# func_munge_path_list VARIABLE PATH 56682b2b4fcbSmrg# ----------------------------------- 56692b2b4fcbSmrg# VARIABLE is name of variable containing _space_ separated list of 56702b2b4fcbSmrg# directories to be munged by the contents of PATH, which is string 56712b2b4fcbSmrg# having a format: 56722b2b4fcbSmrg# "DIR[:DIR]:" 56732b2b4fcbSmrg# string "DIR[ DIR]" will be prepended to VARIABLE 56742b2b4fcbSmrg# ":DIR[:DIR]" 56752b2b4fcbSmrg# string "DIR[ DIR]" will be appended to VARIABLE 56762b2b4fcbSmrg# "DIRP[:DIRP]::[DIRA:]DIRA" 56772b2b4fcbSmrg# string "DIRP[ DIRP]" will be prepended to VARIABLE and string 56782b2b4fcbSmrg# "DIRA[ DIRA]" will be appended to VARIABLE 56792b2b4fcbSmrg# "DIR[:DIR]" 56802b2b4fcbSmrg# VARIABLE will be replaced by "DIR[ DIR]" 56812b2b4fcbSmrgfunc_munge_path_list () 56822b2b4fcbSmrg{ 56832b2b4fcbSmrg case x@S|@2 in 56842b2b4fcbSmrg x) 56852b2b4fcbSmrg ;; 56862b2b4fcbSmrg *:) 56872b2b4fcbSmrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" 56882b2b4fcbSmrg ;; 56892b2b4fcbSmrg x:*) 56902b2b4fcbSmrg eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" 56912b2b4fcbSmrg ;; 56922b2b4fcbSmrg *::*) 56932b2b4fcbSmrg eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" 56942b2b4fcbSmrg eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" 56952b2b4fcbSmrg ;; 56962b2b4fcbSmrg *) 56972b2b4fcbSmrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" 56982b2b4fcbSmrg ;; 56992b2b4fcbSmrg esac 57002b2b4fcbSmrg} 57012b2b4fcbSmrg]])# _LT_PREPARE_PATH_LIST 57026aec45a7Smrg 5703ab47cfaaSmrg 57042b2b4fcbSmrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 57052b2b4fcbSmrg# ----------------------------- 57062b2b4fcbSmrg# PORTME Fill in your ld.so characteristics 57072b2b4fcbSmrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 57082b2b4fcbSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 57092b2b4fcbSmrgm4_require([_LT_DECL_EGREP])dnl 57102b2b4fcbSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 57112b2b4fcbSmrgm4_require([_LT_DECL_OBJDUMP])dnl 57122b2b4fcbSmrgm4_require([_LT_DECL_SED])dnl 57132b2b4fcbSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 57142b2b4fcbSmrgm4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl 57152b2b4fcbSmrgAC_MSG_CHECKING([dynamic linker characteristics]) 57162b2b4fcbSmrgm4_if([$1], 57172b2b4fcbSmrg [], [ 57182b2b4fcbSmrgif test yes = "$GCC"; then 57192b2b4fcbSmrg case $host_os in 57202b2b4fcbSmrg darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; 57212b2b4fcbSmrg *) lt_awk_arg='/^libraries:/' ;; 57222b2b4fcbSmrg esac 57232b2b4fcbSmrg case $host_os in 57242b2b4fcbSmrg mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; 57252b2b4fcbSmrg *) lt_sed_strip_eq='s|=/|/|g' ;; 57262b2b4fcbSmrg esac 57272b2b4fcbSmrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 57282b2b4fcbSmrg case $lt_search_path_spec in 57292b2b4fcbSmrg *\;*) 57302b2b4fcbSmrg # if the path contains ";" then we assume it to be the separator 57312b2b4fcbSmrg # otherwise default to the standard path separator (i.e. ":") - it is 57322b2b4fcbSmrg # assumed that no part of a normal pathname contains ";" but that should 57332b2b4fcbSmrg # okay in the real world where ";" in dirpaths is itself problematic. 57342b2b4fcbSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 57352b2b4fcbSmrg ;; 57362b2b4fcbSmrg *) 57372b2b4fcbSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 57382b2b4fcbSmrg ;; 57392b2b4fcbSmrg esac 57402b2b4fcbSmrg # Ok, now we have the path, separated by spaces, we can step through it 57412b2b4fcbSmrg # and add multilib dir if necessary... 57422b2b4fcbSmrg lt_tmp_lt_search_path_spec= 57432b2b4fcbSmrg lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 57442b2b4fcbSmrg # ...but if some path component already ends with the multilib dir we assume 57452b2b4fcbSmrg # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). 57462b2b4fcbSmrg case "$lt_multi_os_dir; $lt_search_path_spec " in 57472b2b4fcbSmrg "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) 57482b2b4fcbSmrg lt_multi_os_dir= 57492b2b4fcbSmrg ;; 57502b2b4fcbSmrg esac 57512b2b4fcbSmrg for lt_sys_path in $lt_search_path_spec; do 57522b2b4fcbSmrg if test -d "$lt_sys_path$lt_multi_os_dir"; then 57532b2b4fcbSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" 57542b2b4fcbSmrg elif test -n "$lt_multi_os_dir"; then 57552b2b4fcbSmrg test -d "$lt_sys_path" && \ 57562b2b4fcbSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 57572b2b4fcbSmrg fi 57582b2b4fcbSmrg done 57592b2b4fcbSmrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 57602b2b4fcbSmrgBEGIN {RS = " "; FS = "/|\n";} { 57612b2b4fcbSmrg lt_foo = ""; 57622b2b4fcbSmrg lt_count = 0; 57632b2b4fcbSmrg for (lt_i = NF; lt_i > 0; lt_i--) { 57642b2b4fcbSmrg if ($lt_i != "" && $lt_i != ".") { 57652b2b4fcbSmrg if ($lt_i == "..") { 57662b2b4fcbSmrg lt_count++; 57672b2b4fcbSmrg } else { 57682b2b4fcbSmrg if (lt_count == 0) { 57692b2b4fcbSmrg lt_foo = "/" $lt_i lt_foo; 57702b2b4fcbSmrg } else { 57712b2b4fcbSmrg lt_count--; 57722b2b4fcbSmrg } 57732b2b4fcbSmrg } 57742b2b4fcbSmrg } 57752b2b4fcbSmrg } 57762b2b4fcbSmrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 57772b2b4fcbSmrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 57782b2b4fcbSmrg}'` 57792b2b4fcbSmrg # AWK program above erroneously prepends '/' to C:/dos/paths 57802b2b4fcbSmrg # for these hosts. 57812b2b4fcbSmrg case $host_os in 57822b2b4fcbSmrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 57832b2b4fcbSmrg $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; 57842b2b4fcbSmrg esac 57852b2b4fcbSmrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 57862b2b4fcbSmrgelse 57872b2b4fcbSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 57882b2b4fcbSmrgfi]) 57892b2b4fcbSmrglibrary_names_spec= 57902b2b4fcbSmrglibname_spec='lib$name' 57912b2b4fcbSmrgsoname_spec= 57922b2b4fcbSmrgshrext_cmds=.so 57932b2b4fcbSmrgpostinstall_cmds= 57942b2b4fcbSmrgpostuninstall_cmds= 57952b2b4fcbSmrgfinish_cmds= 57962b2b4fcbSmrgfinish_eval= 57972b2b4fcbSmrgshlibpath_var= 57982b2b4fcbSmrgshlibpath_overrides_runpath=unknown 57992b2b4fcbSmrgversion_type=none 58002b2b4fcbSmrgdynamic_linker="$host_os ld.so" 58012b2b4fcbSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 58022b2b4fcbSmrgneed_lib_prefix=unknown 58032b2b4fcbSmrghardcode_into_libs=no 58042b2b4fcbSmrg 58052b2b4fcbSmrg# when you set need_version to no, make sure it does not cause -set_version 58062b2b4fcbSmrg# flags to be left without arguments 58072b2b4fcbSmrgneed_version=unknown 5808ab47cfaaSmrg 58092b2b4fcbSmrgAC_ARG_VAR([LT_SYS_LIBRARY_PATH], 58102b2b4fcbSmrg[User-defined run-time library search path.]) 58116aec45a7Smrg 58122b2b4fcbSmrgcase $host_os in 58132b2b4fcbSmrgaix3*) 58142b2b4fcbSmrg version_type=linux # correct to gnu/linux during the next big refactor 58152b2b4fcbSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname.a' 58162b2b4fcbSmrg shlibpath_var=LIBPATH 58176aec45a7Smrg 58182b2b4fcbSmrg # AIX 3 has no versioning support, so we append a major version to the name. 58192b2b4fcbSmrg soname_spec='$libname$release$shared_ext$major' 58202b2b4fcbSmrg ;; 58216aec45a7Smrg 58222b2b4fcbSmrgaix[[4-9]]*) 58232b2b4fcbSmrg version_type=linux # correct to gnu/linux during the next big refactor 58242b2b4fcbSmrg need_lib_prefix=no 58252b2b4fcbSmrg need_version=no 58262b2b4fcbSmrg hardcode_into_libs=yes 58272b2b4fcbSmrg if test ia64 = "$host_cpu"; then 58282b2b4fcbSmrg # AIX 5 supports IA64 58292b2b4fcbSmrg library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' 58302b2b4fcbSmrg shlibpath_var=LD_LIBRARY_PATH 58312b2b4fcbSmrg else 58322b2b4fcbSmrg # With GCC up to 2.95.x, collect2 would create an import file 58332b2b4fcbSmrg # for dependence libraries. The import file would start with 58342b2b4fcbSmrg # the line '#! .'. This would cause the generated library to 58352b2b4fcbSmrg # depend on '.', always an invalid library. This was fixed in 58362b2b4fcbSmrg # development snapshots of GCC prior to 3.0. 58372b2b4fcbSmrg case $host_os in 58382b2b4fcbSmrg aix4 | aix4.[[01]] | aix4.[[01]].*) 58392b2b4fcbSmrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 58402b2b4fcbSmrg echo ' yes ' 58412b2b4fcbSmrg echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then 58422b2b4fcbSmrg : 58432b2b4fcbSmrg else 58442b2b4fcbSmrg can_build_shared=no 58452b2b4fcbSmrg fi 58462b2b4fcbSmrg ;; 58472b2b4fcbSmrg esac 58482b2b4fcbSmrg # Using Import Files as archive members, it is possible to support 58492b2b4fcbSmrg # filename-based versioning of shared library archives on AIX. While 58502b2b4fcbSmrg # this would work for both with and without runtime linking, it will 58512b2b4fcbSmrg # prevent static linking of such archives. So we do filename-based 58522b2b4fcbSmrg # shared library versioning with .so extension only, which is used 58532b2b4fcbSmrg # when both runtime linking and shared linking is enabled. 58542b2b4fcbSmrg # Unfortunately, runtime linking may impact performance, so we do 58552b2b4fcbSmrg # not want this to be the default eventually. Also, we use the 58562b2b4fcbSmrg # versioned .so libs for executables only if there is the -brtl 58572b2b4fcbSmrg # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. 58582b2b4fcbSmrg # To allow for filename-based versioning support, we need to create 58592b2b4fcbSmrg # libNAME.so.V as an archive file, containing: 58602b2b4fcbSmrg # *) an Import File, referring to the versioned filename of the 58612b2b4fcbSmrg # archive as well as the shared archive member, telling the 58622b2b4fcbSmrg # bitwidth (32 or 64) of that shared object, and providing the 58632b2b4fcbSmrg # list of exported symbols of that shared object, eventually 58642b2b4fcbSmrg # decorated with the 'weak' keyword 58652b2b4fcbSmrg # *) the shared object with the F_LOADONLY flag set, to really avoid 58662b2b4fcbSmrg # it being seen by the linker. 58672b2b4fcbSmrg # At run time we better use the real file rather than another symlink, 58682b2b4fcbSmrg # but for link time we create the symlink libNAME.so -> libNAME.so.V 5869ab47cfaaSmrg 58702b2b4fcbSmrg case $with_aix_soname,$aix_use_runtimelinking in 58712b2b4fcbSmrg # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct 58722b2b4fcbSmrg # soname into executable. Probably we can add versioning support to 58732b2b4fcbSmrg # collect2, so additional links can be useful in future. 58742b2b4fcbSmrg aix,yes) # traditional libtool 58752b2b4fcbSmrg dynamic_linker='AIX unversionable lib.so' 58762b2b4fcbSmrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 58772b2b4fcbSmrg # instead of lib<name>.a to let people know that these are not 58782b2b4fcbSmrg # typical AIX shared libraries. 58792b2b4fcbSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 58802b2b4fcbSmrg ;; 58812b2b4fcbSmrg aix,no) # traditional AIX only 58822b2b4fcbSmrg dynamic_linker='AIX lib.a[(]lib.so.V[)]' 58832b2b4fcbSmrg # We preserve .a as extension for shared libraries through AIX4.2 58842b2b4fcbSmrg # and later when we are not doing run time linking. 58852b2b4fcbSmrg library_names_spec='$libname$release.a $libname.a' 58862b2b4fcbSmrg soname_spec='$libname$release$shared_ext$major' 58872b2b4fcbSmrg ;; 58882b2b4fcbSmrg svr4,*) # full svr4 only 58892b2b4fcbSmrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" 58902b2b4fcbSmrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 58912b2b4fcbSmrg # We do not specify a path in Import Files, so LIBPATH fires. 58922b2b4fcbSmrg shlibpath_overrides_runpath=yes 58932b2b4fcbSmrg ;; 58942b2b4fcbSmrg *,yes) # both, prefer svr4 58952b2b4fcbSmrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" 58962b2b4fcbSmrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 58972b2b4fcbSmrg # unpreferred sharedlib libNAME.a needs extra handling 58982b2b4fcbSmrg 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"' 58992b2b4fcbSmrg 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"' 59002b2b4fcbSmrg # We do not specify a path in Import Files, so LIBPATH fires. 59012b2b4fcbSmrg shlibpath_overrides_runpath=yes 59022b2b4fcbSmrg ;; 59032b2b4fcbSmrg *,no) # both, prefer aix 59042b2b4fcbSmrg dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" 59052b2b4fcbSmrg library_names_spec='$libname$release.a $libname.a' 59062b2b4fcbSmrg soname_spec='$libname$release$shared_ext$major' 59072b2b4fcbSmrg # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling 59082b2b4fcbSmrg 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)' 59092b2b4fcbSmrg 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"' 59102b2b4fcbSmrg ;; 59112b2b4fcbSmrg esac 59122b2b4fcbSmrg shlibpath_var=LIBPATH 59132b2b4fcbSmrg fi 59142b2b4fcbSmrg ;; 5915ab47cfaaSmrg 59162b2b4fcbSmrgamigaos*) 59172b2b4fcbSmrg case $host_cpu in 59182b2b4fcbSmrg powerpc) 59192b2b4fcbSmrg # Since July 2007 AmigaOS4 officially supports .so libraries. 59202b2b4fcbSmrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 59212b2b4fcbSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 59222b2b4fcbSmrg ;; 59232b2b4fcbSmrg m68k) 59242b2b4fcbSmrg library_names_spec='$libname.ixlibrary $libname.a' 59252b2b4fcbSmrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 59262b2b4fcbSmrg 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' 59272b2b4fcbSmrg ;; 59282b2b4fcbSmrg esac 59292b2b4fcbSmrg ;; 5930ab47cfaaSmrg 59312b2b4fcbSmrgbeos*) 59322b2b4fcbSmrg library_names_spec='$libname$shared_ext' 59332b2b4fcbSmrg dynamic_linker="$host_os ld.so" 59342b2b4fcbSmrg shlibpath_var=LIBRARY_PATH 59352b2b4fcbSmrg ;; 59366aec45a7Smrg 59372b2b4fcbSmrgbsdi[[45]]*) 59382b2b4fcbSmrg version_type=linux # correct to gnu/linux during the next big refactor 59392b2b4fcbSmrg need_version=no 59402b2b4fcbSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 59412b2b4fcbSmrg soname_spec='$libname$release$shared_ext$major' 59422b2b4fcbSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 59432b2b4fcbSmrg shlibpath_var=LD_LIBRARY_PATH 59442b2b4fcbSmrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 59452b2b4fcbSmrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 59462b2b4fcbSmrg # the default ld.so.conf also contains /usr/contrib/lib and 59472b2b4fcbSmrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 59482b2b4fcbSmrg # libtool to hard-code these into programs 59492b2b4fcbSmrg ;; 5950ab47cfaaSmrg 59512b2b4fcbSmrgcygwin* | mingw* | pw32* | cegcc*) 59522b2b4fcbSmrg version_type=windows 59532b2b4fcbSmrg shrext_cmds=.dll 59542b2b4fcbSmrg need_version=no 59552b2b4fcbSmrg need_lib_prefix=no 5956ab47cfaaSmrg 59572b2b4fcbSmrg case $GCC,$cc_basename in 59582b2b4fcbSmrg yes,*) 59592b2b4fcbSmrg # gcc 59602b2b4fcbSmrg library_names_spec='$libname.dll.a' 59612b2b4fcbSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 59622b2b4fcbSmrg postinstall_cmds='base_file=`basename \$file`~ 59632b2b4fcbSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 59642b2b4fcbSmrg dldir=$destdir/`dirname \$dlpath`~ 59652b2b4fcbSmrg test -d \$dldir || mkdir -p \$dldir~ 59662b2b4fcbSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 59672b2b4fcbSmrg chmod a+x \$dldir/$dlname~ 59682b2b4fcbSmrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 59692b2b4fcbSmrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 59702b2b4fcbSmrg fi' 59712b2b4fcbSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 59722b2b4fcbSmrg dlpath=$dir/\$dldll~ 59732b2b4fcbSmrg $RM \$dlpath' 59742b2b4fcbSmrg shlibpath_overrides_runpath=yes 5975ab47cfaaSmrg 59762b2b4fcbSmrg case $host_os in 59772b2b4fcbSmrg cygwin*) 59782b2b4fcbSmrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 59792b2b4fcbSmrg soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 59802b2b4fcbSmrgm4_if([$1], [],[ 59812b2b4fcbSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 59822b2b4fcbSmrg ;; 59832b2b4fcbSmrg mingw* | cegcc*) 59842b2b4fcbSmrg # MinGW DLLs use traditional 'lib' prefix 59852b2b4fcbSmrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 59862b2b4fcbSmrg ;; 59872b2b4fcbSmrg pw32*) 59882b2b4fcbSmrg # pw32 DLLs use 'pw' prefix rather than 'lib' 59892b2b4fcbSmrg library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 59902b2b4fcbSmrg ;; 59912b2b4fcbSmrg esac 59922b2b4fcbSmrg dynamic_linker='Win32 ld.exe' 59932b2b4fcbSmrg ;; 59946aec45a7Smrg 59952b2b4fcbSmrg *,cl* | *,icl*) 59962b2b4fcbSmrg # Native MSVC or ICC 59972b2b4fcbSmrg libname_spec='$name' 59982b2b4fcbSmrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 59992b2b4fcbSmrg library_names_spec='$libname.dll.lib' 60006aec45a7Smrg 60012b2b4fcbSmrg case $build_os in 60022b2b4fcbSmrg mingw*) 60032b2b4fcbSmrg sys_lib_search_path_spec= 60042b2b4fcbSmrg lt_save_ifs=$IFS 60052b2b4fcbSmrg IFS=';' 60062b2b4fcbSmrg for lt_path in $LIB 60072b2b4fcbSmrg do 60082b2b4fcbSmrg IFS=$lt_save_ifs 60092b2b4fcbSmrg # Let DOS variable expansion print the short 8.3 style file name. 60102b2b4fcbSmrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 60112b2b4fcbSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 60122b2b4fcbSmrg done 60132b2b4fcbSmrg IFS=$lt_save_ifs 60142b2b4fcbSmrg # Convert to MSYS style. 60152b2b4fcbSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 60162b2b4fcbSmrg ;; 60172b2b4fcbSmrg cygwin*) 60182b2b4fcbSmrg # Convert to unix form, then to dos form, then back to unix form 60192b2b4fcbSmrg # but this time dos style (no spaces!) so that the unix form looks 60202b2b4fcbSmrg # like /cygdrive/c/PROGRA~1:/cygdr... 60212b2b4fcbSmrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 60222b2b4fcbSmrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 60232b2b4fcbSmrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 60242b2b4fcbSmrg ;; 60252b2b4fcbSmrg *) 60262b2b4fcbSmrg sys_lib_search_path_spec=$LIB 60272b2b4fcbSmrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 60282b2b4fcbSmrg # It is most probably a Windows format PATH. 60292b2b4fcbSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 60302b2b4fcbSmrg else 60312b2b4fcbSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 60322b2b4fcbSmrg fi 60332b2b4fcbSmrg # FIXME: find the short name or the path components, as spaces are 60342b2b4fcbSmrg # common. (e.g. "Program Files" -> "PROGRA~1") 60352b2b4fcbSmrg ;; 60362b2b4fcbSmrg esac 60376aec45a7Smrg 60382b2b4fcbSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 60392b2b4fcbSmrg postinstall_cmds='base_file=`basename \$file`~ 60402b2b4fcbSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 60412b2b4fcbSmrg dldir=$destdir/`dirname \$dlpath`~ 60422b2b4fcbSmrg test -d \$dldir || mkdir -p \$dldir~ 60432b2b4fcbSmrg $install_prog $dir/$dlname \$dldir/$dlname' 60442b2b4fcbSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 60452b2b4fcbSmrg dlpath=$dir/\$dldll~ 60462b2b4fcbSmrg $RM \$dlpath' 60472b2b4fcbSmrg shlibpath_overrides_runpath=yes 60482b2b4fcbSmrg dynamic_linker='Win32 link.exe' 60492b2b4fcbSmrg ;; 6050ab47cfaaSmrg 60512b2b4fcbSmrg *) 60522b2b4fcbSmrg # Assume MSVC and ICC wrapper 60532b2b4fcbSmrg library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' 60542b2b4fcbSmrg dynamic_linker='Win32 ld.exe' 60552b2b4fcbSmrg ;; 60562b2b4fcbSmrg esac 60572b2b4fcbSmrg # FIXME: first we should search . and the directory the executable is in 60582b2b4fcbSmrg shlibpath_var=PATH 60592b2b4fcbSmrg ;; 6060ab47cfaaSmrg 60612b2b4fcbSmrgdarwin* | rhapsody*) 60622b2b4fcbSmrg dynamic_linker="$host_os dyld" 60632b2b4fcbSmrg version_type=darwin 60642b2b4fcbSmrg need_lib_prefix=no 60652b2b4fcbSmrg need_version=no 60662b2b4fcbSmrg library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' 60672b2b4fcbSmrg soname_spec='$libname$release$major$shared_ext' 60682b2b4fcbSmrg shlibpath_overrides_runpath=yes 60692b2b4fcbSmrg shlibpath_var=DYLD_LIBRARY_PATH 60702b2b4fcbSmrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 60712b2b4fcbSmrgm4_if([$1], [],[ 60722b2b4fcbSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 60732b2b4fcbSmrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 60742b2b4fcbSmrg ;; 6075ab47cfaaSmrg 60762b2b4fcbSmrgdgux*) 60772b2b4fcbSmrg version_type=linux # correct to gnu/linux during the next big refactor 60782b2b4fcbSmrg need_lib_prefix=no 60792b2b4fcbSmrg need_version=no 60802b2b4fcbSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 60812b2b4fcbSmrg soname_spec='$libname$release$shared_ext$major' 60822b2b4fcbSmrg shlibpath_var=LD_LIBRARY_PATH 60832b2b4fcbSmrg ;; 6084ab47cfaaSmrg 60852b2b4fcbSmrgfreebsd* | dragonfly* | midnightbsd*) 60862b2b4fcbSmrg # DragonFly does not have aout. When/if they implement a new 60872b2b4fcbSmrg # versioning mechanism, adjust this. 60882b2b4fcbSmrg if test -x /usr/bin/objformat; then 60892b2b4fcbSmrg objformat=`/usr/bin/objformat` 60902b2b4fcbSmrg else 60912b2b4fcbSmrg case $host_os in 60922b2b4fcbSmrg freebsd[[23]].*) objformat=aout ;; 60932b2b4fcbSmrg *) objformat=elf ;; 60942b2b4fcbSmrg esac 60952b2b4fcbSmrg fi 60962b2b4fcbSmrg version_type=freebsd-$objformat 60972b2b4fcbSmrg case $version_type in 60982b2b4fcbSmrg freebsd-elf*) 60992b2b4fcbSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 61002b2b4fcbSmrg soname_spec='$libname$release$shared_ext$major' 61012b2b4fcbSmrg need_version=no 61022b2b4fcbSmrg need_lib_prefix=no 61032b2b4fcbSmrg ;; 61042b2b4fcbSmrg freebsd-*) 61052b2b4fcbSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 61062b2b4fcbSmrg need_version=yes 61076aec45a7Smrg ;; 61082b2b4fcbSmrg esac 61092b2b4fcbSmrg shlibpath_var=LD_LIBRARY_PATH 61102b2b4fcbSmrg case $host_os in 61112b2b4fcbSmrg freebsd2.*) 61122b2b4fcbSmrg shlibpath_overrides_runpath=yes 61132b2b4fcbSmrg ;; 61142b2b4fcbSmrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 61152b2b4fcbSmrg shlibpath_overrides_runpath=yes 61162b2b4fcbSmrg hardcode_into_libs=yes 61172b2b4fcbSmrg ;; 61182b2b4fcbSmrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 61192b2b4fcbSmrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 61202b2b4fcbSmrg shlibpath_overrides_runpath=no 61212b2b4fcbSmrg hardcode_into_libs=yes 61222b2b4fcbSmrg ;; 61232b2b4fcbSmrg *) # from 4.6 on, and DragonFly 61242b2b4fcbSmrg shlibpath_overrides_runpath=yes 61252b2b4fcbSmrg hardcode_into_libs=yes 61262b2b4fcbSmrg ;; 61272b2b4fcbSmrg esac 61282b2b4fcbSmrg ;; 61292b2b4fcbSmrg 61302b2b4fcbSmrghaiku*) 61312b2b4fcbSmrg version_type=linux # correct to gnu/linux during the next big refactor 61322b2b4fcbSmrg need_lib_prefix=no 61332b2b4fcbSmrg need_version=no 61342b2b4fcbSmrg dynamic_linker="$host_os runtime_loader" 61352b2b4fcbSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 61362b2b4fcbSmrg soname_spec='$libname$release$shared_ext$major' 61372b2b4fcbSmrg shlibpath_var=LIBRARY_PATH 61382b2b4fcbSmrg shlibpath_overrides_runpath=no 61392b2b4fcbSmrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 61402b2b4fcbSmrg hardcode_into_libs=yes 61412b2b4fcbSmrg ;; 6142ab47cfaaSmrg 61432b2b4fcbSmrghpux9* | hpux10* | hpux11*) 61442b2b4fcbSmrg # Give a soname corresponding to the major version so that dld.sl refuses to 61452b2b4fcbSmrg # link against other versions. 61462b2b4fcbSmrg version_type=sunos 61472b2b4fcbSmrg need_lib_prefix=no 61482b2b4fcbSmrg need_version=no 61492b2b4fcbSmrg case $host_cpu in 61502b2b4fcbSmrg ia64*) 61512b2b4fcbSmrg shrext_cmds='.so' 61522b2b4fcbSmrg hardcode_into_libs=yes 61532b2b4fcbSmrg dynamic_linker="$host_os dld.so" 61542b2b4fcbSmrg shlibpath_var=LD_LIBRARY_PATH 61552b2b4fcbSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 61562b2b4fcbSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 61572b2b4fcbSmrg soname_spec='$libname$release$shared_ext$major' 61582b2b4fcbSmrg if test 32 = "$HPUX_IA64_MODE"; then 61592b2b4fcbSmrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 61602b2b4fcbSmrg sys_lib_dlsearch_path_spec=/usr/lib/hpux32 61612b2b4fcbSmrg else 61622b2b4fcbSmrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 61632b2b4fcbSmrg sys_lib_dlsearch_path_spec=/usr/lib/hpux64 61642b2b4fcbSmrg fi 61652b2b4fcbSmrg ;; 61662b2b4fcbSmrg hppa*64*) 61672b2b4fcbSmrg shrext_cmds='.sl' 61682b2b4fcbSmrg hardcode_into_libs=yes 61692b2b4fcbSmrg dynamic_linker="$host_os dld.sl" 61702b2b4fcbSmrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 61712b2b4fcbSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 61722b2b4fcbSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 61732b2b4fcbSmrg soname_spec='$libname$release$shared_ext$major' 61742b2b4fcbSmrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 61752b2b4fcbSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 61762b2b4fcbSmrg ;; 61772b2b4fcbSmrg *) 61782b2b4fcbSmrg shrext_cmds='.sl' 61792b2b4fcbSmrg dynamic_linker="$host_os dld.sl" 61802b2b4fcbSmrg shlibpath_var=SHLIB_PATH 61812b2b4fcbSmrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 61822b2b4fcbSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 61832b2b4fcbSmrg soname_spec='$libname$release$shared_ext$major' 61842b2b4fcbSmrg ;; 61852b2b4fcbSmrg esac 61862b2b4fcbSmrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 61872b2b4fcbSmrg postinstall_cmds='chmod 555 $lib' 61882b2b4fcbSmrg # or fails outright, so override atomically: 61892b2b4fcbSmrg install_override_mode=555 61902b2b4fcbSmrg ;; 6191ab47cfaaSmrg 61922b2b4fcbSmrginterix[[3-9]]*) 61932b2b4fcbSmrg version_type=linux # correct to gnu/linux during the next big refactor 61942b2b4fcbSmrg need_lib_prefix=no 61952b2b4fcbSmrg need_version=no 61962b2b4fcbSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 61972b2b4fcbSmrg soname_spec='$libname$release$shared_ext$major' 61982b2b4fcbSmrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 61992b2b4fcbSmrg shlibpath_var=LD_LIBRARY_PATH 62002b2b4fcbSmrg shlibpath_overrides_runpath=no 62012b2b4fcbSmrg hardcode_into_libs=yes 62022b2b4fcbSmrg ;; 6203ab47cfaaSmrg 62042b2b4fcbSmrgirix5* | irix6* | nonstopux*) 62052b2b4fcbSmrg case $host_os in 62062b2b4fcbSmrg nonstopux*) version_type=nonstopux ;; 62072b2b4fcbSmrg *) 62082b2b4fcbSmrg if test yes = "$lt_cv_prog_gnu_ld"; then 62092b2b4fcbSmrg version_type=linux # correct to gnu/linux during the next big refactor 62102b2b4fcbSmrg else 62112b2b4fcbSmrg version_type=irix 62122b2b4fcbSmrg fi ;; 62132b2b4fcbSmrg esac 62142b2b4fcbSmrg need_lib_prefix=no 62152b2b4fcbSmrg need_version=no 62162b2b4fcbSmrg soname_spec='$libname$release$shared_ext$major' 62172b2b4fcbSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' 62182b2b4fcbSmrg case $host_os in 62192b2b4fcbSmrg irix5* | nonstopux*) 62202b2b4fcbSmrg libsuff= shlibsuff= 62212b2b4fcbSmrg ;; 62222b2b4fcbSmrg *) 62232b2b4fcbSmrg case $LD in # libtool.m4 will add one of these switches to LD 62242b2b4fcbSmrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 62252b2b4fcbSmrg libsuff= shlibsuff= libmagic=32-bit;; 62262b2b4fcbSmrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 62272b2b4fcbSmrg libsuff=32 shlibsuff=N32 libmagic=N32;; 62282b2b4fcbSmrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 62292b2b4fcbSmrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 62302b2b4fcbSmrg *) libsuff= shlibsuff= libmagic=never-match;; 62316aec45a7Smrg esac 62322b2b4fcbSmrg ;; 62332b2b4fcbSmrg esac 62342b2b4fcbSmrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 62352b2b4fcbSmrg shlibpath_overrides_runpath=no 62362b2b4fcbSmrg sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" 62372b2b4fcbSmrg sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" 62382b2b4fcbSmrg hardcode_into_libs=yes 62392b2b4fcbSmrg ;; 6240ab47cfaaSmrg 62412b2b4fcbSmrg# No shared lib support for Linux oldld, aout, or coff. 62422b2b4fcbSmrglinux*oldld* | linux*aout* | linux*coff*) 62432b2b4fcbSmrg dynamic_linker=no 62442b2b4fcbSmrg ;; 62456aec45a7Smrg 62462b2b4fcbSmrglinux*android*) 62472b2b4fcbSmrg version_type=none # Android doesn't support versioned libraries. 62482b2b4fcbSmrg need_lib_prefix=no 62492b2b4fcbSmrg need_version=no 62502b2b4fcbSmrg library_names_spec='$libname$release$shared_ext' 62512b2b4fcbSmrg soname_spec='$libname$release$shared_ext' 62522b2b4fcbSmrg finish_cmds= 62532b2b4fcbSmrg shlibpath_var=LD_LIBRARY_PATH 62542b2b4fcbSmrg shlibpath_overrides_runpath=yes 62556aec45a7Smrg 62562b2b4fcbSmrg # This implies no fast_install, which is unacceptable. 62572b2b4fcbSmrg # Some rework will be needed to allow for fast_install 62582b2b4fcbSmrg # before this can be enabled. 62592b2b4fcbSmrg hardcode_into_libs=yes 62606aec45a7Smrg 62612b2b4fcbSmrg dynamic_linker='Android linker' 62622b2b4fcbSmrg # Don't embed -rpath directories since the linker doesn't support them. 62632b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 62642b2b4fcbSmrg ;; 6265ab47cfaaSmrg 62662b2b4fcbSmrg# This must be glibc/ELF. 62672b2b4fcbSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 62682b2b4fcbSmrg version_type=linux # correct to gnu/linux during the next big refactor 62692b2b4fcbSmrg need_lib_prefix=no 62702b2b4fcbSmrg need_version=no 62712b2b4fcbSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 62722b2b4fcbSmrg soname_spec='$libname$release$shared_ext$major' 62732b2b4fcbSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 62742b2b4fcbSmrg shlibpath_var=LD_LIBRARY_PATH 62752b2b4fcbSmrg shlibpath_overrides_runpath=no 6276ab47cfaaSmrg 62772b2b4fcbSmrg # Some binutils ld are patched to set DT_RUNPATH 62782b2b4fcbSmrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 62792b2b4fcbSmrg [lt_cv_shlibpath_overrides_runpath=no 62802b2b4fcbSmrg save_LDFLAGS=$LDFLAGS 62812b2b4fcbSmrg save_libdir=$libdir 62822b2b4fcbSmrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 62832b2b4fcbSmrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 62842b2b4fcbSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 62852b2b4fcbSmrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 62862b2b4fcbSmrg [lt_cv_shlibpath_overrides_runpath=yes])]) 62872b2b4fcbSmrg LDFLAGS=$save_LDFLAGS 62882b2b4fcbSmrg libdir=$save_libdir 62892b2b4fcbSmrg ]) 62902b2b4fcbSmrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 6291ab47cfaaSmrg 62922b2b4fcbSmrg # This implies no fast_install, which is unacceptable. 62932b2b4fcbSmrg # Some rework will be needed to allow for fast_install 62942b2b4fcbSmrg # before this can be enabled. 62952b2b4fcbSmrg hardcode_into_libs=yes 6296aa9e3350Smrg 62972b2b4fcbSmrg # Ideally, we could use ldconfig to report *all* directores which are 62982b2b4fcbSmrg # searched for libraries, however this is still not possible. Aside from not 62992b2b4fcbSmrg # being certain /sbin/ldconfig is available, command 63002b2b4fcbSmrg # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, 63012b2b4fcbSmrg # even though it is searched at run-time. Try to do the best guess by 63022b2b4fcbSmrg # appending ld.so.conf contents (and includes) to the search path. 63032b2b4fcbSmrg if test -f /etc/ld.so.conf; then 63042b2b4fcbSmrg 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' ' '` 63052b2b4fcbSmrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 63062b2b4fcbSmrg fi 6307300bf1aeSmrg 63082b2b4fcbSmrg # We used to test for /lib/ld.so.1 and disable shared libraries on 63092b2b4fcbSmrg # powerpc, because MkLinux only supported shared libraries with the 63102b2b4fcbSmrg # GNU dynamic linker. Since this was broken with cross compilers, 63112b2b4fcbSmrg # most powerpc-linux boxes support dynamic linking these days and 63122b2b4fcbSmrg # people can always --disable-shared, the test was removed, and we 63132b2b4fcbSmrg # assume the GNU/Linux dynamic linker is in use. 63142b2b4fcbSmrg dynamic_linker='GNU/Linux ld.so' 63152b2b4fcbSmrg ;; 6316ab47cfaaSmrg 63172b2b4fcbSmrgnetbsd*) 63182b2b4fcbSmrg version_type=sunos 63192b2b4fcbSmrg need_lib_prefix=no 63202b2b4fcbSmrg need_version=no 63212b2b4fcbSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 63222b2b4fcbSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 63232b2b4fcbSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 63242b2b4fcbSmrg dynamic_linker='NetBSD (a.out) ld.so' 63252b2b4fcbSmrg else 63262b2b4fcbSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 63272b2b4fcbSmrg soname_spec='$libname$release$shared_ext$major' 63282b2b4fcbSmrg dynamic_linker='NetBSD ld.elf_so' 63292b2b4fcbSmrg fi 63302b2b4fcbSmrg shlibpath_var=LD_LIBRARY_PATH 63312b2b4fcbSmrg shlibpath_overrides_runpath=yes 63322b2b4fcbSmrg hardcode_into_libs=yes 63332b2b4fcbSmrg ;; 6334aa9e3350Smrg 63352b2b4fcbSmrgnewsos6) 63362b2b4fcbSmrg version_type=linux # correct to gnu/linux during the next big refactor 63372b2b4fcbSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 63382b2b4fcbSmrg shlibpath_var=LD_LIBRARY_PATH 63392b2b4fcbSmrg shlibpath_overrides_runpath=yes 63402b2b4fcbSmrg ;; 6341aa9e3350Smrg 63422b2b4fcbSmrg*nto* | *qnx*) 63432b2b4fcbSmrg version_type=qnx 63442b2b4fcbSmrg need_lib_prefix=no 63452b2b4fcbSmrg need_version=no 63462b2b4fcbSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 63472b2b4fcbSmrg soname_spec='$libname$release$shared_ext$major' 63482b2b4fcbSmrg shlibpath_var=LD_LIBRARY_PATH 63492b2b4fcbSmrg shlibpath_overrides_runpath=no 63502b2b4fcbSmrg hardcode_into_libs=yes 63512b2b4fcbSmrg dynamic_linker='ldqnx.so' 63522b2b4fcbSmrg ;; 6353ab47cfaaSmrg 63542b2b4fcbSmrgopenbsd* | bitrig*) 63552b2b4fcbSmrg version_type=sunos 63562b2b4fcbSmrg sys_lib_dlsearch_path_spec=/usr/lib 63572b2b4fcbSmrg need_lib_prefix=no 63582b2b4fcbSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 63592b2b4fcbSmrg need_version=no 63602b2b4fcbSmrg else 63612b2b4fcbSmrg need_version=yes 63622b2b4fcbSmrg fi 63632b2b4fcbSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 63642b2b4fcbSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 63652b2b4fcbSmrg shlibpath_var=LD_LIBRARY_PATH 63662b2b4fcbSmrg shlibpath_overrides_runpath=yes 63672b2b4fcbSmrg ;; 63681473d951Smrg 63692b2b4fcbSmrgos2*) 63702b2b4fcbSmrg libname_spec='$name' 63712b2b4fcbSmrg version_type=windows 63722b2b4fcbSmrg shrext_cmds=.dll 63732b2b4fcbSmrg need_version=no 63742b2b4fcbSmrg need_lib_prefix=no 63752b2b4fcbSmrg # OS/2 can only load a DLL with a base name of 8 characters or less. 63762b2b4fcbSmrg soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; 63772b2b4fcbSmrg v=$($ECHO $release$versuffix | tr -d .-); 63782b2b4fcbSmrg n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); 63792b2b4fcbSmrg $ECHO $n$v`$shared_ext' 63802b2b4fcbSmrg library_names_spec='${libname}_dll.$libext' 63812b2b4fcbSmrg dynamic_linker='OS/2 ld.exe' 63822b2b4fcbSmrg shlibpath_var=BEGINLIBPATH 63832b2b4fcbSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 63842b2b4fcbSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 63852b2b4fcbSmrg postinstall_cmds='base_file=`basename \$file`~ 63862b2b4fcbSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ 63872b2b4fcbSmrg dldir=$destdir/`dirname \$dlpath`~ 63882b2b4fcbSmrg test -d \$dldir || mkdir -p \$dldir~ 63892b2b4fcbSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 63902b2b4fcbSmrg chmod a+x \$dldir/$dlname~ 63912b2b4fcbSmrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 63922b2b4fcbSmrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 63932b2b4fcbSmrg fi' 63942b2b4fcbSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ 63952b2b4fcbSmrg dlpath=$dir/\$dldll~ 63962b2b4fcbSmrg $RM \$dlpath' 63972b2b4fcbSmrg ;; 6398ab47cfaaSmrg 63992b2b4fcbSmrgosf3* | osf4* | osf5*) 64002b2b4fcbSmrg version_type=osf 64012b2b4fcbSmrg need_lib_prefix=no 64022b2b4fcbSmrg need_version=no 64032b2b4fcbSmrg soname_spec='$libname$release$shared_ext$major' 64042b2b4fcbSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 64052b2b4fcbSmrg shlibpath_var=LD_LIBRARY_PATH 64062b2b4fcbSmrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 64072b2b4fcbSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 64082b2b4fcbSmrg ;; 6409ab47cfaaSmrg 64102b2b4fcbSmrgrdos*) 64112b2b4fcbSmrg dynamic_linker=no 64122b2b4fcbSmrg ;; 6413ab47cfaaSmrg 64142b2b4fcbSmrgsolaris*) 64152b2b4fcbSmrg version_type=linux # correct to gnu/linux during the next big refactor 64162b2b4fcbSmrg need_lib_prefix=no 64172b2b4fcbSmrg need_version=no 64182b2b4fcbSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 64192b2b4fcbSmrg soname_spec='$libname$release$shared_ext$major' 64202b2b4fcbSmrg shlibpath_var=LD_LIBRARY_PATH 64212b2b4fcbSmrg shlibpath_overrides_runpath=yes 64222b2b4fcbSmrg hardcode_into_libs=yes 64232b2b4fcbSmrg # ldd complains unless libraries are executable 64242b2b4fcbSmrg postinstall_cmds='chmod +x $lib' 64252b2b4fcbSmrg ;; 6426ab47cfaaSmrg 64272b2b4fcbSmrgsunos4*) 64282b2b4fcbSmrg version_type=sunos 64292b2b4fcbSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 64302b2b4fcbSmrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 64312b2b4fcbSmrg shlibpath_var=LD_LIBRARY_PATH 64322b2b4fcbSmrg shlibpath_overrides_runpath=yes 64332b2b4fcbSmrg if test yes = "$with_gnu_ld"; then 64342b2b4fcbSmrg need_lib_prefix=no 64352b2b4fcbSmrg fi 64362b2b4fcbSmrg need_version=yes 64372b2b4fcbSmrg ;; 64382b2b4fcbSmrg 64392b2b4fcbSmrgsysv4 | sysv4.3*) 64402b2b4fcbSmrg version_type=linux # correct to gnu/linux during the next big refactor 64412b2b4fcbSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 64422b2b4fcbSmrg soname_spec='$libname$release$shared_ext$major' 64432b2b4fcbSmrg shlibpath_var=LD_LIBRARY_PATH 64442b2b4fcbSmrg case $host_vendor in 64452b2b4fcbSmrg sni) 64462b2b4fcbSmrg shlibpath_overrides_runpath=no 64472b2b4fcbSmrg need_lib_prefix=no 64482b2b4fcbSmrg runpath_var=LD_RUN_PATH 64492b2b4fcbSmrg ;; 64502b2b4fcbSmrg siemens) 64512b2b4fcbSmrg need_lib_prefix=no 64522b2b4fcbSmrg ;; 64532b2b4fcbSmrg motorola) 64542b2b4fcbSmrg need_lib_prefix=no 64552b2b4fcbSmrg need_version=no 64562b2b4fcbSmrg shlibpath_overrides_runpath=no 64572b2b4fcbSmrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 64582b2b4fcbSmrg ;; 64592b2b4fcbSmrg esac 64602b2b4fcbSmrg ;; 6461ab47cfaaSmrg 64622b2b4fcbSmrgsysv4*MP*) 64632b2b4fcbSmrg if test -d /usr/nec; then 64642b2b4fcbSmrg version_type=linux # correct to gnu/linux during the next big refactor 64652b2b4fcbSmrg library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' 64662b2b4fcbSmrg soname_spec='$libname$shared_ext.$major' 64672b2b4fcbSmrg shlibpath_var=LD_LIBRARY_PATH 64682b2b4fcbSmrg fi 64692b2b4fcbSmrg ;; 6470ab47cfaaSmrg 64712b2b4fcbSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 64722b2b4fcbSmrg version_type=sco 64732b2b4fcbSmrg need_lib_prefix=no 64742b2b4fcbSmrg need_version=no 64752b2b4fcbSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' 64762b2b4fcbSmrg soname_spec='$libname$release$shared_ext$major' 64772b2b4fcbSmrg shlibpath_var=LD_LIBRARY_PATH 64782b2b4fcbSmrg shlibpath_overrides_runpath=yes 64792b2b4fcbSmrg hardcode_into_libs=yes 64802b2b4fcbSmrg if test yes = "$with_gnu_ld"; then 64812b2b4fcbSmrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 64822b2b4fcbSmrg else 64832b2b4fcbSmrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 64842b2b4fcbSmrg case $host_os in 64852b2b4fcbSmrg sco3.2v5*) 64862b2b4fcbSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 64872b2b4fcbSmrg ;; 64886aec45a7Smrg esac 64892b2b4fcbSmrg fi 64902b2b4fcbSmrg sys_lib_dlsearch_path_spec='/usr/lib' 64912b2b4fcbSmrg ;; 6492ab47cfaaSmrg 64932b2b4fcbSmrgtpf*) 64942b2b4fcbSmrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 64952b2b4fcbSmrg version_type=linux # correct to gnu/linux during the next big refactor 64962b2b4fcbSmrg need_lib_prefix=no 64972b2b4fcbSmrg need_version=no 64982b2b4fcbSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 64992b2b4fcbSmrg shlibpath_var=LD_LIBRARY_PATH 65002b2b4fcbSmrg shlibpath_overrides_runpath=no 65012b2b4fcbSmrg hardcode_into_libs=yes 65022b2b4fcbSmrg ;; 65031473d951Smrg 65042b2b4fcbSmrguts4*) 65052b2b4fcbSmrg version_type=linux # correct to gnu/linux during the next big refactor 65062b2b4fcbSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 65072b2b4fcbSmrg soname_spec='$libname$release$shared_ext$major' 65082b2b4fcbSmrg shlibpath_var=LD_LIBRARY_PATH 65092b2b4fcbSmrg ;; 6510ab47cfaaSmrg 65112b2b4fcbSmrg*) 65122b2b4fcbSmrg dynamic_linker=no 65135c42550eSmrg ;; 65145c42550eSmrgesac 65152b2b4fcbSmrgAC_MSG_RESULT([$dynamic_linker]) 65162b2b4fcbSmrgtest no = "$dynamic_linker" && can_build_shared=no 65171473d951Smrg 65182b2b4fcbSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 65192b2b4fcbSmrgif test yes = "$GCC"; then 65202b2b4fcbSmrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 65216aec45a7Smrgfi 65226aec45a7Smrg 65232b2b4fcbSmrgif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then 65242b2b4fcbSmrg sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec 65252b2b4fcbSmrgfi 65266aec45a7Smrg 65272b2b4fcbSmrgif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then 65282b2b4fcbSmrg sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec 65296aec45a7Smrgfi 6530ab47cfaaSmrg 65312b2b4fcbSmrg# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... 65322b2b4fcbSmrgconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec 6533ab47cfaaSmrg 65342b2b4fcbSmrg# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code 65352b2b4fcbSmrgfunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" 6536ab47cfaaSmrg 65372b2b4fcbSmrg# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool 65382b2b4fcbSmrgconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH 65396aec45a7Smrg 65402b2b4fcbSmrg_LT_DECL([], [variables_saved_for_relink], [1], 65412b2b4fcbSmrg [Variables whose values should be saved in libtool wrapper scripts and 65422b2b4fcbSmrg restored at link time]) 65432b2b4fcbSmrg_LT_DECL([], [need_lib_prefix], [0], 65442b2b4fcbSmrg [Do we need the "lib" prefix for modules?]) 65452b2b4fcbSmrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 65462b2b4fcbSmrg_LT_DECL([], [version_type], [0], [Library versioning type]) 65472b2b4fcbSmrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 65482b2b4fcbSmrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 65492b2b4fcbSmrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 65502b2b4fcbSmrg [Is shlibpath searched before the hard-coded library search path?]) 65512b2b4fcbSmrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 65522b2b4fcbSmrg_LT_DECL([], [library_names_spec], [1], 65532b2b4fcbSmrg [[List of archive names. First name is the real one, the rest are links. 65542b2b4fcbSmrg The last name is the one that the linker finds with -lNAME]]) 65552b2b4fcbSmrg_LT_DECL([], [soname_spec], [1], 65562b2b4fcbSmrg [[The coded name of the library, if different from the real name]]) 65572b2b4fcbSmrg_LT_DECL([], [install_override_mode], [1], 65582b2b4fcbSmrg [Permission mode override for installation of shared libraries]) 65592b2b4fcbSmrg_LT_DECL([], [postinstall_cmds], [2], 65602b2b4fcbSmrg [Command to use after installation of a shared archive]) 65612b2b4fcbSmrg_LT_DECL([], [postuninstall_cmds], [2], 65622b2b4fcbSmrg [Command to use after uninstallation of a shared archive]) 65632b2b4fcbSmrg_LT_DECL([], [finish_cmds], [2], 65642b2b4fcbSmrg [Commands used to finish a libtool library installation in a directory]) 65652b2b4fcbSmrg_LT_DECL([], [finish_eval], [1], 65662b2b4fcbSmrg [[As "finish_cmds", except a single script fragment to be evaled but 65672b2b4fcbSmrg not shown]]) 65682b2b4fcbSmrg_LT_DECL([], [hardcode_into_libs], [0], 65692b2b4fcbSmrg [Whether we should hardcode library paths into libraries]) 65702b2b4fcbSmrg_LT_DECL([], [sys_lib_search_path_spec], [2], 65712b2b4fcbSmrg [Compile-time system search path for libraries]) 65722b2b4fcbSmrg_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], 65732b2b4fcbSmrg [Detected run-time system search path for libraries]) 65742b2b4fcbSmrg_LT_DECL([], [configure_time_lt_sys_library_path], [2], 65752b2b4fcbSmrg [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) 65762b2b4fcbSmrg])# _LT_SYS_DYNAMIC_LINKER 65771473d951Smrg 65781473d951Smrg 65792b2b4fcbSmrg# _LT_PATH_TOOL_PREFIX(TOOL) 65802b2b4fcbSmrg# -------------------------- 65812b2b4fcbSmrg# find a file program that can recognize shared library 65822b2b4fcbSmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 65832b2b4fcbSmrg[m4_require([_LT_DECL_EGREP])dnl 65842b2b4fcbSmrgAC_MSG_CHECKING([for $1]) 65852b2b4fcbSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 65862b2b4fcbSmrg[case $MAGIC_CMD in 65872b2b4fcbSmrg[[\\/*] | ?:[\\/]*]) 65882b2b4fcbSmrg lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. 65892b2b4fcbSmrg ;; 65902b2b4fcbSmrg*) 65912b2b4fcbSmrg lt_save_MAGIC_CMD=$MAGIC_CMD 65922b2b4fcbSmrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 65932b2b4fcbSmrgdnl $ac_dummy forces splitting on constant user-supplied paths. 65942b2b4fcbSmrgdnl POSIX.2 word splitting is done only on the output of word expansions, 65952b2b4fcbSmrgdnl not every word. This closes a longstanding sh security hole. 65962b2b4fcbSmrg ac_dummy="m4_if([$2], , $PATH, [$2])" 65972b2b4fcbSmrg for ac_dir in $ac_dummy; do 65982b2b4fcbSmrg IFS=$lt_save_ifs 65992b2b4fcbSmrg test -z "$ac_dir" && ac_dir=. 66002b2b4fcbSmrg if test -f "$ac_dir/$1"; then 66012b2b4fcbSmrg lt_cv_path_MAGIC_CMD=$ac_dir/"$1" 66022b2b4fcbSmrg if test -n "$file_magic_test_file"; then 66032b2b4fcbSmrg case $deplibs_check_method in 66042b2b4fcbSmrg "file_magic "*) 66052b2b4fcbSmrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 66062b2b4fcbSmrg MAGIC_CMD=$lt_cv_path_MAGIC_CMD 66072b2b4fcbSmrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 66082b2b4fcbSmrg $EGREP "$file_magic_regex" > /dev/null; then 66092b2b4fcbSmrg : 66102b2b4fcbSmrg else 66112b2b4fcbSmrg cat <<_LT_EOF 1>&2 66121473d951Smrg 66132b2b4fcbSmrg*** Warning: the command libtool uses to detect shared libraries, 66142b2b4fcbSmrg*** $file_magic_cmd, produces output that libtool cannot recognize. 66152b2b4fcbSmrg*** The result is that libtool may fail to recognize shared libraries 66162b2b4fcbSmrg*** as such. This will affect the creation of libtool libraries that 66172b2b4fcbSmrg*** depend on shared libraries, but programs linked with such libtool 66182b2b4fcbSmrg*** libraries will work regardless of this problem. Nevertheless, you 66192b2b4fcbSmrg*** may want to report the problem to your system manager and/or to 66202b2b4fcbSmrg*** bug-libtool@gnu.org 66212b2b4fcbSmrg 66222b2b4fcbSmrg_LT_EOF 66232b2b4fcbSmrg fi ;; 66242b2b4fcbSmrg esac 66252b2b4fcbSmrg fi 66262b2b4fcbSmrg break 66272b2b4fcbSmrg fi 66282b2b4fcbSmrg done 66292b2b4fcbSmrg IFS=$lt_save_ifs 66302b2b4fcbSmrg MAGIC_CMD=$lt_save_MAGIC_CMD 66312b2b4fcbSmrg ;; 66322b2b4fcbSmrgesac]) 66332b2b4fcbSmrgMAGIC_CMD=$lt_cv_path_MAGIC_CMD 66342b2b4fcbSmrgif test -n "$MAGIC_CMD"; then 66352b2b4fcbSmrg AC_MSG_RESULT($MAGIC_CMD) 66362b2b4fcbSmrgelse 66372b2b4fcbSmrg AC_MSG_RESULT(no) 66382b2b4fcbSmrgfi 66392b2b4fcbSmrg_LT_DECL([], [MAGIC_CMD], [0], 66402b2b4fcbSmrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 66412b2b4fcbSmrg])# _LT_PATH_TOOL_PREFIX 6642ab47cfaaSmrg 66432b2b4fcbSmrg# Old name: 66442b2b4fcbSmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 66452b2b4fcbSmrgdnl aclocal-1.4 backwards compatibility: 66462b2b4fcbSmrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 66471473d951Smrg 66481473d951Smrg 66492b2b4fcbSmrg# _LT_PATH_MAGIC 66502b2b4fcbSmrg# -------------- 66512b2b4fcbSmrg# find a file program that can recognize a shared library 66522b2b4fcbSmrgm4_defun([_LT_PATH_MAGIC], 66532b2b4fcbSmrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 66542b2b4fcbSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then 66552b2b4fcbSmrg if test -n "$ac_tool_prefix"; then 66562b2b4fcbSmrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 66572b2b4fcbSmrg else 66582b2b4fcbSmrg MAGIC_CMD=: 66592b2b4fcbSmrg fi 66602b2b4fcbSmrgfi 66612b2b4fcbSmrg])# _LT_PATH_MAGIC 66626aec45a7Smrg 66636aec45a7Smrg 66642b2b4fcbSmrg# LT_PATH_LD 66652b2b4fcbSmrg# ---------- 66662b2b4fcbSmrg# find the pathname to the GNU or non-GNU linker 66672b2b4fcbSmrgAC_DEFUN([LT_PATH_LD], 66682b2b4fcbSmrg[AC_REQUIRE([AC_PROG_CC])dnl 66692b2b4fcbSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 66702b2b4fcbSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 66712b2b4fcbSmrgm4_require([_LT_DECL_SED])dnl 66722b2b4fcbSmrgm4_require([_LT_DECL_EGREP])dnl 66732b2b4fcbSmrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 66746aec45a7Smrg 66752b2b4fcbSmrgAC_ARG_WITH([gnu-ld], 66762b2b4fcbSmrg [AS_HELP_STRING([--with-gnu-ld], 66772b2b4fcbSmrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 66782b2b4fcbSmrg [test no = "$withval" || with_gnu_ld=yes], 66792b2b4fcbSmrg [with_gnu_ld=no])dnl 66806aec45a7Smrg 66812b2b4fcbSmrgac_prog=ld 66822b2b4fcbSmrgif test yes = "$GCC"; then 66832b2b4fcbSmrg # Check if gcc -print-prog-name=ld gives a path. 66842b2b4fcbSmrg AC_MSG_CHECKING([for ld used by $CC]) 66852b2b4fcbSmrg case $host in 66862b2b4fcbSmrg *-*-mingw*) 66872b2b4fcbSmrg # gcc leaves a trailing carriage return, which upsets mingw 66882b2b4fcbSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 66892b2b4fcbSmrg *) 66902b2b4fcbSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 66912b2b4fcbSmrg esac 66922b2b4fcbSmrg case $ac_prog in 66932b2b4fcbSmrg # Accept absolute paths. 66942b2b4fcbSmrg [[\\/]]* | ?:[[\\/]]*) 66952b2b4fcbSmrg re_direlt='/[[^/]][[^/]]*/\.\./' 66962b2b4fcbSmrg # Canonicalize the pathname of ld 66972b2b4fcbSmrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 66982b2b4fcbSmrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 66992b2b4fcbSmrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 67002b2b4fcbSmrg done 67012b2b4fcbSmrg test -z "$LD" && LD=$ac_prog 67022b2b4fcbSmrg ;; 67032b2b4fcbSmrg "") 67042b2b4fcbSmrg # If it fails, then pretend we aren't using GCC. 67052b2b4fcbSmrg ac_prog=ld 67062b2b4fcbSmrg ;; 67072b2b4fcbSmrg *) 67082b2b4fcbSmrg # If it is relative, then search for the first ld in PATH. 67092b2b4fcbSmrg with_gnu_ld=unknown 67102b2b4fcbSmrg ;; 67112b2b4fcbSmrg esac 67122b2b4fcbSmrgelif test yes = "$with_gnu_ld"; then 67132b2b4fcbSmrg AC_MSG_CHECKING([for GNU ld]) 67142b2b4fcbSmrgelse 67152b2b4fcbSmrg AC_MSG_CHECKING([for non-GNU ld]) 67162b2b4fcbSmrgfi 67172b2b4fcbSmrgAC_CACHE_VAL(lt_cv_path_LD, 67182b2b4fcbSmrg[if test -z "$LD"; then 67192b2b4fcbSmrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 67202b2b4fcbSmrg for ac_dir in $PATH; do 67212b2b4fcbSmrg IFS=$lt_save_ifs 67222b2b4fcbSmrg test -z "$ac_dir" && ac_dir=. 67232b2b4fcbSmrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 67242b2b4fcbSmrg lt_cv_path_LD=$ac_dir/$ac_prog 67252b2b4fcbSmrg # Check to see if the program is GNU ld. I'd rather use --version, 67262b2b4fcbSmrg # but apparently some variants of GNU ld only accept -v. 67272b2b4fcbSmrg # Break only if it was the GNU/non-GNU ld that we prefer. 67282b2b4fcbSmrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 67292b2b4fcbSmrg *GNU* | *'with BFD'*) 67302b2b4fcbSmrg test no != "$with_gnu_ld" && break 67312b2b4fcbSmrg ;; 67322b2b4fcbSmrg *) 67332b2b4fcbSmrg test yes != "$with_gnu_ld" && break 67342b2b4fcbSmrg ;; 67352b2b4fcbSmrg esac 67362b2b4fcbSmrg fi 67372b2b4fcbSmrg done 67382b2b4fcbSmrg IFS=$lt_save_ifs 67392b2b4fcbSmrgelse 67402b2b4fcbSmrg lt_cv_path_LD=$LD # Let the user override the test with a path. 67412b2b4fcbSmrgfi]) 67422b2b4fcbSmrgLD=$lt_cv_path_LD 67432b2b4fcbSmrgif test -n "$LD"; then 67442b2b4fcbSmrg AC_MSG_RESULT($LD) 67452b2b4fcbSmrgelse 67462b2b4fcbSmrg AC_MSG_RESULT(no) 67472b2b4fcbSmrgfi 67482b2b4fcbSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 67492b2b4fcbSmrg_LT_PATH_LD_GNU 67502b2b4fcbSmrgAC_SUBST([LD]) 67516aec45a7Smrg 67522b2b4fcbSmrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 67532b2b4fcbSmrg])# LT_PATH_LD 67541473d951Smrg 67552b2b4fcbSmrg# Old names: 67562b2b4fcbSmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 67572b2b4fcbSmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 67582b2b4fcbSmrgdnl aclocal-1.4 backwards compatibility: 67592b2b4fcbSmrgdnl AC_DEFUN([AM_PROG_LD], []) 67602b2b4fcbSmrgdnl AC_DEFUN([AC_PROG_LD], []) 67611473d951Smrg 6762ab47cfaaSmrg 67632b2b4fcbSmrg# _LT_PATH_LD_GNU 67642b2b4fcbSmrg#- -------------- 67652b2b4fcbSmrgm4_defun([_LT_PATH_LD_GNU], 67662b2b4fcbSmrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 67672b2b4fcbSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 67682b2b4fcbSmrgcase `$LD -v 2>&1 </dev/null` in 67692b2b4fcbSmrg*GNU* | *'with BFD'*) 67702b2b4fcbSmrg lt_cv_prog_gnu_ld=yes 67712b2b4fcbSmrg ;; 67722b2b4fcbSmrg*) 67732b2b4fcbSmrg lt_cv_prog_gnu_ld=no 67742b2b4fcbSmrg ;; 67752b2b4fcbSmrgesac]) 67762b2b4fcbSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 67772b2b4fcbSmrg])# _LT_PATH_LD_GNU 67786aec45a7Smrg 6779ab47cfaaSmrg 67802b2b4fcbSmrg# _LT_CMD_RELOAD 67812b2b4fcbSmrg# -------------- 67822b2b4fcbSmrg# find reload flag for linker 67832b2b4fcbSmrg# -- PORTME Some linkers may need a different reload flag. 67842b2b4fcbSmrgm4_defun([_LT_CMD_RELOAD], 67852b2b4fcbSmrg[AC_CACHE_CHECK([for $LD option to reload object files], 67862b2b4fcbSmrg lt_cv_ld_reload_flag, 67872b2b4fcbSmrg [lt_cv_ld_reload_flag='-r']) 67882b2b4fcbSmrgreload_flag=$lt_cv_ld_reload_flag 67892b2b4fcbSmrgcase $reload_flag in 67902b2b4fcbSmrg"" | " "*) ;; 67912b2b4fcbSmrg*) reload_flag=" $reload_flag" ;; 67922b2b4fcbSmrgesac 67932b2b4fcbSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 67942b2b4fcbSmrgcase $host_os in 67952b2b4fcbSmrg cygwin* | mingw* | pw32* | cegcc*) 67962b2b4fcbSmrg if test yes != "$GCC"; then 67972b2b4fcbSmrg reload_cmds=false 67982b2b4fcbSmrg fi 67992b2b4fcbSmrg ;; 68002b2b4fcbSmrg darwin*) 68012b2b4fcbSmrg if test yes = "$GCC"; then 68022b2b4fcbSmrg reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' 68032b2b4fcbSmrg else 68042b2b4fcbSmrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 68052b2b4fcbSmrg fi 68062b2b4fcbSmrg ;; 68072b2b4fcbSmrgesac 68082b2b4fcbSmrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 68092b2b4fcbSmrg_LT_TAGDECL([], [reload_cmds], [2])dnl 68102b2b4fcbSmrg])# _LT_CMD_RELOAD 68116aec45a7Smrg 68126aec45a7Smrg 68132b2b4fcbSmrg# _LT_PATH_DD 68142b2b4fcbSmrg# ----------- 68152b2b4fcbSmrg# find a working dd 68162b2b4fcbSmrgm4_defun([_LT_PATH_DD], 68172b2b4fcbSmrg[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD], 68182b2b4fcbSmrg[printf 0123456789abcdef0123456789abcdef >conftest.i 68192b2b4fcbSmrgcat conftest.i conftest.i >conftest2.i 68202b2b4fcbSmrg: ${lt_DD:=$DD} 68212b2b4fcbSmrgAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], 68222b2b4fcbSmrg[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 68232b2b4fcbSmrg cmp -s conftest.i conftest.out \ 68242b2b4fcbSmrg && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: 68252b2b4fcbSmrgfi]) 68262b2b4fcbSmrgrm -f conftest.i conftest2.i conftest.out]) 68272b2b4fcbSmrg])# _LT_PATH_DD 68286aec45a7Smrg 6829ab47cfaaSmrg 68302b2b4fcbSmrg# _LT_CMD_TRUNCATE 68312b2b4fcbSmrg# ---------------- 68322b2b4fcbSmrg# find command to truncate a binary pipe 68332b2b4fcbSmrgm4_defun([_LT_CMD_TRUNCATE], 68342b2b4fcbSmrg[m4_require([_LT_PATH_DD]) 68352b2b4fcbSmrgAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], 68362b2b4fcbSmrg[printf 0123456789abcdef0123456789abcdef >conftest.i 68372b2b4fcbSmrgcat conftest.i conftest.i >conftest2.i 68382b2b4fcbSmrglt_cv_truncate_bin= 68392b2b4fcbSmrgif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 68402b2b4fcbSmrg cmp -s conftest.i conftest.out \ 68412b2b4fcbSmrg && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" 68422b2b4fcbSmrgfi 68432b2b4fcbSmrgrm -f conftest.i conftest2.i conftest.out 68442b2b4fcbSmrgtest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) 68452b2b4fcbSmrg_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], 68462b2b4fcbSmrg [Command to truncate a binary pipe]) 68472b2b4fcbSmrg])# _LT_CMD_TRUNCATE 6848ab47cfaaSmrg 6849ab47cfaaSmrg 68502b2b4fcbSmrg# _LT_CHECK_MAGIC_METHOD 68512b2b4fcbSmrg# ---------------------- 68522b2b4fcbSmrg# how to check for library dependencies 68532b2b4fcbSmrg# -- PORTME fill in with the dynamic library characteristics 68542b2b4fcbSmrgm4_defun([_LT_CHECK_MAGIC_METHOD], 68552b2b4fcbSmrg[m4_require([_LT_DECL_EGREP]) 68562b2b4fcbSmrgm4_require([_LT_DECL_OBJDUMP]) 68572b2b4fcbSmrgAC_CACHE_CHECK([how to recognize dependent libraries], 68582b2b4fcbSmrglt_cv_deplibs_check_method, 68592b2b4fcbSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 68602b2b4fcbSmrglt_cv_file_magic_test_file= 68612b2b4fcbSmrglt_cv_deplibs_check_method='unknown' 68622b2b4fcbSmrg# Need to set the preceding variable on all platforms that support 68632b2b4fcbSmrg# interlibrary dependencies. 68642b2b4fcbSmrg# 'none' -- dependencies not supported. 68652b2b4fcbSmrg# 'unknown' -- same as none, but documents that we really don't know. 68662b2b4fcbSmrg# 'pass_all' -- all dependencies passed with no checks. 68672b2b4fcbSmrg# 'test_compile' -- check by making test program. 68682b2b4fcbSmrg# 'file_magic [[regex]]' -- check by looking for files in library path 68692b2b4fcbSmrg# that responds to the $file_magic_cmd with a given extended regex. 68702b2b4fcbSmrg# If you have 'file' or equivalent on your system and you're not sure 68712b2b4fcbSmrg# whether 'pass_all' will *always* work, you probably want this one. 68726aec45a7Smrg 68732b2b4fcbSmrgcase $host_os in 68742b2b4fcbSmrgaix[[4-9]]*) 68752b2b4fcbSmrg lt_cv_deplibs_check_method=pass_all 68762b2b4fcbSmrg ;; 68776aec45a7Smrg 68782b2b4fcbSmrgbeos*) 68792b2b4fcbSmrg lt_cv_deplibs_check_method=pass_all 68802b2b4fcbSmrg ;; 68816aec45a7Smrg 68822b2b4fcbSmrgbsdi[[45]]*) 68832b2b4fcbSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 68842b2b4fcbSmrg lt_cv_file_magic_cmd='$FILECMD -L' 68852b2b4fcbSmrg lt_cv_file_magic_test_file=/shlib/libc.so 68862b2b4fcbSmrg ;; 68876aec45a7Smrg 68882b2b4fcbSmrgcygwin*) 68892b2b4fcbSmrg # func_win32_libid is a shell function defined in ltmain.sh 68902b2b4fcbSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 68912b2b4fcbSmrg lt_cv_file_magic_cmd='func_win32_libid' 68922b2b4fcbSmrg ;; 68936aec45a7Smrg 68942b2b4fcbSmrgmingw* | pw32*) 68952b2b4fcbSmrg # Base MSYS/MinGW do not provide the 'file' command needed by 68962b2b4fcbSmrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 68972b2b4fcbSmrg # unless we find 'file', for example because we are cross-compiling. 68982b2b4fcbSmrg if ( file / ) >/dev/null 2>&1; then 68992b2b4fcbSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 69002b2b4fcbSmrg lt_cv_file_magic_cmd='func_win32_libid' 69012b2b4fcbSmrg else 69022b2b4fcbSmrg # Keep this pattern in sync with the one in func_win32_libid. 69032b2b4fcbSmrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 69042b2b4fcbSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 69052b2b4fcbSmrg fi 69062b2b4fcbSmrg ;; 69072b2b4fcbSmrg 69082b2b4fcbSmrgcegcc*) 69092b2b4fcbSmrg # use the weaker test based on 'objdump'. See mingw*. 69102b2b4fcbSmrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 69112b2b4fcbSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 69122b2b4fcbSmrg ;; 69132b2b4fcbSmrg 69142b2b4fcbSmrgdarwin* | rhapsody*) 69152b2b4fcbSmrg lt_cv_deplibs_check_method=pass_all 69162b2b4fcbSmrg ;; 69172b2b4fcbSmrg 69182b2b4fcbSmrgfreebsd* | dragonfly* | midnightbsd*) 69192b2b4fcbSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 69202b2b4fcbSmrg case $host_cpu in 69212b2b4fcbSmrg i*86 ) 69222b2b4fcbSmrg # Not sure whether the presence of OpenBSD here was a mistake. 69232b2b4fcbSmrg # Let's accept both of them until this is cleared up. 69242b2b4fcbSmrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 69252b2b4fcbSmrg lt_cv_file_magic_cmd=$FILECMD 69262b2b4fcbSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 69272b2b4fcbSmrg ;; 69285c42550eSmrg esac 69292b2b4fcbSmrg else 69302b2b4fcbSmrg lt_cv_deplibs_check_method=pass_all 69312b2b4fcbSmrg fi 69322b2b4fcbSmrg ;; 69336aec45a7Smrg 69342b2b4fcbSmrghaiku*) 69352b2b4fcbSmrg lt_cv_deplibs_check_method=pass_all 69362b2b4fcbSmrg ;; 69376aec45a7Smrg 69382b2b4fcbSmrghpux10.20* | hpux11*) 69392b2b4fcbSmrg lt_cv_file_magic_cmd=$FILECMD 69402b2b4fcbSmrg case $host_cpu in 69412b2b4fcbSmrg ia64*) 69422b2b4fcbSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 69432b2b4fcbSmrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 69442b2b4fcbSmrg ;; 69452b2b4fcbSmrg hppa*64*) 69462b2b4fcbSmrg [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]'] 69472b2b4fcbSmrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 69482b2b4fcbSmrg ;; 69492b2b4fcbSmrg *) 69502b2b4fcbSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 69512b2b4fcbSmrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 69522b2b4fcbSmrg ;; 69532b2b4fcbSmrg esac 69542b2b4fcbSmrg ;; 69556aec45a7Smrg 69562b2b4fcbSmrginterix[[3-9]]*) 69572b2b4fcbSmrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 69582b2b4fcbSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 69592b2b4fcbSmrg ;; 69606aec45a7Smrg 69612b2b4fcbSmrgirix5* | irix6* | nonstopux*) 69622b2b4fcbSmrg case $LD in 69632b2b4fcbSmrg *-32|*"-32 ") libmagic=32-bit;; 69642b2b4fcbSmrg *-n32|*"-n32 ") libmagic=N32;; 69652b2b4fcbSmrg *-64|*"-64 ") libmagic=64-bit;; 69662b2b4fcbSmrg *) libmagic=never-match;; 69672b2b4fcbSmrg esac 69682b2b4fcbSmrg lt_cv_deplibs_check_method=pass_all 69692b2b4fcbSmrg ;; 69706aec45a7Smrg 69712b2b4fcbSmrg# This must be glibc/ELF. 69722b2b4fcbSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 69732b2b4fcbSmrg lt_cv_deplibs_check_method=pass_all 69742b2b4fcbSmrg ;; 69751473d951Smrg 69762b2b4fcbSmrgnetbsd*) 69772b2b4fcbSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 69782b2b4fcbSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 69792b2b4fcbSmrg else 69802b2b4fcbSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 69812b2b4fcbSmrg fi 69822b2b4fcbSmrg ;; 69832b2b4fcbSmrg 69842b2b4fcbSmrgnewos6*) 69852b2b4fcbSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 69862b2b4fcbSmrg lt_cv_file_magic_cmd=$FILECMD 69872b2b4fcbSmrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 69882b2b4fcbSmrg ;; 69891473d951Smrg 69902b2b4fcbSmrg*nto* | *qnx*) 69912b2b4fcbSmrg lt_cv_deplibs_check_method=pass_all 69922b2b4fcbSmrg ;; 69931473d951Smrg 69942b2b4fcbSmrgopenbsd* | bitrig*) 69952b2b4fcbSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 69962b2b4fcbSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 69972b2b4fcbSmrg else 69982b2b4fcbSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 69992b2b4fcbSmrg fi 70002b2b4fcbSmrg ;; 70011473d951Smrg 70022b2b4fcbSmrgosf3* | osf4* | osf5*) 70032b2b4fcbSmrg lt_cv_deplibs_check_method=pass_all 70042b2b4fcbSmrg ;; 70051473d951Smrg 70062b2b4fcbSmrgrdos*) 70072b2b4fcbSmrg lt_cv_deplibs_check_method=pass_all 70082b2b4fcbSmrg ;; 70091473d951Smrg 70102b2b4fcbSmrgsolaris*) 70112b2b4fcbSmrg lt_cv_deplibs_check_method=pass_all 70122b2b4fcbSmrg ;; 70131473d951Smrg 70142b2b4fcbSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 70152b2b4fcbSmrg lt_cv_deplibs_check_method=pass_all 70162b2b4fcbSmrg ;; 70176aec45a7Smrg 70182b2b4fcbSmrgsysv4 | sysv4.3*) 70192b2b4fcbSmrg case $host_vendor in 70202b2b4fcbSmrg motorola) 70212b2b4fcbSmrg 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]]' 70222b2b4fcbSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 70232b2b4fcbSmrg ;; 70242b2b4fcbSmrg ncr) 70252b2b4fcbSmrg lt_cv_deplibs_check_method=pass_all 70262b2b4fcbSmrg ;; 70272b2b4fcbSmrg sequent) 70282b2b4fcbSmrg lt_cv_file_magic_cmd='/bin/file' 70292b2b4fcbSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 70302b2b4fcbSmrg ;; 70312b2b4fcbSmrg sni) 70322b2b4fcbSmrg lt_cv_file_magic_cmd='/bin/file' 70332b2b4fcbSmrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 70342b2b4fcbSmrg lt_cv_file_magic_test_file=/lib/libc.so 70352b2b4fcbSmrg ;; 70362b2b4fcbSmrg siemens) 70372b2b4fcbSmrg lt_cv_deplibs_check_method=pass_all 70382b2b4fcbSmrg ;; 70392b2b4fcbSmrg pc) 70402b2b4fcbSmrg lt_cv_deplibs_check_method=pass_all 70412b2b4fcbSmrg ;; 70422b2b4fcbSmrg esac 70432b2b4fcbSmrg ;; 70446aec45a7Smrg 70452b2b4fcbSmrgtpf*) 70462b2b4fcbSmrg lt_cv_deplibs_check_method=pass_all 70472b2b4fcbSmrg ;; 70482b2b4fcbSmrgos2*) 70492b2b4fcbSmrg lt_cv_deplibs_check_method=pass_all 70502b2b4fcbSmrg ;; 70512b2b4fcbSmrgesac 70522b2b4fcbSmrg]) 70536aec45a7Smrg 70542b2b4fcbSmrgfile_magic_glob= 70552b2b4fcbSmrgwant_nocaseglob=no 70562b2b4fcbSmrgif test "$build" = "$host"; then 70572b2b4fcbSmrg case $host_os in 70582b2b4fcbSmrg mingw* | pw32*) 70592b2b4fcbSmrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 70602b2b4fcbSmrg want_nocaseglob=yes 70612b2b4fcbSmrg else 70622b2b4fcbSmrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 70632b2b4fcbSmrg fi 70642b2b4fcbSmrg ;; 70652b2b4fcbSmrg esac 70662b2b4fcbSmrgfi 70676aec45a7Smrg 70682b2b4fcbSmrgfile_magic_cmd=$lt_cv_file_magic_cmd 70692b2b4fcbSmrgdeplibs_check_method=$lt_cv_deplibs_check_method 70702b2b4fcbSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 70716aec45a7Smrg 70722b2b4fcbSmrg_LT_DECL([], [deplibs_check_method], [1], 70732b2b4fcbSmrg [Method to check whether dependent libraries are shared objects]) 70742b2b4fcbSmrg_LT_DECL([], [file_magic_cmd], [1], 70752b2b4fcbSmrg [Command to use when deplibs_check_method = "file_magic"]) 70762b2b4fcbSmrg_LT_DECL([], [file_magic_glob], [1], 70772b2b4fcbSmrg [How to find potential files when deplibs_check_method = "file_magic"]) 70782b2b4fcbSmrg_LT_DECL([], [want_nocaseglob], [1], 70792b2b4fcbSmrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 70802b2b4fcbSmrg])# _LT_CHECK_MAGIC_METHOD 70816aec45a7Smrg 70826aec45a7Smrg 70832b2b4fcbSmrg# LT_PATH_NM 70842b2b4fcbSmrg# ---------- 70852b2b4fcbSmrg# find the pathname to a BSD- or MS-compatible name lister 70862b2b4fcbSmrgAC_DEFUN([LT_PATH_NM], 70872b2b4fcbSmrg[AC_REQUIRE([AC_PROG_CC])dnl 70882b2b4fcbSmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 70892b2b4fcbSmrg[if test -n "$NM"; then 70902b2b4fcbSmrg # Let the user override the test. 70912b2b4fcbSmrg lt_cv_path_NM=$NM 70922b2b4fcbSmrgelse 70932b2b4fcbSmrg lt_nm_to_check=${ac_tool_prefix}nm 70942b2b4fcbSmrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 70952b2b4fcbSmrg lt_nm_to_check="$lt_nm_to_check nm" 70962b2b4fcbSmrg fi 70972b2b4fcbSmrg for lt_tmp_nm in $lt_nm_to_check; do 70982b2b4fcbSmrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 70992b2b4fcbSmrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 71002b2b4fcbSmrg IFS=$lt_save_ifs 71012b2b4fcbSmrg test -z "$ac_dir" && ac_dir=. 71022b2b4fcbSmrg tmp_nm=$ac_dir/$lt_tmp_nm 71032b2b4fcbSmrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then 71042b2b4fcbSmrg # Check to see if the nm accepts a BSD-compat flag. 71052b2b4fcbSmrg # Adding the 'sed 1q' prevents false positives on HP-UX, which says: 71062b2b4fcbSmrg # nm: unknown option "B" ignored 71072b2b4fcbSmrg # Tru64's nm complains that /dev/null is an invalid object file 71082b2b4fcbSmrg # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty 71092b2b4fcbSmrg case $build_os in 71102b2b4fcbSmrg mingw*) lt_bad_file=conftest.nm/nofile ;; 71112b2b4fcbSmrg *) lt_bad_file=/dev/null ;; 71122b2b4fcbSmrg esac 71132b2b4fcbSmrg case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in 71142b2b4fcbSmrg *$lt_bad_file* | *'Invalid file or object type'*) 71152b2b4fcbSmrg lt_cv_path_NM="$tmp_nm -B" 71162b2b4fcbSmrg break 2 71172b2b4fcbSmrg ;; 71182b2b4fcbSmrg *) 71192b2b4fcbSmrg case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in 71202b2b4fcbSmrg */dev/null*) 71212b2b4fcbSmrg lt_cv_path_NM="$tmp_nm -p" 71222b2b4fcbSmrg break 2 71232b2b4fcbSmrg ;; 71242b2b4fcbSmrg *) 71252b2b4fcbSmrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 71262b2b4fcbSmrg continue # so that we can try to find one that supports BSD flags 71272b2b4fcbSmrg ;; 71282b2b4fcbSmrg esac 71292b2b4fcbSmrg ;; 71302b2b4fcbSmrg esac 71312b2b4fcbSmrg fi 71322b2b4fcbSmrg done 71332b2b4fcbSmrg IFS=$lt_save_ifs 71342b2b4fcbSmrg done 71352b2b4fcbSmrg : ${lt_cv_path_NM=no} 71362b2b4fcbSmrgfi]) 71372b2b4fcbSmrgif test no != "$lt_cv_path_NM"; then 71382b2b4fcbSmrg NM=$lt_cv_path_NM 71392b2b4fcbSmrgelse 71402b2b4fcbSmrg # Didn't find any BSD compatible name lister, look for dumpbin. 71412b2b4fcbSmrg if test -n "$DUMPBIN"; then : 71422b2b4fcbSmrg # Let the user override the test. 71432b2b4fcbSmrg else 71442b2b4fcbSmrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 71452b2b4fcbSmrg case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in 71462b2b4fcbSmrg *COFF*) 71472b2b4fcbSmrg DUMPBIN="$DUMPBIN -symbols -headers" 71482b2b4fcbSmrg ;; 71492b2b4fcbSmrg *) 71502b2b4fcbSmrg DUMPBIN=: 71512b2b4fcbSmrg ;; 71522b2b4fcbSmrg esac 71532b2b4fcbSmrg fi 71542b2b4fcbSmrg AC_SUBST([DUMPBIN]) 71552b2b4fcbSmrg if test : != "$DUMPBIN"; then 71562b2b4fcbSmrg NM=$DUMPBIN 71572b2b4fcbSmrg fi 71586aec45a7Smrgfi 71592b2b4fcbSmrgtest -z "$NM" && NM=nm 71602b2b4fcbSmrgAC_SUBST([NM]) 71612b2b4fcbSmrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 71626aec45a7Smrg 71632b2b4fcbSmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 71642b2b4fcbSmrg [lt_cv_nm_interface="BSD nm" 71652b2b4fcbSmrg echo "int some_variable = 0;" > conftest.$ac_ext 71662b2b4fcbSmrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 71672b2b4fcbSmrg (eval "$ac_compile" 2>conftest.err) 71682b2b4fcbSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 71692b2b4fcbSmrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 71702b2b4fcbSmrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 71712b2b4fcbSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 71722b2b4fcbSmrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 71732b2b4fcbSmrg cat conftest.out >&AS_MESSAGE_LOG_FD 71742b2b4fcbSmrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 71752b2b4fcbSmrg lt_cv_nm_interface="MS dumpbin" 71762b2b4fcbSmrg fi 71772b2b4fcbSmrg rm -f conftest*]) 71782b2b4fcbSmrg])# LT_PATH_NM 71796aec45a7Smrg 71802b2b4fcbSmrg# Old names: 71812b2b4fcbSmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 71822b2b4fcbSmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 71832b2b4fcbSmrgdnl aclocal-1.4 backwards compatibility: 71842b2b4fcbSmrgdnl AC_DEFUN([AM_PROG_NM], []) 71852b2b4fcbSmrgdnl AC_DEFUN([AC_PROG_NM], []) 71866aec45a7Smrg 71872b2b4fcbSmrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 71882b2b4fcbSmrg# -------------------------------- 71892b2b4fcbSmrg# how to determine the name of the shared library 71902b2b4fcbSmrg# associated with a specific link library. 71912b2b4fcbSmrg# -- PORTME fill in with the dynamic library characteristics 71922b2b4fcbSmrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 71932b2b4fcbSmrg[m4_require([_LT_DECL_EGREP]) 71942b2b4fcbSmrgm4_require([_LT_DECL_OBJDUMP]) 71952b2b4fcbSmrgm4_require([_LT_DECL_DLLTOOL]) 71962b2b4fcbSmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 71972b2b4fcbSmrglt_cv_sharedlib_from_linklib_cmd, 71982b2b4fcbSmrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 71996aec45a7Smrg 72002b2b4fcbSmrgcase $host_os in 72012b2b4fcbSmrgcygwin* | mingw* | pw32* | cegcc*) 72022b2b4fcbSmrg # two different shell functions defined in ltmain.sh; 72032b2b4fcbSmrg # decide which one to use based on capabilities of $DLLTOOL 72042b2b4fcbSmrg case `$DLLTOOL --help 2>&1` in 72052b2b4fcbSmrg *--identify-strict*) 72062b2b4fcbSmrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 72072b2b4fcbSmrg ;; 72082b2b4fcbSmrg *) 72092b2b4fcbSmrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 72102b2b4fcbSmrg ;; 72112b2b4fcbSmrg esac 72122b2b4fcbSmrg ;; 72132b2b4fcbSmrg*) 72142b2b4fcbSmrg # fallback: assume linklib IS sharedlib 72152b2b4fcbSmrg lt_cv_sharedlib_from_linklib_cmd=$ECHO 72162b2b4fcbSmrg ;; 72172b2b4fcbSmrgesac 72182b2b4fcbSmrg]) 72192b2b4fcbSmrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 72202b2b4fcbSmrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 7221aa9e3350Smrg 72222b2b4fcbSmrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 72232b2b4fcbSmrg [Command to associate shared and link libraries]) 72242b2b4fcbSmrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 7225aa9e3350Smrg 7226aa9e3350Smrg 72272b2b4fcbSmrg# _LT_PATH_MANIFEST_TOOL 72282b2b4fcbSmrg# ---------------------- 72292b2b4fcbSmrg# locate the manifest tool 72302b2b4fcbSmrgm4_defun([_LT_PATH_MANIFEST_TOOL], 72312b2b4fcbSmrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 72322b2b4fcbSmrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 72332b2b4fcbSmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 72342b2b4fcbSmrg [lt_cv_path_mainfest_tool=no 72352b2b4fcbSmrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 72362b2b4fcbSmrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 72372b2b4fcbSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 72382b2b4fcbSmrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 72392b2b4fcbSmrg lt_cv_path_mainfest_tool=yes 72402b2b4fcbSmrg fi 72412b2b4fcbSmrg rm -f conftest*]) 72422b2b4fcbSmrgif test yes != "$lt_cv_path_mainfest_tool"; then 72432b2b4fcbSmrg MANIFEST_TOOL=: 72442b2b4fcbSmrgfi 72452b2b4fcbSmrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 72462b2b4fcbSmrg])# _LT_PATH_MANIFEST_TOOL 7247aa9e3350Smrg 7248aa9e3350Smrg 72492b2b4fcbSmrg# _LT_DLL_DEF_P([FILE]) 72502b2b4fcbSmrg# --------------------- 72512b2b4fcbSmrg# True iff FILE is a Windows DLL '.def' file. 72522b2b4fcbSmrg# Keep in sync with func_dll_def_p in the libtool script 72532b2b4fcbSmrgAC_DEFUN([_LT_DLL_DEF_P], 72542b2b4fcbSmrg[dnl 72552b2b4fcbSmrg test DEF = "`$SED -n dnl 72562b2b4fcbSmrg -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace 72572b2b4fcbSmrg -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments 72582b2b4fcbSmrg -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl 72592b2b4fcbSmrg -e q dnl Only consider the first "real" line 72602b2b4fcbSmrg $1`" dnl 72612b2b4fcbSmrg])# _LT_DLL_DEF_P 7262aa9e3350Smrg 7263aa9e3350Smrg 72642b2b4fcbSmrg# LT_LIB_M 72652b2b4fcbSmrg# -------- 72662b2b4fcbSmrg# check for math library 72672b2b4fcbSmrgAC_DEFUN([LT_LIB_M], 72682b2b4fcbSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 72692b2b4fcbSmrgLIBM= 72702b2b4fcbSmrgcase $host in 72712b2b4fcbSmrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 72722b2b4fcbSmrg # These system don't have libm, or don't need it 72732b2b4fcbSmrg ;; 72742b2b4fcbSmrg*-ncr-sysv4.3*) 72752b2b4fcbSmrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) 72762b2b4fcbSmrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 72772b2b4fcbSmrg ;; 72782b2b4fcbSmrg*) 72792b2b4fcbSmrg AC_CHECK_LIB(m, cos, LIBM=-lm) 72802b2b4fcbSmrg ;; 72812b2b4fcbSmrgesac 72822b2b4fcbSmrgAC_SUBST([LIBM]) 72832b2b4fcbSmrg])# LT_LIB_M 7284aa9e3350Smrg 72852b2b4fcbSmrg# Old name: 72862b2b4fcbSmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 72872b2b4fcbSmrgdnl aclocal-1.4 backwards compatibility: 72882b2b4fcbSmrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 7289aa9e3350Smrg 7290aa9e3350Smrg 72912b2b4fcbSmrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 72922b2b4fcbSmrg# ------------------------------- 72932b2b4fcbSmrgm4_defun([_LT_COMPILER_NO_RTTI], 72942b2b4fcbSmrg[m4_require([_LT_TAG_COMPILER])dnl 7295aa9e3350Smrg 72962b2b4fcbSmrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 72972b2b4fcbSmrg 72982b2b4fcbSmrgif test yes = "$GCC"; then 72992b2b4fcbSmrg case $cc_basename in 73002b2b4fcbSmrg nvcc*) 73012b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 73022b2b4fcbSmrg *) 73032b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 73042b2b4fcbSmrg esac 73052b2b4fcbSmrg 73062b2b4fcbSmrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 73072b2b4fcbSmrg lt_cv_prog_compiler_rtti_exceptions, 73082b2b4fcbSmrg [-fno-rtti -fno-exceptions], [], 73092b2b4fcbSmrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 7310aa9e3350Smrgfi 73112b2b4fcbSmrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 73122b2b4fcbSmrg [Compiler flag to turn off builtin functions]) 73132b2b4fcbSmrg])# _LT_COMPILER_NO_RTTI 7314aa9e3350Smrg 7315aa9e3350Smrg 73162b2b4fcbSmrg# _LT_CMD_GLOBAL_SYMBOLS 73172b2b4fcbSmrg# ---------------------- 73182b2b4fcbSmrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 73192b2b4fcbSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 73202b2b4fcbSmrgAC_REQUIRE([AC_PROG_CC])dnl 73212b2b4fcbSmrgAC_REQUIRE([AC_PROG_AWK])dnl 73222b2b4fcbSmrgAC_REQUIRE([LT_PATH_NM])dnl 73232b2b4fcbSmrgAC_REQUIRE([LT_PATH_LD])dnl 73242b2b4fcbSmrgm4_require([_LT_DECL_SED])dnl 73252b2b4fcbSmrgm4_require([_LT_DECL_EGREP])dnl 73262b2b4fcbSmrgm4_require([_LT_TAG_COMPILER])dnl 7327aa9e3350Smrg 73282b2b4fcbSmrg# Check for command to grab the raw symbol name followed by C symbol from nm. 73292b2b4fcbSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 73302b2b4fcbSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 73312b2b4fcbSmrg[ 73322b2b4fcbSmrg# These are sane defaults that work on at least a few old systems. 73332b2b4fcbSmrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 7334aa9e3350Smrg 73352b2b4fcbSmrg# Character class describing NM global symbol codes. 73362b2b4fcbSmrgsymcode='[[BCDEGRST]]' 73376aec45a7Smrg 73382b2b4fcbSmrg# Regexp to match symbols that can be accessed directly from C. 73392b2b4fcbSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 73406aec45a7Smrg 73412b2b4fcbSmrg# Define system-specific variables. 73422b2b4fcbSmrgcase $host_os in 73432b2b4fcbSmrgaix*) 73442b2b4fcbSmrg symcode='[[BCDT]]' 73452b2b4fcbSmrg ;; 73462b2b4fcbSmrgcygwin* | mingw* | pw32* | cegcc*) 73472b2b4fcbSmrg symcode='[[ABCDGISTW]]' 73482b2b4fcbSmrg ;; 73492b2b4fcbSmrghpux*) 73502b2b4fcbSmrg if test ia64 = "$host_cpu"; then 73512b2b4fcbSmrg symcode='[[ABCDEGRST]]' 73522b2b4fcbSmrg fi 73532b2b4fcbSmrg ;; 73542b2b4fcbSmrgirix* | nonstopux*) 73552b2b4fcbSmrg symcode='[[BCDEGRST]]' 73562b2b4fcbSmrg ;; 73572b2b4fcbSmrgosf*) 73582b2b4fcbSmrg symcode='[[BCDEGQRST]]' 73592b2b4fcbSmrg ;; 73602b2b4fcbSmrgsolaris*) 73612b2b4fcbSmrg symcode='[[BDRT]]' 73622b2b4fcbSmrg ;; 73632b2b4fcbSmrgsco3.2v5*) 73642b2b4fcbSmrg symcode='[[DT]]' 73652b2b4fcbSmrg ;; 73662b2b4fcbSmrgsysv4.2uw2*) 73672b2b4fcbSmrg symcode='[[DT]]' 73682b2b4fcbSmrg ;; 73692b2b4fcbSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 73702b2b4fcbSmrg symcode='[[ABDT]]' 73712b2b4fcbSmrg ;; 73722b2b4fcbSmrgsysv4) 73732b2b4fcbSmrg symcode='[[DFNSTU]]' 73742b2b4fcbSmrg ;; 73752b2b4fcbSmrgesac 73766aec45a7Smrg 73772b2b4fcbSmrg# If we're using GNU nm, then use its standard symbol codes. 73782b2b4fcbSmrgcase `$NM -V 2>&1` in 73792b2b4fcbSmrg*GNU* | *'with BFD'*) 73802b2b4fcbSmrg symcode='[[ABCDGIRSTW]]' ;; 73812b2b4fcbSmrgesac 73826aec45a7Smrg 73832b2b4fcbSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 73842b2b4fcbSmrg # Gets list of data symbols to import. 73852b2b4fcbSmrg lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'" 73862b2b4fcbSmrg # Adjust the below global symbol transforms to fixup imported variables. 73872b2b4fcbSmrg lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" 73882b2b4fcbSmrg lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" 73892b2b4fcbSmrg lt_c_name_lib_hook="\ 73902b2b4fcbSmrg -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ 73912b2b4fcbSmrg -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" 73922b2b4fcbSmrgelse 73932b2b4fcbSmrg # Disable hooks by default. 73942b2b4fcbSmrg lt_cv_sys_global_symbol_to_import= 73952b2b4fcbSmrg lt_cdecl_hook= 73962b2b4fcbSmrg lt_c_name_hook= 73972b2b4fcbSmrg lt_c_name_lib_hook= 73982b2b4fcbSmrgfi 73996aec45a7Smrg 74002b2b4fcbSmrg# Transform an extracted symbol line into a proper C declaration. 74012b2b4fcbSmrg# Some systems (esp. on ia64) link data and code symbols differently, 74022b2b4fcbSmrg# so use this general approach. 74032b2b4fcbSmrglt_cv_sys_global_symbol_to_cdecl="$SED -n"\ 74042b2b4fcbSmrg$lt_cdecl_hook\ 74052b2b4fcbSmrg" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ 74062b2b4fcbSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" 74076aec45a7Smrg 74082b2b4fcbSmrg# Transform an extracted symbol line into symbol name and symbol address 74092b2b4fcbSmrglt_cv_sys_global_symbol_to_c_name_address="$SED -n"\ 74102b2b4fcbSmrg$lt_c_name_hook\ 74112b2b4fcbSmrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 74122b2b4fcbSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" 74136aec45a7Smrg 74142b2b4fcbSmrg# Transform an extracted symbol line into symbol name with lib prefix and 74152b2b4fcbSmrg# symbol address. 74162b2b4fcbSmrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\ 74172b2b4fcbSmrg$lt_c_name_lib_hook\ 74182b2b4fcbSmrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 74192b2b4fcbSmrg" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ 74202b2b4fcbSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" 74212b2b4fcbSmrg 74222b2b4fcbSmrg# Handle CRLF in mingw tool chain 74232b2b4fcbSmrgopt_cr= 74242b2b4fcbSmrgcase $build_os in 74252b2b4fcbSmrgmingw*) 74262b2b4fcbSmrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 74272b2b4fcbSmrg ;; 74282b2b4fcbSmrgesac 74296aec45a7Smrg 74302b2b4fcbSmrg# Try without a prefix underscore, then with it. 74312b2b4fcbSmrgfor ac_symprfx in "" "_"; do 74326aec45a7Smrg 74332b2b4fcbSmrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 74342b2b4fcbSmrg symxfrm="\\1 $ac_symprfx\\2 \\2" 74356aec45a7Smrg 74362b2b4fcbSmrg # Write the raw and C identifiers. 74372b2b4fcbSmrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 74382b2b4fcbSmrg # Fake it for dumpbin and say T for any non-static function, 74392b2b4fcbSmrg # D for any global variable and I for any imported variable. 74402b2b4fcbSmrg # Also find C++ and __fastcall symbols from MSVC++ or ICC, 74412b2b4fcbSmrg # which start with @ or ?. 74422b2b4fcbSmrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 74432b2b4fcbSmrg" {last_section=section; section=\$ 3};"\ 74442b2b4fcbSmrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 74452b2b4fcbSmrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 74462b2b4fcbSmrg" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ 74472b2b4fcbSmrg" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ 74482b2b4fcbSmrg" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ 74492b2b4fcbSmrg" \$ 0!~/External *\|/{next};"\ 74502b2b4fcbSmrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 74512b2b4fcbSmrg" {if(hide[section]) next};"\ 74522b2b4fcbSmrg" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ 74532b2b4fcbSmrg" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ 74542b2b4fcbSmrg" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ 74552b2b4fcbSmrg" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ 74562b2b4fcbSmrg" ' prfx=^$ac_symprfx]" 74572b2b4fcbSmrg else 74582b2b4fcbSmrg lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 74592b2b4fcbSmrg fi 74602b2b4fcbSmrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'" 74616aec45a7Smrg 74622b2b4fcbSmrg # Check to see that the pipe works correctly. 74632b2b4fcbSmrg pipe_works=no 74646aec45a7Smrg 74652b2b4fcbSmrg rm -f conftest* 74662b2b4fcbSmrg cat > conftest.$ac_ext <<_LT_EOF 74672b2b4fcbSmrg#ifdef __cplusplus 74682b2b4fcbSmrgextern "C" { 74692b2b4fcbSmrg#endif 74702b2b4fcbSmrgchar nm_test_var; 74712b2b4fcbSmrgvoid nm_test_func(void); 74722b2b4fcbSmrgvoid nm_test_func(void){} 74732b2b4fcbSmrg#ifdef __cplusplus 74742b2b4fcbSmrg} 74752b2b4fcbSmrg#endif 74762b2b4fcbSmrgint main(){nm_test_var='a';nm_test_func();return(0);} 74772b2b4fcbSmrg_LT_EOF 74786aec45a7Smrg 74792b2b4fcbSmrg if AC_TRY_EVAL(ac_compile); then 74802b2b4fcbSmrg # Now try to grab the symbols. 74812b2b4fcbSmrg nlist=conftest.nm 74822b2b4fcbSmrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 74832b2b4fcbSmrg # Try sorting and uniquifying the output. 74842b2b4fcbSmrg if sort "$nlist" | uniq > "$nlist"T; then 74852b2b4fcbSmrg mv -f "$nlist"T "$nlist" 74862b2b4fcbSmrg else 74872b2b4fcbSmrg rm -f "$nlist"T 74882b2b4fcbSmrg fi 74896aec45a7Smrg 74902b2b4fcbSmrg # Make sure that we snagged all the symbols we need. 74912b2b4fcbSmrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 74922b2b4fcbSmrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 74932b2b4fcbSmrg cat <<_LT_EOF > conftest.$ac_ext 74942b2b4fcbSmrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 74952b2b4fcbSmrg#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE 74962b2b4fcbSmrg/* DATA imports from DLLs on WIN32 can't be const, because runtime 74972b2b4fcbSmrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 74982b2b4fcbSmrg# define LT@&t@_DLSYM_CONST 74992b2b4fcbSmrg#elif defined __osf__ 75002b2b4fcbSmrg/* This system does not cope well with relocations in const data. */ 75012b2b4fcbSmrg# define LT@&t@_DLSYM_CONST 75022b2b4fcbSmrg#else 75032b2b4fcbSmrg# define LT@&t@_DLSYM_CONST const 75042b2b4fcbSmrg#endif 7505aa9e3350Smrg 75062b2b4fcbSmrg#ifdef __cplusplus 75072b2b4fcbSmrgextern "C" { 75082b2b4fcbSmrg#endif 7509aa9e3350Smrg 75102b2b4fcbSmrg_LT_EOF 75112b2b4fcbSmrg # Now generate the symbol file. 75122b2b4fcbSmrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 75136aec45a7Smrg 75142b2b4fcbSmrg cat <<_LT_EOF >> conftest.$ac_ext 75156aec45a7Smrg 75162b2b4fcbSmrg/* The mapping between symbol names and symbols. */ 75172b2b4fcbSmrgLT@&t@_DLSYM_CONST struct { 75182b2b4fcbSmrg const char *name; 75192b2b4fcbSmrg void *address; 75202b2b4fcbSmrg} 75212b2b4fcbSmrglt__PROGRAM__LTX_preloaded_symbols[[]] = 75222b2b4fcbSmrg{ 75232b2b4fcbSmrg { "@PROGRAM@", (void *) 0 }, 75242b2b4fcbSmrg_LT_EOF 75252b2b4fcbSmrg $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 75262b2b4fcbSmrg cat <<\_LT_EOF >> conftest.$ac_ext 75272b2b4fcbSmrg {0, (void *) 0} 75282b2b4fcbSmrg}; 75296aec45a7Smrg 75302b2b4fcbSmrg/* This works around a problem in FreeBSD linker */ 75312b2b4fcbSmrg#ifdef FREEBSD_WORKAROUND 75322b2b4fcbSmrgstatic const void *lt_preloaded_setup() { 75332b2b4fcbSmrg return lt__PROGRAM__LTX_preloaded_symbols; 75342b2b4fcbSmrg} 75352b2b4fcbSmrg#endif 75366aec45a7Smrg 75372b2b4fcbSmrg#ifdef __cplusplus 75382b2b4fcbSmrg} 75392b2b4fcbSmrg#endif 75402b2b4fcbSmrg_LT_EOF 75412b2b4fcbSmrg # Now try linking the two files. 75422b2b4fcbSmrg mv conftest.$ac_objext conftstm.$ac_objext 75432b2b4fcbSmrg lt_globsym_save_LIBS=$LIBS 75442b2b4fcbSmrg lt_globsym_save_CFLAGS=$CFLAGS 75452b2b4fcbSmrg LIBS=conftstm.$ac_objext 75462b2b4fcbSmrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 75472b2b4fcbSmrg if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then 75482b2b4fcbSmrg pipe_works=yes 75492b2b4fcbSmrg fi 75502b2b4fcbSmrg LIBS=$lt_globsym_save_LIBS 75512b2b4fcbSmrg CFLAGS=$lt_globsym_save_CFLAGS 75522b2b4fcbSmrg else 75532b2b4fcbSmrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 75542b2b4fcbSmrg fi 75552b2b4fcbSmrg else 75562b2b4fcbSmrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 75572b2b4fcbSmrg fi 75582b2b4fcbSmrg else 75592b2b4fcbSmrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 75602b2b4fcbSmrg fi 75612b2b4fcbSmrg else 75622b2b4fcbSmrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 75632b2b4fcbSmrg cat conftest.$ac_ext >&5 75642b2b4fcbSmrg fi 75652b2b4fcbSmrg rm -rf conftest* conftst* 75666aec45a7Smrg 75672b2b4fcbSmrg # Do not use the global_symbol_pipe unless it works. 75682b2b4fcbSmrg if test yes = "$pipe_works"; then 75692b2b4fcbSmrg break 75702b2b4fcbSmrg else 75712b2b4fcbSmrg lt_cv_sys_global_symbol_pipe= 75722b2b4fcbSmrg fi 75732b2b4fcbSmrgdone 75746aec45a7Smrg]) 75752b2b4fcbSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 75762b2b4fcbSmrg lt_cv_sys_global_symbol_to_cdecl= 75772b2b4fcbSmrgfi 75782b2b4fcbSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 75792b2b4fcbSmrg AC_MSG_RESULT(failed) 75802b2b4fcbSmrgelse 75812b2b4fcbSmrg AC_MSG_RESULT(ok) 75822b2b4fcbSmrgfi 75836aec45a7Smrg 75842b2b4fcbSmrg# Response file support. 75852b2b4fcbSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 75862b2b4fcbSmrg nm_file_list_spec='@' 75872b2b4fcbSmrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 75882b2b4fcbSmrg nm_file_list_spec='@' 75892b2b4fcbSmrgfi 75906aec45a7Smrg 75912b2b4fcbSmrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 75922b2b4fcbSmrg [Take the output of nm and produce a listing of raw symbols and C names]) 75932b2b4fcbSmrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 75942b2b4fcbSmrg [Transform the output of nm in a proper C declaration]) 75952b2b4fcbSmrg_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], 75962b2b4fcbSmrg [Transform the output of nm into a list of symbols to manually relocate]) 75972b2b4fcbSmrg_LT_DECL([global_symbol_to_c_name_address], 75982b2b4fcbSmrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 75992b2b4fcbSmrg [Transform the output of nm in a C name address pair]) 76002b2b4fcbSmrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 76012b2b4fcbSmrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 76022b2b4fcbSmrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 76032b2b4fcbSmrg_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], 76042b2b4fcbSmrg [The name lister interface]) 76052b2b4fcbSmrg_LT_DECL([], [nm_file_list_spec], [1], 76062b2b4fcbSmrg [Specify filename containing input files for $NM]) 76072b2b4fcbSmrg]) # _LT_CMD_GLOBAL_SYMBOLS 76082b2b4fcbSmrg 76092b2b4fcbSmrg 76102b2b4fcbSmrg# _LT_COMPILER_PIC([TAGNAME]) 76112b2b4fcbSmrg# --------------------------- 76122b2b4fcbSmrgm4_defun([_LT_COMPILER_PIC], 76132b2b4fcbSmrg[m4_require([_LT_TAG_COMPILER])dnl 76142b2b4fcbSmrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 76152b2b4fcbSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 76162b2b4fcbSmrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 76172b2b4fcbSmrg 76182b2b4fcbSmrgm4_if([$1], [CXX], [ 76192b2b4fcbSmrg # C++ specific cases for pic, static, wl, etc. 76202b2b4fcbSmrg if test yes = "$GXX"; then 76212b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 76222b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 76236aec45a7Smrg 76242b2b4fcbSmrg case $host_os in 76252b2b4fcbSmrg aix*) 76262b2b4fcbSmrg # All AIX code is PIC. 76272b2b4fcbSmrg if test ia64 = "$host_cpu"; then 76282b2b4fcbSmrg # AIX 5 now supports IA64 processor 76292b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 76302b2b4fcbSmrg fi 76312b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 76322b2b4fcbSmrg ;; 76332b2b4fcbSmrg 76342b2b4fcbSmrg amigaos*) 76352b2b4fcbSmrg case $host_cpu in 76362b2b4fcbSmrg powerpc) 76372b2b4fcbSmrg # see comment about AmigaOS4 .so support 76382b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 76392b2b4fcbSmrg ;; 76402b2b4fcbSmrg m68k) 76412b2b4fcbSmrg # FIXME: we need at least 68020 code to build shared libraries, but 76422b2b4fcbSmrg # adding the '-m68020' flag to GCC prevents building anything better, 76432b2b4fcbSmrg # like '-m68040'. 76442b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 76452b2b4fcbSmrg ;; 76462b2b4fcbSmrg esac 76472b2b4fcbSmrg ;; 76482b2b4fcbSmrg 76492b2b4fcbSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 76502b2b4fcbSmrg # PIC is the default for these OSes. 76512b2b4fcbSmrg ;; 76522b2b4fcbSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 76532b2b4fcbSmrg # This hack is so that the source file can tell whether it is being 76542b2b4fcbSmrg # built for inclusion in a dll (and should export symbols for example). 76552b2b4fcbSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 76562b2b4fcbSmrg # (--disable-auto-import) libraries 76572b2b4fcbSmrg m4_if([$1], [GCJ], [], 76582b2b4fcbSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 76592b2b4fcbSmrg case $host_os in 76602b2b4fcbSmrg os2*) 76612b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 76622b2b4fcbSmrg ;; 76632b2b4fcbSmrg esac 76642b2b4fcbSmrg ;; 76652b2b4fcbSmrg darwin* | rhapsody*) 76662b2b4fcbSmrg # PIC is the default on this platform 76672b2b4fcbSmrg # Common symbols not allowed in MH_DYLIB files 76682b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 76692b2b4fcbSmrg ;; 76702b2b4fcbSmrg *djgpp*) 76712b2b4fcbSmrg # DJGPP does not support shared libraries at all 76722b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 76732b2b4fcbSmrg ;; 76742b2b4fcbSmrg haiku*) 76752b2b4fcbSmrg # PIC is the default for Haiku. 76762b2b4fcbSmrg # The "-static" flag exists, but is broken. 76772b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 76782b2b4fcbSmrg ;; 76792b2b4fcbSmrg interix[[3-9]]*) 76802b2b4fcbSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 76812b2b4fcbSmrg # Instead, we relocate shared libraries at runtime. 76822b2b4fcbSmrg ;; 76832b2b4fcbSmrg sysv4*MP*) 76842b2b4fcbSmrg if test -d /usr/nec; then 76852b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 76862b2b4fcbSmrg fi 76872b2b4fcbSmrg ;; 76882b2b4fcbSmrg hpux*) 76892b2b4fcbSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 76902b2b4fcbSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 76912b2b4fcbSmrg # sets the default TLS model and affects inlining. 76922b2b4fcbSmrg case $host_cpu in 76932b2b4fcbSmrg hppa*64*) 76942b2b4fcbSmrg ;; 76952b2b4fcbSmrg *) 76962b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 76972b2b4fcbSmrg ;; 76982b2b4fcbSmrg esac 76992b2b4fcbSmrg ;; 77002b2b4fcbSmrg *qnx* | *nto*) 77012b2b4fcbSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 77022b2b4fcbSmrg # it will coredump. 77032b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 77042b2b4fcbSmrg ;; 77052b2b4fcbSmrg *) 77062b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 77072b2b4fcbSmrg ;; 77082b2b4fcbSmrg esac 77092b2b4fcbSmrg else 77102b2b4fcbSmrg case $host_os in 77112b2b4fcbSmrg aix[[4-9]]*) 77122b2b4fcbSmrg # All AIX code is PIC. 77132b2b4fcbSmrg if test ia64 = "$host_cpu"; then 77142b2b4fcbSmrg # AIX 5 now supports IA64 processor 77152b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 77162b2b4fcbSmrg else 77172b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 77182b2b4fcbSmrg fi 77192b2b4fcbSmrg ;; 77202b2b4fcbSmrg chorus*) 77212b2b4fcbSmrg case $cc_basename in 77222b2b4fcbSmrg cxch68*) 77232b2b4fcbSmrg # Green Hills C++ Compiler 77242b2b4fcbSmrg # _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" 77252b2b4fcbSmrg ;; 77262b2b4fcbSmrg esac 77272b2b4fcbSmrg ;; 77282b2b4fcbSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 77292b2b4fcbSmrg # This hack is so that the source file can tell whether it is being 77302b2b4fcbSmrg # built for inclusion in a dll (and should export symbols for example). 77312b2b4fcbSmrg m4_if([$1], [GCJ], [], 77322b2b4fcbSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 77332b2b4fcbSmrg ;; 77342b2b4fcbSmrg dgux*) 77352b2b4fcbSmrg case $cc_basename in 77362b2b4fcbSmrg ec++*) 77372b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 77382b2b4fcbSmrg ;; 77392b2b4fcbSmrg ghcx*) 77402b2b4fcbSmrg # Green Hills C++ Compiler 77412b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 77422b2b4fcbSmrg ;; 77432b2b4fcbSmrg *) 77442b2b4fcbSmrg ;; 77452b2b4fcbSmrg esac 77462b2b4fcbSmrg ;; 77472b2b4fcbSmrg freebsd* | dragonfly* | midnightbsd*) 77482b2b4fcbSmrg # FreeBSD uses GNU C++ 77492b2b4fcbSmrg ;; 77502b2b4fcbSmrg hpux9* | hpux10* | hpux11*) 77512b2b4fcbSmrg case $cc_basename in 77522b2b4fcbSmrg CC*) 77532b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 77542b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 77552b2b4fcbSmrg if test ia64 != "$host_cpu"; then 77562b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 77572b2b4fcbSmrg fi 77582b2b4fcbSmrg ;; 77592b2b4fcbSmrg aCC*) 77602b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 77612b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 77622b2b4fcbSmrg case $host_cpu in 77632b2b4fcbSmrg hppa*64*|ia64*) 77642b2b4fcbSmrg # +Z the default 77652b2b4fcbSmrg ;; 77662b2b4fcbSmrg *) 77672b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 77682b2b4fcbSmrg ;; 77692b2b4fcbSmrg esac 77702b2b4fcbSmrg ;; 77712b2b4fcbSmrg *) 77722b2b4fcbSmrg ;; 77732b2b4fcbSmrg esac 77742b2b4fcbSmrg ;; 77752b2b4fcbSmrg interix*) 77762b2b4fcbSmrg # This is c89, which is MS Visual C++ (no shared libs) 77772b2b4fcbSmrg # Anyone wants to do a port? 77782b2b4fcbSmrg ;; 77792b2b4fcbSmrg irix5* | irix6* | nonstopux*) 77802b2b4fcbSmrg case $cc_basename in 77812b2b4fcbSmrg CC*) 77822b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 77832b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 77842b2b4fcbSmrg # CC pic flag -KPIC is the default. 77852b2b4fcbSmrg ;; 77862b2b4fcbSmrg *) 77872b2b4fcbSmrg ;; 77882b2b4fcbSmrg esac 77892b2b4fcbSmrg ;; 77902b2b4fcbSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 77912b2b4fcbSmrg case $cc_basename in 77922b2b4fcbSmrg KCC*) 77932b2b4fcbSmrg # KAI C++ Compiler 77942b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 77952b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 77962b2b4fcbSmrg ;; 77972b2b4fcbSmrg ecpc* ) 77982b2b4fcbSmrg # old Intel C++ for x86_64, which still supported -KPIC. 77992b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 78002b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 78012b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 78022b2b4fcbSmrg ;; 78032b2b4fcbSmrg icpc* ) 78042b2b4fcbSmrg # Intel C++, used to be incompatible with GCC. 78052b2b4fcbSmrg # ICC 10 doesn't accept -KPIC any more. 78062b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 78072b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 78082b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 78092b2b4fcbSmrg ;; 78102b2b4fcbSmrg pgCC* | pgcpp*) 78112b2b4fcbSmrg # Portland Group C++ compiler 78122b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 78132b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 78142b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 78152b2b4fcbSmrg ;; 78162b2b4fcbSmrg cxx*) 78172b2b4fcbSmrg # Compaq C++ 78182b2b4fcbSmrg # Make sure the PIC flag is empty. It appears that all Alpha 78192b2b4fcbSmrg # Linux and Compaq Tru64 Unix objects are PIC. 78202b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 78212b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 78222b2b4fcbSmrg ;; 78232b2b4fcbSmrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 78242b2b4fcbSmrg # IBM XL 8.0, 9.0 on PPC and BlueGene 78252b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 78262b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 78272b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 78282b2b4fcbSmrg ;; 78292b2b4fcbSmrg *) 78302b2b4fcbSmrg case `$CC -V 2>&1 | $SED 5q` in 78312b2b4fcbSmrg *Sun\ C*) 78322b2b4fcbSmrg # Sun C++ 5.9 78332b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 78342b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 78352b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 78362b2b4fcbSmrg ;; 78372b2b4fcbSmrg esac 78382b2b4fcbSmrg ;; 78392b2b4fcbSmrg esac 78402b2b4fcbSmrg ;; 78412b2b4fcbSmrg lynxos*) 78422b2b4fcbSmrg ;; 78432b2b4fcbSmrg m88k*) 78442b2b4fcbSmrg ;; 78452b2b4fcbSmrg mvs*) 78462b2b4fcbSmrg case $cc_basename in 78472b2b4fcbSmrg cxx*) 78482b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 78492b2b4fcbSmrg ;; 78502b2b4fcbSmrg *) 78512b2b4fcbSmrg ;; 78522b2b4fcbSmrg esac 78532b2b4fcbSmrg ;; 78542b2b4fcbSmrg netbsd*) 78552b2b4fcbSmrg ;; 78562b2b4fcbSmrg *qnx* | *nto*) 78572b2b4fcbSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 78582b2b4fcbSmrg # it will coredump. 78592b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 78602b2b4fcbSmrg ;; 78612b2b4fcbSmrg osf3* | osf4* | osf5*) 78622b2b4fcbSmrg case $cc_basename in 78632b2b4fcbSmrg KCC*) 78642b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 78652b2b4fcbSmrg ;; 78662b2b4fcbSmrg RCC*) 78672b2b4fcbSmrg # Rational C++ 2.4.1 78682b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 78692b2b4fcbSmrg ;; 78702b2b4fcbSmrg cxx*) 78712b2b4fcbSmrg # Digital/Compaq C++ 78722b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 78732b2b4fcbSmrg # Make sure the PIC flag is empty. It appears that all Alpha 78742b2b4fcbSmrg # Linux and Compaq Tru64 Unix objects are PIC. 78752b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 78762b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 78772b2b4fcbSmrg ;; 78782b2b4fcbSmrg *) 78792b2b4fcbSmrg ;; 78802b2b4fcbSmrg esac 78812b2b4fcbSmrg ;; 78822b2b4fcbSmrg psos*) 78832b2b4fcbSmrg ;; 78842b2b4fcbSmrg solaris*) 78852b2b4fcbSmrg case $cc_basename in 78862b2b4fcbSmrg CC* | sunCC*) 78872b2b4fcbSmrg # Sun C++ 4.2, 5.x and Centerline C++ 78882b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 78892b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 78902b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 78912b2b4fcbSmrg ;; 78922b2b4fcbSmrg gcx*) 78932b2b4fcbSmrg # Green Hills C++ Compiler 78942b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 78952b2b4fcbSmrg ;; 78962b2b4fcbSmrg *) 78972b2b4fcbSmrg ;; 78982b2b4fcbSmrg esac 78992b2b4fcbSmrg ;; 79002b2b4fcbSmrg sunos4*) 79012b2b4fcbSmrg case $cc_basename in 79022b2b4fcbSmrg CC*) 79032b2b4fcbSmrg # Sun C++ 4.x 79042b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 79052b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 79062b2b4fcbSmrg ;; 79072b2b4fcbSmrg lcc*) 79082b2b4fcbSmrg # Lucid 79092b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 79102b2b4fcbSmrg ;; 79112b2b4fcbSmrg *) 79122b2b4fcbSmrg ;; 79132b2b4fcbSmrg esac 79142b2b4fcbSmrg ;; 79152b2b4fcbSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 79162b2b4fcbSmrg case $cc_basename in 79172b2b4fcbSmrg CC*) 79182b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 79192b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 79202b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 79212b2b4fcbSmrg ;; 79222b2b4fcbSmrg esac 79232b2b4fcbSmrg ;; 79242b2b4fcbSmrg tandem*) 79252b2b4fcbSmrg case $cc_basename in 79262b2b4fcbSmrg NCC*) 79272b2b4fcbSmrg # NonStop-UX NCC 3.20 79282b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 79292b2b4fcbSmrg ;; 79302b2b4fcbSmrg *) 79312b2b4fcbSmrg ;; 79322b2b4fcbSmrg esac 79332b2b4fcbSmrg ;; 79342b2b4fcbSmrg vxworks*) 79352b2b4fcbSmrg ;; 79362b2b4fcbSmrg *) 79372b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 79382b2b4fcbSmrg ;; 79392b2b4fcbSmrg esac 79402b2b4fcbSmrg fi 79412b2b4fcbSmrg], 79422b2b4fcbSmrg[ 79432b2b4fcbSmrg if test yes = "$GCC"; then 79442b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 79452b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 79466aec45a7Smrg 79472b2b4fcbSmrg case $host_os in 79482b2b4fcbSmrg aix*) 79492b2b4fcbSmrg # All AIX code is PIC. 79502b2b4fcbSmrg if test ia64 = "$host_cpu"; then 79512b2b4fcbSmrg # AIX 5 now supports IA64 processor 79522b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 79536aec45a7Smrg fi 79542b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 79552b2b4fcbSmrg ;; 79561473d951Smrg 79572b2b4fcbSmrg amigaos*) 79582b2b4fcbSmrg case $host_cpu in 79592b2b4fcbSmrg powerpc) 79602b2b4fcbSmrg # see comment about AmigaOS4 .so support 79612b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 79622b2b4fcbSmrg ;; 79632b2b4fcbSmrg m68k) 79642b2b4fcbSmrg # FIXME: we need at least 68020 code to build shared libraries, but 79652b2b4fcbSmrg # adding the '-m68020' flag to GCC prevents building anything better, 79662b2b4fcbSmrg # like '-m68040'. 79672b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 79682b2b4fcbSmrg ;; 79692b2b4fcbSmrg esac 79702b2b4fcbSmrg ;; 79711473d951Smrg 79722b2b4fcbSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 79732b2b4fcbSmrg # PIC is the default for these OSes. 79742b2b4fcbSmrg ;; 79751473d951Smrg 79762b2b4fcbSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 79772b2b4fcbSmrg # This hack is so that the source file can tell whether it is being 79782b2b4fcbSmrg # built for inclusion in a dll (and should export symbols for example). 79792b2b4fcbSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 79802b2b4fcbSmrg # (--disable-auto-import) libraries 79812b2b4fcbSmrg m4_if([$1], [GCJ], [], 79822b2b4fcbSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 79832b2b4fcbSmrg case $host_os in 79842b2b4fcbSmrg os2*) 79852b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 79862b2b4fcbSmrg ;; 79872b2b4fcbSmrg esac 79882b2b4fcbSmrg ;; 79896aec45a7Smrg 79902b2b4fcbSmrg darwin* | rhapsody*) 79912b2b4fcbSmrg # PIC is the default on this platform 79922b2b4fcbSmrg # Common symbols not allowed in MH_DYLIB files 79932b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 79942b2b4fcbSmrg ;; 79951473d951Smrg 79962b2b4fcbSmrg haiku*) 79972b2b4fcbSmrg # PIC is the default for Haiku. 79982b2b4fcbSmrg # The "-static" flag exists, but is broken. 79992b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 80002b2b4fcbSmrg ;; 80011473d951Smrg 80022b2b4fcbSmrg hpux*) 80032b2b4fcbSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 80042b2b4fcbSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 80052b2b4fcbSmrg # sets the default TLS model and affects inlining. 80062b2b4fcbSmrg case $host_cpu in 80072b2b4fcbSmrg hppa*64*) 80082b2b4fcbSmrg # +Z the default 80092b2b4fcbSmrg ;; 80102b2b4fcbSmrg *) 80112b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 80122b2b4fcbSmrg ;; 80132b2b4fcbSmrg esac 80142b2b4fcbSmrg ;; 8015aa9e3350Smrg 80162b2b4fcbSmrg interix[[3-9]]*) 80172b2b4fcbSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 80182b2b4fcbSmrg # Instead, we relocate shared libraries at runtime. 80192b2b4fcbSmrg ;; 8020ab47cfaaSmrg 80212b2b4fcbSmrg msdosdjgpp*) 80222b2b4fcbSmrg # Just because we use GCC doesn't mean we suddenly get shared libraries 80232b2b4fcbSmrg # on systems that don't support them. 80242b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 80252b2b4fcbSmrg enable_shared=no 80262b2b4fcbSmrg ;; 8027ab47cfaaSmrg 80282b2b4fcbSmrg *nto* | *qnx*) 80292b2b4fcbSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 80302b2b4fcbSmrg # it will coredump. 80312b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 80322b2b4fcbSmrg ;; 8033ab47cfaaSmrg 80342b2b4fcbSmrg sysv4*MP*) 80352b2b4fcbSmrg if test -d /usr/nec; then 80362b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 80372b2b4fcbSmrg fi 80382b2b4fcbSmrg ;; 8039ab47cfaaSmrg 80402b2b4fcbSmrg *) 80412b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 80422b2b4fcbSmrg ;; 80432b2b4fcbSmrg esac 8044ab47cfaaSmrg 80452b2b4fcbSmrg case $cc_basename in 80462b2b4fcbSmrg nvcc*) # Cuda Compiler Driver 2.2 80472b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 80482b2b4fcbSmrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 80492b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 80502b2b4fcbSmrg fi 80512b2b4fcbSmrg ;; 80522b2b4fcbSmrg esac 80532b2b4fcbSmrg else 80542b2b4fcbSmrg # PORTME Check for flag to pass linker flags through the system compiler. 80552b2b4fcbSmrg case $host_os in 80562b2b4fcbSmrg aix*) 80572b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 80582b2b4fcbSmrg if test ia64 = "$host_cpu"; then 80592b2b4fcbSmrg # AIX 5 now supports IA64 processor 80602b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 80612b2b4fcbSmrg else 80622b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 80632b2b4fcbSmrg fi 80642b2b4fcbSmrg ;; 8065ab47cfaaSmrg 80662b2b4fcbSmrg darwin* | rhapsody*) 80672b2b4fcbSmrg # PIC is the default on this platform 80682b2b4fcbSmrg # Common symbols not allowed in MH_DYLIB files 80692b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 80702b2b4fcbSmrg case $cc_basename in 80712b2b4fcbSmrg nagfor*) 80722b2b4fcbSmrg # NAG Fortran compiler 80732b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 80742b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 80752b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 80762b2b4fcbSmrg ;; 80772b2b4fcbSmrg esac 80782b2b4fcbSmrg ;; 8079ab47cfaaSmrg 80802b2b4fcbSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 80812b2b4fcbSmrg # This hack is so that the source file can tell whether it is being 80822b2b4fcbSmrg # built for inclusion in a dll (and should export symbols for example). 80832b2b4fcbSmrg m4_if([$1], [GCJ], [], 80842b2b4fcbSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 80852b2b4fcbSmrg case $host_os in 80862b2b4fcbSmrg os2*) 80872b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 80882b2b4fcbSmrg ;; 80892b2b4fcbSmrg esac 80902b2b4fcbSmrg ;; 8091ab47cfaaSmrg 80922b2b4fcbSmrg hpux9* | hpux10* | hpux11*) 80932b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 80942b2b4fcbSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 80952b2b4fcbSmrg # not for PA HP-UX. 80962b2b4fcbSmrg case $host_cpu in 80972b2b4fcbSmrg hppa*64*|ia64*) 80982b2b4fcbSmrg # +Z the default 80992b2b4fcbSmrg ;; 81002b2b4fcbSmrg *) 81012b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 81022b2b4fcbSmrg ;; 81032b2b4fcbSmrg esac 81042b2b4fcbSmrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 81052b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 81062b2b4fcbSmrg ;; 8107ab47cfaaSmrg 81082b2b4fcbSmrg irix5* | irix6* | nonstopux*) 81092b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 81102b2b4fcbSmrg # PIC (with -KPIC) is the default. 81112b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 81122b2b4fcbSmrg ;; 81136aec45a7Smrg 81142b2b4fcbSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 81152b2b4fcbSmrg case $cc_basename in 81162b2b4fcbSmrg # old Intel for x86_64, which still supported -KPIC. 81172b2b4fcbSmrg ecc*) 81182b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 81192b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 81202b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 81212b2b4fcbSmrg ;; 81222b2b4fcbSmrg # icc used to be incompatible with GCC. 81232b2b4fcbSmrg # ICC 10 doesn't accept -KPIC any more. 81242b2b4fcbSmrg icc* | ifort*) 81252b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 81262b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 81272b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 81282b2b4fcbSmrg ;; 81292b2b4fcbSmrg # Lahey Fortran 8.1. 81302b2b4fcbSmrg lf95*) 81312b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 81322b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 81332b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 81342b2b4fcbSmrg ;; 81352b2b4fcbSmrg nagfor*) 81362b2b4fcbSmrg # NAG Fortran compiler 81372b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 81382b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 81392b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 81402b2b4fcbSmrg ;; 81412b2b4fcbSmrg tcc*) 81422b2b4fcbSmrg # Fabrice Bellard et al's Tiny C Compiler 81432b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 81442b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 81452b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 81462b2b4fcbSmrg ;; 81472b2b4fcbSmrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 81482b2b4fcbSmrg # Portland Group compilers (*not* the Pentium gcc compiler, 81492b2b4fcbSmrg # which looks to be a dead project) 81502b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 81512b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 81522b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 81532b2b4fcbSmrg ;; 81542b2b4fcbSmrg ccc*) 81552b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 81562b2b4fcbSmrg # All Alpha code is PIC. 81572b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 81582b2b4fcbSmrg ;; 81592b2b4fcbSmrg xl* | bgxl* | bgf* | mpixl*) 81602b2b4fcbSmrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 81612b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 81622b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 81632b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 81642b2b4fcbSmrg ;; 81652b2b4fcbSmrg *) 81662b2b4fcbSmrg case `$CC -V 2>&1 | $SED 5q` in 81672b2b4fcbSmrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 81682b2b4fcbSmrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 81692b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 81702b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 81712b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 81722b2b4fcbSmrg ;; 81732b2b4fcbSmrg *Sun\ F* | *Sun*Fortran*) 81742b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 81752b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 81762b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 81772b2b4fcbSmrg ;; 81782b2b4fcbSmrg *Sun\ C*) 81792b2b4fcbSmrg # Sun C 5.9 81802b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 81812b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 81822b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 81832b2b4fcbSmrg ;; 81842b2b4fcbSmrg *Intel*\ [[CF]]*Compiler*) 81852b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 81862b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 81872b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 81882b2b4fcbSmrg ;; 81892b2b4fcbSmrg *Portland\ Group*) 81902b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 81912b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 81922b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 81932b2b4fcbSmrg ;; 81942b2b4fcbSmrg esac 81952b2b4fcbSmrg ;; 81962b2b4fcbSmrg esac 81972b2b4fcbSmrg ;; 81986aec45a7Smrg 81992b2b4fcbSmrg newsos6) 82002b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 82012b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 82022b2b4fcbSmrg ;; 8203ab47cfaaSmrg 82042b2b4fcbSmrg *nto* | *qnx*) 82052b2b4fcbSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 82062b2b4fcbSmrg # it will coredump. 82072b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 82082b2b4fcbSmrg ;; 8209ab47cfaaSmrg 82102b2b4fcbSmrg osf3* | osf4* | osf5*) 82112b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 82122b2b4fcbSmrg # All OSF/1 code is PIC. 82132b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 82142b2b4fcbSmrg ;; 82156aec45a7Smrg 82162b2b4fcbSmrg rdos*) 82172b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 82182b2b4fcbSmrg ;; 8219ab47cfaaSmrg 82202b2b4fcbSmrg solaris*) 82212b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 82222b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 82232b2b4fcbSmrg case $cc_basename in 82242b2b4fcbSmrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 82252b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 82262b2b4fcbSmrg *) 82272b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 82282b2b4fcbSmrg esac 82292b2b4fcbSmrg ;; 8230ab47cfaaSmrg 82312b2b4fcbSmrg sunos4*) 82322b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 82332b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 82342b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 82352b2b4fcbSmrg ;; 8236ab47cfaaSmrg 82372b2b4fcbSmrg sysv4 | sysv4.2uw2* | sysv4.3*) 82382b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 82392b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 82402b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 82412b2b4fcbSmrg ;; 8242ab47cfaaSmrg 82432b2b4fcbSmrg sysv4*MP*) 82442b2b4fcbSmrg if test -d /usr/nec; then 82452b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 82462b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 82472b2b4fcbSmrg fi 82482b2b4fcbSmrg ;; 82491473d951Smrg 82502b2b4fcbSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 82512b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 82522b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 82532b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 82542b2b4fcbSmrg ;; 82551473d951Smrg 82562b2b4fcbSmrg unicos*) 82572b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 82582b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 82592b2b4fcbSmrg ;; 82601473d951Smrg 82612b2b4fcbSmrg uts4*) 82622b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 82632b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 82642b2b4fcbSmrg ;; 82651473d951Smrg 82662b2b4fcbSmrg *) 82672b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 82682b2b4fcbSmrg ;; 82692b2b4fcbSmrg esac 82702b2b4fcbSmrg fi 82716aec45a7Smrg]) 82722b2b4fcbSmrgcase $host_os in 82732b2b4fcbSmrg # For platforms that do not support PIC, -DPIC is meaningless: 82742b2b4fcbSmrg *djgpp*) 82752b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 82762b2b4fcbSmrg ;; 82772b2b4fcbSmrg *) 82782b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 82792b2b4fcbSmrg ;; 82802b2b4fcbSmrgesac 8281ab47cfaaSmrg 82822b2b4fcbSmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 82832b2b4fcbSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 82842b2b4fcbSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 82852b2b4fcbSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 8286ab47cfaaSmrg 82872b2b4fcbSmrg# 82882b2b4fcbSmrg# Check to make sure the PIC flag actually works. 82892b2b4fcbSmrg# 82902b2b4fcbSmrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 82912b2b4fcbSmrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 82922b2b4fcbSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 82932b2b4fcbSmrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 82942b2b4fcbSmrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 82952b2b4fcbSmrg "" | " "*) ;; 82962b2b4fcbSmrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 82972b2b4fcbSmrg esac], 82982b2b4fcbSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 82992b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 83002b2b4fcbSmrgfi 83012b2b4fcbSmrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 83022b2b4fcbSmrg [Additional compiler flags for building library objects]) 8303ab47cfaaSmrg 83042b2b4fcbSmrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 83052b2b4fcbSmrg [How to pass a linker flag through the compiler]) 83062b2b4fcbSmrg# 83072b2b4fcbSmrg# Check to make sure the static flag actually works. 83082b2b4fcbSmrg# 83092b2b4fcbSmrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 83102b2b4fcbSmrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 83112b2b4fcbSmrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 83122b2b4fcbSmrg $lt_tmp_static_flag, 83132b2b4fcbSmrg [], 83142b2b4fcbSmrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 83152b2b4fcbSmrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 83162b2b4fcbSmrg [Compiler flag to prevent dynamic linking]) 83172b2b4fcbSmrg])# _LT_COMPILER_PIC 8318ab47cfaaSmrg 8319ab47cfaaSmrg 83202b2b4fcbSmrg# _LT_LINKER_SHLIBS([TAGNAME]) 83212b2b4fcbSmrg# ---------------------------- 83222b2b4fcbSmrg# See if the linker supports building shared libraries. 83232b2b4fcbSmrgm4_defun([_LT_LINKER_SHLIBS], 83242b2b4fcbSmrg[AC_REQUIRE([LT_PATH_LD])dnl 83252b2b4fcbSmrgAC_REQUIRE([LT_PATH_NM])dnl 83262b2b4fcbSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 83272b2b4fcbSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 83282b2b4fcbSmrgm4_require([_LT_DECL_EGREP])dnl 83292b2b4fcbSmrgm4_require([_LT_DECL_SED])dnl 83302b2b4fcbSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 83312b2b4fcbSmrgm4_require([_LT_TAG_COMPILER])dnl 83322b2b4fcbSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 83332b2b4fcbSmrgm4_if([$1], [CXX], [ 83342b2b4fcbSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 83352b2b4fcbSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 83362b2b4fcbSmrg case $host_os in 83372b2b4fcbSmrg aix[[4-9]]*) 83382b2b4fcbSmrg # If we're using GNU nm, then we don't want the "-C" option. 83392b2b4fcbSmrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 83402b2b4fcbSmrg # Without the "-l" option, or with the "-B" option, AIX nm treats 83412b2b4fcbSmrg # weak defined symbols like other global defined symbols, whereas 83422b2b4fcbSmrg # GNU nm marks them as "W". 83432b2b4fcbSmrg # While the 'weak' keyword is ignored in the Export File, we need 83442b2b4fcbSmrg # it in the Import File for the 'aix-soname' feature, so we have 83452b2b4fcbSmrg # to replace the "-B" option with "-P" for AIX nm. 83462b2b4fcbSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 83472b2b4fcbSmrg _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' 83482b2b4fcbSmrg else 83492b2b4fcbSmrg _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' 83502b2b4fcbSmrg fi 83512b2b4fcbSmrg ;; 83522b2b4fcbSmrg pw32*) 83532b2b4fcbSmrg _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds 83542b2b4fcbSmrg ;; 83552b2b4fcbSmrg cygwin* | mingw* | cegcc*) 83562b2b4fcbSmrg case $cc_basename in 83572b2b4fcbSmrg cl* | icl*) 83582b2b4fcbSmrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 83592b2b4fcbSmrg ;; 83602b2b4fcbSmrg *) 83612b2b4fcbSmrg _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' 83622b2b4fcbSmrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 83632b2b4fcbSmrg ;; 83642b2b4fcbSmrg esac 83652b2b4fcbSmrg ;; 83662b2b4fcbSmrg *) 83672b2b4fcbSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 83682b2b4fcbSmrg ;; 83692b2b4fcbSmrg esac 83702b2b4fcbSmrg], [ 83712b2b4fcbSmrg runpath_var= 83722b2b4fcbSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 83732b2b4fcbSmrg _LT_TAGVAR(always_export_symbols, $1)=no 83742b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)= 83752b2b4fcbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)= 83762b2b4fcbSmrg _LT_TAGVAR(compiler_needs_object, $1)=no 83772b2b4fcbSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 83782b2b4fcbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 83792b2b4fcbSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 83802b2b4fcbSmrg _LT_TAGVAR(hardcode_automatic, $1)=no 83812b2b4fcbSmrg _LT_TAGVAR(hardcode_direct, $1)=no 83822b2b4fcbSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 83832b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 83842b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 83852b2b4fcbSmrg _LT_TAGVAR(hardcode_minus_L, $1)=no 83862b2b4fcbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 83872b2b4fcbSmrg _LT_TAGVAR(inherit_rpath, $1)=no 83882b2b4fcbSmrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 83892b2b4fcbSmrg _LT_TAGVAR(module_cmds, $1)= 83902b2b4fcbSmrg _LT_TAGVAR(module_expsym_cmds, $1)= 83912b2b4fcbSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 83922b2b4fcbSmrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 83932b2b4fcbSmrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 83942b2b4fcbSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 83952b2b4fcbSmrg # include_expsyms should be a list of space-separated symbols to be *always* 83962b2b4fcbSmrg # included in the symbol list 83972b2b4fcbSmrg _LT_TAGVAR(include_expsyms, $1)= 83982b2b4fcbSmrg # exclude_expsyms can be an extended regexp of symbols to exclude 83992b2b4fcbSmrg # it will be wrapped by ' (' and ')$', so one must not match beginning or 84002b2b4fcbSmrg # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', 84012b2b4fcbSmrg # as well as any symbol that contains 'd'. 84022b2b4fcbSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 84032b2b4fcbSmrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 84042b2b4fcbSmrg # platforms (ab)use it in PIC code, but their linkers get confused if 84052b2b4fcbSmrg # the symbol is explicitly referenced. Since portable code cannot 84062b2b4fcbSmrg # rely on this symbol name, it's probably fine to never include it in 84072b2b4fcbSmrg # preloaded symbol tables. 84082b2b4fcbSmrg # Exclude shared library initialization/finalization symbols. 84092b2b4fcbSmrgdnl Note also adjust exclude_expsyms for C++ above. 84102b2b4fcbSmrg extract_expsyms_cmds= 84112b2b4fcbSmrg 84122b2b4fcbSmrg case $host_os in 84132b2b4fcbSmrg cygwin* | mingw* | pw32* | cegcc*) 84142b2b4fcbSmrg # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time 84152b2b4fcbSmrg # When not using gcc, we currently assume that we are using 84162b2b4fcbSmrg # Microsoft Visual C++ or Intel C++ Compiler. 84172b2b4fcbSmrg if test yes != "$GCC"; then 84182b2b4fcbSmrg with_gnu_ld=no 84192b2b4fcbSmrg fi 84202b2b4fcbSmrg ;; 84212b2b4fcbSmrg interix*) 84222b2b4fcbSmrg # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) 84232b2b4fcbSmrg with_gnu_ld=yes 84242b2b4fcbSmrg ;; 84252b2b4fcbSmrg openbsd* | bitrig*) 84262b2b4fcbSmrg with_gnu_ld=no 84272b2b4fcbSmrg ;; 84282b2b4fcbSmrg esac 84292b2b4fcbSmrg 84302b2b4fcbSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 8431ab47cfaaSmrg 84322b2b4fcbSmrg # On some targets, GNU ld is compatible enough with the native linker 84332b2b4fcbSmrg # that we're better off using the native interface for both. 84342b2b4fcbSmrg lt_use_gnu_ld_interface=no 84352b2b4fcbSmrg if test yes = "$with_gnu_ld"; then 84362b2b4fcbSmrg case $host_os in 84372b2b4fcbSmrg aix*) 84382b2b4fcbSmrg # The AIX port of GNU ld has always aspired to compatibility 84392b2b4fcbSmrg # with the native linker. However, as the warning in the GNU ld 84402b2b4fcbSmrg # block says, versions before 2.19.5* couldn't really create working 84412b2b4fcbSmrg # shared libraries, regardless of the interface used. 84422b2b4fcbSmrg case `$LD -v 2>&1` in 84432b2b4fcbSmrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 84442b2b4fcbSmrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 84452b2b4fcbSmrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 84462b2b4fcbSmrg *) 84472b2b4fcbSmrg lt_use_gnu_ld_interface=yes 84482b2b4fcbSmrg ;; 84492b2b4fcbSmrg esac 84502b2b4fcbSmrg ;; 84512b2b4fcbSmrg *) 84522b2b4fcbSmrg lt_use_gnu_ld_interface=yes 84532b2b4fcbSmrg ;; 84542b2b4fcbSmrg esac 84552b2b4fcbSmrg fi 8456ab47cfaaSmrg 84572b2b4fcbSmrg if test yes = "$lt_use_gnu_ld_interface"; then 84582b2b4fcbSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 84592b2b4fcbSmrg wlarc='$wl' 8460ab47cfaaSmrg 84612b2b4fcbSmrg # Set some defaults for GNU ld with shared library support. These 84622b2b4fcbSmrg # are reset later if shared libraries are not supported. Putting them 84632b2b4fcbSmrg # here allows them to be overridden if necessary. 84642b2b4fcbSmrg runpath_var=LD_RUN_PATH 84652b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 84662b2b4fcbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 84672b2b4fcbSmrg # ancient GNU ld didn't support --whole-archive et. al. 84682b2b4fcbSmrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 84692b2b4fcbSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 84702b2b4fcbSmrg else 84712b2b4fcbSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 84722b2b4fcbSmrg fi 84732b2b4fcbSmrg supports_anon_versioning=no 84742b2b4fcbSmrg case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in 84752b2b4fcbSmrg *GNU\ gold*) supports_anon_versioning=yes ;; 84762b2b4fcbSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 84772b2b4fcbSmrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 84782b2b4fcbSmrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 84792b2b4fcbSmrg *\ 2.11.*) ;; # other 2.11 versions 84802b2b4fcbSmrg *) supports_anon_versioning=yes ;; 84812b2b4fcbSmrg esac 8482ab47cfaaSmrg 84832b2b4fcbSmrg # See if GNU ld supports shared libraries. 84842b2b4fcbSmrg case $host_os in 84852b2b4fcbSmrg aix[[3-9]]*) 84862b2b4fcbSmrg # On AIX/PPC, the GNU linker is very broken 84872b2b4fcbSmrg if test ia64 != "$host_cpu"; then 84882b2b4fcbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 84892b2b4fcbSmrg cat <<_LT_EOF 1>&2 8490ab47cfaaSmrg 84912b2b4fcbSmrg*** Warning: the GNU linker, at least up to release 2.19, is reported 84922b2b4fcbSmrg*** to be unable to reliably create shared libraries on AIX. 84932b2b4fcbSmrg*** Therefore, libtool is disabling shared libraries support. If you 84942b2b4fcbSmrg*** really care for shared libraries, you may want to install binutils 84952b2b4fcbSmrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 84962b2b4fcbSmrg*** You will then need to restart the configuration process. 8497ab47cfaaSmrg 84982b2b4fcbSmrg_LT_EOF 84992b2b4fcbSmrg fi 85005c42550eSmrg ;; 8501ab47cfaaSmrg 85022b2b4fcbSmrg amigaos*) 85032b2b4fcbSmrg case $host_cpu in 85042b2b4fcbSmrg powerpc) 85052b2b4fcbSmrg # see comment about AmigaOS4 .so support 85062b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 85072b2b4fcbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 85082b2b4fcbSmrg ;; 85092b2b4fcbSmrg m68k) 85102b2b4fcbSmrg _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)' 85112b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 85122b2b4fcbSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 85132b2b4fcbSmrg ;; 85142b2b4fcbSmrg esac 85152b2b4fcbSmrg ;; 8516ab47cfaaSmrg 85172b2b4fcbSmrg beos*) 85182b2b4fcbSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 85192b2b4fcbSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 85202b2b4fcbSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 85212b2b4fcbSmrg # support --undefined. This deserves some investigation. FIXME 85222b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 85232b2b4fcbSmrg else 85242b2b4fcbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 85252b2b4fcbSmrg fi 85262b2b4fcbSmrg ;; 8527ab47cfaaSmrg 85282b2b4fcbSmrg cygwin* | mingw* | pw32* | cegcc*) 85292b2b4fcbSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 85302b2b4fcbSmrg # as there is no search path for DLLs. 85312b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 85322b2b4fcbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 85332b2b4fcbSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 85342b2b4fcbSmrg _LT_TAGVAR(always_export_symbols, $1)=no 85352b2b4fcbSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 85362b2b4fcbSmrg _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' 85372b2b4fcbSmrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 8538ab47cfaaSmrg 85392b2b4fcbSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 85402b2b4fcbSmrg _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' 85412b2b4fcbSmrg # If the export-symbols file already is a .def file, use it as 85422b2b4fcbSmrg # is; otherwise, prepend EXPORTS... 85432b2b4fcbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 85442b2b4fcbSmrg cp $export_symbols $output_objdir/$soname.def; 85452b2b4fcbSmrg else 85462b2b4fcbSmrg echo EXPORTS > $output_objdir/$soname.def; 85472b2b4fcbSmrg cat $export_symbols >> $output_objdir/$soname.def; 85482b2b4fcbSmrg fi~ 85492b2b4fcbSmrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 85502b2b4fcbSmrg else 85512b2b4fcbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 85522b2b4fcbSmrg fi 85532b2b4fcbSmrg ;; 8554ab47cfaaSmrg 85552b2b4fcbSmrg haiku*) 85562b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 85572b2b4fcbSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 85582b2b4fcbSmrg ;; 8559ab47cfaaSmrg 85602b2b4fcbSmrg os2*) 85612b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 85622b2b4fcbSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 85632b2b4fcbSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 85642b2b4fcbSmrg shrext_cmds=.dll 85652b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 85662b2b4fcbSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 85672b2b4fcbSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 85682b2b4fcbSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 85692b2b4fcbSmrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 85702b2b4fcbSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 85712b2b4fcbSmrg emximp -o $lib $output_objdir/$libname.def' 85722b2b4fcbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 85732b2b4fcbSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 85742b2b4fcbSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 85752b2b4fcbSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 85762b2b4fcbSmrg prefix_cmds="$SED"~ 85772b2b4fcbSmrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 85782b2b4fcbSmrg prefix_cmds="$prefix_cmds -e 1d"; 85792b2b4fcbSmrg fi~ 85802b2b4fcbSmrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 85812b2b4fcbSmrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 85822b2b4fcbSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 85832b2b4fcbSmrg emximp -o $lib $output_objdir/$libname.def' 85842b2b4fcbSmrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 85852b2b4fcbSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 85862b2b4fcbSmrg _LT_TAGVAR(file_list_spec, $1)='@' 85872b2b4fcbSmrg ;; 85882b2b4fcbSmrg 85892b2b4fcbSmrg interix[[3-9]]*) 85902b2b4fcbSmrg _LT_TAGVAR(hardcode_direct, $1)=no 85912b2b4fcbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 85922b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 85932b2b4fcbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 85942b2b4fcbSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 85952b2b4fcbSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 85962b2b4fcbSmrg # default) and relocated if they conflict, which is a slow very memory 85972b2b4fcbSmrg # consuming and fragmenting process. To avoid this, we pick a random, 85982b2b4fcbSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 85992b2b4fcbSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 86002b2b4fcbSmrg _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' 86012b2b4fcbSmrg _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' 86022b2b4fcbSmrg ;; 8603ab47cfaaSmrg 86042b2b4fcbSmrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 86052b2b4fcbSmrg tmp_diet=no 86062b2b4fcbSmrg if test linux-dietlibc = "$host_os"; then 86072b2b4fcbSmrg case $cc_basename in 86082b2b4fcbSmrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 86092b2b4fcbSmrg esac 86102b2b4fcbSmrg fi 86112b2b4fcbSmrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 86122b2b4fcbSmrg && test no = "$tmp_diet" 86132b2b4fcbSmrg then 86142b2b4fcbSmrg tmp_addflag=' $pic_flag' 86152b2b4fcbSmrg tmp_sharedflag='-shared' 86162b2b4fcbSmrg case $cc_basename,$host_cpu in 86172b2b4fcbSmrg pgcc*) # Portland Group C compiler 86182b2b4fcbSmrg _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' 86192b2b4fcbSmrg tmp_addflag=' $pic_flag' 86202b2b4fcbSmrg ;; 86212b2b4fcbSmrg pgf77* | pgf90* | pgf95* | pgfortran*) 86222b2b4fcbSmrg # Portland Group f77 and f90 compilers 86232b2b4fcbSmrg _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' 86242b2b4fcbSmrg tmp_addflag=' $pic_flag -Mnomain' ;; 86252b2b4fcbSmrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 86262b2b4fcbSmrg tmp_addflag=' -i_dynamic' ;; 86272b2b4fcbSmrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 86282b2b4fcbSmrg tmp_addflag=' -i_dynamic -nofor_main' ;; 86292b2b4fcbSmrg ifc* | ifort*) # Intel Fortran compiler 86302b2b4fcbSmrg tmp_addflag=' -nofor_main' ;; 86312b2b4fcbSmrg lf95*) # Lahey Fortran 8.1 86322b2b4fcbSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 86332b2b4fcbSmrg tmp_sharedflag='--shared' ;; 86342b2b4fcbSmrg nagfor*) # NAGFOR 5.3 86352b2b4fcbSmrg tmp_sharedflag='-Wl,-shared' ;; 86362b2b4fcbSmrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 86372b2b4fcbSmrg tmp_sharedflag='-qmkshrobj' 86382b2b4fcbSmrg tmp_addflag= ;; 86392b2b4fcbSmrg nvcc*) # Cuda Compiler Driver 2.2 86402b2b4fcbSmrg _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' 86412b2b4fcbSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 86422b2b4fcbSmrg ;; 86432b2b4fcbSmrg esac 86442b2b4fcbSmrg case `$CC -V 2>&1 | $SED 5q` in 86452b2b4fcbSmrg *Sun\ C*) # Sun C 5.9 86462b2b4fcbSmrg _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' 86472b2b4fcbSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 86482b2b4fcbSmrg tmp_sharedflag='-G' ;; 86492b2b4fcbSmrg *Sun\ F*) # Sun Fortran 8.3 86502b2b4fcbSmrg tmp_sharedflag='-G' ;; 86512b2b4fcbSmrg esac 86522b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 8653ab47cfaaSmrg 86542b2b4fcbSmrg if test yes = "$supports_anon_versioning"; then 86552b2b4fcbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 86562b2b4fcbSmrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 86572b2b4fcbSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 86582b2b4fcbSmrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 86592b2b4fcbSmrg fi 8660ab47cfaaSmrg 86612b2b4fcbSmrg case $cc_basename in 86622b2b4fcbSmrg tcc*) 86632b2b4fcbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' 86642b2b4fcbSmrg ;; 86652b2b4fcbSmrg xlf* | bgf* | bgxlf* | mpixlf*) 86662b2b4fcbSmrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 86672b2b4fcbSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 86682b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 86692b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 86702b2b4fcbSmrg if test yes = "$supports_anon_versioning"; then 86712b2b4fcbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 86722b2b4fcbSmrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 86732b2b4fcbSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 86742b2b4fcbSmrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 86752b2b4fcbSmrg fi 86762b2b4fcbSmrg ;; 86772b2b4fcbSmrg esac 86782b2b4fcbSmrg else 86792b2b4fcbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 86802b2b4fcbSmrg fi 86815c42550eSmrg ;; 8682ab47cfaaSmrg 86832b2b4fcbSmrg netbsd*) 86842b2b4fcbSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 86852b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 86862b2b4fcbSmrg wlarc= 86872b2b4fcbSmrg else 86882b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 86892b2b4fcbSmrg _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' 86902b2b4fcbSmrg fi 86912b2b4fcbSmrg ;; 8692ab47cfaaSmrg 86932b2b4fcbSmrg solaris*) 86942b2b4fcbSmrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 86952b2b4fcbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 86962b2b4fcbSmrg cat <<_LT_EOF 1>&2 8697ab47cfaaSmrg 86982b2b4fcbSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 86992b2b4fcbSmrg*** create shared libraries on Solaris systems. Therefore, libtool 87002b2b4fcbSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 87012b2b4fcbSmrg*** binutils to release 2.9.1 or newer. Another option is to modify 87022b2b4fcbSmrg*** your PATH or compiler configuration so that the native linker is 87032b2b4fcbSmrg*** used, and then restart. 87041473d951Smrg 87052b2b4fcbSmrg_LT_EOF 87062b2b4fcbSmrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 87072b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 87082b2b4fcbSmrg _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' 87092b2b4fcbSmrg else 87102b2b4fcbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 87112b2b4fcbSmrg fi 87122b2b4fcbSmrg ;; 8713ab47cfaaSmrg 87142b2b4fcbSmrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 87152b2b4fcbSmrg case `$LD -v 2>&1` in 87162b2b4fcbSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 87172b2b4fcbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 87182b2b4fcbSmrg cat <<_LT_EOF 1>&2 8719ab47cfaaSmrg 87202b2b4fcbSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot 87212b2b4fcbSmrg*** reliably create shared libraries on SCO systems. Therefore, libtool 87222b2b4fcbSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 87232b2b4fcbSmrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 87242b2b4fcbSmrg*** your PATH or compiler configuration so that the native linker is 87252b2b4fcbSmrg*** used, and then restart. 8726ab47cfaaSmrg 87272b2b4fcbSmrg_LT_EOF 87282b2b4fcbSmrg ;; 87292b2b4fcbSmrg *) 87302b2b4fcbSmrg # For security reasons, it is highly recommended that you always 87312b2b4fcbSmrg # use absolute paths for naming shared libraries, and exclude the 87322b2b4fcbSmrg # DT_RUNPATH tag from executables and libraries. But doing so 87332b2b4fcbSmrg # requires that you compile everything twice, which is a pain. 87342b2b4fcbSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 87352b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 87362b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 87372b2b4fcbSmrg _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' 87382b2b4fcbSmrg else 87392b2b4fcbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 87402b2b4fcbSmrg fi 87412b2b4fcbSmrg ;; 87422b2b4fcbSmrg esac 87432b2b4fcbSmrg ;; 8744ab47cfaaSmrg 87452b2b4fcbSmrg sunos4*) 87462b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 87472b2b4fcbSmrg wlarc= 87482b2b4fcbSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 87492b2b4fcbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 87502b2b4fcbSmrg ;; 8751ab47cfaaSmrg 87526aec45a7Smrg *) 87532b2b4fcbSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 87542b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 87552b2b4fcbSmrg _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' 87562b2b4fcbSmrg else 87572b2b4fcbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 87582b2b4fcbSmrg fi 87595c42550eSmrg ;; 87602b2b4fcbSmrg esac 8761ab47cfaaSmrg 87622b2b4fcbSmrg if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then 87632b2b4fcbSmrg runpath_var= 87642b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 87652b2b4fcbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 87662b2b4fcbSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 87672b2b4fcbSmrg fi 87682b2b4fcbSmrg else 87692b2b4fcbSmrg # PORTME fill in a description of your system's linker (not GNU ld) 87702b2b4fcbSmrg case $host_os in 87712b2b4fcbSmrg aix3*) 87722b2b4fcbSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 87732b2b4fcbSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 87742b2b4fcbSmrg _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' 87752b2b4fcbSmrg # Note: this linker hardcodes the directories in LIBPATH if there 87762b2b4fcbSmrg # are no directories specified by -L. 87772b2b4fcbSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 87782b2b4fcbSmrg if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then 87792b2b4fcbSmrg # Neither direct hardcoding nor static linking is supported with a 87802b2b4fcbSmrg # broken collect2. 87812b2b4fcbSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 87822b2b4fcbSmrg fi 87832b2b4fcbSmrg ;; 8784ab47cfaaSmrg 87852b2b4fcbSmrg aix[[4-9]]*) 87862b2b4fcbSmrg if test ia64 = "$host_cpu"; then 87872b2b4fcbSmrg # On IA64, the linker does run time linking by default, so we don't 87882b2b4fcbSmrg # have to do anything special. 87892b2b4fcbSmrg aix_use_runtimelinking=no 87902b2b4fcbSmrg exp_sym_flag='-Bexport' 87912b2b4fcbSmrg no_entry_flag= 87922b2b4fcbSmrg else 87932b2b4fcbSmrg # If we're using GNU nm, then we don't want the "-C" option. 87942b2b4fcbSmrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 87952b2b4fcbSmrg # Without the "-l" option, or with the "-B" option, AIX nm treats 87962b2b4fcbSmrg # weak defined symbols like other global defined symbols, whereas 87972b2b4fcbSmrg # GNU nm marks them as "W". 87982b2b4fcbSmrg # While the 'weak' keyword is ignored in the Export File, we need 87992b2b4fcbSmrg # it in the Import File for the 'aix-soname' feature, so we have 88002b2b4fcbSmrg # to replace the "-B" option with "-P" for AIX nm. 88012b2b4fcbSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 88022b2b4fcbSmrg _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' 88032b2b4fcbSmrg else 88042b2b4fcbSmrg _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' 88052b2b4fcbSmrg fi 88062b2b4fcbSmrg aix_use_runtimelinking=no 8807ab47cfaaSmrg 88082b2b4fcbSmrg # Test if we are trying to use run time linking or normal 88092b2b4fcbSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 88102b2b4fcbSmrg # have runtime linking enabled, and use it for executables. 88112b2b4fcbSmrg # For shared libraries, we enable/disable runtime linking 88122b2b4fcbSmrg # depending on the kind of the shared library created - 88132b2b4fcbSmrg # when "with_aix_soname,aix_use_runtimelinking" is: 88142b2b4fcbSmrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 88152b2b4fcbSmrg # "aix,yes" lib.so shared, rtl:yes, for executables 88162b2b4fcbSmrg # lib.a static archive 88172b2b4fcbSmrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 88182b2b4fcbSmrg # lib.a(lib.so.V) shared, rtl:no, for executables 88192b2b4fcbSmrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 88202b2b4fcbSmrg # lib.a(lib.so.V) shared, rtl:no 88212b2b4fcbSmrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 88222b2b4fcbSmrg # lib.a static archive 88232b2b4fcbSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 88242b2b4fcbSmrg for ld_flag in $LDFLAGS; do 88252b2b4fcbSmrg if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then 88262b2b4fcbSmrg aix_use_runtimelinking=yes 88272b2b4fcbSmrg break 88282b2b4fcbSmrg fi 88292b2b4fcbSmrg done 88302b2b4fcbSmrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 88312b2b4fcbSmrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 88322b2b4fcbSmrg # so we don't have lib.a shared libs to link our executables. 88332b2b4fcbSmrg # We have to force runtime linking in this case. 88342b2b4fcbSmrg aix_use_runtimelinking=yes 88352b2b4fcbSmrg LDFLAGS="$LDFLAGS -Wl,-brtl" 88362b2b4fcbSmrg fi 88372b2b4fcbSmrg ;; 88382b2b4fcbSmrg esac 88392b2b4fcbSmrg 88402b2b4fcbSmrg exp_sym_flag='-bexport' 88412b2b4fcbSmrg no_entry_flag='-bnoentry' 88422b2b4fcbSmrg fi 8843ab47cfaaSmrg 88442b2b4fcbSmrg # When large executables or shared objects are built, AIX ld can 88452b2b4fcbSmrg # have problems creating the table of contents. If linking a library 88462b2b4fcbSmrg # or program results in "error TOC overflow" add -mminimal-toc to 88472b2b4fcbSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 88482b2b4fcbSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 8849ab47cfaaSmrg 88502b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='' 88512b2b4fcbSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 88522b2b4fcbSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 88532b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 88542b2b4fcbSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 88552b2b4fcbSmrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 88562b2b4fcbSmrg case $with_aix_soname,$aix_use_runtimelinking in 88572b2b4fcbSmrg aix,*) ;; # traditional, no import file 88582b2b4fcbSmrg svr4,* | *,yes) # use import file 88592b2b4fcbSmrg # The Import File defines what to hardcode. 88602b2b4fcbSmrg _LT_TAGVAR(hardcode_direct, $1)=no 88612b2b4fcbSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 88622b2b4fcbSmrg ;; 88632b2b4fcbSmrg esac 88641473d951Smrg 88652b2b4fcbSmrg if test yes = "$GCC"; then 88662b2b4fcbSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 88672b2b4fcbSmrg # We only want to do this on AIX 4.2 and lower, the check 88682b2b4fcbSmrg # below for broken collect2 doesn't work under 4.3+ 88692b2b4fcbSmrg collect2name=`$CC -print-prog-name=collect2` 88702b2b4fcbSmrg if test -f "$collect2name" && 88712b2b4fcbSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 88722b2b4fcbSmrg then 88732b2b4fcbSmrg # We have reworked collect2 88742b2b4fcbSmrg : 88752b2b4fcbSmrg else 88762b2b4fcbSmrg # We have old collect2 88772b2b4fcbSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 88782b2b4fcbSmrg # It fails to find uninstalled libraries when the uninstalled 88792b2b4fcbSmrg # path is not listed in the libpath. Setting hardcode_minus_L 88802b2b4fcbSmrg # to unsupported forces relinking 88812b2b4fcbSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 88822b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 88832b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 88842b2b4fcbSmrg fi 88852b2b4fcbSmrg ;; 88862b2b4fcbSmrg esac 88872b2b4fcbSmrg shared_flag='-shared' 88882b2b4fcbSmrg if test yes = "$aix_use_runtimelinking"; then 88892b2b4fcbSmrg shared_flag="$shared_flag "'$wl-G' 88902b2b4fcbSmrg fi 88912b2b4fcbSmrg # Need to ensure runtime linking is disabled for the traditional 88922b2b4fcbSmrg # shared library, or the linker may eventually find shared libraries 88932b2b4fcbSmrg # /with/ Import File - we do not want to mix them. 88942b2b4fcbSmrg shared_flag_aix='-shared' 88952b2b4fcbSmrg shared_flag_svr4='-shared $wl-G' 88962b2b4fcbSmrg else 88972b2b4fcbSmrg # not using gcc 88982b2b4fcbSmrg if test ia64 = "$host_cpu"; then 88992b2b4fcbSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 89002b2b4fcbSmrg # chokes on -Wl,-G. The following line is correct: 89012b2b4fcbSmrg shared_flag='-G' 89022b2b4fcbSmrg else 89032b2b4fcbSmrg if test yes = "$aix_use_runtimelinking"; then 89042b2b4fcbSmrg shared_flag='$wl-G' 89052b2b4fcbSmrg else 89062b2b4fcbSmrg shared_flag='$wl-bM:SRE' 89072b2b4fcbSmrg fi 89082b2b4fcbSmrg shared_flag_aix='$wl-bM:SRE' 89092b2b4fcbSmrg shared_flag_svr4='$wl-G' 89102b2b4fcbSmrg fi 89112b2b4fcbSmrg fi 8912ab47cfaaSmrg 89132b2b4fcbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 89142b2b4fcbSmrg # It seems that -bexpall does not export symbols beginning with 89152b2b4fcbSmrg # underscore (_), so it is better to generate a list of symbols to export. 89162b2b4fcbSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 89172b2b4fcbSmrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 89182b2b4fcbSmrg # Warning - without using the other runtime loading flags (-brtl), 89192b2b4fcbSmrg # -berok will link without error, but may produce a broken library. 89202b2b4fcbSmrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 89212b2b4fcbSmrg # Determine the default libpath from the value encoded in an 89222b2b4fcbSmrg # empty executable. 89232b2b4fcbSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 89242b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 89252b2b4fcbSmrg _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 89262b2b4fcbSmrg else 89272b2b4fcbSmrg if test ia64 = "$host_cpu"; then 89282b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 89292b2b4fcbSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 89302b2b4fcbSmrg _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" 89312b2b4fcbSmrg else 89322b2b4fcbSmrg # Determine the default libpath from the value encoded in an 89332b2b4fcbSmrg # empty executable. 89342b2b4fcbSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 89352b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 89362b2b4fcbSmrg # Warning - without using the other run time loading flags, 89372b2b4fcbSmrg # -berok will link without error, but may produce a broken library. 89382b2b4fcbSmrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 89392b2b4fcbSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 89402b2b4fcbSmrg if test yes = "$with_gnu_ld"; then 89412b2b4fcbSmrg # We only use this code for GNU lds that support --whole-archive. 89422b2b4fcbSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 89432b2b4fcbSmrg else 89442b2b4fcbSmrg # Exported symbols can be pulled into shared objects from archives 89452b2b4fcbSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 89462b2b4fcbSmrg fi 89472b2b4fcbSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 89482b2b4fcbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 89492b2b4fcbSmrg # -brtl affects multiple linker settings, -berok does not and is overridden later 89502b2b4fcbSmrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 89512b2b4fcbSmrg if test svr4 != "$with_aix_soname"; then 89522b2b4fcbSmrg # This is similar to how AIX traditionally builds its shared libraries. 89532b2b4fcbSmrg _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' 89542b2b4fcbSmrg fi 89552b2b4fcbSmrg if test aix != "$with_aix_soname"; then 89562b2b4fcbSmrg _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' 89572b2b4fcbSmrg else 89582b2b4fcbSmrg # used by -dlpreopen to get the symbols 89592b2b4fcbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 89602b2b4fcbSmrg fi 89612b2b4fcbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 89622b2b4fcbSmrg fi 89632b2b4fcbSmrg fi 8964300bf1aeSmrg ;; 8965300bf1aeSmrg 89662b2b4fcbSmrg amigaos*) 89672b2b4fcbSmrg case $host_cpu in 89682b2b4fcbSmrg powerpc) 89692b2b4fcbSmrg # see comment about AmigaOS4 .so support 89702b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 89712b2b4fcbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 89722b2b4fcbSmrg ;; 89732b2b4fcbSmrg m68k) 89742b2b4fcbSmrg _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)' 89752b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 89762b2b4fcbSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 89772b2b4fcbSmrg ;; 89782b2b4fcbSmrg esac 89792b2b4fcbSmrg ;; 8980300bf1aeSmrg 89812b2b4fcbSmrg bsdi[[45]]*) 89822b2b4fcbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 89832b2b4fcbSmrg ;; 8984300bf1aeSmrg 89852b2b4fcbSmrg cygwin* | mingw* | pw32* | cegcc*) 89862b2b4fcbSmrg # When not using gcc, we currently assume that we are using 89872b2b4fcbSmrg # Microsoft Visual C++ or Intel C++ Compiler. 89882b2b4fcbSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 89892b2b4fcbSmrg # no search path for DLLs. 89902b2b4fcbSmrg case $cc_basename in 89912b2b4fcbSmrg cl* | icl*) 89922b2b4fcbSmrg # Native MSVC or ICC 89932b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 89942b2b4fcbSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 89952b2b4fcbSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 89962b2b4fcbSmrg _LT_TAGVAR(file_list_spec, $1)='@' 89972b2b4fcbSmrg # Tell ltmain to make .lib files, not .a files. 89982b2b4fcbSmrg libext=lib 89992b2b4fcbSmrg # Tell ltmain to make .dll files, not .so files. 90002b2b4fcbSmrg shrext_cmds=.dll 90012b2b4fcbSmrg # FIXME: Setting linknames here is a bad hack. 90022b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 90032b2b4fcbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 90042b2b4fcbSmrg cp "$export_symbols" "$output_objdir/$soname.def"; 90052b2b4fcbSmrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 90062b2b4fcbSmrg else 90072b2b4fcbSmrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 90082b2b4fcbSmrg fi~ 90092b2b4fcbSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 90102b2b4fcbSmrg linknames=' 90112b2b4fcbSmrg # The linker will not automatically build a static lib if we build a DLL. 90122b2b4fcbSmrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 90132b2b4fcbSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 90142b2b4fcbSmrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 90152b2b4fcbSmrg _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' 90162b2b4fcbSmrg # Don't use ranlib 90172b2b4fcbSmrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 90182b2b4fcbSmrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 90192b2b4fcbSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 90202b2b4fcbSmrg case $lt_outputfile in 90212b2b4fcbSmrg *.exe|*.EXE) ;; 90222b2b4fcbSmrg *) 90232b2b4fcbSmrg lt_outputfile=$lt_outputfile.exe 90242b2b4fcbSmrg lt_tool_outputfile=$lt_tool_outputfile.exe 90252b2b4fcbSmrg ;; 90262b2b4fcbSmrg esac~ 90272b2b4fcbSmrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 90282b2b4fcbSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 90292b2b4fcbSmrg $RM "$lt_outputfile.manifest"; 90302b2b4fcbSmrg fi' 90312b2b4fcbSmrg ;; 90322b2b4fcbSmrg *) 90332b2b4fcbSmrg # Assume MSVC and ICC wrapper 90342b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 90352b2b4fcbSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 90362b2b4fcbSmrg # Tell ltmain to make .lib files, not .a files. 90372b2b4fcbSmrg libext=lib 90382b2b4fcbSmrg # Tell ltmain to make .dll files, not .so files. 90392b2b4fcbSmrg shrext_cmds=.dll 90402b2b4fcbSmrg # FIXME: Setting linknames here is a bad hack. 90412b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 90422b2b4fcbSmrg # The linker will automatically build a .lib file if we build a DLL. 90432b2b4fcbSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 90442b2b4fcbSmrg # FIXME: Should let the user specify the lib program. 90452b2b4fcbSmrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 90462b2b4fcbSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 90472b2b4fcbSmrg ;; 90482b2b4fcbSmrg esac 9049aa9e3350Smrg ;; 9050ab47cfaaSmrg 90512b2b4fcbSmrg darwin* | rhapsody*) 90522b2b4fcbSmrg _LT_DARWIN_LINKER_FEATURES($1) 90532b2b4fcbSmrg ;; 90541473d951Smrg 90552b2b4fcbSmrg dgux*) 90562b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 90572b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 90582b2b4fcbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 90592b2b4fcbSmrg ;; 90601473d951Smrg 90612b2b4fcbSmrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 90622b2b4fcbSmrg # support. Future versions do this automatically, but an explicit c++rt0.o 90632b2b4fcbSmrg # does not break anything, and helps significantly (at the cost of a little 90642b2b4fcbSmrg # extra space). 90652b2b4fcbSmrg freebsd2.2*) 90662b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 90672b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 90682b2b4fcbSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 90692b2b4fcbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 90702b2b4fcbSmrg ;; 90711473d951Smrg 90722b2b4fcbSmrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 90732b2b4fcbSmrg freebsd2.*) 90742b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 90752b2b4fcbSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 90762b2b4fcbSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 90772b2b4fcbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 90782b2b4fcbSmrg ;; 90796aec45a7Smrg 90802b2b4fcbSmrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 90812b2b4fcbSmrg freebsd* | dragonfly* | midnightbsd*) 90822b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 90832b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 90842b2b4fcbSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 90852b2b4fcbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 90862b2b4fcbSmrg ;; 90876aec45a7Smrg 90882b2b4fcbSmrg hpux9*) 90892b2b4fcbSmrg if test yes = "$GCC"; then 90902b2b4fcbSmrg _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' 90912b2b4fcbSmrg else 90922b2b4fcbSmrg _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' 90932b2b4fcbSmrg fi 90942b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 90952b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 90962b2b4fcbSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 90976aec45a7Smrg 90982b2b4fcbSmrg # hardcode_minus_L: Not really in the search PATH, 90992b2b4fcbSmrg # but as the default location of the library. 91002b2b4fcbSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 91012b2b4fcbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 91022b2b4fcbSmrg ;; 91036aec45a7Smrg 91042b2b4fcbSmrg hpux10*) 91052b2b4fcbSmrg if test yes,no = "$GCC,$with_gnu_ld"; then 91062b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 91072b2b4fcbSmrg else 91082b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 91092b2b4fcbSmrg fi 91102b2b4fcbSmrg if test no = "$with_gnu_ld"; then 91112b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 91122b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 91132b2b4fcbSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 91142b2b4fcbSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 91152b2b4fcbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 91162b2b4fcbSmrg # hardcode_minus_L: Not really in the search PATH, 91172b2b4fcbSmrg # but as the default location of the library. 91182b2b4fcbSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 91192b2b4fcbSmrg fi 91202b2b4fcbSmrg ;; 91216aec45a7Smrg 91222b2b4fcbSmrg hpux11*) 91232b2b4fcbSmrg if test yes,no = "$GCC,$with_gnu_ld"; then 91242b2b4fcbSmrg case $host_cpu in 91252b2b4fcbSmrg hppa*64*) 91262b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 91272b2b4fcbSmrg ;; 91282b2b4fcbSmrg ia64*) 91292b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 91302b2b4fcbSmrg ;; 91312b2b4fcbSmrg *) 91322b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 91332b2b4fcbSmrg ;; 91342b2b4fcbSmrg esac 91352b2b4fcbSmrg else 91362b2b4fcbSmrg case $host_cpu in 91372b2b4fcbSmrg hppa*64*) 91382b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 91392b2b4fcbSmrg ;; 91402b2b4fcbSmrg ia64*) 91412b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 91422b2b4fcbSmrg ;; 91432b2b4fcbSmrg *) 91442b2b4fcbSmrg m4_if($1, [], [ 91452b2b4fcbSmrg # Older versions of the 11.00 compiler do not understand -b yet 91462b2b4fcbSmrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 91472b2b4fcbSmrg _LT_LINKER_OPTION([if $CC understands -b], 91482b2b4fcbSmrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 91492b2b4fcbSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 91502b2b4fcbSmrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 91512b2b4fcbSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 91522b2b4fcbSmrg ;; 91532b2b4fcbSmrg esac 91542b2b4fcbSmrg fi 91552b2b4fcbSmrg if test no = "$with_gnu_ld"; then 91562b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 91572b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 91586aec45a7Smrg 91592b2b4fcbSmrg case $host_cpu in 91602b2b4fcbSmrg hppa*64*|ia64*) 91612b2b4fcbSmrg _LT_TAGVAR(hardcode_direct, $1)=no 91622b2b4fcbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 91632b2b4fcbSmrg ;; 91642b2b4fcbSmrg *) 91652b2b4fcbSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 91662b2b4fcbSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 91672b2b4fcbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 91686aec45a7Smrg 91692b2b4fcbSmrg # hardcode_minus_L: Not really in the search PATH, 91702b2b4fcbSmrg # but as the default location of the library. 91712b2b4fcbSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 91722b2b4fcbSmrg ;; 91732b2b4fcbSmrg esac 91742b2b4fcbSmrg fi 91752b2b4fcbSmrg ;; 91766aec45a7Smrg 91772b2b4fcbSmrg irix5* | irix6* | nonstopux*) 91782b2b4fcbSmrg if test yes = "$GCC"; then 91792b2b4fcbSmrg _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' 91802b2b4fcbSmrg # Try to use the -exported_symbol ld option, if it does not 91812b2b4fcbSmrg # work, assume that -exports_file does not work either and 91822b2b4fcbSmrg # implicitly export all symbols. 91832b2b4fcbSmrg # This should be the same for all languages, so no per-tag cache variable. 91842b2b4fcbSmrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 91852b2b4fcbSmrg [lt_cv_irix_exported_symbol], 91862b2b4fcbSmrg [save_LDFLAGS=$LDFLAGS 91872b2b4fcbSmrg LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" 91882b2b4fcbSmrg AC_LINK_IFELSE( 91892b2b4fcbSmrg [AC_LANG_SOURCE( 91902b2b4fcbSmrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 91912b2b4fcbSmrg [C++], [[int foo (void) { return 0; }]], 91922b2b4fcbSmrg [Fortran 77], [[ 91932b2b4fcbSmrg subroutine foo 91942b2b4fcbSmrg end]], 91952b2b4fcbSmrg [Fortran], [[ 91962b2b4fcbSmrg subroutine foo 91972b2b4fcbSmrg end]])])], 91982b2b4fcbSmrg [lt_cv_irix_exported_symbol=yes], 91992b2b4fcbSmrg [lt_cv_irix_exported_symbol=no]) 92002b2b4fcbSmrg LDFLAGS=$save_LDFLAGS]) 92012b2b4fcbSmrg if test yes = "$lt_cv_irix_exported_symbol"; then 92022b2b4fcbSmrg _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' 92032b2b4fcbSmrg fi 92042b2b4fcbSmrg else 92052b2b4fcbSmrg _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' 92062b2b4fcbSmrg _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' 92072b2b4fcbSmrg fi 92082b2b4fcbSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 92092b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 92102b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 92112b2b4fcbSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 92122b2b4fcbSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 92132b2b4fcbSmrg ;; 92146aec45a7Smrg 92152b2b4fcbSmrg linux*) 92162b2b4fcbSmrg case $cc_basename in 92172b2b4fcbSmrg tcc*) 92182b2b4fcbSmrg # Fabrice Bellard et al's Tiny C Compiler 92192b2b4fcbSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 92202b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 92212b2b4fcbSmrg ;; 92222b2b4fcbSmrg esac 92232b2b4fcbSmrg ;; 92246aec45a7Smrg 92252b2b4fcbSmrg netbsd*) 92262b2b4fcbSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 92272b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 92282b2b4fcbSmrg else 92292b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 92302b2b4fcbSmrg fi 92312b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 92322b2b4fcbSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 92332b2b4fcbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 92342b2b4fcbSmrg ;; 92356aec45a7Smrg 92362b2b4fcbSmrg newsos6) 92372b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 92382b2b4fcbSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 92392b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 92402b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 92412b2b4fcbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 92422b2b4fcbSmrg ;; 92436aec45a7Smrg 92442b2b4fcbSmrg *nto* | *qnx*) 92452b2b4fcbSmrg ;; 92466aec45a7Smrg 92472b2b4fcbSmrg openbsd* | bitrig*) 92482b2b4fcbSmrg if test -f /usr/libexec/ld.so; then 92492b2b4fcbSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 92502b2b4fcbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 92512b2b4fcbSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 92522b2b4fcbSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 92532b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 92542b2b4fcbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' 92552b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 92562b2b4fcbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 92572b2b4fcbSmrg else 92582b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 92592b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 92602b2b4fcbSmrg fi 92612b2b4fcbSmrg else 92622b2b4fcbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 92632b2b4fcbSmrg fi 92642b2b4fcbSmrg ;; 92656aec45a7Smrg 92662b2b4fcbSmrg os2*) 92672b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 92682b2b4fcbSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 92692b2b4fcbSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 92702b2b4fcbSmrg shrext_cmds=.dll 92712b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 92722b2b4fcbSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 92732b2b4fcbSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 92742b2b4fcbSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 92752b2b4fcbSmrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 92762b2b4fcbSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 92772b2b4fcbSmrg emximp -o $lib $output_objdir/$libname.def' 92782b2b4fcbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 92792b2b4fcbSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 92802b2b4fcbSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 92812b2b4fcbSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 92822b2b4fcbSmrg prefix_cmds="$SED"~ 92832b2b4fcbSmrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 92842b2b4fcbSmrg prefix_cmds="$prefix_cmds -e 1d"; 92852b2b4fcbSmrg fi~ 92862b2b4fcbSmrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 92872b2b4fcbSmrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 92882b2b4fcbSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 92892b2b4fcbSmrg emximp -o $lib $output_objdir/$libname.def' 92902b2b4fcbSmrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 92912b2b4fcbSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 92922b2b4fcbSmrg _LT_TAGVAR(file_list_spec, $1)='@' 92932b2b4fcbSmrg ;; 92946aec45a7Smrg 92952b2b4fcbSmrg osf3*) 92962b2b4fcbSmrg if test yes = "$GCC"; then 92972b2b4fcbSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 92982b2b4fcbSmrg _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' 92992b2b4fcbSmrg else 93002b2b4fcbSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 93012b2b4fcbSmrg _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' 93022b2b4fcbSmrg fi 93032b2b4fcbSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 93042b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 93052b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 93062b2b4fcbSmrg ;; 93076aec45a7Smrg 93082b2b4fcbSmrg osf4* | osf5*) # as osf3* with the addition of -msym flag 93092b2b4fcbSmrg if test yes = "$GCC"; then 93102b2b4fcbSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 93112b2b4fcbSmrg _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' 93122b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 93132b2b4fcbSmrg else 93142b2b4fcbSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 93152b2b4fcbSmrg _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' 93162b2b4fcbSmrg _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~ 93172b2b4fcbSmrg $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' 9318ab47cfaaSmrg 93192b2b4fcbSmrg # Both c and cxx compiler support -rpath directly 93202b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 93212b2b4fcbSmrg fi 93222b2b4fcbSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 93232b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 93242b2b4fcbSmrg ;; 93251473d951Smrg 93262b2b4fcbSmrg solaris*) 93272b2b4fcbSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 93282b2b4fcbSmrg if test yes = "$GCC"; then 93292b2b4fcbSmrg wlarc='$wl' 93302b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 93312b2b4fcbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 93322b2b4fcbSmrg $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' 93332b2b4fcbSmrg else 93342b2b4fcbSmrg case `$CC -V 2>&1` in 93352b2b4fcbSmrg *"Compilers 5.0"*) 93362b2b4fcbSmrg wlarc='' 93372b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' 93382b2b4fcbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 93392b2b4fcbSmrg $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 93402b2b4fcbSmrg ;; 93412b2b4fcbSmrg *) 93422b2b4fcbSmrg wlarc='$wl' 93432b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' 93442b2b4fcbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 93452b2b4fcbSmrg $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 93462b2b4fcbSmrg ;; 93472b2b4fcbSmrg esac 93482b2b4fcbSmrg fi 93492b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 93502b2b4fcbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 93512b2b4fcbSmrg case $host_os in 93522b2b4fcbSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 93532b2b4fcbSmrg *) 93542b2b4fcbSmrg # The compiler driver will combine and reorder linker options, 93552b2b4fcbSmrg # but understands '-z linker_flag'. GCC discards it without '$wl', 93562b2b4fcbSmrg # but is careful enough not to reorder. 93572b2b4fcbSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 93582b2b4fcbSmrg if test yes = "$GCC"; then 93592b2b4fcbSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 93602b2b4fcbSmrg else 93612b2b4fcbSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 93622b2b4fcbSmrg fi 93632b2b4fcbSmrg ;; 93642b2b4fcbSmrg esac 93652b2b4fcbSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 93662b2b4fcbSmrg ;; 9367ab47cfaaSmrg 93682b2b4fcbSmrg sunos4*) 93692b2b4fcbSmrg if test sequent = "$host_vendor"; then 93702b2b4fcbSmrg # Use $CC to link under sequent, because it throws in some extra .o 93712b2b4fcbSmrg # files that make .init and .fini sections work. 93722b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' 93732b2b4fcbSmrg else 93742b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 93752b2b4fcbSmrg fi 93762b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 93772b2b4fcbSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 93782b2b4fcbSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 93792b2b4fcbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 93802b2b4fcbSmrg ;; 9381ab47cfaaSmrg 93822b2b4fcbSmrg sysv4) 93832b2b4fcbSmrg case $host_vendor in 93842b2b4fcbSmrg sni) 93852b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 93862b2b4fcbSmrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 93872b2b4fcbSmrg ;; 93882b2b4fcbSmrg siemens) 93892b2b4fcbSmrg ## LD is ld it makes a PLAMLIB 93902b2b4fcbSmrg ## CC just makes a GrossModule. 93912b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 93922b2b4fcbSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 93932b2b4fcbSmrg _LT_TAGVAR(hardcode_direct, $1)=no 93942b2b4fcbSmrg ;; 93952b2b4fcbSmrg motorola) 93962b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 93972b2b4fcbSmrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 93982b2b4fcbSmrg ;; 93992b2b4fcbSmrg esac 94002b2b4fcbSmrg runpath_var='LD_RUN_PATH' 94012b2b4fcbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 94022b2b4fcbSmrg ;; 9403ab47cfaaSmrg 94042b2b4fcbSmrg sysv4.3*) 94052b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 94062b2b4fcbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 94072b2b4fcbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 94082b2b4fcbSmrg ;; 9409ab47cfaaSmrg 94102b2b4fcbSmrg sysv4*MP*) 94112b2b4fcbSmrg if test -d /usr/nec; then 94122b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 94132b2b4fcbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 94142b2b4fcbSmrg runpath_var=LD_RUN_PATH 94152b2b4fcbSmrg hardcode_runpath_var=yes 94162b2b4fcbSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 94172b2b4fcbSmrg fi 94182b2b4fcbSmrg ;; 9419ab47cfaaSmrg 94202b2b4fcbSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 94212b2b4fcbSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 94222b2b4fcbSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 94232b2b4fcbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 94242b2b4fcbSmrg runpath_var='LD_RUN_PATH' 9425ab47cfaaSmrg 94262b2b4fcbSmrg if test yes = "$GCC"; then 94272b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 94282b2b4fcbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 94292b2b4fcbSmrg else 94302b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 94312b2b4fcbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 94322b2b4fcbSmrg fi 94332b2b4fcbSmrg ;; 94348697ee19Smrg 94352b2b4fcbSmrg sysv5* | sco3.2v5* | sco5v6*) 94362b2b4fcbSmrg # Note: We CANNOT use -z defs as we might desire, because we do not 94372b2b4fcbSmrg # link with -lc, and that would cause any symbols used from libc to 94382b2b4fcbSmrg # always be unresolved, which means just about no library would 94392b2b4fcbSmrg # ever link correctly. If we're not using GNU ld we use -z text 94402b2b4fcbSmrg # though, which does catch some bad symbols but isn't as heavy-handed 94412b2b4fcbSmrg # as -z defs. 94422b2b4fcbSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 94432b2b4fcbSmrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 94442b2b4fcbSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 94452b2b4fcbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 94462b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 94472b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 94482b2b4fcbSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 94492b2b4fcbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 94502b2b4fcbSmrg runpath_var='LD_RUN_PATH' 94518697ee19Smrg 94522b2b4fcbSmrg if test yes = "$GCC"; then 94532b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 94542b2b4fcbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 94552b2b4fcbSmrg else 94562b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 94572b2b4fcbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 94582b2b4fcbSmrg fi 94592b2b4fcbSmrg ;; 94608697ee19Smrg 94612b2b4fcbSmrg uts4*) 94622b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 94632b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 94642b2b4fcbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 94652b2b4fcbSmrg ;; 94668697ee19Smrg 94672b2b4fcbSmrg *) 94682b2b4fcbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 94692b2b4fcbSmrg ;; 94702b2b4fcbSmrg esac 94716aec45a7Smrg 94722b2b4fcbSmrg if test sni = "$host_vendor"; then 94732b2b4fcbSmrg case $host in 94742b2b4fcbSmrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 94752b2b4fcbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' 94762b2b4fcbSmrg ;; 94772b2b4fcbSmrg esac 94782b2b4fcbSmrg fi 94792b2b4fcbSmrg fi 9480ab47cfaaSmrg]) 94812b2b4fcbSmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 94822b2b4fcbSmrgtest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 94831473d951Smrg 94842b2b4fcbSmrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 94856aec45a7Smrg 94862b2b4fcbSmrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 94872b2b4fcbSmrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 94882b2b4fcbSmrg_LT_DECL([], [extract_expsyms_cmds], [2], 94892b2b4fcbSmrg [The commands to extract the exported symbol list from a shared archive]) 94906aec45a7Smrg 94916aec45a7Smrg# 94922b2b4fcbSmrg# Do we need to explicitly link libc? 94936aec45a7Smrg# 94942b2b4fcbSmrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 94952b2b4fcbSmrgx|xyes) 94962b2b4fcbSmrg # Assume -lc should be added 94972b2b4fcbSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 94986aec45a7Smrg 94992b2b4fcbSmrg if test yes,yes = "$GCC,$enable_shared"; then 95002b2b4fcbSmrg case $_LT_TAGVAR(archive_cmds, $1) in 95012b2b4fcbSmrg *'~'*) 95022b2b4fcbSmrg # FIXME: we may have to deal with multi-command sequences. 95032b2b4fcbSmrg ;; 95042b2b4fcbSmrg '$CC '*) 95052b2b4fcbSmrg # Test whether the compiler implicitly links with -lc since on some 95062b2b4fcbSmrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 95072b2b4fcbSmrg # to ld, don't add -lc before -lgcc. 95082b2b4fcbSmrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 95092b2b4fcbSmrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 95102b2b4fcbSmrg [$RM conftest* 95112b2b4fcbSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 95126aec45a7Smrg 95132b2b4fcbSmrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 95142b2b4fcbSmrg soname=conftest 95152b2b4fcbSmrg lib=conftest 95162b2b4fcbSmrg libobjs=conftest.$ac_objext 95172b2b4fcbSmrg deplibs= 95182b2b4fcbSmrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 95192b2b4fcbSmrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 95202b2b4fcbSmrg compiler_flags=-v 95212b2b4fcbSmrg linker_flags=-v 95222b2b4fcbSmrg verstring= 95232b2b4fcbSmrg output_objdir=. 95242b2b4fcbSmrg libname=conftest 95252b2b4fcbSmrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 95262b2b4fcbSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 95272b2b4fcbSmrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 95282b2b4fcbSmrg then 95292b2b4fcbSmrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 95302b2b4fcbSmrg else 95312b2b4fcbSmrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 95322b2b4fcbSmrg fi 95332b2b4fcbSmrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 95342b2b4fcbSmrg else 95352b2b4fcbSmrg cat conftest.err 1>&5 95362b2b4fcbSmrg fi 95372b2b4fcbSmrg $RM conftest* 95382b2b4fcbSmrg ]) 95392b2b4fcbSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 95402b2b4fcbSmrg ;; 95412b2b4fcbSmrg esac 95422b2b4fcbSmrg fi 95432b2b4fcbSmrg ;; 95442b2b4fcbSmrgesac 95456aec45a7Smrg 95462b2b4fcbSmrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 95472b2b4fcbSmrg [Whether or not to add -lc for building shared libraries]) 95482b2b4fcbSmrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 95492b2b4fcbSmrg [enable_shared_with_static_runtimes], [0], 95502b2b4fcbSmrg [Whether or not to disallow shared libs when runtime libs are static]) 95512b2b4fcbSmrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 95522b2b4fcbSmrg [Compiler flag to allow reflexive dlopens]) 95532b2b4fcbSmrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 95542b2b4fcbSmrg [Compiler flag to generate shared objects directly from archives]) 95552b2b4fcbSmrg_LT_TAGDECL([], [compiler_needs_object], [1], 95562b2b4fcbSmrg [Whether the compiler copes with passing no objects directly]) 95572b2b4fcbSmrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 95582b2b4fcbSmrg [Create an old-style archive from a shared archive]) 95592b2b4fcbSmrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 95602b2b4fcbSmrg [Create a temporary old-style archive to link instead of a shared archive]) 95612b2b4fcbSmrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 95622b2b4fcbSmrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 95632b2b4fcbSmrg_LT_TAGDECL([], [module_cmds], [2], 95642b2b4fcbSmrg [Commands used to build a loadable module if different from building 95652b2b4fcbSmrg a shared archive.]) 95662b2b4fcbSmrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 95672b2b4fcbSmrg_LT_TAGDECL([], [with_gnu_ld], [1], 95682b2b4fcbSmrg [Whether we are building with GNU ld or not]) 95692b2b4fcbSmrg_LT_TAGDECL([], [allow_undefined_flag], [1], 95702b2b4fcbSmrg [Flag that allows shared libraries with undefined symbols to be built]) 95712b2b4fcbSmrg_LT_TAGDECL([], [no_undefined_flag], [1], 95722b2b4fcbSmrg [Flag that enforces no undefined symbols]) 95732b2b4fcbSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 95742b2b4fcbSmrg [Flag to hardcode $libdir into a binary during linking. 95752b2b4fcbSmrg This must work even if $libdir does not exist]) 95762b2b4fcbSmrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 95772b2b4fcbSmrg [Whether we need a single "-rpath" flag with a separated argument]) 95782b2b4fcbSmrg_LT_TAGDECL([], [hardcode_direct], [0], 95792b2b4fcbSmrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 95802b2b4fcbSmrg DIR into the resulting binary]) 95812b2b4fcbSmrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 95822b2b4fcbSmrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 95832b2b4fcbSmrg DIR into the resulting binary and the resulting library dependency is 95842b2b4fcbSmrg "absolute", i.e impossible to change by setting $shlibpath_var if the 95852b2b4fcbSmrg library is relocated]) 95862b2b4fcbSmrg_LT_TAGDECL([], [hardcode_minus_L], [0], 95872b2b4fcbSmrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 95882b2b4fcbSmrg into the resulting binary]) 95892b2b4fcbSmrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 95902b2b4fcbSmrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 95912b2b4fcbSmrg into the resulting binary]) 95922b2b4fcbSmrg_LT_TAGDECL([], [hardcode_automatic], [0], 95932b2b4fcbSmrg [Set to "yes" if building a shared library automatically hardcodes DIR 95942b2b4fcbSmrg into the library and all subsequent libraries and executables linked 95952b2b4fcbSmrg against it]) 95962b2b4fcbSmrg_LT_TAGDECL([], [inherit_rpath], [0], 95972b2b4fcbSmrg [Set to yes if linker adds runtime paths of dependent libraries 95982b2b4fcbSmrg to runtime path list]) 95992b2b4fcbSmrg_LT_TAGDECL([], [link_all_deplibs], [0], 96002b2b4fcbSmrg [Whether libtool must link a program against all its dependency libraries]) 96012b2b4fcbSmrg_LT_TAGDECL([], [always_export_symbols], [0], 96022b2b4fcbSmrg [Set to "yes" if exported symbols are required]) 96032b2b4fcbSmrg_LT_TAGDECL([], [export_symbols_cmds], [2], 96042b2b4fcbSmrg [The commands to list exported symbols]) 96052b2b4fcbSmrg_LT_TAGDECL([], [exclude_expsyms], [1], 96062b2b4fcbSmrg [Symbols that should not be listed in the preloaded symbols]) 96072b2b4fcbSmrg_LT_TAGDECL([], [include_expsyms], [1], 96082b2b4fcbSmrg [Symbols that must always be exported]) 96092b2b4fcbSmrg_LT_TAGDECL([], [prelink_cmds], [2], 96102b2b4fcbSmrg [Commands necessary for linking programs (against libraries) with templates]) 96112b2b4fcbSmrg_LT_TAGDECL([], [postlink_cmds], [2], 96122b2b4fcbSmrg [Commands necessary for finishing linking programs]) 96132b2b4fcbSmrg_LT_TAGDECL([], [file_list_spec], [1], 96142b2b4fcbSmrg [Specify filename containing input files]) 96152b2b4fcbSmrgdnl FIXME: Not yet implemented 96162b2b4fcbSmrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 96172b2b4fcbSmrgdnl [Compiler flag to generate thread safe objects]) 96182b2b4fcbSmrg])# _LT_LINKER_SHLIBS 9619ab47cfaaSmrg 96206aec45a7Smrg 96212b2b4fcbSmrg# _LT_LANG_C_CONFIG([TAG]) 96222b2b4fcbSmrg# ------------------------ 96232b2b4fcbSmrg# Ensure that the configuration variables for a C compiler are suitably 96242b2b4fcbSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 96252b2b4fcbSmrg# the compiler configuration to 'libtool'. 96262b2b4fcbSmrgm4_defun([_LT_LANG_C_CONFIG], 96272b2b4fcbSmrg[m4_require([_LT_DECL_EGREP])dnl 96282b2b4fcbSmrglt_save_CC=$CC 96292b2b4fcbSmrgAC_LANG_PUSH(C) 9630ab47cfaaSmrg 96312b2b4fcbSmrg# Source file extension for C test sources. 96322b2b4fcbSmrgac_ext=c 9633ab47cfaaSmrg 96342b2b4fcbSmrg# Object file extension for compiled C test sources. 96352b2b4fcbSmrgobjext=o 96362b2b4fcbSmrg_LT_TAGVAR(objext, $1)=$objext 9637ab47cfaaSmrg 96382b2b4fcbSmrg# Code to be used in simple compile tests 96392b2b4fcbSmrglt_simple_compile_test_code="int some_variable = 0;" 9640ab47cfaaSmrg 96412b2b4fcbSmrg# Code to be used in simple link tests 96422b2b4fcbSmrglt_simple_link_test_code='int main(){return(0);}' 9643ab47cfaaSmrg 96442b2b4fcbSmrg_LT_TAG_COMPILER 96452b2b4fcbSmrg# Save the default compiler, since it gets overwritten when the other 96462b2b4fcbSmrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 96472b2b4fcbSmrgcompiler_DEFAULT=$CC 9648ab47cfaaSmrg 96492b2b4fcbSmrg# save warnings/boilerplate of simple test code 96502b2b4fcbSmrg_LT_COMPILER_BOILERPLATE 96512b2b4fcbSmrg_LT_LINKER_BOILERPLATE 9652ab47cfaaSmrg 96532b2b4fcbSmrgif test -n "$compiler"; then 96542b2b4fcbSmrg _LT_COMPILER_NO_RTTI($1) 96552b2b4fcbSmrg _LT_COMPILER_PIC($1) 96562b2b4fcbSmrg _LT_COMPILER_C_O($1) 96572b2b4fcbSmrg _LT_COMPILER_FILE_LOCKS($1) 96582b2b4fcbSmrg _LT_LINKER_SHLIBS($1) 96592b2b4fcbSmrg _LT_SYS_DYNAMIC_LINKER($1) 96602b2b4fcbSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 96612b2b4fcbSmrg LT_SYS_DLOPEN_SELF 96622b2b4fcbSmrg _LT_CMD_STRIPLIB 9663ab47cfaaSmrg 96642b2b4fcbSmrg # Report what library types will actually be built 96652b2b4fcbSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 96662b2b4fcbSmrg AC_MSG_RESULT([$can_build_shared]) 9667ab47cfaaSmrg 96682b2b4fcbSmrg AC_MSG_CHECKING([whether to build shared libraries]) 96692b2b4fcbSmrg test no = "$can_build_shared" && enable_shared=no 9670ab47cfaaSmrg 96712b2b4fcbSmrg # On AIX, shared libraries and static libraries use the same namespace, and 96722b2b4fcbSmrg # are all built from PIC. 96732b2b4fcbSmrg case $host_os in 96742b2b4fcbSmrg aix3*) 96752b2b4fcbSmrg test yes = "$enable_shared" && enable_static=no 96762b2b4fcbSmrg if test -n "$RANLIB"; then 96772b2b4fcbSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 96782b2b4fcbSmrg postinstall_cmds='$RANLIB $lib' 96792b2b4fcbSmrg fi 96802b2b4fcbSmrg ;; 9681ab47cfaaSmrg 96822b2b4fcbSmrg aix[[4-9]]*) 96832b2b4fcbSmrg if test ia64 != "$host_cpu"; then 96842b2b4fcbSmrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 96852b2b4fcbSmrg yes,aix,yes) ;; # shared object as lib.so file only 96862b2b4fcbSmrg yes,svr4,*) ;; # shared object as lib.so archive member only 96872b2b4fcbSmrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 96882b2b4fcbSmrg esac 96892b2b4fcbSmrg fi 96902b2b4fcbSmrg ;; 96912b2b4fcbSmrg esac 96922b2b4fcbSmrg AC_MSG_RESULT([$enable_shared]) 9693ab47cfaaSmrg 96942b2b4fcbSmrg AC_MSG_CHECKING([whether to build static libraries]) 96952b2b4fcbSmrg # Make sure either enable_shared or enable_static is yes. 96962b2b4fcbSmrg test yes = "$enable_shared" || enable_static=yes 96972b2b4fcbSmrg AC_MSG_RESULT([$enable_static]) 9698ab47cfaaSmrg 96992b2b4fcbSmrg _LT_CONFIG($1) 97002b2b4fcbSmrgfi 97012b2b4fcbSmrgAC_LANG_POP 97022b2b4fcbSmrgCC=$lt_save_CC 97032b2b4fcbSmrg])# _LT_LANG_C_CONFIG 9704ab47cfaaSmrg 9705ab47cfaaSmrg 97062b2b4fcbSmrg# _LT_LANG_CXX_CONFIG([TAG]) 97072b2b4fcbSmrg# -------------------------- 97082b2b4fcbSmrg# Ensure that the configuration variables for a C++ compiler are suitably 97092b2b4fcbSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 97102b2b4fcbSmrg# the compiler configuration to 'libtool'. 97112b2b4fcbSmrgm4_defun([_LT_LANG_CXX_CONFIG], 97122b2b4fcbSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 97132b2b4fcbSmrgm4_require([_LT_DECL_EGREP])dnl 97142b2b4fcbSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 97152b2b4fcbSmrgif test -n "$CXX" && ( test no != "$CXX" && 97162b2b4fcbSmrg ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || 97172b2b4fcbSmrg (test g++ != "$CXX"))); then 97182b2b4fcbSmrg AC_PROG_CXXCPP 9719ab47cfaaSmrgelse 97202b2b4fcbSmrg _lt_caught_CXX_error=yes 97212b2b4fcbSmrgfi 9722ab47cfaaSmrg 97232b2b4fcbSmrgAC_LANG_PUSH(C++) 97242b2b4fcbSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 97252b2b4fcbSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 97262b2b4fcbSmrg_LT_TAGVAR(always_export_symbols, $1)=no 97272b2b4fcbSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 97282b2b4fcbSmrg_LT_TAGVAR(compiler_needs_object, $1)=no 97292b2b4fcbSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 97302b2b4fcbSmrg_LT_TAGVAR(hardcode_direct, $1)=no 97312b2b4fcbSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 97322b2b4fcbSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 97332b2b4fcbSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 97342b2b4fcbSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 97352b2b4fcbSmrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 97362b2b4fcbSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 97372b2b4fcbSmrg_LT_TAGVAR(inherit_rpath, $1)=no 97382b2b4fcbSmrg_LT_TAGVAR(module_cmds, $1)= 97392b2b4fcbSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 97402b2b4fcbSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 97412b2b4fcbSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 97422b2b4fcbSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 97432b2b4fcbSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 97442b2b4fcbSmrg_LT_TAGVAR(no_undefined_flag, $1)= 97452b2b4fcbSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 97462b2b4fcbSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 97471e449e82Smrg 97482b2b4fcbSmrg# Source file extension for C++ test sources. 97492b2b4fcbSmrgac_ext=cpp 97501e449e82Smrg 97512b2b4fcbSmrg# Object file extension for compiled C++ test sources. 97522b2b4fcbSmrgobjext=o 97532b2b4fcbSmrg_LT_TAGVAR(objext, $1)=$objext 97541e449e82Smrg 97552b2b4fcbSmrg# No sense in running all these tests if we already determined that 97562b2b4fcbSmrg# the CXX compiler isn't working. Some variables (like enable_shared) 97572b2b4fcbSmrg# are currently assumed to apply to all compilers on this platform, 97582b2b4fcbSmrg# and will be corrupted by setting them based on a non-working compiler. 97592b2b4fcbSmrgif test yes != "$_lt_caught_CXX_error"; then 97602b2b4fcbSmrg # Code to be used in simple compile tests 97612b2b4fcbSmrg lt_simple_compile_test_code="int some_variable = 0;" 97621e449e82Smrg 97632b2b4fcbSmrg # Code to be used in simple link tests 97642b2b4fcbSmrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 97651e449e82Smrg 97662b2b4fcbSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 97672b2b4fcbSmrg _LT_TAG_COMPILER 97681e449e82Smrg 97692b2b4fcbSmrg # save warnings/boilerplate of simple test code 97702b2b4fcbSmrg _LT_COMPILER_BOILERPLATE 97712b2b4fcbSmrg _LT_LINKER_BOILERPLATE 97721e449e82Smrg 97732b2b4fcbSmrg # Allow CC to be a program name with arguments. 97742b2b4fcbSmrg lt_save_CC=$CC 97752b2b4fcbSmrg lt_save_CFLAGS=$CFLAGS 97762b2b4fcbSmrg lt_save_LD=$LD 97772b2b4fcbSmrg lt_save_GCC=$GCC 97782b2b4fcbSmrg GCC=$GXX 97792b2b4fcbSmrg lt_save_with_gnu_ld=$with_gnu_ld 97802b2b4fcbSmrg lt_save_path_LD=$lt_cv_path_LD 97812b2b4fcbSmrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 97822b2b4fcbSmrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 97832b2b4fcbSmrg else 97842b2b4fcbSmrg $as_unset lt_cv_prog_gnu_ld 97852b2b4fcbSmrg fi 97862b2b4fcbSmrg if test -n "${lt_cv_path_LDCXX+set}"; then 97872b2b4fcbSmrg lt_cv_path_LD=$lt_cv_path_LDCXX 97882b2b4fcbSmrg else 97892b2b4fcbSmrg $as_unset lt_cv_path_LD 97902b2b4fcbSmrg fi 97912b2b4fcbSmrg test -z "${LDCXX+set}" || LD=$LDCXX 97922b2b4fcbSmrg CC=${CXX-"c++"} 97932b2b4fcbSmrg CFLAGS=$CXXFLAGS 97942b2b4fcbSmrg compiler=$CC 97952b2b4fcbSmrg _LT_TAGVAR(compiler, $1)=$CC 97962b2b4fcbSmrg _LT_CC_BASENAME([$compiler]) 97971e449e82Smrg 97982b2b4fcbSmrg if test -n "$compiler"; then 97992b2b4fcbSmrg # We don't want -fno-exception when compiling C++ code, so set the 98002b2b4fcbSmrg # no_builtin_flag separately 98012b2b4fcbSmrg if test yes = "$GXX"; then 98022b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 98032b2b4fcbSmrg else 98042b2b4fcbSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 98052b2b4fcbSmrg fi 9806ab47cfaaSmrg 98072b2b4fcbSmrg if test yes = "$GXX"; then 98082b2b4fcbSmrg # Set up default GNU C++ configuration 9809ab47cfaaSmrg 98102b2b4fcbSmrg LT_PATH_LD 9811ab47cfaaSmrg 98122b2b4fcbSmrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 98132b2b4fcbSmrg # archiving commands below assume that GNU ld is being used. 98142b2b4fcbSmrg if test yes = "$with_gnu_ld"; then 98152b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 98162b2b4fcbSmrg _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' 9817ab47cfaaSmrg 98182b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 98192b2b4fcbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 9820ab47cfaaSmrg 98212b2b4fcbSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 98222b2b4fcbSmrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 98232b2b4fcbSmrg # investigate it a little bit more. (MM) 98242b2b4fcbSmrg wlarc='$wl' 9825ab47cfaaSmrg 98262b2b4fcbSmrg # ancient GNU ld didn't support --whole-archive et. al. 98272b2b4fcbSmrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 98282b2b4fcbSmrg $GREP 'no-whole-archive' > /dev/null; then 98292b2b4fcbSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 98302b2b4fcbSmrg else 98312b2b4fcbSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 98322b2b4fcbSmrg fi 98332b2b4fcbSmrg else 98342b2b4fcbSmrg with_gnu_ld=no 98352b2b4fcbSmrg wlarc= 9836ab47cfaaSmrg 98372b2b4fcbSmrg # A generic and very simple default shared library creation 98382b2b4fcbSmrg # command for GNU C++ for the case where it uses the native 98392b2b4fcbSmrg # linker, instead of GNU ld. If possible, this setting should 98402b2b4fcbSmrg # overridden to take advantage of the native linker features on 98412b2b4fcbSmrg # the platform it is being used on. 98422b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 98432b2b4fcbSmrg fi 9844ab47cfaaSmrg 98452b2b4fcbSmrg # Commands to make compiler produce verbose output that lists 98462b2b4fcbSmrg # what "hidden" libraries, object files and flags are used when 98472b2b4fcbSmrg # linking a shared library. 98482b2b4fcbSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 9849ab47cfaaSmrg 98502b2b4fcbSmrg else 98512b2b4fcbSmrg GXX=no 98522b2b4fcbSmrg with_gnu_ld=no 98532b2b4fcbSmrg wlarc= 98542b2b4fcbSmrg fi 98552b2b4fcbSmrg 98562b2b4fcbSmrg # PORTME: fill in a description of your system's C++ link characteristics 98572b2b4fcbSmrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 98582b2b4fcbSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 98598697ee19Smrg case $host_os in 98602b2b4fcbSmrg aix3*) 98612b2b4fcbSmrg # FIXME: insert proper C++ library support 98622b2b4fcbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 98632b2b4fcbSmrg ;; 98642b2b4fcbSmrg aix[[4-9]]*) 98652b2b4fcbSmrg if test ia64 = "$host_cpu"; then 98662b2b4fcbSmrg # On IA64, the linker does run time linking by default, so we don't 98672b2b4fcbSmrg # have to do anything special. 98682b2b4fcbSmrg aix_use_runtimelinking=no 98692b2b4fcbSmrg exp_sym_flag='-Bexport' 98702b2b4fcbSmrg no_entry_flag= 98712b2b4fcbSmrg else 98722b2b4fcbSmrg aix_use_runtimelinking=no 98732b2b4fcbSmrg 98742b2b4fcbSmrg # Test if we are trying to use run time linking or normal 98752b2b4fcbSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 98762b2b4fcbSmrg # have runtime linking enabled, and use it for executables. 98772b2b4fcbSmrg # For shared libraries, we enable/disable runtime linking 98782b2b4fcbSmrg # depending on the kind of the shared library created - 98792b2b4fcbSmrg # when "with_aix_soname,aix_use_runtimelinking" is: 98802b2b4fcbSmrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 98812b2b4fcbSmrg # "aix,yes" lib.so shared, rtl:yes, for executables 98822b2b4fcbSmrg # lib.a static archive 98832b2b4fcbSmrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 98842b2b4fcbSmrg # lib.a(lib.so.V) shared, rtl:no, for executables 98852b2b4fcbSmrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 98862b2b4fcbSmrg # lib.a(lib.so.V) shared, rtl:no 98872b2b4fcbSmrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 98882b2b4fcbSmrg # lib.a static archive 98892b2b4fcbSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 98902b2b4fcbSmrg for ld_flag in $LDFLAGS; do 98912b2b4fcbSmrg case $ld_flag in 98922b2b4fcbSmrg *-brtl*) 98932b2b4fcbSmrg aix_use_runtimelinking=yes 98942b2b4fcbSmrg break 98952b2b4fcbSmrg ;; 98962b2b4fcbSmrg esac 98972b2b4fcbSmrg done 98982b2b4fcbSmrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 98992b2b4fcbSmrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 99002b2b4fcbSmrg # so we don't have lib.a shared libs to link our executables. 99012b2b4fcbSmrg # We have to force runtime linking in this case. 99022b2b4fcbSmrg aix_use_runtimelinking=yes 99032b2b4fcbSmrg LDFLAGS="$LDFLAGS -Wl,-brtl" 99042b2b4fcbSmrg fi 99052b2b4fcbSmrg ;; 99062b2b4fcbSmrg esac 9907ab47cfaaSmrg 99082b2b4fcbSmrg exp_sym_flag='-bexport' 99092b2b4fcbSmrg no_entry_flag='-bnoentry' 99102b2b4fcbSmrg fi 9911ab47cfaaSmrg 99122b2b4fcbSmrg # When large executables or shared objects are built, AIX ld can 99132b2b4fcbSmrg # have problems creating the table of contents. If linking a library 99142b2b4fcbSmrg # or program results in "error TOC overflow" add -mminimal-toc to 99152b2b4fcbSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 99162b2b4fcbSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 9917ab47cfaaSmrg 99182b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='' 99192b2b4fcbSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 99202b2b4fcbSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 99212b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 99222b2b4fcbSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 99232b2b4fcbSmrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 99242b2b4fcbSmrg case $with_aix_soname,$aix_use_runtimelinking in 99252b2b4fcbSmrg aix,*) ;; # no import file 99262b2b4fcbSmrg svr4,* | *,yes) # use import file 99272b2b4fcbSmrg # The Import File defines what to hardcode. 99282b2b4fcbSmrg _LT_TAGVAR(hardcode_direct, $1)=no 99292b2b4fcbSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 99302b2b4fcbSmrg ;; 99312b2b4fcbSmrg esac 9932ab47cfaaSmrg 99332b2b4fcbSmrg if test yes = "$GXX"; then 99342b2b4fcbSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 99352b2b4fcbSmrg # We only want to do this on AIX 4.2 and lower, the check 99362b2b4fcbSmrg # below for broken collect2 doesn't work under 4.3+ 99372b2b4fcbSmrg collect2name=`$CC -print-prog-name=collect2` 99382b2b4fcbSmrg if test -f "$collect2name" && 99392b2b4fcbSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 99402b2b4fcbSmrg then 99412b2b4fcbSmrg # We have reworked collect2 99422b2b4fcbSmrg : 99432b2b4fcbSmrg else 99442b2b4fcbSmrg # We have old collect2 99452b2b4fcbSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 99462b2b4fcbSmrg # It fails to find uninstalled libraries when the uninstalled 99472b2b4fcbSmrg # path is not listed in the libpath. Setting hardcode_minus_L 99482b2b4fcbSmrg # to unsupported forces relinking 99492b2b4fcbSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 99502b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 99512b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 99522b2b4fcbSmrg fi 99532b2b4fcbSmrg esac 99542b2b4fcbSmrg shared_flag='-shared' 99552b2b4fcbSmrg if test yes = "$aix_use_runtimelinking"; then 99562b2b4fcbSmrg shared_flag=$shared_flag' $wl-G' 99572b2b4fcbSmrg fi 99582b2b4fcbSmrg # Need to ensure runtime linking is disabled for the traditional 99592b2b4fcbSmrg # shared library, or the linker may eventually find shared libraries 99602b2b4fcbSmrg # /with/ Import File - we do not want to mix them. 99612b2b4fcbSmrg shared_flag_aix='-shared' 99622b2b4fcbSmrg shared_flag_svr4='-shared $wl-G' 99632b2b4fcbSmrg else 99642b2b4fcbSmrg # not using gcc 99652b2b4fcbSmrg if test ia64 = "$host_cpu"; then 99662b2b4fcbSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 99672b2b4fcbSmrg # chokes on -Wl,-G. The following line is correct: 99682b2b4fcbSmrg shared_flag='-G' 99692b2b4fcbSmrg else 99702b2b4fcbSmrg if test yes = "$aix_use_runtimelinking"; then 99712b2b4fcbSmrg shared_flag='$wl-G' 99722b2b4fcbSmrg else 99732b2b4fcbSmrg shared_flag='$wl-bM:SRE' 99742b2b4fcbSmrg fi 99752b2b4fcbSmrg shared_flag_aix='$wl-bM:SRE' 99762b2b4fcbSmrg shared_flag_svr4='$wl-G' 99772b2b4fcbSmrg fi 99782b2b4fcbSmrg fi 9979ab47cfaaSmrg 99802b2b4fcbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 99812b2b4fcbSmrg # It seems that -bexpall does not export symbols beginning with 99822b2b4fcbSmrg # underscore (_), so it is better to generate a list of symbols to 99832b2b4fcbSmrg # export. 99842b2b4fcbSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 99852b2b4fcbSmrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 99862b2b4fcbSmrg # Warning - without using the other runtime loading flags (-brtl), 99872b2b4fcbSmrg # -berok will link without error, but may produce a broken library. 99882b2b4fcbSmrg # The "-G" linker flag allows undefined symbols. 99892b2b4fcbSmrg _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' 99902b2b4fcbSmrg # Determine the default libpath from the value encoded in an empty 99912b2b4fcbSmrg # executable. 99922b2b4fcbSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 99932b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 99946aec45a7Smrg 99952b2b4fcbSmrg _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 99962b2b4fcbSmrg else 99972b2b4fcbSmrg if test ia64 = "$host_cpu"; then 99982b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 99992b2b4fcbSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 100002b2b4fcbSmrg _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" 100012b2b4fcbSmrg else 100022b2b4fcbSmrg # Determine the default libpath from the value encoded in an 100032b2b4fcbSmrg # empty executable. 100042b2b4fcbSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 100052b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 100062b2b4fcbSmrg # Warning - without using the other run time loading flags, 100072b2b4fcbSmrg # -berok will link without error, but may produce a broken library. 100082b2b4fcbSmrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 100092b2b4fcbSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 100102b2b4fcbSmrg if test yes = "$with_gnu_ld"; then 100112b2b4fcbSmrg # We only use this code for GNU lds that support --whole-archive. 100122b2b4fcbSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 100132b2b4fcbSmrg else 100142b2b4fcbSmrg # Exported symbols can be pulled into shared objects from archives 100152b2b4fcbSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 100162b2b4fcbSmrg fi 100172b2b4fcbSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 100182b2b4fcbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 100192b2b4fcbSmrg # -brtl affects multiple linker settings, -berok does not and is overridden later 100202b2b4fcbSmrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 100212b2b4fcbSmrg if test svr4 != "$with_aix_soname"; then 100222b2b4fcbSmrg # This is similar to how AIX traditionally builds its shared 100232b2b4fcbSmrg # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. 100242b2b4fcbSmrg _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' 100252b2b4fcbSmrg fi 100262b2b4fcbSmrg if test aix != "$with_aix_soname"; then 100272b2b4fcbSmrg _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' 100282b2b4fcbSmrg else 100292b2b4fcbSmrg # used by -dlpreopen to get the symbols 100302b2b4fcbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 100312b2b4fcbSmrg fi 100322b2b4fcbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 100332b2b4fcbSmrg fi 100342b2b4fcbSmrg fi 100352b2b4fcbSmrg ;; 100366aec45a7Smrg 100372b2b4fcbSmrg beos*) 100382b2b4fcbSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 100392b2b4fcbSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 100402b2b4fcbSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 100412b2b4fcbSmrg # support --undefined. This deserves some investigation. FIXME 100422b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 100432b2b4fcbSmrg else 100442b2b4fcbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 100452b2b4fcbSmrg fi 100462b2b4fcbSmrg ;; 10047ab47cfaaSmrg 100482b2b4fcbSmrg chorus*) 100492b2b4fcbSmrg case $cc_basename in 100502b2b4fcbSmrg *) 100512b2b4fcbSmrg # FIXME: insert proper C++ library support 100522b2b4fcbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 100532b2b4fcbSmrg ;; 100542b2b4fcbSmrg esac 100552b2b4fcbSmrg ;; 100566aec45a7Smrg 100572b2b4fcbSmrg cygwin* | mingw* | pw32* | cegcc*) 100582b2b4fcbSmrg case $GXX,$cc_basename in 100592b2b4fcbSmrg ,cl* | no,cl* | ,icl* | no,icl*) 100602b2b4fcbSmrg # Native MSVC or ICC 100612b2b4fcbSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 100622b2b4fcbSmrg # no search path for DLLs. 100632b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 100642b2b4fcbSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 100652b2b4fcbSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 100662b2b4fcbSmrg _LT_TAGVAR(file_list_spec, $1)='@' 100672b2b4fcbSmrg # Tell ltmain to make .lib files, not .a files. 100682b2b4fcbSmrg libext=lib 100692b2b4fcbSmrg # Tell ltmain to make .dll files, not .so files. 100702b2b4fcbSmrg shrext_cmds=.dll 100712b2b4fcbSmrg # FIXME: Setting linknames here is a bad hack. 100722b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 100732b2b4fcbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 100742b2b4fcbSmrg cp "$export_symbols" "$output_objdir/$soname.def"; 100752b2b4fcbSmrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 100762b2b4fcbSmrg else 100772b2b4fcbSmrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 100782b2b4fcbSmrg fi~ 100792b2b4fcbSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 100802b2b4fcbSmrg linknames=' 100812b2b4fcbSmrg # The linker will not automatically build a static lib if we build a DLL. 100822b2b4fcbSmrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 100832b2b4fcbSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 100842b2b4fcbSmrg # Don't use ranlib 100852b2b4fcbSmrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 100862b2b4fcbSmrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 100872b2b4fcbSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 100882b2b4fcbSmrg case $lt_outputfile in 100892b2b4fcbSmrg *.exe|*.EXE) ;; 100902b2b4fcbSmrg *) 100912b2b4fcbSmrg lt_outputfile=$lt_outputfile.exe 100922b2b4fcbSmrg lt_tool_outputfile=$lt_tool_outputfile.exe 100932b2b4fcbSmrg ;; 100942b2b4fcbSmrg esac~ 100952b2b4fcbSmrg func_to_tool_file "$lt_outputfile"~ 100962b2b4fcbSmrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 100972b2b4fcbSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 100982b2b4fcbSmrg $RM "$lt_outputfile.manifest"; 100992b2b4fcbSmrg fi' 101002b2b4fcbSmrg ;; 101012b2b4fcbSmrg *) 101022b2b4fcbSmrg # g++ 101032b2b4fcbSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 101042b2b4fcbSmrg # as there is no search path for DLLs. 101052b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 101062b2b4fcbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 101072b2b4fcbSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 101082b2b4fcbSmrg _LT_TAGVAR(always_export_symbols, $1)=no 101092b2b4fcbSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 101106aec45a7Smrg 101112b2b4fcbSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 101122b2b4fcbSmrg _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' 101132b2b4fcbSmrg # If the export-symbols file already is a .def file, use it as 101142b2b4fcbSmrg # is; otherwise, prepend EXPORTS... 101152b2b4fcbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 101162b2b4fcbSmrg cp $export_symbols $output_objdir/$soname.def; 101172b2b4fcbSmrg else 101182b2b4fcbSmrg echo EXPORTS > $output_objdir/$soname.def; 101192b2b4fcbSmrg cat $export_symbols >> $output_objdir/$soname.def; 101202b2b4fcbSmrg fi~ 101212b2b4fcbSmrg $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' 101222b2b4fcbSmrg else 101232b2b4fcbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 101242b2b4fcbSmrg fi 101252b2b4fcbSmrg ;; 101262b2b4fcbSmrg esac 101272b2b4fcbSmrg ;; 101282b2b4fcbSmrg darwin* | rhapsody*) 101292b2b4fcbSmrg _LT_DARWIN_LINKER_FEATURES($1) 101302b2b4fcbSmrg ;; 101316aec45a7Smrg 101322b2b4fcbSmrg os2*) 101332b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 101342b2b4fcbSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 101352b2b4fcbSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 101362b2b4fcbSmrg shrext_cmds=.dll 101372b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 101382b2b4fcbSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 101392b2b4fcbSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 101402b2b4fcbSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 101412b2b4fcbSmrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 101422b2b4fcbSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 101432b2b4fcbSmrg emximp -o $lib $output_objdir/$libname.def' 101442b2b4fcbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 101452b2b4fcbSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 101462b2b4fcbSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 101472b2b4fcbSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 101482b2b4fcbSmrg prefix_cmds="$SED"~ 101492b2b4fcbSmrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 101502b2b4fcbSmrg prefix_cmds="$prefix_cmds -e 1d"; 101512b2b4fcbSmrg fi~ 101522b2b4fcbSmrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 101532b2b4fcbSmrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 101542b2b4fcbSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 101552b2b4fcbSmrg emximp -o $lib $output_objdir/$libname.def' 101562b2b4fcbSmrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 101572b2b4fcbSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 101582b2b4fcbSmrg _LT_TAGVAR(file_list_spec, $1)='@' 101592b2b4fcbSmrg ;; 10160ab47cfaaSmrg 101612b2b4fcbSmrg dgux*) 101622b2b4fcbSmrg case $cc_basename in 101632b2b4fcbSmrg ec++*) 101642b2b4fcbSmrg # FIXME: insert proper C++ library support 101652b2b4fcbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 101662b2b4fcbSmrg ;; 101672b2b4fcbSmrg ghcx*) 101682b2b4fcbSmrg # Green Hills C++ Compiler 101692b2b4fcbSmrg # FIXME: insert proper C++ library support 101702b2b4fcbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 101712b2b4fcbSmrg ;; 101722b2b4fcbSmrg *) 101732b2b4fcbSmrg # FIXME: insert proper C++ library support 101742b2b4fcbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 101752b2b4fcbSmrg ;; 101762b2b4fcbSmrg esac 101772b2b4fcbSmrg ;; 10178ab47cfaaSmrg 101792b2b4fcbSmrg freebsd2.*) 101802b2b4fcbSmrg # C++ shared libraries reported to be fairly broken before 101812b2b4fcbSmrg # switch to ELF 101822b2b4fcbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 101832b2b4fcbSmrg ;; 10184ab47cfaaSmrg 101852b2b4fcbSmrg freebsd-elf*) 101862b2b4fcbSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 101872b2b4fcbSmrg ;; 10188ab47cfaaSmrg 101892b2b4fcbSmrg freebsd* | dragonfly* | midnightbsd*) 101902b2b4fcbSmrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 101912b2b4fcbSmrg # conventions 101922b2b4fcbSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 101932b2b4fcbSmrg ;; 10194ab47cfaaSmrg 101952b2b4fcbSmrg haiku*) 101962b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 101972b2b4fcbSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 101982b2b4fcbSmrg ;; 10199ab47cfaaSmrg 102002b2b4fcbSmrg hpux9*) 102012b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 102022b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 102032b2b4fcbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 102042b2b4fcbSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 102052b2b4fcbSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 102062b2b4fcbSmrg # but as the default 102072b2b4fcbSmrg # location of the library. 10208ab47cfaaSmrg 102092b2b4fcbSmrg case $cc_basename in 102102b2b4fcbSmrg CC*) 102112b2b4fcbSmrg # FIXME: insert proper C++ library support 102122b2b4fcbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 102132b2b4fcbSmrg ;; 102142b2b4fcbSmrg aCC*) 102152b2b4fcbSmrg _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' 102162b2b4fcbSmrg # Commands to make compiler produce verbose output that lists 102172b2b4fcbSmrg # what "hidden" libraries, object files and flags are used when 102182b2b4fcbSmrg # linking a shared library. 102192b2b4fcbSmrg # 102202b2b4fcbSmrg # There doesn't appear to be a way to prevent this compiler from 102212b2b4fcbSmrg # explicitly linking system object files so we need to strip them 102222b2b4fcbSmrg # from the output so that they don't get included in the library 102232b2b4fcbSmrg # dependencies. 102242b2b4fcbSmrg 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"' 102252b2b4fcbSmrg ;; 102262b2b4fcbSmrg *) 102272b2b4fcbSmrg if test yes = "$GXX"; then 102282b2b4fcbSmrg _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' 102292b2b4fcbSmrg else 102302b2b4fcbSmrg # FIXME: insert proper C++ library support 102312b2b4fcbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 102322b2b4fcbSmrg fi 102332b2b4fcbSmrg ;; 102342b2b4fcbSmrg esac 102352b2b4fcbSmrg ;; 10236ab47cfaaSmrg 102372b2b4fcbSmrg hpux10*|hpux11*) 102382b2b4fcbSmrg if test no = "$with_gnu_ld"; then 102392b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 102402b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10241ab47cfaaSmrg 102422b2b4fcbSmrg case $host_cpu in 102432b2b4fcbSmrg hppa*64*|ia64*) 102442b2b4fcbSmrg ;; 102452b2b4fcbSmrg *) 102462b2b4fcbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 102472b2b4fcbSmrg ;; 102482b2b4fcbSmrg esac 102492b2b4fcbSmrg fi 102502b2b4fcbSmrg case $host_cpu in 102512b2b4fcbSmrg hppa*64*|ia64*) 102522b2b4fcbSmrg _LT_TAGVAR(hardcode_direct, $1)=no 102532b2b4fcbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 102542b2b4fcbSmrg ;; 102552b2b4fcbSmrg *) 102562b2b4fcbSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 102572b2b4fcbSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 102582b2b4fcbSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 102592b2b4fcbSmrg # but as the default 102602b2b4fcbSmrg # location of the library. 102612b2b4fcbSmrg ;; 102622b2b4fcbSmrg esac 10263ab47cfaaSmrg 102642b2b4fcbSmrg case $cc_basename in 102652b2b4fcbSmrg CC*) 102662b2b4fcbSmrg # FIXME: insert proper C++ library support 102672b2b4fcbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 102682b2b4fcbSmrg ;; 102692b2b4fcbSmrg aCC*) 102702b2b4fcbSmrg case $host_cpu in 102712b2b4fcbSmrg hppa*64*) 102722b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 102732b2b4fcbSmrg ;; 102742b2b4fcbSmrg ia64*) 102752b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 102762b2b4fcbSmrg ;; 102772b2b4fcbSmrg *) 102782b2b4fcbSmrg _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' 102792b2b4fcbSmrg ;; 102802b2b4fcbSmrg esac 102812b2b4fcbSmrg # Commands to make compiler produce verbose output that lists 102822b2b4fcbSmrg # what "hidden" libraries, object files and flags are used when 102832b2b4fcbSmrg # linking a shared library. 102842b2b4fcbSmrg # 102852b2b4fcbSmrg # There doesn't appear to be a way to prevent this compiler from 102862b2b4fcbSmrg # explicitly linking system object files so we need to strip them 102872b2b4fcbSmrg # from the output so that they don't get included in the library 102882b2b4fcbSmrg # dependencies. 102892b2b4fcbSmrg 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"' 102902b2b4fcbSmrg ;; 102912b2b4fcbSmrg *) 102922b2b4fcbSmrg if test yes = "$GXX"; then 102932b2b4fcbSmrg if test no = "$with_gnu_ld"; then 102942b2b4fcbSmrg case $host_cpu in 102952b2b4fcbSmrg hppa*64*) 102962b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 102972b2b4fcbSmrg ;; 102982b2b4fcbSmrg ia64*) 102992b2b4fcbSmrg _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' 103002b2b4fcbSmrg ;; 103012b2b4fcbSmrg *) 103022b2b4fcbSmrg _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' 103032b2b4fcbSmrg ;; 103042b2b4fcbSmrg esac 103052b2b4fcbSmrg fi 103062b2b4fcbSmrg else 103072b2b4fcbSmrg # FIXME: insert proper C++ library support 103082b2b4fcbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 103092b2b4fcbSmrg fi 103102b2b4fcbSmrg ;; 103112b2b4fcbSmrg esac 103122b2b4fcbSmrg ;; 10313ab47cfaaSmrg 103142b2b4fcbSmrg interix[[3-9]]*) 103152b2b4fcbSmrg _LT_TAGVAR(hardcode_direct, $1)=no 103162b2b4fcbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 103172b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 103182b2b4fcbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 103192b2b4fcbSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 103202b2b4fcbSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 103212b2b4fcbSmrg # default) and relocated if they conflict, which is a slow very memory 103222b2b4fcbSmrg # consuming and fragmenting process. To avoid this, we pick a random, 103232b2b4fcbSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 103242b2b4fcbSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 103252b2b4fcbSmrg _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' 103262b2b4fcbSmrg _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' 103272b2b4fcbSmrg ;; 103282b2b4fcbSmrg irix5* | irix6*) 103292b2b4fcbSmrg case $cc_basename in 103302b2b4fcbSmrg CC*) 103312b2b4fcbSmrg # SGI C++ 103322b2b4fcbSmrg _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' 10333ab47cfaaSmrg 103342b2b4fcbSmrg # Archives containing C++ object files must be created using 103352b2b4fcbSmrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 103362b2b4fcbSmrg # necessary to make sure instantiated templates are included 103372b2b4fcbSmrg # in the archive. 103382b2b4fcbSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 103392b2b4fcbSmrg ;; 103402b2b4fcbSmrg *) 103412b2b4fcbSmrg if test yes = "$GXX"; then 103422b2b4fcbSmrg if test no = "$with_gnu_ld"; then 103432b2b4fcbSmrg _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' 103442b2b4fcbSmrg else 103452b2b4fcbSmrg _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' 103462b2b4fcbSmrg fi 103472b2b4fcbSmrg fi 103482b2b4fcbSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 103492b2b4fcbSmrg ;; 103502b2b4fcbSmrg esac 103512b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 103522b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 103532b2b4fcbSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 103542b2b4fcbSmrg ;; 103556aec45a7Smrg 103562b2b4fcbSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 103572b2b4fcbSmrg case $cc_basename in 103582b2b4fcbSmrg KCC*) 103592b2b4fcbSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 10360ab47cfaaSmrg 103612b2b4fcbSmrg # KCC will only create a shared library if the output file 103622b2b4fcbSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 103632b2b4fcbSmrg # to its proper name (with version) after linking. 103642b2b4fcbSmrg _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' 103652b2b4fcbSmrg _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' 103662b2b4fcbSmrg # Commands to make compiler produce verbose output that lists 103672b2b4fcbSmrg # what "hidden" libraries, object files and flags are used when 103682b2b4fcbSmrg # linking a shared library. 103692b2b4fcbSmrg # 103702b2b4fcbSmrg # There doesn't appear to be a way to prevent this compiler from 103712b2b4fcbSmrg # explicitly linking system object files so we need to strip them 103722b2b4fcbSmrg # from the output so that they don't get included in the library 103732b2b4fcbSmrg # dependencies. 103742b2b4fcbSmrg 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"' 10375ab47cfaaSmrg 103762b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 103772b2b4fcbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 10378ab47cfaaSmrg 103792b2b4fcbSmrg # Archives containing C++ object files must be created using 103802b2b4fcbSmrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 103812b2b4fcbSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 103822b2b4fcbSmrg ;; 103832b2b4fcbSmrg icpc* | ecpc* ) 103842b2b4fcbSmrg # Intel C++ 103852b2b4fcbSmrg with_gnu_ld=yes 103862b2b4fcbSmrg # version 8.0 and above of icpc choke on multiply defined symbols 103872b2b4fcbSmrg # if we add $predep_objects and $postdep_objects, however 7.1 and 103882b2b4fcbSmrg # earlier do not add the objects themselves. 103892b2b4fcbSmrg case `$CC -V 2>&1` in 103902b2b4fcbSmrg *"Version 7."*) 103912b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 103922b2b4fcbSmrg _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' 103932b2b4fcbSmrg ;; 103942b2b4fcbSmrg *) # Version 8.0 or newer 103952b2b4fcbSmrg tmp_idyn= 103962b2b4fcbSmrg case $host_cpu in 103972b2b4fcbSmrg ia64*) tmp_idyn=' -i_dynamic';; 103982b2b4fcbSmrg esac 103992b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 104002b2b4fcbSmrg _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' 104012b2b4fcbSmrg ;; 104022b2b4fcbSmrg esac 104032b2b4fcbSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 104042b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 104052b2b4fcbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 104062b2b4fcbSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 104072b2b4fcbSmrg ;; 104082b2b4fcbSmrg pgCC* | pgcpp*) 104092b2b4fcbSmrg # Portland Group C++ compiler 104102b2b4fcbSmrg case `$CC -V` in 104112b2b4fcbSmrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 104122b2b4fcbSmrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 104132b2b4fcbSmrg rm -rf $tpldir~ 104142b2b4fcbSmrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 104152b2b4fcbSmrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 104162b2b4fcbSmrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 104172b2b4fcbSmrg rm -rf $tpldir~ 104182b2b4fcbSmrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 104192b2b4fcbSmrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 104202b2b4fcbSmrg $RANLIB $oldlib' 104212b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 104222b2b4fcbSmrg rm -rf $tpldir~ 104232b2b4fcbSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 104242b2b4fcbSmrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 104252b2b4fcbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 104262b2b4fcbSmrg rm -rf $tpldir~ 104272b2b4fcbSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 104282b2b4fcbSmrg $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' 104292b2b4fcbSmrg ;; 104302b2b4fcbSmrg *) # Version 6 and above use weak symbols 104312b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 104322b2b4fcbSmrg _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' 104332b2b4fcbSmrg ;; 104342b2b4fcbSmrg esac 10435ab47cfaaSmrg 104362b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' 104372b2b4fcbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 104382b2b4fcbSmrg _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' 104392b2b4fcbSmrg ;; 104402b2b4fcbSmrg cxx*) 104412b2b4fcbSmrg # Compaq C++ 104422b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 104432b2b4fcbSmrg _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' 10444ab47cfaaSmrg 104452b2b4fcbSmrg runpath_var=LD_RUN_PATH 104462b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 104472b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10448ab47cfaaSmrg 104492b2b4fcbSmrg # Commands to make compiler produce verbose output that lists 104502b2b4fcbSmrg # what "hidden" libraries, object files and flags are used when 104512b2b4fcbSmrg # linking a shared library. 104522b2b4fcbSmrg # 104532b2b4fcbSmrg # There doesn't appear to be a way to prevent this compiler from 104542b2b4fcbSmrg # explicitly linking system object files so we need to strip them 104552b2b4fcbSmrg # from the output so that they don't get included in the library 104562b2b4fcbSmrg # dependencies. 104572b2b4fcbSmrg 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' 104582b2b4fcbSmrg ;; 104592b2b4fcbSmrg xl* | mpixl* | bgxl*) 104602b2b4fcbSmrg # IBM XL 8.0 on PPC, with GNU ld 104612b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 104622b2b4fcbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 104632b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 104642b2b4fcbSmrg if test yes = "$supports_anon_versioning"; then 104652b2b4fcbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 104662b2b4fcbSmrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 104672b2b4fcbSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 104682b2b4fcbSmrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 104692b2b4fcbSmrg fi 104702b2b4fcbSmrg ;; 104712b2b4fcbSmrg *) 104722b2b4fcbSmrg case `$CC -V 2>&1 | $SED 5q` in 104732b2b4fcbSmrg *Sun\ C*) 104742b2b4fcbSmrg # Sun C++ 5.9 104752b2b4fcbSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 104762b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 104772b2b4fcbSmrg _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' 104782b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 104792b2b4fcbSmrg _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' 104802b2b4fcbSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 10481ab47cfaaSmrg 104822b2b4fcbSmrg # Not sure whether something based on 104832b2b4fcbSmrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 104842b2b4fcbSmrg # would be better. 104852b2b4fcbSmrg output_verbose_link_cmd='func_echo_all' 10486ab47cfaaSmrg 104872b2b4fcbSmrg # Archives containing C++ object files must be created using 104882b2b4fcbSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 104892b2b4fcbSmrg # necessary to make sure instantiated templates are included 104902b2b4fcbSmrg # in the archive. 104912b2b4fcbSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 104922b2b4fcbSmrg ;; 104932b2b4fcbSmrg esac 104942b2b4fcbSmrg ;; 104952b2b4fcbSmrg esac 104962b2b4fcbSmrg ;; 104976aec45a7Smrg 104982b2b4fcbSmrg lynxos*) 104992b2b4fcbSmrg # FIXME: insert proper C++ library support 105002b2b4fcbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 105012b2b4fcbSmrg ;; 105026aec45a7Smrg 105032b2b4fcbSmrg m88k*) 105042b2b4fcbSmrg # FIXME: insert proper C++ library support 105052b2b4fcbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 105062b2b4fcbSmrg ;; 105076aec45a7Smrg 105082b2b4fcbSmrg mvs*) 105092b2b4fcbSmrg case $cc_basename in 105102b2b4fcbSmrg cxx*) 105112b2b4fcbSmrg # FIXME: insert proper C++ library support 105122b2b4fcbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 105132b2b4fcbSmrg ;; 105142b2b4fcbSmrg *) 105152b2b4fcbSmrg # FIXME: insert proper C++ library support 105162b2b4fcbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 105172b2b4fcbSmrg ;; 105182b2b4fcbSmrg esac 105192b2b4fcbSmrg ;; 105206aec45a7Smrg 105212b2b4fcbSmrg netbsd*) 105222b2b4fcbSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 105232b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 105242b2b4fcbSmrg wlarc= 105252b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 105262b2b4fcbSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 105272b2b4fcbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 105282b2b4fcbSmrg fi 105292b2b4fcbSmrg # Workaround some broken pre-1.5 toolchains 105302b2b4fcbSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 105312b2b4fcbSmrg ;; 10532aa9e3350Smrg 105332b2b4fcbSmrg *nto* | *qnx*) 105342b2b4fcbSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 105352b2b4fcbSmrg ;; 10536aa9e3350Smrg 105372b2b4fcbSmrg openbsd* | bitrig*) 105382b2b4fcbSmrg if test -f /usr/libexec/ld.so; then 105392b2b4fcbSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 105402b2b4fcbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 105412b2b4fcbSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 105422b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 105432b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 105442b2b4fcbSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then 105452b2b4fcbSmrg _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' 105462b2b4fcbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 105472b2b4fcbSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 105482b2b4fcbSmrg fi 105492b2b4fcbSmrg output_verbose_link_cmd=func_echo_all 105502b2b4fcbSmrg else 105512b2b4fcbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 105522b2b4fcbSmrg fi 105532b2b4fcbSmrg ;; 10554aa9e3350Smrg 105552b2b4fcbSmrg osf3* | osf4* | osf5*) 105562b2b4fcbSmrg case $cc_basename in 105572b2b4fcbSmrg KCC*) 105582b2b4fcbSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 10559aa9e3350Smrg 105602b2b4fcbSmrg # KCC will only create a shared library if the output file 105612b2b4fcbSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 105622b2b4fcbSmrg # to its proper name (with version) after linking. 105632b2b4fcbSmrg _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' 10564aa9e3350Smrg 105652b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 105662b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 105672b2b4fcbSmrg 105682b2b4fcbSmrg # Archives containing C++ object files must be created using 105692b2b4fcbSmrg # the KAI C++ compiler. 105702b2b4fcbSmrg case $host in 105712b2b4fcbSmrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 105722b2b4fcbSmrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 105732b2b4fcbSmrg esac 105742b2b4fcbSmrg ;; 105752b2b4fcbSmrg RCC*) 105762b2b4fcbSmrg # Rational C++ 2.4.1 105772b2b4fcbSmrg # FIXME: insert proper C++ library support 105782b2b4fcbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 105792b2b4fcbSmrg ;; 105802b2b4fcbSmrg cxx*) 105812b2b4fcbSmrg case $host in 105822b2b4fcbSmrg osf3*) 105832b2b4fcbSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 105842b2b4fcbSmrg _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' 105852b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 105862b2b4fcbSmrg ;; 105872b2b4fcbSmrg *) 105882b2b4fcbSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 105892b2b4fcbSmrg _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' 105902b2b4fcbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 105912b2b4fcbSmrg echo "-hidden">> $lib.exp~ 105922b2b4fcbSmrg $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~ 105932b2b4fcbSmrg $RM $lib.exp' 105942b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 105952b2b4fcbSmrg ;; 105962b2b4fcbSmrg esac 105972b2b4fcbSmrg 105982b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 105992b2b4fcbSmrg 106002b2b4fcbSmrg # Commands to make compiler produce verbose output that lists 106012b2b4fcbSmrg # what "hidden" libraries, object files and flags are used when 106022b2b4fcbSmrg # linking a shared library. 106032b2b4fcbSmrg # 106042b2b4fcbSmrg # There doesn't appear to be a way to prevent this compiler from 106052b2b4fcbSmrg # explicitly linking system object files so we need to strip them 106062b2b4fcbSmrg # from the output so that they don't get included in the library 106072b2b4fcbSmrg # dependencies. 106082b2b4fcbSmrg 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"' 106092b2b4fcbSmrg ;; 106102b2b4fcbSmrg *) 106112b2b4fcbSmrg if test yes,no = "$GXX,$with_gnu_ld"; then 106122b2b4fcbSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 106132b2b4fcbSmrg case $host in 106142b2b4fcbSmrg osf3*) 106152b2b4fcbSmrg _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' 106162b2b4fcbSmrg ;; 106172b2b4fcbSmrg *) 106182b2b4fcbSmrg _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' 106192b2b4fcbSmrg ;; 106202b2b4fcbSmrg esac 10621aa9e3350Smrg 106222b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 106232b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 106246aec45a7Smrg 106252b2b4fcbSmrg # Commands to make compiler produce verbose output that lists 106262b2b4fcbSmrg # what "hidden" libraries, object files and flags are used when 106272b2b4fcbSmrg # linking a shared library. 106282b2b4fcbSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 106296aec45a7Smrg 106302b2b4fcbSmrg else 106312b2b4fcbSmrg # FIXME: insert proper C++ library support 106322b2b4fcbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 106332b2b4fcbSmrg fi 106342b2b4fcbSmrg ;; 106352b2b4fcbSmrg esac 106362b2b4fcbSmrg ;; 106376aec45a7Smrg 106382b2b4fcbSmrg psos*) 106392b2b4fcbSmrg # FIXME: insert proper C++ library support 106402b2b4fcbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 106412b2b4fcbSmrg ;; 106421e449e82Smrg 106432b2b4fcbSmrg sunos4*) 106442b2b4fcbSmrg case $cc_basename in 106452b2b4fcbSmrg CC*) 106462b2b4fcbSmrg # Sun C++ 4.x 106472b2b4fcbSmrg # FIXME: insert proper C++ library support 106482b2b4fcbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 106492b2b4fcbSmrg ;; 106502b2b4fcbSmrg lcc*) 106512b2b4fcbSmrg # Lucid 106522b2b4fcbSmrg # FIXME: insert proper C++ library support 106532b2b4fcbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 106542b2b4fcbSmrg ;; 106552b2b4fcbSmrg *) 106562b2b4fcbSmrg # FIXME: insert proper C++ library support 106572b2b4fcbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 106582b2b4fcbSmrg ;; 106592b2b4fcbSmrg esac 106602b2b4fcbSmrg ;; 106611e449e82Smrg 106622b2b4fcbSmrg solaris*) 106632b2b4fcbSmrg case $cc_basename in 106642b2b4fcbSmrg CC* | sunCC*) 106652b2b4fcbSmrg # Sun C++ 4.2, 5.x and Centerline C++ 106662b2b4fcbSmrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 106672b2b4fcbSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 106682b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 106692b2b4fcbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 106702b2b4fcbSmrg $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' 106716aec45a7Smrg 106722b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 106732b2b4fcbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 106742b2b4fcbSmrg case $host_os in 106752b2b4fcbSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 106762b2b4fcbSmrg *) 106772b2b4fcbSmrg # The compiler driver will combine and reorder linker options, 106782b2b4fcbSmrg # but understands '-z linker_flag'. 106792b2b4fcbSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 106802b2b4fcbSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 106812b2b4fcbSmrg ;; 106822b2b4fcbSmrg esac 106832b2b4fcbSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 106846aec45a7Smrg 106852b2b4fcbSmrg output_verbose_link_cmd='func_echo_all' 106866aec45a7Smrg 106872b2b4fcbSmrg # Archives containing C++ object files must be created using 106882b2b4fcbSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 106892b2b4fcbSmrg # necessary to make sure instantiated templates are included 106902b2b4fcbSmrg # in the archive. 106912b2b4fcbSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 106922b2b4fcbSmrg ;; 106932b2b4fcbSmrg gcx*) 106942b2b4fcbSmrg # Green Hills C++ Compiler 106952b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 106966aec45a7Smrg 106972b2b4fcbSmrg # The C++ compiler must be used to create the archive. 106982b2b4fcbSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 106992b2b4fcbSmrg ;; 107002b2b4fcbSmrg *) 107012b2b4fcbSmrg # GNU C++ compiler with Solaris linker 107022b2b4fcbSmrg if test yes,no = "$GXX,$with_gnu_ld"; then 107032b2b4fcbSmrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' 107042b2b4fcbSmrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 107052b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 107062b2b4fcbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 107072b2b4fcbSmrg $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' 107086aec45a7Smrg 107092b2b4fcbSmrg # Commands to make compiler produce verbose output that lists 107102b2b4fcbSmrg # what "hidden" libraries, object files and flags are used when 107112b2b4fcbSmrg # linking a shared library. 107122b2b4fcbSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 107132b2b4fcbSmrg else 107142b2b4fcbSmrg # g++ 2.7 appears to require '-G' NOT '-shared' on this 107152b2b4fcbSmrg # platform. 107162b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 107172b2b4fcbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 107182b2b4fcbSmrg $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' 107196aec45a7Smrg 107202b2b4fcbSmrg # Commands to make compiler produce verbose output that lists 107212b2b4fcbSmrg # what "hidden" libraries, object files and flags are used when 107222b2b4fcbSmrg # linking a shared library. 107232b2b4fcbSmrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 107242b2b4fcbSmrg fi 107256aec45a7Smrg 107262b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' 107272b2b4fcbSmrg case $host_os in 107282b2b4fcbSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 107292b2b4fcbSmrg *) 107302b2b4fcbSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 107312b2b4fcbSmrg ;; 107322b2b4fcbSmrg esac 107332b2b4fcbSmrg fi 107342b2b4fcbSmrg ;; 107352b2b4fcbSmrg esac 107362b2b4fcbSmrg ;; 10737aa9e3350Smrg 107382b2b4fcbSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 107392b2b4fcbSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 107402b2b4fcbSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 107412b2b4fcbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 107422b2b4fcbSmrg runpath_var='LD_RUN_PATH' 107436aec45a7Smrg 107442b2b4fcbSmrg case $cc_basename in 107452b2b4fcbSmrg CC*) 107462b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 107472b2b4fcbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 107482b2b4fcbSmrg ;; 107492b2b4fcbSmrg *) 107502b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 107512b2b4fcbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 107522b2b4fcbSmrg ;; 107532b2b4fcbSmrg esac 107542b2b4fcbSmrg ;; 107551e449e82Smrg 107562b2b4fcbSmrg sysv5* | sco3.2v5* | sco5v6*) 107572b2b4fcbSmrg # Note: We CANNOT use -z defs as we might desire, because we do not 107582b2b4fcbSmrg # link with -lc, and that would cause any symbols used from libc to 107592b2b4fcbSmrg # always be unresolved, which means just about no library would 107602b2b4fcbSmrg # ever link correctly. If we're not using GNU ld we use -z text 107612b2b4fcbSmrg # though, which does catch some bad symbols but isn't as heavy-handed 107622b2b4fcbSmrg # as -z defs. 107632b2b4fcbSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 107642b2b4fcbSmrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 107652b2b4fcbSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 107662b2b4fcbSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 107672b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 107682b2b4fcbSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 107692b2b4fcbSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 107702b2b4fcbSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 107712b2b4fcbSmrg runpath_var='LD_RUN_PATH' 107722b2b4fcbSmrg 107732b2b4fcbSmrg case $cc_basename in 107742b2b4fcbSmrg CC*) 107752b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 107762b2b4fcbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 107772b2b4fcbSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 107782b2b4fcbSmrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 107792b2b4fcbSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 107802b2b4fcbSmrg '"$_LT_TAGVAR(reload_cmds, $1)" 107812b2b4fcbSmrg ;; 107822b2b4fcbSmrg *) 107832b2b4fcbSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 107842b2b4fcbSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 107852b2b4fcbSmrg ;; 107862b2b4fcbSmrg esac 107872b2b4fcbSmrg ;; 107882b2b4fcbSmrg 107892b2b4fcbSmrg tandem*) 107902b2b4fcbSmrg case $cc_basename in 107912b2b4fcbSmrg NCC*) 107922b2b4fcbSmrg # NonStop-UX NCC 3.20 107932b2b4fcbSmrg # FIXME: insert proper C++ library support 107942b2b4fcbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 107952b2b4fcbSmrg ;; 107962b2b4fcbSmrg *) 107972b2b4fcbSmrg # FIXME: insert proper C++ library support 107982b2b4fcbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 107992b2b4fcbSmrg ;; 108002b2b4fcbSmrg esac 108012b2b4fcbSmrg ;; 108021e449e82Smrg 108032b2b4fcbSmrg vxworks*) 108042b2b4fcbSmrg # FIXME: insert proper C++ library support 108052b2b4fcbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 108062b2b4fcbSmrg ;; 108076aec45a7Smrg 108082b2b4fcbSmrg *) 108092b2b4fcbSmrg # FIXME: insert proper C++ library support 108102b2b4fcbSmrg _LT_TAGVAR(ld_shlibs, $1)=no 108112b2b4fcbSmrg ;; 108122b2b4fcbSmrg esac 108136aec45a7Smrg 108142b2b4fcbSmrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 108152b2b4fcbSmrg test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 108166aec45a7Smrg 108172b2b4fcbSmrg _LT_TAGVAR(GCC, $1)=$GXX 108182b2b4fcbSmrg _LT_TAGVAR(LD, $1)=$LD 108196aec45a7Smrg 108202b2b4fcbSmrg ## CAVEAT EMPTOR: 108212b2b4fcbSmrg ## There is no encapsulation within the following macros, do not change 108222b2b4fcbSmrg ## the running order or otherwise move them around unless you know exactly 108232b2b4fcbSmrg ## what you are doing... 108242b2b4fcbSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 108252b2b4fcbSmrg _LT_COMPILER_PIC($1) 108262b2b4fcbSmrg _LT_COMPILER_C_O($1) 108272b2b4fcbSmrg _LT_COMPILER_FILE_LOCKS($1) 108282b2b4fcbSmrg _LT_LINKER_SHLIBS($1) 108292b2b4fcbSmrg _LT_SYS_DYNAMIC_LINKER($1) 108302b2b4fcbSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 108316aec45a7Smrg 108322b2b4fcbSmrg _LT_CONFIG($1) 108332b2b4fcbSmrg fi # test -n "$compiler" 10834aa9e3350Smrg 108352b2b4fcbSmrg CC=$lt_save_CC 108362b2b4fcbSmrg CFLAGS=$lt_save_CFLAGS 108372b2b4fcbSmrg LDCXX=$LD 108382b2b4fcbSmrg LD=$lt_save_LD 108392b2b4fcbSmrg GCC=$lt_save_GCC 108402b2b4fcbSmrg with_gnu_ld=$lt_save_with_gnu_ld 108412b2b4fcbSmrg lt_cv_path_LDCXX=$lt_cv_path_LD 108422b2b4fcbSmrg lt_cv_path_LD=$lt_save_path_LD 108432b2b4fcbSmrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 108442b2b4fcbSmrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 108452b2b4fcbSmrgfi # test yes != "$_lt_caught_CXX_error" 10846aa9e3350Smrg 108472b2b4fcbSmrgAC_LANG_POP 108482b2b4fcbSmrg])# _LT_LANG_CXX_CONFIG 108492b2b4fcbSmrg 108502b2b4fcbSmrg 108512b2b4fcbSmrg# _LT_FUNC_STRIPNAME_CNF 108522b2b4fcbSmrg# ---------------------- 108532b2b4fcbSmrg# func_stripname_cnf prefix suffix name 108542b2b4fcbSmrg# strip PREFIX and SUFFIX off of NAME. 108552b2b4fcbSmrg# PREFIX and SUFFIX must not contain globbing or regex special 108562b2b4fcbSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading 108572b2b4fcbSmrg# dot (in which case that matches only a dot). 10858aa9e3350Smrg# 108592b2b4fcbSmrg# This function is identical to the (non-XSI) version of func_stripname, 108602b2b4fcbSmrg# except this one can be used by m4 code that may be executed by configure, 108612b2b4fcbSmrg# rather than the libtool script. 108622b2b4fcbSmrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 108632b2b4fcbSmrgAC_REQUIRE([_LT_DECL_SED]) 108642b2b4fcbSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 108652b2b4fcbSmrgfunc_stripname_cnf () 108662b2b4fcbSmrg{ 108672b2b4fcbSmrg case @S|@2 in 108682b2b4fcbSmrg .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; 108692b2b4fcbSmrg *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; 108702b2b4fcbSmrg esac 108712b2b4fcbSmrg} # func_stripname_cnf 108722b2b4fcbSmrg])# _LT_FUNC_STRIPNAME_CNF 10873aa9e3350Smrg 10874aa9e3350Smrg 108752b2b4fcbSmrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 108762b2b4fcbSmrg# --------------------------------- 108772b2b4fcbSmrg# Figure out "hidden" library dependencies from verbose 108782b2b4fcbSmrg# compiler output when linking a shared library. 108792b2b4fcbSmrg# Parse the compiler output and extract the necessary 108802b2b4fcbSmrg# objects, libraries and library flags. 108812b2b4fcbSmrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 108822b2b4fcbSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 108832b2b4fcbSmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 108842b2b4fcbSmrg# Dependencies to place before and after the object being linked: 108852b2b4fcbSmrg_LT_TAGVAR(predep_objects, $1)= 108862b2b4fcbSmrg_LT_TAGVAR(postdep_objects, $1)= 108872b2b4fcbSmrg_LT_TAGVAR(predeps, $1)= 108882b2b4fcbSmrg_LT_TAGVAR(postdeps, $1)= 108892b2b4fcbSmrg_LT_TAGVAR(compiler_lib_search_path, $1)= 10890aa9e3350Smrg 108912b2b4fcbSmrgdnl we can't use the lt_simple_compile_test_code here, 108922b2b4fcbSmrgdnl because it contains code intended for an executable, 108932b2b4fcbSmrgdnl not a library. It's possible we should let each 108942b2b4fcbSmrgdnl tag define a new lt_????_link_test_code variable, 108952b2b4fcbSmrgdnl but it's only used here... 108962b2b4fcbSmrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 108972b2b4fcbSmrgint a; 108982b2b4fcbSmrgvoid foo (void) { a = 0; } 108992b2b4fcbSmrg_LT_EOF 109002b2b4fcbSmrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 109012b2b4fcbSmrgclass Foo 109022b2b4fcbSmrg{ 109032b2b4fcbSmrgpublic: 109042b2b4fcbSmrg Foo (void) { a = 0; } 109052b2b4fcbSmrgprivate: 109062b2b4fcbSmrg int a; 109072b2b4fcbSmrg}; 109082b2b4fcbSmrg_LT_EOF 109092b2b4fcbSmrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 109102b2b4fcbSmrg subroutine foo 109112b2b4fcbSmrg implicit none 109122b2b4fcbSmrg integer*4 a 109132b2b4fcbSmrg a=0 109142b2b4fcbSmrg return 109152b2b4fcbSmrg end 109162b2b4fcbSmrg_LT_EOF 109172b2b4fcbSmrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 109182b2b4fcbSmrg subroutine foo 109192b2b4fcbSmrg implicit none 109202b2b4fcbSmrg integer a 109212b2b4fcbSmrg a=0 109222b2b4fcbSmrg return 109232b2b4fcbSmrg end 109242b2b4fcbSmrg_LT_EOF 109252b2b4fcbSmrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 109262b2b4fcbSmrgpublic class foo { 109272b2b4fcbSmrg private int a; 109282b2b4fcbSmrg public void bar (void) { 109292b2b4fcbSmrg a = 0; 109302b2b4fcbSmrg } 109312b2b4fcbSmrg}; 109322b2b4fcbSmrg_LT_EOF 109332b2b4fcbSmrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 109342b2b4fcbSmrgpackage foo 109352b2b4fcbSmrgfunc foo() { 109362b2b4fcbSmrg} 109372b2b4fcbSmrg_LT_EOF 109382b2b4fcbSmrg]) 10939aa9e3350Smrg 109402b2b4fcbSmrg_lt_libdeps_save_CFLAGS=$CFLAGS 109412b2b4fcbSmrgcase "$CC $CFLAGS " in #( 109422b2b4fcbSmrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 109432b2b4fcbSmrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 109442b2b4fcbSmrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 109452b2b4fcbSmrgesac 10946aa9e3350Smrg 109472b2b4fcbSmrgdnl Parse the compiler output and extract the necessary 109482b2b4fcbSmrgdnl objects, libraries and library flags. 109492b2b4fcbSmrgif AC_TRY_EVAL(ac_compile); then 109502b2b4fcbSmrg # Parse the compiler output and extract the necessary 109512b2b4fcbSmrg # objects, libraries and library flags. 10952aa9e3350Smrg 109532b2b4fcbSmrg # Sentinel used to keep track of whether or not we are before 109542b2b4fcbSmrg # the conftest object file. 109552b2b4fcbSmrg pre_test_object_deps_done=no 109562b2b4fcbSmrg 109572b2b4fcbSmrg for p in `eval "$output_verbose_link_cmd"`; do 109582b2b4fcbSmrg case $prev$p in 109592b2b4fcbSmrg 109602b2b4fcbSmrg -L* | -R* | -l*) 109612b2b4fcbSmrg # Some compilers place space between "-{L,R}" and the path. 109622b2b4fcbSmrg # Remove the space. 109632b2b4fcbSmrg if test x-L = "$p" || 109642b2b4fcbSmrg test x-R = "$p"; then 109652b2b4fcbSmrg prev=$p 109662b2b4fcbSmrg continue 109672b2b4fcbSmrg fi 109682b2b4fcbSmrg 109692b2b4fcbSmrg # Expand the sysroot to ease extracting the directories later. 109702b2b4fcbSmrg if test -z "$prev"; then 109712b2b4fcbSmrg case $p in 109722b2b4fcbSmrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 109732b2b4fcbSmrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 109742b2b4fcbSmrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 109752b2b4fcbSmrg esac 109762b2b4fcbSmrg fi 109772b2b4fcbSmrg case $p in 109782b2b4fcbSmrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 109792b2b4fcbSmrg esac 109802b2b4fcbSmrg if test no = "$pre_test_object_deps_done"; then 109812b2b4fcbSmrg case $prev in 109822b2b4fcbSmrg -L | -R) 109832b2b4fcbSmrg # Internal compiler library paths should come after those 109842b2b4fcbSmrg # provided the user. The postdeps already come after the 109852b2b4fcbSmrg # user supplied libs so there is no need to process them. 109862b2b4fcbSmrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 109872b2b4fcbSmrg _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p 109882b2b4fcbSmrg else 109892b2b4fcbSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" 109902b2b4fcbSmrg fi 109912b2b4fcbSmrg ;; 109922b2b4fcbSmrg # The "-l" case would never come before the object being 109932b2b4fcbSmrg # linked, so don't bother handling this case. 109942b2b4fcbSmrg esac 109952b2b4fcbSmrg else 109962b2b4fcbSmrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 109972b2b4fcbSmrg _LT_TAGVAR(postdeps, $1)=$prev$p 109982b2b4fcbSmrg else 109992b2b4fcbSmrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" 110002b2b4fcbSmrg fi 110012b2b4fcbSmrg fi 110022b2b4fcbSmrg prev= 110032b2b4fcbSmrg ;; 110042b2b4fcbSmrg 110052b2b4fcbSmrg *.lto.$objext) ;; # Ignore GCC LTO objects 110062b2b4fcbSmrg *.$objext) 110072b2b4fcbSmrg # This assumes that the test object file only shows up 110082b2b4fcbSmrg # once in the compiler output. 110092b2b4fcbSmrg if test "$p" = "conftest.$objext"; then 110102b2b4fcbSmrg pre_test_object_deps_done=yes 110112b2b4fcbSmrg continue 110122b2b4fcbSmrg fi 110132b2b4fcbSmrg 110142b2b4fcbSmrg if test no = "$pre_test_object_deps_done"; then 110152b2b4fcbSmrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 110162b2b4fcbSmrg _LT_TAGVAR(predep_objects, $1)=$p 110172b2b4fcbSmrg else 110182b2b4fcbSmrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 110192b2b4fcbSmrg fi 110202b2b4fcbSmrg else 110212b2b4fcbSmrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 110222b2b4fcbSmrg _LT_TAGVAR(postdep_objects, $1)=$p 110232b2b4fcbSmrg else 110242b2b4fcbSmrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 110252b2b4fcbSmrg fi 110262b2b4fcbSmrg fi 110272b2b4fcbSmrg ;; 11028aa9e3350Smrg 110292b2b4fcbSmrg *) ;; # Ignore the rest. 110302b2b4fcbSmrg 110312b2b4fcbSmrg esac 110322b2b4fcbSmrg done 110332b2b4fcbSmrg 110342b2b4fcbSmrg # Clean up. 110352b2b4fcbSmrg rm -f a.out a.exe 11036aa9e3350Smrgelse 110372b2b4fcbSmrg echo "libtool.m4: error: problem compiling $1 test program" 11038aa9e3350Smrgfi 11039aa9e3350Smrg 110402b2b4fcbSmrg$RM -f confest.$objext 110412b2b4fcbSmrgCFLAGS=$_lt_libdeps_save_CFLAGS 11042aa9e3350Smrg 110432b2b4fcbSmrg# PORTME: override above test on systems where it is broken 110442b2b4fcbSmrgm4_if([$1], [CXX], 110452b2b4fcbSmrg[case $host_os in 110462b2b4fcbSmrginterix[[3-9]]*) 110472b2b4fcbSmrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 110482b2b4fcbSmrg # hack all around it, let's just trust "g++" to DTRT. 110492b2b4fcbSmrg _LT_TAGVAR(predep_objects,$1)= 110502b2b4fcbSmrg _LT_TAGVAR(postdep_objects,$1)= 110512b2b4fcbSmrg _LT_TAGVAR(postdeps,$1)= 110522b2b4fcbSmrg ;; 110532b2b4fcbSmrgesac 110542b2b4fcbSmrg]) 11055aa9e3350Smrg 110562b2b4fcbSmrgcase " $_LT_TAGVAR(postdeps, $1) " in 110572b2b4fcbSmrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 11058aa9e3350Smrgesac 110592b2b4fcbSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 110602b2b4fcbSmrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 110612b2b4fcbSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` 110622b2b4fcbSmrgfi 110632b2b4fcbSmrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 110642b2b4fcbSmrg [The directories searched by this compiler when creating a shared library]) 110652b2b4fcbSmrg_LT_TAGDECL([], [predep_objects], [1], 110662b2b4fcbSmrg [Dependencies to place before and after the objects being linked to 110672b2b4fcbSmrg create a shared library]) 110682b2b4fcbSmrg_LT_TAGDECL([], [postdep_objects], [1]) 110692b2b4fcbSmrg_LT_TAGDECL([], [predeps], [1]) 110702b2b4fcbSmrg_LT_TAGDECL([], [postdeps], [1]) 110712b2b4fcbSmrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 110722b2b4fcbSmrg [The library search path used internally by the compiler when linking 110732b2b4fcbSmrg a shared library]) 110742b2b4fcbSmrg])# _LT_SYS_HIDDEN_LIBDEPS 11075aa9e3350Smrg 110762b2b4fcbSmrg 110772b2b4fcbSmrg# _LT_LANG_F77_CONFIG([TAG]) 110782b2b4fcbSmrg# -------------------------- 110792b2b4fcbSmrg# Ensure that the configuration variables for a Fortran 77 compiler are 110802b2b4fcbSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 110812b2b4fcbSmrg# to write the compiler configuration to 'libtool'. 110822b2b4fcbSmrgm4_defun([_LT_LANG_F77_CONFIG], 110832b2b4fcbSmrg[AC_LANG_PUSH(Fortran 77) 110842b2b4fcbSmrgif test -z "$F77" || test no = "$F77"; then 110852b2b4fcbSmrg _lt_disable_F77=yes 11086aa9e3350Smrgfi 11087aa9e3350Smrg 110882b2b4fcbSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 110892b2b4fcbSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 110902b2b4fcbSmrg_LT_TAGVAR(always_export_symbols, $1)=no 110912b2b4fcbSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 110922b2b4fcbSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 110932b2b4fcbSmrg_LT_TAGVAR(hardcode_direct, $1)=no 110942b2b4fcbSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 110952b2b4fcbSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 110962b2b4fcbSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 110972b2b4fcbSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 110982b2b4fcbSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 110992b2b4fcbSmrg_LT_TAGVAR(inherit_rpath, $1)=no 111002b2b4fcbSmrg_LT_TAGVAR(module_cmds, $1)= 111012b2b4fcbSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 111022b2b4fcbSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 111032b2b4fcbSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 111042b2b4fcbSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 111052b2b4fcbSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 111062b2b4fcbSmrg_LT_TAGVAR(no_undefined_flag, $1)= 111072b2b4fcbSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 111082b2b4fcbSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 11109aa9e3350Smrg 111102b2b4fcbSmrg# Source file extension for f77 test sources. 111112b2b4fcbSmrgac_ext=f 11112ab47cfaaSmrg 111132b2b4fcbSmrg# Object file extension for compiled f77 test sources. 111142b2b4fcbSmrgobjext=o 111152b2b4fcbSmrg_LT_TAGVAR(objext, $1)=$objext 111168697ee19Smrg 111172b2b4fcbSmrg# No sense in running all these tests if we already determined that 111182b2b4fcbSmrg# the F77 compiler isn't working. Some variables (like enable_shared) 111192b2b4fcbSmrg# are currently assumed to apply to all compilers on this platform, 111202b2b4fcbSmrg# and will be corrupted by setting them based on a non-working compiler. 111212b2b4fcbSmrgif test yes != "$_lt_disable_F77"; then 111222b2b4fcbSmrg # Code to be used in simple compile tests 111232b2b4fcbSmrg lt_simple_compile_test_code="\ 111242b2b4fcbSmrg subroutine t 111252b2b4fcbSmrg return 111262b2b4fcbSmrg end 111272b2b4fcbSmrg" 111282b2b4fcbSmrg 111292b2b4fcbSmrg # Code to be used in simple link tests 111302b2b4fcbSmrg lt_simple_link_test_code="\ 111312b2b4fcbSmrg program t 111322b2b4fcbSmrg end 111332b2b4fcbSmrg" 111342b2b4fcbSmrg 111352b2b4fcbSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 111362b2b4fcbSmrg _LT_TAG_COMPILER 111372b2b4fcbSmrg 111382b2b4fcbSmrg # save warnings/boilerplate of simple test code 111392b2b4fcbSmrg _LT_COMPILER_BOILERPLATE 111402b2b4fcbSmrg _LT_LINKER_BOILERPLATE 111412b2b4fcbSmrg 111422b2b4fcbSmrg # Allow CC to be a program name with arguments. 111432b2b4fcbSmrg lt_save_CC=$CC 111442b2b4fcbSmrg lt_save_GCC=$GCC 111452b2b4fcbSmrg lt_save_CFLAGS=$CFLAGS 111462b2b4fcbSmrg CC=${F77-"f77"} 111472b2b4fcbSmrg CFLAGS=$FFLAGS 111482b2b4fcbSmrg compiler=$CC 111492b2b4fcbSmrg _LT_TAGVAR(compiler, $1)=$CC 111502b2b4fcbSmrg _LT_CC_BASENAME([$compiler]) 111512b2b4fcbSmrg GCC=$G77 111522b2b4fcbSmrg if test -n "$compiler"; then 111532b2b4fcbSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 111542b2b4fcbSmrg AC_MSG_RESULT([$can_build_shared]) 11155ab47cfaaSmrg 111562b2b4fcbSmrg AC_MSG_CHECKING([whether to build shared libraries]) 111572b2b4fcbSmrg test no = "$can_build_shared" && enable_shared=no 11158ab47cfaaSmrg 111592b2b4fcbSmrg # On AIX, shared libraries and static libraries use the same namespace, and 111602b2b4fcbSmrg # are all built from PIC. 111612b2b4fcbSmrg case $host_os in 111622b2b4fcbSmrg aix3*) 111632b2b4fcbSmrg test yes = "$enable_shared" && enable_static=no 111642b2b4fcbSmrg if test -n "$RANLIB"; then 111652b2b4fcbSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 111662b2b4fcbSmrg postinstall_cmds='$RANLIB $lib' 111672b2b4fcbSmrg fi 111682b2b4fcbSmrg ;; 111692b2b4fcbSmrg aix[[4-9]]*) 111702b2b4fcbSmrg if test ia64 != "$host_cpu"; then 111712b2b4fcbSmrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 111722b2b4fcbSmrg yes,aix,yes) ;; # shared object as lib.so file only 111732b2b4fcbSmrg yes,svr4,*) ;; # shared object as lib.so archive member only 111742b2b4fcbSmrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 111752b2b4fcbSmrg esac 111762b2b4fcbSmrg fi 111772b2b4fcbSmrg ;; 111782b2b4fcbSmrg esac 111792b2b4fcbSmrg AC_MSG_RESULT([$enable_shared]) 11180ab47cfaaSmrg 111812b2b4fcbSmrg AC_MSG_CHECKING([whether to build static libraries]) 111822b2b4fcbSmrg # Make sure either enable_shared or enable_static is yes. 111832b2b4fcbSmrg test yes = "$enable_shared" || enable_static=yes 111842b2b4fcbSmrg AC_MSG_RESULT([$enable_static]) 111856aec45a7Smrg 111862b2b4fcbSmrg _LT_TAGVAR(GCC, $1)=$G77 111872b2b4fcbSmrg _LT_TAGVAR(LD, $1)=$LD 111886aec45a7Smrg 111892b2b4fcbSmrg ## CAVEAT EMPTOR: 111902b2b4fcbSmrg ## There is no encapsulation within the following macros, do not change 111912b2b4fcbSmrg ## the running order or otherwise move them around unless you know exactly 111922b2b4fcbSmrg ## what you are doing... 111932b2b4fcbSmrg _LT_COMPILER_PIC($1) 111942b2b4fcbSmrg _LT_COMPILER_C_O($1) 111952b2b4fcbSmrg _LT_COMPILER_FILE_LOCKS($1) 111962b2b4fcbSmrg _LT_LINKER_SHLIBS($1) 111972b2b4fcbSmrg _LT_SYS_DYNAMIC_LINKER($1) 111982b2b4fcbSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 111996aec45a7Smrg 112002b2b4fcbSmrg _LT_CONFIG($1) 112012b2b4fcbSmrg fi # test -n "$compiler" 11202ab47cfaaSmrg 112032b2b4fcbSmrg GCC=$lt_save_GCC 112042b2b4fcbSmrg CC=$lt_save_CC 112052b2b4fcbSmrg CFLAGS=$lt_save_CFLAGS 112062b2b4fcbSmrgfi # test yes != "$_lt_disable_F77" 11207ab47cfaaSmrg 112082b2b4fcbSmrgAC_LANG_POP 112092b2b4fcbSmrg])# _LT_LANG_F77_CONFIG 112108697ee19Smrg 112118697ee19Smrg 112122b2b4fcbSmrg# _LT_LANG_FC_CONFIG([TAG]) 112132b2b4fcbSmrg# ------------------------- 112142b2b4fcbSmrg# Ensure that the configuration variables for a Fortran compiler are 112152b2b4fcbSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 112162b2b4fcbSmrg# to write the compiler configuration to 'libtool'. 112172b2b4fcbSmrgm4_defun([_LT_LANG_FC_CONFIG], 112182b2b4fcbSmrg[AC_LANG_PUSH(Fortran) 112196aec45a7Smrg 112202b2b4fcbSmrgif test -z "$FC" || test no = "$FC"; then 112212b2b4fcbSmrg _lt_disable_FC=yes 11222ab47cfaaSmrgfi 112236aec45a7Smrg 112242b2b4fcbSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 112252b2b4fcbSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 112262b2b4fcbSmrg_LT_TAGVAR(always_export_symbols, $1)=no 112272b2b4fcbSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 112282b2b4fcbSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 112292b2b4fcbSmrg_LT_TAGVAR(hardcode_direct, $1)=no 112302b2b4fcbSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 112312b2b4fcbSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 112322b2b4fcbSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 112332b2b4fcbSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 112342b2b4fcbSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 112352b2b4fcbSmrg_LT_TAGVAR(inherit_rpath, $1)=no 112362b2b4fcbSmrg_LT_TAGVAR(module_cmds, $1)= 112372b2b4fcbSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 112382b2b4fcbSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 112392b2b4fcbSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 112402b2b4fcbSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 112412b2b4fcbSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 112422b2b4fcbSmrg_LT_TAGVAR(no_undefined_flag, $1)= 112432b2b4fcbSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 112442b2b4fcbSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 11245ab47cfaaSmrg 112462b2b4fcbSmrg# Source file extension for fc test sources. 112472b2b4fcbSmrgac_ext=${ac_fc_srcext-f} 11248ab47cfaaSmrg 112492b2b4fcbSmrg# Object file extension for compiled fc test sources. 112502b2b4fcbSmrgobjext=o 112512b2b4fcbSmrg_LT_TAGVAR(objext, $1)=$objext 11252aa9e3350Smrg 112532b2b4fcbSmrg# No sense in running all these tests if we already determined that 112542b2b4fcbSmrg# the FC compiler isn't working. Some variables (like enable_shared) 112552b2b4fcbSmrg# are currently assumed to apply to all compilers on this platform, 112562b2b4fcbSmrg# and will be corrupted by setting them based on a non-working compiler. 112572b2b4fcbSmrgif test yes != "$_lt_disable_FC"; then 112582b2b4fcbSmrg # Code to be used in simple compile tests 112592b2b4fcbSmrg lt_simple_compile_test_code="\ 112602b2b4fcbSmrg subroutine t 112612b2b4fcbSmrg return 112622b2b4fcbSmrg end 112632b2b4fcbSmrg" 11264aa9e3350Smrg 112652b2b4fcbSmrg # Code to be used in simple link tests 112662b2b4fcbSmrg lt_simple_link_test_code="\ 112672b2b4fcbSmrg program t 112682b2b4fcbSmrg end 112692b2b4fcbSmrg" 112702b2b4fcbSmrg 112712b2b4fcbSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 112722b2b4fcbSmrg _LT_TAG_COMPILER 112732b2b4fcbSmrg 112742b2b4fcbSmrg # save warnings/boilerplate of simple test code 112752b2b4fcbSmrg _LT_COMPILER_BOILERPLATE 112762b2b4fcbSmrg _LT_LINKER_BOILERPLATE 112772b2b4fcbSmrg 112782b2b4fcbSmrg # Allow CC to be a program name with arguments. 112792b2b4fcbSmrg lt_save_CC=$CC 112802b2b4fcbSmrg lt_save_GCC=$GCC 112812b2b4fcbSmrg lt_save_CFLAGS=$CFLAGS 112822b2b4fcbSmrg CC=${FC-"f95"} 112832b2b4fcbSmrg CFLAGS=$FCFLAGS 112842b2b4fcbSmrg compiler=$CC 112852b2b4fcbSmrg GCC=$ac_cv_fc_compiler_gnu 11286aa9e3350Smrg 112872b2b4fcbSmrg _LT_TAGVAR(compiler, $1)=$CC 112882b2b4fcbSmrg _LT_CC_BASENAME([$compiler]) 11289aa9e3350Smrg 112902b2b4fcbSmrg if test -n "$compiler"; then 112912b2b4fcbSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 112922b2b4fcbSmrg AC_MSG_RESULT([$can_build_shared]) 11293aa9e3350Smrg 112942b2b4fcbSmrg AC_MSG_CHECKING([whether to build shared libraries]) 112952b2b4fcbSmrg test no = "$can_build_shared" && enable_shared=no 11296aa9e3350Smrg 112972b2b4fcbSmrg # On AIX, shared libraries and static libraries use the same namespace, and 112982b2b4fcbSmrg # are all built from PIC. 112992b2b4fcbSmrg case $host_os in 113002b2b4fcbSmrg aix3*) 113012b2b4fcbSmrg test yes = "$enable_shared" && enable_static=no 113022b2b4fcbSmrg if test -n "$RANLIB"; then 113032b2b4fcbSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 113042b2b4fcbSmrg postinstall_cmds='$RANLIB $lib' 113052b2b4fcbSmrg fi 113062b2b4fcbSmrg ;; 113072b2b4fcbSmrg aix[[4-9]]*) 113082b2b4fcbSmrg if test ia64 != "$host_cpu"; then 113092b2b4fcbSmrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 113102b2b4fcbSmrg yes,aix,yes) ;; # shared object as lib.so file only 113112b2b4fcbSmrg yes,svr4,*) ;; # shared object as lib.so archive member only 113122b2b4fcbSmrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 113132b2b4fcbSmrg esac 11314aa9e3350Smrg fi 113152b2b4fcbSmrg ;; 113162b2b4fcbSmrg esac 113172b2b4fcbSmrg AC_MSG_RESULT([$enable_shared]) 11318aa9e3350Smrg 113192b2b4fcbSmrg AC_MSG_CHECKING([whether to build static libraries]) 113202b2b4fcbSmrg # Make sure either enable_shared or enable_static is yes. 113212b2b4fcbSmrg test yes = "$enable_shared" || enable_static=yes 113222b2b4fcbSmrg AC_MSG_RESULT([$enable_static]) 11323aa9e3350Smrg 113242b2b4fcbSmrg _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu 113252b2b4fcbSmrg _LT_TAGVAR(LD, $1)=$LD 11326aa9e3350Smrg 113272b2b4fcbSmrg ## CAVEAT EMPTOR: 113282b2b4fcbSmrg ## There is no encapsulation within the following macros, do not change 113292b2b4fcbSmrg ## the running order or otherwise move them around unless you know exactly 113302b2b4fcbSmrg ## what you are doing... 113312b2b4fcbSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 113322b2b4fcbSmrg _LT_COMPILER_PIC($1) 113332b2b4fcbSmrg _LT_COMPILER_C_O($1) 113342b2b4fcbSmrg _LT_COMPILER_FILE_LOCKS($1) 113352b2b4fcbSmrg _LT_LINKER_SHLIBS($1) 113362b2b4fcbSmrg _LT_SYS_DYNAMIC_LINKER($1) 113372b2b4fcbSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 11338aa9e3350Smrg 113392b2b4fcbSmrg _LT_CONFIG($1) 113402b2b4fcbSmrg fi # test -n "$compiler" 11341aa9e3350Smrg 113422b2b4fcbSmrg GCC=$lt_save_GCC 113432b2b4fcbSmrg CC=$lt_save_CC 113442b2b4fcbSmrg CFLAGS=$lt_save_CFLAGS 113452b2b4fcbSmrgfi # test yes != "$_lt_disable_FC" 11346aa9e3350Smrg 113472b2b4fcbSmrgAC_LANG_POP 113482b2b4fcbSmrg])# _LT_LANG_FC_CONFIG 11349aa9e3350Smrg 11350aa9e3350Smrg 113512b2b4fcbSmrg# _LT_LANG_GCJ_CONFIG([TAG]) 113522b2b4fcbSmrg# -------------------------- 113532b2b4fcbSmrg# Ensure that the configuration variables for the GNU Java Compiler compiler 113542b2b4fcbSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 113552b2b4fcbSmrg# to write the compiler configuration to 'libtool'. 113562b2b4fcbSmrgm4_defun([_LT_LANG_GCJ_CONFIG], 113572b2b4fcbSmrg[AC_REQUIRE([LT_PROG_GCJ])dnl 113582b2b4fcbSmrgAC_LANG_SAVE 11359aa9e3350Smrg 113602b2b4fcbSmrg# Source file extension for Java test sources. 113612b2b4fcbSmrgac_ext=java 11362aa9e3350Smrg 113632b2b4fcbSmrg# Object file extension for compiled Java test sources. 113642b2b4fcbSmrgobjext=o 113652b2b4fcbSmrg_LT_TAGVAR(objext, $1)=$objext 11366aa9e3350Smrg 113672b2b4fcbSmrg# Code to be used in simple compile tests 113682b2b4fcbSmrglt_simple_compile_test_code="class foo {}" 11369aa9e3350Smrg 113702b2b4fcbSmrg# Code to be used in simple link tests 113712b2b4fcbSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 11372aa9e3350Smrg 113732b2b4fcbSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 113742b2b4fcbSmrg_LT_TAG_COMPILER 11375aa9e3350Smrg 113762b2b4fcbSmrg# save warnings/boilerplate of simple test code 113772b2b4fcbSmrg_LT_COMPILER_BOILERPLATE 113782b2b4fcbSmrg_LT_LINKER_BOILERPLATE 11379aa9e3350Smrg 113802b2b4fcbSmrg# Allow CC to be a program name with arguments. 113812b2b4fcbSmrglt_save_CC=$CC 113822b2b4fcbSmrglt_save_CFLAGS=$CFLAGS 113832b2b4fcbSmrglt_save_GCC=$GCC 113842b2b4fcbSmrgGCC=yes 113852b2b4fcbSmrgCC=${GCJ-"gcj"} 113862b2b4fcbSmrgCFLAGS=$GCJFLAGS 113872b2b4fcbSmrgcompiler=$CC 113882b2b4fcbSmrg_LT_TAGVAR(compiler, $1)=$CC 113892b2b4fcbSmrg_LT_TAGVAR(LD, $1)=$LD 113902b2b4fcbSmrg_LT_CC_BASENAME([$compiler]) 113912b2b4fcbSmrg 113922b2b4fcbSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 113932b2b4fcbSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 113942b2b4fcbSmrg 113952b2b4fcbSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 113962b2b4fcbSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 113972b2b4fcbSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 113982b2b4fcbSmrg 113992b2b4fcbSmrgif test -n "$compiler"; then 114002b2b4fcbSmrg _LT_COMPILER_NO_RTTI($1) 114012b2b4fcbSmrg _LT_COMPILER_PIC($1) 114022b2b4fcbSmrg _LT_COMPILER_C_O($1) 114032b2b4fcbSmrg _LT_COMPILER_FILE_LOCKS($1) 114042b2b4fcbSmrg _LT_LINKER_SHLIBS($1) 114052b2b4fcbSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 114062b2b4fcbSmrg 114072b2b4fcbSmrg _LT_CONFIG($1) 11408aa9e3350Smrgfi 11409aa9e3350Smrg 114102b2b4fcbSmrgAC_LANG_RESTORE 11411aa9e3350Smrg 114122b2b4fcbSmrgGCC=$lt_save_GCC 114132b2b4fcbSmrgCC=$lt_save_CC 114142b2b4fcbSmrgCFLAGS=$lt_save_CFLAGS 114152b2b4fcbSmrg])# _LT_LANG_GCJ_CONFIG 114166aec45a7Smrg 114176aec45a7Smrg 114182b2b4fcbSmrg# _LT_LANG_GO_CONFIG([TAG]) 114192b2b4fcbSmrg# -------------------------- 114202b2b4fcbSmrg# Ensure that the configuration variables for the GNU Go compiler 114212b2b4fcbSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 114222b2b4fcbSmrg# to write the compiler configuration to 'libtool'. 114232b2b4fcbSmrgm4_defun([_LT_LANG_GO_CONFIG], 114242b2b4fcbSmrg[AC_REQUIRE([LT_PROG_GO])dnl 114252b2b4fcbSmrgAC_LANG_SAVE 11426aa9e3350Smrg 114272b2b4fcbSmrg# Source file extension for Go test sources. 114282b2b4fcbSmrgac_ext=go 11429aa9e3350Smrg 114302b2b4fcbSmrg# Object file extension for compiled Go test sources. 114312b2b4fcbSmrgobjext=o 114322b2b4fcbSmrg_LT_TAGVAR(objext, $1)=$objext 11433aa9e3350Smrg 114342b2b4fcbSmrg# Code to be used in simple compile tests 114352b2b4fcbSmrglt_simple_compile_test_code="package main; func main() { }" 11436aa9e3350Smrg 114372b2b4fcbSmrg# Code to be used in simple link tests 114382b2b4fcbSmrglt_simple_link_test_code='package main; func main() { }' 114396aec45a7Smrg 114402b2b4fcbSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 114412b2b4fcbSmrg_LT_TAG_COMPILER 114426aec45a7Smrg 114432b2b4fcbSmrg# save warnings/boilerplate of simple test code 114442b2b4fcbSmrg_LT_COMPILER_BOILERPLATE 114452b2b4fcbSmrg_LT_LINKER_BOILERPLATE 11446ab47cfaaSmrg 114472b2b4fcbSmrg# Allow CC to be a program name with arguments. 114482b2b4fcbSmrglt_save_CC=$CC 114492b2b4fcbSmrglt_save_CFLAGS=$CFLAGS 114502b2b4fcbSmrglt_save_GCC=$GCC 114512b2b4fcbSmrgGCC=yes 114522b2b4fcbSmrgCC=${GOC-"gccgo"} 114532b2b4fcbSmrgCFLAGS=$GOFLAGS 114542b2b4fcbSmrgcompiler=$CC 114552b2b4fcbSmrg_LT_TAGVAR(compiler, $1)=$CC 114562b2b4fcbSmrg_LT_TAGVAR(LD, $1)=$LD 114572b2b4fcbSmrg_LT_CC_BASENAME([$compiler]) 114581e449e82Smrg 114592b2b4fcbSmrg# Go did not exist at the time GCC didn't implicitly link libc in. 114602b2b4fcbSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 11461ab47cfaaSmrg 114622b2b4fcbSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 114632b2b4fcbSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 114642b2b4fcbSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 114651473d951Smrg 114662b2b4fcbSmrgif test -n "$compiler"; then 114672b2b4fcbSmrg _LT_COMPILER_NO_RTTI($1) 114682b2b4fcbSmrg _LT_COMPILER_PIC($1) 114692b2b4fcbSmrg _LT_COMPILER_C_O($1) 114702b2b4fcbSmrg _LT_COMPILER_FILE_LOCKS($1) 114712b2b4fcbSmrg _LT_LINKER_SHLIBS($1) 114722b2b4fcbSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 114732b2b4fcbSmrg 114742b2b4fcbSmrg _LT_CONFIG($1) 114752b2b4fcbSmrgfi 114762b2b4fcbSmrg 114772b2b4fcbSmrgAC_LANG_RESTORE 114782b2b4fcbSmrg 114792b2b4fcbSmrgGCC=$lt_save_GCC 114802b2b4fcbSmrgCC=$lt_save_CC 114812b2b4fcbSmrgCFLAGS=$lt_save_CFLAGS 114822b2b4fcbSmrg])# _LT_LANG_GO_CONFIG 114832b2b4fcbSmrg 114842b2b4fcbSmrg 114852b2b4fcbSmrg# _LT_LANG_RC_CONFIG([TAG]) 114862b2b4fcbSmrg# ------------------------- 114872b2b4fcbSmrg# Ensure that the configuration variables for the Windows resource compiler 114882b2b4fcbSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 114892b2b4fcbSmrg# to write the compiler configuration to 'libtool'. 114902b2b4fcbSmrgm4_defun([_LT_LANG_RC_CONFIG], 114912b2b4fcbSmrg[AC_REQUIRE([LT_PROG_RC])dnl 114922b2b4fcbSmrgAC_LANG_SAVE 114932b2b4fcbSmrg 114942b2b4fcbSmrg# Source file extension for RC test sources. 114952b2b4fcbSmrgac_ext=rc 114961473d951Smrg 114972b2b4fcbSmrg# Object file extension for compiled RC test sources. 114982b2b4fcbSmrgobjext=o 114992b2b4fcbSmrg_LT_TAGVAR(objext, $1)=$objext 115001473d951Smrg 115012b2b4fcbSmrg# Code to be used in simple compile tests 115022b2b4fcbSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 115031473d951Smrg 115042b2b4fcbSmrg# Code to be used in simple link tests 115052b2b4fcbSmrglt_simple_link_test_code=$lt_simple_compile_test_code 11506ab47cfaaSmrg 115072b2b4fcbSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 115082b2b4fcbSmrg_LT_TAG_COMPILER 11509ab47cfaaSmrg 115102b2b4fcbSmrg# save warnings/boilerplate of simple test code 115112b2b4fcbSmrg_LT_COMPILER_BOILERPLATE 115122b2b4fcbSmrg_LT_LINKER_BOILERPLATE 11513ab47cfaaSmrg 115142b2b4fcbSmrg# Allow CC to be a program name with arguments. 115152b2b4fcbSmrglt_save_CC=$CC 115162b2b4fcbSmrglt_save_CFLAGS=$CFLAGS 115172b2b4fcbSmrglt_save_GCC=$GCC 115182b2b4fcbSmrgGCC= 115192b2b4fcbSmrgCC=${RC-"windres"} 115202b2b4fcbSmrgCFLAGS= 115212b2b4fcbSmrgcompiler=$CC 115222b2b4fcbSmrg_LT_TAGVAR(compiler, $1)=$CC 115232b2b4fcbSmrg_LT_CC_BASENAME([$compiler]) 115242b2b4fcbSmrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 11525ab47cfaaSmrg 115262b2b4fcbSmrgif test -n "$compiler"; then 115272b2b4fcbSmrg : 115282b2b4fcbSmrg _LT_CONFIG($1) 115292b2b4fcbSmrgfi 11530ab47cfaaSmrg 115312b2b4fcbSmrgGCC=$lt_save_GCC 115322b2b4fcbSmrgAC_LANG_RESTORE 115332b2b4fcbSmrgCC=$lt_save_CC 115342b2b4fcbSmrgCFLAGS=$lt_save_CFLAGS 115352b2b4fcbSmrg])# _LT_LANG_RC_CONFIG 11536ab47cfaaSmrg 11537ab47cfaaSmrg 115382b2b4fcbSmrg# LT_PROG_GCJ 115392b2b4fcbSmrg# ----------- 115402b2b4fcbSmrgAC_DEFUN([LT_PROG_GCJ], 115412b2b4fcbSmrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 115422b2b4fcbSmrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 115432b2b4fcbSmrg [AC_CHECK_TOOL(GCJ, gcj,) 115442b2b4fcbSmrg test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" 115452b2b4fcbSmrg AC_SUBST(GCJFLAGS)])])[]dnl 115468697ee19Smrg]) 11547ab47cfaaSmrg 115482b2b4fcbSmrg# Old name: 115492b2b4fcbSmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 115502b2b4fcbSmrgdnl aclocal-1.4 backwards compatibility: 115512b2b4fcbSmrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 115528697ee19Smrg 11553ab47cfaaSmrg 115542b2b4fcbSmrg# LT_PROG_GO 115552b2b4fcbSmrg# ---------- 115562b2b4fcbSmrgAC_DEFUN([LT_PROG_GO], 115572b2b4fcbSmrg[AC_CHECK_TOOL(GOC, gccgo,) 115582b2b4fcbSmrg]) 115598697ee19Smrg 115608697ee19Smrg 115612b2b4fcbSmrg# LT_PROG_RC 115622b2b4fcbSmrg# ---------- 115632b2b4fcbSmrgAC_DEFUN([LT_PROG_RC], 115642b2b4fcbSmrg[AC_CHECK_TOOL(RC, windres,) 115652b2b4fcbSmrg]) 115668697ee19Smrg 115672b2b4fcbSmrg# Old name: 115682b2b4fcbSmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 115692b2b4fcbSmrgdnl aclocal-1.4 backwards compatibility: 115702b2b4fcbSmrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 115718697ee19Smrg 115728697ee19Smrg 115732b2b4fcbSmrg# _LT_DECL_EGREP 115742b2b4fcbSmrg# -------------- 115752b2b4fcbSmrg# If we don't have a new enough Autoconf to choose the best grep 115762b2b4fcbSmrg# available, choose the one first in the user's PATH. 115772b2b4fcbSmrgm4_defun([_LT_DECL_EGREP], 115782b2b4fcbSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl 115792b2b4fcbSmrgAC_REQUIRE([AC_PROG_FGREP])dnl 115802b2b4fcbSmrgtest -z "$GREP" && GREP=grep 115812b2b4fcbSmrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 115822b2b4fcbSmrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 115832b2b4fcbSmrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 115842b2b4fcbSmrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 115852b2b4fcbSmrgAC_SUBST([GREP]) 115862b2b4fcbSmrg]) 11587ab47cfaaSmrg 11588ab47cfaaSmrg 115892b2b4fcbSmrg# _LT_DECL_OBJDUMP 115902b2b4fcbSmrg# -------------- 115912b2b4fcbSmrg# If we don't have a new enough Autoconf to choose the best objdump 115922b2b4fcbSmrg# available, choose the one first in the user's PATH. 115932b2b4fcbSmrgm4_defun([_LT_DECL_OBJDUMP], 115942b2b4fcbSmrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 115952b2b4fcbSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 115962b2b4fcbSmrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 115972b2b4fcbSmrgAC_SUBST([OBJDUMP]) 115982b2b4fcbSmrg]) 115998697ee19Smrg 116002b2b4fcbSmrg# _LT_DECL_DLLTOOL 116012b2b4fcbSmrg# ---------------- 116022b2b4fcbSmrg# Ensure DLLTOOL variable is set. 116032b2b4fcbSmrgm4_defun([_LT_DECL_DLLTOOL], 116042b2b4fcbSmrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 116052b2b4fcbSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 116062b2b4fcbSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 116072b2b4fcbSmrgAC_SUBST([DLLTOOL]) 116082b2b4fcbSmrg]) 116095c42550eSmrg 116102b2b4fcbSmrg# _LT_DECL_FILECMD 116112b2b4fcbSmrg# ---------------- 116122b2b4fcbSmrg# Check for a file(cmd) program that can be used to detect file type and magic 116132b2b4fcbSmrgm4_defun([_LT_DECL_FILECMD], 116142b2b4fcbSmrg[AC_CHECK_TOOL([FILECMD], [file], [:]) 116152b2b4fcbSmrg_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types]) 116162b2b4fcbSmrg])# _LD_DECL_FILECMD 11617ab47cfaaSmrg 116182b2b4fcbSmrg# _LT_DECL_SED 116192b2b4fcbSmrg# ------------ 116202b2b4fcbSmrg# Check for a fully-functional sed program, that truncates 116212b2b4fcbSmrg# as few characters as possible. Prefer GNU sed if found. 116222b2b4fcbSmrgm4_defun([_LT_DECL_SED], 116232b2b4fcbSmrg[AC_PROG_SED 116242b2b4fcbSmrgtest -z "$SED" && SED=sed 116252b2b4fcbSmrgXsed="$SED -e 1s/^X//" 116262b2b4fcbSmrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 116272b2b4fcbSmrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 116282b2b4fcbSmrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 116292b2b4fcbSmrg])# _LT_DECL_SED 116302b2b4fcbSmrg 116312b2b4fcbSmrgm4_ifndef([AC_PROG_SED], [ 116322b2b4fcbSmrg# NOTE: This macro has been submitted for inclusion into # 116332b2b4fcbSmrg# GNU Autoconf as AC_PROG_SED. When it is available in # 116342b2b4fcbSmrg# a released version of Autoconf we should remove this # 116352b2b4fcbSmrg# macro and use it instead. # 116362b2b4fcbSmrg 116372b2b4fcbSmrgm4_defun([AC_PROG_SED], 116382b2b4fcbSmrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 116392b2b4fcbSmrgAC_CACHE_VAL(lt_cv_path_SED, 116402b2b4fcbSmrg[# Loop through the user's path and test for sed and gsed. 116412b2b4fcbSmrg# Then use that list of sed's as ones to test for truncation. 116422b2b4fcbSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 116432b2b4fcbSmrgfor as_dir in $PATH 116442b2b4fcbSmrgdo 116452b2b4fcbSmrg IFS=$as_save_IFS 116462b2b4fcbSmrg test -z "$as_dir" && as_dir=. 116472b2b4fcbSmrg for lt_ac_prog in sed gsed; do 116482b2b4fcbSmrg for ac_exec_ext in '' $ac_executable_extensions; do 116492b2b4fcbSmrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 116502b2b4fcbSmrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 116518697ee19Smrg fi 116522b2b4fcbSmrg done 116532b2b4fcbSmrg done 116542b2b4fcbSmrgdone 116552b2b4fcbSmrgIFS=$as_save_IFS 116562b2b4fcbSmrglt_ac_max=0 116572b2b4fcbSmrglt_ac_count=0 116582b2b4fcbSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 116592b2b4fcbSmrg# along with /bin/sed that truncates output. 116602b2b4fcbSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 116612b2b4fcbSmrg test ! -f "$lt_ac_sed" && continue 116622b2b4fcbSmrg cat /dev/null > conftest.in 116632b2b4fcbSmrg lt_ac_count=0 116642b2b4fcbSmrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 116652b2b4fcbSmrg # Check for GNU sed and select it if it is found. 116662b2b4fcbSmrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 116672b2b4fcbSmrg lt_cv_path_SED=$lt_ac_sed 116682b2b4fcbSmrg break 116692b2b4fcbSmrg fi 116702b2b4fcbSmrg while true; do 116712b2b4fcbSmrg cat conftest.in conftest.in >conftest.tmp 116722b2b4fcbSmrg mv conftest.tmp conftest.in 116732b2b4fcbSmrg cp conftest.in conftest.nl 116742b2b4fcbSmrg echo >>conftest.nl 116752b2b4fcbSmrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 116762b2b4fcbSmrg cmp -s conftest.out conftest.nl || break 116772b2b4fcbSmrg # 10000 chars as input seems more than enough 116782b2b4fcbSmrg test 10 -lt "$lt_ac_count" && break 116792b2b4fcbSmrg lt_ac_count=`expr $lt_ac_count + 1` 116802b2b4fcbSmrg if test "$lt_ac_count" -gt "$lt_ac_max"; then 116812b2b4fcbSmrg lt_ac_max=$lt_ac_count 116822b2b4fcbSmrg lt_cv_path_SED=$lt_ac_sed 116838697ee19Smrg fi 116848697ee19Smrg done 116852b2b4fcbSmrgdone 116862b2b4fcbSmrg]) 116872b2b4fcbSmrgSED=$lt_cv_path_SED 116882b2b4fcbSmrgAC_SUBST([SED]) 116892b2b4fcbSmrgAC_MSG_RESULT([$SED]) 116902b2b4fcbSmrg])#AC_PROG_SED 116912b2b4fcbSmrg])#m4_ifndef 11692ab47cfaaSmrg 116932b2b4fcbSmrg# Old name: 116942b2b4fcbSmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 116952b2b4fcbSmrgdnl aclocal-1.4 backwards compatibility: 116962b2b4fcbSmrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 116972b2b4fcbSmrg 116982b2b4fcbSmrg 116992b2b4fcbSmrg# _LT_CHECK_SHELL_FEATURES 117002b2b4fcbSmrg# ------------------------ 117012b2b4fcbSmrg# Find out whether the shell is Bourne or XSI compatible, 117022b2b4fcbSmrg# or has some other useful features. 117032b2b4fcbSmrgm4_defun([_LT_CHECK_SHELL_FEATURES], 117042b2b4fcbSmrg[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 117052b2b4fcbSmrg lt_unset=unset 117068697ee19Smrgelse 117072b2b4fcbSmrg lt_unset=false 117088697ee19Smrgfi 117092b2b4fcbSmrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 117102b2b4fcbSmrg 117112b2b4fcbSmrg# test EBCDIC or ASCII 117122b2b4fcbSmrgcase `echo X|tr X '\101'` in 117132b2b4fcbSmrg A) # ASCII based system 117142b2b4fcbSmrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 117152b2b4fcbSmrg lt_SP2NL='tr \040 \012' 117162b2b4fcbSmrg lt_NL2SP='tr \015\012 \040\040' 117172b2b4fcbSmrg ;; 117182b2b4fcbSmrg *) # EBCDIC based system 117192b2b4fcbSmrg lt_SP2NL='tr \100 \n' 117202b2b4fcbSmrg lt_NL2SP='tr \r\n \100\100' 117212b2b4fcbSmrg ;; 117222b2b4fcbSmrgesac 117232b2b4fcbSmrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 117242b2b4fcbSmrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 117252b2b4fcbSmrg])# _LT_CHECK_SHELL_FEATURES 117262b2b4fcbSmrg 117272b2b4fcbSmrg 117282b2b4fcbSmrg# _LT_PATH_CONVERSION_FUNCTIONS 117292b2b4fcbSmrg# ----------------------------- 117302b2b4fcbSmrg# Determine what file name conversion functions should be used by 117312b2b4fcbSmrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 117322b2b4fcbSmrg# for certain cross-compile configurations and native mingw. 117332b2b4fcbSmrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 117342b2b4fcbSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 117352b2b4fcbSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 117362b2b4fcbSmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 117372b2b4fcbSmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 117382b2b4fcbSmrg[case $host in 117392b2b4fcbSmrg *-*-mingw* ) 117402b2b4fcbSmrg case $build in 117412b2b4fcbSmrg *-*-mingw* ) # actually msys 117422b2b4fcbSmrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 117432b2b4fcbSmrg ;; 117442b2b4fcbSmrg *-*-cygwin* ) 117452b2b4fcbSmrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 117462b2b4fcbSmrg ;; 117472b2b4fcbSmrg * ) # otherwise, assume *nix 117482b2b4fcbSmrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 117492b2b4fcbSmrg ;; 117502b2b4fcbSmrg esac 117512b2b4fcbSmrg ;; 117522b2b4fcbSmrg *-*-cygwin* ) 117532b2b4fcbSmrg case $build in 117542b2b4fcbSmrg *-*-mingw* ) # actually msys 117552b2b4fcbSmrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 117562b2b4fcbSmrg ;; 117572b2b4fcbSmrg *-*-cygwin* ) 117582b2b4fcbSmrg lt_cv_to_host_file_cmd=func_convert_file_noop 117592b2b4fcbSmrg ;; 117602b2b4fcbSmrg * ) # otherwise, assume *nix 117612b2b4fcbSmrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 117622b2b4fcbSmrg ;; 117632b2b4fcbSmrg esac 117642b2b4fcbSmrg ;; 117652b2b4fcbSmrg * ) # unhandled hosts (and "normal" native builds) 117662b2b4fcbSmrg lt_cv_to_host_file_cmd=func_convert_file_noop 117672b2b4fcbSmrg ;; 117682b2b4fcbSmrgesac 117698697ee19Smrg]) 117702b2b4fcbSmrgto_host_file_cmd=$lt_cv_to_host_file_cmd 117712b2b4fcbSmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 117722b2b4fcbSmrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 117732b2b4fcbSmrg [0], [convert $build file names to $host format])dnl 117742b2b4fcbSmrg 117752b2b4fcbSmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 117762b2b4fcbSmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 117772b2b4fcbSmrg[#assume ordinary cross tools, or native build. 117782b2b4fcbSmrglt_cv_to_tool_file_cmd=func_convert_file_noop 117792b2b4fcbSmrgcase $host in 117802b2b4fcbSmrg *-*-mingw* ) 117812b2b4fcbSmrg case $build in 117822b2b4fcbSmrg *-*-mingw* ) # actually msys 117832b2b4fcbSmrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 117842b2b4fcbSmrg ;; 117852b2b4fcbSmrg esac 117862b2b4fcbSmrg ;; 117872b2b4fcbSmrgesac 117888697ee19Smrg]) 117892b2b4fcbSmrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 117902b2b4fcbSmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 117912b2b4fcbSmrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 117922b2b4fcbSmrg [0], [convert $build files to toolchain format])dnl 117932b2b4fcbSmrg])# _LT_PATH_CONVERSION_FUNCTIONS 117942b2b4fcbSmrg 117952b2b4fcbSmrg# Helper functions for option handling. -*- Autoconf -*- 117962b2b4fcbSmrg# 117972b2b4fcbSmrg# Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2022 Free 117982b2b4fcbSmrg# Software Foundation, Inc. 117992b2b4fcbSmrg# Written by Gary V. Vaughan, 2004 118002b2b4fcbSmrg# 118012b2b4fcbSmrg# This file is free software; the Free Software Foundation gives 118022b2b4fcbSmrg# unlimited permission to copy and/or distribute it, with or without 118032b2b4fcbSmrg# modifications, as long as this notice is preserved. 11804ab47cfaaSmrg 118052b2b4fcbSmrg# serial 8 ltoptions.m4 118068697ee19Smrg 118072b2b4fcbSmrg# This is to help aclocal find these macros, as it can't see m4_define. 118082b2b4fcbSmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 118092b2b4fcbSmrg 118102b2b4fcbSmrg 118112b2b4fcbSmrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 118122b2b4fcbSmrg# ------------------------------------------ 118132b2b4fcbSmrgm4_define([_LT_MANGLE_OPTION], 118142b2b4fcbSmrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 118152b2b4fcbSmrg 118162b2b4fcbSmrg 118172b2b4fcbSmrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 118182b2b4fcbSmrg# --------------------------------------- 118192b2b4fcbSmrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 118202b2b4fcbSmrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 118212b2b4fcbSmrg# saved as a flag. 118222b2b4fcbSmrgm4_define([_LT_SET_OPTION], 118232b2b4fcbSmrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 118242b2b4fcbSmrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 118252b2b4fcbSmrg _LT_MANGLE_DEFUN([$1], [$2]), 118262b2b4fcbSmrg [m4_warning([Unknown $1 option '$2'])])[]dnl 118278697ee19Smrg]) 118288697ee19Smrg 118298697ee19Smrg 118302b2b4fcbSmrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 118312b2b4fcbSmrg# ------------------------------------------------------------ 118322b2b4fcbSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 118332b2b4fcbSmrgm4_define([_LT_IF_OPTION], 118342b2b4fcbSmrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 118352b2b4fcbSmrg 118362b2b4fcbSmrg 118372b2b4fcbSmrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 118382b2b4fcbSmrg# ------------------------------------------------------- 118392b2b4fcbSmrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 118402b2b4fcbSmrg# are set. 118412b2b4fcbSmrgm4_define([_LT_UNLESS_OPTIONS], 118422b2b4fcbSmrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 118432b2b4fcbSmrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 118442b2b4fcbSmrg [m4_define([$0_found])])])[]dnl 118452b2b4fcbSmrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 118462b2b4fcbSmrg])[]dnl 118478697ee19Smrg]) 118488697ee19Smrg 118498697ee19Smrg 118502b2b4fcbSmrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 118512b2b4fcbSmrg# ---------------------------------------- 118522b2b4fcbSmrg# OPTION-LIST is a space-separated list of Libtool options associated 118532b2b4fcbSmrg# with MACRO-NAME. If any OPTION has a matching handler declared with 118542b2b4fcbSmrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 118552b2b4fcbSmrg# the unknown option and exit. 118562b2b4fcbSmrgm4_defun([_LT_SET_OPTIONS], 118572b2b4fcbSmrg[# Set options 118582b2b4fcbSmrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 118592b2b4fcbSmrg [_LT_SET_OPTION([$1], _LT_Option)]) 118608697ee19Smrg 118612b2b4fcbSmrgm4_if([$1],[LT_INIT],[ 118622b2b4fcbSmrg dnl 118632b2b4fcbSmrg dnl Simply set some default values (i.e off) if boolean options were not 118642b2b4fcbSmrg dnl specified: 118652b2b4fcbSmrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 118662b2b4fcbSmrg ]) 118672b2b4fcbSmrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 118682b2b4fcbSmrg ]) 118692b2b4fcbSmrg dnl 118702b2b4fcbSmrg dnl If no reference was made to various pairs of opposing options, then 118712b2b4fcbSmrg dnl we run the default mode handler for the pair. For example, if neither 118722b2b4fcbSmrg dnl 'shared' nor 'disable-shared' was passed, we enable building of shared 118732b2b4fcbSmrg dnl archives by default: 118742b2b4fcbSmrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 118752b2b4fcbSmrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 118762b2b4fcbSmrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 118772b2b4fcbSmrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 118782b2b4fcbSmrg [_LT_ENABLE_FAST_INSTALL]) 118792b2b4fcbSmrg _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], 118802b2b4fcbSmrg [_LT_WITH_AIX_SONAME([aix])]) 118812b2b4fcbSmrg ]) 118822b2b4fcbSmrg])# _LT_SET_OPTIONS 118838697ee19Smrg 118848697ee19Smrg 118858697ee19Smrg 118862b2b4fcbSmrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 118872b2b4fcbSmrg# ----------------------------------------- 118882b2b4fcbSmrgm4_define([_LT_MANGLE_DEFUN], 118892b2b4fcbSmrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 118902b2b4fcbSmrg 118912b2b4fcbSmrg 118922b2b4fcbSmrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 118932b2b4fcbSmrg# ----------------------------------------------- 118942b2b4fcbSmrgm4_define([LT_OPTION_DEFINE], 118952b2b4fcbSmrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 118962b2b4fcbSmrg])# LT_OPTION_DEFINE 118972b2b4fcbSmrg 118982b2b4fcbSmrg 118992b2b4fcbSmrg# dlopen 119002b2b4fcbSmrg# ------ 119012b2b4fcbSmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 119028697ee19Smrg]) 119038697ee19Smrg 119042b2b4fcbSmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 119052b2b4fcbSmrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 119062b2b4fcbSmrgAC_DIAGNOSE([obsolete], 119072b2b4fcbSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 119082b2b4fcbSmrgput the 'dlopen' option into LT_INIT's first parameter.]) 119092b2b4fcbSmrg]) 119108697ee19Smrg 119112b2b4fcbSmrgdnl aclocal-1.4 backwards compatibility: 119122b2b4fcbSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 119138697ee19Smrg 119148697ee19Smrg 119152b2b4fcbSmrg# win32-dll 119162b2b4fcbSmrg# --------- 119172b2b4fcbSmrg# Declare package support for building win32 dll's. 119182b2b4fcbSmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 119192b2b4fcbSmrg[enable_win32_dll=yes 119202b2b4fcbSmrg 119212b2b4fcbSmrgcase $host in 119222b2b4fcbSmrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 119232b2b4fcbSmrg AC_CHECK_TOOL(AS, as, false) 119242b2b4fcbSmrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 119252b2b4fcbSmrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 119262b2b4fcbSmrg ;; 119272b2b4fcbSmrgesac 119282b2b4fcbSmrg 119292b2b4fcbSmrgtest -z "$AS" && AS=as 119302b2b4fcbSmrg_LT_DECL([], [AS], [1], [Assembler program])dnl 119312b2b4fcbSmrg 119322b2b4fcbSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 119332b2b4fcbSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 119342b2b4fcbSmrg 119352b2b4fcbSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 119362b2b4fcbSmrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 119372b2b4fcbSmrg])# win32-dll 119382b2b4fcbSmrg 119392b2b4fcbSmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 119402b2b4fcbSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 119412b2b4fcbSmrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 119422b2b4fcbSmrgAC_DIAGNOSE([obsolete], 119432b2b4fcbSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 119442b2b4fcbSmrgput the 'win32-dll' option into LT_INIT's first parameter.]) 119451e449e82Smrg]) 119461e449e82Smrg 119472b2b4fcbSmrgdnl aclocal-1.4 backwards compatibility: 119482b2b4fcbSmrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 119492b2b4fcbSmrg 119502b2b4fcbSmrg 119512b2b4fcbSmrg# _LT_ENABLE_SHARED([DEFAULT]) 119522b2b4fcbSmrg# ---------------------------- 119532b2b4fcbSmrg# implement the --enable-shared flag, and supports the 'shared' and 119542b2b4fcbSmrg# 'disable-shared' LT_INIT options. 119552b2b4fcbSmrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 119562b2b4fcbSmrgm4_define([_LT_ENABLE_SHARED], 119572b2b4fcbSmrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 119582b2b4fcbSmrgAC_ARG_ENABLE([shared], 119592b2b4fcbSmrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 119602b2b4fcbSmrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 119612b2b4fcbSmrg [p=${PACKAGE-default} 119622b2b4fcbSmrg case $enableval in 119632b2b4fcbSmrg yes) enable_shared=yes ;; 119642b2b4fcbSmrg no) enable_shared=no ;; 119652b2b4fcbSmrg *) 119662b2b4fcbSmrg enable_shared=no 119672b2b4fcbSmrg # Look at the argument we got. We use all the common list separators. 119682b2b4fcbSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 119692b2b4fcbSmrg for pkg in $enableval; do 119702b2b4fcbSmrg IFS=$lt_save_ifs 119712b2b4fcbSmrg if test "X$pkg" = "X$p"; then 119722b2b4fcbSmrg enable_shared=yes 119732b2b4fcbSmrg fi 119742b2b4fcbSmrg done 119752b2b4fcbSmrg IFS=$lt_save_ifs 119762b2b4fcbSmrg ;; 119772b2b4fcbSmrg esac], 119782b2b4fcbSmrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 119798697ee19Smrg 119802b2b4fcbSmrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 119812b2b4fcbSmrg [Whether or not to build shared libraries]) 119822b2b4fcbSmrg])# _LT_ENABLE_SHARED 119838697ee19Smrg 119842b2b4fcbSmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 119852b2b4fcbSmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 119868697ee19Smrg 119872b2b4fcbSmrg# Old names: 119882b2b4fcbSmrgAC_DEFUN([AC_ENABLE_SHARED], 119892b2b4fcbSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 119902b2b4fcbSmrg]) 119918697ee19Smrg 119922b2b4fcbSmrgAC_DEFUN([AC_DISABLE_SHARED], 119932b2b4fcbSmrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 119948697ee19Smrg]) 119951e449e82Smrg 119962b2b4fcbSmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 119972b2b4fcbSmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 119981e449e82Smrg 119992b2b4fcbSmrgdnl aclocal-1.4 backwards compatibility: 120002b2b4fcbSmrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 120012b2b4fcbSmrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 120021e449e82Smrg 120031e449e82Smrg 120041e449e82Smrg 120052b2b4fcbSmrg# _LT_ENABLE_STATIC([DEFAULT]) 120062b2b4fcbSmrg# ---------------------------- 120072b2b4fcbSmrg# implement the --enable-static flag, and support the 'static' and 120082b2b4fcbSmrg# 'disable-static' LT_INIT options. 120092b2b4fcbSmrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 120102b2b4fcbSmrgm4_define([_LT_ENABLE_STATIC], 120112b2b4fcbSmrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 120122b2b4fcbSmrgAC_ARG_ENABLE([static], 120132b2b4fcbSmrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 120142b2b4fcbSmrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 120152b2b4fcbSmrg [p=${PACKAGE-default} 120162b2b4fcbSmrg case $enableval in 120172b2b4fcbSmrg yes) enable_static=yes ;; 120182b2b4fcbSmrg no) enable_static=no ;; 120192b2b4fcbSmrg *) 120202b2b4fcbSmrg enable_static=no 120212b2b4fcbSmrg # Look at the argument we got. We use all the common list separators. 120222b2b4fcbSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 120232b2b4fcbSmrg for pkg in $enableval; do 120242b2b4fcbSmrg IFS=$lt_save_ifs 120252b2b4fcbSmrg if test "X$pkg" = "X$p"; then 120262b2b4fcbSmrg enable_static=yes 120272b2b4fcbSmrg fi 120282b2b4fcbSmrg done 120292b2b4fcbSmrg IFS=$lt_save_ifs 120302b2b4fcbSmrg ;; 120312b2b4fcbSmrg esac], 120322b2b4fcbSmrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 120331e449e82Smrg 120342b2b4fcbSmrg _LT_DECL([build_old_libs], [enable_static], [0], 120352b2b4fcbSmrg [Whether or not to build static libraries]) 120362b2b4fcbSmrg])# _LT_ENABLE_STATIC 120371e449e82Smrg 120382b2b4fcbSmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 120392b2b4fcbSmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 120402b2b4fcbSmrg 120412b2b4fcbSmrg# Old names: 120422b2b4fcbSmrgAC_DEFUN([AC_ENABLE_STATIC], 120432b2b4fcbSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 120448697ee19Smrg]) 12045ab47cfaaSmrg 120462b2b4fcbSmrgAC_DEFUN([AC_DISABLE_STATIC], 120472b2b4fcbSmrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 120482b2b4fcbSmrg]) 120495c42550eSmrg 120502b2b4fcbSmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 120512b2b4fcbSmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 12052ab47cfaaSmrg 120532b2b4fcbSmrgdnl aclocal-1.4 backwards compatibility: 120542b2b4fcbSmrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 120552b2b4fcbSmrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 12056ab47cfaaSmrg 12057ab47cfaaSmrg 12058ab47cfaaSmrg 120592b2b4fcbSmrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 120602b2b4fcbSmrg# ---------------------------------- 120612b2b4fcbSmrg# implement the --enable-fast-install flag, and support the 'fast-install' 120622b2b4fcbSmrg# and 'disable-fast-install' LT_INIT options. 120632b2b4fcbSmrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 120642b2b4fcbSmrgm4_define([_LT_ENABLE_FAST_INSTALL], 120652b2b4fcbSmrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 120662b2b4fcbSmrgAC_ARG_ENABLE([fast-install], 120672b2b4fcbSmrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 120682b2b4fcbSmrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 120692b2b4fcbSmrg [p=${PACKAGE-default} 120702b2b4fcbSmrg case $enableval in 120712b2b4fcbSmrg yes) enable_fast_install=yes ;; 120722b2b4fcbSmrg no) enable_fast_install=no ;; 120732b2b4fcbSmrg *) 120742b2b4fcbSmrg enable_fast_install=no 120752b2b4fcbSmrg # Look at the argument we got. We use all the common list separators. 120762b2b4fcbSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 120772b2b4fcbSmrg for pkg in $enableval; do 120782b2b4fcbSmrg IFS=$lt_save_ifs 120792b2b4fcbSmrg if test "X$pkg" = "X$p"; then 120802b2b4fcbSmrg enable_fast_install=yes 120812b2b4fcbSmrg fi 120822b2b4fcbSmrg done 120832b2b4fcbSmrg IFS=$lt_save_ifs 120842b2b4fcbSmrg ;; 120852b2b4fcbSmrg esac], 120862b2b4fcbSmrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 12087ab47cfaaSmrg 120882b2b4fcbSmrg_LT_DECL([fast_install], [enable_fast_install], [0], 120892b2b4fcbSmrg [Whether or not to optimize for fast installation])dnl 120902b2b4fcbSmrg])# _LT_ENABLE_FAST_INSTALL 12091ab47cfaaSmrg 120922b2b4fcbSmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 120932b2b4fcbSmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 12094ab47cfaaSmrg 120952b2b4fcbSmrg# Old names: 120962b2b4fcbSmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 120972b2b4fcbSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 120982b2b4fcbSmrgAC_DIAGNOSE([obsolete], 120992b2b4fcbSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 121002b2b4fcbSmrgthe 'fast-install' option into LT_INIT's first parameter.]) 121012b2b4fcbSmrg]) 12102ab47cfaaSmrg 121032b2b4fcbSmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 121042b2b4fcbSmrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 121052b2b4fcbSmrgAC_DIAGNOSE([obsolete], 121062b2b4fcbSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 121072b2b4fcbSmrgthe 'disable-fast-install' option into LT_INIT's first parameter.]) 121082b2b4fcbSmrg]) 12109ab47cfaaSmrg 121102b2b4fcbSmrgdnl aclocal-1.4 backwards compatibility: 121112b2b4fcbSmrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 121122b2b4fcbSmrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 12113ab47cfaaSmrg 12114ab47cfaaSmrg 121152b2b4fcbSmrg# _LT_WITH_AIX_SONAME([DEFAULT]) 121162b2b4fcbSmrg# ---------------------------------- 121172b2b4fcbSmrg# implement the --with-aix-soname flag, and support the `aix-soname=aix' 121182b2b4fcbSmrg# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT 121192b2b4fcbSmrg# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. 121202b2b4fcbSmrgm4_define([_LT_WITH_AIX_SONAME], 121212b2b4fcbSmrg[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl 121222b2b4fcbSmrgshared_archive_member_spec= 121232b2b4fcbSmrgcase $host,$enable_shared in 121242b2b4fcbSmrgpower*-*-aix[[5-9]]*,yes) 121252b2b4fcbSmrg AC_MSG_CHECKING([which variant of shared library versioning to provide]) 121262b2b4fcbSmrg AC_ARG_WITH([aix-soname], 121272b2b4fcbSmrg [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], 121282b2b4fcbSmrg [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], 121292b2b4fcbSmrg [case $withval in 121302b2b4fcbSmrg aix|svr4|both) 121312b2b4fcbSmrg ;; 121322b2b4fcbSmrg *) 121332b2b4fcbSmrg AC_MSG_ERROR([Unknown argument to --with-aix-soname]) 121342b2b4fcbSmrg ;; 121352b2b4fcbSmrg esac 121362b2b4fcbSmrg lt_cv_with_aix_soname=$with_aix_soname], 121372b2b4fcbSmrg [AC_CACHE_VAL([lt_cv_with_aix_soname], 121382b2b4fcbSmrg [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) 121392b2b4fcbSmrg with_aix_soname=$lt_cv_with_aix_soname]) 121402b2b4fcbSmrg AC_MSG_RESULT([$with_aix_soname]) 121412b2b4fcbSmrg if test aix != "$with_aix_soname"; then 121422b2b4fcbSmrg # For the AIX way of multilib, we name the shared archive member 121432b2b4fcbSmrg # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', 121442b2b4fcbSmrg # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. 121452b2b4fcbSmrg # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, 121462b2b4fcbSmrg # the AIX toolchain works better with OBJECT_MODE set (default 32). 121472b2b4fcbSmrg if test 64 = "${OBJECT_MODE-32}"; then 121482b2b4fcbSmrg shared_archive_member_spec=shr_64 121492b2b4fcbSmrg else 121502b2b4fcbSmrg shared_archive_member_spec=shr 121512b2b4fcbSmrg fi 121522b2b4fcbSmrg fi 121532b2b4fcbSmrg ;; 121542b2b4fcbSmrg*) 121552b2b4fcbSmrg with_aix_soname=aix 121565c42550eSmrg ;; 121575c42550eSmrgesac 12158ab47cfaaSmrg 121592b2b4fcbSmrg_LT_DECL([], [shared_archive_member_spec], [0], 121602b2b4fcbSmrg [Shared archive member basename, for filename based shared library versioning on AIX])dnl 121612b2b4fcbSmrg])# _LT_WITH_AIX_SONAME 12162ab47cfaaSmrg 121632b2b4fcbSmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) 121642b2b4fcbSmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) 121652b2b4fcbSmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) 12166ab47cfaaSmrg 12167ab47cfaaSmrg 121682b2b4fcbSmrg# _LT_WITH_PIC([MODE]) 121692b2b4fcbSmrg# -------------------- 121702b2b4fcbSmrg# implement the --with-pic flag, and support the 'pic-only' and 'no-pic' 121712b2b4fcbSmrg# LT_INIT options. 121722b2b4fcbSmrg# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. 121732b2b4fcbSmrgm4_define([_LT_WITH_PIC], 121742b2b4fcbSmrg[AC_ARG_WITH([pic], 121752b2b4fcbSmrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 121762b2b4fcbSmrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 121772b2b4fcbSmrg [lt_p=${PACKAGE-default} 121782b2b4fcbSmrg case $withval in 121792b2b4fcbSmrg yes|no) pic_mode=$withval ;; 121802b2b4fcbSmrg *) 121812b2b4fcbSmrg pic_mode=default 121822b2b4fcbSmrg # Look at the argument we got. We use all the common list separators. 121832b2b4fcbSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 121842b2b4fcbSmrg for lt_pkg in $withval; do 121852b2b4fcbSmrg IFS=$lt_save_ifs 121862b2b4fcbSmrg if test "X$lt_pkg" = "X$lt_p"; then 121872b2b4fcbSmrg pic_mode=yes 121882b2b4fcbSmrg fi 121892b2b4fcbSmrg done 121902b2b4fcbSmrg IFS=$lt_save_ifs 121912b2b4fcbSmrg ;; 121922b2b4fcbSmrg esac], 121932b2b4fcbSmrg [pic_mode=m4_default([$1], [default])]) 12194ab47cfaaSmrg 121952b2b4fcbSmrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 121962b2b4fcbSmrg])# _LT_WITH_PIC 12197ab47cfaaSmrg 121982b2b4fcbSmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 121992b2b4fcbSmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 12200ab47cfaaSmrg 122012b2b4fcbSmrg# Old name: 122022b2b4fcbSmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 122032b2b4fcbSmrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 122042b2b4fcbSmrgAC_DIAGNOSE([obsolete], 122052b2b4fcbSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 122062b2b4fcbSmrgput the 'pic-only' option into LT_INIT's first parameter.]) 122072b2b4fcbSmrg]) 12208ab47cfaaSmrg 122092b2b4fcbSmrgdnl aclocal-1.4 backwards compatibility: 122102b2b4fcbSmrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 12211ab47cfaaSmrg 122121e449e82Smrg 122132b2b4fcbSmrgm4_define([_LTDL_MODE], []) 122142b2b4fcbSmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 122152b2b4fcbSmrg [m4_define([_LTDL_MODE], [nonrecursive])]) 122162b2b4fcbSmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 122172b2b4fcbSmrg [m4_define([_LTDL_MODE], [recursive])]) 122182b2b4fcbSmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 122192b2b4fcbSmrg [m4_define([_LTDL_MODE], [subproject])]) 12220ab47cfaaSmrg 122212b2b4fcbSmrgm4_define([_LTDL_TYPE], []) 122222b2b4fcbSmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 122232b2b4fcbSmrg [m4_define([_LTDL_TYPE], [installable])]) 122242b2b4fcbSmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 122252b2b4fcbSmrg [m4_define([_LTDL_TYPE], [convenience])]) 122261e449e82Smrg 122272b2b4fcbSmrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 12228ab47cfaaSmrg# 122292b2b4fcbSmrg# Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2022 Free Software 122302b2b4fcbSmrg# Foundation, Inc. 122312b2b4fcbSmrg# Written by Gary V. Vaughan, 2004 122322b2b4fcbSmrg# 122332b2b4fcbSmrg# This file is free software; the Free Software Foundation gives 122342b2b4fcbSmrg# unlimited permission to copy and/or distribute it, with or without 122352b2b4fcbSmrg# modifications, as long as this notice is preserved. 12236ab47cfaaSmrg 122372b2b4fcbSmrg# serial 6 ltsugar.m4 122381e449e82Smrg 122392b2b4fcbSmrg# This is to help aclocal find these macros, as it can't see m4_define. 122402b2b4fcbSmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 122411e449e82Smrg 12242ab47cfaaSmrg 122432b2b4fcbSmrg# lt_join(SEP, ARG1, [ARG2...]) 122442b2b4fcbSmrg# ----------------------------- 122452b2b4fcbSmrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 122462b2b4fcbSmrg# associated separator. 122472b2b4fcbSmrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 122482b2b4fcbSmrg# versions in m4sugar had bugs. 122492b2b4fcbSmrgm4_define([lt_join], 122502b2b4fcbSmrg[m4_if([$#], [1], [], 122512b2b4fcbSmrg [$#], [2], [[$2]], 122522b2b4fcbSmrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 122532b2b4fcbSmrgm4_define([_lt_join], 122542b2b4fcbSmrg[m4_if([$#$2], [2], [], 122552b2b4fcbSmrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 122565c42550eSmrg 122571e449e82Smrg 122582b2b4fcbSmrg# lt_car(LIST) 122592b2b4fcbSmrg# lt_cdr(LIST) 122602b2b4fcbSmrg# ------------ 122612b2b4fcbSmrg# Manipulate m4 lists. 122622b2b4fcbSmrg# These macros are necessary as long as will still need to support 122632b2b4fcbSmrg# Autoconf-2.59, which quotes differently. 122642b2b4fcbSmrgm4_define([lt_car], [[$1]]) 122652b2b4fcbSmrgm4_define([lt_cdr], 122662b2b4fcbSmrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 122672b2b4fcbSmrg [$#], 1, [], 122682b2b4fcbSmrg [m4_dquote(m4_shift($@))])]) 122692b2b4fcbSmrgm4_define([lt_unquote], $1) 122702b2b4fcbSmrg 12271ab47cfaaSmrg 122722b2b4fcbSmrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 122732b2b4fcbSmrg# ------------------------------------------ 122742b2b4fcbSmrg# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. 122752b2b4fcbSmrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 122762b2b4fcbSmrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 122772b2b4fcbSmrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 122782b2b4fcbSmrg# than defined and empty). 122796aec45a7Smrg# 122802b2b4fcbSmrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 122812b2b4fcbSmrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 122822b2b4fcbSmrgm4_define([lt_append], 122832b2b4fcbSmrg[m4_define([$1], 122842b2b4fcbSmrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 122856aec45a7Smrg 122866aec45a7Smrg 12287ab47cfaaSmrg 122882b2b4fcbSmrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 122892b2b4fcbSmrg# ---------------------------------------------------------- 122902b2b4fcbSmrg# Produce a SEP delimited list of all paired combinations of elements of 122912b2b4fcbSmrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 122922b2b4fcbSmrg# has the form PREFIXmINFIXSUFFIXn. 122932b2b4fcbSmrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 122942b2b4fcbSmrgm4_define([lt_combine], 122952b2b4fcbSmrg[m4_if(m4_eval([$# > 3]), [1], 122962b2b4fcbSmrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 122972b2b4fcbSmrg[[m4_foreach([_Lt_prefix], [$2], 122982b2b4fcbSmrg [m4_foreach([_Lt_suffix], 122992b2b4fcbSmrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 123002b2b4fcbSmrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 123012b2b4fcbSmrg 123022b2b4fcbSmrg 123032b2b4fcbSmrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 123042b2b4fcbSmrg# ----------------------------------------------------------------------- 123052b2b4fcbSmrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 123062b2b4fcbSmrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 123072b2b4fcbSmrgm4_define([lt_if_append_uniq], 123082b2b4fcbSmrg[m4_ifdef([$1], 123092b2b4fcbSmrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 123102b2b4fcbSmrg [lt_append([$1], [$2], [$3])$4], 123112b2b4fcbSmrg [$5])], 123122b2b4fcbSmrg [lt_append([$1], [$2], [$3])$4])]) 123132b2b4fcbSmrg 123142b2b4fcbSmrg 123152b2b4fcbSmrg# lt_dict_add(DICT, KEY, VALUE) 123162b2b4fcbSmrg# ----------------------------- 123172b2b4fcbSmrgm4_define([lt_dict_add], 123182b2b4fcbSmrg[m4_define([$1($2)], [$3])]) 12319ab47cfaaSmrg 12320ab47cfaaSmrg 123212b2b4fcbSmrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 123222b2b4fcbSmrg# -------------------------------------------- 123232b2b4fcbSmrgm4_define([lt_dict_add_subkey], 123242b2b4fcbSmrg[m4_define([$1($2:$3)], [$4])]) 12325ab47cfaaSmrg 123265c42550eSmrg 123272b2b4fcbSmrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 123282b2b4fcbSmrg# ---------------------------------- 123292b2b4fcbSmrgm4_define([lt_dict_fetch], 123302b2b4fcbSmrg[m4_ifval([$3], 123312b2b4fcbSmrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 123322b2b4fcbSmrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 12333ab47cfaaSmrg 12334ab47cfaaSmrg 123352b2b4fcbSmrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 123362b2b4fcbSmrg# ----------------------------------------------------------------- 123372b2b4fcbSmrgm4_define([lt_if_dict_fetch], 123382b2b4fcbSmrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 123392b2b4fcbSmrg [$5], 123402b2b4fcbSmrg [$6])]) 123411e449e82Smrg 123428697ee19Smrg 123432b2b4fcbSmrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 123442b2b4fcbSmrg# -------------------------------------------------------------- 123452b2b4fcbSmrgm4_define([lt_dict_filter], 123462b2b4fcbSmrg[m4_if([$5], [], [], 123472b2b4fcbSmrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 123482b2b4fcbSmrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 123492b2b4fcbSmrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 123502b2b4fcbSmrg]) 123511e449e82Smrg 123522b2b4fcbSmrg# ltversion.m4 -- version numbers -*- Autoconf -*- 123532b2b4fcbSmrg# 123542b2b4fcbSmrg# Copyright (C) 2004, 2011-2019, 2021-2022 Free Software Foundation, 123552b2b4fcbSmrg# Inc. 123562b2b4fcbSmrg# Written by Scott James Remnant, 2004 123572b2b4fcbSmrg# 123582b2b4fcbSmrg# This file is free software; the Free Software Foundation gives 123592b2b4fcbSmrg# unlimited permission to copy and/or distribute it, with or without 123602b2b4fcbSmrg# modifications, as long as this notice is preserved. 123618697ee19Smrg 123622b2b4fcbSmrg# @configure_input@ 123631e449e82Smrg 123642b2b4fcbSmrg# serial 4245 ltversion.m4 123652b2b4fcbSmrg# This file is part of GNU Libtool 123661e449e82Smrg 123672b2b4fcbSmrgm4_define([LT_PACKAGE_VERSION], [2.4.7]) 123682b2b4fcbSmrgm4_define([LT_PACKAGE_REVISION], [2.4.7]) 123691e449e82Smrg 123702b2b4fcbSmrgAC_DEFUN([LTVERSION_VERSION], 123712b2b4fcbSmrg[macro_version='2.4.7' 123722b2b4fcbSmrgmacro_revision='2.4.7' 123732b2b4fcbSmrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 123742b2b4fcbSmrg_LT_DECL(, macro_revision, 0) 123752b2b4fcbSmrg]) 123761e449e82Smrg 123772b2b4fcbSmrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 123782b2b4fcbSmrg# 123792b2b4fcbSmrg# Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2022 Free 123802b2b4fcbSmrg# Software Foundation, Inc. 123812b2b4fcbSmrg# Written by Scott James Remnant, 2004. 123822b2b4fcbSmrg# 123832b2b4fcbSmrg# This file is free software; the Free Software Foundation gives 123842b2b4fcbSmrg# unlimited permission to copy and/or distribute it, with or without 123852b2b4fcbSmrg# modifications, as long as this notice is preserved. 123861e449e82Smrg 123872b2b4fcbSmrg# serial 5 lt~obsolete.m4 123881e449e82Smrg 123892b2b4fcbSmrg# These exist entirely to fool aclocal when bootstrapping libtool. 123902b2b4fcbSmrg# 123912b2b4fcbSmrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), 123922b2b4fcbSmrg# which have later been changed to m4_define as they aren't part of the 123932b2b4fcbSmrg# exported API, or moved to Autoconf or Automake where they belong. 123942b2b4fcbSmrg# 123952b2b4fcbSmrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 123962b2b4fcbSmrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 123972b2b4fcbSmrg# using a macro with the same name in our local m4/libtool.m4 it'll 123982b2b4fcbSmrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 123992b2b4fcbSmrg# and doesn't know about Autoconf macros at all.) 124002b2b4fcbSmrg# 124012b2b4fcbSmrg# So we provide this file, which has a silly filename so it's always 124022b2b4fcbSmrg# included after everything else. This provides aclocal with the 124032b2b4fcbSmrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 124042b2b4fcbSmrg# because those macros already exist, or will be overwritten later. 124052b2b4fcbSmrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 124062b2b4fcbSmrg# 124072b2b4fcbSmrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 124082b2b4fcbSmrg# Yes, that means every name once taken will need to remain here until 124092b2b4fcbSmrg# we give up compatibility with versions before 1.7, at which point 124102b2b4fcbSmrg# we need to keep only those names which we still refer to. 124118697ee19Smrg 124122b2b4fcbSmrg# This is to help aclocal find these macros, as it can't see m4_define. 124132b2b4fcbSmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 124141e449e82Smrg 124152b2b4fcbSmrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 124162b2b4fcbSmrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 124172b2b4fcbSmrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 124182b2b4fcbSmrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 124192b2b4fcbSmrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 124202b2b4fcbSmrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 124212b2b4fcbSmrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 124222b2b4fcbSmrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 124232b2b4fcbSmrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 124242b2b4fcbSmrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 124252b2b4fcbSmrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 124262b2b4fcbSmrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 124272b2b4fcbSmrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 124282b2b4fcbSmrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 124292b2b4fcbSmrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 124302b2b4fcbSmrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 124312b2b4fcbSmrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 124322b2b4fcbSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 124332b2b4fcbSmrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 124342b2b4fcbSmrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 124352b2b4fcbSmrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 124362b2b4fcbSmrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 124372b2b4fcbSmrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 124382b2b4fcbSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 124392b2b4fcbSmrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 124402b2b4fcbSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 124412b2b4fcbSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 124422b2b4fcbSmrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 124432b2b4fcbSmrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 124442b2b4fcbSmrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 124452b2b4fcbSmrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 124462b2b4fcbSmrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 124472b2b4fcbSmrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 124482b2b4fcbSmrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 124492b2b4fcbSmrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 124502b2b4fcbSmrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 124512b2b4fcbSmrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 124522b2b4fcbSmrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 124532b2b4fcbSmrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 124542b2b4fcbSmrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 124552b2b4fcbSmrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 124562b2b4fcbSmrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 124572b2b4fcbSmrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 124582b2b4fcbSmrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 124592b2b4fcbSmrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 124602b2b4fcbSmrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 124612b2b4fcbSmrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 124622b2b4fcbSmrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 124632b2b4fcbSmrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 124642b2b4fcbSmrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 124652b2b4fcbSmrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 124662b2b4fcbSmrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 124672b2b4fcbSmrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 124682b2b4fcbSmrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 124692b2b4fcbSmrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 124702b2b4fcbSmrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 124712b2b4fcbSmrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 124722b2b4fcbSmrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 124732b2b4fcbSmrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 124742b2b4fcbSmrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 124752b2b4fcbSmrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 12476ab47cfaaSmrg 12477