aclocal.m4 revision 9d0b5e55
19d0b5e55Smrg# generated automatically by aclocal 1.14 -*- Autoconf -*- 29d0b5e55Smrg 39d0b5e55Smrg# Copyright (C) 1996-2013 Free Software Foundation, Inc. 46c321187Smrg 56c321187Smrg# This file is free software; the Free Software Foundation 66c321187Smrg# gives unlimited permission to copy and/or distribute it, 76c321187Smrg# with or without modifications, as long as this notice is preserved. 86c321187Smrg 96c321187Smrg# This program is distributed in the hope that it will be useful, 106c321187Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 116c321187Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 126c321187Smrg# PARTICULAR PURPOSE. 136c321187Smrg 149d0b5e55Smrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 1593493779Smrgm4_ifndef([AC_AUTOCONF_VERSION], 1693493779Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 17e120bd27Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, 18e120bd27Smrg[m4_warning([this file was generated for autoconf 2.68. 1993493779SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 2093493779SmrgIf you have problems, you may need to regenerate the build system entirely. 219d0b5e55SmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])]) 226c321187Smrg 239d0b5e55Smrg# Copyright (C) 2002-2013 Free Software Foundation, Inc. 246c321187Smrg# 256c321187Smrg# This file is free software; the Free Software Foundation 266c321187Smrg# gives unlimited permission to copy and/or distribute it, 276c321187Smrg# with or without modifications, as long as this notice is preserved. 286c321187Smrg 296c321187Smrg# AM_AUTOMAKE_VERSION(VERSION) 306c321187Smrg# ---------------------------- 316c321187Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 326c321187Smrg# generated from the m4 files accompanying Automake X.Y. 336c321187Smrg# (This private macro should not be called outside this file.) 346c321187SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 359d0b5e55Smrg[am__api_version='1.14' 366c321187Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 376c321187Smrgdnl require some minimum version. Point them to the right macro. 389d0b5e55Smrgm4_if([$1], [1.14], [], 396c321187Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 406c321187Smrg]) 416c321187Smrg 426c321187Smrg# _AM_AUTOCONF_VERSION(VERSION) 436c321187Smrg# ----------------------------- 446c321187Smrg# aclocal traces this macro to find the Autoconf version. 456c321187Smrg# This is a private macro too. Using m4_define simplifies 466c321187Smrg# the logic in aclocal, which can simply ignore this definition. 476c321187Smrgm4_define([_AM_AUTOCONF_VERSION], []) 486c321187Smrg 496c321187Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 506c321187Smrg# ------------------------------- 516c321187Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 5293493779Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 536c321187SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 549d0b5e55Smrg[AM_AUTOMAKE_VERSION([1.14])dnl 5593493779Smrgm4_ifndef([AC_AUTOCONF_VERSION], 5693493779Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 5793493779Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 586c321187Smrg 596c321187Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 606c321187Smrg 619d0b5e55Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 626c321187Smrg# 636c321187Smrg# This file is free software; the Free Software Foundation 646c321187Smrg# gives unlimited permission to copy and/or distribute it, 656c321187Smrg# with or without modifications, as long as this notice is preserved. 666c321187Smrg 676c321187Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 689d0b5e55Smrg# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 699d0b5e55Smrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 706c321187Smrg# 716c321187Smrg# Of course, Automake must honor this variable whenever it calls a 726c321187Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 736c321187Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 746c321187Smrg# depending on how configure is run. This is pretty annoying, since 756c321187Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 766c321187Smrg# source directory, any form will work fine, but in subdirectories a 776c321187Smrg# relative path needs to be adjusted first. 786c321187Smrg# 796c321187Smrg# $ac_aux_dir/missing 806c321187Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 816c321187Smrg# $top_srcdir/$ac_aux_dir/missing 826c321187Smrg# fails if $ac_aux_dir is absolute, 836c321187Smrg# fails when called from a subdirectory in a VPATH build with 846c321187Smrg# a relative $ac_aux_dir 856c321187Smrg# 866c321187Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 876c321187Smrg# are both prefixed by $srcdir. In an in-source build this is usually 889d0b5e55Smrg# harmless because $srcdir is '.', but things will broke when you 896c321187Smrg# start a VPATH build or use an absolute $srcdir. 906c321187Smrg# 916c321187Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 926c321187Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 936c321187Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 946c321187Smrg# and then we would define $MISSING as 956c321187Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 966c321187Smrg# This will work as long as MISSING is not called from configure, because 976c321187Smrg# unfortunately $(top_srcdir) has no meaning in configure. 986c321187Smrg# However there are other variables, like CC, which are often used in 996c321187Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 1006c321187Smrg# 1016c321187Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 1026c321187Smrg# absolute PATH. The drawback is that using absolute paths prevent a 1036c321187Smrg# configured tree to be moved without reconfiguration. 1046c321187Smrg 1056c321187SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 1066c321187Smrg[dnl Rely on autoconf to set up CDPATH properly. 1076c321187SmrgAC_PREREQ([2.50])dnl 1086c321187Smrg# expand $ac_aux_dir to an absolute path 1096c321187Smrgam_aux_dir=`cd $ac_aux_dir && pwd` 1106c321187Smrg]) 1116c321187Smrg 1126c321187Smrg# AM_CONDITIONAL -*- Autoconf -*- 1136c321187Smrg 1149d0b5e55Smrg# Copyright (C) 1997-2013 Free Software Foundation, Inc. 1156c321187Smrg# 1166c321187Smrg# This file is free software; the Free Software Foundation 1176c321187Smrg# gives unlimited permission to copy and/or distribute it, 1186c321187Smrg# with or without modifications, as long as this notice is preserved. 1196c321187Smrg 1206c321187Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 1216c321187Smrg# ------------------------------------- 1226c321187Smrg# Define a conditional. 1236c321187SmrgAC_DEFUN([AM_CONDITIONAL], 1249d0b5e55Smrg[AC_PREREQ([2.52])dnl 1259d0b5e55Smrg m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 1269d0b5e55Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 1276c321187SmrgAC_SUBST([$1_TRUE])dnl 1286c321187SmrgAC_SUBST([$1_FALSE])dnl 1296c321187Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 1306c321187Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 13193493779Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 1326c321187Smrgif $2; then 1336c321187Smrg $1_TRUE= 1346c321187Smrg $1_FALSE='#' 1356c321187Smrgelse 1366c321187Smrg $1_TRUE='#' 1376c321187Smrg $1_FALSE= 1386c321187Smrgfi 1396c321187SmrgAC_CONFIG_COMMANDS_PRE( 1406c321187Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 1416c321187Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 1426c321187SmrgUsually this means the macro was only invoked conditionally.]]) 1436c321187Smrgfi])]) 1446c321187Smrg 1459d0b5e55Smrg# Copyright (C) 1999-2013 Free Software Foundation, Inc. 1466c321187Smrg# 1476c321187Smrg# This file is free software; the Free Software Foundation 1486c321187Smrg# gives unlimited permission to copy and/or distribute it, 1496c321187Smrg# with or without modifications, as long as this notice is preserved. 1506c321187Smrg 1516c321187Smrg 1529d0b5e55Smrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 1536c321187Smrg# written in clear, in which case automake, when reading aclocal.m4, 1546c321187Smrg# will think it sees a *use*, and therefore will trigger all it's 1556c321187Smrg# C support machinery. Also note that it means that autoscan, seeing 1566c321187Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 1576c321187Smrg 1586c321187Smrg 1596c321187Smrg# _AM_DEPENDENCIES(NAME) 1606c321187Smrg# ---------------------- 1616c321187Smrg# See how the compiler implements dependency checking. 1629d0b5e55Smrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 1636c321187Smrg# We try a few techniques and use that to set a single cache variable. 1646c321187Smrg# 1656c321187Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 1666c321187Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 1676c321187Smrg# dependency, and given that the user is not expected to run this macro, 1686c321187Smrg# just rely on AC_PROG_CC. 1696c321187SmrgAC_DEFUN([_AM_DEPENDENCIES], 1706c321187Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 1716c321187SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 1726c321187SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 1736c321187SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 1746c321187Smrg 1759d0b5e55Smrgm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 1769d0b5e55Smrg [$1], [CXX], [depcc="$CXX" am_compiler_list=], 1779d0b5e55Smrg [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 1789d0b5e55Smrg [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 1799d0b5e55Smrg [$1], [UPC], [depcc="$UPC" am_compiler_list=], 1809d0b5e55Smrg [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 1819d0b5e55Smrg [depcc="$$1" am_compiler_list=]) 1826c321187Smrg 1836c321187SmrgAC_CACHE_CHECK([dependency style of $depcc], 1846c321187Smrg [am_cv_$1_dependencies_compiler_type], 1856c321187Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 1866c321187Smrg # We make a subdir and do the tests there. Otherwise we can end up 1876c321187Smrg # making bogus files that we don't know about and never remove. For 1886c321187Smrg # instance it was reported that on HP-UX the gcc test will end up 1899d0b5e55Smrg # making a dummy file named 'D' -- because '-MD' means "put the output 1909d0b5e55Smrg # in D". 1919d0b5e55Smrg rm -rf conftest.dir 1926c321187Smrg mkdir conftest.dir 1936c321187Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 1946c321187Smrg # using a relative directory. 1956c321187Smrg cp "$am_depcomp" conftest.dir 1966c321187Smrg cd conftest.dir 1976c321187Smrg # We will build objects and dependencies in a subdirectory because 1986c321187Smrg # it helps to detect inapplicable dependency modes. For instance 1996c321187Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 2006c321187Smrg # side effect of compilation, but ICC will put the dependencies in 2016c321187Smrg # the current directory while Tru64 will put them in the object 2026c321187Smrg # directory. 2036c321187Smrg mkdir sub 2046c321187Smrg 2056c321187Smrg am_cv_$1_dependencies_compiler_type=none 2066c321187Smrg if test "$am_compiler_list" = ""; then 2076c321187Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 2086c321187Smrg fi 20993493779Smrg am__universal=false 21093493779Smrg m4_case([$1], [CC], 21193493779Smrg [case " $depcc " in #( 21293493779Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 21393493779Smrg esac], 21493493779Smrg [CXX], 21593493779Smrg [case " $depcc " in #( 21693493779Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 21793493779Smrg esac]) 21893493779Smrg 2196c321187Smrg for depmode in $am_compiler_list; do 2206c321187Smrg # Setup a source with many dependencies, because some compilers 2216c321187Smrg # like to wrap large dependency lists on column 80 (with \), and 2226c321187Smrg # we should not choose a depcomp mode which is confused by this. 2236c321187Smrg # 2246c321187Smrg # We need to recreate these files for each test, as the compiler may 2256c321187Smrg # overwrite some of them when testing with obscure command lines. 2266c321187Smrg # This happens at least with the AIX C compiler. 2276c321187Smrg : > sub/conftest.c 2286c321187Smrg for i in 1 2 3 4 5 6; do 2296c321187Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 2309d0b5e55Smrg # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 2319d0b5e55Smrg # Solaris 10 /bin/sh. 2329d0b5e55Smrg echo '/* dummy */' > sub/conftst$i.h 2336c321187Smrg done 2346c321187Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 2356c321187Smrg 2369d0b5e55Smrg # We check with '-c' and '-o' for the sake of the "dashmstdout" 23793493779Smrg # mode. It turns out that the SunPro C++ compiler does not properly 2389d0b5e55Smrg # handle '-M -o', and we need to detect this. Also, some Intel 2399d0b5e55Smrg # versions had trouble with output in subdirs. 24093493779Smrg am__obj=sub/conftest.${OBJEXT-o} 24193493779Smrg am__minus_obj="-o $am__obj" 2426c321187Smrg case $depmode in 24393493779Smrg gcc) 24493493779Smrg # This depmode causes a compiler race in universal mode. 24593493779Smrg test "$am__universal" = false || continue 24693493779Smrg ;; 2476c321187Smrg nosideeffect) 2489d0b5e55Smrg # After this tag, mechanisms are not by side-effect, so they'll 2499d0b5e55Smrg # only be used when explicitly requested. 2506c321187Smrg if test "x$enable_dependency_tracking" = xyes; then 2516c321187Smrg continue 2526c321187Smrg else 2536c321187Smrg break 2546c321187Smrg fi 2556c321187Smrg ;; 2569d0b5e55Smrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 2579d0b5e55Smrg # This compiler won't grok '-c -o', but also, the minuso test has 25893493779Smrg # not run yet. These depmodes are late enough in the game, and 25993493779Smrg # so weak that their functioning should not be impacted. 26093493779Smrg am__obj=conftest.${OBJEXT-o} 26193493779Smrg am__minus_obj= 26293493779Smrg ;; 2636c321187Smrg none) break ;; 2646c321187Smrg esac 2656c321187Smrg if depmode=$depmode \ 26693493779Smrg source=sub/conftest.c object=$am__obj \ 2676c321187Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 26893493779Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 2696c321187Smrg >/dev/null 2>conftest.err && 2706c321187Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 2716c321187Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 27293493779Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 2736c321187Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 2746c321187Smrg # icc doesn't choke on unknown options, it will just issue warnings 2756c321187Smrg # or remarks (even with -Werror). So we grep stderr for any message 2766c321187Smrg # that says an option was ignored or not supported. 2776c321187Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 2786c321187Smrg # icc: Command line warning: ignoring option '-M'; no argument required 2796c321187Smrg # The diagnosis changed in icc 8.0: 2806c321187Smrg # icc: Command line remark: option '-MP' not supported 2816c321187Smrg if (grep 'ignoring option' conftest.err || 2826c321187Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 2836c321187Smrg am_cv_$1_dependencies_compiler_type=$depmode 2846c321187Smrg break 2856c321187Smrg fi 2866c321187Smrg fi 2876c321187Smrg done 2886c321187Smrg 2896c321187Smrg cd .. 2906c321187Smrg rm -rf conftest.dir 2916c321187Smrgelse 2926c321187Smrg am_cv_$1_dependencies_compiler_type=none 2936c321187Smrgfi 2946c321187Smrg]) 2956c321187SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 2966c321187SmrgAM_CONDITIONAL([am__fastdep$1], [ 2976c321187Smrg test "x$enable_dependency_tracking" != xno \ 2986c321187Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 2996c321187Smrg]) 3006c321187Smrg 3016c321187Smrg 3026c321187Smrg# AM_SET_DEPDIR 3036c321187Smrg# ------------- 3046c321187Smrg# Choose a directory name for dependency files. 3059d0b5e55Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 3066c321187SmrgAC_DEFUN([AM_SET_DEPDIR], 3076c321187Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 3086c321187SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 3096c321187Smrg]) 3106c321187Smrg 3116c321187Smrg 3126c321187Smrg# AM_DEP_TRACK 3136c321187Smrg# ------------ 3146c321187SmrgAC_DEFUN([AM_DEP_TRACK], 3159d0b5e55Smrg[AC_ARG_ENABLE([dependency-tracking], [dnl 3169d0b5e55SmrgAS_HELP_STRING( 3179d0b5e55Smrg [--enable-dependency-tracking], 3189d0b5e55Smrg [do not reject slow dependency extractors]) 3199d0b5e55SmrgAS_HELP_STRING( 3209d0b5e55Smrg [--disable-dependency-tracking], 3219d0b5e55Smrg [speeds up one-time build])]) 3226c321187Smrgif test "x$enable_dependency_tracking" != xno; then 3236c321187Smrg am_depcomp="$ac_aux_dir/depcomp" 3246c321187Smrg AMDEPBACKSLASH='\' 3259d0b5e55Smrg am__nodep='_no' 3266c321187Smrgfi 3276c321187SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 3286c321187SmrgAC_SUBST([AMDEPBACKSLASH])dnl 3296c321187Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 3309d0b5e55SmrgAC_SUBST([am__nodep])dnl 3319d0b5e55Smrg_AM_SUBST_NOTMAKE([am__nodep])dnl 3326c321187Smrg]) 3336c321187Smrg 3346c321187Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 3356c321187Smrg 3369d0b5e55Smrg# Copyright (C) 1999-2013 Free Software Foundation, Inc. 3376c321187Smrg# 3386c321187Smrg# This file is free software; the Free Software Foundation 3396c321187Smrg# gives unlimited permission to copy and/or distribute it, 3406c321187Smrg# with or without modifications, as long as this notice is preserved. 3416c321187Smrg 3426c321187Smrg 3436c321187Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 3446c321187Smrg# ------------------------------ 3456c321187SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 34693493779Smrg[{ 3479d0b5e55Smrg # Older Autoconf quotes --file arguments for eval, but not when files 34893493779Smrg # are listed without --file. Let's play safe and only enable the eval 34993493779Smrg # if we detect the quoting. 35093493779Smrg case $CONFIG_FILES in 35193493779Smrg *\'*) eval set x "$CONFIG_FILES" ;; 35293493779Smrg *) set x $CONFIG_FILES ;; 35393493779Smrg esac 35493493779Smrg shift 35593493779Smrg for mf 35693493779Smrg do 35793493779Smrg # Strip MF so we end up with the name of the file. 35893493779Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 35993493779Smrg # Check whether this is an Automake generated Makefile or not. 3609d0b5e55Smrg # We used to match only the files named 'Makefile.in', but 36193493779Smrg # some people rename them; so instead we look at the file content. 36293493779Smrg # Grep'ing the first line is not enough: some people post-process 36393493779Smrg # each Makefile.in and add a new line on top of each file to say so. 36493493779Smrg # Grep'ing the whole file is not good either: AIX grep has a line 36593493779Smrg # limit of 2048, but all sed's we know have understand at least 4000. 36693493779Smrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 36793493779Smrg dirpart=`AS_DIRNAME("$mf")` 36893493779Smrg else 36993493779Smrg continue 37093493779Smrg fi 37193493779Smrg # Extract the definition of DEPDIR, am__include, and am__quote 3729d0b5e55Smrg # from the Makefile without running 'make'. 37393493779Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 37493493779Smrg test -z "$DEPDIR" && continue 37593493779Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 3769d0b5e55Smrg test -z "$am__include" && continue 37793493779Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 37893493779Smrg # Find all dependency output files, they are included files with 37993493779Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 38093493779Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 38193493779Smrg # expansion. 38293493779Smrg for file in `sed -n " 38393493779Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 3849d0b5e55Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do 38593493779Smrg # Make sure the directory exists. 38693493779Smrg test -f "$dirpart/$file" && continue 38793493779Smrg fdir=`AS_DIRNAME(["$file"])` 38893493779Smrg AS_MKDIR_P([$dirpart/$fdir]) 38993493779Smrg # echo "creating $dirpart/$file" 39093493779Smrg echo '# dummy' > "$dirpart/$file" 39193493779Smrg done 3926c321187Smrg done 39393493779Smrg} 3946c321187Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 3956c321187Smrg 3966c321187Smrg 3976c321187Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 3986c321187Smrg# ----------------------------- 3996c321187Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 4006c321187Smrg# 4016c321187Smrg# This code is only required when automatic dependency tracking 4029d0b5e55Smrg# is enabled. FIXME. This creates each '.P' file that we will 4036c321187Smrg# need in order to bootstrap the dependency handling code. 4046c321187SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 4056c321187Smrg[AC_CONFIG_COMMANDS([depfiles], 4066c321187Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 4076c321187Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 4086c321187Smrg]) 4096c321187Smrg 4106c321187Smrg# Do all the work for Automake. -*- Autoconf -*- 4116c321187Smrg 4129d0b5e55Smrg# Copyright (C) 1996-2013 Free Software Foundation, Inc. 4136c321187Smrg# 4146c321187Smrg# This file is free software; the Free Software Foundation 4156c321187Smrg# gives unlimited permission to copy and/or distribute it, 4166c321187Smrg# with or without modifications, as long as this notice is preserved. 4176c321187Smrg 4186c321187Smrg# This macro actually does too much. Some checks are only needed if 4196c321187Smrg# your package does certain things. But this isn't really a big deal. 4206c321187Smrg 4219d0b5e55Smrgdnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 4229d0b5e55Smrgm4_define([AC_PROG_CC], 4239d0b5e55Smrgm4_defn([AC_PROG_CC]) 4249d0b5e55Smrg[_AM_PROG_CC_C_O 4259d0b5e55Smrg]) 4269d0b5e55Smrg 4276c321187Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 4286c321187Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 4296c321187Smrg# ----------------------------------------------- 4306c321187Smrg# The call with PACKAGE and VERSION arguments is the old style 4316c321187Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 4326c321187Smrg# and VERSION should now be passed to AC_INIT and removed from 4336c321187Smrg# the call to AM_INIT_AUTOMAKE. 4346c321187Smrg# We support both call styles for the transition. After 4356c321187Smrg# the next Automake release, Autoconf can make the AC_INIT 4366c321187Smrg# arguments mandatory, and then we can depend on a new Autoconf 4376c321187Smrg# release and drop the old call support. 4386c321187SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 4399d0b5e55Smrg[AC_PREREQ([2.65])dnl 4406c321187Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 4416c321187Smrgdnl the ones we care about. 4426c321187Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 4436c321187SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 4446c321187SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 4456c321187Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 4466c321187Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 4476c321187Smrg # is not polluted with repeated "-I." 4486c321187Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 4496c321187Smrg # test to see if srcdir already configured 4506c321187Smrg if test -f $srcdir/config.status; then 4516c321187Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 4526c321187Smrg fi 4536c321187Smrgfi 4546c321187Smrg 4556c321187Smrg# test whether we have cygpath 4566c321187Smrgif test -z "$CYGPATH_W"; then 4576c321187Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 4586c321187Smrg CYGPATH_W='cygpath -w' 4596c321187Smrg else 4606c321187Smrg CYGPATH_W=echo 4616c321187Smrg fi 4626c321187Smrgfi 4636c321187SmrgAC_SUBST([CYGPATH_W]) 4646c321187Smrg 4656c321187Smrg# Define the identity of the package. 4666c321187Smrgdnl Distinguish between old-style and new-style calls. 4676c321187Smrgm4_ifval([$2], 4689d0b5e55Smrg[AC_DIAGNOSE([obsolete], 4699d0b5e55Smrg [$0: two- and three-arguments forms are deprecated.]) 4709d0b5e55Smrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 4716c321187Smrg AC_SUBST([PACKAGE], [$1])dnl 4726c321187Smrg AC_SUBST([VERSION], [$2])], 4736c321187Smrg[_AM_SET_OPTIONS([$1])dnl 4746c321187Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 4759d0b5e55Smrgm4_if( 4769d0b5e55Smrg m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), 4779d0b5e55Smrg [ok:ok],, 4786c321187Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 4796c321187Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 4806c321187Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 4816c321187Smrg 4826c321187Smrg_AM_IF_OPTION([no-define],, 4839d0b5e55Smrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 4849d0b5e55Smrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 4856c321187Smrg 4866c321187Smrg# Some tools Automake needs. 4876c321187SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 4886c321187SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 4899d0b5e55SmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 4909d0b5e55SmrgAM_MISSING_PROG([AUTOCONF], [autoconf]) 4919d0b5e55SmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 4929d0b5e55SmrgAM_MISSING_PROG([AUTOHEADER], [autoheader]) 4939d0b5e55SmrgAM_MISSING_PROG([MAKEINFO], [makeinfo]) 49493493779SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 49593493779SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 4969d0b5e55SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 4979d0b5e55Smrg# For better backward compatibility. To be removed once Automake 1.9.x 4989d0b5e55Smrg# dies out for good. For more background, see: 4999d0b5e55Smrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 5009d0b5e55Smrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 5019d0b5e55SmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 5026c321187Smrg# We need awk for the "check" target. The system "awk" is bad on 5036c321187Smrg# some platforms. 5046c321187SmrgAC_REQUIRE([AC_PROG_AWK])dnl 5056c321187SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 5066c321187SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 5076c321187Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 50893493779Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 50993493779Smrg [_AM_PROG_TAR([v7])])]) 5106c321187Smrg_AM_IF_OPTION([no-dependencies],, 5116c321187Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 5129d0b5e55Smrg [_AM_DEPENDENCIES([CC])], 5139d0b5e55Smrg [m4_define([AC_PROG_CC], 5149d0b5e55Smrg m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 5156c321187SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 5169d0b5e55Smrg [_AM_DEPENDENCIES([CXX])], 5179d0b5e55Smrg [m4_define([AC_PROG_CXX], 5189d0b5e55Smrg m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 5196c321187SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 5209d0b5e55Smrg [_AM_DEPENDENCIES([OBJC])], 5219d0b5e55Smrg [m4_define([AC_PROG_OBJC], 5229d0b5e55Smrg m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 5239d0b5e55SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 5249d0b5e55Smrg [_AM_DEPENDENCIES([OBJCXX])], 5259d0b5e55Smrg [m4_define([AC_PROG_OBJCXX], 5269d0b5e55Smrg m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 5276c321187Smrg]) 5289d0b5e55SmrgAC_REQUIRE([AM_SILENT_RULES])dnl 5299d0b5e55Smrgdnl The testsuite driver may need to know about EXEEXT, so add the 5309d0b5e55Smrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 5319d0b5e55Smrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 53293493779SmrgAC_CONFIG_COMMANDS_PRE(dnl 53393493779Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 53493493779Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 5356c321187Smrg 5369d0b5e55Smrg# POSIX will say in a future version that running "rm -f" with no argument 5379d0b5e55Smrg# is OK; and we want to be able to make that assumption in our Makefile 5389d0b5e55Smrg# recipes. So use an aggressive probe to check that the usage we want is 5399d0b5e55Smrg# actually supported "in the wild" to an acceptable degree. 5409d0b5e55Smrg# See automake bug#10828. 5419d0b5e55Smrg# To make any issue more visible, cause the running configure to be aborted 5429d0b5e55Smrg# by default if the 'rm' program in use doesn't match our expectations; the 5439d0b5e55Smrg# user can still override this though. 5449d0b5e55Smrgif rm -f && rm -fr && rm -rf; then : OK; else 5459d0b5e55Smrg cat >&2 <<'END' 5469d0b5e55SmrgOops! 5479d0b5e55Smrg 5489d0b5e55SmrgYour 'rm' program seems unable to run without file operands specified 5499d0b5e55Smrgon the command line, even when the '-f' option is present. This is contrary 5509d0b5e55Smrgto the behaviour of most rm programs out there, and not conforming with 5519d0b5e55Smrgthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 5529d0b5e55Smrg 5539d0b5e55SmrgPlease tell bug-automake@gnu.org about your system, including the value 5549d0b5e55Smrgof your $PATH and any error possibly output before this message. This 5559d0b5e55Smrgcan help us improve future automake versions. 5569d0b5e55Smrg 5579d0b5e55SmrgEND 5589d0b5e55Smrg if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 5599d0b5e55Smrg echo 'Configuration will proceed anyway, since you have set the' >&2 5609d0b5e55Smrg echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 5619d0b5e55Smrg echo >&2 5629d0b5e55Smrg else 5639d0b5e55Smrg cat >&2 <<'END' 5649d0b5e55SmrgAborting the configuration process, to ensure you take notice of the issue. 5659d0b5e55Smrg 5669d0b5e55SmrgYou can download and install GNU coreutils to get an 'rm' implementation 5679d0b5e55Smrgthat behaves properly: <http://www.gnu.org/software/coreutils/>. 5689d0b5e55Smrg 5699d0b5e55SmrgIf you want to complete the configuration process using your problematic 5709d0b5e55Smrg'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 5719d0b5e55Smrgto "yes", and re-run configure. 5729d0b5e55Smrg 5739d0b5e55SmrgEND 5749d0b5e55Smrg AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 5759d0b5e55Smrg fi 5769d0b5e55Smrgfi]) 5779d0b5e55Smrg 5789d0b5e55Smrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 57993493779Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 58093493779Smrgdnl mangled by Autoconf and run in a shell conditional statement. 58193493779Smrgm4_define([_AC_COMPILER_EXEEXT], 58293493779Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 58393493779Smrg 5846c321187Smrg# When config.status generates a header, we must update the stamp-h file. 5856c321187Smrg# This file resides in the same directory as the config header 5866c321187Smrg# that is generated. The stamp files are numbered to have different names. 5876c321187Smrg 5886c321187Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 5896c321187Smrg# loop where config.status creates the headers, so we can generate 5906c321187Smrg# our stamp files there. 5916c321187SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 5926c321187Smrg[# Compute $1's index in $config_headers. 59393493779Smrg_am_arg=$1 5946c321187Smrg_am_stamp_count=1 5956c321187Smrgfor _am_header in $config_headers :; do 5966c321187Smrg case $_am_header in 59793493779Smrg $_am_arg | $_am_arg:* ) 5986c321187Smrg break ;; 5996c321187Smrg * ) 6006c321187Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 6016c321187Smrg esac 6026c321187Smrgdone 60393493779Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 6046c321187Smrg 6059d0b5e55Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 6066c321187Smrg# 6076c321187Smrg# This file is free software; the Free Software Foundation 6086c321187Smrg# gives unlimited permission to copy and/or distribute it, 6096c321187Smrg# with or without modifications, as long as this notice is preserved. 6106c321187Smrg 6116c321187Smrg# AM_PROG_INSTALL_SH 6126c321187Smrg# ------------------ 6136c321187Smrg# Define $install_sh. 6146c321187SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 6156c321187Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 61693493779Smrgif test x"${install_sh}" != xset; then 61793493779Smrg case $am_aux_dir in 61893493779Smrg *\ * | *\ *) 61993493779Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 62093493779Smrg *) 62193493779Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 62293493779Smrg esac 62393493779Smrgfi 6249d0b5e55SmrgAC_SUBST([install_sh])]) 6256c321187Smrg 6269d0b5e55Smrg# Copyright (C) 2003-2013 Free Software Foundation, Inc. 6276c321187Smrg# 6286c321187Smrg# This file is free software; the Free Software Foundation 6296c321187Smrg# gives unlimited permission to copy and/or distribute it, 6306c321187Smrg# with or without modifications, as long as this notice is preserved. 6316c321187Smrg 6326c321187Smrg# Check whether the underlying file-system supports filenames 6336c321187Smrg# with a leading dot. For instance MS-DOS doesn't. 6346c321187SmrgAC_DEFUN([AM_SET_LEADING_DOT], 6356c321187Smrg[rm -rf .tst 2>/dev/null 6366c321187Smrgmkdir .tst 2>/dev/null 6376c321187Smrgif test -d .tst; then 6386c321187Smrg am__leading_dot=. 6396c321187Smrgelse 6406c321187Smrg am__leading_dot=_ 6416c321187Smrgfi 6426c321187Smrgrmdir .tst 2>/dev/null 6436c321187SmrgAC_SUBST([am__leading_dot])]) 6446c321187Smrg 6456c321187Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 6466c321187Smrg 6479d0b5e55Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 6486c321187Smrg# 6496c321187Smrg# This file is free software; the Free Software Foundation 6506c321187Smrg# gives unlimited permission to copy and/or distribute it, 6516c321187Smrg# with or without modifications, as long as this notice is preserved. 6526c321187Smrg 6536c321187Smrg# AM_MAKE_INCLUDE() 6546c321187Smrg# ----------------- 6556c321187Smrg# Check to see how make treats includes. 6566c321187SmrgAC_DEFUN([AM_MAKE_INCLUDE], 6576c321187Smrg[am_make=${MAKE-make} 6586c321187Smrgcat > confinc << 'END' 6596c321187Smrgam__doit: 66093493779Smrg @echo this is the am__doit target 6616c321187Smrg.PHONY: am__doit 6626c321187SmrgEND 6636c321187Smrg# If we don't find an include directive, just comment out the code. 6646c321187SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 6656c321187Smrgam__include="#" 6666c321187Smrgam__quote= 6676c321187Smrg_am_result=none 6686c321187Smrg# First try GNU make style include. 6696c321187Smrgecho "include confinc" > confmf 6709d0b5e55Smrg# Ignore all kinds of additional output from 'make'. 67193493779Smrgcase `$am_make -s -f confmf 2> /dev/null` in #( 67293493779Smrg*the\ am__doit\ target*) 67393493779Smrg am__include=include 67493493779Smrg am__quote= 67593493779Smrg _am_result=GNU 67693493779Smrg ;; 67793493779Smrgesac 6786c321187Smrg# Now try BSD make style include. 6796c321187Smrgif test "$am__include" = "#"; then 6806c321187Smrg echo '.include "confinc"' > confmf 68193493779Smrg case `$am_make -s -f confmf 2> /dev/null` in #( 68293493779Smrg *the\ am__doit\ target*) 68393493779Smrg am__include=.include 68493493779Smrg am__quote="\"" 68593493779Smrg _am_result=BSD 68693493779Smrg ;; 68793493779Smrg esac 6886c321187Smrgfi 6896c321187SmrgAC_SUBST([am__include]) 6906c321187SmrgAC_SUBST([am__quote]) 6916c321187SmrgAC_MSG_RESULT([$_am_result]) 6926c321187Smrgrm -f confinc confmf 6936c321187Smrg]) 6946c321187Smrg 6956c321187Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 6966c321187Smrg 6979d0b5e55Smrg# Copyright (C) 1997-2013 Free Software Foundation, Inc. 6986c321187Smrg# 6996c321187Smrg# This file is free software; the Free Software Foundation 7006c321187Smrg# gives unlimited permission to copy and/or distribute it, 7016c321187Smrg# with or without modifications, as long as this notice is preserved. 7026c321187Smrg 7036c321187Smrg# AM_MISSING_PROG(NAME, PROGRAM) 7046c321187Smrg# ------------------------------ 7056c321187SmrgAC_DEFUN([AM_MISSING_PROG], 7066c321187Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 7076c321187Smrg$1=${$1-"${am_missing_run}$2"} 7086c321187SmrgAC_SUBST($1)]) 7096c321187Smrg 7106c321187Smrg# AM_MISSING_HAS_RUN 7116c321187Smrg# ------------------ 7129d0b5e55Smrg# Define MISSING if not defined so far and test if it is modern enough. 7139d0b5e55Smrg# If it is, set am_missing_run to use it, otherwise, to nothing. 7146c321187SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 7156c321187Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 7166c321187SmrgAC_REQUIRE_AUX_FILE([missing])dnl 71793493779Smrgif test x"${MISSING+set}" != xset; then 71893493779Smrg case $am_aux_dir in 71993493779Smrg *\ * | *\ *) 72093493779Smrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 72193493779Smrg *) 72293493779Smrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 72393493779Smrg esac 72493493779Smrgfi 7256c321187Smrg# Use eval to expand $SHELL 7269d0b5e55Smrgif eval "$MISSING --is-lightweight"; then 7279d0b5e55Smrg am_missing_run="$MISSING " 7286c321187Smrgelse 7296c321187Smrg am_missing_run= 7309d0b5e55Smrg AC_MSG_WARN(['missing' script is too old or missing]) 7316c321187Smrgfi 7326c321187Smrg]) 7336c321187Smrg 7346c321187Smrg# Helper functions for option handling. -*- Autoconf -*- 7356c321187Smrg 7369d0b5e55Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 7376c321187Smrg# 7386c321187Smrg# This file is free software; the Free Software Foundation 7396c321187Smrg# gives unlimited permission to copy and/or distribute it, 7406c321187Smrg# with or without modifications, as long as this notice is preserved. 7416c321187Smrg 7426c321187Smrg# _AM_MANGLE_OPTION(NAME) 7436c321187Smrg# ----------------------- 7446c321187SmrgAC_DEFUN([_AM_MANGLE_OPTION], 7456c321187Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 7466c321187Smrg 7476c321187Smrg# _AM_SET_OPTION(NAME) 7489d0b5e55Smrg# -------------------- 7496c321187Smrg# Set option NAME. Presently that only means defining a flag for this option. 7506c321187SmrgAC_DEFUN([_AM_SET_OPTION], 7519d0b5e55Smrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 7526c321187Smrg 7536c321187Smrg# _AM_SET_OPTIONS(OPTIONS) 7549d0b5e55Smrg# ------------------------ 7556c321187Smrg# OPTIONS is a space-separated list of Automake options. 7566c321187SmrgAC_DEFUN([_AM_SET_OPTIONS], 75793493779Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 7586c321187Smrg 7596c321187Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 7606c321187Smrg# ------------------------------------------- 7616c321187Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 7626c321187SmrgAC_DEFUN([_AM_IF_OPTION], 7636c321187Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 7646c321187Smrg 7659d0b5e55Smrg# Copyright (C) 1999-2013 Free Software Foundation, Inc. 7669d0b5e55Smrg# 7679d0b5e55Smrg# This file is free software; the Free Software Foundation 7689d0b5e55Smrg# gives unlimited permission to copy and/or distribute it, 7699d0b5e55Smrg# with or without modifications, as long as this notice is preserved. 7709d0b5e55Smrg 7719d0b5e55Smrg# _AM_PROG_CC_C_O 7729d0b5e55Smrg# --------------- 7739d0b5e55Smrg# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 7749d0b5e55Smrg# to automatically call this. 7759d0b5e55SmrgAC_DEFUN([_AM_PROG_CC_C_O], 7769d0b5e55Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 7779d0b5e55SmrgAC_REQUIRE_AUX_FILE([compile])dnl 7789d0b5e55SmrgAC_LANG_PUSH([C])dnl 7799d0b5e55SmrgAC_CACHE_CHECK( 7809d0b5e55Smrg [whether $CC understands -c and -o together], 7819d0b5e55Smrg [am_cv_prog_cc_c_o], 7829d0b5e55Smrg [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 7839d0b5e55Smrg # Make sure it works both with $CC and with simple cc. 7849d0b5e55Smrg # Following AC_PROG_CC_C_O, we do the test twice because some 7859d0b5e55Smrg # compilers refuse to overwrite an existing .o file with -o, 7869d0b5e55Smrg # though they will create one. 7879d0b5e55Smrg am_cv_prog_cc_c_o=yes 7889d0b5e55Smrg for am_i in 1 2; do 7899d0b5e55Smrg if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 7909d0b5e55Smrg && test -f conftest2.$ac_objext; then 7919d0b5e55Smrg : OK 7929d0b5e55Smrg else 7939d0b5e55Smrg am_cv_prog_cc_c_o=no 7949d0b5e55Smrg break 7959d0b5e55Smrg fi 7969d0b5e55Smrg done 7979d0b5e55Smrg rm -f core conftest* 7989d0b5e55Smrg unset am_i]) 7999d0b5e55Smrgif test "$am_cv_prog_cc_c_o" != yes; then 8009d0b5e55Smrg # Losing compiler, so override with the script. 8019d0b5e55Smrg # FIXME: It is wrong to rewrite CC. 8029d0b5e55Smrg # But if we don't then we get into trouble of one sort or another. 8039d0b5e55Smrg # A longer-term fix would be to have automake use am__CC in this case, 8049d0b5e55Smrg # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 8059d0b5e55Smrg CC="$am_aux_dir/compile $CC" 8069d0b5e55Smrgfi 8079d0b5e55SmrgAC_LANG_POP([C])]) 8089d0b5e55Smrg 8099d0b5e55Smrg# For backward compatibility. 8109d0b5e55SmrgAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 8116c321187Smrg 8129d0b5e55Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 8136c321187Smrg# 8146c321187Smrg# This file is free software; the Free Software Foundation 8156c321187Smrg# gives unlimited permission to copy and/or distribute it, 8166c321187Smrg# with or without modifications, as long as this notice is preserved. 8176c321187Smrg 8189d0b5e55Smrg# AM_RUN_LOG(COMMAND) 8199d0b5e55Smrg# ------------------- 8209d0b5e55Smrg# Run COMMAND, save the exit status in ac_status, and log it. 8219d0b5e55Smrg# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 8229d0b5e55SmrgAC_DEFUN([AM_RUN_LOG], 8239d0b5e55Smrg[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 8249d0b5e55Smrg ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 8259d0b5e55Smrg ac_status=$? 8269d0b5e55Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 8279d0b5e55Smrg (exit $ac_status); }]) 8289d0b5e55Smrg 8299d0b5e55Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 8309d0b5e55Smrg 8319d0b5e55Smrg# Copyright (C) 1996-2013 Free Software Foundation, Inc. 8329d0b5e55Smrg# 8339d0b5e55Smrg# This file is free software; the Free Software Foundation 8349d0b5e55Smrg# gives unlimited permission to copy and/or distribute it, 8359d0b5e55Smrg# with or without modifications, as long as this notice is preserved. 8366c321187Smrg 8376c321187Smrg# AM_SANITY_CHECK 8386c321187Smrg# --------------- 8396c321187SmrgAC_DEFUN([AM_SANITY_CHECK], 8406c321187Smrg[AC_MSG_CHECKING([whether build environment is sane]) 84193493779Smrg# Reject unsafe characters in $srcdir or the absolute working directory 84293493779Smrg# name. Accept space and tab only in the latter. 84393493779Smrgam_lf=' 84493493779Smrg' 84593493779Smrgcase `pwd` in 84693493779Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 84793493779Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 84893493779Smrgesac 84993493779Smrgcase $srcdir in 85093493779Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 8519d0b5e55Smrg AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 85293493779Smrgesac 85393493779Smrg 8549d0b5e55Smrg# Do 'set' in a subshell so we don't clobber the current shell's 8556c321187Smrg# arguments. Must try -L first in case configure is actually a 8566c321187Smrg# symlink; some systems play weird games with the mod time of symlinks 8576c321187Smrg# (eg FreeBSD returns the mod time of the symlink's containing 8586c321187Smrg# directory). 8596c321187Smrgif ( 8609d0b5e55Smrg am_has_slept=no 8619d0b5e55Smrg for am_try in 1 2; do 8629d0b5e55Smrg echo "timestamp, slept: $am_has_slept" > conftest.file 8639d0b5e55Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 8649d0b5e55Smrg if test "$[*]" = "X"; then 8659d0b5e55Smrg # -L didn't work. 8669d0b5e55Smrg set X `ls -t "$srcdir/configure" conftest.file` 8679d0b5e55Smrg fi 8689d0b5e55Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 8699d0b5e55Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 8709d0b5e55Smrg 8719d0b5e55Smrg # If neither matched, then we have a broken ls. This can happen 8729d0b5e55Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 8739d0b5e55Smrg # broken ls alias from the environment. This has actually 8749d0b5e55Smrg # happened. Such a system could not be considered "sane". 8759d0b5e55Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 8769d0b5e55Smrg alias in your environment]) 8779d0b5e55Smrg fi 8789d0b5e55Smrg if test "$[2]" = conftest.file || test $am_try -eq 2; then 8799d0b5e55Smrg break 8809d0b5e55Smrg fi 8819d0b5e55Smrg # Just in case. 8829d0b5e55Smrg sleep 1 8839d0b5e55Smrg am_has_slept=yes 8849d0b5e55Smrg done 8856c321187Smrg test "$[2]" = conftest.file 8866c321187Smrg ) 8876c321187Smrgthen 8886c321187Smrg # Ok. 8896c321187Smrg : 8906c321187Smrgelse 8916c321187Smrg AC_MSG_ERROR([newly created file is older than distributed files! 8926c321187SmrgCheck your system clock]) 8936c321187Smrgfi 8949d0b5e55SmrgAC_MSG_RESULT([yes]) 8959d0b5e55Smrg# If we didn't sleep, we still need to ensure time stamps of config.status and 8969d0b5e55Smrg# generated files are strictly newer. 8979d0b5e55Smrgam_sleep_pid= 8989d0b5e55Smrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then 8999d0b5e55Smrg ( sleep 1 ) & 9009d0b5e55Smrg am_sleep_pid=$! 9019d0b5e55Smrgfi 9029d0b5e55SmrgAC_CONFIG_COMMANDS_PRE( 9039d0b5e55Smrg [AC_MSG_CHECKING([that generated files are newer than configure]) 9049d0b5e55Smrg if test -n "$am_sleep_pid"; then 9059d0b5e55Smrg # Hide warnings about reused PIDs. 9069d0b5e55Smrg wait $am_sleep_pid 2>/dev/null 9079d0b5e55Smrg fi 9089d0b5e55Smrg AC_MSG_RESULT([done])]) 9099d0b5e55Smrgrm -f conftest.file 9109d0b5e55Smrg]) 9116c321187Smrg 9129d0b5e55Smrg# Copyright (C) 2009-2013 Free Software Foundation, Inc. 91393493779Smrg# 91493493779Smrg# This file is free software; the Free Software Foundation 91593493779Smrg# gives unlimited permission to copy and/or distribute it, 91693493779Smrg# with or without modifications, as long as this notice is preserved. 91793493779Smrg 91893493779Smrg# AM_SILENT_RULES([DEFAULT]) 91993493779Smrg# -------------------------- 92093493779Smrg# Enable less verbose build rules; with the default set to DEFAULT 9219d0b5e55Smrg# ("yes" being less verbose, "no" or empty being verbose). 92293493779SmrgAC_DEFUN([AM_SILENT_RULES], 9239d0b5e55Smrg[AC_ARG_ENABLE([silent-rules], [dnl 9249d0b5e55SmrgAS_HELP_STRING( 9259d0b5e55Smrg [--enable-silent-rules], 9269d0b5e55Smrg [less verbose build output (undo: "make V=1")]) 9279d0b5e55SmrgAS_HELP_STRING( 9289d0b5e55Smrg [--disable-silent-rules], 9299d0b5e55Smrg [verbose build output (undo: "make V=0")])dnl 9309d0b5e55Smrg]) 9319d0b5e55Smrgcase $enable_silent_rules in @%:@ ((( 9329d0b5e55Smrg yes) AM_DEFAULT_VERBOSITY=0;; 9339d0b5e55Smrg no) AM_DEFAULT_VERBOSITY=1;; 9349d0b5e55Smrg *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 93593493779Smrgesac 9369d0b5e55Smrgdnl 9379d0b5e55Smrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 9389d0b5e55Smrgdnl do not support nested variable expansions. 9399d0b5e55Smrgdnl See automake bug#9928 and bug#10237. 9409d0b5e55Smrgam_make=${MAKE-make} 9419d0b5e55SmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 9429d0b5e55Smrg [am_cv_make_support_nested_variables], 9439d0b5e55Smrg [if AS_ECHO([['TRUE=$(BAR$(V)) 9449d0b5e55SmrgBAR0=false 9459d0b5e55SmrgBAR1=true 9469d0b5e55SmrgV=1 9479d0b5e55Smrgam__doit: 9489d0b5e55Smrg @$(TRUE) 9499d0b5e55Smrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 9509d0b5e55Smrg am_cv_make_support_nested_variables=yes 9519d0b5e55Smrgelse 9529d0b5e55Smrg am_cv_make_support_nested_variables=no 9539d0b5e55Smrgfi]) 9549d0b5e55Smrgif test $am_cv_make_support_nested_variables = yes; then 9559d0b5e55Smrg dnl Using '$V' instead of '$(V)' breaks IRIX make. 9569d0b5e55Smrg AM_V='$(V)' 9579d0b5e55Smrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 9589d0b5e55Smrgelse 9599d0b5e55Smrg AM_V=$AM_DEFAULT_VERBOSITY 9609d0b5e55Smrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 9619d0b5e55Smrgfi 9629d0b5e55SmrgAC_SUBST([AM_V])dnl 9639d0b5e55SmrgAM_SUBST_NOTMAKE([AM_V])dnl 9649d0b5e55SmrgAC_SUBST([AM_DEFAULT_V])dnl 9659d0b5e55SmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 96693493779SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 96793493779SmrgAM_BACKSLASH='\' 96893493779SmrgAC_SUBST([AM_BACKSLASH])dnl 96993493779Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 97093493779Smrg]) 97193493779Smrg 9729d0b5e55Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 9736c321187Smrg# 9746c321187Smrg# This file is free software; the Free Software Foundation 9756c321187Smrg# gives unlimited permission to copy and/or distribute it, 9766c321187Smrg# with or without modifications, as long as this notice is preserved. 9776c321187Smrg 9786c321187Smrg# AM_PROG_INSTALL_STRIP 9796c321187Smrg# --------------------- 9809d0b5e55Smrg# One issue with vendor 'install' (even GNU) is that you can't 9816c321187Smrg# specify the program used to strip binaries. This is especially 9826c321187Smrg# annoying in cross-compiling environments, where the build's strip 9836c321187Smrg# is unlikely to handle the host's binaries. 9846c321187Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 9859d0b5e55Smrg# always use install-sh in "make install-strip", and initialize 9866c321187Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 9876c321187SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 9886c321187Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 9899d0b5e55Smrg# Installed binaries are usually stripped using 'strip' when the user 9909d0b5e55Smrg# run "make install-strip". However 'strip' might not be the right 9916c321187Smrg# tool to use in cross-compilation environments, therefore Automake 9929d0b5e55Smrg# will honor the 'STRIP' environment variable to overrule this program. 9939d0b5e55Smrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 9946c321187Smrgif test "$cross_compiling" != no; then 9956c321187Smrg AC_CHECK_TOOL([STRIP], [strip], :) 9966c321187Smrgfi 9976c321187SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 9986c321187SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 9996c321187Smrg 10009d0b5e55Smrg# Copyright (C) 2006-2013 Free Software Foundation, Inc. 10016c321187Smrg# 10026c321187Smrg# This file is free software; the Free Software Foundation 10036c321187Smrg# gives unlimited permission to copy and/or distribute it, 10046c321187Smrg# with or without modifications, as long as this notice is preserved. 10056c321187Smrg 10066c321187Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 10076c321187Smrg# --------------------------- 100893493779Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 10096c321187Smrg# This macro is traced by Automake. 10106c321187SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 10116c321187Smrg 101293493779Smrg# AM_SUBST_NOTMAKE(VARIABLE) 10139d0b5e55Smrg# -------------------------- 101493493779Smrg# Public sister of _AM_SUBST_NOTMAKE. 101593493779SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 101693493779Smrg 10176c321187Smrg# Check how to create a tarball. -*- Autoconf -*- 10186c321187Smrg 10199d0b5e55Smrg# Copyright (C) 2004-2013 Free Software Foundation, Inc. 10206c321187Smrg# 10216c321187Smrg# This file is free software; the Free Software Foundation 10226c321187Smrg# gives unlimited permission to copy and/or distribute it, 10236c321187Smrg# with or without modifications, as long as this notice is preserved. 10246c321187Smrg 10256c321187Smrg# _AM_PROG_TAR(FORMAT) 10266c321187Smrg# -------------------- 10276c321187Smrg# Check how to create a tarball in format FORMAT. 10289d0b5e55Smrg# FORMAT should be one of 'v7', 'ustar', or 'pax'. 10296c321187Smrg# 10306c321187Smrg# Substitute a variable $(am__tar) that is a command 10316c321187Smrg# writing to stdout a FORMAT-tarball containing the directory 10326c321187Smrg# $tardir. 10336c321187Smrg# tardir=directory && $(am__tar) > result.tar 10346c321187Smrg# 10356c321187Smrg# Substitute a variable $(am__untar) that extract such 10366c321187Smrg# a tarball read from stdin. 10376c321187Smrg# $(am__untar) < result.tar 10386c321187Smrg# 10399d0b5e55SmrgAC_DEFUN([_AM_PROG_TAR], 10409d0b5e55Smrg[# Always define AMTAR for backward compatibility. Yes, it's still used 10419d0b5e55Smrg# in the wild :-( We should find a proper way to deprecate it ... 10429d0b5e55SmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 10436c321187Smrg 10449d0b5e55Smrg# We'll loop over all known methods to create a tar archive until one works. 10459d0b5e55Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 10466c321187Smrg 10479d0b5e55Smrgm4_if([$1], [v7], 10489d0b5e55Smrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 10499d0b5e55Smrg 10509d0b5e55Smrg [m4_case([$1], 10519d0b5e55Smrg [ustar], 10529d0b5e55Smrg [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 10539d0b5e55Smrg # There is notably a 21 bits limit for the UID and the GID. In fact, 10549d0b5e55Smrg # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 10559d0b5e55Smrg # and bug#13588). 10569d0b5e55Smrg am_max_uid=2097151 # 2^21 - 1 10579d0b5e55Smrg am_max_gid=$am_max_uid 10589d0b5e55Smrg # The $UID and $GID variables are not portable, so we need to resort 10599d0b5e55Smrg # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 10609d0b5e55Smrg # below are definitely unexpected, so allow the users to see them 10619d0b5e55Smrg # (that is, avoid stderr redirection). 10629d0b5e55Smrg am_uid=`id -u || echo unknown` 10639d0b5e55Smrg am_gid=`id -g || echo unknown` 10649d0b5e55Smrg AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 10659d0b5e55Smrg if test $am_uid -le $am_max_uid; then 10669d0b5e55Smrg AC_MSG_RESULT([yes]) 10679d0b5e55Smrg else 10689d0b5e55Smrg AC_MSG_RESULT([no]) 10699d0b5e55Smrg _am_tools=none 10709d0b5e55Smrg fi 10719d0b5e55Smrg AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 10729d0b5e55Smrg if test $am_gid -le $am_max_gid; then 10739d0b5e55Smrg AC_MSG_RESULT([yes]) 10749d0b5e55Smrg else 10759d0b5e55Smrg AC_MSG_RESULT([no]) 10769d0b5e55Smrg _am_tools=none 10779d0b5e55Smrg fi], 10786c321187Smrg 10799d0b5e55Smrg [pax], 10809d0b5e55Smrg [], 10816c321187Smrg 10829d0b5e55Smrg [m4_fatal([Unknown tar format])]) 1083e120bd27Smrg 10849d0b5e55Smrg AC_MSG_CHECKING([how to create a $1 tar archive]) 1085e120bd27Smrg 10869d0b5e55Smrg # Go ahead even if we have the value already cached. We do so because we 10879d0b5e55Smrg # need to set the values for the 'am__tar' and 'am__untar' variables. 10889d0b5e55Smrg _am_tools=${am_cv_prog_tar_$1-$_am_tools} 10896c321187Smrg 10909d0b5e55Smrg for _am_tool in $_am_tools; do 10919d0b5e55Smrg case $_am_tool in 10929d0b5e55Smrg gnutar) 10939d0b5e55Smrg for _am_tar in tar gnutar gtar; do 10949d0b5e55Smrg AM_RUN_LOG([$_am_tar --version]) && break 10959d0b5e55Smrg done 10969d0b5e55Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 10979d0b5e55Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 10989d0b5e55Smrg am__untar="$_am_tar -xf -" 10999d0b5e55Smrg ;; 11009d0b5e55Smrg plaintar) 11019d0b5e55Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 11029d0b5e55Smrg # ustar tarball either. 11039d0b5e55Smrg (tar --version) >/dev/null 2>&1 && continue 11049d0b5e55Smrg am__tar='tar chf - "$$tardir"' 11059d0b5e55Smrg am__tar_='tar chf - "$tardir"' 11069d0b5e55Smrg am__untar='tar xf -' 11079d0b5e55Smrg ;; 11089d0b5e55Smrg pax) 11099d0b5e55Smrg am__tar='pax -L -x $1 -w "$$tardir"' 11109d0b5e55Smrg am__tar_='pax -L -x $1 -w "$tardir"' 11119d0b5e55Smrg am__untar='pax -r' 11129d0b5e55Smrg ;; 11139d0b5e55Smrg cpio) 11149d0b5e55Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 11159d0b5e55Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 11169d0b5e55Smrg am__untar='cpio -i -H $1 -d' 11179d0b5e55Smrg ;; 11189d0b5e55Smrg none) 11199d0b5e55Smrg am__tar=false 11209d0b5e55Smrg am__tar_=false 11219d0b5e55Smrg am__untar=false 11229d0b5e55Smrg ;; 11239d0b5e55Smrg esac 1124e120bd27Smrg 11259d0b5e55Smrg # If the value was cached, stop now. We just wanted to have am__tar 11269d0b5e55Smrg # and am__untar set. 11279d0b5e55Smrg test -n "${am_cv_prog_tar_$1}" && break 11289d0b5e55Smrg 11299d0b5e55Smrg # tar/untar a dummy directory, and stop if the command works. 11309d0b5e55Smrg rm -rf conftest.dir 11319d0b5e55Smrg mkdir conftest.dir 11329d0b5e55Smrg echo GrepMe > conftest.dir/file 11339d0b5e55Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 11349d0b5e55Smrg rm -rf conftest.dir 11359d0b5e55Smrg if test -s conftest.tar; then 11369d0b5e55Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 11379d0b5e55Smrg AM_RUN_LOG([cat conftest.dir/file]) 11389d0b5e55Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 11399d0b5e55Smrg fi 11409d0b5e55Smrg done 11419d0b5e55Smrg rm -rf conftest.dir 11420cc2eac3Smrg 11439d0b5e55Smrg AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 11449d0b5e55Smrg AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 11450cc2eac3Smrg 11469d0b5e55SmrgAC_SUBST([am__tar]) 11479d0b5e55SmrgAC_SUBST([am__untar]) 11489d0b5e55Smrg]) # _AM_PROG_TAR 1149e120bd27Smrg 11500cc2eac3Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 11510cc2eac3Smrg# 11520cc2eac3Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 11539d0b5e55Smrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 11549d0b5e55Smrg# Foundation, Inc. 11550cc2eac3Smrg# Written by Gordon Matzigkeit, 1996 11560cc2eac3Smrg# 11570cc2eac3Smrg# This file is free software; the Free Software Foundation gives 11580cc2eac3Smrg# unlimited permission to copy and/or distribute it, with or without 11590cc2eac3Smrg# modifications, as long as this notice is preserved. 1160e120bd27Smrg 11610cc2eac3Smrgm4_define([_LT_COPYING], [dnl 11620cc2eac3Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 11639d0b5e55Smrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 11649d0b5e55Smrg# Foundation, Inc. 11650cc2eac3Smrg# Written by Gordon Matzigkeit, 1996 11666c321187Smrg# 11670cc2eac3Smrg# This file is part of GNU Libtool. 11680cc2eac3Smrg# 11690cc2eac3Smrg# GNU Libtool is free software; you can redistribute it and/or 11700cc2eac3Smrg# modify it under the terms of the GNU General Public License as 11710cc2eac3Smrg# published by the Free Software Foundation; either version 2 of 11720cc2eac3Smrg# the License, or (at your option) any later version. 11730cc2eac3Smrg# 11740cc2eac3Smrg# As a special exception to the GNU General Public License, 11750cc2eac3Smrg# if you distribute this file as part of a program or library that 11760cc2eac3Smrg# is built using GNU Libtool, you may include this file under the 11770cc2eac3Smrg# same distribution terms that you use for the rest of that program. 11780cc2eac3Smrg# 11790cc2eac3Smrg# GNU Libtool is distributed in the hope that it will be useful, 11800cc2eac3Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 11810cc2eac3Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11820cc2eac3Smrg# GNU General Public License for more details. 11830cc2eac3Smrg# 11840cc2eac3Smrg# You should have received a copy of the GNU General Public License 11850cc2eac3Smrg# along with GNU Libtool; see the file COPYING. If not, a copy 11860cc2eac3Smrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 11870cc2eac3Smrg# obtained by writing to the Free Software Foundation, Inc., 11880cc2eac3Smrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 11890cc2eac3Smrg]) 11906c321187Smrg 11910cc2eac3Smrg# serial 57 LT_INIT 11926c321187Smrg 11936c321187Smrg 11940cc2eac3Smrg# LT_PREREQ(VERSION) 11950cc2eac3Smrg# ------------------ 11960cc2eac3Smrg# Complain and exit if this libtool version is less that VERSION. 11970cc2eac3Smrgm4_defun([LT_PREREQ], 11980cc2eac3Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 11990cc2eac3Smrg [m4_default([$3], 12000cc2eac3Smrg [m4_fatal([Libtool version $1 or higher is required], 12010cc2eac3Smrg 63)])], 12020cc2eac3Smrg [$2])]) 12036c321187Smrg 12046c321187Smrg 12050cc2eac3Smrg# _LT_CHECK_BUILDDIR 12060cc2eac3Smrg# ------------------ 12070cc2eac3Smrg# Complain if the absolute build directory name contains unusual characters 12080cc2eac3Smrgm4_defun([_LT_CHECK_BUILDDIR], 12090cc2eac3Smrg[case `pwd` in 12100cc2eac3Smrg *\ * | *\ *) 12110cc2eac3Smrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 12120cc2eac3Smrgesac 12130cc2eac3Smrg]) 12146c321187Smrg 12156c321187Smrg 12160cc2eac3Smrg# LT_INIT([OPTIONS]) 12170cc2eac3Smrg# ------------------ 12180cc2eac3SmrgAC_DEFUN([LT_INIT], 12190cc2eac3Smrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 12200cc2eac3SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 12210cc2eac3SmrgAC_BEFORE([$0], [LT_LANG])dnl 12220cc2eac3SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 12230cc2eac3SmrgAC_BEFORE([$0], [LTDL_INIT])dnl 12240cc2eac3Smrgm4_require([_LT_CHECK_BUILDDIR])dnl 12256c321187Smrg 12260cc2eac3Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 12270cc2eac3Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 12280cc2eac3Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 12290cc2eac3Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 12300cc2eac3Smrgdnl unless we require an AC_DEFUNed macro: 12310cc2eac3SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 12320cc2eac3SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 12330cc2eac3SmrgAC_REQUIRE([LTVERSION_VERSION])dnl 12340cc2eac3SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 12350cc2eac3Smrgm4_require([_LT_PROG_LTMAIN])dnl 12366c321187Smrg 12370cc2eac3Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 12386c321187Smrg 12390cc2eac3Smrgdnl Parse OPTIONS 12400cc2eac3Smrg_LT_SET_OPTIONS([$0], [$1]) 12416c321187Smrg 12420cc2eac3Smrg# This can be used to rebuild libtool when needed 12430cc2eac3SmrgLIBTOOL_DEPS="$ltmain" 12446c321187Smrg 12450cc2eac3Smrg# Always use our own libtool. 12460cc2eac3SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 12470cc2eac3SmrgAC_SUBST(LIBTOOL)dnl 1248e120bd27Smrg 12490cc2eac3Smrg_LT_SETUP 12506c321187Smrg 12510cc2eac3Smrg# Only expand once: 12520cc2eac3Smrgm4_define([LT_INIT]) 12530cc2eac3Smrg])# LT_INIT 12546c321187Smrg 12550cc2eac3Smrg# Old names: 12560cc2eac3SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 12570cc2eac3SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 12580cc2eac3Smrgdnl aclocal-1.4 backwards compatibility: 12590cc2eac3Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 12600cc2eac3Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 12616c321187Smrg 12626c321187Smrg 12630cc2eac3Smrg# _LT_CC_BASENAME(CC) 12640cc2eac3Smrg# ------------------- 12650cc2eac3Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 12660cc2eac3Smrgm4_defun([_LT_CC_BASENAME], 12670cc2eac3Smrg[for cc_temp in $1""; do 12680cc2eac3Smrg case $cc_temp in 12690cc2eac3Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 12700cc2eac3Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 12710cc2eac3Smrg \-*) ;; 12720cc2eac3Smrg *) break;; 12730cc2eac3Smrg esac 12740cc2eac3Smrgdone 12750cc2eac3Smrgcc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 12760cc2eac3Smrg]) 12776c321187Smrg 12786c321187Smrg 12790cc2eac3Smrg# _LT_FILEUTILS_DEFAULTS 12800cc2eac3Smrg# ---------------------- 12810cc2eac3Smrg# It is okay to use these file commands and assume they have been set 12820cc2eac3Smrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 12830cc2eac3Smrgm4_defun([_LT_FILEUTILS_DEFAULTS], 12840cc2eac3Smrg[: ${CP="cp -f"} 12850cc2eac3Smrg: ${MV="mv -f"} 12860cc2eac3Smrg: ${RM="rm -f"} 12870cc2eac3Smrg])# _LT_FILEUTILS_DEFAULTS 12886c321187Smrg 12896c321187Smrg 12900cc2eac3Smrg# _LT_SETUP 12910cc2eac3Smrg# --------- 12920cc2eac3Smrgm4_defun([_LT_SETUP], 12930cc2eac3Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 12940cc2eac3SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 12950cc2eac3SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 12960cc2eac3SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 1297e120bd27Smrg 12989d0b5e55Smrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 12999d0b5e55Smrgdnl 13000cc2eac3Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl 13010cc2eac3Smrg_LT_DECL([], [host], [0])dnl 13020cc2eac3Smrg_LT_DECL([], [host_os], [0])dnl 13030cc2eac3Smrgdnl 13040cc2eac3Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl 13050cc2eac3Smrg_LT_DECL([], [build], [0])dnl 13060cc2eac3Smrg_LT_DECL([], [build_os], [0])dnl 13070cc2eac3Smrgdnl 13080cc2eac3SmrgAC_REQUIRE([AC_PROG_CC])dnl 13090cc2eac3SmrgAC_REQUIRE([LT_PATH_LD])dnl 13100cc2eac3SmrgAC_REQUIRE([LT_PATH_NM])dnl 13110cc2eac3Smrgdnl 13120cc2eac3SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 13130cc2eac3Smrgtest -z "$LN_S" && LN_S="ln -s" 13140cc2eac3Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 13150cc2eac3Smrgdnl 13160cc2eac3SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 13170cc2eac3Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 13180cc2eac3Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 13190cc2eac3Smrgdnl 13200cc2eac3Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 13210cc2eac3Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 13220cc2eac3Smrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 13230cc2eac3Smrgm4_require([_LT_CMD_RELOAD])dnl 13240cc2eac3Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 13250cc2eac3Smrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 13260cc2eac3Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 13270cc2eac3Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 13280cc2eac3Smrgm4_require([_LT_WITH_SYSROOT])dnl 13290cc2eac3Smrg 13300cc2eac3Smrg_LT_CONFIG_LIBTOOL_INIT([ 13310cc2eac3Smrg# See if we are running on zsh, and set the options which allow our 13320cc2eac3Smrg# commands through without removal of \ escapes INIT. 13330cc2eac3Smrgif test -n "\${ZSH_VERSION+set}" ; then 13340cc2eac3Smrg setopt NO_GLOB_SUBST 13350cc2eac3Smrgfi 13360cc2eac3Smrg]) 13370cc2eac3Smrgif test -n "${ZSH_VERSION+set}" ; then 13380cc2eac3Smrg setopt NO_GLOB_SUBST 1339e120bd27Smrgfi 1340e120bd27Smrg 13410cc2eac3Smrg_LT_CHECK_OBJDIR 1342e120bd27Smrg 13430cc2eac3Smrgm4_require([_LT_TAG_COMPILER])dnl 1344e120bd27Smrg 13450cc2eac3Smrgcase $host_os in 13460cc2eac3Smrgaix3*) 13470cc2eac3Smrg # AIX sometimes has problems with the GCC collect2 program. For some 13480cc2eac3Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 13490cc2eac3Smrg # vanish in a puff of smoke. 13500cc2eac3Smrg if test "X${COLLECT_NAMES+set}" != Xset; then 13510cc2eac3Smrg COLLECT_NAMES= 13520cc2eac3Smrg export COLLECT_NAMES 13530cc2eac3Smrg fi 13540cc2eac3Smrg ;; 13550cc2eac3Smrgesac 1356e120bd27Smrg 13570cc2eac3Smrg# Global variables: 13580cc2eac3Smrgofile=libtool 13590cc2eac3Smrgcan_build_shared=yes 1360e120bd27Smrg 13610cc2eac3Smrg# All known linkers require a `.a' archive for static linking (except MSVC, 13620cc2eac3Smrg# which needs '.lib'). 13630cc2eac3Smrglibext=a 1364e120bd27Smrg 13650cc2eac3Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 1366e120bd27Smrg 13670cc2eac3Smrgold_CC="$CC" 13680cc2eac3Smrgold_CFLAGS="$CFLAGS" 1369e120bd27Smrg 13700cc2eac3Smrg# Set sane defaults for various variables 13710cc2eac3Smrgtest -z "$CC" && CC=cc 13720cc2eac3Smrgtest -z "$LTCC" && LTCC=$CC 13730cc2eac3Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 13740cc2eac3Smrgtest -z "$LD" && LD=ld 13750cc2eac3Smrgtest -z "$ac_objext" && ac_objext=o 1376e120bd27Smrg 13770cc2eac3Smrg_LT_CC_BASENAME([$compiler]) 1378e120bd27Smrg 13790cc2eac3Smrg# Only perform the check for file, if the check method requires it 13800cc2eac3Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 13810cc2eac3Smrgcase $deplibs_check_method in 13820cc2eac3Smrgfile_magic*) 13830cc2eac3Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 13840cc2eac3Smrg _LT_PATH_MAGIC 13850cc2eac3Smrg fi 13860cc2eac3Smrg ;; 13870cc2eac3Smrgesac 1388e120bd27Smrg 13890cc2eac3Smrg# Use C for the default configuration in the libtool script 13900cc2eac3SmrgLT_SUPPORTED_TAG([CC]) 13910cc2eac3Smrg_LT_LANG_C_CONFIG 13920cc2eac3Smrg_LT_LANG_DEFAULT_CONFIG 13930cc2eac3Smrg_LT_CONFIG_COMMANDS 13940cc2eac3Smrg])# _LT_SETUP 1395e120bd27Smrg 1396e120bd27Smrg 13970cc2eac3Smrg# _LT_PREPARE_SED_QUOTE_VARS 13980cc2eac3Smrg# -------------------------- 13990cc2eac3Smrg# Define a few sed substitution that help us do robust quoting. 14000cc2eac3Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 14010cc2eac3Smrg[# Backslashify metacharacters that are still active within 14020cc2eac3Smrg# double-quoted strings. 14030cc2eac3Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 1404e120bd27Smrg 14050cc2eac3Smrg# Same as above, but do not quote variable references. 14060cc2eac3Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 1407e120bd27Smrg 14080cc2eac3Smrg# Sed substitution to delay expansion of an escaped shell variable in a 14090cc2eac3Smrg# double_quote_subst'ed string. 14100cc2eac3Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 1411e120bd27Smrg 14120cc2eac3Smrg# Sed substitution to delay expansion of an escaped single quote. 14130cc2eac3Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 1414e120bd27Smrg 14150cc2eac3Smrg# Sed substitution to avoid accidental globbing in evaled expressions 14160cc2eac3Smrgno_glob_subst='s/\*/\\\*/g' 14170cc2eac3Smrg]) 1418e120bd27Smrg 14190cc2eac3Smrg# _LT_PROG_LTMAIN 14200cc2eac3Smrg# --------------- 14210cc2eac3Smrg# Note that this code is called both from `configure', and `config.status' 14220cc2eac3Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 14230cc2eac3Smrg# `config.status' has no value for ac_aux_dir unless we are using Automake, 14240cc2eac3Smrg# so we pass a copy along to make sure it has a sensible value anyway. 14250cc2eac3Smrgm4_defun([_LT_PROG_LTMAIN], 14260cc2eac3Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 14270cc2eac3Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 14280cc2eac3Smrgltmain="$ac_aux_dir/ltmain.sh" 14290cc2eac3Smrg])# _LT_PROG_LTMAIN 1430e120bd27Smrg 14316c321187Smrg 14326c321187Smrg 14330cc2eac3Smrg# So that we can recreate a full libtool script including additional 14340cc2eac3Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 14350cc2eac3Smrg# in macros and then make a single call at the end using the `libtool' 14360cc2eac3Smrg# label. 14376c321187Smrg 14386c321187Smrg 14390cc2eac3Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 14400cc2eac3Smrg# ---------------------------------------- 14410cc2eac3Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 14420cc2eac3Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 14430cc2eac3Smrg[m4_ifval([$1], 14440cc2eac3Smrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 14450cc2eac3Smrg [$1 14460cc2eac3Smrg])])]) 14476c321187Smrg 14480cc2eac3Smrg# Initialize. 14490cc2eac3Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 1450e120bd27Smrg 1451e120bd27Smrg 14520cc2eac3Smrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 14530cc2eac3Smrg# ------------------------------ 14540cc2eac3Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 14550cc2eac3Smrgm4_define([_LT_CONFIG_LIBTOOL], 14560cc2eac3Smrg[m4_ifval([$1], 14570cc2eac3Smrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 14580cc2eac3Smrg [$1 14590cc2eac3Smrg])])]) 1460e120bd27Smrg 14610cc2eac3Smrg# Initialize. 14620cc2eac3Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 14636c321187Smrg 14646c321187Smrg 14650cc2eac3Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 14660cc2eac3Smrg# ----------------------------------------------------- 14670cc2eac3Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 14680cc2eac3Smrg[_LT_CONFIG_LIBTOOL([$1]) 14690cc2eac3Smrg_LT_CONFIG_LIBTOOL_INIT([$2]) 14700cc2eac3Smrg]) 14716c321187Smrg 14726c321187Smrg 14730cc2eac3Smrg# _LT_FORMAT_COMMENT([COMMENT]) 14740cc2eac3Smrg# ----------------------------- 14750cc2eac3Smrg# Add leading comment marks to the start of each line, and a trailing 14760cc2eac3Smrg# full-stop to the whole comment if one is not present already. 14770cc2eac3Smrgm4_define([_LT_FORMAT_COMMENT], 14780cc2eac3Smrg[m4_ifval([$1], [ 14790cc2eac3Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 14800cc2eac3Smrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 14810cc2eac3Smrg)]) 1482e120bd27Smrg 1483e120bd27Smrg 14846c321187Smrg 14856c321187Smrg 148693493779Smrg 14870cc2eac3Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 14880cc2eac3Smrg# ------------------------------------------------------------------- 14890cc2eac3Smrg# CONFIGNAME is the name given to the value in the libtool script. 14900cc2eac3Smrg# VARNAME is the (base) name used in the configure script. 14910cc2eac3Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 14920cc2eac3Smrg# VARNAME. Any other value will be used directly. 14930cc2eac3Smrgm4_define([_LT_DECL], 14940cc2eac3Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 14950cc2eac3Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 14960cc2eac3Smrg [m4_ifval([$1], [$1], [$2])]) 14970cc2eac3Smrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 14980cc2eac3Smrg m4_ifval([$4], 14990cc2eac3Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 15000cc2eac3Smrg lt_dict_add_subkey([lt_decl_dict], [$2], 15010cc2eac3Smrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 15020cc2eac3Smrg]) 150393493779Smrg 150493493779Smrg 15050cc2eac3Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 15060cc2eac3Smrg# -------------------------------------------------------- 15070cc2eac3Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 1508e120bd27Smrg 15096c321187Smrg 15100cc2eac3Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 15110cc2eac3Smrg# ------------------------------------------------ 15120cc2eac3Smrgm4_define([lt_decl_tag_varnames], 15130cc2eac3Smrg[_lt_decl_filter([tagged?], [yes], $@)]) 15140cc2eac3Smrg 15150cc2eac3Smrg 15160cc2eac3Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 15170cc2eac3Smrg# --------------------------------------------------------- 15180cc2eac3Smrgm4_define([_lt_decl_filter], 15190cc2eac3Smrg[m4_case([$#], 15200cc2eac3Smrg [0], [m4_fatal([$0: too few arguments: $#])], 15210cc2eac3Smrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 15220cc2eac3Smrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 15230cc2eac3Smrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 15240cc2eac3Smrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 15256c321187Smrg]) 15266c321187Smrg 152793493779Smrg 15280cc2eac3Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 15290cc2eac3Smrg# -------------------------------------------------- 15300cc2eac3Smrgm4_define([lt_decl_quote_varnames], 15310cc2eac3Smrg[_lt_decl_filter([value], [1], $@)]) 15326c321187Smrg 15336c321187Smrg 15340cc2eac3Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 15350cc2eac3Smrg# --------------------------------------------------- 15360cc2eac3Smrgm4_define([lt_decl_dquote_varnames], 15370cc2eac3Smrg[_lt_decl_filter([value], [2], $@)]) 15386c321187Smrg 153993493779Smrg 15400cc2eac3Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 15410cc2eac3Smrg# --------------------------------------------------- 15420cc2eac3Smrgm4_define([lt_decl_varnames_tagged], 15430cc2eac3Smrg[m4_assert([$# <= 2])dnl 15440cc2eac3Smrg_$0(m4_quote(m4_default([$1], [[, ]])), 15450cc2eac3Smrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 15460cc2eac3Smrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 15470cc2eac3Smrgm4_define([_lt_decl_varnames_tagged], 15480cc2eac3Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 15496c321187Smrg 15506c321187Smrg 15510cc2eac3Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 15520cc2eac3Smrg# ------------------------------------------------ 15530cc2eac3Smrgm4_define([lt_decl_all_varnames], 15540cc2eac3Smrg[_$0(m4_quote(m4_default([$1], [[, ]])), 15550cc2eac3Smrg m4_if([$2], [], 15560cc2eac3Smrg m4_quote(lt_decl_varnames), 15570cc2eac3Smrg m4_quote(m4_shift($@))))[]dnl 15580cc2eac3Smrg]) 15590cc2eac3Smrgm4_define([_lt_decl_all_varnames], 15600cc2eac3Smrg[lt_join($@, lt_decl_varnames_tagged([$1], 15610cc2eac3Smrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 15620cc2eac3Smrg]) 15636c321187Smrg 15646c321187Smrg 15650cc2eac3Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 15660cc2eac3Smrg# ------------------------------------ 15670cc2eac3Smrg# Quote a variable value, and forward it to `config.status' so that its 15680cc2eac3Smrg# declaration there will have the same value as in `configure'. VARNAME 15690cc2eac3Smrg# must have a single quote delimited value for this to work. 15700cc2eac3Smrgm4_define([_LT_CONFIG_STATUS_DECLARE], 15710cc2eac3Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 15726c321187Smrg 15736c321187Smrg 15740cc2eac3Smrg# _LT_CONFIG_STATUS_DECLARATIONS 15750cc2eac3Smrg# ------------------------------ 15760cc2eac3Smrg# We delimit libtool config variables with single quotes, so when 15770cc2eac3Smrg# we write them to config.status, we have to be sure to quote all 15780cc2eac3Smrg# embedded single quotes properly. In configure, this macro expands 15790cc2eac3Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 1580e120bd27Smrg# 15810cc2eac3Smrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 15820cc2eac3Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 15830cc2eac3Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 15840cc2eac3Smrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 15856c321187Smrg 15866c321187Smrg 15870cc2eac3Smrg# _LT_LIBTOOL_TAGS 15880cc2eac3Smrg# ---------------- 15890cc2eac3Smrg# Output comment and list of tags supported by the script 15900cc2eac3Smrgm4_defun([_LT_LIBTOOL_TAGS], 15910cc2eac3Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 15920cc2eac3Smrgavailable_tags="_LT_TAGS"dnl 15930cc2eac3Smrg]) 15940cc2eac3Smrg 15950cc2eac3Smrg 15960cc2eac3Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 15970cc2eac3Smrg# ----------------------------------- 15980cc2eac3Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and 15990cc2eac3Smrg# expand to a commented shell variable setting: 1600e120bd27Smrg# 16010cc2eac3Smrg# # Some comment about what VAR is for. 16020cc2eac3Smrg# visible_name=$lt_internal_name 16030cc2eac3Smrgm4_define([_LT_LIBTOOL_DECLARE], 16040cc2eac3Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 16050cc2eac3Smrg [description])))[]dnl 16060cc2eac3Smrgm4_pushdef([_libtool_name], 16070cc2eac3Smrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 16080cc2eac3Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 16090cc2eac3Smrg [0], [_libtool_name=[$]$1], 16100cc2eac3Smrg [1], [_libtool_name=$lt_[]$1], 16110cc2eac3Smrg [2], [_libtool_name=$lt_[]$1], 16120cc2eac3Smrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 16130cc2eac3Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 16140cc2eac3Smrg]) 16156c321187Smrg 16166c321187Smrg 16170cc2eac3Smrg# _LT_LIBTOOL_CONFIG_VARS 16180cc2eac3Smrg# ----------------------- 16190cc2eac3Smrg# Produce commented declarations of non-tagged libtool config variables 16200cc2eac3Smrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 16210cc2eac3Smrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 16220cc2eac3Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 16230cc2eac3Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 16240cc2eac3Smrg[m4_foreach([_lt_var], 16250cc2eac3Smrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 16260cc2eac3Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 16276c321187Smrg 1628e120bd27Smrg 16290cc2eac3Smrg# _LT_LIBTOOL_TAG_VARS(TAG) 16300cc2eac3Smrg# ------------------------- 16310cc2eac3Smrgm4_define([_LT_LIBTOOL_TAG_VARS], 16320cc2eac3Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 16330cc2eac3Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 1634e120bd27Smrg 1635e120bd27Smrg 16360cc2eac3Smrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 16370cc2eac3Smrg# ------------------------------ 16380cc2eac3Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 1639e120bd27Smrg 1640e120bd27Smrg 16410cc2eac3Smrg# _LT_CONFIG_COMMANDS 16420cc2eac3Smrg# ------------------- 16430cc2eac3Smrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 16440cc2eac3Smrg# variables for single and double quote escaping we saved from calls 16450cc2eac3Smrg# to _LT_DECL, we can put quote escaped variables declarations 16460cc2eac3Smrg# into `config.status', and then the shell code to quote escape them in 16470cc2eac3Smrg# for loops in `config.status'. Finally, any additional code accumulated 16480cc2eac3Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 16490cc2eac3Smrgm4_defun([_LT_CONFIG_COMMANDS], 16500cc2eac3Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 16510cc2eac3Smrg dnl If the libtool generation code has been placed in $CONFIG_LT, 16520cc2eac3Smrg dnl instead of duplicating it all over again into config.status, 16530cc2eac3Smrg dnl then we will have config.status run $CONFIG_LT later, so it 16540cc2eac3Smrg dnl needs to know what name is stored there: 16550cc2eac3Smrg [AC_CONFIG_COMMANDS([libtool], 16560cc2eac3Smrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 16570cc2eac3Smrg dnl If the libtool generation code is destined for config.status, 16580cc2eac3Smrg dnl expand the accumulated commands and init code now: 16590cc2eac3Smrg [AC_CONFIG_COMMANDS([libtool], 16600cc2eac3Smrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 16610cc2eac3Smrg])#_LT_CONFIG_COMMANDS 1662e120bd27Smrg 1663e120bd27Smrg 16640cc2eac3Smrg# Initialize. 16650cc2eac3Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 16660cc2eac3Smrg[ 1667e120bd27Smrg 16680cc2eac3Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 16690cc2eac3Smrg# if CDPATH is set. 16700cc2eac3Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 1671e120bd27Smrg 16720cc2eac3Smrgsed_quote_subst='$sed_quote_subst' 16730cc2eac3Smrgdouble_quote_subst='$double_quote_subst' 16740cc2eac3Smrgdelay_variable_subst='$delay_variable_subst' 16750cc2eac3Smrg_LT_CONFIG_STATUS_DECLARATIONS 16760cc2eac3SmrgLTCC='$LTCC' 16770cc2eac3SmrgLTCFLAGS='$LTCFLAGS' 16780cc2eac3Smrgcompiler='$compiler_DEFAULT' 1679e120bd27Smrg 16800cc2eac3Smrg# A function that is used when there is no print builtin or printf. 16810cc2eac3Smrgfunc_fallback_echo () 16820cc2eac3Smrg{ 16830cc2eac3Smrg eval 'cat <<_LTECHO_EOF 16840cc2eac3Smrg\$[]1 16850cc2eac3Smrg_LTECHO_EOF' 16860cc2eac3Smrg} 1687e120bd27Smrg 16880cc2eac3Smrg# Quote evaled strings. 16890cc2eac3Smrgfor var in lt_decl_all_varnames([[ \ 16900cc2eac3Smrg]], lt_decl_quote_varnames); do 16910cc2eac3Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 16920cc2eac3Smrg *[[\\\\\\\`\\"\\\$]]*) 16930cc2eac3Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 16940cc2eac3Smrg ;; 16950cc2eac3Smrg *) 16960cc2eac3Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 16970cc2eac3Smrg ;; 16980cc2eac3Smrg esac 16990cc2eac3Smrgdone 1700e120bd27Smrg 17010cc2eac3Smrg# Double-quote double-evaled strings. 17020cc2eac3Smrgfor var in lt_decl_all_varnames([[ \ 17030cc2eac3Smrg]], lt_decl_dquote_varnames); do 17040cc2eac3Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 17050cc2eac3Smrg *[[\\\\\\\`\\"\\\$]]*) 17060cc2eac3Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 17070cc2eac3Smrg ;; 17080cc2eac3Smrg *) 17090cc2eac3Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 17100cc2eac3Smrg ;; 17110cc2eac3Smrg esac 17120cc2eac3Smrgdone 1713e120bd27Smrg 17140cc2eac3Smrg_LT_OUTPUT_LIBTOOL_INIT 1715e120bd27Smrg]) 1716e120bd27Smrg 17170cc2eac3Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 17180cc2eac3Smrg# ------------------------------------ 17190cc2eac3Smrg# Generate a child script FILE with all initialization necessary to 17200cc2eac3Smrg# reuse the environment learned by the parent script, and make the 17210cc2eac3Smrg# file executable. If COMMENT is supplied, it is inserted after the 17220cc2eac3Smrg# `#!' sequence but before initialization text begins. After this 17230cc2eac3Smrg# macro, additional text can be appended to FILE to form the body of 17240cc2eac3Smrg# the child script. The macro ends with non-zero status if the 17250cc2eac3Smrg# file could not be fully written (such as if the disk is full). 17260cc2eac3Smrgm4_ifdef([AS_INIT_GENERATED], 17270cc2eac3Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 17280cc2eac3Smrg[m4_defun([_LT_GENERATED_FILE_INIT], 17290cc2eac3Smrg[m4_require([AS_PREPARE])]dnl 17300cc2eac3Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 17310cc2eac3Smrg[lt_write_fail=0 17320cc2eac3Smrgcat >$1 <<_ASEOF || lt_write_fail=1 17330cc2eac3Smrg#! $SHELL 17340cc2eac3Smrg# Generated by $as_me. 17350cc2eac3Smrg$2 17360cc2eac3SmrgSHELL=\${CONFIG_SHELL-$SHELL} 17370cc2eac3Smrgexport SHELL 17380cc2eac3Smrg_ASEOF 17390cc2eac3Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1 17400cc2eac3SmrgAS_SHELL_SANITIZE 17410cc2eac3Smrg_AS_PREPARE 17420cc2eac3Smrgexec AS_MESSAGE_FD>&1 17430cc2eac3Smrg_ASEOF 17440cc2eac3Smrgtest $lt_write_fail = 0 && chmod +x $1[]dnl 17450cc2eac3Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 1746e120bd27Smrg 17470cc2eac3Smrg# LT_OUTPUT 17480cc2eac3Smrg# --------- 17490cc2eac3Smrg# This macro allows early generation of the libtool script (before 17500cc2eac3Smrg# AC_OUTPUT is called), incase it is used in configure for compilation 17510cc2eac3Smrg# tests. 17520cc2eac3SmrgAC_DEFUN([LT_OUTPUT], 17530cc2eac3Smrg[: ${CONFIG_LT=./config.lt} 17540cc2eac3SmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 17550cc2eac3Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 17560cc2eac3Smrg[# Run this file to recreate a libtool stub with the current configuration.]) 1757e120bd27Smrg 17580cc2eac3Smrgcat >>"$CONFIG_LT" <<\_LTEOF 17590cc2eac3Smrglt_cl_silent=false 17600cc2eac3Smrgexec AS_MESSAGE_LOG_FD>>config.log 17610cc2eac3Smrg{ 17620cc2eac3Smrg echo 17630cc2eac3Smrg AS_BOX([Running $as_me.]) 17640cc2eac3Smrg} >&AS_MESSAGE_LOG_FD 1765e120bd27Smrg 17660cc2eac3Smrglt_cl_help="\ 17670cc2eac3Smrg\`$as_me' creates a local libtool stub from the current configuration, 17680cc2eac3Smrgfor use in further configure time tests before the real libtool is 17690cc2eac3Smrggenerated. 1770e120bd27Smrg 17710cc2eac3SmrgUsage: $[0] [[OPTIONS]] 1772e120bd27Smrg 17730cc2eac3Smrg -h, --help print this help, then exit 17740cc2eac3Smrg -V, --version print version number, then exit 17750cc2eac3Smrg -q, --quiet do not print progress messages 17760cc2eac3Smrg -d, --debug don't remove temporary files 1777e120bd27Smrg 17780cc2eac3SmrgReport bugs to <bug-libtool@gnu.org>." 1779e120bd27Smrg 17800cc2eac3Smrglt_cl_version="\ 17810cc2eac3Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 17820cc2eac3Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 17830cc2eac3Smrgconfigured by $[0], generated by m4_PACKAGE_STRING. 1784e120bd27Smrg 17859d0b5e55SmrgCopyright (C) 2011 Free Software Foundation, Inc. 17860cc2eac3SmrgThis config.lt script is free software; the Free Software Foundation 17870cc2eac3Smrggives unlimited permision to copy, distribute and modify it." 1788e120bd27Smrg 17890cc2eac3Smrgwhile test $[#] != 0 17900cc2eac3Smrgdo 17910cc2eac3Smrg case $[1] in 17920cc2eac3Smrg --version | --v* | -V ) 17930cc2eac3Smrg echo "$lt_cl_version"; exit 0 ;; 17940cc2eac3Smrg --help | --h* | -h ) 17950cc2eac3Smrg echo "$lt_cl_help"; exit 0 ;; 17960cc2eac3Smrg --debug | --d* | -d ) 17970cc2eac3Smrg debug=: ;; 17980cc2eac3Smrg --quiet | --q* | --silent | --s* | -q ) 17990cc2eac3Smrg lt_cl_silent=: ;; 1800e120bd27Smrg 18010cc2eac3Smrg -*) AC_MSG_ERROR([unrecognized option: $[1] 18020cc2eac3SmrgTry \`$[0] --help' for more information.]) ;; 1803e120bd27Smrg 18040cc2eac3Smrg *) AC_MSG_ERROR([unrecognized argument: $[1] 18050cc2eac3SmrgTry \`$[0] --help' for more information.]) ;; 18060cc2eac3Smrg esac 18070cc2eac3Smrg shift 18080cc2eac3Smrgdone 1809e120bd27Smrg 18100cc2eac3Smrgif $lt_cl_silent; then 18110cc2eac3Smrg exec AS_MESSAGE_FD>/dev/null 18120cc2eac3Smrgfi 18130cc2eac3Smrg_LTEOF 1814e120bd27Smrg 18150cc2eac3Smrgcat >>"$CONFIG_LT" <<_LTEOF 18160cc2eac3Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 18170cc2eac3Smrg_LTEOF 1818e120bd27Smrg 18190cc2eac3Smrgcat >>"$CONFIG_LT" <<\_LTEOF 18200cc2eac3SmrgAC_MSG_NOTICE([creating $ofile]) 18210cc2eac3Smrg_LT_OUTPUT_LIBTOOL_COMMANDS 18220cc2eac3SmrgAS_EXIT(0) 18230cc2eac3Smrg_LTEOF 18240cc2eac3Smrgchmod +x "$CONFIG_LT" 1825e120bd27Smrg 18260cc2eac3Smrg# configure is writing to config.log, but config.lt does its own redirection, 18270cc2eac3Smrg# appending to config.log, which fails on DOS, as config.log is still kept 18280cc2eac3Smrg# open by configure. Here we exec the FD to /dev/null, effectively closing 18290cc2eac3Smrg# config.log, so it can be properly (re)opened and appended to by config.lt. 18300cc2eac3Smrglt_cl_success=: 18310cc2eac3Smrgtest "$silent" = yes && 18320cc2eac3Smrg lt_config_lt_args="$lt_config_lt_args --quiet" 18330cc2eac3Smrgexec AS_MESSAGE_LOG_FD>/dev/null 18340cc2eac3Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 18350cc2eac3Smrgexec AS_MESSAGE_LOG_FD>>config.log 18360cc2eac3Smrg$lt_cl_success || AS_EXIT(1) 18370cc2eac3Smrg])# LT_OUTPUT 1838e120bd27Smrg 1839e120bd27Smrg 18400cc2eac3Smrg# _LT_CONFIG(TAG) 18410cc2eac3Smrg# --------------- 18420cc2eac3Smrg# If TAG is the built-in tag, create an initial libtool script with a 18430cc2eac3Smrg# default configuration from the untagged config vars. Otherwise add code 18440cc2eac3Smrg# to config.status for appending the configuration named by TAG from the 18450cc2eac3Smrg# matching tagged config vars. 18460cc2eac3Smrgm4_defun([_LT_CONFIG], 18470cc2eac3Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 18480cc2eac3Smrg_LT_CONFIG_SAVE_COMMANDS([ 18490cc2eac3Smrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 18500cc2eac3Smrg m4_if(_LT_TAG, [C], [ 18510cc2eac3Smrg # See if we are running on zsh, and set the options which allow our 18520cc2eac3Smrg # commands through without removal of \ escapes. 18530cc2eac3Smrg if test -n "${ZSH_VERSION+set}" ; then 18540cc2eac3Smrg setopt NO_GLOB_SUBST 18550cc2eac3Smrg fi 1856e120bd27Smrg 18570cc2eac3Smrg cfgfile="${ofile}T" 18580cc2eac3Smrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 18590cc2eac3Smrg $RM "$cfgfile" 1860e120bd27Smrg 18610cc2eac3Smrg cat <<_LT_EOF >> "$cfgfile" 18620cc2eac3Smrg#! $SHELL 18636c321187Smrg 18640cc2eac3Smrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 18650cc2eac3Smrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 18660cc2eac3Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 18670cc2eac3Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 18680cc2eac3Smrg# 18690cc2eac3Smrg_LT_COPYING 18700cc2eac3Smrg_LT_LIBTOOL_TAGS 1871e120bd27Smrg 18720cc2eac3Smrg# ### BEGIN LIBTOOL CONFIG 18730cc2eac3Smrg_LT_LIBTOOL_CONFIG_VARS 18740cc2eac3Smrg_LT_LIBTOOL_TAG_VARS 18750cc2eac3Smrg# ### END LIBTOOL CONFIG 18760cc2eac3Smrg 18770cc2eac3Smrg_LT_EOF 18780cc2eac3Smrg 18790cc2eac3Smrg case $host_os in 18800cc2eac3Smrg aix3*) 18810cc2eac3Smrg cat <<\_LT_EOF >> "$cfgfile" 18820cc2eac3Smrg# AIX sometimes has problems with the GCC collect2 program. For some 18830cc2eac3Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 18840cc2eac3Smrg# vanish in a puff of smoke. 18850cc2eac3Smrgif test "X${COLLECT_NAMES+set}" != Xset; then 18860cc2eac3Smrg COLLECT_NAMES= 18870cc2eac3Smrg export COLLECT_NAMES 1888e120bd27Smrgfi 18890cc2eac3Smrg_LT_EOF 18900cc2eac3Smrg ;; 18910cc2eac3Smrg esac 18926c321187Smrg 18930cc2eac3Smrg _LT_PROG_LTMAIN 1894e120bd27Smrg 18950cc2eac3Smrg # We use sed instead of cat because bash on DJGPP gets confused if 18960cc2eac3Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 18970cc2eac3Smrg # text mode, it properly converts lines to CR/LF. This bash problem 18980cc2eac3Smrg # is reportedly fixed, but why not run on old versions too? 18990cc2eac3Smrg sed '$q' "$ltmain" >> "$cfgfile" \ 19000cc2eac3Smrg || (rm -f "$cfgfile"; exit 1) 19016c321187Smrg 19020cc2eac3Smrg _LT_PROG_REPLACE_SHELLFNS 19036c321187Smrg 19040cc2eac3Smrg mv -f "$cfgfile" "$ofile" || 19050cc2eac3Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 19060cc2eac3Smrg chmod +x "$ofile" 19070cc2eac3Smrg], 19080cc2eac3Smrg[cat <<_LT_EOF >> "$ofile" 19096c321187Smrg 19100cc2eac3Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 19110cc2eac3Smrgdnl in a comment (ie after a #). 19120cc2eac3Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1 19130cc2eac3Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 19140cc2eac3Smrg# ### END LIBTOOL TAG CONFIG: $1 19150cc2eac3Smrg_LT_EOF 19160cc2eac3Smrg])dnl /m4_if 19170cc2eac3Smrg], 19180cc2eac3Smrg[m4_if([$1], [], [ 19190cc2eac3Smrg PACKAGE='$PACKAGE' 19200cc2eac3Smrg VERSION='$VERSION' 19210cc2eac3Smrg TIMESTAMP='$TIMESTAMP' 19220cc2eac3Smrg RM='$RM' 19230cc2eac3Smrg ofile='$ofile'], []) 19240cc2eac3Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS 19250cc2eac3Smrg])# _LT_CONFIG 19266c321187Smrg 19276c321187Smrg 19280cc2eac3Smrg# LT_SUPPORTED_TAG(TAG) 19290cc2eac3Smrg# --------------------- 19300cc2eac3Smrg# Trace this macro to discover what tags are supported by the libtool 19310cc2eac3Smrg# --tag option, using: 19320cc2eac3Smrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 19330cc2eac3SmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 19346c321187Smrg 19356c321187Smrg 19360cc2eac3Smrg# C support is built-in for now 19370cc2eac3Smrgm4_define([_LT_LANG_C_enabled], []) 19380cc2eac3Smrgm4_define([_LT_TAGS], []) 19396c321187Smrg 19406c321187Smrg 19410cc2eac3Smrg# LT_LANG(LANG) 19420cc2eac3Smrg# ------------- 19430cc2eac3Smrg# Enable libtool support for the given language if not already enabled. 19440cc2eac3SmrgAC_DEFUN([LT_LANG], 19450cc2eac3Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 19460cc2eac3Smrgm4_case([$1], 19470cc2eac3Smrg [C], [_LT_LANG(C)], 19480cc2eac3Smrg [C++], [_LT_LANG(CXX)], 19499d0b5e55Smrg [Go], [_LT_LANG(GO)], 19500cc2eac3Smrg [Java], [_LT_LANG(GCJ)], 19510cc2eac3Smrg [Fortran 77], [_LT_LANG(F77)], 19520cc2eac3Smrg [Fortran], [_LT_LANG(FC)], 19530cc2eac3Smrg [Windows Resource], [_LT_LANG(RC)], 19540cc2eac3Smrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 19550cc2eac3Smrg [_LT_LANG($1)], 19560cc2eac3Smrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 19570cc2eac3Smrg])# LT_LANG 1958e120bd27Smrg 1959e120bd27Smrg 19600cc2eac3Smrg# _LT_LANG(LANGNAME) 19610cc2eac3Smrg# ------------------ 19620cc2eac3Smrgm4_defun([_LT_LANG], 19630cc2eac3Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 19640cc2eac3Smrg [LT_SUPPORTED_TAG([$1])dnl 19650cc2eac3Smrg m4_append([_LT_TAGS], [$1 ])dnl 19660cc2eac3Smrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 19670cc2eac3Smrg _LT_LANG_$1_CONFIG($1)])dnl 19680cc2eac3Smrg])# _LT_LANG 19696c321187Smrg 1970e120bd27Smrg 19719d0b5e55Smrgm4_ifndef([AC_PROG_GO], [ 19729d0b5e55Smrg# NOTE: This macro has been submitted for inclusion into # 19739d0b5e55Smrg# GNU Autoconf as AC_PROG_GO. When it is available in # 19749d0b5e55Smrg# a released version of Autoconf we should remove this # 19759d0b5e55Smrg# macro and use it instead. # 19769d0b5e55Smrgm4_defun([AC_PROG_GO], 19779d0b5e55Smrg[AC_LANG_PUSH(Go)dnl 19789d0b5e55SmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 19799d0b5e55SmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 19809d0b5e55Smrg_AC_ARG_VAR_LDFLAGS()dnl 19819d0b5e55SmrgAC_CHECK_TOOL(GOC, gccgo) 19829d0b5e55Smrgif test -z "$GOC"; then 19839d0b5e55Smrg if test -n "$ac_tool_prefix"; then 19849d0b5e55Smrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 19859d0b5e55Smrg fi 19869d0b5e55Smrgfi 19879d0b5e55Smrgif test -z "$GOC"; then 19889d0b5e55Smrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 19899d0b5e55Smrgfi 19909d0b5e55Smrg])#m4_defun 19919d0b5e55Smrg])#m4_ifndef 19929d0b5e55Smrg 19939d0b5e55Smrg 19940cc2eac3Smrg# _LT_LANG_DEFAULT_CONFIG 19950cc2eac3Smrg# ----------------------- 19960cc2eac3Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 19970cc2eac3Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 19980cc2eac3Smrg [LT_LANG(CXX)], 19990cc2eac3Smrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 2000e120bd27Smrg 20010cc2eac3SmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 20020cc2eac3Smrg [LT_LANG(F77)], 20030cc2eac3Smrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 2004e120bd27Smrg 20050cc2eac3SmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 20060cc2eac3Smrg [LT_LANG(FC)], 20070cc2eac3Smrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 2008e120bd27Smrg 20090cc2eac3Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 20100cc2eac3Smrgdnl pulling things in needlessly. 20110cc2eac3SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 20120cc2eac3Smrg [LT_LANG(GCJ)], 20130cc2eac3Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 20140cc2eac3Smrg [LT_LANG(GCJ)], 20150cc2eac3Smrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 20160cc2eac3Smrg [LT_LANG(GCJ)], 20170cc2eac3Smrg [m4_ifdef([AC_PROG_GCJ], 20180cc2eac3Smrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 20190cc2eac3Smrg m4_ifdef([A][M_PROG_GCJ], 20200cc2eac3Smrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 20210cc2eac3Smrg m4_ifdef([LT_PROG_GCJ], 20220cc2eac3Smrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 2023e120bd27Smrg 20249d0b5e55SmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 20259d0b5e55Smrg [LT_LANG(GO)], 20269d0b5e55Smrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 20279d0b5e55Smrg 20280cc2eac3SmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 20290cc2eac3Smrg [LT_LANG(RC)], 20300cc2eac3Smrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 20310cc2eac3Smrg])# _LT_LANG_DEFAULT_CONFIG 2032e120bd27Smrg 20330cc2eac3Smrg# Obsolete macros: 20340cc2eac3SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 20350cc2eac3SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 20360cc2eac3SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 20370cc2eac3SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 20380cc2eac3SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 20390cc2eac3Smrgdnl aclocal-1.4 backwards compatibility: 20400cc2eac3Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 20410cc2eac3Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 20420cc2eac3Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 20430cc2eac3Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 20440cc2eac3Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 2045e120bd27Smrg 2046e120bd27Smrg 20470cc2eac3Smrg# _LT_TAG_COMPILER 20480cc2eac3Smrg# ---------------- 20490cc2eac3Smrgm4_defun([_LT_TAG_COMPILER], 20500cc2eac3Smrg[AC_REQUIRE([AC_PROG_CC])dnl 2051e120bd27Smrg 20520cc2eac3Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 20530cc2eac3Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 20540cc2eac3Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 20550cc2eac3Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 2056e120bd27Smrg 20570cc2eac3Smrg# If no C compiler was specified, use CC. 20580cc2eac3SmrgLTCC=${LTCC-"$CC"} 2059e120bd27Smrg 20600cc2eac3Smrg# If no C compiler flags were specified, use CFLAGS. 20610cc2eac3SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 2062e120bd27Smrg 20630cc2eac3Smrg# Allow CC to be a program name with arguments. 20640cc2eac3Smrgcompiler=$CC 20650cc2eac3Smrg])# _LT_TAG_COMPILER 2066e120bd27Smrg 2067e120bd27Smrg 20680cc2eac3Smrg# _LT_COMPILER_BOILERPLATE 20690cc2eac3Smrg# ------------------------ 20700cc2eac3Smrg# Check for compiler boilerplate output or warnings with 20710cc2eac3Smrg# the simple compiler test code. 20720cc2eac3Smrgm4_defun([_LT_COMPILER_BOILERPLATE], 20730cc2eac3Smrg[m4_require([_LT_DECL_SED])dnl 20740cc2eac3Smrgac_outfile=conftest.$ac_objext 20750cc2eac3Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 20760cc2eac3Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 20770cc2eac3Smrg_lt_compiler_boilerplate=`cat conftest.err` 20780cc2eac3Smrg$RM conftest* 20790cc2eac3Smrg])# _LT_COMPILER_BOILERPLATE 2080e120bd27Smrg 2081e120bd27Smrg 20820cc2eac3Smrg# _LT_LINKER_BOILERPLATE 20830cc2eac3Smrg# ---------------------- 20840cc2eac3Smrg# Check for linker boilerplate output or warnings with 20850cc2eac3Smrg# the simple link test code. 20860cc2eac3Smrgm4_defun([_LT_LINKER_BOILERPLATE], 20870cc2eac3Smrg[m4_require([_LT_DECL_SED])dnl 20880cc2eac3Smrgac_outfile=conftest.$ac_objext 20890cc2eac3Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 20900cc2eac3Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 20910cc2eac3Smrg_lt_linker_boilerplate=`cat conftest.err` 20920cc2eac3Smrg$RM -r conftest* 20930cc2eac3Smrg])# _LT_LINKER_BOILERPLATE 2094e120bd27Smrg 20950cc2eac3Smrg# _LT_REQUIRED_DARWIN_CHECKS 20960cc2eac3Smrg# ------------------------- 20970cc2eac3Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 20980cc2eac3Smrg case $host_os in 20990cc2eac3Smrg rhapsody* | darwin*) 21000cc2eac3Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 21010cc2eac3Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 21020cc2eac3Smrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 21030cc2eac3Smrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 21040cc2eac3Smrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 21050cc2eac3Smrg _LT_DECL([], [DSYMUTIL], [1], 21060cc2eac3Smrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 21070cc2eac3Smrg _LT_DECL([], [NMEDIT], [1], 21080cc2eac3Smrg [Tool to change global to local symbols on Mac OS X]) 21090cc2eac3Smrg _LT_DECL([], [LIPO], [1], 21100cc2eac3Smrg [Tool to manipulate fat objects and archives on Mac OS X]) 21110cc2eac3Smrg _LT_DECL([], [OTOOL], [1], 21120cc2eac3Smrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 21130cc2eac3Smrg _LT_DECL([], [OTOOL64], [1], 21140cc2eac3Smrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 2115e120bd27Smrg 21160cc2eac3Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 21170cc2eac3Smrg [lt_cv_apple_cc_single_mod=no 21180cc2eac3Smrg if test -z "${LT_MULTI_MODULE}"; then 21190cc2eac3Smrg # By default we will add the -single_module flag. You can override 21200cc2eac3Smrg # by either setting the environment variable LT_MULTI_MODULE 21210cc2eac3Smrg # non-empty at configure time, or by adding -multi_module to the 21220cc2eac3Smrg # link flags. 21230cc2eac3Smrg rm -rf libconftest.dylib* 21240cc2eac3Smrg echo "int foo(void){return 1;}" > conftest.c 21250cc2eac3Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 21260cc2eac3Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 21270cc2eac3Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 21280cc2eac3Smrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 21290cc2eac3Smrg _lt_result=$? 21309d0b5e55Smrg # If there is a non-empty error log, and "single_module" 21319d0b5e55Smrg # appears in it, assume the flag caused a linker warning 21329d0b5e55Smrg if test -s conftest.err && $GREP single_module conftest.err; then 21339d0b5e55Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 21349d0b5e55Smrg # Otherwise, if the output was created with a 0 exit code from 21359d0b5e55Smrg # the compiler, it worked. 21369d0b5e55Smrg elif test -f libconftest.dylib && test $_lt_result -eq 0; then 21370cc2eac3Smrg lt_cv_apple_cc_single_mod=yes 21380cc2eac3Smrg else 21390cc2eac3Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 21400cc2eac3Smrg fi 21410cc2eac3Smrg rm -rf libconftest.dylib* 21420cc2eac3Smrg rm -f conftest.* 21430cc2eac3Smrg fi]) 21449d0b5e55Smrg 21450cc2eac3Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 21460cc2eac3Smrg [lt_cv_ld_exported_symbols_list], 21470cc2eac3Smrg [lt_cv_ld_exported_symbols_list=no 21480cc2eac3Smrg save_LDFLAGS=$LDFLAGS 21490cc2eac3Smrg echo "_main" > conftest.sym 21500cc2eac3Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 21510cc2eac3Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 21520cc2eac3Smrg [lt_cv_ld_exported_symbols_list=yes], 21530cc2eac3Smrg [lt_cv_ld_exported_symbols_list=no]) 21540cc2eac3Smrg LDFLAGS="$save_LDFLAGS" 21550cc2eac3Smrg ]) 21569d0b5e55Smrg 21570cc2eac3Smrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 21580cc2eac3Smrg [lt_cv_ld_force_load=no 21590cc2eac3Smrg cat > conftest.c << _LT_EOF 21600cc2eac3Smrgint forced_loaded() { return 2;} 21610cc2eac3Smrg_LT_EOF 21620cc2eac3Smrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 21630cc2eac3Smrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 21640cc2eac3Smrg echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 21650cc2eac3Smrg $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 21660cc2eac3Smrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 21670cc2eac3Smrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 21680cc2eac3Smrg cat > conftest.c << _LT_EOF 21690cc2eac3Smrgint main() { return 0;} 21700cc2eac3Smrg_LT_EOF 21710cc2eac3Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 21720cc2eac3Smrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 21730cc2eac3Smrg _lt_result=$? 21749d0b5e55Smrg if test -s conftest.err && $GREP force_load conftest.err; then 21759d0b5e55Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 21769d0b5e55Smrg elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then 21770cc2eac3Smrg lt_cv_ld_force_load=yes 21780cc2eac3Smrg else 21790cc2eac3Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 21800cc2eac3Smrg fi 21810cc2eac3Smrg rm -f conftest.err libconftest.a conftest conftest.c 21820cc2eac3Smrg rm -rf conftest.dSYM 21830cc2eac3Smrg ]) 21840cc2eac3Smrg case $host_os in 21850cc2eac3Smrg rhapsody* | darwin1.[[012]]) 21860cc2eac3Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 21870cc2eac3Smrg darwin1.*) 21880cc2eac3Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 21890cc2eac3Smrg darwin*) # darwin 5.x on 21900cc2eac3Smrg # if running on 10.5 or later, the deployment target defaults 21910cc2eac3Smrg # to the OS version, if on x86, and 10.4, the deployment 21920cc2eac3Smrg # target defaults to 10.4. Don't you love it? 21930cc2eac3Smrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 21940cc2eac3Smrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 21950cc2eac3Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 21960cc2eac3Smrg 10.[[012]]*) 21970cc2eac3Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 21980cc2eac3Smrg 10.*) 21990cc2eac3Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 22000cc2eac3Smrg esac 22010cc2eac3Smrg ;; 22020cc2eac3Smrg esac 22030cc2eac3Smrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 22040cc2eac3Smrg _lt_dar_single_mod='$single_module' 22050cc2eac3Smrg fi 22060cc2eac3Smrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 22070cc2eac3Smrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 22080cc2eac3Smrg else 22090cc2eac3Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 22100cc2eac3Smrg fi 22110cc2eac3Smrg if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then 22120cc2eac3Smrg _lt_dsymutil='~$DSYMUTIL $lib || :' 22130cc2eac3Smrg else 22140cc2eac3Smrg _lt_dsymutil= 22150cc2eac3Smrg fi 22160cc2eac3Smrg ;; 22170cc2eac3Smrg esac 2218e120bd27Smrg]) 2219e120bd27Smrg 2220e120bd27Smrg 22219d0b5e55Smrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 22229d0b5e55Smrg# --------------------------------- 22230cc2eac3Smrg# Checks for linker and compiler features on darwin 22240cc2eac3Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 22250cc2eac3Smrg[ 22260cc2eac3Smrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 22270cc2eac3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 22280cc2eac3Smrg _LT_TAGVAR(hardcode_direct, $1)=no 22290cc2eac3Smrg _LT_TAGVAR(hardcode_automatic, $1)=yes 22300cc2eac3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 22310cc2eac3Smrg if test "$lt_cv_ld_force_load" = "yes"; then 22320cc2eac3Smrg _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\"`' 22339d0b5e55Smrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 22349d0b5e55Smrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 22350cc2eac3Smrg else 22360cc2eac3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 22370cc2eac3Smrg fi 22380cc2eac3Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 22390cc2eac3Smrg _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 22400cc2eac3Smrg case $cc_basename in 22410cc2eac3Smrg ifort*) _lt_dar_can_shared=yes ;; 22420cc2eac3Smrg *) _lt_dar_can_shared=$GCC ;; 22430cc2eac3Smrg esac 22440cc2eac3Smrg if test "$_lt_dar_can_shared" = "yes"; then 22450cc2eac3Smrg output_verbose_link_cmd=func_echo_all 22460cc2eac3Smrg _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}" 22470cc2eac3Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 22480cc2eac3Smrg _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}" 22490cc2eac3Smrg _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}" 22500cc2eac3Smrg m4_if([$1], [CXX], 22510cc2eac3Smrg[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 22520cc2eac3Smrg _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}" 22530cc2eac3Smrg _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}" 22540cc2eac3Smrg fi 22550cc2eac3Smrg],[]) 22560cc2eac3Smrg else 22570cc2eac3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 22580cc2eac3Smrg fi 22590cc2eac3Smrg]) 2260e120bd27Smrg 22610cc2eac3Smrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 22620cc2eac3Smrg# ---------------------------------- 22630cc2eac3Smrg# Links a minimal program and checks the executable 22640cc2eac3Smrg# for the system default hardcoded library path. In most cases, 22650cc2eac3Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 22660cc2eac3Smrg# the location of the communication and MPI libs are included too. 22670cc2eac3Smrg# If we don't find anything, use the default library path according 22680cc2eac3Smrg# to the aix ld manual. 22690cc2eac3Smrg# Store the results from the different compilers for each TAGNAME. 22700cc2eac3Smrg# Allow to override them for all tags through lt_cv_aix_libpath. 22710cc2eac3Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 22720cc2eac3Smrg[m4_require([_LT_DECL_SED])dnl 22730cc2eac3Smrgif test "${lt_cv_aix_libpath+set}" = set; then 22740cc2eac3Smrg aix_libpath=$lt_cv_aix_libpath 22750cc2eac3Smrgelse 22760cc2eac3Smrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 22770cc2eac3Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 22780cc2eac3Smrg lt_aix_libpath_sed='[ 22790cc2eac3Smrg /Import File Strings/,/^$/ { 22800cc2eac3Smrg /^0/ { 22810cc2eac3Smrg s/^0 *\([^ ]*\) *$/\1/ 22820cc2eac3Smrg p 22830cc2eac3Smrg } 22840cc2eac3Smrg }]' 22850cc2eac3Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 22860cc2eac3Smrg # Check for a 64-bit object if we didn't find anything. 22870cc2eac3Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 22880cc2eac3Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 22890cc2eac3Smrg fi],[]) 22900cc2eac3Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 22910cc2eac3Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" 22920cc2eac3Smrg fi 22930cc2eac3Smrg ]) 22940cc2eac3Smrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 22950cc2eac3Smrgfi 22960cc2eac3Smrg])# _LT_SYS_MODULE_PATH_AIX 2297e120bd27Smrg 2298e120bd27Smrg 22990cc2eac3Smrg# _LT_SHELL_INIT(ARG) 23000cc2eac3Smrg# ------------------- 23010cc2eac3Smrgm4_define([_LT_SHELL_INIT], 23020cc2eac3Smrg[m4_divert_text([M4SH-INIT], [$1 23030cc2eac3Smrg])])# _LT_SHELL_INIT 2304e120bd27Smrg 2305e120bd27Smrg 2306e120bd27Smrg 23070cc2eac3Smrg# _LT_PROG_ECHO_BACKSLASH 2308e120bd27Smrg# ----------------------- 23090cc2eac3Smrg# Find how we can fake an echo command that does not interpret backslash. 23100cc2eac3Smrg# In particular, with Autoconf 2.60 or later we add some code to the start 23110cc2eac3Smrg# of the generated configure script which will find a shell with a builtin 23120cc2eac3Smrg# printf (which we can use as an echo command). 23130cc2eac3Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 23140cc2eac3Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 23150cc2eac3SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 23160cc2eac3SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 2317e120bd27Smrg 23180cc2eac3SmrgAC_MSG_CHECKING([how to print strings]) 23190cc2eac3Smrg# Test print first, because it will be a builtin if present. 23200cc2eac3Smrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 23210cc2eac3Smrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 23220cc2eac3Smrg ECHO='print -r --' 23230cc2eac3Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 23240cc2eac3Smrg ECHO='printf %s\n' 23250cc2eac3Smrgelse 23260cc2eac3Smrg # Use this function as a fallback that always works. 23270cc2eac3Smrg func_fallback_echo () 23280cc2eac3Smrg { 23290cc2eac3Smrg eval 'cat <<_LTECHO_EOF 23300cc2eac3Smrg$[]1 23310cc2eac3Smrg_LTECHO_EOF' 23320cc2eac3Smrg } 23330cc2eac3Smrg ECHO='func_fallback_echo' 23340cc2eac3Smrgfi 2335e120bd27Smrg 23360cc2eac3Smrg# func_echo_all arg... 23370cc2eac3Smrg# Invoke $ECHO with all args, space-separated. 23380cc2eac3Smrgfunc_echo_all () 23390cc2eac3Smrg{ 23400cc2eac3Smrg $ECHO "$*" 23410cc2eac3Smrg} 2342e120bd27Smrg 23430cc2eac3Smrgcase "$ECHO" in 23440cc2eac3Smrg printf*) AC_MSG_RESULT([printf]) ;; 23450cc2eac3Smrg print*) AC_MSG_RESULT([print -r]) ;; 23460cc2eac3Smrg *) AC_MSG_RESULT([cat]) ;; 23470cc2eac3Smrgesac 2348e120bd27Smrg 23490cc2eac3Smrgm4_ifdef([_AS_DETECT_SUGGESTED], 23500cc2eac3Smrg[_AS_DETECT_SUGGESTED([ 23510cc2eac3Smrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 23520cc2eac3Smrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 23530cc2eac3Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 23540cc2eac3Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 23550cc2eac3Smrg PATH=/empty FPATH=/empty; export PATH FPATH 23560cc2eac3Smrg test "X`printf %s $ECHO`" = "X$ECHO" \ 23570cc2eac3Smrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 2358e120bd27Smrg 23590cc2eac3Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 23600cc2eac3Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 23610cc2eac3Smrg])# _LT_PROG_ECHO_BACKSLASH 2362e120bd27Smrg 2363e120bd27Smrg 23640cc2eac3Smrg# _LT_WITH_SYSROOT 23650cc2eac3Smrg# ---------------- 23660cc2eac3SmrgAC_DEFUN([_LT_WITH_SYSROOT], 23670cc2eac3Smrg[AC_MSG_CHECKING([for sysroot]) 23680cc2eac3SmrgAC_ARG_WITH([sysroot], 23690cc2eac3Smrg[ --with-sysroot[=DIR] Search for dependent libraries within DIR 23700cc2eac3Smrg (or the compiler's sysroot if not specified).], 23710cc2eac3Smrg[], [with_sysroot=no]) 23720cc2eac3Smrg 23730cc2eac3Smrgdnl lt_sysroot will always be passed unquoted. We quote it here 23740cc2eac3Smrgdnl in case the user passed a directory name. 23750cc2eac3Smrglt_sysroot= 23760cc2eac3Smrgcase ${with_sysroot} in #( 23770cc2eac3Smrg yes) 23780cc2eac3Smrg if test "$GCC" = yes; then 23790cc2eac3Smrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 23800cc2eac3Smrg fi 23810cc2eac3Smrg ;; #( 23820cc2eac3Smrg /*) 23830cc2eac3Smrg lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 23840cc2eac3Smrg ;; #( 23850cc2eac3Smrg no|'') 23860cc2eac3Smrg ;; #( 23870cc2eac3Smrg *) 23880cc2eac3Smrg AC_MSG_RESULT([${with_sysroot}]) 23890cc2eac3Smrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 23900cc2eac3Smrg ;; 23910cc2eac3Smrgesac 2392e120bd27Smrg 23930cc2eac3Smrg AC_MSG_RESULT([${lt_sysroot:-no}]) 23940cc2eac3Smrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 23950cc2eac3Smrg[dependent libraries, and in which our libraries should be installed.])]) 2396e120bd27Smrg 23970cc2eac3Smrg# _LT_ENABLE_LOCK 23980cc2eac3Smrg# --------------- 23990cc2eac3Smrgm4_defun([_LT_ENABLE_LOCK], 24000cc2eac3Smrg[AC_ARG_ENABLE([libtool-lock], 24010cc2eac3Smrg [AS_HELP_STRING([--disable-libtool-lock], 24020cc2eac3Smrg [avoid locking (might break parallel builds)])]) 24030cc2eac3Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 2404e120bd27Smrg 24050cc2eac3Smrg# Some flags need to be propagated to the compiler or linker for good 24060cc2eac3Smrg# libtool support. 24070cc2eac3Smrgcase $host in 24080cc2eac3Smrgia64-*-hpux*) 24090cc2eac3Smrg # Find out which ABI we are using. 24100cc2eac3Smrg echo 'int i;' > conftest.$ac_ext 24110cc2eac3Smrg if AC_TRY_EVAL(ac_compile); then 24120cc2eac3Smrg case `/usr/bin/file conftest.$ac_objext` in 24130cc2eac3Smrg *ELF-32*) 24140cc2eac3Smrg HPUX_IA64_MODE="32" 24150cc2eac3Smrg ;; 24160cc2eac3Smrg *ELF-64*) 24170cc2eac3Smrg HPUX_IA64_MODE="64" 24180cc2eac3Smrg ;; 24190cc2eac3Smrg esac 24200cc2eac3Smrg fi 24210cc2eac3Smrg rm -rf conftest* 24220cc2eac3Smrg ;; 24230cc2eac3Smrg*-*-irix6*) 24240cc2eac3Smrg # Find out which ABI we are using. 24250cc2eac3Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 24260cc2eac3Smrg if AC_TRY_EVAL(ac_compile); then 24270cc2eac3Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 24280cc2eac3Smrg case `/usr/bin/file conftest.$ac_objext` in 24290cc2eac3Smrg *32-bit*) 24300cc2eac3Smrg LD="${LD-ld} -melf32bsmip" 24310cc2eac3Smrg ;; 24320cc2eac3Smrg *N32*) 24330cc2eac3Smrg LD="${LD-ld} -melf32bmipn32" 24340cc2eac3Smrg ;; 24350cc2eac3Smrg *64-bit*) 24360cc2eac3Smrg LD="${LD-ld} -melf64bmip" 24370cc2eac3Smrg ;; 24380cc2eac3Smrg esac 24390cc2eac3Smrg else 24400cc2eac3Smrg case `/usr/bin/file conftest.$ac_objext` in 24410cc2eac3Smrg *32-bit*) 24420cc2eac3Smrg LD="${LD-ld} -32" 24430cc2eac3Smrg ;; 24440cc2eac3Smrg *N32*) 24450cc2eac3Smrg LD="${LD-ld} -n32" 24460cc2eac3Smrg ;; 24470cc2eac3Smrg *64-bit*) 24480cc2eac3Smrg LD="${LD-ld} -64" 24490cc2eac3Smrg ;; 24500cc2eac3Smrg esac 24510cc2eac3Smrg fi 24520cc2eac3Smrg fi 24530cc2eac3Smrg rm -rf conftest* 24540cc2eac3Smrg ;; 2455e120bd27Smrg 24560cc2eac3Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 24570cc2eac3Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 24580cc2eac3Smrg # Find out which ABI we are using. 24590cc2eac3Smrg echo 'int i;' > conftest.$ac_ext 24600cc2eac3Smrg if AC_TRY_EVAL(ac_compile); then 24610cc2eac3Smrg case `/usr/bin/file conftest.o` in 24620cc2eac3Smrg *32-bit*) 24630cc2eac3Smrg case $host in 24640cc2eac3Smrg x86_64-*kfreebsd*-gnu) 24650cc2eac3Smrg LD="${LD-ld} -m elf_i386_fbsd" 24660cc2eac3Smrg ;; 24670cc2eac3Smrg x86_64-*linux*) 24680cc2eac3Smrg LD="${LD-ld} -m elf_i386" 24690cc2eac3Smrg ;; 24700cc2eac3Smrg ppc64-*linux*|powerpc64-*linux*) 24710cc2eac3Smrg LD="${LD-ld} -m elf32ppclinux" 24720cc2eac3Smrg ;; 24730cc2eac3Smrg s390x-*linux*) 24740cc2eac3Smrg LD="${LD-ld} -m elf_s390" 24750cc2eac3Smrg ;; 24760cc2eac3Smrg sparc64-*linux*) 24770cc2eac3Smrg LD="${LD-ld} -m elf32_sparc" 24780cc2eac3Smrg ;; 24790cc2eac3Smrg esac 24800cc2eac3Smrg ;; 24810cc2eac3Smrg *64-bit*) 24820cc2eac3Smrg case $host in 24830cc2eac3Smrg x86_64-*kfreebsd*-gnu) 24840cc2eac3Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 24850cc2eac3Smrg ;; 24860cc2eac3Smrg x86_64-*linux*) 24870cc2eac3Smrg LD="${LD-ld} -m elf_x86_64" 24880cc2eac3Smrg ;; 24890cc2eac3Smrg ppc*-*linux*|powerpc*-*linux*) 24900cc2eac3Smrg LD="${LD-ld} -m elf64ppc" 24910cc2eac3Smrg ;; 24920cc2eac3Smrg s390*-*linux*|s390*-*tpf*) 24930cc2eac3Smrg LD="${LD-ld} -m elf64_s390" 24940cc2eac3Smrg ;; 24950cc2eac3Smrg sparc*-*linux*) 24960cc2eac3Smrg LD="${LD-ld} -m elf64_sparc" 24970cc2eac3Smrg ;; 24980cc2eac3Smrg esac 24990cc2eac3Smrg ;; 2500e120bd27Smrg esac 25010cc2eac3Smrg fi 25020cc2eac3Smrg rm -rf conftest* 25030cc2eac3Smrg ;; 2504e120bd27Smrg 25050cc2eac3Smrg*-*-sco3.2v5*) 25060cc2eac3Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 25070cc2eac3Smrg SAVE_CFLAGS="$CFLAGS" 25080cc2eac3Smrg CFLAGS="$CFLAGS -belf" 25090cc2eac3Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 25100cc2eac3Smrg [AC_LANG_PUSH(C) 25110cc2eac3Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 25120cc2eac3Smrg AC_LANG_POP]) 25130cc2eac3Smrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 25140cc2eac3Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 25150cc2eac3Smrg CFLAGS="$SAVE_CFLAGS" 25160cc2eac3Smrg fi 25170cc2eac3Smrg ;; 25189d0b5e55Smrg*-*solaris*) 25190cc2eac3Smrg # Find out which ABI we are using. 25200cc2eac3Smrg echo 'int i;' > conftest.$ac_ext 25210cc2eac3Smrg if AC_TRY_EVAL(ac_compile); then 25220cc2eac3Smrg case `/usr/bin/file conftest.o` in 25230cc2eac3Smrg *64-bit*) 25240cc2eac3Smrg case $lt_cv_prog_gnu_ld in 25259d0b5e55Smrg yes*) 25269d0b5e55Smrg case $host in 25279d0b5e55Smrg i?86-*-solaris*) 25289d0b5e55Smrg LD="${LD-ld} -m elf_x86_64" 25299d0b5e55Smrg ;; 25309d0b5e55Smrg sparc*-*-solaris*) 25319d0b5e55Smrg LD="${LD-ld} -m elf64_sparc" 25329d0b5e55Smrg ;; 25339d0b5e55Smrg esac 25349d0b5e55Smrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 25359d0b5e55Smrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 25369d0b5e55Smrg LD="${LD-ld}_sol2" 25379d0b5e55Smrg fi 25389d0b5e55Smrg ;; 25390cc2eac3Smrg *) 25400cc2eac3Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 25410cc2eac3Smrg LD="${LD-ld} -64" 25420cc2eac3Smrg fi 25430cc2eac3Smrg ;; 25440cc2eac3Smrg esac 2545e120bd27Smrg ;; 2546e120bd27Smrg esac 25470cc2eac3Smrg fi 25480cc2eac3Smrg rm -rf conftest* 25490cc2eac3Smrg ;; 25500cc2eac3Smrgesac 2551e120bd27Smrg 25520cc2eac3Smrgneed_locks="$enable_libtool_lock" 25530cc2eac3Smrg])# _LT_ENABLE_LOCK 2554e120bd27Smrg 2555e120bd27Smrg 25560cc2eac3Smrg# _LT_PROG_AR 25570cc2eac3Smrg# ----------- 25580cc2eac3Smrgm4_defun([_LT_PROG_AR], 25590cc2eac3Smrg[AC_CHECK_TOOLS(AR, [ar], false) 25600cc2eac3Smrg: ${AR=ar} 25610cc2eac3Smrg: ${AR_FLAGS=cru} 25620cc2eac3Smrg_LT_DECL([], [AR], [1], [The archiver]) 25630cc2eac3Smrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 25640cc2eac3Smrg 25650cc2eac3SmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 25660cc2eac3Smrg [lt_cv_ar_at_file=no 25670cc2eac3Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 25680cc2eac3Smrg [echo conftest.$ac_objext > conftest.lst 25690cc2eac3Smrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 25700cc2eac3Smrg AC_TRY_EVAL([lt_ar_try]) 25710cc2eac3Smrg if test "$ac_status" -eq 0; then 25720cc2eac3Smrg # Ensure the archiver fails upon bogus file names. 25730cc2eac3Smrg rm -f conftest.$ac_objext libconftest.a 25740cc2eac3Smrg AC_TRY_EVAL([lt_ar_try]) 25750cc2eac3Smrg if test "$ac_status" -ne 0; then 25760cc2eac3Smrg lt_cv_ar_at_file=@ 25770cc2eac3Smrg fi 25780cc2eac3Smrg fi 25790cc2eac3Smrg rm -f conftest.* libconftest.a 25800cc2eac3Smrg ]) 25810cc2eac3Smrg ]) 2582e120bd27Smrg 25830cc2eac3Smrgif test "x$lt_cv_ar_at_file" = xno; then 25840cc2eac3Smrg archiver_list_spec= 25850cc2eac3Smrgelse 25860cc2eac3Smrg archiver_list_spec=$lt_cv_ar_at_file 25870cc2eac3Smrgfi 25880cc2eac3Smrg_LT_DECL([], [archiver_list_spec], [1], 25890cc2eac3Smrg [How to feed a file listing to the archiver]) 25900cc2eac3Smrg])# _LT_PROG_AR 2591e120bd27Smrg 2592e120bd27Smrg 25930cc2eac3Smrg# _LT_CMD_OLD_ARCHIVE 25940cc2eac3Smrg# ------------------- 25950cc2eac3Smrgm4_defun([_LT_CMD_OLD_ARCHIVE], 25960cc2eac3Smrg[_LT_PROG_AR 2597e120bd27Smrg 25980cc2eac3SmrgAC_CHECK_TOOL(STRIP, strip, :) 25990cc2eac3Smrgtest -z "$STRIP" && STRIP=: 26000cc2eac3Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 2601e120bd27Smrg 26020cc2eac3SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 26030cc2eac3Smrgtest -z "$RANLIB" && RANLIB=: 26040cc2eac3Smrg_LT_DECL([], [RANLIB], [1], 26050cc2eac3Smrg [Commands used to install an old-style archive]) 2606e120bd27Smrg 26070cc2eac3Smrg# Determine commands to create old-style static archives. 26080cc2eac3Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 26090cc2eac3Smrgold_postinstall_cmds='chmod 644 $oldlib' 26100cc2eac3Smrgold_postuninstall_cmds= 2611e120bd27Smrg 26120cc2eac3Smrgif test -n "$RANLIB"; then 26130cc2eac3Smrg case $host_os in 26140cc2eac3Smrg openbsd*) 26159d0b5e55Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 26160cc2eac3Smrg ;; 26170cc2eac3Smrg *) 26189d0b5e55Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 26190cc2eac3Smrg ;; 26200cc2eac3Smrg esac 26219d0b5e55Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 26220cc2eac3Smrgfi 2623e120bd27Smrg 26240cc2eac3Smrgcase $host_os in 26250cc2eac3Smrg darwin*) 26260cc2eac3Smrg lock_old_archive_extraction=yes ;; 26270cc2eac3Smrg *) 26280cc2eac3Smrg lock_old_archive_extraction=no ;; 26290cc2eac3Smrgesac 26300cc2eac3Smrg_LT_DECL([], [old_postinstall_cmds], [2]) 26310cc2eac3Smrg_LT_DECL([], [old_postuninstall_cmds], [2]) 26320cc2eac3Smrg_LT_TAGDECL([], [old_archive_cmds], [2], 26330cc2eac3Smrg [Commands used to build an old-style archive]) 26340cc2eac3Smrg_LT_DECL([], [lock_old_archive_extraction], [0], 26350cc2eac3Smrg [Whether to use a lock for old archive extraction]) 26360cc2eac3Smrg])# _LT_CMD_OLD_ARCHIVE 2637e120bd27Smrg 2638e120bd27Smrg 26390cc2eac3Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 26400cc2eac3Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 26410cc2eac3Smrg# ---------------------------------------------------------------- 26420cc2eac3Smrg# Check whether the given compiler option works 26430cc2eac3SmrgAC_DEFUN([_LT_COMPILER_OPTION], 26440cc2eac3Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 26450cc2eac3Smrgm4_require([_LT_DECL_SED])dnl 26460cc2eac3SmrgAC_CACHE_CHECK([$1], [$2], 26470cc2eac3Smrg [$2=no 26480cc2eac3Smrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 26490cc2eac3Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 26500cc2eac3Smrg lt_compiler_flag="$3" 26510cc2eac3Smrg # Insert the option either (1) after the last *FLAGS variable, or 26520cc2eac3Smrg # (2) before a word containing "conftest.", or (3) at the end. 26530cc2eac3Smrg # Note that $ac_compile itself does not contain backslashes and begins 26540cc2eac3Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 26550cc2eac3Smrg # The option is referenced via a variable to avoid confusing sed. 26560cc2eac3Smrg lt_compile=`echo "$ac_compile" | $SED \ 26570cc2eac3Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 26580cc2eac3Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 26590cc2eac3Smrg -e 's:$: $lt_compiler_flag:'` 26600cc2eac3Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 26610cc2eac3Smrg (eval "$lt_compile" 2>conftest.err) 26620cc2eac3Smrg ac_status=$? 26630cc2eac3Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 26640cc2eac3Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 26650cc2eac3Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 26660cc2eac3Smrg # The compiler can only warn and ignore the option if not recognized 26670cc2eac3Smrg # So say no if there are warnings other than the usual output. 26680cc2eac3Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 26690cc2eac3Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 26700cc2eac3Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 26710cc2eac3Smrg $2=yes 26720cc2eac3Smrg fi 26730cc2eac3Smrg fi 26740cc2eac3Smrg $RM conftest* 26750cc2eac3Smrg]) 2676e120bd27Smrg 26770cc2eac3Smrgif test x"[$]$2" = xyes; then 26780cc2eac3Smrg m4_if([$5], , :, [$5]) 26790cc2eac3Smrgelse 26800cc2eac3Smrg m4_if([$6], , :, [$6]) 2681e120bd27Smrgfi 26820cc2eac3Smrg])# _LT_COMPILER_OPTION 2683e120bd27Smrg 26840cc2eac3Smrg# Old name: 26850cc2eac3SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 26860cc2eac3Smrgdnl aclocal-1.4 backwards compatibility: 26870cc2eac3Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 2688e120bd27Smrg 2689e120bd27Smrg 26900cc2eac3Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 26910cc2eac3Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 26920cc2eac3Smrg# ---------------------------------------------------- 26930cc2eac3Smrg# Check whether the given linker option works 26940cc2eac3SmrgAC_DEFUN([_LT_LINKER_OPTION], 2695e120bd27Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 26960cc2eac3Smrgm4_require([_LT_DECL_SED])dnl 26970cc2eac3SmrgAC_CACHE_CHECK([$1], [$2], 26980cc2eac3Smrg [$2=no 26990cc2eac3Smrg save_LDFLAGS="$LDFLAGS" 27000cc2eac3Smrg LDFLAGS="$LDFLAGS $3" 27010cc2eac3Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 27020cc2eac3Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 27030cc2eac3Smrg # The linker can only warn and ignore the option if not recognized 27040cc2eac3Smrg # So say no if there are warnings 27050cc2eac3Smrg if test -s conftest.err; then 27060cc2eac3Smrg # Append any errors to the config.log. 27070cc2eac3Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 27080cc2eac3Smrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 27090cc2eac3Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 27100cc2eac3Smrg if diff conftest.exp conftest.er2 >/dev/null; then 27110cc2eac3Smrg $2=yes 27120cc2eac3Smrg fi 27130cc2eac3Smrg else 27140cc2eac3Smrg $2=yes 27150cc2eac3Smrg fi 27160cc2eac3Smrg fi 27170cc2eac3Smrg $RM -r conftest* 27180cc2eac3Smrg LDFLAGS="$save_LDFLAGS" 27190cc2eac3Smrg]) 2720e120bd27Smrg 27210cc2eac3Smrgif test x"[$]$2" = xyes; then 27220cc2eac3Smrg m4_if([$4], , :, [$4]) 27230cc2eac3Smrgelse 27240cc2eac3Smrg m4_if([$5], , :, [$5]) 27250cc2eac3Smrgfi 27260cc2eac3Smrg])# _LT_LINKER_OPTION 2727e120bd27Smrg 27280cc2eac3Smrg# Old name: 27290cc2eac3SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 27300cc2eac3Smrgdnl aclocal-1.4 backwards compatibility: 27310cc2eac3Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 2732e120bd27Smrg 2733e120bd27Smrg 27340cc2eac3Smrg# LT_CMD_MAX_LEN 27350cc2eac3Smrg#--------------- 27360cc2eac3SmrgAC_DEFUN([LT_CMD_MAX_LEN], 27370cc2eac3Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 27380cc2eac3Smrg# find the maximum length of command line arguments 27390cc2eac3SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 27400cc2eac3SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 27410cc2eac3Smrg i=0 27420cc2eac3Smrg teststring="ABCD" 2743e120bd27Smrg 27440cc2eac3Smrg case $build_os in 27450cc2eac3Smrg msdosdjgpp*) 27460cc2eac3Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 27470cc2eac3Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 27480cc2eac3Smrg # during glob expansion). Even if it were fixed, the result of this 27490cc2eac3Smrg # check would be larger than it should be. 27500cc2eac3Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 27510cc2eac3Smrg ;; 2752e120bd27Smrg 27530cc2eac3Smrg gnu*) 27540cc2eac3Smrg # Under GNU Hurd, this test is not required because there is 27550cc2eac3Smrg # no limit to the length of command line arguments. 27560cc2eac3Smrg # Libtool will interpret -1 as no limit whatsoever 27570cc2eac3Smrg lt_cv_sys_max_cmd_len=-1; 2758e120bd27Smrg ;; 2759e120bd27Smrg 27600cc2eac3Smrg cygwin* | mingw* | cegcc*) 27610cc2eac3Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 27620cc2eac3Smrg # about 5 minutes as the teststring grows exponentially. 27630cc2eac3Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 27640cc2eac3Smrg # you end up with a "frozen" computer, even though with patience 27650cc2eac3Smrg # the test eventually succeeds (with a max line length of 256k). 27660cc2eac3Smrg # Instead, let's just punt: use the minimum linelength reported by 27670cc2eac3Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 27680cc2eac3Smrg lt_cv_sys_max_cmd_len=8192; 27690cc2eac3Smrg ;; 2770e120bd27Smrg 27710cc2eac3Smrg mint*) 27720cc2eac3Smrg # On MiNT this can take a long time and run out of memory. 27730cc2eac3Smrg lt_cv_sys_max_cmd_len=8192; 27740cc2eac3Smrg ;; 2775e120bd27Smrg 27760cc2eac3Smrg amigaos*) 27770cc2eac3Smrg # On AmigaOS with pdksh, this test takes hours, literally. 27780cc2eac3Smrg # So we just punt and use a minimum line length of 8192. 27790cc2eac3Smrg lt_cv_sys_max_cmd_len=8192; 27800cc2eac3Smrg ;; 2781e120bd27Smrg 27820cc2eac3Smrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 27830cc2eac3Smrg # This has been around since 386BSD, at least. Likely further. 27840cc2eac3Smrg if test -x /sbin/sysctl; then 27850cc2eac3Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 27860cc2eac3Smrg elif test -x /usr/sbin/sysctl; then 27870cc2eac3Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 27880cc2eac3Smrg else 27890cc2eac3Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 27900cc2eac3Smrg fi 27910cc2eac3Smrg # And add a safety zone 27920cc2eac3Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 27930cc2eac3Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 27940cc2eac3Smrg ;; 2795e120bd27Smrg 27960cc2eac3Smrg interix*) 27970cc2eac3Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 27980cc2eac3Smrg lt_cv_sys_max_cmd_len=196608 27990cc2eac3Smrg ;; 2800e120bd27Smrg 28019d0b5e55Smrg os2*) 28029d0b5e55Smrg # The test takes a long time on OS/2. 28039d0b5e55Smrg lt_cv_sys_max_cmd_len=8192 28049d0b5e55Smrg ;; 28059d0b5e55Smrg 28060cc2eac3Smrg osf*) 28070cc2eac3Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 28080cc2eac3Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 28090cc2eac3Smrg # nice to cause kernel panics so lets avoid the loop below. 28100cc2eac3Smrg # First set a reasonable default. 28110cc2eac3Smrg lt_cv_sys_max_cmd_len=16384 28120cc2eac3Smrg # 28130cc2eac3Smrg if test -x /sbin/sysconfig; then 28140cc2eac3Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 28150cc2eac3Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 28160cc2eac3Smrg esac 28170cc2eac3Smrg fi 28180cc2eac3Smrg ;; 28190cc2eac3Smrg sco3.2v5*) 28200cc2eac3Smrg lt_cv_sys_max_cmd_len=102400 28210cc2eac3Smrg ;; 28220cc2eac3Smrg sysv5* | sco5v6* | sysv4.2uw2*) 28230cc2eac3Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 28240cc2eac3Smrg if test -n "$kargmax"; then 28250cc2eac3Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 28260cc2eac3Smrg else 28270cc2eac3Smrg lt_cv_sys_max_cmd_len=32768 28280cc2eac3Smrg fi 28290cc2eac3Smrg ;; 28300cc2eac3Smrg *) 28310cc2eac3Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 28320cc2eac3Smrg if test -n "$lt_cv_sys_max_cmd_len"; then 28330cc2eac3Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 28340cc2eac3Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 28350cc2eac3Smrg else 28360cc2eac3Smrg # Make teststring a little bigger before we do anything with it. 28370cc2eac3Smrg # a 1K string should be a reasonable start. 28380cc2eac3Smrg for i in 1 2 3 4 5 6 7 8 ; do 28390cc2eac3Smrg teststring=$teststring$teststring 28400cc2eac3Smrg done 28410cc2eac3Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 28420cc2eac3Smrg # If test is not a shell built-in, we'll probably end up computing a 28430cc2eac3Smrg # maximum length that is only half of the actual maximum length, but 28440cc2eac3Smrg # we can't tell. 28459d0b5e55Smrg while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ 28460cc2eac3Smrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 28470cc2eac3Smrg test $i != 17 # 1/2 MB should be enough 28480cc2eac3Smrg do 28490cc2eac3Smrg i=`expr $i + 1` 28500cc2eac3Smrg teststring=$teststring$teststring 28510cc2eac3Smrg done 28520cc2eac3Smrg # Only check the string length outside the loop. 28530cc2eac3Smrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 28540cc2eac3Smrg teststring= 28550cc2eac3Smrg # Add a significant safety factor because C++ compilers can tack on 28560cc2eac3Smrg # massive amounts of additional arguments before passing them to the 28570cc2eac3Smrg # linker. It appears as though 1/2 is a usable value. 28580cc2eac3Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 28590cc2eac3Smrg fi 28600cc2eac3Smrg ;; 28610cc2eac3Smrg esac 28620cc2eac3Smrg]) 28630cc2eac3Smrgif test -n $lt_cv_sys_max_cmd_len ; then 28640cc2eac3Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 28650cc2eac3Smrgelse 28660cc2eac3Smrg AC_MSG_RESULT(none) 28670cc2eac3Smrgfi 28680cc2eac3Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 28690cc2eac3Smrg_LT_DECL([], [max_cmd_len], [0], 28700cc2eac3Smrg [What is the maximum length of a command?]) 28710cc2eac3Smrg])# LT_CMD_MAX_LEN 2872e120bd27Smrg 28730cc2eac3Smrg# Old name: 28740cc2eac3SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 28750cc2eac3Smrgdnl aclocal-1.4 backwards compatibility: 28760cc2eac3Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 2877e120bd27Smrg 2878e120bd27Smrg 28790cc2eac3Smrg# _LT_HEADER_DLFCN 28800cc2eac3Smrg# ---------------- 28810cc2eac3Smrgm4_defun([_LT_HEADER_DLFCN], 28820cc2eac3Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 28830cc2eac3Smrg])# _LT_HEADER_DLFCN 2884e120bd27Smrg 2885e120bd27Smrg 28860cc2eac3Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 28870cc2eac3Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 28880cc2eac3Smrg# ---------------------------------------------------------------- 28890cc2eac3Smrgm4_defun([_LT_TRY_DLOPEN_SELF], 28900cc2eac3Smrg[m4_require([_LT_HEADER_DLFCN])dnl 28910cc2eac3Smrgif test "$cross_compiling" = yes; then : 28920cc2eac3Smrg [$4] 28930cc2eac3Smrgelse 28940cc2eac3Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 28950cc2eac3Smrg lt_status=$lt_dlunknown 28960cc2eac3Smrg cat > conftest.$ac_ext <<_LT_EOF 28970cc2eac3Smrg[#line $LINENO "configure" 28980cc2eac3Smrg#include "confdefs.h" 2899e120bd27Smrg 29000cc2eac3Smrg#if HAVE_DLFCN_H 29010cc2eac3Smrg#include <dlfcn.h> 29020cc2eac3Smrg#endif 2903e120bd27Smrg 29040cc2eac3Smrg#include <stdio.h> 2905e120bd27Smrg 29060cc2eac3Smrg#ifdef RTLD_GLOBAL 29070cc2eac3Smrg# define LT_DLGLOBAL RTLD_GLOBAL 29080cc2eac3Smrg#else 29090cc2eac3Smrg# ifdef DL_GLOBAL 29100cc2eac3Smrg# define LT_DLGLOBAL DL_GLOBAL 29110cc2eac3Smrg# else 29120cc2eac3Smrg# define LT_DLGLOBAL 0 29130cc2eac3Smrg# endif 29140cc2eac3Smrg#endif 2915e120bd27Smrg 29160cc2eac3Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 29170cc2eac3Smrg find out it does not work in some platform. */ 29180cc2eac3Smrg#ifndef LT_DLLAZY_OR_NOW 29190cc2eac3Smrg# ifdef RTLD_LAZY 29200cc2eac3Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 29210cc2eac3Smrg# else 29220cc2eac3Smrg# ifdef DL_LAZY 29230cc2eac3Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 29240cc2eac3Smrg# else 29250cc2eac3Smrg# ifdef RTLD_NOW 29260cc2eac3Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 29270cc2eac3Smrg# else 29280cc2eac3Smrg# ifdef DL_NOW 29290cc2eac3Smrg# define LT_DLLAZY_OR_NOW DL_NOW 29300cc2eac3Smrg# else 29310cc2eac3Smrg# define LT_DLLAZY_OR_NOW 0 29320cc2eac3Smrg# endif 29330cc2eac3Smrg# endif 29340cc2eac3Smrg# endif 29350cc2eac3Smrg# endif 29360cc2eac3Smrg#endif 2937e120bd27Smrg 29380cc2eac3Smrg/* When -fvisbility=hidden is used, assume the code has been annotated 29390cc2eac3Smrg correspondingly for the symbols needed. */ 29400cc2eac3Smrg#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 29410cc2eac3Smrgint fnord () __attribute__((visibility("default"))); 29420cc2eac3Smrg#endif 2943e120bd27Smrg 29440cc2eac3Smrgint fnord () { return 42; } 29450cc2eac3Smrgint main () 29460cc2eac3Smrg{ 29470cc2eac3Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 29480cc2eac3Smrg int status = $lt_dlunknown; 2949e120bd27Smrg 29500cc2eac3Smrg if (self) 29510cc2eac3Smrg { 29520cc2eac3Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 29530cc2eac3Smrg else 29540cc2eac3Smrg { 29550cc2eac3Smrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 29560cc2eac3Smrg else puts (dlerror ()); 29570cc2eac3Smrg } 29580cc2eac3Smrg /* dlclose (self); */ 29590cc2eac3Smrg } 29600cc2eac3Smrg else 29610cc2eac3Smrg puts (dlerror ()); 2962e120bd27Smrg 29630cc2eac3Smrg return status; 29640cc2eac3Smrg}] 29650cc2eac3Smrg_LT_EOF 29660cc2eac3Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 29670cc2eac3Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 29680cc2eac3Smrg lt_status=$? 29690cc2eac3Smrg case x$lt_status in 29700cc2eac3Smrg x$lt_dlno_uscore) $1 ;; 29710cc2eac3Smrg x$lt_dlneed_uscore) $2 ;; 29720cc2eac3Smrg x$lt_dlunknown|x*) $3 ;; 29730cc2eac3Smrg esac 29740cc2eac3Smrg else : 29750cc2eac3Smrg # compilation failed 29760cc2eac3Smrg $3 29770cc2eac3Smrg fi 29780cc2eac3Smrgfi 29790cc2eac3Smrgrm -fr conftest* 29800cc2eac3Smrg])# _LT_TRY_DLOPEN_SELF 2981e120bd27Smrg 2982e120bd27Smrg 29830cc2eac3Smrg# LT_SYS_DLOPEN_SELF 29840cc2eac3Smrg# ------------------ 29850cc2eac3SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 29860cc2eac3Smrg[m4_require([_LT_HEADER_DLFCN])dnl 29870cc2eac3Smrgif test "x$enable_dlopen" != xyes; then 29880cc2eac3Smrg enable_dlopen=unknown 29890cc2eac3Smrg enable_dlopen_self=unknown 29900cc2eac3Smrg enable_dlopen_self_static=unknown 29910cc2eac3Smrgelse 29920cc2eac3Smrg lt_cv_dlopen=no 29930cc2eac3Smrg lt_cv_dlopen_libs= 2994e120bd27Smrg 29950cc2eac3Smrg case $host_os in 29960cc2eac3Smrg beos*) 29970cc2eac3Smrg lt_cv_dlopen="load_add_on" 29980cc2eac3Smrg lt_cv_dlopen_libs= 29990cc2eac3Smrg lt_cv_dlopen_self=yes 30000cc2eac3Smrg ;; 3001e120bd27Smrg 30020cc2eac3Smrg mingw* | pw32* | cegcc*) 30030cc2eac3Smrg lt_cv_dlopen="LoadLibrary" 30040cc2eac3Smrg lt_cv_dlopen_libs= 30050cc2eac3Smrg ;; 3006e120bd27Smrg 30070cc2eac3Smrg cygwin*) 30080cc2eac3Smrg lt_cv_dlopen="dlopen" 30090cc2eac3Smrg lt_cv_dlopen_libs= 30100cc2eac3Smrg ;; 3011e120bd27Smrg 30120cc2eac3Smrg darwin*) 30130cc2eac3Smrg # if libdl is installed we need to link against it 30140cc2eac3Smrg AC_CHECK_LIB([dl], [dlopen], 30150cc2eac3Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 30160cc2eac3Smrg lt_cv_dlopen="dyld" 30170cc2eac3Smrg lt_cv_dlopen_libs= 30180cc2eac3Smrg lt_cv_dlopen_self=yes 30190cc2eac3Smrg ]) 30200cc2eac3Smrg ;; 3021e120bd27Smrg 30220cc2eac3Smrg *) 30230cc2eac3Smrg AC_CHECK_FUNC([shl_load], 30240cc2eac3Smrg [lt_cv_dlopen="shl_load"], 30250cc2eac3Smrg [AC_CHECK_LIB([dld], [shl_load], 30260cc2eac3Smrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 30270cc2eac3Smrg [AC_CHECK_FUNC([dlopen], 30280cc2eac3Smrg [lt_cv_dlopen="dlopen"], 30290cc2eac3Smrg [AC_CHECK_LIB([dl], [dlopen], 30300cc2eac3Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 30310cc2eac3Smrg [AC_CHECK_LIB([svld], [dlopen], 30320cc2eac3Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 30330cc2eac3Smrg [AC_CHECK_LIB([dld], [dld_link], 30340cc2eac3Smrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 30350cc2eac3Smrg ]) 30360cc2eac3Smrg ]) 30370cc2eac3Smrg ]) 30380cc2eac3Smrg ]) 30390cc2eac3Smrg ]) 30400cc2eac3Smrg ;; 30410cc2eac3Smrg esac 3042e120bd27Smrg 30430cc2eac3Smrg if test "x$lt_cv_dlopen" != xno; then 30440cc2eac3Smrg enable_dlopen=yes 30450cc2eac3Smrg else 30460cc2eac3Smrg enable_dlopen=no 30470cc2eac3Smrg fi 3048e120bd27Smrg 30490cc2eac3Smrg case $lt_cv_dlopen in 30500cc2eac3Smrg dlopen) 30510cc2eac3Smrg save_CPPFLAGS="$CPPFLAGS" 30520cc2eac3Smrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 3053e120bd27Smrg 30540cc2eac3Smrg save_LDFLAGS="$LDFLAGS" 30550cc2eac3Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 3056e120bd27Smrg 30570cc2eac3Smrg save_LIBS="$LIBS" 30580cc2eac3Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 305993493779Smrg 30600cc2eac3Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 30610cc2eac3Smrg lt_cv_dlopen_self, [dnl 30620cc2eac3Smrg _LT_TRY_DLOPEN_SELF( 30630cc2eac3Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 30640cc2eac3Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 306593493779Smrg ]) 30660cc2eac3Smrg 30670cc2eac3Smrg if test "x$lt_cv_dlopen_self" = xyes; then 30680cc2eac3Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 30690cc2eac3Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 30700cc2eac3Smrg lt_cv_dlopen_self_static, [dnl 30710cc2eac3Smrg _LT_TRY_DLOPEN_SELF( 30720cc2eac3Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 30730cc2eac3Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 30740cc2eac3Smrg ]) 307593493779Smrg fi 30760cc2eac3Smrg 30770cc2eac3Smrg CPPFLAGS="$save_CPPFLAGS" 30780cc2eac3Smrg LDFLAGS="$save_LDFLAGS" 30790cc2eac3Smrg LIBS="$save_LIBS" 308093493779Smrg ;; 308193493779Smrg esac 30826c321187Smrg 30830cc2eac3Smrg case $lt_cv_dlopen_self in 30840cc2eac3Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 30850cc2eac3Smrg *) enable_dlopen_self=unknown ;; 30860cc2eac3Smrg esac 3087e120bd27Smrg 30880cc2eac3Smrg case $lt_cv_dlopen_self_static in 30890cc2eac3Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 30900cc2eac3Smrg *) enable_dlopen_self_static=unknown ;; 3091e120bd27Smrg esac 30920cc2eac3Smrgfi 30930cc2eac3Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 30940cc2eac3Smrg [Whether dlopen is supported]) 30950cc2eac3Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 30960cc2eac3Smrg [Whether dlopen of programs is supported]) 30970cc2eac3Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 30980cc2eac3Smrg [Whether dlopen of statically linked programs is supported]) 30990cc2eac3Smrg])# LT_SYS_DLOPEN_SELF 3100e120bd27Smrg 31010cc2eac3Smrg# Old name: 31020cc2eac3SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 31030cc2eac3Smrgdnl aclocal-1.4 backwards compatibility: 31040cc2eac3Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 31056c321187Smrg 31066c321187Smrg 31070cc2eac3Smrg# _LT_COMPILER_C_O([TAGNAME]) 31080cc2eac3Smrg# --------------------------- 31090cc2eac3Smrg# Check to see if options -c and -o are simultaneously supported by compiler. 31100cc2eac3Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 31110cc2eac3Smrgm4_defun([_LT_COMPILER_C_O], 31120cc2eac3Smrg[m4_require([_LT_DECL_SED])dnl 31130cc2eac3Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 31140cc2eac3Smrgm4_require([_LT_TAG_COMPILER])dnl 31150cc2eac3SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 31160cc2eac3Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 31170cc2eac3Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 31180cc2eac3Smrg $RM -r conftest 2>/dev/null 31190cc2eac3Smrg mkdir conftest 31200cc2eac3Smrg cd conftest 31210cc2eac3Smrg mkdir out 31220cc2eac3Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 31236c321187Smrg 31240cc2eac3Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 31250cc2eac3Smrg # Insert the option either (1) after the last *FLAGS variable, or 31260cc2eac3Smrg # (2) before a word containing "conftest.", or (3) at the end. 31270cc2eac3Smrg # Note that $ac_compile itself does not contain backslashes and begins 31280cc2eac3Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 31290cc2eac3Smrg lt_compile=`echo "$ac_compile" | $SED \ 31300cc2eac3Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 31310cc2eac3Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 31320cc2eac3Smrg -e 's:$: $lt_compiler_flag:'` 31330cc2eac3Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 31340cc2eac3Smrg (eval "$lt_compile" 2>out/conftest.err) 31350cc2eac3Smrg ac_status=$? 31360cc2eac3Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 31370cc2eac3Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 31380cc2eac3Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 31390cc2eac3Smrg then 31400cc2eac3Smrg # The compiler can only warn and ignore the option if not recognized 31410cc2eac3Smrg # So say no if there are warnings 31420cc2eac3Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 31430cc2eac3Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 31440cc2eac3Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 31450cc2eac3Smrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 31460cc2eac3Smrg fi 31470cc2eac3Smrg fi 31480cc2eac3Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 31490cc2eac3Smrg $RM conftest* 31500cc2eac3Smrg # SGI C++ compiler will create directory out/ii_files/ for 31510cc2eac3Smrg # template instantiation 31520cc2eac3Smrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 31530cc2eac3Smrg $RM out/* && rmdir out 31540cc2eac3Smrg cd .. 31550cc2eac3Smrg $RM -r conftest 31560cc2eac3Smrg $RM conftest* 31570cc2eac3Smrg]) 31580cc2eac3Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 31590cc2eac3Smrg [Does compiler simultaneously support -c and -o options?]) 31600cc2eac3Smrg])# _LT_COMPILER_C_O 31616c321187Smrg 31626c321187Smrg 31630cc2eac3Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 31640cc2eac3Smrg# ---------------------------------- 31650cc2eac3Smrg# Check to see if we can do hard links to lock some files if needed 31660cc2eac3Smrgm4_defun([_LT_COMPILER_FILE_LOCKS], 31670cc2eac3Smrg[m4_require([_LT_ENABLE_LOCK])dnl 31680cc2eac3Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 31690cc2eac3Smrg_LT_COMPILER_C_O([$1]) 3170e120bd27Smrg 31710cc2eac3Smrghard_links="nottested" 31720cc2eac3Smrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 31730cc2eac3Smrg # do not overwrite the value of need_locks provided by the user 31740cc2eac3Smrg AC_MSG_CHECKING([if we can lock with hard links]) 31750cc2eac3Smrg hard_links=yes 31760cc2eac3Smrg $RM conftest* 31770cc2eac3Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 31780cc2eac3Smrg touch conftest.a 31790cc2eac3Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 31800cc2eac3Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 31810cc2eac3Smrg AC_MSG_RESULT([$hard_links]) 31820cc2eac3Smrg if test "$hard_links" = no; then 31830cc2eac3Smrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 31840cc2eac3Smrg need_locks=warn 31850cc2eac3Smrg fi 31866c321187Smrgelse 31870cc2eac3Smrg need_locks=no 31886c321187Smrgfi 31890cc2eac3Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 31900cc2eac3Smrg])# _LT_COMPILER_FILE_LOCKS 31916c321187Smrg 31926c321187Smrg 31930cc2eac3Smrg# _LT_CHECK_OBJDIR 31940cc2eac3Smrg# ---------------- 31950cc2eac3Smrgm4_defun([_LT_CHECK_OBJDIR], 31960cc2eac3Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 31970cc2eac3Smrg[rm -f .libs 2>/dev/null 31980cc2eac3Smrgmkdir .libs 2>/dev/null 31990cc2eac3Smrgif test -d .libs; then 32000cc2eac3Smrg lt_cv_objdir=.libs 32010cc2eac3Smrgelse 32020cc2eac3Smrg # MS-DOS does not allow filenames that begin with a dot. 32030cc2eac3Smrg lt_cv_objdir=_libs 32040cc2eac3Smrgfi 32050cc2eac3Smrgrmdir .libs 2>/dev/null]) 32060cc2eac3Smrgobjdir=$lt_cv_objdir 32070cc2eac3Smrg_LT_DECL([], [objdir], [0], 32080cc2eac3Smrg [The name of the directory that contains temporary libtool files])dnl 32090cc2eac3Smrgm4_pattern_allow([LT_OBJDIR])dnl 32100cc2eac3SmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 32110cc2eac3Smrg [Define to the sub-directory in which libtool stores uninstalled libraries.]) 32120cc2eac3Smrg])# _LT_CHECK_OBJDIR 32136c321187Smrg 32146c321187Smrg 32150cc2eac3Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 32160cc2eac3Smrg# -------------------------------------- 32170cc2eac3Smrg# Check hardcoding attributes. 32180cc2eac3Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 32190cc2eac3Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 32200cc2eac3Smrg_LT_TAGVAR(hardcode_action, $1)= 32210cc2eac3Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 32220cc2eac3Smrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 32230cc2eac3Smrg test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 32246c321187Smrg 32250cc2eac3Smrg # We can hardcode non-existent directories. 32260cc2eac3Smrg if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 32270cc2eac3Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 32280cc2eac3Smrg # have to relink, otherwise we might link with an installed library 32290cc2eac3Smrg # when we should be linking with a yet-to-be-installed one 32300cc2eac3Smrg ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 32310cc2eac3Smrg test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 32320cc2eac3Smrg # Linking always hardcodes the temporary library directory. 32330cc2eac3Smrg _LT_TAGVAR(hardcode_action, $1)=relink 32340cc2eac3Smrg else 32350cc2eac3Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 32360cc2eac3Smrg _LT_TAGVAR(hardcode_action, $1)=immediate 32376c321187Smrg fi 32380cc2eac3Smrgelse 32390cc2eac3Smrg # We cannot hardcode anything, or else we can only hardcode existing 32400cc2eac3Smrg # directories. 32410cc2eac3Smrg _LT_TAGVAR(hardcode_action, $1)=unsupported 32420cc2eac3Smrgfi 32430cc2eac3SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 3244e120bd27Smrg 32450cc2eac3Smrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 32460cc2eac3Smrg test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 32470cc2eac3Smrg # Fast installation is not supported 32480cc2eac3Smrg enable_fast_install=no 32490cc2eac3Smrgelif test "$shlibpath_overrides_runpath" = yes || 32500cc2eac3Smrg test "$enable_shared" = no; then 32510cc2eac3Smrg # Fast installation is not necessary 32520cc2eac3Smrg enable_fast_install=needless 32530cc2eac3Smrgfi 32540cc2eac3Smrg_LT_TAGDECL([], [hardcode_action], [0], 32550cc2eac3Smrg [How to hardcode a shared library path into an executable]) 32560cc2eac3Smrg])# _LT_LINKER_HARDCODE_LIBPATH 3257e120bd27Smrg 3258e120bd27Smrg 32590cc2eac3Smrg# _LT_CMD_STRIPLIB 32600cc2eac3Smrg# ---------------- 32610cc2eac3Smrgm4_defun([_LT_CMD_STRIPLIB], 32620cc2eac3Smrg[m4_require([_LT_DECL_EGREP]) 32630cc2eac3Smrgstriplib= 32640cc2eac3Smrgold_striplib= 32650cc2eac3SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 32660cc2eac3Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 32670cc2eac3Smrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 32680cc2eac3Smrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 32690cc2eac3Smrg AC_MSG_RESULT([yes]) 32700cc2eac3Smrgelse 32710cc2eac3Smrg# FIXME - insert some real tests, host_os isn't really good enough 3272e120bd27Smrg case $host_os in 32730cc2eac3Smrg darwin*) 32740cc2eac3Smrg if test -n "$STRIP" ; then 32750cc2eac3Smrg striplib="$STRIP -x" 32760cc2eac3Smrg old_striplib="$STRIP -S" 32770cc2eac3Smrg AC_MSG_RESULT([yes]) 32780cc2eac3Smrg else 32790cc2eac3Smrg AC_MSG_RESULT([no]) 32800cc2eac3Smrg fi 3281e120bd27Smrg ;; 3282e120bd27Smrg *) 32830cc2eac3Smrg AC_MSG_RESULT([no]) 3284e120bd27Smrg ;; 3285e120bd27Smrg esac 3286e120bd27Smrgfi 32870cc2eac3Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 32880cc2eac3Smrg_LT_DECL([], [striplib], [1]) 32890cc2eac3Smrg])# _LT_CMD_STRIPLIB 32906c321187Smrg 32916c321187Smrg 32920cc2eac3Smrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 32930cc2eac3Smrg# ----------------------------- 32940cc2eac3Smrg# PORTME Fill in your ld.so characteristics 32950cc2eac3Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 32960cc2eac3Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 32970cc2eac3Smrgm4_require([_LT_DECL_EGREP])dnl 32980cc2eac3Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 32990cc2eac3Smrgm4_require([_LT_DECL_OBJDUMP])dnl 3300e120bd27Smrgm4_require([_LT_DECL_SED])dnl 33010cc2eac3Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 33020cc2eac3SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 33030cc2eac3Smrgm4_if([$1], 33040cc2eac3Smrg [], [ 33050cc2eac3Smrgif test "$GCC" = yes; then 33060cc2eac3Smrg case $host_os in 33070cc2eac3Smrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 33080cc2eac3Smrg *) lt_awk_arg="/^libraries:/" ;; 33090cc2eac3Smrg esac 33100cc2eac3Smrg case $host_os in 33110cc2eac3Smrg mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 33120cc2eac3Smrg *) lt_sed_strip_eq="s,=/,/,g" ;; 33130cc2eac3Smrg esac 33140cc2eac3Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 33150cc2eac3Smrg case $lt_search_path_spec in 33160cc2eac3Smrg *\;*) 33170cc2eac3Smrg # if the path contains ";" then we assume it to be the separator 33180cc2eac3Smrg # otherwise default to the standard path separator (i.e. ":") - it is 33190cc2eac3Smrg # assumed that no part of a normal pathname contains ";" but that should 33200cc2eac3Smrg # okay in the real world where ";" in dirpaths is itself problematic. 33210cc2eac3Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 33220cc2eac3Smrg ;; 33230cc2eac3Smrg *) 33240cc2eac3Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 33250cc2eac3Smrg ;; 33260cc2eac3Smrg esac 33270cc2eac3Smrg # Ok, now we have the path, separated by spaces, we can step through it 33280cc2eac3Smrg # and add multilib dir if necessary. 33290cc2eac3Smrg lt_tmp_lt_search_path_spec= 33300cc2eac3Smrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 33310cc2eac3Smrg for lt_sys_path in $lt_search_path_spec; do 33320cc2eac3Smrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 33330cc2eac3Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 33340cc2eac3Smrg else 33350cc2eac3Smrg test -d "$lt_sys_path" && \ 33360cc2eac3Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 33370cc2eac3Smrg fi 33380cc2eac3Smrg done 33390cc2eac3Smrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 33400cc2eac3SmrgBEGIN {RS=" "; FS="/|\n";} { 33410cc2eac3Smrg lt_foo=""; 33420cc2eac3Smrg lt_count=0; 33430cc2eac3Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 33440cc2eac3Smrg if ($lt_i != "" && $lt_i != ".") { 33450cc2eac3Smrg if ($lt_i == "..") { 33460cc2eac3Smrg lt_count++; 33470cc2eac3Smrg } else { 33480cc2eac3Smrg if (lt_count == 0) { 33490cc2eac3Smrg lt_foo="/" $lt_i lt_foo; 33500cc2eac3Smrg } else { 33510cc2eac3Smrg lt_count--; 33520cc2eac3Smrg } 33530cc2eac3Smrg } 33540cc2eac3Smrg } 33550cc2eac3Smrg } 33560cc2eac3Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 33570cc2eac3Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 33580cc2eac3Smrg}'` 33590cc2eac3Smrg # AWK program above erroneously prepends '/' to C:/dos/paths 33600cc2eac3Smrg # for these hosts. 33610cc2eac3Smrg case $host_os in 33620cc2eac3Smrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 33630cc2eac3Smrg $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 33640cc2eac3Smrg esac 33650cc2eac3Smrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 33666c321187Smrgelse 33670cc2eac3Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 33680cc2eac3Smrgfi]) 33690cc2eac3Smrglibrary_names_spec= 33700cc2eac3Smrglibname_spec='lib$name' 33710cc2eac3Smrgsoname_spec= 33720cc2eac3Smrgshrext_cmds=".so" 33730cc2eac3Smrgpostinstall_cmds= 33740cc2eac3Smrgpostuninstall_cmds= 33750cc2eac3Smrgfinish_cmds= 33760cc2eac3Smrgfinish_eval= 33770cc2eac3Smrgshlibpath_var= 33780cc2eac3Smrgshlibpath_overrides_runpath=unknown 33790cc2eac3Smrgversion_type=none 33800cc2eac3Smrgdynamic_linker="$host_os ld.so" 33810cc2eac3Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 33820cc2eac3Smrgneed_lib_prefix=unknown 33830cc2eac3Smrghardcode_into_libs=no 33846c321187Smrg 33850cc2eac3Smrg# when you set need_version to no, make sure it does not cause -set_version 33860cc2eac3Smrg# flags to be left without arguments 33870cc2eac3Smrgneed_version=unknown 33886c321187Smrg 33890cc2eac3Smrgcase $host_os in 33900cc2eac3Smrgaix3*) 33919d0b5e55Smrg version_type=linux # correct to gnu/linux during the next big refactor 33920cc2eac3Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 33930cc2eac3Smrg shlibpath_var=LIBPATH 33946c321187Smrg 33950cc2eac3Smrg # AIX 3 has no versioning support, so we append a major version to the name. 33960cc2eac3Smrg soname_spec='${libname}${release}${shared_ext}$major' 33970cc2eac3Smrg ;; 3398e120bd27Smrg 33990cc2eac3Smrgaix[[4-9]]*) 34009d0b5e55Smrg version_type=linux # correct to gnu/linux during the next big refactor 34010cc2eac3Smrg need_lib_prefix=no 34020cc2eac3Smrg need_version=no 34030cc2eac3Smrg hardcode_into_libs=yes 34040cc2eac3Smrg if test "$host_cpu" = ia64; then 34050cc2eac3Smrg # AIX 5 supports IA64 34060cc2eac3Smrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 34070cc2eac3Smrg shlibpath_var=LD_LIBRARY_PATH 34080cc2eac3Smrg else 34090cc2eac3Smrg # With GCC up to 2.95.x, collect2 would create an import file 34100cc2eac3Smrg # for dependence libraries. The import file would start with 34110cc2eac3Smrg # the line `#! .'. This would cause the generated library to 34120cc2eac3Smrg # depend on `.', always an invalid library. This was fixed in 34130cc2eac3Smrg # development snapshots of GCC prior to 3.0. 34140cc2eac3Smrg case $host_os in 34150cc2eac3Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 34160cc2eac3Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 34170cc2eac3Smrg echo ' yes ' 34180cc2eac3Smrg echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 34190cc2eac3Smrg : 34200cc2eac3Smrg else 34210cc2eac3Smrg can_build_shared=no 34220cc2eac3Smrg fi 34230cc2eac3Smrg ;; 34240cc2eac3Smrg esac 34250cc2eac3Smrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 34260cc2eac3Smrg # soname into executable. Probably we can add versioning support to 34270cc2eac3Smrg # collect2, so additional links can be useful in future. 34280cc2eac3Smrg if test "$aix_use_runtimelinking" = yes; then 34290cc2eac3Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 34300cc2eac3Smrg # instead of lib<name>.a to let people know that these are not 34310cc2eac3Smrg # typical AIX shared libraries. 34320cc2eac3Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 34330cc2eac3Smrg else 34340cc2eac3Smrg # We preserve .a as extension for shared libraries through AIX4.2 34350cc2eac3Smrg # and later when we are not doing run time linking. 34360cc2eac3Smrg library_names_spec='${libname}${release}.a $libname.a' 34370cc2eac3Smrg soname_spec='${libname}${release}${shared_ext}$major' 34380cc2eac3Smrg fi 34390cc2eac3Smrg shlibpath_var=LIBPATH 34400cc2eac3Smrg fi 34410cc2eac3Smrg ;; 34426c321187Smrg 34430cc2eac3Smrgamigaos*) 34440cc2eac3Smrg case $host_cpu in 34450cc2eac3Smrg powerpc) 34460cc2eac3Smrg # Since July 2007 AmigaOS4 officially supports .so libraries. 34470cc2eac3Smrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 34480cc2eac3Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 34496c321187Smrg ;; 34500cc2eac3Smrg m68k) 34510cc2eac3Smrg library_names_spec='$libname.ixlibrary $libname.a' 34520cc2eac3Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 34530cc2eac3Smrg finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' 34546c321187Smrg ;; 34550cc2eac3Smrg esac 34560cc2eac3Smrg ;; 34576c321187Smrg 34580cc2eac3Smrgbeos*) 34590cc2eac3Smrg library_names_spec='${libname}${shared_ext}' 34600cc2eac3Smrg dynamic_linker="$host_os ld.so" 34610cc2eac3Smrg shlibpath_var=LIBRARY_PATH 34620cc2eac3Smrg ;; 34636c321187Smrg 34640cc2eac3Smrgbsdi[[45]]*) 34659d0b5e55Smrg version_type=linux # correct to gnu/linux during the next big refactor 34660cc2eac3Smrg need_version=no 34670cc2eac3Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 34680cc2eac3Smrg soname_spec='${libname}${release}${shared_ext}$major' 34690cc2eac3Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 34700cc2eac3Smrg shlibpath_var=LD_LIBRARY_PATH 34710cc2eac3Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 34720cc2eac3Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 34730cc2eac3Smrg # the default ld.so.conf also contains /usr/contrib/lib and 34740cc2eac3Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 34750cc2eac3Smrg # libtool to hard-code these into programs 34760cc2eac3Smrg ;; 3477e120bd27Smrg 34780cc2eac3Smrgcygwin* | mingw* | pw32* | cegcc*) 34790cc2eac3Smrg version_type=windows 34800cc2eac3Smrg shrext_cmds=".dll" 34810cc2eac3Smrg need_version=no 34820cc2eac3Smrg need_lib_prefix=no 34836c321187Smrg 34840cc2eac3Smrg case $GCC,$cc_basename in 34850cc2eac3Smrg yes,*) 34860cc2eac3Smrg # gcc 34870cc2eac3Smrg library_names_spec='$libname.dll.a' 34880cc2eac3Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 34890cc2eac3Smrg postinstall_cmds='base_file=`basename \${file}`~ 34900cc2eac3Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 34910cc2eac3Smrg dldir=$destdir/`dirname \$dlpath`~ 34920cc2eac3Smrg test -d \$dldir || mkdir -p \$dldir~ 34930cc2eac3Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 34940cc2eac3Smrg chmod a+x \$dldir/$dlname~ 34950cc2eac3Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 34960cc2eac3Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 34970cc2eac3Smrg fi' 34980cc2eac3Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 34990cc2eac3Smrg dlpath=$dir/\$dldll~ 35000cc2eac3Smrg $RM \$dlpath' 35010cc2eac3Smrg shlibpath_overrides_runpath=yes 35026c321187Smrg 35030cc2eac3Smrg case $host_os in 35040cc2eac3Smrg cygwin*) 35050cc2eac3Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 35060cc2eac3Smrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 35070cc2eac3Smrgm4_if([$1], [],[ 35080cc2eac3Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 35090cc2eac3Smrg ;; 35100cc2eac3Smrg mingw* | cegcc*) 35110cc2eac3Smrg # MinGW DLLs use traditional 'lib' prefix 35120cc2eac3Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 35130cc2eac3Smrg ;; 35140cc2eac3Smrg pw32*) 35150cc2eac3Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 35160cc2eac3Smrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 35170cc2eac3Smrg ;; 35180cc2eac3Smrg esac 35190cc2eac3Smrg dynamic_linker='Win32 ld.exe' 35206c321187Smrg ;; 35216c321187Smrg 35220cc2eac3Smrg *,cl*) 35230cc2eac3Smrg # Native MSVC 35240cc2eac3Smrg libname_spec='$name' 35250cc2eac3Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 35260cc2eac3Smrg library_names_spec='${libname}.dll.lib' 35270cc2eac3Smrg 35280cc2eac3Smrg case $build_os in 35290cc2eac3Smrg mingw*) 35300cc2eac3Smrg sys_lib_search_path_spec= 35310cc2eac3Smrg lt_save_ifs=$IFS 35320cc2eac3Smrg IFS=';' 35330cc2eac3Smrg for lt_path in $LIB 353493493779Smrg do 35350cc2eac3Smrg IFS=$lt_save_ifs 35360cc2eac3Smrg # Let DOS variable expansion print the short 8.3 style file name. 35370cc2eac3Smrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 35380cc2eac3Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 353993493779Smrg done 35400cc2eac3Smrg IFS=$lt_save_ifs 35410cc2eac3Smrg # Convert to MSYS style. 35420cc2eac3Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 35430cc2eac3Smrg ;; 35440cc2eac3Smrg cygwin*) 35450cc2eac3Smrg # Convert to unix form, then to dos form, then back to unix form 35460cc2eac3Smrg # but this time dos style (no spaces!) so that the unix form looks 35470cc2eac3Smrg # like /cygdrive/c/PROGRA~1:/cygdr... 35480cc2eac3Smrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 35490cc2eac3Smrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 35500cc2eac3Smrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 35510cc2eac3Smrg ;; 35520cc2eac3Smrg *) 35530cc2eac3Smrg sys_lib_search_path_spec="$LIB" 35540cc2eac3Smrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 35550cc2eac3Smrg # It is most probably a Windows format PATH. 35560cc2eac3Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 35570cc2eac3Smrg else 35580cc2eac3Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 35590cc2eac3Smrg fi 35600cc2eac3Smrg # FIXME: find the short name or the path components, as spaces are 35610cc2eac3Smrg # common. (e.g. "Program Files" -> "PROGRA~1") 35620cc2eac3Smrg ;; 35630cc2eac3Smrg esac 35640cc2eac3Smrg 35650cc2eac3Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 35660cc2eac3Smrg postinstall_cmds='base_file=`basename \${file}`~ 35670cc2eac3Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 35680cc2eac3Smrg dldir=$destdir/`dirname \$dlpath`~ 35690cc2eac3Smrg test -d \$dldir || mkdir -p \$dldir~ 35700cc2eac3Smrg $install_prog $dir/$dlname \$dldir/$dlname' 35710cc2eac3Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 35720cc2eac3Smrg dlpath=$dir/\$dldll~ 35730cc2eac3Smrg $RM \$dlpath' 35740cc2eac3Smrg shlibpath_overrides_runpath=yes 35750cc2eac3Smrg dynamic_linker='Win32 link.exe' 35760cc2eac3Smrg ;; 35770cc2eac3Smrg 35780cc2eac3Smrg *) 35790cc2eac3Smrg # Assume MSVC wrapper 35800cc2eac3Smrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 35810cc2eac3Smrg dynamic_linker='Win32 ld.exe' 35826c321187Smrg ;; 35836c321187Smrg esac 35840cc2eac3Smrg # FIXME: first we should search . and the directory the executable is in 35850cc2eac3Smrg shlibpath_var=PATH 35860cc2eac3Smrg ;; 35876c321187Smrg 35880cc2eac3Smrgdarwin* | rhapsody*) 35890cc2eac3Smrg dynamic_linker="$host_os dyld" 35900cc2eac3Smrg version_type=darwin 35910cc2eac3Smrg need_lib_prefix=no 35920cc2eac3Smrg need_version=no 35930cc2eac3Smrg library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 35940cc2eac3Smrg soname_spec='${libname}${release}${major}$shared_ext' 35950cc2eac3Smrg shlibpath_overrides_runpath=yes 35960cc2eac3Smrg shlibpath_var=DYLD_LIBRARY_PATH 35970cc2eac3Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 35980cc2eac3Smrgm4_if([$1], [],[ 35990cc2eac3Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 36000cc2eac3Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 36010cc2eac3Smrg ;; 36026c321187Smrg 36030cc2eac3Smrgdgux*) 36049d0b5e55Smrg version_type=linux # correct to gnu/linux during the next big refactor 36050cc2eac3Smrg need_lib_prefix=no 36060cc2eac3Smrg need_version=no 36070cc2eac3Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 36080cc2eac3Smrg soname_spec='${libname}${release}${shared_ext}$major' 36090cc2eac3Smrg shlibpath_var=LD_LIBRARY_PATH 36100cc2eac3Smrg ;; 3611e120bd27Smrg 36120cc2eac3Smrgfreebsd* | dragonfly*) 36130cc2eac3Smrg # DragonFly does not have aout. When/if they implement a new 36140cc2eac3Smrg # versioning mechanism, adjust this. 36150cc2eac3Smrg if test -x /usr/bin/objformat; then 36160cc2eac3Smrg objformat=`/usr/bin/objformat` 36170cc2eac3Smrg else 36180cc2eac3Smrg case $host_os in 36199d0b5e55Smrg freebsd[[23]].*) objformat=aout ;; 36200cc2eac3Smrg *) objformat=elf ;; 36210cc2eac3Smrg esac 36220cc2eac3Smrg fi 36230cc2eac3Smrg version_type=freebsd-$objformat 36240cc2eac3Smrg case $version_type in 36250cc2eac3Smrg freebsd-elf*) 36260cc2eac3Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 36270cc2eac3Smrg need_version=no 36280cc2eac3Smrg need_lib_prefix=no 36290cc2eac3Smrg ;; 36300cc2eac3Smrg freebsd-*) 36310cc2eac3Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 36320cc2eac3Smrg need_version=yes 36330cc2eac3Smrg ;; 36340cc2eac3Smrg esac 36350cc2eac3Smrg shlibpath_var=LD_LIBRARY_PATH 36360cc2eac3Smrg case $host_os in 36379d0b5e55Smrg freebsd2.*) 36380cc2eac3Smrg shlibpath_overrides_runpath=yes 36390cc2eac3Smrg ;; 36400cc2eac3Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 36410cc2eac3Smrg shlibpath_overrides_runpath=yes 36420cc2eac3Smrg hardcode_into_libs=yes 36430cc2eac3Smrg ;; 36440cc2eac3Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 36450cc2eac3Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 36460cc2eac3Smrg shlibpath_overrides_runpath=no 36470cc2eac3Smrg hardcode_into_libs=yes 36480cc2eac3Smrg ;; 36490cc2eac3Smrg *) # from 4.6 on, and DragonFly 36500cc2eac3Smrg shlibpath_overrides_runpath=yes 36510cc2eac3Smrg hardcode_into_libs=yes 36520cc2eac3Smrg ;; 36530cc2eac3Smrg esac 36540cc2eac3Smrg ;; 36556c321187Smrg 36560cc2eac3Smrggnu*) 36579d0b5e55Smrg version_type=linux # correct to gnu/linux during the next big refactor 36580cc2eac3Smrg need_lib_prefix=no 36590cc2eac3Smrg need_version=no 36600cc2eac3Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 36610cc2eac3Smrg soname_spec='${libname}${release}${shared_ext}$major' 36620cc2eac3Smrg shlibpath_var=LD_LIBRARY_PATH 36639d0b5e55Smrg shlibpath_overrides_runpath=no 36640cc2eac3Smrg hardcode_into_libs=yes 36650cc2eac3Smrg ;; 36666c321187Smrg 36670cc2eac3Smrghaiku*) 36689d0b5e55Smrg version_type=linux # correct to gnu/linux during the next big refactor 36690cc2eac3Smrg need_lib_prefix=no 36700cc2eac3Smrg need_version=no 36710cc2eac3Smrg dynamic_linker="$host_os runtime_loader" 36720cc2eac3Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 36730cc2eac3Smrg soname_spec='${libname}${release}${shared_ext}$major' 36740cc2eac3Smrg shlibpath_var=LIBRARY_PATH 36750cc2eac3Smrg shlibpath_overrides_runpath=yes 36760cc2eac3Smrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 36770cc2eac3Smrg hardcode_into_libs=yes 36780cc2eac3Smrg ;; 36796c321187Smrg 36800cc2eac3Smrghpux9* | hpux10* | hpux11*) 36810cc2eac3Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 36820cc2eac3Smrg # link against other versions. 36830cc2eac3Smrg version_type=sunos 36840cc2eac3Smrg need_lib_prefix=no 36850cc2eac3Smrg need_version=no 36860cc2eac3Smrg case $host_cpu in 36870cc2eac3Smrg ia64*) 36880cc2eac3Smrg shrext_cmds='.so' 36890cc2eac3Smrg hardcode_into_libs=yes 36900cc2eac3Smrg dynamic_linker="$host_os dld.so" 36910cc2eac3Smrg shlibpath_var=LD_LIBRARY_PATH 36920cc2eac3Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 36930cc2eac3Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 36940cc2eac3Smrg soname_spec='${libname}${release}${shared_ext}$major' 36950cc2eac3Smrg if test "X$HPUX_IA64_MODE" = X32; then 36960cc2eac3Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 36970cc2eac3Smrg else 36980cc2eac3Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 36990cc2eac3Smrg fi 37000cc2eac3Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 37016c321187Smrg ;; 37020cc2eac3Smrg hppa*64*) 37030cc2eac3Smrg shrext_cmds='.sl' 37040cc2eac3Smrg hardcode_into_libs=yes 37050cc2eac3Smrg dynamic_linker="$host_os dld.sl" 37060cc2eac3Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 37070cc2eac3Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 37080cc2eac3Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 37090cc2eac3Smrg soname_spec='${libname}${release}${shared_ext}$major' 37100cc2eac3Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 37110cc2eac3Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 3712e120bd27Smrg ;; 37130cc2eac3Smrg *) 37140cc2eac3Smrg shrext_cmds='.sl' 37150cc2eac3Smrg dynamic_linker="$host_os dld.sl" 37160cc2eac3Smrg shlibpath_var=SHLIB_PATH 37170cc2eac3Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 37180cc2eac3Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 37190cc2eac3Smrg soname_spec='${libname}${release}${shared_ext}$major' 3720e120bd27Smrg ;; 37210cc2eac3Smrg esac 37220cc2eac3Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 37230cc2eac3Smrg postinstall_cmds='chmod 555 $lib' 37240cc2eac3Smrg # or fails outright, so override atomically: 37250cc2eac3Smrg install_override_mode=555 37260cc2eac3Smrg ;; 37276c321187Smrg 37280cc2eac3Smrginterix[[3-9]]*) 37299d0b5e55Smrg version_type=linux # correct to gnu/linux during the next big refactor 37300cc2eac3Smrg need_lib_prefix=no 37310cc2eac3Smrg need_version=no 37320cc2eac3Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 37330cc2eac3Smrg soname_spec='${libname}${release}${shared_ext}$major' 37340cc2eac3Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 37350cc2eac3Smrg shlibpath_var=LD_LIBRARY_PATH 37360cc2eac3Smrg shlibpath_overrides_runpath=no 37370cc2eac3Smrg hardcode_into_libs=yes 37380cc2eac3Smrg ;; 37396c321187Smrg 37400cc2eac3Smrgirix5* | irix6* | nonstopux*) 37410cc2eac3Smrg case $host_os in 37420cc2eac3Smrg nonstopux*) version_type=nonstopux ;; 37430cc2eac3Smrg *) 37440cc2eac3Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 37459d0b5e55Smrg version_type=linux # correct to gnu/linux during the next big refactor 37460cc2eac3Smrg else 37470cc2eac3Smrg version_type=irix 37480cc2eac3Smrg fi ;; 37490cc2eac3Smrg esac 37500cc2eac3Smrg need_lib_prefix=no 37510cc2eac3Smrg need_version=no 37520cc2eac3Smrg soname_spec='${libname}${release}${shared_ext}$major' 37530cc2eac3Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 37540cc2eac3Smrg case $host_os in 37550cc2eac3Smrg irix5* | nonstopux*) 37560cc2eac3Smrg libsuff= shlibsuff= 37570cc2eac3Smrg ;; 37586c321187Smrg *) 37590cc2eac3Smrg case $LD in # libtool.m4 will add one of these switches to LD 37600cc2eac3Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 37610cc2eac3Smrg libsuff= shlibsuff= libmagic=32-bit;; 37620cc2eac3Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 37630cc2eac3Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 37640cc2eac3Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 37650cc2eac3Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 37660cc2eac3Smrg *) libsuff= shlibsuff= libmagic=never-match;; 37670cc2eac3Smrg esac 37686c321187Smrg ;; 37696c321187Smrg esac 37700cc2eac3Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 37710cc2eac3Smrg shlibpath_overrides_runpath=no 37720cc2eac3Smrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 37730cc2eac3Smrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 37740cc2eac3Smrg hardcode_into_libs=yes 37750cc2eac3Smrg ;; 37766c321187Smrg 37770cc2eac3Smrg# No shared lib support for Linux oldld, aout, or coff. 37780cc2eac3Smrglinux*oldld* | linux*aout* | linux*coff*) 37790cc2eac3Smrg dynamic_linker=no 37800cc2eac3Smrg ;; 37816c321187Smrg 37829d0b5e55Smrg# This must be glibc/ELF. 37830cc2eac3Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 37849d0b5e55Smrg version_type=linux # correct to gnu/linux during the next big refactor 37850cc2eac3Smrg need_lib_prefix=no 37860cc2eac3Smrg need_version=no 37870cc2eac3Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 37880cc2eac3Smrg soname_spec='${libname}${release}${shared_ext}$major' 37890cc2eac3Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 37900cc2eac3Smrg shlibpath_var=LD_LIBRARY_PATH 37910cc2eac3Smrg shlibpath_overrides_runpath=no 37926c321187Smrg 37930cc2eac3Smrg # Some binutils ld are patched to set DT_RUNPATH 37940cc2eac3Smrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 37950cc2eac3Smrg [lt_cv_shlibpath_overrides_runpath=no 37960cc2eac3Smrg save_LDFLAGS=$LDFLAGS 37970cc2eac3Smrg save_libdir=$libdir 37980cc2eac3Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 37990cc2eac3Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 38000cc2eac3Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 38010cc2eac3Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 38020cc2eac3Smrg [lt_cv_shlibpath_overrides_runpath=yes])]) 38030cc2eac3Smrg LDFLAGS=$save_LDFLAGS 38040cc2eac3Smrg libdir=$save_libdir 38050cc2eac3Smrg ]) 38060cc2eac3Smrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 38076c321187Smrg 38080cc2eac3Smrg # This implies no fast_install, which is unacceptable. 38090cc2eac3Smrg # Some rework will be needed to allow for fast_install 38100cc2eac3Smrg # before this can be enabled. 38110cc2eac3Smrg hardcode_into_libs=yes 38126c321187Smrg 38130cc2eac3Smrg # Append ld.so.conf contents to the search path 38140cc2eac3Smrg if test -f /etc/ld.so.conf; then 38150cc2eac3Smrg 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' ' '` 38160cc2eac3Smrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 38170cc2eac3Smrg fi 38186c321187Smrg 38190cc2eac3Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 38200cc2eac3Smrg # powerpc, because MkLinux only supported shared libraries with the 38210cc2eac3Smrg # GNU dynamic linker. Since this was broken with cross compilers, 38220cc2eac3Smrg # most powerpc-linux boxes support dynamic linking these days and 38230cc2eac3Smrg # people can always --disable-shared, the test was removed, and we 38240cc2eac3Smrg # assume the GNU/Linux dynamic linker is in use. 38250cc2eac3Smrg dynamic_linker='GNU/Linux ld.so' 38260cc2eac3Smrg ;; 38276c321187Smrg 38280cc2eac3Smrgnetbsd*) 38290cc2eac3Smrg version_type=sunos 38300cc2eac3Smrg need_lib_prefix=no 38310cc2eac3Smrg need_version=no 38320cc2eac3Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 38330cc2eac3Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 38340cc2eac3Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 38350cc2eac3Smrg dynamic_linker='NetBSD (a.out) ld.so' 38360cc2eac3Smrg else 38370cc2eac3Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 38380cc2eac3Smrg soname_spec='${libname}${release}${shared_ext}$major' 38390cc2eac3Smrg dynamic_linker='NetBSD ld.elf_so' 38400cc2eac3Smrg fi 38410cc2eac3Smrg shlibpath_var=LD_LIBRARY_PATH 38420cc2eac3Smrg shlibpath_overrides_runpath=yes 38430cc2eac3Smrg hardcode_into_libs=yes 38440cc2eac3Smrg ;; 38456c321187Smrg 38460cc2eac3Smrgnewsos6) 38479d0b5e55Smrg version_type=linux # correct to gnu/linux during the next big refactor 38480cc2eac3Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 38490cc2eac3Smrg shlibpath_var=LD_LIBRARY_PATH 38500cc2eac3Smrg shlibpath_overrides_runpath=yes 38510cc2eac3Smrg ;; 38526c321187Smrg 38530cc2eac3Smrg*nto* | *qnx*) 38540cc2eac3Smrg version_type=qnx 38550cc2eac3Smrg need_lib_prefix=no 38560cc2eac3Smrg need_version=no 38570cc2eac3Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 38580cc2eac3Smrg soname_spec='${libname}${release}${shared_ext}$major' 38590cc2eac3Smrg shlibpath_var=LD_LIBRARY_PATH 38600cc2eac3Smrg shlibpath_overrides_runpath=no 38610cc2eac3Smrg hardcode_into_libs=yes 38620cc2eac3Smrg dynamic_linker='ldqnx.so' 38630cc2eac3Smrg ;; 38646c321187Smrg 38650cc2eac3Smrgopenbsd*) 38660cc2eac3Smrg version_type=sunos 38670cc2eac3Smrg sys_lib_dlsearch_path_spec="/usr/lib" 38680cc2eac3Smrg need_lib_prefix=no 38690cc2eac3Smrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 38700cc2eac3Smrg case $host_os in 38710cc2eac3Smrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 38720cc2eac3Smrg *) need_version=no ;; 38730cc2eac3Smrg esac 38740cc2eac3Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 38750cc2eac3Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 38760cc2eac3Smrg shlibpath_var=LD_LIBRARY_PATH 38770cc2eac3Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 38780cc2eac3Smrg case $host_os in 38790cc2eac3Smrg openbsd2.[[89]] | openbsd2.[[89]].*) 38800cc2eac3Smrg shlibpath_overrides_runpath=no 38810cc2eac3Smrg ;; 38820cc2eac3Smrg *) 38830cc2eac3Smrg shlibpath_overrides_runpath=yes 38840cc2eac3Smrg ;; 38850cc2eac3Smrg esac 38860cc2eac3Smrg else 38870cc2eac3Smrg shlibpath_overrides_runpath=yes 38880cc2eac3Smrg fi 38890cc2eac3Smrg ;; 38906c321187Smrg 38910cc2eac3Smrgos2*) 38920cc2eac3Smrg libname_spec='$name' 38930cc2eac3Smrg shrext_cmds=".dll" 38940cc2eac3Smrg need_lib_prefix=no 38950cc2eac3Smrg library_names_spec='$libname${shared_ext} $libname.a' 38960cc2eac3Smrg dynamic_linker='OS/2 ld.exe' 38970cc2eac3Smrg shlibpath_var=LIBPATH 38980cc2eac3Smrg ;; 3899e120bd27Smrg 39000cc2eac3Smrgosf3* | osf4* | osf5*) 39010cc2eac3Smrg version_type=osf 39020cc2eac3Smrg need_lib_prefix=no 39030cc2eac3Smrg need_version=no 39040cc2eac3Smrg soname_spec='${libname}${release}${shared_ext}$major' 39050cc2eac3Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 39060cc2eac3Smrg shlibpath_var=LD_LIBRARY_PATH 39070cc2eac3Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 39080cc2eac3Smrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 39090cc2eac3Smrg ;; 39106c321187Smrg 39110cc2eac3Smrgrdos*) 39120cc2eac3Smrg dynamic_linker=no 39130cc2eac3Smrg ;; 39146c321187Smrg 39150cc2eac3Smrgsolaris*) 39169d0b5e55Smrg version_type=linux # correct to gnu/linux during the next big refactor 39170cc2eac3Smrg need_lib_prefix=no 39180cc2eac3Smrg need_version=no 39190cc2eac3Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 39200cc2eac3Smrg soname_spec='${libname}${release}${shared_ext}$major' 39210cc2eac3Smrg shlibpath_var=LD_LIBRARY_PATH 39220cc2eac3Smrg shlibpath_overrides_runpath=yes 39230cc2eac3Smrg hardcode_into_libs=yes 39240cc2eac3Smrg # ldd complains unless libraries are executable 39250cc2eac3Smrg postinstall_cmds='chmod +x $lib' 39260cc2eac3Smrg ;; 39276c321187Smrg 39280cc2eac3Smrgsunos4*) 39290cc2eac3Smrg version_type=sunos 39300cc2eac3Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 39310cc2eac3Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 39320cc2eac3Smrg shlibpath_var=LD_LIBRARY_PATH 39330cc2eac3Smrg shlibpath_overrides_runpath=yes 39340cc2eac3Smrg if test "$with_gnu_ld" = yes; then 39350cc2eac3Smrg need_lib_prefix=no 39360cc2eac3Smrg fi 39370cc2eac3Smrg need_version=yes 39380cc2eac3Smrg ;; 39396c321187Smrg 39400cc2eac3Smrgsysv4 | sysv4.3*) 39419d0b5e55Smrg version_type=linux # correct to gnu/linux during the next big refactor 39420cc2eac3Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 39430cc2eac3Smrg soname_spec='${libname}${release}${shared_ext}$major' 39440cc2eac3Smrg shlibpath_var=LD_LIBRARY_PATH 39450cc2eac3Smrg case $host_vendor in 39460cc2eac3Smrg sni) 39470cc2eac3Smrg shlibpath_overrides_runpath=no 39480cc2eac3Smrg need_lib_prefix=no 39490cc2eac3Smrg runpath_var=LD_RUN_PATH 39500cc2eac3Smrg ;; 39510cc2eac3Smrg siemens) 39520cc2eac3Smrg need_lib_prefix=no 39530cc2eac3Smrg ;; 39540cc2eac3Smrg motorola) 39550cc2eac3Smrg need_lib_prefix=no 39560cc2eac3Smrg need_version=no 39570cc2eac3Smrg shlibpath_overrides_runpath=no 39580cc2eac3Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 39590cc2eac3Smrg ;; 39600cc2eac3Smrg esac 39610cc2eac3Smrg ;; 39620cc2eac3Smrg 39630cc2eac3Smrgsysv4*MP*) 39640cc2eac3Smrg if test -d /usr/nec ;then 39659d0b5e55Smrg version_type=linux # correct to gnu/linux during the next big refactor 39660cc2eac3Smrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 39670cc2eac3Smrg soname_spec='$libname${shared_ext}.$major' 39680cc2eac3Smrg shlibpath_var=LD_LIBRARY_PATH 39696c321187Smrg fi 39700cc2eac3Smrg ;; 39716c321187Smrg 39720cc2eac3Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 39730cc2eac3Smrg version_type=freebsd-elf 39740cc2eac3Smrg need_lib_prefix=no 39750cc2eac3Smrg need_version=no 39760cc2eac3Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 39770cc2eac3Smrg soname_spec='${libname}${release}${shared_ext}$major' 39780cc2eac3Smrg shlibpath_var=LD_LIBRARY_PATH 39790cc2eac3Smrg shlibpath_overrides_runpath=yes 39800cc2eac3Smrg hardcode_into_libs=yes 39810cc2eac3Smrg if test "$with_gnu_ld" = yes; then 39820cc2eac3Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 39830cc2eac3Smrg else 39840cc2eac3Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 39850cc2eac3Smrg case $host_os in 39860cc2eac3Smrg sco3.2v5*) 39870cc2eac3Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 39880cc2eac3Smrg ;; 39890cc2eac3Smrg esac 39900cc2eac3Smrg fi 39910cc2eac3Smrg sys_lib_dlsearch_path_spec='/usr/lib' 39920cc2eac3Smrg ;; 39936c321187Smrg 39940cc2eac3Smrgtpf*) 39950cc2eac3Smrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 39969d0b5e55Smrg version_type=linux # correct to gnu/linux during the next big refactor 39970cc2eac3Smrg need_lib_prefix=no 39980cc2eac3Smrg need_version=no 39990cc2eac3Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 40000cc2eac3Smrg shlibpath_var=LD_LIBRARY_PATH 40010cc2eac3Smrg shlibpath_overrides_runpath=no 40020cc2eac3Smrg hardcode_into_libs=yes 40030cc2eac3Smrg ;; 40046c321187Smrg 40050cc2eac3Smrguts4*) 40069d0b5e55Smrg version_type=linux # correct to gnu/linux during the next big refactor 40070cc2eac3Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 40080cc2eac3Smrg soname_spec='${libname}${release}${shared_ext}$major' 40090cc2eac3Smrg shlibpath_var=LD_LIBRARY_PATH 40100cc2eac3Smrg ;; 40116c321187Smrg 40120cc2eac3Smrg*) 40130cc2eac3Smrg dynamic_linker=no 40140cc2eac3Smrg ;; 40150cc2eac3Smrgesac 40160cc2eac3SmrgAC_MSG_RESULT([$dynamic_linker]) 40170cc2eac3Smrgtest "$dynamic_linker" = no && can_build_shared=no 40186c321187Smrg 40190cc2eac3Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 40200cc2eac3Smrgif test "$GCC" = yes; then 40210cc2eac3Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 40226c321187Smrgfi 40236c321187Smrg 40240cc2eac3Smrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 40250cc2eac3Smrg sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 40260cc2eac3Smrgfi 40270cc2eac3Smrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 40280cc2eac3Smrg sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 40296c321187Smrgfi 40306c321187Smrg 40310cc2eac3Smrg_LT_DECL([], [variables_saved_for_relink], [1], 40320cc2eac3Smrg [Variables whose values should be saved in libtool wrapper scripts and 40330cc2eac3Smrg restored at link time]) 40340cc2eac3Smrg_LT_DECL([], [need_lib_prefix], [0], 40350cc2eac3Smrg [Do we need the "lib" prefix for modules?]) 40360cc2eac3Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 40370cc2eac3Smrg_LT_DECL([], [version_type], [0], [Library versioning type]) 40380cc2eac3Smrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 40390cc2eac3Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 40400cc2eac3Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 40410cc2eac3Smrg [Is shlibpath searched before the hard-coded library search path?]) 40420cc2eac3Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 40430cc2eac3Smrg_LT_DECL([], [library_names_spec], [1], 40440cc2eac3Smrg [[List of archive names. First name is the real one, the rest are links. 40450cc2eac3Smrg The last name is the one that the linker finds with -lNAME]]) 40460cc2eac3Smrg_LT_DECL([], [soname_spec], [1], 40470cc2eac3Smrg [[The coded name of the library, if different from the real name]]) 40480cc2eac3Smrg_LT_DECL([], [install_override_mode], [1], 40490cc2eac3Smrg [Permission mode override for installation of shared libraries]) 40500cc2eac3Smrg_LT_DECL([], [postinstall_cmds], [2], 40510cc2eac3Smrg [Command to use after installation of a shared archive]) 40520cc2eac3Smrg_LT_DECL([], [postuninstall_cmds], [2], 40530cc2eac3Smrg [Command to use after uninstallation of a shared archive]) 40540cc2eac3Smrg_LT_DECL([], [finish_cmds], [2], 40550cc2eac3Smrg [Commands used to finish a libtool library installation in a directory]) 40560cc2eac3Smrg_LT_DECL([], [finish_eval], [1], 40570cc2eac3Smrg [[As "finish_cmds", except a single script fragment to be evaled but 40580cc2eac3Smrg not shown]]) 40590cc2eac3Smrg_LT_DECL([], [hardcode_into_libs], [0], 40600cc2eac3Smrg [Whether we should hardcode library paths into libraries]) 40610cc2eac3Smrg_LT_DECL([], [sys_lib_search_path_spec], [2], 40620cc2eac3Smrg [Compile-time system search path for libraries]) 40630cc2eac3Smrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 40640cc2eac3Smrg [Run-time system search path for libraries]) 40650cc2eac3Smrg])# _LT_SYS_DYNAMIC_LINKER 40666c321187Smrg 40676c321187Smrg 40680cc2eac3Smrg# _LT_PATH_TOOL_PREFIX(TOOL) 40690cc2eac3Smrg# -------------------------- 40700cc2eac3Smrg# find a file program which can recognize shared library 40710cc2eac3SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 40720cc2eac3Smrg[m4_require([_LT_DECL_EGREP])dnl 40730cc2eac3SmrgAC_MSG_CHECKING([for $1]) 40740cc2eac3SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 40750cc2eac3Smrg[case $MAGIC_CMD in 40760cc2eac3Smrg[[\\/*] | ?:[\\/]*]) 40770cc2eac3Smrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 40780cc2eac3Smrg ;; 40790cc2eac3Smrg*) 40800cc2eac3Smrg lt_save_MAGIC_CMD="$MAGIC_CMD" 40810cc2eac3Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 40820cc2eac3Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 40830cc2eac3Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 40840cc2eac3Smrgdnl not every word. This closes a longstanding sh security hole. 40850cc2eac3Smrg ac_dummy="m4_if([$2], , $PATH, [$2])" 40860cc2eac3Smrg for ac_dir in $ac_dummy; do 40870cc2eac3Smrg IFS="$lt_save_ifs" 40880cc2eac3Smrg test -z "$ac_dir" && ac_dir=. 40890cc2eac3Smrg if test -f $ac_dir/$1; then 40900cc2eac3Smrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 40910cc2eac3Smrg if test -n "$file_magic_test_file"; then 40920cc2eac3Smrg case $deplibs_check_method in 40930cc2eac3Smrg "file_magic "*) 40940cc2eac3Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 40950cc2eac3Smrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 40960cc2eac3Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 40970cc2eac3Smrg $EGREP "$file_magic_regex" > /dev/null; then 40980cc2eac3Smrg : 40990cc2eac3Smrg else 41000cc2eac3Smrg cat <<_LT_EOF 1>&2 41016c321187Smrg 41020cc2eac3Smrg*** Warning: the command libtool uses to detect shared libraries, 41030cc2eac3Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 41040cc2eac3Smrg*** The result is that libtool may fail to recognize shared libraries 41050cc2eac3Smrg*** as such. This will affect the creation of libtool libraries that 41060cc2eac3Smrg*** depend on shared libraries, but programs linked with such libtool 41070cc2eac3Smrg*** libraries will work regardless of this problem. Nevertheless, you 41080cc2eac3Smrg*** may want to report the problem to your system manager and/or to 41090cc2eac3Smrg*** bug-libtool@gnu.org 41100cc2eac3Smrg 41110cc2eac3Smrg_LT_EOF 41120cc2eac3Smrg fi ;; 41130cc2eac3Smrg esac 41140cc2eac3Smrg fi 41150cc2eac3Smrg break 41160cc2eac3Smrg fi 41170cc2eac3Smrg done 41180cc2eac3Smrg IFS="$lt_save_ifs" 41190cc2eac3Smrg MAGIC_CMD="$lt_save_MAGIC_CMD" 41200cc2eac3Smrg ;; 41210cc2eac3Smrgesac]) 41220cc2eac3SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 41230cc2eac3Smrgif test -n "$MAGIC_CMD"; then 41240cc2eac3Smrg AC_MSG_RESULT($MAGIC_CMD) 41250cc2eac3Smrgelse 41260cc2eac3Smrg AC_MSG_RESULT(no) 41270cc2eac3Smrgfi 41280cc2eac3Smrg_LT_DECL([], [MAGIC_CMD], [0], 41290cc2eac3Smrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 41300cc2eac3Smrg])# _LT_PATH_TOOL_PREFIX 41310cc2eac3Smrg 41320cc2eac3Smrg# Old name: 41330cc2eac3SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 41340cc2eac3Smrgdnl aclocal-1.4 backwards compatibility: 41350cc2eac3Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 41360cc2eac3Smrg 41370cc2eac3Smrg 41380cc2eac3Smrg# _LT_PATH_MAGIC 41390cc2eac3Smrg# -------------- 41400cc2eac3Smrg# find a file program which can recognize a shared library 41410cc2eac3Smrgm4_defun([_LT_PATH_MAGIC], 41420cc2eac3Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 41430cc2eac3Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 41440cc2eac3Smrg if test -n "$ac_tool_prefix"; then 41450cc2eac3Smrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 41460cc2eac3Smrg else 41470cc2eac3Smrg MAGIC_CMD=: 41480cc2eac3Smrg fi 41490cc2eac3Smrgfi 41500cc2eac3Smrg])# _LT_PATH_MAGIC 41510cc2eac3Smrg 41520cc2eac3Smrg 41530cc2eac3Smrg# LT_PATH_LD 41540cc2eac3Smrg# ---------- 41550cc2eac3Smrg# find the pathname to the GNU or non-GNU linker 41560cc2eac3SmrgAC_DEFUN([LT_PATH_LD], 41570cc2eac3Smrg[AC_REQUIRE([AC_PROG_CC])dnl 41580cc2eac3SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 41590cc2eac3SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 4160e120bd27Smrgm4_require([_LT_DECL_SED])dnl 41610cc2eac3Smrgm4_require([_LT_DECL_EGREP])dnl 41620cc2eac3Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 41630cc2eac3Smrg 41640cc2eac3SmrgAC_ARG_WITH([gnu-ld], 41650cc2eac3Smrg [AS_HELP_STRING([--with-gnu-ld], 41660cc2eac3Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 41670cc2eac3Smrg [test "$withval" = no || with_gnu_ld=yes], 41680cc2eac3Smrg [with_gnu_ld=no])dnl 41690cc2eac3Smrg 41700cc2eac3Smrgac_prog=ld 41716c321187Smrgif test "$GCC" = yes; then 41720cc2eac3Smrg # Check if gcc -print-prog-name=ld gives a path. 41730cc2eac3Smrg AC_MSG_CHECKING([for ld used by $CC]) 41740cc2eac3Smrg case $host in 41750cc2eac3Smrg *-*-mingw*) 41760cc2eac3Smrg # gcc leaves a trailing carriage return which upsets mingw 41770cc2eac3Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 41780cc2eac3Smrg *) 41790cc2eac3Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 4180e120bd27Smrg esac 41810cc2eac3Smrg case $ac_prog in 41820cc2eac3Smrg # Accept absolute paths. 41830cc2eac3Smrg [[\\/]]* | ?:[[\\/]]*) 41840cc2eac3Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 41850cc2eac3Smrg # Canonicalize the pathname of ld 41860cc2eac3Smrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 41870cc2eac3Smrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 41880cc2eac3Smrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 41890cc2eac3Smrg done 41900cc2eac3Smrg test -z "$LD" && LD="$ac_prog" 41910cc2eac3Smrg ;; 41920cc2eac3Smrg "") 41930cc2eac3Smrg # If it fails, then pretend we aren't using GCC. 41940cc2eac3Smrg ac_prog=ld 4195e120bd27Smrg ;; 4196e120bd27Smrg *) 41970cc2eac3Smrg # If it is relative, then search for the first ld in PATH. 41980cc2eac3Smrg with_gnu_ld=unknown 4199e120bd27Smrg ;; 4200e120bd27Smrg esac 42010cc2eac3Smrgelif test "$with_gnu_ld" = yes; then 42020cc2eac3Smrg AC_MSG_CHECKING([for GNU ld]) 42030cc2eac3Smrgelse 42040cc2eac3Smrg AC_MSG_CHECKING([for non-GNU ld]) 42050cc2eac3Smrgfi 42060cc2eac3SmrgAC_CACHE_VAL(lt_cv_path_LD, 42070cc2eac3Smrg[if test -z "$LD"; then 42080cc2eac3Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 42090cc2eac3Smrg for ac_dir in $PATH; do 42100cc2eac3Smrg IFS="$lt_save_ifs" 42110cc2eac3Smrg test -z "$ac_dir" && ac_dir=. 42120cc2eac3Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 42130cc2eac3Smrg lt_cv_path_LD="$ac_dir/$ac_prog" 42140cc2eac3Smrg # Check to see if the program is GNU ld. I'd rather use --version, 42150cc2eac3Smrg # but apparently some variants of GNU ld only accept -v. 42160cc2eac3Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 42170cc2eac3Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 42180cc2eac3Smrg *GNU* | *'with BFD'*) 42190cc2eac3Smrg test "$with_gnu_ld" != no && break 42200cc2eac3Smrg ;; 42210cc2eac3Smrg *) 42220cc2eac3Smrg test "$with_gnu_ld" != yes && break 42230cc2eac3Smrg ;; 42240cc2eac3Smrg esac 422593493779Smrg fi 422693493779Smrg done 42270cc2eac3Smrg IFS="$lt_save_ifs" 42286c321187Smrgelse 42290cc2eac3Smrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 423093493779Smrgfi]) 42310cc2eac3SmrgLD="$lt_cv_path_LD" 42320cc2eac3Smrgif test -n "$LD"; then 42330cc2eac3Smrg AC_MSG_RESULT($LD) 42340cc2eac3Smrgelse 42350cc2eac3Smrg AC_MSG_RESULT(no) 42360cc2eac3Smrgfi 42370cc2eac3Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 42380cc2eac3Smrg_LT_PATH_LD_GNU 42390cc2eac3SmrgAC_SUBST([LD]) 42406c321187Smrg 42410cc2eac3Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 42420cc2eac3Smrg])# LT_PATH_LD 42436c321187Smrg 42440cc2eac3Smrg# Old names: 42450cc2eac3SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 42460cc2eac3SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 42470cc2eac3Smrgdnl aclocal-1.4 backwards compatibility: 42480cc2eac3Smrgdnl AC_DEFUN([AM_PROG_LD], []) 42490cc2eac3Smrgdnl AC_DEFUN([AC_PROG_LD], []) 42506c321187Smrg 42510cc2eac3Smrg 42520cc2eac3Smrg# _LT_PATH_LD_GNU 42530cc2eac3Smrg#- -------------- 42540cc2eac3Smrgm4_defun([_LT_PATH_LD_GNU], 42550cc2eac3Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 42560cc2eac3Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 42570cc2eac3Smrgcase `$LD -v 2>&1 </dev/null` in 42580cc2eac3Smrg*GNU* | *'with BFD'*) 42590cc2eac3Smrg lt_cv_prog_gnu_ld=yes 42600cc2eac3Smrg ;; 42610cc2eac3Smrg*) 42620cc2eac3Smrg lt_cv_prog_gnu_ld=no 42636c321187Smrg ;; 42640cc2eac3Smrgesac]) 42650cc2eac3Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 42660cc2eac3Smrg])# _LT_PATH_LD_GNU 42676c321187Smrg 42686c321187Smrg 42690cc2eac3Smrg# _LT_CMD_RELOAD 42700cc2eac3Smrg# -------------- 42710cc2eac3Smrg# find reload flag for linker 42720cc2eac3Smrg# -- PORTME Some linkers may need a different reload flag. 42730cc2eac3Smrgm4_defun([_LT_CMD_RELOAD], 42740cc2eac3Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 42750cc2eac3Smrg lt_cv_ld_reload_flag, 42760cc2eac3Smrg [lt_cv_ld_reload_flag='-r']) 42770cc2eac3Smrgreload_flag=$lt_cv_ld_reload_flag 42780cc2eac3Smrgcase $reload_flag in 42790cc2eac3Smrg"" | " "*) ;; 42800cc2eac3Smrg*) reload_flag=" $reload_flag" ;; 42810cc2eac3Smrgesac 42820cc2eac3Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 42830cc2eac3Smrgcase $host_os in 42840cc2eac3Smrg cygwin* | mingw* | pw32* | cegcc*) 42850cc2eac3Smrg if test "$GCC" != yes; then 42860cc2eac3Smrg reload_cmds=false 42870cc2eac3Smrg fi 4288e120bd27Smrg ;; 42890cc2eac3Smrg darwin*) 42900cc2eac3Smrg if test "$GCC" = yes; then 42910cc2eac3Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 42920cc2eac3Smrg else 42930cc2eac3Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 42940cc2eac3Smrg fi 4295e120bd27Smrg ;; 42960cc2eac3Smrgesac 42970cc2eac3Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 42980cc2eac3Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl 42990cc2eac3Smrg])# _LT_CMD_RELOAD 43000cc2eac3Smrg 43010cc2eac3Smrg 43020cc2eac3Smrg# _LT_CHECK_MAGIC_METHOD 43030cc2eac3Smrg# ---------------------- 43040cc2eac3Smrg# how to check for library dependencies 43050cc2eac3Smrg# -- PORTME fill in with the dynamic library characteristics 43060cc2eac3Smrgm4_defun([_LT_CHECK_MAGIC_METHOD], 43070cc2eac3Smrg[m4_require([_LT_DECL_EGREP]) 43080cc2eac3Smrgm4_require([_LT_DECL_OBJDUMP]) 43090cc2eac3SmrgAC_CACHE_CHECK([how to recognize dependent libraries], 43100cc2eac3Smrglt_cv_deplibs_check_method, 43110cc2eac3Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 43120cc2eac3Smrglt_cv_file_magic_test_file= 43130cc2eac3Smrglt_cv_deplibs_check_method='unknown' 43140cc2eac3Smrg# Need to set the preceding variable on all platforms that support 43150cc2eac3Smrg# interlibrary dependencies. 43160cc2eac3Smrg# 'none' -- dependencies not supported. 43170cc2eac3Smrg# `unknown' -- same as none, but documents that we really don't know. 43180cc2eac3Smrg# 'pass_all' -- all dependencies passed with no checks. 43190cc2eac3Smrg# 'test_compile' -- check by making test program. 43200cc2eac3Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 43210cc2eac3Smrg# which responds to the $file_magic_cmd with a given extended regex. 43220cc2eac3Smrg# If you have `file' or equivalent on your system and you're not sure 43230cc2eac3Smrg# whether `pass_all' will *always* work, you probably want this one. 43240cc2eac3Smrg 43250cc2eac3Smrgcase $host_os in 43260cc2eac3Smrgaix[[4-9]]*) 43270cc2eac3Smrg lt_cv_deplibs_check_method=pass_all 43286c321187Smrg ;; 43296c321187Smrg 43306c321187Smrgbeos*) 43310cc2eac3Smrg lt_cv_deplibs_check_method=pass_all 43326c321187Smrg ;; 43336c321187Smrg 43346c321187Smrgbsdi[[45]]*) 43350cc2eac3Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 43360cc2eac3Smrg lt_cv_file_magic_cmd='/usr/bin/file -L' 43370cc2eac3Smrg lt_cv_file_magic_test_file=/shlib/libc.so 43386c321187Smrg ;; 43396c321187Smrg 43400cc2eac3Smrgcygwin*) 43410cc2eac3Smrg # func_win32_libid is a shell function defined in ltmain.sh 43420cc2eac3Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 43430cc2eac3Smrg lt_cv_file_magic_cmd='func_win32_libid' 43440cc2eac3Smrg ;; 43456c321187Smrg 43460cc2eac3Smrgmingw* | pw32*) 43470cc2eac3Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 43480cc2eac3Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 43490cc2eac3Smrg # unless we find 'file', for example because we are cross-compiling. 43500cc2eac3Smrg # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 43510cc2eac3Smrg if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 43520cc2eac3Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 43530cc2eac3Smrg lt_cv_file_magic_cmd='func_win32_libid' 43540cc2eac3Smrg else 43550cc2eac3Smrg # Keep this pattern in sync with the one in func_win32_libid. 43560cc2eac3Smrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 43570cc2eac3Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 43580cc2eac3Smrg fi 43590cc2eac3Smrg ;; 43606c321187Smrg 43610cc2eac3Smrgcegcc*) 43620cc2eac3Smrg # use the weaker test based on 'objdump'. See mingw*. 43630cc2eac3Smrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 43640cc2eac3Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 43650cc2eac3Smrg ;; 43660cc2eac3Smrg 43670cc2eac3Smrgdarwin* | rhapsody*) 43680cc2eac3Smrg lt_cv_deplibs_check_method=pass_all 43690cc2eac3Smrg ;; 43700cc2eac3Smrg 43710cc2eac3Smrgfreebsd* | dragonfly*) 43720cc2eac3Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 43730cc2eac3Smrg case $host_cpu in 43740cc2eac3Smrg i*86 ) 43750cc2eac3Smrg # Not sure whether the presence of OpenBSD here was a mistake. 43760cc2eac3Smrg # Let's accept both of them until this is cleared up. 43770cc2eac3Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 43780cc2eac3Smrg lt_cv_file_magic_cmd=/usr/bin/file 43790cc2eac3Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 43806c321187Smrg ;; 43816c321187Smrg esac 43820cc2eac3Smrg else 43830cc2eac3Smrg lt_cv_deplibs_check_method=pass_all 43840cc2eac3Smrg fi 43850cc2eac3Smrg ;; 43860cc2eac3Smrg 43870cc2eac3Smrggnu*) 43880cc2eac3Smrg lt_cv_deplibs_check_method=pass_all 43890cc2eac3Smrg ;; 43900cc2eac3Smrg 43910cc2eac3Smrghaiku*) 43920cc2eac3Smrg lt_cv_deplibs_check_method=pass_all 43930cc2eac3Smrg ;; 43946c321187Smrg 43950cc2eac3Smrghpux10.20* | hpux11*) 43960cc2eac3Smrg lt_cv_file_magic_cmd=/usr/bin/file 43970cc2eac3Smrg case $host_cpu in 43980cc2eac3Smrg ia64*) 43990cc2eac3Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 44000cc2eac3Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 44010cc2eac3Smrg ;; 44020cc2eac3Smrg hppa*64*) 44030cc2eac3Smrg [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]'] 44040cc2eac3Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 44050cc2eac3Smrg ;; 44066c321187Smrg *) 44070cc2eac3Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 44080cc2eac3Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 44096c321187Smrg ;; 44106c321187Smrg esac 44116c321187Smrg ;; 44126c321187Smrg 44130cc2eac3Smrginterix[[3-9]]*) 44140cc2eac3Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 44150cc2eac3Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 44166c321187Smrg ;; 44176c321187Smrg 44180cc2eac3Smrgirix5* | irix6* | nonstopux*) 44190cc2eac3Smrg case $LD in 44200cc2eac3Smrg *-32|*"-32 ") libmagic=32-bit;; 44210cc2eac3Smrg *-n32|*"-n32 ") libmagic=N32;; 44220cc2eac3Smrg *-64|*"-64 ") libmagic=64-bit;; 44230cc2eac3Smrg *) libmagic=never-match;; 44240cc2eac3Smrg esac 44250cc2eac3Smrg lt_cv_deplibs_check_method=pass_all 44266c321187Smrg ;; 44276c321187Smrg 44289d0b5e55Smrg# This must be glibc/ELF. 44290cc2eac3Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 44300cc2eac3Smrg lt_cv_deplibs_check_method=pass_all 44316c321187Smrg ;; 44326c321187Smrg 44330cc2eac3Smrgnetbsd*) 44340cc2eac3Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 44350cc2eac3Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 44366c321187Smrg else 44370cc2eac3Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 44386c321187Smrg fi 44396c321187Smrg ;; 44406c321187Smrg 44410cc2eac3Smrgnewos6*) 44420cc2eac3Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 44430cc2eac3Smrg lt_cv_file_magic_cmd=/usr/bin/file 44440cc2eac3Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 44456c321187Smrg ;; 44466c321187Smrg 44470cc2eac3Smrg*nto* | *qnx*) 44480cc2eac3Smrg lt_cv_deplibs_check_method=pass_all 4449e120bd27Smrg ;; 4450e120bd27Smrg 44510cc2eac3Smrgopenbsd*) 44520cc2eac3Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 44530cc2eac3Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 44540cc2eac3Smrg else 44550cc2eac3Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 44560cc2eac3Smrg fi 44570cc2eac3Smrg ;; 44580cc2eac3Smrg 44590cc2eac3Smrgosf3* | osf4* | osf5*) 44600cc2eac3Smrg lt_cv_deplibs_check_method=pass_all 44610cc2eac3Smrg ;; 44620cc2eac3Smrg 44630cc2eac3Smrgrdos*) 44640cc2eac3Smrg lt_cv_deplibs_check_method=pass_all 44650cc2eac3Smrg ;; 44660cc2eac3Smrg 44670cc2eac3Smrgsolaris*) 44680cc2eac3Smrg lt_cv_deplibs_check_method=pass_all 44690cc2eac3Smrg ;; 44700cc2eac3Smrg 44710cc2eac3Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 44720cc2eac3Smrg lt_cv_deplibs_check_method=pass_all 44730cc2eac3Smrg ;; 44740cc2eac3Smrg 44750cc2eac3Smrgsysv4 | sysv4.3*) 44760cc2eac3Smrg case $host_vendor in 44770cc2eac3Smrg motorola) 44780cc2eac3Smrg 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]]' 44790cc2eac3Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 44806c321187Smrg ;; 44810cc2eac3Smrg ncr) 44820cc2eac3Smrg lt_cv_deplibs_check_method=pass_all 4483e120bd27Smrg ;; 44840cc2eac3Smrg sequent) 44850cc2eac3Smrg lt_cv_file_magic_cmd='/bin/file' 44860cc2eac3Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 44870cc2eac3Smrg ;; 44880cc2eac3Smrg sni) 44890cc2eac3Smrg lt_cv_file_magic_cmd='/bin/file' 44900cc2eac3Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 44910cc2eac3Smrg lt_cv_file_magic_test_file=/lib/libc.so 44920cc2eac3Smrg ;; 44930cc2eac3Smrg siemens) 44940cc2eac3Smrg lt_cv_deplibs_check_method=pass_all 44950cc2eac3Smrg ;; 44960cc2eac3Smrg pc) 44970cc2eac3Smrg lt_cv_deplibs_check_method=pass_all 44986c321187Smrg ;; 44996c321187Smrg esac 45006c321187Smrg ;; 45016c321187Smrg 45020cc2eac3Smrgtpf*) 45030cc2eac3Smrg lt_cv_deplibs_check_method=pass_all 45046c321187Smrg ;; 45050cc2eac3Smrgesac 45060cc2eac3Smrg]) 45076c321187Smrg 45080cc2eac3Smrgfile_magic_glob= 45090cc2eac3Smrgwant_nocaseglob=no 45100cc2eac3Smrgif test "$build" = "$host"; then 45116c321187Smrg case $host_os in 45120cc2eac3Smrg mingw* | pw32*) 45130cc2eac3Smrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 45140cc2eac3Smrg want_nocaseglob=yes 45150cc2eac3Smrg else 45160cc2eac3Smrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 45170cc2eac3Smrg fi 45186c321187Smrg ;; 45196c321187Smrg esac 45200cc2eac3Smrgfi 45216c321187Smrg 45220cc2eac3Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 45230cc2eac3Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 45240cc2eac3Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 4525e120bd27Smrg 45260cc2eac3Smrg_LT_DECL([], [deplibs_check_method], [1], 45270cc2eac3Smrg [Method to check whether dependent libraries are shared objects]) 45280cc2eac3Smrg_LT_DECL([], [file_magic_cmd], [1], 45290cc2eac3Smrg [Command to use when deplibs_check_method = "file_magic"]) 45300cc2eac3Smrg_LT_DECL([], [file_magic_glob], [1], 45310cc2eac3Smrg [How to find potential files when deplibs_check_method = "file_magic"]) 45320cc2eac3Smrg_LT_DECL([], [want_nocaseglob], [1], 45330cc2eac3Smrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 45340cc2eac3Smrg])# _LT_CHECK_MAGIC_METHOD 4535e120bd27Smrg 45366c321187Smrg 45370cc2eac3Smrg# LT_PATH_NM 45380cc2eac3Smrg# ---------- 45390cc2eac3Smrg# find the pathname to a BSD- or MS-compatible name lister 45400cc2eac3SmrgAC_DEFUN([LT_PATH_NM], 45410cc2eac3Smrg[AC_REQUIRE([AC_PROG_CC])dnl 45420cc2eac3SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 45430cc2eac3Smrg[if test -n "$NM"; then 45440cc2eac3Smrg # Let the user override the test. 45450cc2eac3Smrg lt_cv_path_NM="$NM" 45460cc2eac3Smrgelse 45470cc2eac3Smrg lt_nm_to_check="${ac_tool_prefix}nm" 45480cc2eac3Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 45490cc2eac3Smrg lt_nm_to_check="$lt_nm_to_check nm" 45506c321187Smrg fi 45510cc2eac3Smrg for lt_tmp_nm in $lt_nm_to_check; do 45520cc2eac3Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 45530cc2eac3Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 45540cc2eac3Smrg IFS="$lt_save_ifs" 45550cc2eac3Smrg test -z "$ac_dir" && ac_dir=. 45560cc2eac3Smrg tmp_nm="$ac_dir/$lt_tmp_nm" 45570cc2eac3Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 45580cc2eac3Smrg # Check to see if the nm accepts a BSD-compat flag. 45590cc2eac3Smrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 45600cc2eac3Smrg # nm: unknown option "B" ignored 45610cc2eac3Smrg # Tru64's nm complains that /dev/null is an invalid object file 45620cc2eac3Smrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 45630cc2eac3Smrg */dev/null* | *'Invalid file or object type'*) 45640cc2eac3Smrg lt_cv_path_NM="$tmp_nm -B" 45650cc2eac3Smrg break 45660cc2eac3Smrg ;; 45670cc2eac3Smrg *) 45680cc2eac3Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 45690cc2eac3Smrg */dev/null*) 45700cc2eac3Smrg lt_cv_path_NM="$tmp_nm -p" 45710cc2eac3Smrg break 45720cc2eac3Smrg ;; 45730cc2eac3Smrg *) 45740cc2eac3Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 45750cc2eac3Smrg continue # so that we can try to find one that supports BSD flags 45760cc2eac3Smrg ;; 45770cc2eac3Smrg esac 45780cc2eac3Smrg ;; 45790cc2eac3Smrg esac 45800cc2eac3Smrg fi 45810cc2eac3Smrg done 45820cc2eac3Smrg IFS="$lt_save_ifs" 45830cc2eac3Smrg done 45840cc2eac3Smrg : ${lt_cv_path_NM=no} 45850cc2eac3Smrgfi]) 45860cc2eac3Smrgif test "$lt_cv_path_NM" != "no"; then 45870cc2eac3Smrg NM="$lt_cv_path_NM" 45880cc2eac3Smrgelse 45890cc2eac3Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 45900cc2eac3Smrg if test -n "$DUMPBIN"; then : 45910cc2eac3Smrg # Let the user override the test. 45926c321187Smrg else 45930cc2eac3Smrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 45940cc2eac3Smrg case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 45950cc2eac3Smrg *COFF*) 45960cc2eac3Smrg DUMPBIN="$DUMPBIN -symbols" 45970cc2eac3Smrg ;; 45980cc2eac3Smrg *) 45990cc2eac3Smrg DUMPBIN=: 46000cc2eac3Smrg ;; 46010cc2eac3Smrg esac 46026c321187Smrg fi 46030cc2eac3Smrg AC_SUBST([DUMPBIN]) 46040cc2eac3Smrg if test "$DUMPBIN" != ":"; then 46050cc2eac3Smrg NM="$DUMPBIN" 46060cc2eac3Smrg fi 46070cc2eac3Smrgfi 46080cc2eac3Smrgtest -z "$NM" && NM=nm 46090cc2eac3SmrgAC_SUBST([NM]) 46100cc2eac3Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 46116c321187Smrg 46120cc2eac3SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 46130cc2eac3Smrg [lt_cv_nm_interface="BSD nm" 46140cc2eac3Smrg echo "int some_variable = 0;" > conftest.$ac_ext 46150cc2eac3Smrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 46160cc2eac3Smrg (eval "$ac_compile" 2>conftest.err) 46170cc2eac3Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 46180cc2eac3Smrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 46190cc2eac3Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 46200cc2eac3Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 46210cc2eac3Smrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 46220cc2eac3Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 46230cc2eac3Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 46240cc2eac3Smrg lt_cv_nm_interface="MS dumpbin" 46250cc2eac3Smrg fi 46260cc2eac3Smrg rm -f conftest*]) 46270cc2eac3Smrg])# LT_PATH_NM 46286c321187Smrg 46290cc2eac3Smrg# Old names: 46300cc2eac3SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 46310cc2eac3SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 46320cc2eac3Smrgdnl aclocal-1.4 backwards compatibility: 46330cc2eac3Smrgdnl AC_DEFUN([AM_PROG_NM], []) 46340cc2eac3Smrgdnl AC_DEFUN([AC_PROG_NM], []) 46356c321187Smrg 46360cc2eac3Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 46370cc2eac3Smrg# -------------------------------- 46380cc2eac3Smrg# how to determine the name of the shared library 46390cc2eac3Smrg# associated with a specific link library. 46400cc2eac3Smrg# -- PORTME fill in with the dynamic library characteristics 46410cc2eac3Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 46420cc2eac3Smrg[m4_require([_LT_DECL_EGREP]) 46430cc2eac3Smrgm4_require([_LT_DECL_OBJDUMP]) 46440cc2eac3Smrgm4_require([_LT_DECL_DLLTOOL]) 46450cc2eac3SmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 46460cc2eac3Smrglt_cv_sharedlib_from_linklib_cmd, 46470cc2eac3Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 46486c321187Smrg 46490cc2eac3Smrgcase $host_os in 46500cc2eac3Smrgcygwin* | mingw* | pw32* | cegcc*) 46510cc2eac3Smrg # two different shell functions defined in ltmain.sh 46520cc2eac3Smrg # decide which to use based on capabilities of $DLLTOOL 46530cc2eac3Smrg case `$DLLTOOL --help 2>&1` in 46540cc2eac3Smrg *--identify-strict*) 46550cc2eac3Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 46560cc2eac3Smrg ;; 46570cc2eac3Smrg *) 46580cc2eac3Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 46590cc2eac3Smrg ;; 46600cc2eac3Smrg esac 46616c321187Smrg ;; 46620cc2eac3Smrg*) 46630cc2eac3Smrg # fallback: assume linklib IS sharedlib 46640cc2eac3Smrg lt_cv_sharedlib_from_linklib_cmd="$ECHO" 46656c321187Smrg ;; 46660cc2eac3Smrgesac 46670cc2eac3Smrg]) 46680cc2eac3Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 46690cc2eac3Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 46706c321187Smrg 46710cc2eac3Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 46720cc2eac3Smrg [Command to associate shared and link libraries]) 46730cc2eac3Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 467493493779Smrg 46756c321187Smrg 46760cc2eac3Smrg# _LT_PATH_MANIFEST_TOOL 46770cc2eac3Smrg# ---------------------- 46780cc2eac3Smrg# locate the manifest tool 46790cc2eac3Smrgm4_defun([_LT_PATH_MANIFEST_TOOL], 46800cc2eac3Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 46810cc2eac3Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 46820cc2eac3SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 46830cc2eac3Smrg [lt_cv_path_mainfest_tool=no 46840cc2eac3Smrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 46850cc2eac3Smrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 46860cc2eac3Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 46870cc2eac3Smrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 46880cc2eac3Smrg lt_cv_path_mainfest_tool=yes 46896c321187Smrg fi 46900cc2eac3Smrg rm -f conftest*]) 46910cc2eac3Smrgif test "x$lt_cv_path_mainfest_tool" != xyes; then 46920cc2eac3Smrg MANIFEST_TOOL=: 46930cc2eac3Smrgfi 46940cc2eac3Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 46950cc2eac3Smrg])# _LT_PATH_MANIFEST_TOOL 46966c321187Smrg 46976c321187Smrg 46980cc2eac3Smrg# LT_LIB_M 46990cc2eac3Smrg# -------- 47000cc2eac3Smrg# check for math library 47010cc2eac3SmrgAC_DEFUN([LT_LIB_M], 47020cc2eac3Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 47030cc2eac3SmrgLIBM= 47040cc2eac3Smrgcase $host in 47050cc2eac3Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 47060cc2eac3Smrg # These system don't have libm, or don't need it 47070cc2eac3Smrg ;; 47080cc2eac3Smrg*-ncr-sysv4.3*) 47090cc2eac3Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 47100cc2eac3Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 47110cc2eac3Smrg ;; 47120cc2eac3Smrg*) 47130cc2eac3Smrg AC_CHECK_LIB(m, cos, LIBM="-lm") 47146c321187Smrg ;; 47150cc2eac3Smrgesac 47160cc2eac3SmrgAC_SUBST([LIBM]) 47170cc2eac3Smrg])# LT_LIB_M 47186c321187Smrg 47190cc2eac3Smrg# Old name: 47200cc2eac3SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 47210cc2eac3Smrgdnl aclocal-1.4 backwards compatibility: 47220cc2eac3Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 47236c321187Smrg 4724e120bd27Smrg 47250cc2eac3Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 47260cc2eac3Smrg# ------------------------------- 47270cc2eac3Smrgm4_defun([_LT_COMPILER_NO_RTTI], 47280cc2eac3Smrg[m4_require([_LT_TAG_COMPILER])dnl 47296c321187Smrg 47300cc2eac3Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 47316c321187Smrg 47326c321187Smrgif test "$GCC" = yes; then 47330cc2eac3Smrg case $cc_basename in 47340cc2eac3Smrg nvcc*) 47350cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 47360cc2eac3Smrg *) 47370cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 47380cc2eac3Smrg esac 47396c321187Smrg 47400cc2eac3Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 47410cc2eac3Smrg lt_cv_prog_compiler_rtti_exceptions, 47420cc2eac3Smrg [-fno-rtti -fno-exceptions], [], 47430cc2eac3Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 4744e120bd27Smrgfi 47450cc2eac3Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 47460cc2eac3Smrg [Compiler flag to turn off builtin functions]) 47470cc2eac3Smrg])# _LT_COMPILER_NO_RTTI 47486c321187Smrg 4749e120bd27Smrg 47500cc2eac3Smrg# _LT_CMD_GLOBAL_SYMBOLS 47510cc2eac3Smrg# ---------------------- 47520cc2eac3Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 47530cc2eac3Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 47540cc2eac3SmrgAC_REQUIRE([AC_PROG_CC])dnl 47550cc2eac3SmrgAC_REQUIRE([AC_PROG_AWK])dnl 47560cc2eac3SmrgAC_REQUIRE([LT_PATH_NM])dnl 47570cc2eac3SmrgAC_REQUIRE([LT_PATH_LD])dnl 47580cc2eac3Smrgm4_require([_LT_DECL_SED])dnl 47590cc2eac3Smrgm4_require([_LT_DECL_EGREP])dnl 47600cc2eac3Smrgm4_require([_LT_TAG_COMPILER])dnl 4761e120bd27Smrg 47620cc2eac3Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 47630cc2eac3SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 47640cc2eac3SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 47650cc2eac3Smrg[ 47660cc2eac3Smrg# These are sane defaults that work on at least a few old systems. 47670cc2eac3Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 47686c321187Smrg 47690cc2eac3Smrg# Character class describing NM global symbol codes. 47700cc2eac3Smrgsymcode='[[BCDEGRST]]' 47716c321187Smrg 47720cc2eac3Smrg# Regexp to match symbols that can be accessed directly from C. 47730cc2eac3Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 47740cc2eac3Smrg 47750cc2eac3Smrg# Define system-specific variables. 47760cc2eac3Smrgcase $host_os in 47770cc2eac3Smrgaix*) 47780cc2eac3Smrg symcode='[[BCDT]]' 47796c321187Smrg ;; 47800cc2eac3Smrgcygwin* | mingw* | pw32* | cegcc*) 47810cc2eac3Smrg symcode='[[ABCDGISTW]]' 47820cc2eac3Smrg ;; 47830cc2eac3Smrghpux*) 47840cc2eac3Smrg if test "$host_cpu" = ia64; then 47850cc2eac3Smrg symcode='[[ABCDEGRST]]' 47860cc2eac3Smrg fi 47870cc2eac3Smrg ;; 47880cc2eac3Smrgirix* | nonstopux*) 47890cc2eac3Smrg symcode='[[BCDEGRST]]' 47900cc2eac3Smrg ;; 47910cc2eac3Smrgosf*) 47920cc2eac3Smrg symcode='[[BCDEGQRST]]' 47930cc2eac3Smrg ;; 47940cc2eac3Smrgsolaris*) 47950cc2eac3Smrg symcode='[[BDRT]]' 47960cc2eac3Smrg ;; 47970cc2eac3Smrgsco3.2v5*) 47980cc2eac3Smrg symcode='[[DT]]' 47990cc2eac3Smrg ;; 48000cc2eac3Smrgsysv4.2uw2*) 48010cc2eac3Smrg symcode='[[DT]]' 48020cc2eac3Smrg ;; 48030cc2eac3Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 48040cc2eac3Smrg symcode='[[ABDT]]' 48050cc2eac3Smrg ;; 48060cc2eac3Smrgsysv4) 48070cc2eac3Smrg symcode='[[DFNSTU]]' 48080cc2eac3Smrg ;; 48090cc2eac3Smrgesac 48106c321187Smrg 48110cc2eac3Smrg# If we're using GNU nm, then use its standard symbol codes. 48120cc2eac3Smrgcase `$NM -V 2>&1` in 48130cc2eac3Smrg*GNU* | *'with BFD'*) 48140cc2eac3Smrg symcode='[[ABCDGIRSTW]]' ;; 48150cc2eac3Smrgesac 48166c321187Smrg 48170cc2eac3Smrg# Transform an extracted symbol line into a proper C declaration. 48180cc2eac3Smrg# Some systems (esp. on ia64) link data and code symbols differently, 48190cc2eac3Smrg# so use this general approach. 48200cc2eac3Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 4821e120bd27Smrg 48220cc2eac3Smrg# Transform an extracted symbol line into symbol name and symbol address 48230cc2eac3Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 48240cc2eac3Smrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" 48256c321187Smrg 48260cc2eac3Smrg# Handle CRLF in mingw tool chain 48270cc2eac3Smrgopt_cr= 48280cc2eac3Smrgcase $build_os in 48290cc2eac3Smrgmingw*) 48300cc2eac3Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 48310cc2eac3Smrg ;; 48320cc2eac3Smrgesac 48336c321187Smrg 48340cc2eac3Smrg# Try without a prefix underscore, then with it. 48350cc2eac3Smrgfor ac_symprfx in "" "_"; do 48366c321187Smrg 48370cc2eac3Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 48380cc2eac3Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 4839e120bd27Smrg 48400cc2eac3Smrg # Write the raw and C identifiers. 48410cc2eac3Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 48420cc2eac3Smrg # Fake it for dumpbin and say T for any non-static function 48430cc2eac3Smrg # and D for any global variable. 48440cc2eac3Smrg # Also find C++ and __fastcall symbols from MSVC++, 48450cc2eac3Smrg # which start with @ or ?. 48460cc2eac3Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 48470cc2eac3Smrg" {last_section=section; section=\$ 3};"\ 48489d0b5e55Smrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 48490cc2eac3Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 48500cc2eac3Smrg" \$ 0!~/External *\|/{next};"\ 48510cc2eac3Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 48520cc2eac3Smrg" {if(hide[section]) next};"\ 48530cc2eac3Smrg" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 48540cc2eac3Smrg" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 48550cc2eac3Smrg" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 48560cc2eac3Smrg" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 48570cc2eac3Smrg" ' prfx=^$ac_symprfx]" 48580cc2eac3Smrg else 48590cc2eac3Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 48600cc2eac3Smrg fi 48610cc2eac3Smrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 4862e120bd27Smrg 48630cc2eac3Smrg # Check to see that the pipe works correctly. 48640cc2eac3Smrg pipe_works=no 48656c321187Smrg 48660cc2eac3Smrg rm -f conftest* 48670cc2eac3Smrg cat > conftest.$ac_ext <<_LT_EOF 48680cc2eac3Smrg#ifdef __cplusplus 48690cc2eac3Smrgextern "C" { 48700cc2eac3Smrg#endif 48710cc2eac3Smrgchar nm_test_var; 48720cc2eac3Smrgvoid nm_test_func(void); 48730cc2eac3Smrgvoid nm_test_func(void){} 48740cc2eac3Smrg#ifdef __cplusplus 48750cc2eac3Smrg} 48760cc2eac3Smrg#endif 48770cc2eac3Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 48780cc2eac3Smrg_LT_EOF 48796c321187Smrg 48800cc2eac3Smrg if AC_TRY_EVAL(ac_compile); then 48810cc2eac3Smrg # Now try to grab the symbols. 48820cc2eac3Smrg nlist=conftest.nm 48830cc2eac3Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 48840cc2eac3Smrg # Try sorting and uniquifying the output. 48850cc2eac3Smrg if sort "$nlist" | uniq > "$nlist"T; then 48860cc2eac3Smrg mv -f "$nlist"T "$nlist" 48870cc2eac3Smrg else 48880cc2eac3Smrg rm -f "$nlist"T 48890cc2eac3Smrg fi 48906c321187Smrg 48910cc2eac3Smrg # Make sure that we snagged all the symbols we need. 48920cc2eac3Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 48930cc2eac3Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 48940cc2eac3Smrg cat <<_LT_EOF > conftest.$ac_ext 48950cc2eac3Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 48960cc2eac3Smrg#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) 48970cc2eac3Smrg/* DATA imports from DLLs on WIN32 con't be const, because runtime 48980cc2eac3Smrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 48990cc2eac3Smrg# define LT@&t@_DLSYM_CONST 49000cc2eac3Smrg#elif defined(__osf__) 49010cc2eac3Smrg/* This system does not cope well with relocations in const data. */ 49020cc2eac3Smrg# define LT@&t@_DLSYM_CONST 49030cc2eac3Smrg#else 49040cc2eac3Smrg# define LT@&t@_DLSYM_CONST const 49050cc2eac3Smrg#endif 49066c321187Smrg 49070cc2eac3Smrg#ifdef __cplusplus 49080cc2eac3Smrgextern "C" { 49090cc2eac3Smrg#endif 49106c321187Smrg 49110cc2eac3Smrg_LT_EOF 49120cc2eac3Smrg # Now generate the symbol file. 49130cc2eac3Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 49146c321187Smrg 49150cc2eac3Smrg cat <<_LT_EOF >> conftest.$ac_ext 49166c321187Smrg 49170cc2eac3Smrg/* The mapping between symbol names and symbols. */ 49180cc2eac3SmrgLT@&t@_DLSYM_CONST struct { 49190cc2eac3Smrg const char *name; 49200cc2eac3Smrg void *address; 49210cc2eac3Smrg} 49220cc2eac3Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 49230cc2eac3Smrg{ 49240cc2eac3Smrg { "@PROGRAM@", (void *) 0 }, 49250cc2eac3Smrg_LT_EOF 49260cc2eac3Smrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 49270cc2eac3Smrg cat <<\_LT_EOF >> conftest.$ac_ext 49280cc2eac3Smrg {0, (void *) 0} 49290cc2eac3Smrg}; 49306c321187Smrg 49310cc2eac3Smrg/* This works around a problem in FreeBSD linker */ 49320cc2eac3Smrg#ifdef FREEBSD_WORKAROUND 49330cc2eac3Smrgstatic const void *lt_preloaded_setup() { 49340cc2eac3Smrg return lt__PROGRAM__LTX_preloaded_symbols; 49350cc2eac3Smrg} 49360cc2eac3Smrg#endif 49376c321187Smrg 49380cc2eac3Smrg#ifdef __cplusplus 49390cc2eac3Smrg} 49400cc2eac3Smrg#endif 49410cc2eac3Smrg_LT_EOF 49420cc2eac3Smrg # Now try linking the two files. 49430cc2eac3Smrg mv conftest.$ac_objext conftstm.$ac_objext 49440cc2eac3Smrg lt_globsym_save_LIBS=$LIBS 49450cc2eac3Smrg lt_globsym_save_CFLAGS=$CFLAGS 49460cc2eac3Smrg LIBS="conftstm.$ac_objext" 49470cc2eac3Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 49480cc2eac3Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 49490cc2eac3Smrg pipe_works=yes 49500cc2eac3Smrg fi 49510cc2eac3Smrg LIBS=$lt_globsym_save_LIBS 49520cc2eac3Smrg CFLAGS=$lt_globsym_save_CFLAGS 49530cc2eac3Smrg else 49540cc2eac3Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 49550cc2eac3Smrg fi 49560cc2eac3Smrg else 49570cc2eac3Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 49580cc2eac3Smrg fi 49590cc2eac3Smrg else 49600cc2eac3Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 49610cc2eac3Smrg fi 496293493779Smrg else 49630cc2eac3Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 49640cc2eac3Smrg cat conftest.$ac_ext >&5 496593493779Smrg fi 49660cc2eac3Smrg rm -rf conftest* conftst* 49676c321187Smrg 49680cc2eac3Smrg # Do not use the global_symbol_pipe unless it works. 49690cc2eac3Smrg if test "$pipe_works" = yes; then 49700cc2eac3Smrg break 49716c321187Smrg else 49720cc2eac3Smrg lt_cv_sys_global_symbol_pipe= 49736c321187Smrg fi 49740cc2eac3Smrgdone 49750cc2eac3Smrg]) 49760cc2eac3Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 49770cc2eac3Smrg lt_cv_sys_global_symbol_to_cdecl= 49780cc2eac3Smrgfi 49790cc2eac3Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 49800cc2eac3Smrg AC_MSG_RESULT(failed) 49810cc2eac3Smrgelse 49820cc2eac3Smrg AC_MSG_RESULT(ok) 49830cc2eac3Smrgfi 4984e120bd27Smrg 49850cc2eac3Smrg# Response file support. 49860cc2eac3Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 49870cc2eac3Smrg nm_file_list_spec='@' 49880cc2eac3Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 49890cc2eac3Smrg nm_file_list_spec='@' 49900cc2eac3Smrgfi 49916c321187Smrg 49920cc2eac3Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 49930cc2eac3Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 49940cc2eac3Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 49950cc2eac3Smrg [Transform the output of nm in a proper C declaration]) 49960cc2eac3Smrg_LT_DECL([global_symbol_to_c_name_address], 49970cc2eac3Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 49980cc2eac3Smrg [Transform the output of nm in a C name address pair]) 49990cc2eac3Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 50000cc2eac3Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 50010cc2eac3Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 50020cc2eac3Smrg_LT_DECL([], [nm_file_list_spec], [1], 50030cc2eac3Smrg [Specify filename containing input files for $NM]) 50040cc2eac3Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 50056c321187Smrg 50066c321187Smrg 50070cc2eac3Smrg# _LT_COMPILER_PIC([TAGNAME]) 50080cc2eac3Smrg# --------------------------- 50090cc2eac3Smrgm4_defun([_LT_COMPILER_PIC], 50100cc2eac3Smrg[m4_require([_LT_TAG_COMPILER])dnl 50110cc2eac3Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 50120cc2eac3Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 50130cc2eac3Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 50146c321187Smrg 50150cc2eac3Smrgm4_if([$1], [CXX], [ 50160cc2eac3Smrg # C++ specific cases for pic, static, wl, etc. 50170cc2eac3Smrg if test "$GXX" = yes; then 50180cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 50190cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 50206c321187Smrg 50210cc2eac3Smrg case $host_os in 50220cc2eac3Smrg aix*) 50230cc2eac3Smrg # All AIX code is PIC. 50240cc2eac3Smrg if test "$host_cpu" = ia64; then 50250cc2eac3Smrg # AIX 5 now supports IA64 processor 50260cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 50270cc2eac3Smrg fi 50280cc2eac3Smrg ;; 50296c321187Smrg 50300cc2eac3Smrg amigaos*) 50310cc2eac3Smrg case $host_cpu in 50320cc2eac3Smrg powerpc) 50330cc2eac3Smrg # see comment about AmigaOS4 .so support 50340cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 50350cc2eac3Smrg ;; 50360cc2eac3Smrg m68k) 50370cc2eac3Smrg # FIXME: we need at least 68020 code to build shared libraries, but 50380cc2eac3Smrg # adding the `-m68020' flag to GCC prevents building anything better, 50390cc2eac3Smrg # like `-m68040'. 50400cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 50410cc2eac3Smrg ;; 50420cc2eac3Smrg esac 50430cc2eac3Smrg ;; 50446c321187Smrg 50450cc2eac3Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 50460cc2eac3Smrg # PIC is the default for these OSes. 50470cc2eac3Smrg ;; 50480cc2eac3Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 50490cc2eac3Smrg # This hack is so that the source file can tell whether it is being 50500cc2eac3Smrg # built for inclusion in a dll (and should export symbols for example). 50510cc2eac3Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 50520cc2eac3Smrg # (--disable-auto-import) libraries 50530cc2eac3Smrg m4_if([$1], [GCJ], [], 50540cc2eac3Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 50550cc2eac3Smrg ;; 50560cc2eac3Smrg darwin* | rhapsody*) 50570cc2eac3Smrg # PIC is the default on this platform 50580cc2eac3Smrg # Common symbols not allowed in MH_DYLIB files 50590cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 50600cc2eac3Smrg ;; 50610cc2eac3Smrg *djgpp*) 50620cc2eac3Smrg # DJGPP does not support shared libraries at all 50630cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 50640cc2eac3Smrg ;; 50650cc2eac3Smrg haiku*) 50660cc2eac3Smrg # PIC is the default for Haiku. 50670cc2eac3Smrg # The "-static" flag exists, but is broken. 50680cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 50690cc2eac3Smrg ;; 50700cc2eac3Smrg interix[[3-9]]*) 50710cc2eac3Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 50720cc2eac3Smrg # Instead, we relocate shared libraries at runtime. 50730cc2eac3Smrg ;; 50740cc2eac3Smrg sysv4*MP*) 50750cc2eac3Smrg if test -d /usr/nec; then 50760cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 50770cc2eac3Smrg fi 50780cc2eac3Smrg ;; 50790cc2eac3Smrg hpux*) 50800cc2eac3Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 50810cc2eac3Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 50820cc2eac3Smrg # sets the default TLS model and affects inlining. 50830cc2eac3Smrg case $host_cpu in 50840cc2eac3Smrg hppa*64*) 50850cc2eac3Smrg ;; 50860cc2eac3Smrg *) 50870cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 50880cc2eac3Smrg ;; 50890cc2eac3Smrg esac 50900cc2eac3Smrg ;; 50910cc2eac3Smrg *qnx* | *nto*) 50920cc2eac3Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 50930cc2eac3Smrg # it will coredump. 50940cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 50950cc2eac3Smrg ;; 50960cc2eac3Smrg *) 50970cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 50980cc2eac3Smrg ;; 50990cc2eac3Smrg esac 51006c321187Smrg else 51010cc2eac3Smrg case $host_os in 51020cc2eac3Smrg aix[[4-9]]*) 51030cc2eac3Smrg # All AIX code is PIC. 51040cc2eac3Smrg if test "$host_cpu" = ia64; then 51050cc2eac3Smrg # AIX 5 now supports IA64 processor 51060cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 51070cc2eac3Smrg else 51080cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 51090cc2eac3Smrg fi 51100cc2eac3Smrg ;; 51110cc2eac3Smrg chorus*) 51120cc2eac3Smrg case $cc_basename in 51130cc2eac3Smrg cxch68*) 51140cc2eac3Smrg # Green Hills C++ Compiler 51150cc2eac3Smrg # _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" 51166c321187Smrg ;; 51170cc2eac3Smrg esac 51180cc2eac3Smrg ;; 51190cc2eac3Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 51200cc2eac3Smrg # This hack is so that the source file can tell whether it is being 51210cc2eac3Smrg # built for inclusion in a dll (and should export symbols for example). 51220cc2eac3Smrg m4_if([$1], [GCJ], [], 51230cc2eac3Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 51240cc2eac3Smrg ;; 51250cc2eac3Smrg dgux*) 51260cc2eac3Smrg case $cc_basename in 51270cc2eac3Smrg ec++*) 51280cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 51290cc2eac3Smrg ;; 51300cc2eac3Smrg ghcx*) 51310cc2eac3Smrg # Green Hills C++ Compiler 51320cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 51336c321187Smrg ;; 51346c321187Smrg *) 51356c321187Smrg ;; 51366c321187Smrg esac 51370cc2eac3Smrg ;; 51380cc2eac3Smrg freebsd* | dragonfly*) 51390cc2eac3Smrg # FreeBSD uses GNU C++ 51400cc2eac3Smrg ;; 51410cc2eac3Smrg hpux9* | hpux10* | hpux11*) 51420cc2eac3Smrg case $cc_basename in 51430cc2eac3Smrg CC*) 51440cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51450cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 51460cc2eac3Smrg if test "$host_cpu" != ia64; then 51470cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 51480cc2eac3Smrg fi 51490cc2eac3Smrg ;; 51500cc2eac3Smrg aCC*) 51510cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51520cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 51530cc2eac3Smrg case $host_cpu in 51540cc2eac3Smrg hppa*64*|ia64*) 51550cc2eac3Smrg # +Z the default 51560cc2eac3Smrg ;; 51570cc2eac3Smrg *) 51580cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 51590cc2eac3Smrg ;; 51600cc2eac3Smrg esac 51610cc2eac3Smrg ;; 51620cc2eac3Smrg *) 51630cc2eac3Smrg ;; 51640cc2eac3Smrg esac 51650cc2eac3Smrg ;; 51660cc2eac3Smrg interix*) 51670cc2eac3Smrg # This is c89, which is MS Visual C++ (no shared libs) 51680cc2eac3Smrg # Anyone wants to do a port? 51690cc2eac3Smrg ;; 51700cc2eac3Smrg irix5* | irix6* | nonstopux*) 51710cc2eac3Smrg case $cc_basename in 51720cc2eac3Smrg CC*) 51730cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51740cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 51750cc2eac3Smrg # CC pic flag -KPIC is the default. 51760cc2eac3Smrg ;; 51770cc2eac3Smrg *) 51780cc2eac3Smrg ;; 51790cc2eac3Smrg esac 51800cc2eac3Smrg ;; 51810cc2eac3Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 51820cc2eac3Smrg case $cc_basename in 51830cc2eac3Smrg KCC*) 51840cc2eac3Smrg # KAI C++ Compiler 51850cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 51860cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 51870cc2eac3Smrg ;; 51880cc2eac3Smrg ecpc* ) 51890cc2eac3Smrg # old Intel C++ for x86_64 which still supported -KPIC. 51900cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51910cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 51920cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 51930cc2eac3Smrg ;; 51940cc2eac3Smrg icpc* ) 51950cc2eac3Smrg # Intel C++, used to be incompatible with GCC. 51960cc2eac3Smrg # ICC 10 doesn't accept -KPIC any more. 51970cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51980cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 51990cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 52000cc2eac3Smrg ;; 52010cc2eac3Smrg pgCC* | pgcpp*) 52020cc2eac3Smrg # Portland Group C++ compiler 52030cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 52040cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 52050cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 52060cc2eac3Smrg ;; 52070cc2eac3Smrg cxx*) 52080cc2eac3Smrg # Compaq C++ 52090cc2eac3Smrg # Make sure the PIC flag is empty. It appears that all Alpha 52100cc2eac3Smrg # Linux and Compaq Tru64 Unix objects are PIC. 52110cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 52120cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 52130cc2eac3Smrg ;; 52140cc2eac3Smrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 52150cc2eac3Smrg # IBM XL 8.0, 9.0 on PPC and BlueGene 52160cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 52170cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 52180cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 52190cc2eac3Smrg ;; 52200cc2eac3Smrg *) 52210cc2eac3Smrg case `$CC -V 2>&1 | sed 5q` in 52220cc2eac3Smrg *Sun\ C*) 52230cc2eac3Smrg # Sun C++ 5.9 52240cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 52250cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 52260cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 52270cc2eac3Smrg ;; 52280cc2eac3Smrg esac 52290cc2eac3Smrg ;; 52300cc2eac3Smrg esac 52310cc2eac3Smrg ;; 52320cc2eac3Smrg lynxos*) 52330cc2eac3Smrg ;; 52340cc2eac3Smrg m88k*) 52350cc2eac3Smrg ;; 52360cc2eac3Smrg mvs*) 52370cc2eac3Smrg case $cc_basename in 52380cc2eac3Smrg cxx*) 52390cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 52400cc2eac3Smrg ;; 52410cc2eac3Smrg *) 52420cc2eac3Smrg ;; 52430cc2eac3Smrg esac 52440cc2eac3Smrg ;; 52450cc2eac3Smrg netbsd*) 52460cc2eac3Smrg ;; 52470cc2eac3Smrg *qnx* | *nto*) 52480cc2eac3Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 52490cc2eac3Smrg # it will coredump. 52500cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 52510cc2eac3Smrg ;; 52520cc2eac3Smrg osf3* | osf4* | osf5*) 52530cc2eac3Smrg case $cc_basename in 52540cc2eac3Smrg KCC*) 52550cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 52560cc2eac3Smrg ;; 52570cc2eac3Smrg RCC*) 52580cc2eac3Smrg # Rational C++ 2.4.1 52590cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 52600cc2eac3Smrg ;; 52610cc2eac3Smrg cxx*) 52620cc2eac3Smrg # Digital/Compaq C++ 52630cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 52640cc2eac3Smrg # Make sure the PIC flag is empty. It appears that all Alpha 52650cc2eac3Smrg # Linux and Compaq Tru64 Unix objects are PIC. 52660cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 52670cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 52680cc2eac3Smrg ;; 52690cc2eac3Smrg *) 52700cc2eac3Smrg ;; 52710cc2eac3Smrg esac 52720cc2eac3Smrg ;; 52730cc2eac3Smrg psos*) 52740cc2eac3Smrg ;; 52750cc2eac3Smrg solaris*) 52760cc2eac3Smrg case $cc_basename in 52770cc2eac3Smrg CC* | sunCC*) 52780cc2eac3Smrg # Sun C++ 4.2, 5.x and Centerline C++ 52790cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 52800cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 52810cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 52820cc2eac3Smrg ;; 52830cc2eac3Smrg gcx*) 52840cc2eac3Smrg # Green Hills C++ Compiler 52850cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 52860cc2eac3Smrg ;; 52870cc2eac3Smrg *) 52880cc2eac3Smrg ;; 52890cc2eac3Smrg esac 52900cc2eac3Smrg ;; 52910cc2eac3Smrg sunos4*) 52920cc2eac3Smrg case $cc_basename in 52930cc2eac3Smrg CC*) 52940cc2eac3Smrg # Sun C++ 4.x 52950cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 52960cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 52970cc2eac3Smrg ;; 52980cc2eac3Smrg lcc*) 52990cc2eac3Smrg # Lucid 53000cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 53010cc2eac3Smrg ;; 53020cc2eac3Smrg *) 53030cc2eac3Smrg ;; 53040cc2eac3Smrg esac 53050cc2eac3Smrg ;; 53060cc2eac3Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 53070cc2eac3Smrg case $cc_basename in 53080cc2eac3Smrg CC*) 53090cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 53100cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 53110cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 53120cc2eac3Smrg ;; 53130cc2eac3Smrg esac 53140cc2eac3Smrg ;; 53150cc2eac3Smrg tandem*) 53160cc2eac3Smrg case $cc_basename in 53170cc2eac3Smrg NCC*) 53180cc2eac3Smrg # NonStop-UX NCC 3.20 53190cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 53200cc2eac3Smrg ;; 53210cc2eac3Smrg *) 53220cc2eac3Smrg ;; 53230cc2eac3Smrg esac 53240cc2eac3Smrg ;; 53250cc2eac3Smrg vxworks*) 53260cc2eac3Smrg ;; 53270cc2eac3Smrg *) 53280cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 53290cc2eac3Smrg ;; 53300cc2eac3Smrg esac 53310cc2eac3Smrg fi 53320cc2eac3Smrg], 53330cc2eac3Smrg[ 53340cc2eac3Smrg if test "$GCC" = yes; then 53350cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 53360cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 53376c321187Smrg 53380cc2eac3Smrg case $host_os in 53390cc2eac3Smrg aix*) 53400cc2eac3Smrg # All AIX code is PIC. 53410cc2eac3Smrg if test "$host_cpu" = ia64; then 53420cc2eac3Smrg # AIX 5 now supports IA64 processor 53430cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 53440cc2eac3Smrg fi 53450cc2eac3Smrg ;; 53466c321187Smrg 53470cc2eac3Smrg amigaos*) 53480cc2eac3Smrg case $host_cpu in 53490cc2eac3Smrg powerpc) 53500cc2eac3Smrg # see comment about AmigaOS4 .so support 53510cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 53520cc2eac3Smrg ;; 53530cc2eac3Smrg m68k) 53540cc2eac3Smrg # FIXME: we need at least 68020 code to build shared libraries, but 53550cc2eac3Smrg # adding the `-m68020' flag to GCC prevents building anything better, 53560cc2eac3Smrg # like `-m68040'. 53570cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 53580cc2eac3Smrg ;; 53590cc2eac3Smrg esac 53600cc2eac3Smrg ;; 53616c321187Smrg 53620cc2eac3Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 53630cc2eac3Smrg # PIC is the default for these OSes. 53640cc2eac3Smrg ;; 53656c321187Smrg 53660cc2eac3Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 5367e120bd27Smrg # This hack is so that the source file can tell whether it is being 5368e120bd27Smrg # built for inclusion in a dll (and should export symbols for example). 5369e120bd27Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 5370e120bd27Smrg # (--disable-auto-import) libraries 5371e120bd27Smrg m4_if([$1], [GCJ], [], 5372e120bd27Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 53736c321187Smrg ;; 53740cc2eac3Smrg 5375e120bd27Smrg darwin* | rhapsody*) 5376e120bd27Smrg # PIC is the default on this platform 5377e120bd27Smrg # Common symbols not allowed in MH_DYLIB files 5378e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 5379e120bd27Smrg ;; 53800cc2eac3Smrg 5381e120bd27Smrg haiku*) 5382e120bd27Smrg # PIC is the default for Haiku. 5383e120bd27Smrg # The "-static" flag exists, but is broken. 5384e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 5385e120bd27Smrg ;; 53860cc2eac3Smrg 5387e120bd27Smrg hpux*) 5388e120bd27Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 5389e120bd27Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 5390e120bd27Smrg # sets the default TLS model and affects inlining. 53916c321187Smrg case $host_cpu in 5392e120bd27Smrg hppa*64*) 53930cc2eac3Smrg # +Z the default 5394e120bd27Smrg ;; 53956c321187Smrg *) 5396e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5397e120bd27Smrg ;; 53986c321187Smrg esac 5399e120bd27Smrg ;; 54000cc2eac3Smrg 54010cc2eac3Smrg interix[[3-9]]*) 54020cc2eac3Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 54030cc2eac3Smrg # Instead, we relocate shared libraries at runtime. 54040cc2eac3Smrg ;; 54050cc2eac3Smrg 54060cc2eac3Smrg msdosdjgpp*) 54070cc2eac3Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 54080cc2eac3Smrg # on systems that don't support them. 54090cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 54100cc2eac3Smrg enable_shared=no 54110cc2eac3Smrg ;; 54120cc2eac3Smrg 54130cc2eac3Smrg *nto* | *qnx*) 5414e120bd27Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 5415e120bd27Smrg # it will coredump. 5416e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 54176c321187Smrg ;; 54180cc2eac3Smrg 54190cc2eac3Smrg sysv4*MP*) 54200cc2eac3Smrg if test -d /usr/nec; then 54210cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 54220cc2eac3Smrg fi 54230cc2eac3Smrg ;; 54240cc2eac3Smrg 54256c321187Smrg *) 5426e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 54276c321187Smrg ;; 54286c321187Smrg esac 54290cc2eac3Smrg 54300cc2eac3Smrg case $cc_basename in 54310cc2eac3Smrg nvcc*) # Cuda Compiler Driver 2.2 54320cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 54339d0b5e55Smrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 54349d0b5e55Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 54359d0b5e55Smrg fi 54360cc2eac3Smrg ;; 54370cc2eac3Smrg esac 5438e120bd27Smrg else 54390cc2eac3Smrg # PORTME Check for flag to pass linker flags through the system compiler. 5440e120bd27Smrg case $host_os in 54410cc2eac3Smrg aix*) 54420cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54430cc2eac3Smrg if test "$host_cpu" = ia64; then 54440cc2eac3Smrg # AIX 5 now supports IA64 processor 54450cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54460cc2eac3Smrg else 54470cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 54480cc2eac3Smrg fi 54490cc2eac3Smrg ;; 54500cc2eac3Smrg 54510cc2eac3Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 54520cc2eac3Smrg # This hack is so that the source file can tell whether it is being 54530cc2eac3Smrg # built for inclusion in a dll (and should export symbols for example). 54540cc2eac3Smrg m4_if([$1], [GCJ], [], 54550cc2eac3Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 54560cc2eac3Smrg ;; 54570cc2eac3Smrg 54580cc2eac3Smrg hpux9* | hpux10* | hpux11*) 54590cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54600cc2eac3Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 54610cc2eac3Smrg # not for PA HP-UX. 54620cc2eac3Smrg case $host_cpu in 54630cc2eac3Smrg hppa*64*|ia64*) 54640cc2eac3Smrg # +Z the default 54656c321187Smrg ;; 54660cc2eac3Smrg *) 54670cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 546893493779Smrg ;; 54690cc2eac3Smrg esac 54700cc2eac3Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 54710cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 54720cc2eac3Smrg ;; 54730cc2eac3Smrg 54740cc2eac3Smrg irix5* | irix6* | nonstopux*) 54750cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54760cc2eac3Smrg # PIC (with -KPIC) is the default. 54770cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 54780cc2eac3Smrg ;; 54790cc2eac3Smrg 54800cc2eac3Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 54810cc2eac3Smrg case $cc_basename in 54820cc2eac3Smrg # old Intel for x86_64 which still supported -KPIC. 54830cc2eac3Smrg ecc*) 54840cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54850cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 54860cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 54870cc2eac3Smrg ;; 54880cc2eac3Smrg # icc used to be incompatible with GCC. 54890cc2eac3Smrg # ICC 10 doesn't accept -KPIC any more. 54900cc2eac3Smrg icc* | ifort*) 54910cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54920cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 54930cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 54940cc2eac3Smrg ;; 54950cc2eac3Smrg # Lahey Fortran 8.1. 54960cc2eac3Smrg lf95*) 54970cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54980cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 54990cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 55006c321187Smrg ;; 55010cc2eac3Smrg nagfor*) 55020cc2eac3Smrg # NAG Fortran compiler 55030cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 55040cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 55050cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55066c321187Smrg ;; 55070cc2eac3Smrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 55080cc2eac3Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 55090cc2eac3Smrg # which looks to be a dead project) 55100cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 55110cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 55120cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5513e120bd27Smrg ;; 55140cc2eac3Smrg ccc*) 55150cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 55160cc2eac3Smrg # All Alpha code is PIC. 55170cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 55180cc2eac3Smrg ;; 55190cc2eac3Smrg xl* | bgxl* | bgf* | mpixl*) 55200cc2eac3Smrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 55210cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 55220cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 55230cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 55246c321187Smrg ;; 55250cc2eac3Smrg *) 55260cc2eac3Smrg case `$CC -V 2>&1 | sed 5q` in 55279d0b5e55Smrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 55280cc2eac3Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 55290cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 55300cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55310cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 55320cc2eac3Smrg ;; 55339d0b5e55Smrg *Sun\ F* | *Sun*Fortran*) 55349d0b5e55Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 55359d0b5e55Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55369d0b5e55Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 55379d0b5e55Smrg ;; 55380cc2eac3Smrg *Sun\ C*) 55390cc2eac3Smrg # Sun C 5.9 55400cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 55410cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55420cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 55430cc2eac3Smrg ;; 55449d0b5e55Smrg *Intel*\ [[CF]]*Compiler*) 55459d0b5e55Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 55469d0b5e55Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 55479d0b5e55Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 55489d0b5e55Smrg ;; 55499d0b5e55Smrg *Portland\ Group*) 55509d0b5e55Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 55519d0b5e55Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 55529d0b5e55Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55539d0b5e55Smrg ;; 5554e120bd27Smrg esac 55556c321187Smrg ;; 55560cc2eac3Smrg esac 55570cc2eac3Smrg ;; 55580cc2eac3Smrg 55590cc2eac3Smrg newsos6) 55600cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 55610cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55620cc2eac3Smrg ;; 55630cc2eac3Smrg 55640cc2eac3Smrg *nto* | *qnx*) 55650cc2eac3Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 55660cc2eac3Smrg # it will coredump. 55670cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 55680cc2eac3Smrg ;; 55690cc2eac3Smrg 55700cc2eac3Smrg osf3* | osf4* | osf5*) 55710cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 55720cc2eac3Smrg # All OSF/1 code is PIC. 55730cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 55740cc2eac3Smrg ;; 55750cc2eac3Smrg 55760cc2eac3Smrg rdos*) 55770cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 55780cc2eac3Smrg ;; 55790cc2eac3Smrg 55800cc2eac3Smrg solaris*) 55810cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 55820cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55830cc2eac3Smrg case $cc_basename in 55840cc2eac3Smrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 55850cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 55860cc2eac3Smrg *) 55870cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 55880cc2eac3Smrg esac 55890cc2eac3Smrg ;; 55900cc2eac3Smrg 55910cc2eac3Smrg sunos4*) 55920cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 55930cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 55940cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55950cc2eac3Smrg ;; 55960cc2eac3Smrg 55970cc2eac3Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 55980cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 55990cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 56000cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 56010cc2eac3Smrg ;; 56020cc2eac3Smrg 56030cc2eac3Smrg sysv4*MP*) 56040cc2eac3Smrg if test -d /usr/nec ;then 56050cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 56060cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 56070cc2eac3Smrg fi 56080cc2eac3Smrg ;; 56090cc2eac3Smrg 56100cc2eac3Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 56110cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 56120cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 56130cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 56140cc2eac3Smrg ;; 56150cc2eac3Smrg 56160cc2eac3Smrg unicos*) 56170cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 56180cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 56190cc2eac3Smrg ;; 56200cc2eac3Smrg 56210cc2eac3Smrg uts4*) 56220cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 56230cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 56240cc2eac3Smrg ;; 56250cc2eac3Smrg 56260cc2eac3Smrg *) 56270cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 56280cc2eac3Smrg ;; 56290cc2eac3Smrg esac 56300cc2eac3Smrg fi 56310cc2eac3Smrg]) 56320cc2eac3Smrgcase $host_os in 56330cc2eac3Smrg # For platforms which do not support PIC, -DPIC is meaningless: 56340cc2eac3Smrg *djgpp*) 56350cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 56360cc2eac3Smrg ;; 56370cc2eac3Smrg *) 56380cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 56390cc2eac3Smrg ;; 56400cc2eac3Smrgesac 56410cc2eac3Smrg 56420cc2eac3SmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 56430cc2eac3Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 56440cc2eac3Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 56450cc2eac3Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 56460cc2eac3Smrg 56470cc2eac3Smrg# 56480cc2eac3Smrg# Check to make sure the PIC flag actually works. 56490cc2eac3Smrg# 56500cc2eac3Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 56510cc2eac3Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 56520cc2eac3Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 56530cc2eac3Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 56540cc2eac3Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 56550cc2eac3Smrg "" | " "*) ;; 56560cc2eac3Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 56570cc2eac3Smrg esac], 56580cc2eac3Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 56590cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 56600cc2eac3Smrgfi 56610cc2eac3Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 56620cc2eac3Smrg [Additional compiler flags for building library objects]) 56630cc2eac3Smrg 56640cc2eac3Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 56650cc2eac3Smrg [How to pass a linker flag through the compiler]) 56660cc2eac3Smrg# 56670cc2eac3Smrg# Check to make sure the static flag actually works. 56680cc2eac3Smrg# 56690cc2eac3Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 56700cc2eac3Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 56710cc2eac3Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 56720cc2eac3Smrg $lt_tmp_static_flag, 56730cc2eac3Smrg [], 56740cc2eac3Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 56750cc2eac3Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 56760cc2eac3Smrg [Compiler flag to prevent dynamic linking]) 56770cc2eac3Smrg])# _LT_COMPILER_PIC 56780cc2eac3Smrg 56790cc2eac3Smrg 56800cc2eac3Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 56810cc2eac3Smrg# ---------------------------- 56820cc2eac3Smrg# See if the linker supports building shared libraries. 56830cc2eac3Smrgm4_defun([_LT_LINKER_SHLIBS], 56840cc2eac3Smrg[AC_REQUIRE([LT_PATH_LD])dnl 56850cc2eac3SmrgAC_REQUIRE([LT_PATH_NM])dnl 56860cc2eac3Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 56870cc2eac3Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 56880cc2eac3Smrgm4_require([_LT_DECL_EGREP])dnl 56890cc2eac3Smrgm4_require([_LT_DECL_SED])dnl 56900cc2eac3Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 56910cc2eac3Smrgm4_require([_LT_TAG_COMPILER])dnl 56920cc2eac3SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 56930cc2eac3Smrgm4_if([$1], [CXX], [ 56940cc2eac3Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 56950cc2eac3Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 56960cc2eac3Smrg case $host_os in 56970cc2eac3Smrg aix[[4-9]]*) 56980cc2eac3Smrg # If we're using GNU nm, then we don't want the "-C" option. 56990cc2eac3Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 57000cc2eac3Smrg # Also, AIX nm treats weak defined symbols like other global defined 57010cc2eac3Smrg # symbols, whereas GNU nm marks them as "W". 57020cc2eac3Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 57030cc2eac3Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 57040cc2eac3Smrg else 57050cc2eac3Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 57060cc2eac3Smrg fi 57070cc2eac3Smrg ;; 57080cc2eac3Smrg pw32*) 57090cc2eac3Smrg _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 57100cc2eac3Smrg ;; 57110cc2eac3Smrg cygwin* | mingw* | cegcc*) 57120cc2eac3Smrg case $cc_basename in 57139d0b5e55Smrg cl*) 57149d0b5e55Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 57159d0b5e55Smrg ;; 57160cc2eac3Smrg *) 57170cc2eac3Smrg _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' 57180cc2eac3Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 57190cc2eac3Smrg ;; 57200cc2eac3Smrg esac 57210cc2eac3Smrg ;; 57220cc2eac3Smrg *) 57230cc2eac3Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 57240cc2eac3Smrg ;; 57250cc2eac3Smrg esac 57260cc2eac3Smrg], [ 57270cc2eac3Smrg runpath_var= 57280cc2eac3Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 57290cc2eac3Smrg _LT_TAGVAR(always_export_symbols, $1)=no 57300cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)= 57310cc2eac3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 57320cc2eac3Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 57330cc2eac3Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 57340cc2eac3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 57350cc2eac3Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 57360cc2eac3Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 57370cc2eac3Smrg _LT_TAGVAR(hardcode_direct, $1)=no 57380cc2eac3Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 57390cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 57400cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 57410cc2eac3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 57420cc2eac3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 57430cc2eac3Smrg _LT_TAGVAR(inherit_rpath, $1)=no 57440cc2eac3Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 57450cc2eac3Smrg _LT_TAGVAR(module_cmds, $1)= 57460cc2eac3Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 57470cc2eac3Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 57480cc2eac3Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 57490cc2eac3Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 57500cc2eac3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 57510cc2eac3Smrg # include_expsyms should be a list of space-separated symbols to be *always* 57520cc2eac3Smrg # included in the symbol list 57530cc2eac3Smrg _LT_TAGVAR(include_expsyms, $1)= 57540cc2eac3Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 57550cc2eac3Smrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 57560cc2eac3Smrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 57570cc2eac3Smrg # as well as any symbol that contains `d'. 57580cc2eac3Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 57590cc2eac3Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 57600cc2eac3Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 57610cc2eac3Smrg # the symbol is explicitly referenced. Since portable code cannot 57620cc2eac3Smrg # rely on this symbol name, it's probably fine to never include it in 57630cc2eac3Smrg # preloaded symbol tables. 57640cc2eac3Smrg # Exclude shared library initialization/finalization symbols. 57650cc2eac3Smrgdnl Note also adjust exclude_expsyms for C++ above. 57660cc2eac3Smrg extract_expsyms_cmds= 57670cc2eac3Smrg 57680cc2eac3Smrg case $host_os in 57690cc2eac3Smrg cygwin* | mingw* | pw32* | cegcc*) 57700cc2eac3Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 57710cc2eac3Smrg # When not using gcc, we currently assume that we are using 57720cc2eac3Smrg # Microsoft Visual C++. 57730cc2eac3Smrg if test "$GCC" != yes; then 57740cc2eac3Smrg with_gnu_ld=no 57750cc2eac3Smrg fi 57760cc2eac3Smrg ;; 57770cc2eac3Smrg interix*) 57780cc2eac3Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 57790cc2eac3Smrg with_gnu_ld=yes 57800cc2eac3Smrg ;; 57810cc2eac3Smrg openbsd*) 57820cc2eac3Smrg with_gnu_ld=no 57830cc2eac3Smrg ;; 57840cc2eac3Smrg esac 57850cc2eac3Smrg 57860cc2eac3Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 57870cc2eac3Smrg 57880cc2eac3Smrg # On some targets, GNU ld is compatible enough with the native linker 57890cc2eac3Smrg # that we're better off using the native interface for both. 57900cc2eac3Smrg lt_use_gnu_ld_interface=no 57910cc2eac3Smrg if test "$with_gnu_ld" = yes; then 57920cc2eac3Smrg case $host_os in 57930cc2eac3Smrg aix*) 57940cc2eac3Smrg # The AIX port of GNU ld has always aspired to compatibility 57950cc2eac3Smrg # with the native linker. However, as the warning in the GNU ld 57960cc2eac3Smrg # block says, versions before 2.19.5* couldn't really create working 57970cc2eac3Smrg # shared libraries, regardless of the interface used. 57980cc2eac3Smrg case `$LD -v 2>&1` in 57990cc2eac3Smrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 58000cc2eac3Smrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 58010cc2eac3Smrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 58020cc2eac3Smrg *) 58030cc2eac3Smrg lt_use_gnu_ld_interface=yes 5804e120bd27Smrg ;; 5805e120bd27Smrg esac 58066c321187Smrg ;; 58070cc2eac3Smrg *) 58080cc2eac3Smrg lt_use_gnu_ld_interface=yes 58090cc2eac3Smrg ;; 58100cc2eac3Smrg esac 58110cc2eac3Smrg fi 58120cc2eac3Smrg 58130cc2eac3Smrg if test "$lt_use_gnu_ld_interface" = yes; then 58140cc2eac3Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 58150cc2eac3Smrg wlarc='${wl}' 58160cc2eac3Smrg 58170cc2eac3Smrg # Set some defaults for GNU ld with shared library support. These 58180cc2eac3Smrg # are reset later if shared libraries are not supported. Putting them 58190cc2eac3Smrg # here allows them to be overridden if necessary. 58200cc2eac3Smrg runpath_var=LD_RUN_PATH 58210cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 58220cc2eac3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 58230cc2eac3Smrg # ancient GNU ld didn't support --whole-archive et. al. 58240cc2eac3Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 58250cc2eac3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 58260cc2eac3Smrg else 58270cc2eac3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 58280cc2eac3Smrg fi 58290cc2eac3Smrg supports_anon_versioning=no 58300cc2eac3Smrg case `$LD -v 2>&1` in 58310cc2eac3Smrg *GNU\ gold*) supports_anon_versioning=yes ;; 58320cc2eac3Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 58330cc2eac3Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 58340cc2eac3Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 58350cc2eac3Smrg *\ 2.11.*) ;; # other 2.11 versions 58360cc2eac3Smrg *) supports_anon_versioning=yes ;; 58370cc2eac3Smrg esac 58380cc2eac3Smrg 58390cc2eac3Smrg # See if GNU ld supports shared libraries. 58400cc2eac3Smrg case $host_os in 58410cc2eac3Smrg aix[[3-9]]*) 58420cc2eac3Smrg # On AIX/PPC, the GNU linker is very broken 58430cc2eac3Smrg if test "$host_cpu" != ia64; then 58440cc2eac3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 58450cc2eac3Smrg cat <<_LT_EOF 1>&2 58460cc2eac3Smrg 58470cc2eac3Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported 58480cc2eac3Smrg*** to be unable to reliably create shared libraries on AIX. 58490cc2eac3Smrg*** Therefore, libtool is disabling shared libraries support. If you 58500cc2eac3Smrg*** really care for shared libraries, you may want to install binutils 58510cc2eac3Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 58520cc2eac3Smrg*** You will then need to restart the configuration process. 58530cc2eac3Smrg 58540cc2eac3Smrg_LT_EOF 58550cc2eac3Smrg fi 58560cc2eac3Smrg ;; 58570cc2eac3Smrg 58580cc2eac3Smrg amigaos*) 58590cc2eac3Smrg case $host_cpu in 58600cc2eac3Smrg powerpc) 58610cc2eac3Smrg # see comment about AmigaOS4 .so support 58620cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 58630cc2eac3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 58640cc2eac3Smrg ;; 58650cc2eac3Smrg m68k) 58660cc2eac3Smrg _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)' 58670cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 58680cc2eac3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 58690cc2eac3Smrg ;; 58700cc2eac3Smrg esac 58710cc2eac3Smrg ;; 58720cc2eac3Smrg 58730cc2eac3Smrg beos*) 58740cc2eac3Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 58750cc2eac3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 58760cc2eac3Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 58770cc2eac3Smrg # support --undefined. This deserves some investigation. FIXME 58780cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 58790cc2eac3Smrg else 58800cc2eac3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 58810cc2eac3Smrg fi 58820cc2eac3Smrg ;; 58830cc2eac3Smrg 58840cc2eac3Smrg cygwin* | mingw* | pw32* | cegcc*) 58850cc2eac3Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 58860cc2eac3Smrg # as there is no search path for DLLs. 58870cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 58880cc2eac3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 58890cc2eac3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 58900cc2eac3Smrg _LT_TAGVAR(always_export_symbols, $1)=no 58910cc2eac3Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 58920cc2eac3Smrg _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' 58930cc2eac3Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 58940cc2eac3Smrg 58950cc2eac3Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 58960cc2eac3Smrg _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' 58970cc2eac3Smrg # If the export-symbols file already is a .def file (1st line 58980cc2eac3Smrg # is EXPORTS), use it as is; otherwise, prepend... 58990cc2eac3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 59000cc2eac3Smrg cp $export_symbols $output_objdir/$soname.def; 59010cc2eac3Smrg else 59020cc2eac3Smrg echo EXPORTS > $output_objdir/$soname.def; 59030cc2eac3Smrg cat $export_symbols >> $output_objdir/$soname.def; 59040cc2eac3Smrg fi~ 59050cc2eac3Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 59060cc2eac3Smrg else 59070cc2eac3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 59080cc2eac3Smrg fi 59090cc2eac3Smrg ;; 59100cc2eac3Smrg 59110cc2eac3Smrg haiku*) 59120cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 59130cc2eac3Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 59140cc2eac3Smrg ;; 59150cc2eac3Smrg 59160cc2eac3Smrg interix[[3-9]]*) 59170cc2eac3Smrg _LT_TAGVAR(hardcode_direct, $1)=no 59180cc2eac3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 59190cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 59200cc2eac3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 59210cc2eac3Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 59220cc2eac3Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 59230cc2eac3Smrg # default) and relocated if they conflict, which is a slow very memory 59240cc2eac3Smrg # consuming and fragmenting process. To avoid this, we pick a random, 59250cc2eac3Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 59260cc2eac3Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 59270cc2eac3Smrg _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' 59280cc2eac3Smrg _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' 59290cc2eac3Smrg ;; 59300cc2eac3Smrg 59310cc2eac3Smrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 59320cc2eac3Smrg tmp_diet=no 59330cc2eac3Smrg if test "$host_os" = linux-dietlibc; then 59340cc2eac3Smrg case $cc_basename in 59350cc2eac3Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 59360cc2eac3Smrg esac 59370cc2eac3Smrg fi 59380cc2eac3Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 59390cc2eac3Smrg && test "$tmp_diet" = no 59400cc2eac3Smrg then 59410cc2eac3Smrg tmp_addflag=' $pic_flag' 59420cc2eac3Smrg tmp_sharedflag='-shared' 59430cc2eac3Smrg case $cc_basename,$host_cpu in 59440cc2eac3Smrg pgcc*) # Portland Group C compiler 59450cc2eac3Smrg _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' 59460cc2eac3Smrg tmp_addflag=' $pic_flag' 59470cc2eac3Smrg ;; 59480cc2eac3Smrg pgf77* | pgf90* | pgf95* | pgfortran*) 59490cc2eac3Smrg # Portland Group f77 and f90 compilers 59500cc2eac3Smrg _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' 59510cc2eac3Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 59520cc2eac3Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 59530cc2eac3Smrg tmp_addflag=' -i_dynamic' ;; 59540cc2eac3Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 59550cc2eac3Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 59560cc2eac3Smrg ifc* | ifort*) # Intel Fortran compiler 59570cc2eac3Smrg tmp_addflag=' -nofor_main' ;; 59580cc2eac3Smrg lf95*) # Lahey Fortran 8.1 59590cc2eac3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 59600cc2eac3Smrg tmp_sharedflag='--shared' ;; 59610cc2eac3Smrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 59620cc2eac3Smrg tmp_sharedflag='-qmkshrobj' 59630cc2eac3Smrg tmp_addflag= ;; 59640cc2eac3Smrg nvcc*) # Cuda Compiler Driver 2.2 59650cc2eac3Smrg _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' 59660cc2eac3Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 59670cc2eac3Smrg ;; 59680cc2eac3Smrg esac 59690cc2eac3Smrg case `$CC -V 2>&1 | sed 5q` in 59700cc2eac3Smrg *Sun\ C*) # Sun C 5.9 59710cc2eac3Smrg _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' 59720cc2eac3Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 59730cc2eac3Smrg tmp_sharedflag='-G' ;; 59740cc2eac3Smrg *Sun\ F*) # Sun Fortran 8.3 59750cc2eac3Smrg tmp_sharedflag='-G' ;; 59760cc2eac3Smrg esac 59770cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 59780cc2eac3Smrg 59790cc2eac3Smrg if test "x$supports_anon_versioning" = xyes; then 59800cc2eac3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 59810cc2eac3Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 59820cc2eac3Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 59830cc2eac3Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 59840cc2eac3Smrg fi 59850cc2eac3Smrg 59860cc2eac3Smrg case $cc_basename in 59870cc2eac3Smrg xlf* | bgf* | bgxlf* | mpixlf*) 59880cc2eac3Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 59890cc2eac3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 59909d0b5e55Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 59910cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 59920cc2eac3Smrg if test "x$supports_anon_versioning" = xyes; then 59930cc2eac3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 59940cc2eac3Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 59950cc2eac3Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 59960cc2eac3Smrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 59970cc2eac3Smrg fi 59980cc2eac3Smrg ;; 59990cc2eac3Smrg esac 60000cc2eac3Smrg else 60010cc2eac3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 60020cc2eac3Smrg fi 60030cc2eac3Smrg ;; 60040cc2eac3Smrg 60050cc2eac3Smrg netbsd*) 60060cc2eac3Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 60070cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 60080cc2eac3Smrg wlarc= 60090cc2eac3Smrg else 60100cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 60110cc2eac3Smrg _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' 60120cc2eac3Smrg fi 60130cc2eac3Smrg ;; 60140cc2eac3Smrg 60150cc2eac3Smrg solaris*) 60160cc2eac3Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 60170cc2eac3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 60180cc2eac3Smrg cat <<_LT_EOF 1>&2 60190cc2eac3Smrg 60200cc2eac3Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 60210cc2eac3Smrg*** create shared libraries on Solaris systems. Therefore, libtool 60220cc2eac3Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 60230cc2eac3Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 60240cc2eac3Smrg*** your PATH or compiler configuration so that the native linker is 60250cc2eac3Smrg*** used, and then restart. 60260cc2eac3Smrg 60270cc2eac3Smrg_LT_EOF 60280cc2eac3Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 60290cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 60300cc2eac3Smrg _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' 60310cc2eac3Smrg else 60320cc2eac3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 60330cc2eac3Smrg fi 60340cc2eac3Smrg ;; 60350cc2eac3Smrg 60360cc2eac3Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 60370cc2eac3Smrg case `$LD -v 2>&1` in 60380cc2eac3Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 60390cc2eac3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 60400cc2eac3Smrg cat <<_LT_EOF 1>&2 60410cc2eac3Smrg 60420cc2eac3Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 60430cc2eac3Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 60440cc2eac3Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 60450cc2eac3Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 60460cc2eac3Smrg*** your PATH or compiler configuration so that the native linker is 60470cc2eac3Smrg*** used, and then restart. 60480cc2eac3Smrg 60490cc2eac3Smrg_LT_EOF 60500cc2eac3Smrg ;; 60510cc2eac3Smrg *) 60520cc2eac3Smrg # For security reasons, it is highly recommended that you always 60530cc2eac3Smrg # use absolute paths for naming shared libraries, and exclude the 60540cc2eac3Smrg # DT_RUNPATH tag from executables and libraries. But doing so 60550cc2eac3Smrg # requires that you compile everything twice, which is a pain. 60560cc2eac3Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 60570cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 60580cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 60590cc2eac3Smrg _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' 60600cc2eac3Smrg else 60610cc2eac3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 60620cc2eac3Smrg fi 60630cc2eac3Smrg ;; 60640cc2eac3Smrg esac 60650cc2eac3Smrg ;; 60660cc2eac3Smrg 60670cc2eac3Smrg sunos4*) 60680cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 60690cc2eac3Smrg wlarc= 60700cc2eac3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 60710cc2eac3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60720cc2eac3Smrg ;; 60730cc2eac3Smrg 60740cc2eac3Smrg *) 60750cc2eac3Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 60760cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 60770cc2eac3Smrg _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' 60780cc2eac3Smrg else 60790cc2eac3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 60800cc2eac3Smrg fi 60810cc2eac3Smrg ;; 60820cc2eac3Smrg esac 60830cc2eac3Smrg 60840cc2eac3Smrg if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 60850cc2eac3Smrg runpath_var= 60860cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 60870cc2eac3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 60880cc2eac3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 60890cc2eac3Smrg fi 60900cc2eac3Smrg else 60910cc2eac3Smrg # PORTME fill in a description of your system's linker (not GNU ld) 60920cc2eac3Smrg case $host_os in 60930cc2eac3Smrg aix3*) 60940cc2eac3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 60950cc2eac3Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 60960cc2eac3Smrg _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' 60970cc2eac3Smrg # Note: this linker hardcodes the directories in LIBPATH if there 60980cc2eac3Smrg # are no directories specified by -L. 60990cc2eac3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 61000cc2eac3Smrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 61010cc2eac3Smrg # Neither direct hardcoding nor static linking is supported with a 61020cc2eac3Smrg # broken collect2. 61030cc2eac3Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 61040cc2eac3Smrg fi 61050cc2eac3Smrg ;; 61060cc2eac3Smrg 61070cc2eac3Smrg aix[[4-9]]*) 61080cc2eac3Smrg if test "$host_cpu" = ia64; then 61090cc2eac3Smrg # On IA64, the linker does run time linking by default, so we don't 61100cc2eac3Smrg # have to do anything special. 61110cc2eac3Smrg aix_use_runtimelinking=no 61120cc2eac3Smrg exp_sym_flag='-Bexport' 61130cc2eac3Smrg no_entry_flag="" 61140cc2eac3Smrg else 61150cc2eac3Smrg # If we're using GNU nm, then we don't want the "-C" option. 61160cc2eac3Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 61170cc2eac3Smrg # Also, AIX nm treats weak defined symbols like other global 61180cc2eac3Smrg # defined symbols, whereas GNU nm marks them as "W". 61190cc2eac3Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 61200cc2eac3Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 61210cc2eac3Smrg else 61220cc2eac3Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 61230cc2eac3Smrg fi 61240cc2eac3Smrg aix_use_runtimelinking=no 61250cc2eac3Smrg 61260cc2eac3Smrg # Test if we are trying to use run time linking or normal 61270cc2eac3Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 61280cc2eac3Smrg # need to do runtime linking. 61290cc2eac3Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 61300cc2eac3Smrg for ld_flag in $LDFLAGS; do 61310cc2eac3Smrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 61320cc2eac3Smrg aix_use_runtimelinking=yes 61330cc2eac3Smrg break 61340cc2eac3Smrg fi 61350cc2eac3Smrg done 61360cc2eac3Smrg ;; 61370cc2eac3Smrg esac 61380cc2eac3Smrg 61390cc2eac3Smrg exp_sym_flag='-bexport' 61400cc2eac3Smrg no_entry_flag='-bnoentry' 61410cc2eac3Smrg fi 61420cc2eac3Smrg 61430cc2eac3Smrg # When large executables or shared objects are built, AIX ld can 61440cc2eac3Smrg # have problems creating the table of contents. If linking a library 61450cc2eac3Smrg # or program results in "error TOC overflow" add -mminimal-toc to 61460cc2eac3Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 61470cc2eac3Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 61480cc2eac3Smrg 61490cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='' 61500cc2eac3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 61510cc2eac3Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 61520cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 61530cc2eac3Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 61540cc2eac3Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 61550cc2eac3Smrg 61560cc2eac3Smrg if test "$GCC" = yes; then 61570cc2eac3Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 61580cc2eac3Smrg # We only want to do this on AIX 4.2 and lower, the check 61590cc2eac3Smrg # below for broken collect2 doesn't work under 4.3+ 61600cc2eac3Smrg collect2name=`${CC} -print-prog-name=collect2` 61610cc2eac3Smrg if test -f "$collect2name" && 61620cc2eac3Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 61630cc2eac3Smrg then 61640cc2eac3Smrg # We have reworked collect2 61650cc2eac3Smrg : 61660cc2eac3Smrg else 61670cc2eac3Smrg # We have old collect2 61680cc2eac3Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 61690cc2eac3Smrg # It fails to find uninstalled libraries when the uninstalled 61700cc2eac3Smrg # path is not listed in the libpath. Setting hardcode_minus_L 61710cc2eac3Smrg # to unsupported forces relinking 61720cc2eac3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 61730cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 61740cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 61750cc2eac3Smrg fi 61760cc2eac3Smrg ;; 61770cc2eac3Smrg esac 61780cc2eac3Smrg shared_flag='-shared' 61790cc2eac3Smrg if test "$aix_use_runtimelinking" = yes; then 61800cc2eac3Smrg shared_flag="$shared_flag "'${wl}-G' 61810cc2eac3Smrg fi 61820cc2eac3Smrg else 61830cc2eac3Smrg # not using gcc 61840cc2eac3Smrg if test "$host_cpu" = ia64; then 61850cc2eac3Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 61860cc2eac3Smrg # chokes on -Wl,-G. The following line is correct: 61870cc2eac3Smrg shared_flag='-G' 61880cc2eac3Smrg else 61890cc2eac3Smrg if test "$aix_use_runtimelinking" = yes; then 61900cc2eac3Smrg shared_flag='${wl}-G' 61910cc2eac3Smrg else 61920cc2eac3Smrg shared_flag='${wl}-bM:SRE' 61930cc2eac3Smrg fi 61940cc2eac3Smrg fi 61950cc2eac3Smrg fi 61960cc2eac3Smrg 61970cc2eac3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 61980cc2eac3Smrg # It seems that -bexpall does not export symbols beginning with 61990cc2eac3Smrg # underscore (_), so it is better to generate a list of symbols to export. 62000cc2eac3Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 62010cc2eac3Smrg if test "$aix_use_runtimelinking" = yes; then 62020cc2eac3Smrg # Warning - without using the other runtime loading flags (-brtl), 62030cc2eac3Smrg # -berok will link without error, but may produce a broken library. 62040cc2eac3Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 62050cc2eac3Smrg # Determine the default libpath from the value encoded in an 62060cc2eac3Smrg # empty executable. 62070cc2eac3Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 62080cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 62090cc2eac3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 62100cc2eac3Smrg else 62110cc2eac3Smrg if test "$host_cpu" = ia64; then 62120cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 62130cc2eac3Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 62140cc2eac3Smrg _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" 62150cc2eac3Smrg else 62160cc2eac3Smrg # Determine the default libpath from the value encoded in an 62170cc2eac3Smrg # empty executable. 62180cc2eac3Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 62190cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 62200cc2eac3Smrg # Warning - without using the other run time loading flags, 62210cc2eac3Smrg # -berok will link without error, but may produce a broken library. 62220cc2eac3Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 62230cc2eac3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 62240cc2eac3Smrg if test "$with_gnu_ld" = yes; then 62250cc2eac3Smrg # We only use this code for GNU lds that support --whole-archive. 62260cc2eac3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 62270cc2eac3Smrg else 62280cc2eac3Smrg # Exported symbols can be pulled into shared objects from archives 62290cc2eac3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 62300cc2eac3Smrg fi 62310cc2eac3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 62320cc2eac3Smrg # This is similar to how AIX traditionally builds its shared libraries. 62330cc2eac3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' 62340cc2eac3Smrg fi 62350cc2eac3Smrg fi 62360cc2eac3Smrg ;; 62370cc2eac3Smrg 62380cc2eac3Smrg amigaos*) 62390cc2eac3Smrg case $host_cpu in 62400cc2eac3Smrg powerpc) 62410cc2eac3Smrg # see comment about AmigaOS4 .so support 62420cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 62430cc2eac3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 62440cc2eac3Smrg ;; 62450cc2eac3Smrg m68k) 62460cc2eac3Smrg _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)' 62470cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 62480cc2eac3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 62490cc2eac3Smrg ;; 62500cc2eac3Smrg esac 62510cc2eac3Smrg ;; 62520cc2eac3Smrg 62530cc2eac3Smrg bsdi[[45]]*) 62540cc2eac3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 62550cc2eac3Smrg ;; 62560cc2eac3Smrg 62570cc2eac3Smrg cygwin* | mingw* | pw32* | cegcc*) 62580cc2eac3Smrg # When not using gcc, we currently assume that we are using 62590cc2eac3Smrg # Microsoft Visual C++. 62600cc2eac3Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 62610cc2eac3Smrg # no search path for DLLs. 62620cc2eac3Smrg case $cc_basename in 62630cc2eac3Smrg cl*) 62640cc2eac3Smrg # Native MSVC 62650cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 62660cc2eac3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 62670cc2eac3Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 62680cc2eac3Smrg _LT_TAGVAR(file_list_spec, $1)='@' 62690cc2eac3Smrg # Tell ltmain to make .lib files, not .a files. 62700cc2eac3Smrg libext=lib 62710cc2eac3Smrg # Tell ltmain to make .dll files, not .so files. 62720cc2eac3Smrg shrext_cmds=".dll" 62730cc2eac3Smrg # FIXME: Setting linknames here is a bad hack. 62740cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 62750cc2eac3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 62760cc2eac3Smrg sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 62770cc2eac3Smrg else 62780cc2eac3Smrg sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 62790cc2eac3Smrg fi~ 62800cc2eac3Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 62810cc2eac3Smrg linknames=' 62820cc2eac3Smrg # The linker will not automatically build a static lib if we build a DLL. 62830cc2eac3Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 62840cc2eac3Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 62859d0b5e55Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 62860cc2eac3Smrg _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' 62870cc2eac3Smrg # Don't use ranlib 62880cc2eac3Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 62890cc2eac3Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 62900cc2eac3Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 62910cc2eac3Smrg case $lt_outputfile in 62920cc2eac3Smrg *.exe|*.EXE) ;; 62930cc2eac3Smrg *) 62940cc2eac3Smrg lt_outputfile="$lt_outputfile.exe" 62950cc2eac3Smrg lt_tool_outputfile="$lt_tool_outputfile.exe" 62960cc2eac3Smrg ;; 62970cc2eac3Smrg esac~ 62980cc2eac3Smrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 62990cc2eac3Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 63000cc2eac3Smrg $RM "$lt_outputfile.manifest"; 63010cc2eac3Smrg fi' 63020cc2eac3Smrg ;; 63030cc2eac3Smrg *) 63040cc2eac3Smrg # Assume MSVC wrapper 63050cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 63060cc2eac3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 63070cc2eac3Smrg # Tell ltmain to make .lib files, not .a files. 63080cc2eac3Smrg libext=lib 63090cc2eac3Smrg # Tell ltmain to make .dll files, not .so files. 63100cc2eac3Smrg shrext_cmds=".dll" 63110cc2eac3Smrg # FIXME: Setting linknames here is a bad hack. 63120cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 63130cc2eac3Smrg # The linker will automatically build a .lib file if we build a DLL. 63140cc2eac3Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 63150cc2eac3Smrg # FIXME: Should let the user specify the lib program. 63160cc2eac3Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 63170cc2eac3Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 63180cc2eac3Smrg ;; 63190cc2eac3Smrg esac 63200cc2eac3Smrg ;; 63210cc2eac3Smrg 63220cc2eac3Smrg darwin* | rhapsody*) 63230cc2eac3Smrg _LT_DARWIN_LINKER_FEATURES($1) 63240cc2eac3Smrg ;; 63250cc2eac3Smrg 63260cc2eac3Smrg dgux*) 63270cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 63280cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 63290cc2eac3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 63300cc2eac3Smrg ;; 63310cc2eac3Smrg 63320cc2eac3Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 63330cc2eac3Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 63340cc2eac3Smrg # does not break anything, and helps significantly (at the cost of a little 63350cc2eac3Smrg # extra space). 63360cc2eac3Smrg freebsd2.2*) 63370cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 63380cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 63390cc2eac3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 63400cc2eac3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 63410cc2eac3Smrg ;; 63420cc2eac3Smrg 63430cc2eac3Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 63449d0b5e55Smrg freebsd2.*) 63450cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 63460cc2eac3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 63470cc2eac3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 63480cc2eac3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 63490cc2eac3Smrg ;; 63500cc2eac3Smrg 63510cc2eac3Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 63520cc2eac3Smrg freebsd* | dragonfly*) 63530cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 63540cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 63550cc2eac3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 63560cc2eac3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 63570cc2eac3Smrg ;; 63580cc2eac3Smrg 63590cc2eac3Smrg hpux9*) 63600cc2eac3Smrg if test "$GCC" = yes; then 63610cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 63620cc2eac3Smrg else 63630cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 63640cc2eac3Smrg fi 63650cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 63660cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 63670cc2eac3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 63680cc2eac3Smrg 63690cc2eac3Smrg # hardcode_minus_L: Not really in the search PATH, 63700cc2eac3Smrg # but as the default location of the library. 63710cc2eac3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 63720cc2eac3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 63730cc2eac3Smrg ;; 63740cc2eac3Smrg 63750cc2eac3Smrg hpux10*) 63760cc2eac3Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 63770cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 63780cc2eac3Smrg else 63790cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 63800cc2eac3Smrg fi 63810cc2eac3Smrg if test "$with_gnu_ld" = no; then 63820cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 63830cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 63840cc2eac3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 63850cc2eac3Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 63860cc2eac3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 63870cc2eac3Smrg # hardcode_minus_L: Not really in the search PATH, 63880cc2eac3Smrg # but as the default location of the library. 63890cc2eac3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 63900cc2eac3Smrg fi 63910cc2eac3Smrg ;; 63920cc2eac3Smrg 63930cc2eac3Smrg hpux11*) 63940cc2eac3Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 63950cc2eac3Smrg case $host_cpu in 63960cc2eac3Smrg hppa*64*) 63970cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 63980cc2eac3Smrg ;; 63990cc2eac3Smrg ia64*) 64000cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 64010cc2eac3Smrg ;; 64020cc2eac3Smrg *) 64030cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 64040cc2eac3Smrg ;; 64050cc2eac3Smrg esac 64060cc2eac3Smrg else 64070cc2eac3Smrg case $host_cpu in 64080cc2eac3Smrg hppa*64*) 64090cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 64100cc2eac3Smrg ;; 64110cc2eac3Smrg ia64*) 64120cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 64130cc2eac3Smrg ;; 64140cc2eac3Smrg *) 64150cc2eac3Smrg m4_if($1, [], [ 64160cc2eac3Smrg # Older versions of the 11.00 compiler do not understand -b yet 64170cc2eac3Smrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 64180cc2eac3Smrg _LT_LINKER_OPTION([if $CC understands -b], 64190cc2eac3Smrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 64200cc2eac3Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 64210cc2eac3Smrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 64220cc2eac3Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 64230cc2eac3Smrg ;; 64240cc2eac3Smrg esac 64250cc2eac3Smrg fi 64260cc2eac3Smrg if test "$with_gnu_ld" = no; then 64270cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 64280cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 64290cc2eac3Smrg 64300cc2eac3Smrg case $host_cpu in 64310cc2eac3Smrg hppa*64*|ia64*) 64320cc2eac3Smrg _LT_TAGVAR(hardcode_direct, $1)=no 64330cc2eac3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 64340cc2eac3Smrg ;; 64350cc2eac3Smrg *) 64360cc2eac3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 64370cc2eac3Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 64380cc2eac3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 64390cc2eac3Smrg 64400cc2eac3Smrg # hardcode_minus_L: Not really in the search PATH, 64410cc2eac3Smrg # but as the default location of the library. 64420cc2eac3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 64430cc2eac3Smrg ;; 64440cc2eac3Smrg esac 64450cc2eac3Smrg fi 64460cc2eac3Smrg ;; 64470cc2eac3Smrg 64480cc2eac3Smrg irix5* | irix6* | nonstopux*) 64490cc2eac3Smrg if test "$GCC" = yes; then 64500cc2eac3Smrg _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' 64510cc2eac3Smrg # Try to use the -exported_symbol ld option, if it does not 64520cc2eac3Smrg # work, assume that -exports_file does not work either and 64530cc2eac3Smrg # implicitly export all symbols. 64540cc2eac3Smrg # This should be the same for all languages, so no per-tag cache variable. 64550cc2eac3Smrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 64560cc2eac3Smrg [lt_cv_irix_exported_symbol], 64570cc2eac3Smrg [save_LDFLAGS="$LDFLAGS" 64580cc2eac3Smrg LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 64590cc2eac3Smrg AC_LINK_IFELSE( 64600cc2eac3Smrg [AC_LANG_SOURCE( 64610cc2eac3Smrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 64620cc2eac3Smrg [C++], [[int foo (void) { return 0; }]], 64630cc2eac3Smrg [Fortran 77], [[ 64640cc2eac3Smrg subroutine foo 64650cc2eac3Smrg end]], 64660cc2eac3Smrg [Fortran], [[ 64670cc2eac3Smrg subroutine foo 64680cc2eac3Smrg end]])])], 64690cc2eac3Smrg [lt_cv_irix_exported_symbol=yes], 64700cc2eac3Smrg [lt_cv_irix_exported_symbol=no]) 64710cc2eac3Smrg LDFLAGS="$save_LDFLAGS"]) 64720cc2eac3Smrg if test "$lt_cv_irix_exported_symbol" = yes; then 64730cc2eac3Smrg _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' 64740cc2eac3Smrg fi 64750cc2eac3Smrg else 64760cc2eac3Smrg _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' 64770cc2eac3Smrg _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' 64780cc2eac3Smrg fi 64790cc2eac3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 64800cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 64810cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 64820cc2eac3Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 64830cc2eac3Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 64840cc2eac3Smrg ;; 64850cc2eac3Smrg 64860cc2eac3Smrg netbsd*) 64870cc2eac3Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 64880cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 64890cc2eac3Smrg else 64900cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 64910cc2eac3Smrg fi 64920cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 64930cc2eac3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 64940cc2eac3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 64950cc2eac3Smrg ;; 64960cc2eac3Smrg 64970cc2eac3Smrg newsos6) 64980cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 64990cc2eac3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 65000cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 65010cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 65020cc2eac3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 65030cc2eac3Smrg ;; 65040cc2eac3Smrg 65050cc2eac3Smrg *nto* | *qnx*) 65060cc2eac3Smrg ;; 65070cc2eac3Smrg 65080cc2eac3Smrg openbsd*) 65090cc2eac3Smrg if test -f /usr/libexec/ld.so; then 65100cc2eac3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 65110cc2eac3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 65120cc2eac3Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 65130cc2eac3Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 65140cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 65150cc2eac3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 65160cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 65170cc2eac3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 65180cc2eac3Smrg else 65190cc2eac3Smrg case $host_os in 65200cc2eac3Smrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 65210cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 65220cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 65230cc2eac3Smrg ;; 65240cc2eac3Smrg *) 65250cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 65260cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 65270cc2eac3Smrg ;; 65280cc2eac3Smrg esac 65290cc2eac3Smrg fi 65300cc2eac3Smrg else 65310cc2eac3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 65320cc2eac3Smrg fi 65330cc2eac3Smrg ;; 65340cc2eac3Smrg 65350cc2eac3Smrg os2*) 65360cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 65370cc2eac3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 65380cc2eac3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 65390cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' 65400cc2eac3Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 65410cc2eac3Smrg ;; 65420cc2eac3Smrg 65430cc2eac3Smrg osf3*) 65440cc2eac3Smrg if test "$GCC" = yes; then 65450cc2eac3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 65460cc2eac3Smrg _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' 65470cc2eac3Smrg else 65480cc2eac3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 65490cc2eac3Smrg _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' 65500cc2eac3Smrg fi 65510cc2eac3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 65520cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 65530cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 65540cc2eac3Smrg ;; 65550cc2eac3Smrg 65560cc2eac3Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 65570cc2eac3Smrg if test "$GCC" = yes; then 65580cc2eac3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 65590cc2eac3Smrg _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' 65600cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 65610cc2eac3Smrg else 65620cc2eac3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 65630cc2eac3Smrg _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' 65640cc2eac3Smrg _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~ 65650cc2eac3Smrg $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' 65660cc2eac3Smrg 65670cc2eac3Smrg # Both c and cxx compiler support -rpath directly 65680cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 65690cc2eac3Smrg fi 65700cc2eac3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 65710cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 65720cc2eac3Smrg ;; 65730cc2eac3Smrg 65740cc2eac3Smrg solaris*) 65750cc2eac3Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 65760cc2eac3Smrg if test "$GCC" = yes; then 65770cc2eac3Smrg wlarc='${wl}' 65780cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 65790cc2eac3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 65800cc2eac3Smrg $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' 65810cc2eac3Smrg else 65820cc2eac3Smrg case `$CC -V 2>&1` in 65830cc2eac3Smrg *"Compilers 5.0"*) 65840cc2eac3Smrg wlarc='' 65850cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 65860cc2eac3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 65870cc2eac3Smrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 65880cc2eac3Smrg ;; 65890cc2eac3Smrg *) 65900cc2eac3Smrg wlarc='${wl}' 65910cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 65920cc2eac3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 65930cc2eac3Smrg $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 65940cc2eac3Smrg ;; 6595e120bd27Smrg esac 65960cc2eac3Smrg fi 65970cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 65980cc2eac3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 65990cc2eac3Smrg case $host_os in 66000cc2eac3Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 66016c321187Smrg *) 66020cc2eac3Smrg # The compiler driver will combine and reorder linker options, 66030cc2eac3Smrg # but understands `-z linker_flag'. GCC discards it without `$wl', 66040cc2eac3Smrg # but is careful enough not to reorder. 66050cc2eac3Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 66060cc2eac3Smrg if test "$GCC" = yes; then 66070cc2eac3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 66080cc2eac3Smrg else 66090cc2eac3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 66100cc2eac3Smrg fi 66116c321187Smrg ;; 66120cc2eac3Smrg esac 66130cc2eac3Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 66140cc2eac3Smrg ;; 66156c321187Smrg 66160cc2eac3Smrg sunos4*) 66170cc2eac3Smrg if test "x$host_vendor" = xsequent; then 66180cc2eac3Smrg # Use $CC to link under sequent, because it throws in some extra .o 66190cc2eac3Smrg # files that make .init and .fini sections work. 66200cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 66210cc2eac3Smrg else 66220cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 6623e120bd27Smrg fi 66240cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 66250cc2eac3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 66260cc2eac3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 66270cc2eac3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6628e120bd27Smrg ;; 66296c321187Smrg 66300cc2eac3Smrg sysv4) 66310cc2eac3Smrg case $host_vendor in 66320cc2eac3Smrg sni) 66330cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 66340cc2eac3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 66350cc2eac3Smrg ;; 66360cc2eac3Smrg siemens) 66370cc2eac3Smrg ## LD is ld it makes a PLAMLIB 66380cc2eac3Smrg ## CC just makes a GrossModule. 66390cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 66400cc2eac3Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 66410cc2eac3Smrg _LT_TAGVAR(hardcode_direct, $1)=no 6642e120bd27Smrg ;; 66430cc2eac3Smrg motorola) 66440cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 66450cc2eac3Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 66460cc2eac3Smrg ;; 6647e120bd27Smrg esac 66480cc2eac3Smrg runpath_var='LD_RUN_PATH' 66490cc2eac3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6650e120bd27Smrg ;; 66516c321187Smrg 66520cc2eac3Smrg sysv4.3*) 66530cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 66540cc2eac3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 66550cc2eac3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 6656e120bd27Smrg ;; 66576c321187Smrg 66580cc2eac3Smrg sysv4*MP*) 66590cc2eac3Smrg if test -d /usr/nec; then 66600cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 66610cc2eac3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 66620cc2eac3Smrg runpath_var=LD_RUN_PATH 66630cc2eac3Smrg hardcode_runpath_var=yes 66640cc2eac3Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 66650cc2eac3Smrg fi 6666e120bd27Smrg ;; 66676c321187Smrg 66680cc2eac3Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 66690cc2eac3Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 66700cc2eac3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 66710cc2eac3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 66720cc2eac3Smrg runpath_var='LD_RUN_PATH' 66730cc2eac3Smrg 66740cc2eac3Smrg if test "$GCC" = yes; then 66750cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 66760cc2eac3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 66770cc2eac3Smrg else 66780cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 66790cc2eac3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 66800cc2eac3Smrg fi 6681e120bd27Smrg ;; 66826c321187Smrg 66830cc2eac3Smrg sysv5* | sco3.2v5* | sco5v6*) 66840cc2eac3Smrg # Note: We can NOT use -z defs as we might desire, because we do not 66850cc2eac3Smrg # link with -lc, and that would cause any symbols used from libc to 66860cc2eac3Smrg # always be unresolved, which means just about no library would 66870cc2eac3Smrg # ever link correctly. If we're not using GNU ld we use -z text 66880cc2eac3Smrg # though, which does catch some bad symbols but isn't as heavy-handed 66890cc2eac3Smrg # as -z defs. 66900cc2eac3Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 66910cc2eac3Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 66920cc2eac3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 66930cc2eac3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 66940cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 66950cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 66960cc2eac3Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 66970cc2eac3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 66980cc2eac3Smrg runpath_var='LD_RUN_PATH' 66990cc2eac3Smrg 67000cc2eac3Smrg if test "$GCC" = yes; then 67010cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 67020cc2eac3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 67030cc2eac3Smrg else 67040cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 67050cc2eac3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 67060cc2eac3Smrg fi 6707e120bd27Smrg ;; 67086c321187Smrg 67090cc2eac3Smrg uts4*) 67100cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 67110cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 67120cc2eac3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 67130cc2eac3Smrg ;; 67140cc2eac3Smrg 67150cc2eac3Smrg *) 67160cc2eac3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 67170cc2eac3Smrg ;; 67180cc2eac3Smrg esac 67190cc2eac3Smrg 67200cc2eac3Smrg if test x$host_vendor = xsni; then 67210cc2eac3Smrg case $host in 67220cc2eac3Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 67230cc2eac3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 67246c321187Smrg ;; 6725e120bd27Smrg esac 67260cc2eac3Smrg fi 67270cc2eac3Smrg fi 67280cc2eac3Smrg]) 67290cc2eac3SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 67300cc2eac3Smrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 6731e120bd27Smrg 67320cc2eac3Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 67330cc2eac3Smrg 67340cc2eac3Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 67350cc2eac3Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 67360cc2eac3Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 67370cc2eac3Smrg [The commands to extract the exported symbol list from a shared archive]) 67380cc2eac3Smrg 67390cc2eac3Smrg# 67400cc2eac3Smrg# Do we need to explicitly link libc? 67410cc2eac3Smrg# 67420cc2eac3Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 67430cc2eac3Smrgx|xyes) 67440cc2eac3Smrg # Assume -lc should be added 67450cc2eac3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 67460cc2eac3Smrg 67470cc2eac3Smrg if test "$enable_shared" = yes && test "$GCC" = yes; then 67480cc2eac3Smrg case $_LT_TAGVAR(archive_cmds, $1) in 67490cc2eac3Smrg *'~'*) 67500cc2eac3Smrg # FIXME: we may have to deal with multi-command sequences. 6751e120bd27Smrg ;; 67520cc2eac3Smrg '$CC '*) 67530cc2eac3Smrg # Test whether the compiler implicitly links with -lc since on some 67540cc2eac3Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 67550cc2eac3Smrg # to ld, don't add -lc before -lgcc. 67560cc2eac3Smrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 67570cc2eac3Smrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 67580cc2eac3Smrg [$RM conftest* 67590cc2eac3Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 6760e120bd27Smrg 67610cc2eac3Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 67620cc2eac3Smrg soname=conftest 67630cc2eac3Smrg lib=conftest 67640cc2eac3Smrg libobjs=conftest.$ac_objext 67650cc2eac3Smrg deplibs= 67660cc2eac3Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 67670cc2eac3Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 67680cc2eac3Smrg compiler_flags=-v 67690cc2eac3Smrg linker_flags=-v 67700cc2eac3Smrg verstring= 67710cc2eac3Smrg output_objdir=. 67720cc2eac3Smrg libname=conftest 67730cc2eac3Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 67740cc2eac3Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 67750cc2eac3Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 67760cc2eac3Smrg then 67770cc2eac3Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 67780cc2eac3Smrg else 67790cc2eac3Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 67800cc2eac3Smrg fi 67810cc2eac3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 67820cc2eac3Smrg else 67830cc2eac3Smrg cat conftest.err 1>&5 67840cc2eac3Smrg fi 67850cc2eac3Smrg $RM conftest* 67860cc2eac3Smrg ]) 67870cc2eac3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 6788e120bd27Smrg ;; 67890cc2eac3Smrg esac 67900cc2eac3Smrg fi 67910cc2eac3Smrg ;; 67920cc2eac3Smrgesac 6793e120bd27Smrg 67940cc2eac3Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 67950cc2eac3Smrg [Whether or not to add -lc for building shared libraries]) 67960cc2eac3Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 67970cc2eac3Smrg [enable_shared_with_static_runtimes], [0], 67980cc2eac3Smrg [Whether or not to disallow shared libs when runtime libs are static]) 67990cc2eac3Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 68000cc2eac3Smrg [Compiler flag to allow reflexive dlopens]) 68010cc2eac3Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 68020cc2eac3Smrg [Compiler flag to generate shared objects directly from archives]) 68030cc2eac3Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 68040cc2eac3Smrg [Whether the compiler copes with passing no objects directly]) 68050cc2eac3Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 68060cc2eac3Smrg [Create an old-style archive from a shared archive]) 68070cc2eac3Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 68080cc2eac3Smrg [Create a temporary old-style archive to link instead of a shared archive]) 68090cc2eac3Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 68100cc2eac3Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 68110cc2eac3Smrg_LT_TAGDECL([], [module_cmds], [2], 68120cc2eac3Smrg [Commands used to build a loadable module if different from building 68130cc2eac3Smrg a shared archive.]) 68140cc2eac3Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 68150cc2eac3Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 68160cc2eac3Smrg [Whether we are building with GNU ld or not]) 68170cc2eac3Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 68180cc2eac3Smrg [Flag that allows shared libraries with undefined symbols to be built]) 68190cc2eac3Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 68200cc2eac3Smrg [Flag that enforces no undefined symbols]) 68210cc2eac3Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 68220cc2eac3Smrg [Flag to hardcode $libdir into a binary during linking. 68230cc2eac3Smrg This must work even if $libdir does not exist]) 68240cc2eac3Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 68250cc2eac3Smrg [Whether we need a single "-rpath" flag with a separated argument]) 68260cc2eac3Smrg_LT_TAGDECL([], [hardcode_direct], [0], 68270cc2eac3Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 68280cc2eac3Smrg DIR into the resulting binary]) 68290cc2eac3Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 68300cc2eac3Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 68310cc2eac3Smrg DIR into the resulting binary and the resulting library dependency is 68320cc2eac3Smrg "absolute", i.e impossible to change by setting ${shlibpath_var} if the 68330cc2eac3Smrg library is relocated]) 68340cc2eac3Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 68350cc2eac3Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 68360cc2eac3Smrg into the resulting binary]) 68370cc2eac3Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 68380cc2eac3Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 68390cc2eac3Smrg into the resulting binary]) 68400cc2eac3Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 68410cc2eac3Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 68420cc2eac3Smrg into the library and all subsequent libraries and executables linked 68430cc2eac3Smrg against it]) 68440cc2eac3Smrg_LT_TAGDECL([], [inherit_rpath], [0], 68450cc2eac3Smrg [Set to yes if linker adds runtime paths of dependent libraries 68460cc2eac3Smrg to runtime path list]) 68470cc2eac3Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 68480cc2eac3Smrg [Whether libtool must link a program against all its dependency libraries]) 68490cc2eac3Smrg_LT_TAGDECL([], [always_export_symbols], [0], 68500cc2eac3Smrg [Set to "yes" if exported symbols are required]) 68510cc2eac3Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 68520cc2eac3Smrg [The commands to list exported symbols]) 68530cc2eac3Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 68540cc2eac3Smrg [Symbols that should not be listed in the preloaded symbols]) 68550cc2eac3Smrg_LT_TAGDECL([], [include_expsyms], [1], 68560cc2eac3Smrg [Symbols that must always be exported]) 68570cc2eac3Smrg_LT_TAGDECL([], [prelink_cmds], [2], 68580cc2eac3Smrg [Commands necessary for linking programs (against libraries) with templates]) 68590cc2eac3Smrg_LT_TAGDECL([], [postlink_cmds], [2], 68600cc2eac3Smrg [Commands necessary for finishing linking programs]) 68610cc2eac3Smrg_LT_TAGDECL([], [file_list_spec], [1], 68620cc2eac3Smrg [Specify filename containing input files]) 68630cc2eac3Smrgdnl FIXME: Not yet implemented 68640cc2eac3Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 68650cc2eac3Smrgdnl [Compiler flag to generate thread safe objects]) 68660cc2eac3Smrg])# _LT_LINKER_SHLIBS 6867e120bd27Smrg 6868e120bd27Smrg 68690cc2eac3Smrg# _LT_LANG_C_CONFIG([TAG]) 68700cc2eac3Smrg# ------------------------ 68710cc2eac3Smrg# Ensure that the configuration variables for a C compiler are suitably 68720cc2eac3Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 68730cc2eac3Smrg# the compiler configuration to `libtool'. 68740cc2eac3Smrgm4_defun([_LT_LANG_C_CONFIG], 68750cc2eac3Smrg[m4_require([_LT_DECL_EGREP])dnl 68760cc2eac3Smrglt_save_CC="$CC" 68770cc2eac3SmrgAC_LANG_PUSH(C) 68786c321187Smrg 68790cc2eac3Smrg# Source file extension for C test sources. 68800cc2eac3Smrgac_ext=c 6881e120bd27Smrg 68820cc2eac3Smrg# Object file extension for compiled C test sources. 68830cc2eac3Smrgobjext=o 68840cc2eac3Smrg_LT_TAGVAR(objext, $1)=$objext 6885e120bd27Smrg 68860cc2eac3Smrg# Code to be used in simple compile tests 68870cc2eac3Smrglt_simple_compile_test_code="int some_variable = 0;" 6888e120bd27Smrg 68890cc2eac3Smrg# Code to be used in simple link tests 68900cc2eac3Smrglt_simple_link_test_code='int main(){return(0);}' 6891e120bd27Smrg 68920cc2eac3Smrg_LT_TAG_COMPILER 68930cc2eac3Smrg# Save the default compiler, since it gets overwritten when the other 68940cc2eac3Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 68950cc2eac3Smrgcompiler_DEFAULT=$CC 68966c321187Smrg 68970cc2eac3Smrg# save warnings/boilerplate of simple test code 68980cc2eac3Smrg_LT_COMPILER_BOILERPLATE 68990cc2eac3Smrg_LT_LINKER_BOILERPLATE 69006c321187Smrg 69010cc2eac3Smrgif test -n "$compiler"; then 69020cc2eac3Smrg _LT_COMPILER_NO_RTTI($1) 69030cc2eac3Smrg _LT_COMPILER_PIC($1) 69040cc2eac3Smrg _LT_COMPILER_C_O($1) 69050cc2eac3Smrg _LT_COMPILER_FILE_LOCKS($1) 69060cc2eac3Smrg _LT_LINKER_SHLIBS($1) 69070cc2eac3Smrg _LT_SYS_DYNAMIC_LINKER($1) 69080cc2eac3Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 69090cc2eac3Smrg LT_SYS_DLOPEN_SELF 69100cc2eac3Smrg _LT_CMD_STRIPLIB 69116c321187Smrg 69120cc2eac3Smrg # Report which library types will actually be built 69130cc2eac3Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 69140cc2eac3Smrg AC_MSG_RESULT([$can_build_shared]) 69150cc2eac3Smrg 69160cc2eac3Smrg AC_MSG_CHECKING([whether to build shared libraries]) 69170cc2eac3Smrg test "$can_build_shared" = "no" && enable_shared=no 69180cc2eac3Smrg 69190cc2eac3Smrg # On AIX, shared libraries and static libraries use the same namespace, and 69200cc2eac3Smrg # are all built from PIC. 69210cc2eac3Smrg case $host_os in 69220cc2eac3Smrg aix3*) 69230cc2eac3Smrg test "$enable_shared" = yes && enable_static=no 69240cc2eac3Smrg if test -n "$RANLIB"; then 69250cc2eac3Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 69260cc2eac3Smrg postinstall_cmds='$RANLIB $lib' 69270cc2eac3Smrg fi 69280cc2eac3Smrg ;; 69296c321187Smrg 69300cc2eac3Smrg aix[[4-9]]*) 69310cc2eac3Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 69320cc2eac3Smrg test "$enable_shared" = yes && enable_static=no 69330cc2eac3Smrg fi 69340cc2eac3Smrg ;; 69350cc2eac3Smrg esac 69360cc2eac3Smrg AC_MSG_RESULT([$enable_shared]) 69376c321187Smrg 69380cc2eac3Smrg AC_MSG_CHECKING([whether to build static libraries]) 69390cc2eac3Smrg # Make sure either enable_shared or enable_static is yes. 69400cc2eac3Smrg test "$enable_shared" = yes || enable_static=yes 69410cc2eac3Smrg AC_MSG_RESULT([$enable_static]) 69426c321187Smrg 69430cc2eac3Smrg _LT_CONFIG($1) 69440cc2eac3Smrgfi 69450cc2eac3SmrgAC_LANG_POP 69460cc2eac3SmrgCC="$lt_save_CC" 69470cc2eac3Smrg])# _LT_LANG_C_CONFIG 69486c321187Smrg 69496c321187Smrg 69500cc2eac3Smrg# _LT_LANG_CXX_CONFIG([TAG]) 69510cc2eac3Smrg# -------------------------- 69520cc2eac3Smrg# Ensure that the configuration variables for a C++ compiler are suitably 69530cc2eac3Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 69540cc2eac3Smrg# the compiler configuration to `libtool'. 69550cc2eac3Smrgm4_defun([_LT_LANG_CXX_CONFIG], 69560cc2eac3Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 69570cc2eac3Smrgm4_require([_LT_DECL_EGREP])dnl 69580cc2eac3Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 69590cc2eac3Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 69600cc2eac3Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 69610cc2eac3Smrg (test "X$CXX" != "Xg++"))) ; then 69620cc2eac3Smrg AC_PROG_CXXCPP 69630cc2eac3Smrgelse 69640cc2eac3Smrg _lt_caught_CXX_error=yes 69650cc2eac3Smrgfi 69666c321187Smrg 69670cc2eac3SmrgAC_LANG_PUSH(C++) 69680cc2eac3Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 69690cc2eac3Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 69700cc2eac3Smrg_LT_TAGVAR(always_export_symbols, $1)=no 69710cc2eac3Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 69720cc2eac3Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 69730cc2eac3Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 69740cc2eac3Smrg_LT_TAGVAR(hardcode_direct, $1)=no 69750cc2eac3Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 69760cc2eac3Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 69770cc2eac3Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 69780cc2eac3Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 69790cc2eac3Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 69800cc2eac3Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 69810cc2eac3Smrg_LT_TAGVAR(inherit_rpath, $1)=no 69820cc2eac3Smrg_LT_TAGVAR(module_cmds, $1)= 69830cc2eac3Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 69840cc2eac3Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 69850cc2eac3Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 69860cc2eac3Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 69870cc2eac3Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 69880cc2eac3Smrg_LT_TAGVAR(no_undefined_flag, $1)= 69890cc2eac3Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 69900cc2eac3Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 69916c321187Smrg 69920cc2eac3Smrg# Source file extension for C++ test sources. 69930cc2eac3Smrgac_ext=cpp 69946c321187Smrg 69950cc2eac3Smrg# Object file extension for compiled C++ test sources. 69960cc2eac3Smrgobjext=o 69970cc2eac3Smrg_LT_TAGVAR(objext, $1)=$objext 69986c321187Smrg 69990cc2eac3Smrg# No sense in running all these tests if we already determined that 70000cc2eac3Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 70010cc2eac3Smrg# are currently assumed to apply to all compilers on this platform, 70020cc2eac3Smrg# and will be corrupted by setting them based on a non-working compiler. 70030cc2eac3Smrgif test "$_lt_caught_CXX_error" != yes; then 70040cc2eac3Smrg # Code to be used in simple compile tests 70050cc2eac3Smrg lt_simple_compile_test_code="int some_variable = 0;" 70066c321187Smrg 70070cc2eac3Smrg # Code to be used in simple link tests 70080cc2eac3Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 70096c321187Smrg 70100cc2eac3Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 70110cc2eac3Smrg _LT_TAG_COMPILER 701293493779Smrg 70130cc2eac3Smrg # save warnings/boilerplate of simple test code 70140cc2eac3Smrg _LT_COMPILER_BOILERPLATE 70150cc2eac3Smrg _LT_LINKER_BOILERPLATE 70166c321187Smrg 70170cc2eac3Smrg # Allow CC to be a program name with arguments. 70180cc2eac3Smrg lt_save_CC=$CC 70190cc2eac3Smrg lt_save_CFLAGS=$CFLAGS 70200cc2eac3Smrg lt_save_LD=$LD 70210cc2eac3Smrg lt_save_GCC=$GCC 70220cc2eac3Smrg GCC=$GXX 70230cc2eac3Smrg lt_save_with_gnu_ld=$with_gnu_ld 70240cc2eac3Smrg lt_save_path_LD=$lt_cv_path_LD 70250cc2eac3Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 70260cc2eac3Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 70270cc2eac3Smrg else 70280cc2eac3Smrg $as_unset lt_cv_prog_gnu_ld 70290cc2eac3Smrg fi 70300cc2eac3Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 70310cc2eac3Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 70320cc2eac3Smrg else 70330cc2eac3Smrg $as_unset lt_cv_path_LD 70340cc2eac3Smrg fi 70350cc2eac3Smrg test -z "${LDCXX+set}" || LD=$LDCXX 70360cc2eac3Smrg CC=${CXX-"c++"} 70370cc2eac3Smrg CFLAGS=$CXXFLAGS 70380cc2eac3Smrg compiler=$CC 70390cc2eac3Smrg _LT_TAGVAR(compiler, $1)=$CC 70400cc2eac3Smrg _LT_CC_BASENAME([$compiler]) 704193493779Smrg 70420cc2eac3Smrg if test -n "$compiler"; then 70430cc2eac3Smrg # We don't want -fno-exception when compiling C++ code, so set the 70440cc2eac3Smrg # no_builtin_flag separately 70450cc2eac3Smrg if test "$GXX" = yes; then 70460cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 70470cc2eac3Smrg else 70480cc2eac3Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 704993493779Smrg fi 70506c321187Smrg 70510cc2eac3Smrg if test "$GXX" = yes; then 70520cc2eac3Smrg # Set up default GNU C++ configuration 70536c321187Smrg 70540cc2eac3Smrg LT_PATH_LD 70556c321187Smrg 70560cc2eac3Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 70570cc2eac3Smrg # archiving commands below assume that GNU ld is being used. 70580cc2eac3Smrg if test "$with_gnu_ld" = yes; then 70590cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 70600cc2eac3Smrg _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' 70610cc2eac3Smrg 70620cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 70630cc2eac3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 70640cc2eac3Smrg 70650cc2eac3Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 70660cc2eac3Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 70670cc2eac3Smrg # investigate it a little bit more. (MM) 70680cc2eac3Smrg wlarc='${wl}' 70690cc2eac3Smrg 70700cc2eac3Smrg # ancient GNU ld didn't support --whole-archive et. al. 70710cc2eac3Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 70720cc2eac3Smrg $GREP 'no-whole-archive' > /dev/null; then 70730cc2eac3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 70740cc2eac3Smrg else 70750cc2eac3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 70760cc2eac3Smrg fi 70770cc2eac3Smrg else 70780cc2eac3Smrg with_gnu_ld=no 70790cc2eac3Smrg wlarc= 70800cc2eac3Smrg 70810cc2eac3Smrg # A generic and very simple default shared library creation 70820cc2eac3Smrg # command for GNU C++ for the case where it uses the native 70830cc2eac3Smrg # linker, instead of GNU ld. If possible, this setting should 70840cc2eac3Smrg # overridden to take advantage of the native linker features on 70850cc2eac3Smrg # the platform it is being used on. 70860cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 70870cc2eac3Smrg fi 70880cc2eac3Smrg 70890cc2eac3Smrg # Commands to make compiler produce verbose output that lists 70900cc2eac3Smrg # what "hidden" libraries, object files and flags are used when 70910cc2eac3Smrg # linking a shared library. 70920cc2eac3Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 70936c321187Smrg 7094e120bd27Smrg else 70950cc2eac3Smrg GXX=no 70960cc2eac3Smrg with_gnu_ld=no 70970cc2eac3Smrg wlarc= 7098e120bd27Smrg fi 70996c321187Smrg 71000cc2eac3Smrg # PORTME: fill in a description of your system's C++ link characteristics 71010cc2eac3Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 71020cc2eac3Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 7103e120bd27Smrg case $host_os in 71040cc2eac3Smrg aix3*) 71050cc2eac3Smrg # FIXME: insert proper C++ library support 71060cc2eac3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 71070cc2eac3Smrg ;; 71080cc2eac3Smrg aix[[4-9]]*) 71090cc2eac3Smrg if test "$host_cpu" = ia64; then 71100cc2eac3Smrg # On IA64, the linker does run time linking by default, so we don't 71110cc2eac3Smrg # have to do anything special. 71120cc2eac3Smrg aix_use_runtimelinking=no 71130cc2eac3Smrg exp_sym_flag='-Bexport' 71140cc2eac3Smrg no_entry_flag="" 71150cc2eac3Smrg else 71160cc2eac3Smrg aix_use_runtimelinking=no 71176c321187Smrg 71180cc2eac3Smrg # Test if we are trying to use run time linking or normal 71190cc2eac3Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 71200cc2eac3Smrg # need to do runtime linking. 71210cc2eac3Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 71220cc2eac3Smrg for ld_flag in $LDFLAGS; do 71230cc2eac3Smrg case $ld_flag in 71240cc2eac3Smrg *-brtl*) 71250cc2eac3Smrg aix_use_runtimelinking=yes 71260cc2eac3Smrg break 71270cc2eac3Smrg ;; 71280cc2eac3Smrg esac 71290cc2eac3Smrg done 71300cc2eac3Smrg ;; 71310cc2eac3Smrg esac 71320cc2eac3Smrg 71330cc2eac3Smrg exp_sym_flag='-bexport' 71340cc2eac3Smrg no_entry_flag='-bnoentry' 71350cc2eac3Smrg fi 71360cc2eac3Smrg 71370cc2eac3Smrg # When large executables or shared objects are built, AIX ld can 71380cc2eac3Smrg # have problems creating the table of contents. If linking a library 71390cc2eac3Smrg # or program results in "error TOC overflow" add -mminimal-toc to 71400cc2eac3Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 71410cc2eac3Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 71420cc2eac3Smrg 71430cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='' 71440cc2eac3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 71450cc2eac3Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 71460cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 71470cc2eac3Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 71480cc2eac3Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 71490cc2eac3Smrg 71500cc2eac3Smrg if test "$GXX" = yes; then 71510cc2eac3Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 71520cc2eac3Smrg # We only want to do this on AIX 4.2 and lower, the check 71530cc2eac3Smrg # below for broken collect2 doesn't work under 4.3+ 71540cc2eac3Smrg collect2name=`${CC} -print-prog-name=collect2` 71550cc2eac3Smrg if test -f "$collect2name" && 71560cc2eac3Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 71570cc2eac3Smrg then 71580cc2eac3Smrg # We have reworked collect2 71590cc2eac3Smrg : 71600cc2eac3Smrg else 71610cc2eac3Smrg # We have old collect2 71620cc2eac3Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 71630cc2eac3Smrg # It fails to find uninstalled libraries when the uninstalled 71640cc2eac3Smrg # path is not listed in the libpath. Setting hardcode_minus_L 71650cc2eac3Smrg # to unsupported forces relinking 71660cc2eac3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 71670cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 71680cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 71690cc2eac3Smrg fi 71700cc2eac3Smrg esac 71710cc2eac3Smrg shared_flag='-shared' 71720cc2eac3Smrg if test "$aix_use_runtimelinking" = yes; then 71730cc2eac3Smrg shared_flag="$shared_flag "'${wl}-G' 71740cc2eac3Smrg fi 71750cc2eac3Smrg else 71760cc2eac3Smrg # not using gcc 71770cc2eac3Smrg if test "$host_cpu" = ia64; then 71780cc2eac3Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 71790cc2eac3Smrg # chokes on -Wl,-G. The following line is correct: 71800cc2eac3Smrg shared_flag='-G' 71810cc2eac3Smrg else 71820cc2eac3Smrg if test "$aix_use_runtimelinking" = yes; then 71830cc2eac3Smrg shared_flag='${wl}-G' 71840cc2eac3Smrg else 71850cc2eac3Smrg shared_flag='${wl}-bM:SRE' 71860cc2eac3Smrg fi 71870cc2eac3Smrg fi 71880cc2eac3Smrg fi 71890cc2eac3Smrg 71900cc2eac3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 71910cc2eac3Smrg # It seems that -bexpall does not export symbols beginning with 71920cc2eac3Smrg # underscore (_), so it is better to generate a list of symbols to 71930cc2eac3Smrg # export. 71940cc2eac3Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 71950cc2eac3Smrg if test "$aix_use_runtimelinking" = yes; then 71960cc2eac3Smrg # Warning - without using the other runtime loading flags (-brtl), 71970cc2eac3Smrg # -berok will link without error, but may produce a broken library. 71980cc2eac3Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 71990cc2eac3Smrg # Determine the default libpath from the value encoded in an empty 72000cc2eac3Smrg # executable. 72010cc2eac3Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 72020cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 72030cc2eac3Smrg 72040cc2eac3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 72050cc2eac3Smrg else 72060cc2eac3Smrg if test "$host_cpu" = ia64; then 72070cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 72080cc2eac3Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 72090cc2eac3Smrg _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" 72100cc2eac3Smrg else 72110cc2eac3Smrg # Determine the default libpath from the value encoded in an 72120cc2eac3Smrg # empty executable. 72130cc2eac3Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 72140cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 72150cc2eac3Smrg # Warning - without using the other run time loading flags, 72160cc2eac3Smrg # -berok will link without error, but may produce a broken library. 72170cc2eac3Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 72180cc2eac3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 72190cc2eac3Smrg if test "$with_gnu_ld" = yes; then 72200cc2eac3Smrg # We only use this code for GNU lds that support --whole-archive. 72210cc2eac3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 72220cc2eac3Smrg else 72230cc2eac3Smrg # Exported symbols can be pulled into shared objects from archives 72240cc2eac3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 72250cc2eac3Smrg fi 72260cc2eac3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 72270cc2eac3Smrg # This is similar to how AIX traditionally builds its shared 72280cc2eac3Smrg # libraries. 72290cc2eac3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' 72300cc2eac3Smrg fi 72310cc2eac3Smrg fi 72320cc2eac3Smrg ;; 72336c321187Smrg 72340cc2eac3Smrg beos*) 72350cc2eac3Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 72360cc2eac3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 72370cc2eac3Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 72380cc2eac3Smrg # support --undefined. This deserves some investigation. FIXME 72390cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 72400cc2eac3Smrg else 72410cc2eac3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 72420cc2eac3Smrg fi 72430cc2eac3Smrg ;; 72446c321187Smrg 72450cc2eac3Smrg chorus*) 72460cc2eac3Smrg case $cc_basename in 72470cc2eac3Smrg *) 72480cc2eac3Smrg # FIXME: insert proper C++ library support 72490cc2eac3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 72500cc2eac3Smrg ;; 72510cc2eac3Smrg esac 7252e120bd27Smrg ;; 72530cc2eac3Smrg 72540cc2eac3Smrg cygwin* | mingw* | pw32* | cegcc*) 72550cc2eac3Smrg case $GXX,$cc_basename in 72560cc2eac3Smrg ,cl* | no,cl*) 72570cc2eac3Smrg # Native MSVC 72580cc2eac3Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 72590cc2eac3Smrg # no search path for DLLs. 72600cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 72610cc2eac3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 72620cc2eac3Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 72630cc2eac3Smrg _LT_TAGVAR(file_list_spec, $1)='@' 72640cc2eac3Smrg # Tell ltmain to make .lib files, not .a files. 72650cc2eac3Smrg libext=lib 72660cc2eac3Smrg # Tell ltmain to make .dll files, not .so files. 72670cc2eac3Smrg shrext_cmds=".dll" 72680cc2eac3Smrg # FIXME: Setting linknames here is a bad hack. 72690cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 72700cc2eac3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 72710cc2eac3Smrg $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 72720cc2eac3Smrg else 72730cc2eac3Smrg $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 72740cc2eac3Smrg fi~ 72750cc2eac3Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 72760cc2eac3Smrg linknames=' 72770cc2eac3Smrg # The linker will not automatically build a static lib if we build a DLL. 72780cc2eac3Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 72790cc2eac3Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 72800cc2eac3Smrg # Don't use ranlib 72810cc2eac3Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 72820cc2eac3Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 72830cc2eac3Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 72840cc2eac3Smrg case $lt_outputfile in 72850cc2eac3Smrg *.exe|*.EXE) ;; 72860cc2eac3Smrg *) 72870cc2eac3Smrg lt_outputfile="$lt_outputfile.exe" 72880cc2eac3Smrg lt_tool_outputfile="$lt_tool_outputfile.exe" 72890cc2eac3Smrg ;; 72900cc2eac3Smrg esac~ 72910cc2eac3Smrg func_to_tool_file "$lt_outputfile"~ 72920cc2eac3Smrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 72930cc2eac3Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 72940cc2eac3Smrg $RM "$lt_outputfile.manifest"; 72950cc2eac3Smrg fi' 72960cc2eac3Smrg ;; 72970cc2eac3Smrg *) 72980cc2eac3Smrg # g++ 72990cc2eac3Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 73000cc2eac3Smrg # as there is no search path for DLLs. 73010cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 73020cc2eac3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 73030cc2eac3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 73040cc2eac3Smrg _LT_TAGVAR(always_export_symbols, $1)=no 73050cc2eac3Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 73060cc2eac3Smrg 73070cc2eac3Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 73080cc2eac3Smrg _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' 73090cc2eac3Smrg # If the export-symbols file already is a .def file (1st line 73100cc2eac3Smrg # is EXPORTS), use it as is; otherwise, prepend... 73110cc2eac3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 73120cc2eac3Smrg cp $export_symbols $output_objdir/$soname.def; 73130cc2eac3Smrg else 73140cc2eac3Smrg echo EXPORTS > $output_objdir/$soname.def; 73150cc2eac3Smrg cat $export_symbols >> $output_objdir/$soname.def; 73160cc2eac3Smrg fi~ 73170cc2eac3Smrg $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' 73180cc2eac3Smrg else 73190cc2eac3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 73200cc2eac3Smrg fi 73210cc2eac3Smrg ;; 73220cc2eac3Smrg esac 73230cc2eac3Smrg ;; 73240cc2eac3Smrg darwin* | rhapsody*) 73250cc2eac3Smrg _LT_DARWIN_LINKER_FEATURES($1) 73260cc2eac3Smrg ;; 73270cc2eac3Smrg 73280cc2eac3Smrg dgux*) 73290cc2eac3Smrg case $cc_basename in 73300cc2eac3Smrg ec++*) 73310cc2eac3Smrg # FIXME: insert proper C++ library support 73320cc2eac3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 73330cc2eac3Smrg ;; 73340cc2eac3Smrg ghcx*) 73350cc2eac3Smrg # Green Hills C++ Compiler 73360cc2eac3Smrg # FIXME: insert proper C++ library support 73370cc2eac3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 73380cc2eac3Smrg ;; 73390cc2eac3Smrg *) 73400cc2eac3Smrg # FIXME: insert proper C++ library support 73410cc2eac3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 73420cc2eac3Smrg ;; 73430cc2eac3Smrg esac 7344e120bd27Smrg ;; 73456c321187Smrg 73469d0b5e55Smrg freebsd2.*) 73470cc2eac3Smrg # C++ shared libraries reported to be fairly broken before 73480cc2eac3Smrg # switch to ELF 73490cc2eac3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 73500cc2eac3Smrg ;; 73516c321187Smrg 73520cc2eac3Smrg freebsd-elf*) 73530cc2eac3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 73540cc2eac3Smrg ;; 7355e120bd27Smrg 73560cc2eac3Smrg freebsd* | dragonfly*) 73570cc2eac3Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 73580cc2eac3Smrg # conventions 73590cc2eac3Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 73600cc2eac3Smrg ;; 73616c321187Smrg 73620cc2eac3Smrg gnu*) 73630cc2eac3Smrg ;; 73646c321187Smrg 73650cc2eac3Smrg haiku*) 73660cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 73670cc2eac3Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 73680cc2eac3Smrg ;; 73696c321187Smrg 73700cc2eac3Smrg hpux9*) 73710cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 73720cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 73730cc2eac3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 73740cc2eac3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 73750cc2eac3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 73760cc2eac3Smrg # but as the default 73770cc2eac3Smrg # location of the library. 73786c321187Smrg 73790cc2eac3Smrg case $cc_basename in 73800cc2eac3Smrg CC*) 73810cc2eac3Smrg # FIXME: insert proper C++ library support 73820cc2eac3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 73830cc2eac3Smrg ;; 73840cc2eac3Smrg aCC*) 73850cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 73860cc2eac3Smrg # Commands to make compiler produce verbose output that lists 73870cc2eac3Smrg # what "hidden" libraries, object files and flags are used when 73880cc2eac3Smrg # linking a shared library. 73890cc2eac3Smrg # 73900cc2eac3Smrg # There doesn't appear to be a way to prevent this compiler from 73910cc2eac3Smrg # explicitly linking system object files so we need to strip them 73920cc2eac3Smrg # from the output so that they don't get included in the library 73930cc2eac3Smrg # dependencies. 73940cc2eac3Smrg 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"' 73950cc2eac3Smrg ;; 73960cc2eac3Smrg *) 73970cc2eac3Smrg if test "$GXX" = yes; then 73980cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 73990cc2eac3Smrg else 74000cc2eac3Smrg # FIXME: insert proper C++ library support 74010cc2eac3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 74020cc2eac3Smrg fi 74030cc2eac3Smrg ;; 74040cc2eac3Smrg esac 74050cc2eac3Smrg ;; 74066c321187Smrg 74070cc2eac3Smrg hpux10*|hpux11*) 74080cc2eac3Smrg if test $with_gnu_ld = no; then 74090cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 74100cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 74116c321187Smrg 74120cc2eac3Smrg case $host_cpu in 74130cc2eac3Smrg hppa*64*|ia64*) 74140cc2eac3Smrg ;; 74150cc2eac3Smrg *) 74160cc2eac3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 74170cc2eac3Smrg ;; 74180cc2eac3Smrg esac 74190cc2eac3Smrg fi 74200cc2eac3Smrg case $host_cpu in 74210cc2eac3Smrg hppa*64*|ia64*) 74220cc2eac3Smrg _LT_TAGVAR(hardcode_direct, $1)=no 74230cc2eac3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 74240cc2eac3Smrg ;; 74250cc2eac3Smrg *) 74260cc2eac3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 74270cc2eac3Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 74280cc2eac3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 74290cc2eac3Smrg # but as the default 74300cc2eac3Smrg # location of the library. 74310cc2eac3Smrg ;; 74320cc2eac3Smrg esac 74336c321187Smrg 74340cc2eac3Smrg case $cc_basename in 74350cc2eac3Smrg CC*) 74360cc2eac3Smrg # FIXME: insert proper C++ library support 74370cc2eac3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 74380cc2eac3Smrg ;; 74390cc2eac3Smrg aCC*) 74400cc2eac3Smrg case $host_cpu in 74410cc2eac3Smrg hppa*64*) 74420cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 74430cc2eac3Smrg ;; 74440cc2eac3Smrg ia64*) 74450cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 74460cc2eac3Smrg ;; 74470cc2eac3Smrg *) 74480cc2eac3Smrg _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' 74490cc2eac3Smrg ;; 74500cc2eac3Smrg esac 74510cc2eac3Smrg # Commands to make compiler produce verbose output that lists 74520cc2eac3Smrg # what "hidden" libraries, object files and flags are used when 74530cc2eac3Smrg # linking a shared library. 74540cc2eac3Smrg # 74550cc2eac3Smrg # There doesn't appear to be a way to prevent this compiler from 74560cc2eac3Smrg # explicitly linking system object files so we need to strip them 74570cc2eac3Smrg # from the output so that they don't get included in the library 74580cc2eac3Smrg # dependencies. 74590cc2eac3Smrg 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"' 74600cc2eac3Smrg ;; 74610cc2eac3Smrg *) 74620cc2eac3Smrg if test "$GXX" = yes; then 74630cc2eac3Smrg if test $with_gnu_ld = no; then 74640cc2eac3Smrg case $host_cpu in 74650cc2eac3Smrg hppa*64*) 74660cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 74670cc2eac3Smrg ;; 74680cc2eac3Smrg ia64*) 74690cc2eac3Smrg _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' 74700cc2eac3Smrg ;; 74710cc2eac3Smrg *) 74720cc2eac3Smrg _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' 74730cc2eac3Smrg ;; 74740cc2eac3Smrg esac 74750cc2eac3Smrg fi 74760cc2eac3Smrg else 74770cc2eac3Smrg # FIXME: insert proper C++ library support 74780cc2eac3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 74790cc2eac3Smrg fi 74800cc2eac3Smrg ;; 74810cc2eac3Smrg esac 74820cc2eac3Smrg ;; 74836c321187Smrg 74840cc2eac3Smrg interix[[3-9]]*) 74850cc2eac3Smrg _LT_TAGVAR(hardcode_direct, $1)=no 74860cc2eac3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 74870cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 74880cc2eac3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 74890cc2eac3Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 74900cc2eac3Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 74910cc2eac3Smrg # default) and relocated if they conflict, which is a slow very memory 74920cc2eac3Smrg # consuming and fragmenting process. To avoid this, we pick a random, 74930cc2eac3Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 74940cc2eac3Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 74950cc2eac3Smrg _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' 74960cc2eac3Smrg _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' 74970cc2eac3Smrg ;; 74980cc2eac3Smrg irix5* | irix6*) 74990cc2eac3Smrg case $cc_basename in 75000cc2eac3Smrg CC*) 75010cc2eac3Smrg # SGI C++ 75020cc2eac3Smrg _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' 75036c321187Smrg 75040cc2eac3Smrg # Archives containing C++ object files must be created using 75050cc2eac3Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 75060cc2eac3Smrg # necessary to make sure instantiated templates are included 75070cc2eac3Smrg # in the archive. 75080cc2eac3Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 75090cc2eac3Smrg ;; 75100cc2eac3Smrg *) 75110cc2eac3Smrg if test "$GXX" = yes; then 75120cc2eac3Smrg if test "$with_gnu_ld" = no; then 75130cc2eac3Smrg _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' 75140cc2eac3Smrg else 75150cc2eac3Smrg _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' 75160cc2eac3Smrg fi 75170cc2eac3Smrg fi 75180cc2eac3Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 75190cc2eac3Smrg ;; 75200cc2eac3Smrg esac 75210cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 75220cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 75230cc2eac3Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 75240cc2eac3Smrg ;; 75256c321187Smrg 75260cc2eac3Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 75270cc2eac3Smrg case $cc_basename in 75280cc2eac3Smrg KCC*) 75290cc2eac3Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 75306c321187Smrg 75310cc2eac3Smrg # KCC will only create a shared library if the output file 75320cc2eac3Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 75330cc2eac3Smrg # to its proper name (with version) after linking. 75340cc2eac3Smrg _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' 75350cc2eac3Smrg _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' 75360cc2eac3Smrg # Commands to make compiler produce verbose output that lists 75370cc2eac3Smrg # what "hidden" libraries, object files and flags are used when 75380cc2eac3Smrg # linking a shared library. 75390cc2eac3Smrg # 75400cc2eac3Smrg # There doesn't appear to be a way to prevent this compiler from 75410cc2eac3Smrg # explicitly linking system object files so we need to strip them 75420cc2eac3Smrg # from the output so that they don't get included in the library 75430cc2eac3Smrg # dependencies. 75440cc2eac3Smrg 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"' 75456c321187Smrg 75460cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 75470cc2eac3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 75486c321187Smrg 75490cc2eac3Smrg # Archives containing C++ object files must be created using 75500cc2eac3Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 75510cc2eac3Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 75520cc2eac3Smrg ;; 75530cc2eac3Smrg icpc* | ecpc* ) 75540cc2eac3Smrg # Intel C++ 75550cc2eac3Smrg with_gnu_ld=yes 75560cc2eac3Smrg # version 8.0 and above of icpc choke on multiply defined symbols 75570cc2eac3Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 75580cc2eac3Smrg # earlier do not add the objects themselves. 75590cc2eac3Smrg case `$CC -V 2>&1` in 75600cc2eac3Smrg *"Version 7."*) 75610cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 75620cc2eac3Smrg _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' 75630cc2eac3Smrg ;; 75640cc2eac3Smrg *) # Version 8.0 or newer 75650cc2eac3Smrg tmp_idyn= 75660cc2eac3Smrg case $host_cpu in 75670cc2eac3Smrg ia64*) tmp_idyn=' -i_dynamic';; 75680cc2eac3Smrg esac 75690cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 75700cc2eac3Smrg _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' 75710cc2eac3Smrg ;; 75720cc2eac3Smrg esac 75730cc2eac3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 75740cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 75750cc2eac3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 75760cc2eac3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 75770cc2eac3Smrg ;; 75780cc2eac3Smrg pgCC* | pgcpp*) 75790cc2eac3Smrg # Portland Group C++ compiler 75800cc2eac3Smrg case `$CC -V` in 75810cc2eac3Smrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 75820cc2eac3Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 75830cc2eac3Smrg rm -rf $tpldir~ 75840cc2eac3Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 75850cc2eac3Smrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 75860cc2eac3Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 75870cc2eac3Smrg rm -rf $tpldir~ 75880cc2eac3Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 75890cc2eac3Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 75900cc2eac3Smrg $RANLIB $oldlib' 75910cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 75920cc2eac3Smrg rm -rf $tpldir~ 75930cc2eac3Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 75940cc2eac3Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 75950cc2eac3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 75960cc2eac3Smrg rm -rf $tpldir~ 75970cc2eac3Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 75980cc2eac3Smrg $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' 75990cc2eac3Smrg ;; 76000cc2eac3Smrg *) # Version 6 and above use weak symbols 76010cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 76020cc2eac3Smrg _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' 76030cc2eac3Smrg ;; 76040cc2eac3Smrg esac 76056c321187Smrg 76060cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 76070cc2eac3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 76080cc2eac3Smrg _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' 76090cc2eac3Smrg ;; 76100cc2eac3Smrg cxx*) 76110cc2eac3Smrg # Compaq C++ 76120cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 76130cc2eac3Smrg _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' 76140cc2eac3Smrg 76150cc2eac3Smrg runpath_var=LD_RUN_PATH 76160cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 76170cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 76186c321187Smrg 76190cc2eac3Smrg # Commands to make compiler produce verbose output that lists 76200cc2eac3Smrg # what "hidden" libraries, object files and flags are used when 76210cc2eac3Smrg # linking a shared library. 76220cc2eac3Smrg # 76230cc2eac3Smrg # There doesn't appear to be a way to prevent this compiler from 76240cc2eac3Smrg # explicitly linking system object files so we need to strip them 76250cc2eac3Smrg # from the output so that they don't get included in the library 76260cc2eac3Smrg # dependencies. 76270cc2eac3Smrg 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' 76280cc2eac3Smrg ;; 76290cc2eac3Smrg xl* | mpixl* | bgxl*) 76300cc2eac3Smrg # IBM XL 8.0 on PPC, with GNU ld 76310cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 76320cc2eac3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 76330cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 76340cc2eac3Smrg if test "x$supports_anon_versioning" = xyes; then 76350cc2eac3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 76360cc2eac3Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 76370cc2eac3Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 76380cc2eac3Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 76390cc2eac3Smrg fi 76400cc2eac3Smrg ;; 76410cc2eac3Smrg *) 76420cc2eac3Smrg case `$CC -V 2>&1 | sed 5q` in 76430cc2eac3Smrg *Sun\ C*) 76440cc2eac3Smrg # Sun C++ 5.9 76450cc2eac3Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 76460cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 76470cc2eac3Smrg _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' 76480cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 76490cc2eac3Smrg _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' 76500cc2eac3Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 76516c321187Smrg 76520cc2eac3Smrg # Not sure whether something based on 76530cc2eac3Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 76540cc2eac3Smrg # would be better. 76550cc2eac3Smrg output_verbose_link_cmd='func_echo_all' 76566c321187Smrg 76570cc2eac3Smrg # Archives containing C++ object files must be created using 76580cc2eac3Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 76590cc2eac3Smrg # necessary to make sure instantiated templates are included 76600cc2eac3Smrg # in the archive. 76610cc2eac3Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 76620cc2eac3Smrg ;; 76630cc2eac3Smrg esac 76640cc2eac3Smrg ;; 7665e120bd27Smrg esac 76660cc2eac3Smrg ;; 76676c321187Smrg 76680cc2eac3Smrg lynxos*) 76690cc2eac3Smrg # FIXME: insert proper C++ library support 76700cc2eac3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 76710cc2eac3Smrg ;; 76726c321187Smrg 76730cc2eac3Smrg m88k*) 76740cc2eac3Smrg # FIXME: insert proper C++ library support 76750cc2eac3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 76760cc2eac3Smrg ;; 76776c321187Smrg 76780cc2eac3Smrg mvs*) 76790cc2eac3Smrg case $cc_basename in 76800cc2eac3Smrg cxx*) 76810cc2eac3Smrg # FIXME: insert proper C++ library support 76820cc2eac3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 76830cc2eac3Smrg ;; 76840cc2eac3Smrg *) 76850cc2eac3Smrg # FIXME: insert proper C++ library support 76860cc2eac3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 76870cc2eac3Smrg ;; 7688e120bd27Smrg esac 76890cc2eac3Smrg ;; 76906c321187Smrg 76910cc2eac3Smrg netbsd*) 76920cc2eac3Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 76930cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 76940cc2eac3Smrg wlarc= 76950cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 76960cc2eac3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 76970cc2eac3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7698e120bd27Smrg fi 76990cc2eac3Smrg # Workaround some broken pre-1.5 toolchains 77000cc2eac3Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 77010cc2eac3Smrg ;; 77026c321187Smrg 77030cc2eac3Smrg *nto* | *qnx*) 77040cc2eac3Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 77050cc2eac3Smrg ;; 77066c321187Smrg 77070cc2eac3Smrg openbsd2*) 77080cc2eac3Smrg # C++ shared libraries are fairly broken 77090cc2eac3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 77100cc2eac3Smrg ;; 77116c321187Smrg 77120cc2eac3Smrg openbsd*) 77130cc2eac3Smrg if test -f /usr/libexec/ld.so; then 77140cc2eac3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 77150cc2eac3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 77160cc2eac3Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 77170cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 77180cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 77190cc2eac3Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 77200cc2eac3Smrg _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' 77210cc2eac3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 77220cc2eac3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 77230cc2eac3Smrg fi 77240cc2eac3Smrg output_verbose_link_cmd=func_echo_all 77250cc2eac3Smrg else 77260cc2eac3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 77270cc2eac3Smrg fi 77280cc2eac3Smrg ;; 77296c321187Smrg 77300cc2eac3Smrg osf3* | osf4* | osf5*) 77310cc2eac3Smrg case $cc_basename in 77320cc2eac3Smrg KCC*) 77330cc2eac3Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 77346c321187Smrg 77350cc2eac3Smrg # KCC will only create a shared library if the output file 77360cc2eac3Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 77370cc2eac3Smrg # to its proper name (with version) after linking. 77380cc2eac3Smrg _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' 77396c321187Smrg 77400cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 77410cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 77426c321187Smrg 77430cc2eac3Smrg # Archives containing C++ object files must be created using 77440cc2eac3Smrg # the KAI C++ compiler. 77450cc2eac3Smrg case $host in 77460cc2eac3Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 77470cc2eac3Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 77480cc2eac3Smrg esac 77490cc2eac3Smrg ;; 77500cc2eac3Smrg RCC*) 77510cc2eac3Smrg # Rational C++ 2.4.1 77520cc2eac3Smrg # FIXME: insert proper C++ library support 77530cc2eac3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 77540cc2eac3Smrg ;; 77550cc2eac3Smrg cxx*) 77560cc2eac3Smrg case $host in 77570cc2eac3Smrg osf3*) 77580cc2eac3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 77590cc2eac3Smrg _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' 77600cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 77610cc2eac3Smrg ;; 77620cc2eac3Smrg *) 77630cc2eac3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 77640cc2eac3Smrg _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' 77650cc2eac3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 77660cc2eac3Smrg echo "-hidden">> $lib.exp~ 77670cc2eac3Smrg $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~ 77680cc2eac3Smrg $RM $lib.exp' 77690cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 77700cc2eac3Smrg ;; 77710cc2eac3Smrg esac 77726c321187Smrg 77730cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 77746c321187Smrg 77750cc2eac3Smrg # Commands to make compiler produce verbose output that lists 77760cc2eac3Smrg # what "hidden" libraries, object files and flags are used when 77770cc2eac3Smrg # linking a shared library. 77780cc2eac3Smrg # 77790cc2eac3Smrg # There doesn't appear to be a way to prevent this compiler from 77800cc2eac3Smrg # explicitly linking system object files so we need to strip them 77810cc2eac3Smrg # from the output so that they don't get included in the library 77820cc2eac3Smrg # dependencies. 77830cc2eac3Smrg 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"' 77840cc2eac3Smrg ;; 77850cc2eac3Smrg *) 77860cc2eac3Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 77870cc2eac3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 77880cc2eac3Smrg case $host in 77890cc2eac3Smrg osf3*) 77900cc2eac3Smrg _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' 77910cc2eac3Smrg ;; 77920cc2eac3Smrg *) 77930cc2eac3Smrg _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' 77940cc2eac3Smrg ;; 77950cc2eac3Smrg esac 77966c321187Smrg 77970cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 77980cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 77996c321187Smrg 78000cc2eac3Smrg # Commands to make compiler produce verbose output that lists 78010cc2eac3Smrg # what "hidden" libraries, object files and flags are used when 78020cc2eac3Smrg # linking a shared library. 78030cc2eac3Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 78046c321187Smrg 78050cc2eac3Smrg else 78060cc2eac3Smrg # FIXME: insert proper C++ library support 78070cc2eac3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 78080cc2eac3Smrg fi 78090cc2eac3Smrg ;; 78100cc2eac3Smrg esac 78110cc2eac3Smrg ;; 78126c321187Smrg 78130cc2eac3Smrg psos*) 78140cc2eac3Smrg # FIXME: insert proper C++ library support 78150cc2eac3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 78160cc2eac3Smrg ;; 78176c321187Smrg 78180cc2eac3Smrg sunos4*) 78190cc2eac3Smrg case $cc_basename in 78200cc2eac3Smrg CC*) 78210cc2eac3Smrg # Sun C++ 4.x 78220cc2eac3Smrg # FIXME: insert proper C++ library support 78230cc2eac3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 78240cc2eac3Smrg ;; 78250cc2eac3Smrg lcc*) 78260cc2eac3Smrg # Lucid 78270cc2eac3Smrg # FIXME: insert proper C++ library support 78280cc2eac3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 78290cc2eac3Smrg ;; 78300cc2eac3Smrg *) 78310cc2eac3Smrg # FIXME: insert proper C++ library support 78320cc2eac3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 78330cc2eac3Smrg ;; 78340cc2eac3Smrg esac 78350cc2eac3Smrg ;; 78366c321187Smrg 78370cc2eac3Smrg solaris*) 78380cc2eac3Smrg case $cc_basename in 78390cc2eac3Smrg CC* | sunCC*) 78400cc2eac3Smrg # Sun C++ 4.2, 5.x and Centerline C++ 78410cc2eac3Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 78420cc2eac3Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 78430cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 78440cc2eac3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 78450cc2eac3Smrg $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' 78466c321187Smrg 78470cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 78480cc2eac3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 78490cc2eac3Smrg case $host_os in 78500cc2eac3Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 78510cc2eac3Smrg *) 78520cc2eac3Smrg # The compiler driver will combine and reorder linker options, 78530cc2eac3Smrg # but understands `-z linker_flag'. 78540cc2eac3Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 78550cc2eac3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 78560cc2eac3Smrg ;; 78570cc2eac3Smrg esac 78580cc2eac3Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 78596c321187Smrg 78600cc2eac3Smrg output_verbose_link_cmd='func_echo_all' 78616c321187Smrg 78620cc2eac3Smrg # Archives containing C++ object files must be created using 78630cc2eac3Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 78640cc2eac3Smrg # necessary to make sure instantiated templates are included 78650cc2eac3Smrg # in the archive. 78660cc2eac3Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 78670cc2eac3Smrg ;; 78680cc2eac3Smrg gcx*) 78690cc2eac3Smrg # Green Hills C++ Compiler 78700cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 78716c321187Smrg 78720cc2eac3Smrg # The C++ compiler must be used to create the archive. 78730cc2eac3Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 78740cc2eac3Smrg ;; 78750cc2eac3Smrg *) 78760cc2eac3Smrg # GNU C++ compiler with Solaris linker 78770cc2eac3Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 78780cc2eac3Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 78790cc2eac3Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 78800cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 78810cc2eac3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 78820cc2eac3Smrg $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 78836c321187Smrg 78840cc2eac3Smrg # Commands to make compiler produce verbose output that lists 78850cc2eac3Smrg # what "hidden" libraries, object files and flags are used when 78860cc2eac3Smrg # linking a shared library. 78870cc2eac3Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 78880cc2eac3Smrg else 78890cc2eac3Smrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 78900cc2eac3Smrg # platform. 78910cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 78920cc2eac3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 78930cc2eac3Smrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 78946c321187Smrg 78950cc2eac3Smrg # Commands to make compiler produce verbose output that lists 78960cc2eac3Smrg # what "hidden" libraries, object files and flags are used when 78970cc2eac3Smrg # linking a shared library. 78980cc2eac3Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 78990cc2eac3Smrg fi 79006c321187Smrg 79010cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 79020cc2eac3Smrg case $host_os in 79030cc2eac3Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 79040cc2eac3Smrg *) 79050cc2eac3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 79060cc2eac3Smrg ;; 79070cc2eac3Smrg esac 79080cc2eac3Smrg fi 79090cc2eac3Smrg ;; 79100cc2eac3Smrg esac 79110cc2eac3Smrg ;; 79126c321187Smrg 79130cc2eac3Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 79140cc2eac3Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 79150cc2eac3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 79160cc2eac3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 79170cc2eac3Smrg runpath_var='LD_RUN_PATH' 79186c321187Smrg 79190cc2eac3Smrg case $cc_basename in 79200cc2eac3Smrg CC*) 79210cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 79220cc2eac3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7923e120bd27Smrg ;; 7924e120bd27Smrg *) 79250cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 79260cc2eac3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7927e120bd27Smrg ;; 7928e120bd27Smrg esac 7929e120bd27Smrg ;; 79306c321187Smrg 79310cc2eac3Smrg sysv5* | sco3.2v5* | sco5v6*) 79320cc2eac3Smrg # Note: We can NOT use -z defs as we might desire, because we do not 79330cc2eac3Smrg # link with -lc, and that would cause any symbols used from libc to 79340cc2eac3Smrg # always be unresolved, which means just about no library would 79350cc2eac3Smrg # ever link correctly. If we're not using GNU ld we use -z text 79360cc2eac3Smrg # though, which does catch some bad symbols but isn't as heavy-handed 79370cc2eac3Smrg # as -z defs. 79380cc2eac3Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 79390cc2eac3Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 79400cc2eac3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 79410cc2eac3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 79420cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 79430cc2eac3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 79440cc2eac3Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 79450cc2eac3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 79460cc2eac3Smrg runpath_var='LD_RUN_PATH' 79476c321187Smrg 79480cc2eac3Smrg case $cc_basename in 79490cc2eac3Smrg CC*) 79500cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 79510cc2eac3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 79520cc2eac3Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 79530cc2eac3Smrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 79540cc2eac3Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 79550cc2eac3Smrg '"$_LT_TAGVAR(reload_cmds, $1)" 79560cc2eac3Smrg ;; 79570cc2eac3Smrg *) 79580cc2eac3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 79590cc2eac3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 79600cc2eac3Smrg ;; 79610cc2eac3Smrg esac 7962e120bd27Smrg ;; 79636c321187Smrg 79640cc2eac3Smrg tandem*) 79650cc2eac3Smrg case $cc_basename in 79660cc2eac3Smrg NCC*) 79670cc2eac3Smrg # NonStop-UX NCC 3.20 79680cc2eac3Smrg # FIXME: insert proper C++ library support 79690cc2eac3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 79700cc2eac3Smrg ;; 79710cc2eac3Smrg *) 79720cc2eac3Smrg # FIXME: insert proper C++ library support 79730cc2eac3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 79740cc2eac3Smrg ;; 79750cc2eac3Smrg esac 79760cc2eac3Smrg ;; 79776c321187Smrg 79780cc2eac3Smrg vxworks*) 79790cc2eac3Smrg # FIXME: insert proper C++ library support 79800cc2eac3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 79810cc2eac3Smrg ;; 79826c321187Smrg 79830cc2eac3Smrg *) 79840cc2eac3Smrg # FIXME: insert proper C++ library support 79850cc2eac3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 79860cc2eac3Smrg ;; 79870cc2eac3Smrg esac 79886c321187Smrg 79890cc2eac3Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 79900cc2eac3Smrg test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 79916c321187Smrg 79920cc2eac3Smrg _LT_TAGVAR(GCC, $1)="$GXX" 79930cc2eac3Smrg _LT_TAGVAR(LD, $1)="$LD" 79946c321187Smrg 79950cc2eac3Smrg ## CAVEAT EMPTOR: 79960cc2eac3Smrg ## There is no encapsulation within the following macros, do not change 79970cc2eac3Smrg ## the running order or otherwise move them around unless you know exactly 79980cc2eac3Smrg ## what you are doing... 79990cc2eac3Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 80000cc2eac3Smrg _LT_COMPILER_PIC($1) 80010cc2eac3Smrg _LT_COMPILER_C_O($1) 80020cc2eac3Smrg _LT_COMPILER_FILE_LOCKS($1) 80030cc2eac3Smrg _LT_LINKER_SHLIBS($1) 80040cc2eac3Smrg _LT_SYS_DYNAMIC_LINKER($1) 80050cc2eac3Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 80066c321187Smrg 80070cc2eac3Smrg _LT_CONFIG($1) 80080cc2eac3Smrg fi # test -n "$compiler" 80096c321187Smrg 80100cc2eac3Smrg CC=$lt_save_CC 80110cc2eac3Smrg CFLAGS=$lt_save_CFLAGS 80120cc2eac3Smrg LDCXX=$LD 80130cc2eac3Smrg LD=$lt_save_LD 80140cc2eac3Smrg GCC=$lt_save_GCC 80150cc2eac3Smrg with_gnu_ld=$lt_save_with_gnu_ld 80160cc2eac3Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 80170cc2eac3Smrg lt_cv_path_LD=$lt_save_path_LD 80180cc2eac3Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 80190cc2eac3Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 80200cc2eac3Smrgfi # test "$_lt_caught_CXX_error" != yes 80216c321187Smrg 80220cc2eac3SmrgAC_LANG_POP 80230cc2eac3Smrg])# _LT_LANG_CXX_CONFIG 80246c321187Smrg 80256c321187Smrg 80260cc2eac3Smrg# _LT_FUNC_STRIPNAME_CNF 80270cc2eac3Smrg# ---------------------- 80280cc2eac3Smrg# func_stripname_cnf prefix suffix name 80290cc2eac3Smrg# strip PREFIX and SUFFIX off of NAME. 80300cc2eac3Smrg# PREFIX and SUFFIX must not contain globbing or regex special 80310cc2eac3Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 80320cc2eac3Smrg# dot (in which case that matches only a dot). 8033e120bd27Smrg# 80340cc2eac3Smrg# This function is identical to the (non-XSI) version of func_stripname, 80350cc2eac3Smrg# except this one can be used by m4 code that may be executed by configure, 80360cc2eac3Smrg# rather than the libtool script. 80370cc2eac3Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 80380cc2eac3SmrgAC_REQUIRE([_LT_DECL_SED]) 80390cc2eac3SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 80400cc2eac3Smrgfunc_stripname_cnf () 80410cc2eac3Smrg{ 80420cc2eac3Smrg case ${2} in 80430cc2eac3Smrg .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 80440cc2eac3Smrg *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 80450cc2eac3Smrg esac 80460cc2eac3Smrg} # func_stripname_cnf 80470cc2eac3Smrg])# _LT_FUNC_STRIPNAME_CNF 8048e120bd27Smrg 80490cc2eac3Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 80500cc2eac3Smrg# --------------------------------- 80510cc2eac3Smrg# Figure out "hidden" library dependencies from verbose 80520cc2eac3Smrg# compiler output when linking a shared library. 80530cc2eac3Smrg# Parse the compiler output and extract the necessary 80540cc2eac3Smrg# objects, libraries and library flags. 80550cc2eac3Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 80560cc2eac3Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 80570cc2eac3SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 80580cc2eac3Smrg# Dependencies to place before and after the object being linked: 80590cc2eac3Smrg_LT_TAGVAR(predep_objects, $1)= 80600cc2eac3Smrg_LT_TAGVAR(postdep_objects, $1)= 80610cc2eac3Smrg_LT_TAGVAR(predeps, $1)= 80620cc2eac3Smrg_LT_TAGVAR(postdeps, $1)= 80630cc2eac3Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 80646c321187Smrg 80650cc2eac3Smrgdnl we can't use the lt_simple_compile_test_code here, 80660cc2eac3Smrgdnl because it contains code intended for an executable, 80670cc2eac3Smrgdnl not a library. It's possible we should let each 80680cc2eac3Smrgdnl tag define a new lt_????_link_test_code variable, 80690cc2eac3Smrgdnl but it's only used here... 80700cc2eac3Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 80710cc2eac3Smrgint a; 80720cc2eac3Smrgvoid foo (void) { a = 0; } 80730cc2eac3Smrg_LT_EOF 80740cc2eac3Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 80750cc2eac3Smrgclass Foo 80760cc2eac3Smrg{ 80770cc2eac3Smrgpublic: 80780cc2eac3Smrg Foo (void) { a = 0; } 80790cc2eac3Smrgprivate: 80800cc2eac3Smrg int a; 80810cc2eac3Smrg}; 80820cc2eac3Smrg_LT_EOF 80830cc2eac3Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 80840cc2eac3Smrg subroutine foo 80850cc2eac3Smrg implicit none 80860cc2eac3Smrg integer*4 a 80870cc2eac3Smrg a=0 80880cc2eac3Smrg return 80890cc2eac3Smrg end 80900cc2eac3Smrg_LT_EOF 80910cc2eac3Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 80920cc2eac3Smrg subroutine foo 80930cc2eac3Smrg implicit none 80940cc2eac3Smrg integer a 80950cc2eac3Smrg a=0 80960cc2eac3Smrg return 80970cc2eac3Smrg end 80980cc2eac3Smrg_LT_EOF 80990cc2eac3Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 81000cc2eac3Smrgpublic class foo { 81010cc2eac3Smrg private int a; 81020cc2eac3Smrg public void bar (void) { 81030cc2eac3Smrg a = 0; 81040cc2eac3Smrg } 81050cc2eac3Smrg}; 81060cc2eac3Smrg_LT_EOF 81079d0b5e55Smrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 81089d0b5e55Smrgpackage foo 81099d0b5e55Smrgfunc foo() { 81109d0b5e55Smrg} 81119d0b5e55Smrg_LT_EOF 81120cc2eac3Smrg]) 8113e120bd27Smrg 81140cc2eac3Smrg_lt_libdeps_save_CFLAGS=$CFLAGS 81150cc2eac3Smrgcase "$CC $CFLAGS " in #( 81160cc2eac3Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 81170cc2eac3Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 81189d0b5e55Smrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 81190cc2eac3Smrgesac 8120e120bd27Smrg 81210cc2eac3Smrgdnl Parse the compiler output and extract the necessary 81220cc2eac3Smrgdnl objects, libraries and library flags. 81230cc2eac3Smrgif AC_TRY_EVAL(ac_compile); then 81240cc2eac3Smrg # Parse the compiler output and extract the necessary 81250cc2eac3Smrg # objects, libraries and library flags. 81266c321187Smrg 81270cc2eac3Smrg # Sentinel used to keep track of whether or not we are before 81280cc2eac3Smrg # the conftest object file. 81290cc2eac3Smrg pre_test_object_deps_done=no 81306c321187Smrg 81310cc2eac3Smrg for p in `eval "$output_verbose_link_cmd"`; do 81320cc2eac3Smrg case ${prev}${p} in 81336c321187Smrg 81340cc2eac3Smrg -L* | -R* | -l*) 81350cc2eac3Smrg # Some compilers place space between "-{L,R}" and the path. 81360cc2eac3Smrg # Remove the space. 81370cc2eac3Smrg if test $p = "-L" || 81380cc2eac3Smrg test $p = "-R"; then 81390cc2eac3Smrg prev=$p 81400cc2eac3Smrg continue 81410cc2eac3Smrg fi 81426c321187Smrg 81430cc2eac3Smrg # Expand the sysroot to ease extracting the directories later. 81440cc2eac3Smrg if test -z "$prev"; then 81450cc2eac3Smrg case $p in 81460cc2eac3Smrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 81470cc2eac3Smrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 81480cc2eac3Smrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 81490cc2eac3Smrg esac 81500cc2eac3Smrg fi 81510cc2eac3Smrg case $p in 81520cc2eac3Smrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 81530cc2eac3Smrg esac 81540cc2eac3Smrg if test "$pre_test_object_deps_done" = no; then 81550cc2eac3Smrg case ${prev} in 81560cc2eac3Smrg -L | -R) 81570cc2eac3Smrg # Internal compiler library paths should come after those 81580cc2eac3Smrg # provided the user. The postdeps already come after the 81590cc2eac3Smrg # user supplied libs so there is no need to process them. 81600cc2eac3Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 81610cc2eac3Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 81620cc2eac3Smrg else 81630cc2eac3Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 81640cc2eac3Smrg fi 81650cc2eac3Smrg ;; 81660cc2eac3Smrg # The "-l" case would never come before the object being 81670cc2eac3Smrg # linked, so don't bother handling this case. 81680cc2eac3Smrg esac 81690cc2eac3Smrg else 81700cc2eac3Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 81710cc2eac3Smrg _LT_TAGVAR(postdeps, $1)="${prev}${p}" 81720cc2eac3Smrg else 81730cc2eac3Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 81740cc2eac3Smrg fi 81750cc2eac3Smrg fi 81760cc2eac3Smrg prev= 81770cc2eac3Smrg ;; 81786c321187Smrg 81790cc2eac3Smrg *.lto.$objext) ;; # Ignore GCC LTO objects 81800cc2eac3Smrg *.$objext) 81810cc2eac3Smrg # This assumes that the test object file only shows up 81820cc2eac3Smrg # once in the compiler output. 81830cc2eac3Smrg if test "$p" = "conftest.$objext"; then 81840cc2eac3Smrg pre_test_object_deps_done=yes 81850cc2eac3Smrg continue 81860cc2eac3Smrg fi 81876c321187Smrg 81880cc2eac3Smrg if test "$pre_test_object_deps_done" = no; then 81890cc2eac3Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 81900cc2eac3Smrg _LT_TAGVAR(predep_objects, $1)="$p" 81910cc2eac3Smrg else 81920cc2eac3Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 81930cc2eac3Smrg fi 81940cc2eac3Smrg else 81950cc2eac3Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 81960cc2eac3Smrg _LT_TAGVAR(postdep_objects, $1)="$p" 81970cc2eac3Smrg else 81980cc2eac3Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 81990cc2eac3Smrg fi 82000cc2eac3Smrg fi 82010cc2eac3Smrg ;; 82026c321187Smrg 82030cc2eac3Smrg *) ;; # Ignore the rest. 8204e120bd27Smrg 82050cc2eac3Smrg esac 82060cc2eac3Smrg done 8207e120bd27Smrg 82080cc2eac3Smrg # Clean up. 82090cc2eac3Smrg rm -f a.out a.exe 82100cc2eac3Smrgelse 82110cc2eac3Smrg echo "libtool.m4: error: problem compiling $1 test program" 82120cc2eac3Smrgfi 8213e120bd27Smrg 82140cc2eac3Smrg$RM -f confest.$objext 82150cc2eac3SmrgCFLAGS=$_lt_libdeps_save_CFLAGS 82160cc2eac3Smrg 82170cc2eac3Smrg# PORTME: override above test on systems where it is broken 82180cc2eac3Smrgm4_if([$1], [CXX], 82190cc2eac3Smrg[case $host_os in 82200cc2eac3Smrginterix[[3-9]]*) 82210cc2eac3Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 82220cc2eac3Smrg # hack all around it, let's just trust "g++" to DTRT. 82230cc2eac3Smrg _LT_TAGVAR(predep_objects,$1)= 82240cc2eac3Smrg _LT_TAGVAR(postdep_objects,$1)= 82250cc2eac3Smrg _LT_TAGVAR(postdeps,$1)= 82260cc2eac3Smrg ;; 82270cc2eac3Smrg 82280cc2eac3Smrglinux*) 82290cc2eac3Smrg case `$CC -V 2>&1 | sed 5q` in 82300cc2eac3Smrg *Sun\ C*) 82310cc2eac3Smrg # Sun C++ 5.9 82320cc2eac3Smrg 82330cc2eac3Smrg # The more standards-conforming stlport4 library is 82340cc2eac3Smrg # incompatible with the Cstd library. Avoid specifying 82350cc2eac3Smrg # it if it's in CXXFLAGS. Ignore libCrun as 82360cc2eac3Smrg # -library=stlport4 depends on it. 82370cc2eac3Smrg case " $CXX $CXXFLAGS " in 82380cc2eac3Smrg *" -library=stlport4 "*) 82390cc2eac3Smrg solaris_use_stlport4=yes 82400cc2eac3Smrg ;; 82410cc2eac3Smrg esac 82420cc2eac3Smrg 82430cc2eac3Smrg if test "$solaris_use_stlport4" != yes; then 82440cc2eac3Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 8245e120bd27Smrg fi 8246e120bd27Smrg ;; 82470cc2eac3Smrg esac 82480cc2eac3Smrg ;; 82496c321187Smrg 82500cc2eac3Smrgsolaris*) 82510cc2eac3Smrg case $cc_basename in 82520cc2eac3Smrg CC* | sunCC*) 82530cc2eac3Smrg # The more standards-conforming stlport4 library is 82540cc2eac3Smrg # incompatible with the Cstd library. Avoid specifying 82550cc2eac3Smrg # it if it's in CXXFLAGS. Ignore libCrun as 82560cc2eac3Smrg # -library=stlport4 depends on it. 82570cc2eac3Smrg case " $CXX $CXXFLAGS " in 82580cc2eac3Smrg *" -library=stlport4 "*) 82590cc2eac3Smrg solaris_use_stlport4=yes 82600cc2eac3Smrg ;; 82610cc2eac3Smrg esac 82620cc2eac3Smrg 82630cc2eac3Smrg # Adding this requires a known-good setup of shared libraries for 82640cc2eac3Smrg # Sun compiler versions before 5.6, else PIC objects from an old 82650cc2eac3Smrg # archive will be linked into the output, leading to subtle bugs. 82660cc2eac3Smrg if test "$solaris_use_stlport4" != yes; then 82670cc2eac3Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 8268e120bd27Smrg fi 8269e120bd27Smrg ;; 8270e120bd27Smrg esac 82710cc2eac3Smrg ;; 82720cc2eac3Smrgesac 82730cc2eac3Smrg]) 82746c321187Smrg 82750cc2eac3Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 82760cc2eac3Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 82770cc2eac3Smrgesac 82780cc2eac3Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 82790cc2eac3Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 82800cc2eac3Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 8281e120bd27Smrgfi 82820cc2eac3Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 82830cc2eac3Smrg [The directories searched by this compiler when creating a shared library]) 82840cc2eac3Smrg_LT_TAGDECL([], [predep_objects], [1], 82850cc2eac3Smrg [Dependencies to place before and after the objects being linked to 82860cc2eac3Smrg create a shared library]) 82870cc2eac3Smrg_LT_TAGDECL([], [postdep_objects], [1]) 82880cc2eac3Smrg_LT_TAGDECL([], [predeps], [1]) 82890cc2eac3Smrg_LT_TAGDECL([], [postdeps], [1]) 82900cc2eac3Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 82910cc2eac3Smrg [The library search path used internally by the compiler when linking 82920cc2eac3Smrg a shared library]) 82930cc2eac3Smrg])# _LT_SYS_HIDDEN_LIBDEPS 82946c321187Smrg 82950cc2eac3Smrg 82960cc2eac3Smrg# _LT_LANG_F77_CONFIG([TAG]) 82970cc2eac3Smrg# -------------------------- 82980cc2eac3Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 82990cc2eac3Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 83000cc2eac3Smrg# to write the compiler configuration to `libtool'. 83010cc2eac3Smrgm4_defun([_LT_LANG_F77_CONFIG], 83020cc2eac3Smrg[AC_LANG_PUSH(Fortran 77) 83030cc2eac3Smrgif test -z "$F77" || test "X$F77" = "Xno"; then 83040cc2eac3Smrg _lt_disable_F77=yes 8305e120bd27Smrgfi 83066c321187Smrg 8307e120bd27Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8308e120bd27Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 8309e120bd27Smrg_LT_TAGVAR(always_export_symbols, $1)=no 8310e120bd27Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 8311e120bd27Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 8312e120bd27Smrg_LT_TAGVAR(hardcode_direct, $1)=no 8313e120bd27Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 8314e120bd27Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 8315e120bd27Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 8316e120bd27Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 8317e120bd27Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 8318e120bd27Smrg_LT_TAGVAR(inherit_rpath, $1)=no 8319e120bd27Smrg_LT_TAGVAR(module_cmds, $1)= 8320e120bd27Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 8321e120bd27Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 8322e120bd27Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8323e120bd27Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 8324e120bd27Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8325e120bd27Smrg_LT_TAGVAR(no_undefined_flag, $1)= 8326e120bd27Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 8327e120bd27Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 83286c321187Smrg 83290cc2eac3Smrg# Source file extension for f77 test sources. 83300cc2eac3Smrgac_ext=f 83316c321187Smrg 83320cc2eac3Smrg# Object file extension for compiled f77 test sources. 8333e120bd27Smrgobjext=o 8334e120bd27Smrg_LT_TAGVAR(objext, $1)=$objext 8335e120bd27Smrg 8336e120bd27Smrg# No sense in running all these tests if we already determined that 83370cc2eac3Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 8338e120bd27Smrg# are currently assumed to apply to all compilers on this platform, 8339e120bd27Smrg# and will be corrupted by setting them based on a non-working compiler. 83400cc2eac3Smrgif test "$_lt_disable_F77" != yes; then 8341e120bd27Smrg # Code to be used in simple compile tests 83420cc2eac3Smrg lt_simple_compile_test_code="\ 83430cc2eac3Smrg subroutine t 83440cc2eac3Smrg return 83450cc2eac3Smrg end 83460cc2eac3Smrg" 8347e120bd27Smrg 8348e120bd27Smrg # Code to be used in simple link tests 83490cc2eac3Smrg lt_simple_link_test_code="\ 83500cc2eac3Smrg program t 83510cc2eac3Smrg end 83520cc2eac3Smrg" 8353e120bd27Smrg 8354e120bd27Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 8355e120bd27Smrg _LT_TAG_COMPILER 8356e120bd27Smrg 8357e120bd27Smrg # save warnings/boilerplate of simple test code 8358e120bd27Smrg _LT_COMPILER_BOILERPLATE 8359e120bd27Smrg _LT_LINKER_BOILERPLATE 8360e120bd27Smrg 8361e120bd27Smrg # Allow CC to be a program name with arguments. 83620cc2eac3Smrg lt_save_CC="$CC" 8363e120bd27Smrg lt_save_GCC=$GCC 83640cc2eac3Smrg lt_save_CFLAGS=$CFLAGS 83650cc2eac3Smrg CC=${F77-"f77"} 83660cc2eac3Smrg CFLAGS=$FFLAGS 8367e120bd27Smrg compiler=$CC 8368e120bd27Smrg _LT_TAGVAR(compiler, $1)=$CC 8369e120bd27Smrg _LT_CC_BASENAME([$compiler]) 83700cc2eac3Smrg GCC=$G77 8371e120bd27Smrg if test -n "$compiler"; then 83720cc2eac3Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 83730cc2eac3Smrg AC_MSG_RESULT([$can_build_shared]) 83746c321187Smrg 83750cc2eac3Smrg AC_MSG_CHECKING([whether to build shared libraries]) 83760cc2eac3Smrg test "$can_build_shared" = "no" && enable_shared=no 83776c321187Smrg 83780cc2eac3Smrg # On AIX, shared libraries and static libraries use the same namespace, and 83790cc2eac3Smrg # are all built from PIC. 8380e120bd27Smrg case $host_os in 8381e120bd27Smrg aix3*) 83820cc2eac3Smrg test "$enable_shared" = yes && enable_static=no 83830cc2eac3Smrg if test -n "$RANLIB"; then 83840cc2eac3Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 83850cc2eac3Smrg postinstall_cmds='$RANLIB $lib' 83860cc2eac3Smrg fi 8387e120bd27Smrg ;; 8388e120bd27Smrg aix[[4-9]]*) 83890cc2eac3Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 83900cc2eac3Smrg test "$enable_shared" = yes && enable_static=no 83910cc2eac3Smrg fi 83920cc2eac3Smrg ;; 83930cc2eac3Smrg esac 83940cc2eac3Smrg AC_MSG_RESULT([$enable_shared]) 8395e120bd27Smrg 83960cc2eac3Smrg AC_MSG_CHECKING([whether to build static libraries]) 83970cc2eac3Smrg # Make sure either enable_shared or enable_static is yes. 83980cc2eac3Smrg test "$enable_shared" = yes || enable_static=yes 83990cc2eac3Smrg AC_MSG_RESULT([$enable_static]) 84006c321187Smrg 84010cc2eac3Smrg _LT_TAGVAR(GCC, $1)="$G77" 84020cc2eac3Smrg _LT_TAGVAR(LD, $1)="$LD" 8403e120bd27Smrg 84040cc2eac3Smrg ## CAVEAT EMPTOR: 84050cc2eac3Smrg ## There is no encapsulation within the following macros, do not change 84060cc2eac3Smrg ## the running order or otherwise move them around unless you know exactly 84070cc2eac3Smrg ## what you are doing... 84080cc2eac3Smrg _LT_COMPILER_PIC($1) 84090cc2eac3Smrg _LT_COMPILER_C_O($1) 84100cc2eac3Smrg _LT_COMPILER_FILE_LOCKS($1) 84110cc2eac3Smrg _LT_LINKER_SHLIBS($1) 84120cc2eac3Smrg _LT_SYS_DYNAMIC_LINKER($1) 84130cc2eac3Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 84146c321187Smrg 84150cc2eac3Smrg _LT_CONFIG($1) 84160cc2eac3Smrg fi # test -n "$compiler" 84176c321187Smrg 84180cc2eac3Smrg GCC=$lt_save_GCC 84190cc2eac3Smrg CC="$lt_save_CC" 84200cc2eac3Smrg CFLAGS="$lt_save_CFLAGS" 84210cc2eac3Smrgfi # test "$_lt_disable_F77" != yes 84226c321187Smrg 84230cc2eac3SmrgAC_LANG_POP 84240cc2eac3Smrg])# _LT_LANG_F77_CONFIG 84256c321187Smrg 84266c321187Smrg 84270cc2eac3Smrg# _LT_LANG_FC_CONFIG([TAG]) 84280cc2eac3Smrg# ------------------------- 84290cc2eac3Smrg# Ensure that the configuration variables for a Fortran compiler are 84300cc2eac3Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 84310cc2eac3Smrg# to write the compiler configuration to `libtool'. 84320cc2eac3Smrgm4_defun([_LT_LANG_FC_CONFIG], 84330cc2eac3Smrg[AC_LANG_PUSH(Fortran) 84346c321187Smrg 84350cc2eac3Smrgif test -z "$FC" || test "X$FC" = "Xno"; then 84360cc2eac3Smrg _lt_disable_FC=yes 84370cc2eac3Smrgfi 84386c321187Smrg 84390cc2eac3Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 84400cc2eac3Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 84410cc2eac3Smrg_LT_TAGVAR(always_export_symbols, $1)=no 84420cc2eac3Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 84430cc2eac3Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 84440cc2eac3Smrg_LT_TAGVAR(hardcode_direct, $1)=no 84450cc2eac3Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 84460cc2eac3Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 84470cc2eac3Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 84480cc2eac3Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 84490cc2eac3Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 84500cc2eac3Smrg_LT_TAGVAR(inherit_rpath, $1)=no 84510cc2eac3Smrg_LT_TAGVAR(module_cmds, $1)= 84520cc2eac3Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 84530cc2eac3Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 84540cc2eac3Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 84550cc2eac3Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 84560cc2eac3Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 84570cc2eac3Smrg_LT_TAGVAR(no_undefined_flag, $1)= 84580cc2eac3Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 84590cc2eac3Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 846093493779Smrg 84610cc2eac3Smrg# Source file extension for fc test sources. 84620cc2eac3Smrgac_ext=${ac_fc_srcext-f} 84636c321187Smrg 84640cc2eac3Smrg# Object file extension for compiled fc test sources. 84650cc2eac3Smrgobjext=o 84660cc2eac3Smrg_LT_TAGVAR(objext, $1)=$objext 84676c321187Smrg 84680cc2eac3Smrg# No sense in running all these tests if we already determined that 84690cc2eac3Smrg# the FC compiler isn't working. Some variables (like enable_shared) 84700cc2eac3Smrg# are currently assumed to apply to all compilers on this platform, 84710cc2eac3Smrg# and will be corrupted by setting them based on a non-working compiler. 84720cc2eac3Smrgif test "$_lt_disable_FC" != yes; then 84730cc2eac3Smrg # Code to be used in simple compile tests 84740cc2eac3Smrg lt_simple_compile_test_code="\ 84750cc2eac3Smrg subroutine t 84760cc2eac3Smrg return 84770cc2eac3Smrg end 84780cc2eac3Smrg" 8479e120bd27Smrg 84800cc2eac3Smrg # Code to be used in simple link tests 84810cc2eac3Smrg lt_simple_link_test_code="\ 84820cc2eac3Smrg program t 84830cc2eac3Smrg end 84840cc2eac3Smrg" 84856c321187Smrg 84860cc2eac3Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 84870cc2eac3Smrg _LT_TAG_COMPILER 8488e120bd27Smrg 84890cc2eac3Smrg # save warnings/boilerplate of simple test code 84900cc2eac3Smrg _LT_COMPILER_BOILERPLATE 84910cc2eac3Smrg _LT_LINKER_BOILERPLATE 8492e120bd27Smrg 84930cc2eac3Smrg # Allow CC to be a program name with arguments. 84940cc2eac3Smrg lt_save_CC="$CC" 84950cc2eac3Smrg lt_save_GCC=$GCC 84960cc2eac3Smrg lt_save_CFLAGS=$CFLAGS 84970cc2eac3Smrg CC=${FC-"f95"} 84980cc2eac3Smrg CFLAGS=$FCFLAGS 84990cc2eac3Smrg compiler=$CC 85000cc2eac3Smrg GCC=$ac_cv_fc_compiler_gnu 85010cc2eac3Smrg 85020cc2eac3Smrg _LT_TAGVAR(compiler, $1)=$CC 85030cc2eac3Smrg _LT_CC_BASENAME([$compiler]) 85040cc2eac3Smrg 85050cc2eac3Smrg if test -n "$compiler"; then 85060cc2eac3Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 85070cc2eac3Smrg AC_MSG_RESULT([$can_build_shared]) 85080cc2eac3Smrg 85090cc2eac3Smrg AC_MSG_CHECKING([whether to build shared libraries]) 85100cc2eac3Smrg test "$can_build_shared" = "no" && enable_shared=no 85110cc2eac3Smrg 85120cc2eac3Smrg # On AIX, shared libraries and static libraries use the same namespace, and 85130cc2eac3Smrg # are all built from PIC. 85140cc2eac3Smrg case $host_os in 85150cc2eac3Smrg aix3*) 85160cc2eac3Smrg test "$enable_shared" = yes && enable_static=no 85170cc2eac3Smrg if test -n "$RANLIB"; then 85180cc2eac3Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 85190cc2eac3Smrg postinstall_cmds='$RANLIB $lib' 85200cc2eac3Smrg fi 85210cc2eac3Smrg ;; 85220cc2eac3Smrg aix[[4-9]]*) 85230cc2eac3Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 85240cc2eac3Smrg test "$enable_shared" = yes && enable_static=no 85250cc2eac3Smrg fi 8526e120bd27Smrg ;; 85270cc2eac3Smrg esac 85280cc2eac3Smrg AC_MSG_RESULT([$enable_shared]) 85296c321187Smrg 85300cc2eac3Smrg AC_MSG_CHECKING([whether to build static libraries]) 85310cc2eac3Smrg # Make sure either enable_shared or enable_static is yes. 85320cc2eac3Smrg test "$enable_shared" = yes || enable_static=yes 85330cc2eac3Smrg AC_MSG_RESULT([$enable_static]) 8534e120bd27Smrg 85350cc2eac3Smrg _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 85360cc2eac3Smrg _LT_TAGVAR(LD, $1)="$LD" 85376c321187Smrg 85380cc2eac3Smrg ## CAVEAT EMPTOR: 85390cc2eac3Smrg ## There is no encapsulation within the following macros, do not change 85400cc2eac3Smrg ## the running order or otherwise move them around unless you know exactly 85410cc2eac3Smrg ## what you are doing... 85420cc2eac3Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 85430cc2eac3Smrg _LT_COMPILER_PIC($1) 85440cc2eac3Smrg _LT_COMPILER_C_O($1) 85450cc2eac3Smrg _LT_COMPILER_FILE_LOCKS($1) 85460cc2eac3Smrg _LT_LINKER_SHLIBS($1) 85470cc2eac3Smrg _LT_SYS_DYNAMIC_LINKER($1) 85480cc2eac3Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 85496c321187Smrg 85500cc2eac3Smrg _LT_CONFIG($1) 85510cc2eac3Smrg fi # test -n "$compiler" 8552e120bd27Smrg 85530cc2eac3Smrg GCC=$lt_save_GCC 85540cc2eac3Smrg CC=$lt_save_CC 85550cc2eac3Smrg CFLAGS=$lt_save_CFLAGS 85560cc2eac3Smrgfi # test "$_lt_disable_FC" != yes 8557e120bd27Smrg 85580cc2eac3SmrgAC_LANG_POP 85590cc2eac3Smrg])# _LT_LANG_FC_CONFIG 85606c321187Smrg 85616c321187Smrg 85620cc2eac3Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 85630cc2eac3Smrg# -------------------------- 85640cc2eac3Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 85650cc2eac3Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 85660cc2eac3Smrg# to write the compiler configuration to `libtool'. 85670cc2eac3Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 85680cc2eac3Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 85690cc2eac3SmrgAC_LANG_SAVE 85706c321187Smrg 85710cc2eac3Smrg# Source file extension for Java test sources. 85720cc2eac3Smrgac_ext=java 85730cc2eac3Smrg 85740cc2eac3Smrg# Object file extension for compiled Java test sources. 85750cc2eac3Smrgobjext=o 85760cc2eac3Smrg_LT_TAGVAR(objext, $1)=$objext 85770cc2eac3Smrg 85780cc2eac3Smrg# Code to be used in simple compile tests 85790cc2eac3Smrglt_simple_compile_test_code="class foo {}" 85800cc2eac3Smrg 85810cc2eac3Smrg# Code to be used in simple link tests 85820cc2eac3Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 85830cc2eac3Smrg 85840cc2eac3Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 85850cc2eac3Smrg_LT_TAG_COMPILER 85860cc2eac3Smrg 85870cc2eac3Smrg# save warnings/boilerplate of simple test code 85880cc2eac3Smrg_LT_COMPILER_BOILERPLATE 85890cc2eac3Smrg_LT_LINKER_BOILERPLATE 85900cc2eac3Smrg 85910cc2eac3Smrg# Allow CC to be a program name with arguments. 85920cc2eac3Smrglt_save_CC=$CC 85930cc2eac3Smrglt_save_CFLAGS=$CFLAGS 85940cc2eac3Smrglt_save_GCC=$GCC 85950cc2eac3SmrgGCC=yes 85960cc2eac3SmrgCC=${GCJ-"gcj"} 85970cc2eac3SmrgCFLAGS=$GCJFLAGS 85980cc2eac3Smrgcompiler=$CC 85990cc2eac3Smrg_LT_TAGVAR(compiler, $1)=$CC 86000cc2eac3Smrg_LT_TAGVAR(LD, $1)="$LD" 86010cc2eac3Smrg_LT_CC_BASENAME([$compiler]) 86020cc2eac3Smrg 86030cc2eac3Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 86040cc2eac3Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 86050cc2eac3Smrg 86060cc2eac3Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 86070cc2eac3Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 86080cc2eac3Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 86090cc2eac3Smrg 86100cc2eac3Smrgif test -n "$compiler"; then 86110cc2eac3Smrg _LT_COMPILER_NO_RTTI($1) 86120cc2eac3Smrg _LT_COMPILER_PIC($1) 86130cc2eac3Smrg _LT_COMPILER_C_O($1) 86140cc2eac3Smrg _LT_COMPILER_FILE_LOCKS($1) 86150cc2eac3Smrg _LT_LINKER_SHLIBS($1) 86160cc2eac3Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 86170cc2eac3Smrg 86180cc2eac3Smrg _LT_CONFIG($1) 86190cc2eac3Smrgfi 86200cc2eac3Smrg 86210cc2eac3SmrgAC_LANG_RESTORE 86220cc2eac3Smrg 86230cc2eac3SmrgGCC=$lt_save_GCC 86240cc2eac3SmrgCC=$lt_save_CC 86250cc2eac3SmrgCFLAGS=$lt_save_CFLAGS 86260cc2eac3Smrg])# _LT_LANG_GCJ_CONFIG 8627e120bd27Smrg 8628e120bd27Smrg 86299d0b5e55Smrg# _LT_LANG_GO_CONFIG([TAG]) 86309d0b5e55Smrg# -------------------------- 86319d0b5e55Smrg# Ensure that the configuration variables for the GNU Go compiler 86329d0b5e55Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 86339d0b5e55Smrg# to write the compiler configuration to `libtool'. 86349d0b5e55Smrgm4_defun([_LT_LANG_GO_CONFIG], 86359d0b5e55Smrg[AC_REQUIRE([LT_PROG_GO])dnl 86369d0b5e55SmrgAC_LANG_SAVE 86379d0b5e55Smrg 86389d0b5e55Smrg# Source file extension for Go test sources. 86399d0b5e55Smrgac_ext=go 86409d0b5e55Smrg 86419d0b5e55Smrg# Object file extension for compiled Go test sources. 86429d0b5e55Smrgobjext=o 86439d0b5e55Smrg_LT_TAGVAR(objext, $1)=$objext 86449d0b5e55Smrg 86459d0b5e55Smrg# Code to be used in simple compile tests 86469d0b5e55Smrglt_simple_compile_test_code="package main; func main() { }" 86479d0b5e55Smrg 86489d0b5e55Smrg# Code to be used in simple link tests 86499d0b5e55Smrglt_simple_link_test_code='package main; func main() { }' 86509d0b5e55Smrg 86519d0b5e55Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 86529d0b5e55Smrg_LT_TAG_COMPILER 86539d0b5e55Smrg 86549d0b5e55Smrg# save warnings/boilerplate of simple test code 86559d0b5e55Smrg_LT_COMPILER_BOILERPLATE 86569d0b5e55Smrg_LT_LINKER_BOILERPLATE 86579d0b5e55Smrg 86589d0b5e55Smrg# Allow CC to be a program name with arguments. 86599d0b5e55Smrglt_save_CC=$CC 86609d0b5e55Smrglt_save_CFLAGS=$CFLAGS 86619d0b5e55Smrglt_save_GCC=$GCC 86629d0b5e55SmrgGCC=yes 86639d0b5e55SmrgCC=${GOC-"gccgo"} 86649d0b5e55SmrgCFLAGS=$GOFLAGS 86659d0b5e55Smrgcompiler=$CC 86669d0b5e55Smrg_LT_TAGVAR(compiler, $1)=$CC 86679d0b5e55Smrg_LT_TAGVAR(LD, $1)="$LD" 86689d0b5e55Smrg_LT_CC_BASENAME([$compiler]) 86699d0b5e55Smrg 86709d0b5e55Smrg# Go did not exist at the time GCC didn't implicitly link libc in. 86719d0b5e55Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 86729d0b5e55Smrg 86739d0b5e55Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 86749d0b5e55Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 86759d0b5e55Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 86769d0b5e55Smrg 86779d0b5e55Smrgif test -n "$compiler"; then 86789d0b5e55Smrg _LT_COMPILER_NO_RTTI($1) 86799d0b5e55Smrg _LT_COMPILER_PIC($1) 86809d0b5e55Smrg _LT_COMPILER_C_O($1) 86819d0b5e55Smrg _LT_COMPILER_FILE_LOCKS($1) 86829d0b5e55Smrg _LT_LINKER_SHLIBS($1) 86839d0b5e55Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 86849d0b5e55Smrg 86859d0b5e55Smrg _LT_CONFIG($1) 86869d0b5e55Smrgfi 86879d0b5e55Smrg 86889d0b5e55SmrgAC_LANG_RESTORE 86899d0b5e55Smrg 86909d0b5e55SmrgGCC=$lt_save_GCC 86919d0b5e55SmrgCC=$lt_save_CC 86929d0b5e55SmrgCFLAGS=$lt_save_CFLAGS 86939d0b5e55Smrg])# _LT_LANG_GO_CONFIG 86949d0b5e55Smrg 86959d0b5e55Smrg 86960cc2eac3Smrg# _LT_LANG_RC_CONFIG([TAG]) 86970cc2eac3Smrg# ------------------------- 86980cc2eac3Smrg# Ensure that the configuration variables for the Windows resource compiler 86990cc2eac3Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 87000cc2eac3Smrg# to write the compiler configuration to `libtool'. 87010cc2eac3Smrgm4_defun([_LT_LANG_RC_CONFIG], 87020cc2eac3Smrg[AC_REQUIRE([LT_PROG_RC])dnl 87030cc2eac3SmrgAC_LANG_SAVE 87046c321187Smrg 87050cc2eac3Smrg# Source file extension for RC test sources. 87060cc2eac3Smrgac_ext=rc 87076c321187Smrg 87080cc2eac3Smrg# Object file extension for compiled RC test sources. 87090cc2eac3Smrgobjext=o 87100cc2eac3Smrg_LT_TAGVAR(objext, $1)=$objext 87116c321187Smrg 87120cc2eac3Smrg# Code to be used in simple compile tests 87130cc2eac3Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 87146c321187Smrg 87150cc2eac3Smrg# Code to be used in simple link tests 87160cc2eac3Smrglt_simple_link_test_code="$lt_simple_compile_test_code" 87176c321187Smrg 87180cc2eac3Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 87190cc2eac3Smrg_LT_TAG_COMPILER 87206c321187Smrg 87210cc2eac3Smrg# save warnings/boilerplate of simple test code 87220cc2eac3Smrg_LT_COMPILER_BOILERPLATE 87230cc2eac3Smrg_LT_LINKER_BOILERPLATE 87246c321187Smrg 87250cc2eac3Smrg# Allow CC to be a program name with arguments. 87260cc2eac3Smrglt_save_CC="$CC" 87270cc2eac3Smrglt_save_CFLAGS=$CFLAGS 87280cc2eac3Smrglt_save_GCC=$GCC 87290cc2eac3SmrgGCC= 87300cc2eac3SmrgCC=${RC-"windres"} 87310cc2eac3SmrgCFLAGS= 87320cc2eac3Smrgcompiler=$CC 87330cc2eac3Smrg_LT_TAGVAR(compiler, $1)=$CC 87340cc2eac3Smrg_LT_CC_BASENAME([$compiler]) 87350cc2eac3Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 87366c321187Smrg 87370cc2eac3Smrgif test -n "$compiler"; then 87380cc2eac3Smrg : 87390cc2eac3Smrg _LT_CONFIG($1) 87400cc2eac3Smrgfi 8741e120bd27Smrg 87420cc2eac3SmrgGCC=$lt_save_GCC 87430cc2eac3SmrgAC_LANG_RESTORE 87440cc2eac3SmrgCC=$lt_save_CC 87450cc2eac3SmrgCFLAGS=$lt_save_CFLAGS 87460cc2eac3Smrg])# _LT_LANG_RC_CONFIG 8747e120bd27Smrg 8748e120bd27Smrg 87490cc2eac3Smrg# LT_PROG_GCJ 87500cc2eac3Smrg# ----------- 87510cc2eac3SmrgAC_DEFUN([LT_PROG_GCJ], 87520cc2eac3Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 87530cc2eac3Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 87540cc2eac3Smrg [AC_CHECK_TOOL(GCJ, gcj,) 87550cc2eac3Smrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 87560cc2eac3Smrg AC_SUBST(GCJFLAGS)])])[]dnl 87570cc2eac3Smrg]) 87586c321187Smrg 87590cc2eac3Smrg# Old name: 87600cc2eac3SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 87610cc2eac3Smrgdnl aclocal-1.4 backwards compatibility: 87620cc2eac3Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 87636c321187Smrg 8764e120bd27Smrg 87659d0b5e55Smrg# LT_PROG_GO 87669d0b5e55Smrg# ---------- 87679d0b5e55SmrgAC_DEFUN([LT_PROG_GO], 87689d0b5e55Smrg[AC_CHECK_TOOL(GOC, gccgo,) 87699d0b5e55Smrg]) 87709d0b5e55Smrg 87719d0b5e55Smrg 87720cc2eac3Smrg# LT_PROG_RC 87730cc2eac3Smrg# ---------- 87740cc2eac3SmrgAC_DEFUN([LT_PROG_RC], 87750cc2eac3Smrg[AC_CHECK_TOOL(RC, windres,) 87760cc2eac3Smrg]) 8777e120bd27Smrg 87780cc2eac3Smrg# Old name: 87790cc2eac3SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 87800cc2eac3Smrgdnl aclocal-1.4 backwards compatibility: 87810cc2eac3Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 8782e120bd27Smrg 87836c321187Smrg 87840cc2eac3Smrg# _LT_DECL_EGREP 87850cc2eac3Smrg# -------------- 87860cc2eac3Smrg# If we don't have a new enough Autoconf to choose the best grep 87870cc2eac3Smrg# available, choose the one first in the user's PATH. 87880cc2eac3Smrgm4_defun([_LT_DECL_EGREP], 87890cc2eac3Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 87900cc2eac3SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 87910cc2eac3Smrgtest -z "$GREP" && GREP=grep 87920cc2eac3Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 87930cc2eac3Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 87940cc2eac3Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 87950cc2eac3Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 87960cc2eac3SmrgAC_SUBST([GREP]) 87970cc2eac3Smrg]) 87986c321187Smrg 87996c321187Smrg 88000cc2eac3Smrg# _LT_DECL_OBJDUMP 88010cc2eac3Smrg# -------------- 88020cc2eac3Smrg# If we don't have a new enough Autoconf to choose the best objdump 88030cc2eac3Smrg# available, choose the one first in the user's PATH. 88040cc2eac3Smrgm4_defun([_LT_DECL_OBJDUMP], 88050cc2eac3Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 88060cc2eac3Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 88070cc2eac3Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 88080cc2eac3SmrgAC_SUBST([OBJDUMP]) 88090cc2eac3Smrg]) 8810e120bd27Smrg 88110cc2eac3Smrg# _LT_DECL_DLLTOOL 88120cc2eac3Smrg# ---------------- 88130cc2eac3Smrg# Ensure DLLTOOL variable is set. 88140cc2eac3Smrgm4_defun([_LT_DECL_DLLTOOL], 88150cc2eac3Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 88160cc2eac3Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 88170cc2eac3Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 88180cc2eac3SmrgAC_SUBST([DLLTOOL]) 88190cc2eac3Smrg]) 88206c321187Smrg 88210cc2eac3Smrg# _LT_DECL_SED 88220cc2eac3Smrg# ------------ 88230cc2eac3Smrg# Check for a fully-functional sed program, that truncates 88240cc2eac3Smrg# as few characters as possible. Prefer GNU sed if found. 88250cc2eac3Smrgm4_defun([_LT_DECL_SED], 88260cc2eac3Smrg[AC_PROG_SED 88270cc2eac3Smrgtest -z "$SED" && SED=sed 88280cc2eac3SmrgXsed="$SED -e 1s/^X//" 88290cc2eac3Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 88300cc2eac3Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 88310cc2eac3Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 88320cc2eac3Smrg])# _LT_DECL_SED 88336c321187Smrg 88340cc2eac3Smrgm4_ifndef([AC_PROG_SED], [ 88350cc2eac3Smrg# NOTE: This macro has been submitted for inclusion into # 88360cc2eac3Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 88370cc2eac3Smrg# a released version of Autoconf we should remove this # 88380cc2eac3Smrg# macro and use it instead. # 88396c321187Smrg 88400cc2eac3Smrgm4_defun([AC_PROG_SED], 88410cc2eac3Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 88420cc2eac3SmrgAC_CACHE_VAL(lt_cv_path_SED, 88430cc2eac3Smrg[# Loop through the user's path and test for sed and gsed. 88440cc2eac3Smrg# Then use that list of sed's as ones to test for truncation. 88450cc2eac3Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 88460cc2eac3Smrgfor as_dir in $PATH 88470cc2eac3Smrgdo 88480cc2eac3Smrg IFS=$as_save_IFS 88490cc2eac3Smrg test -z "$as_dir" && as_dir=. 88500cc2eac3Smrg for lt_ac_prog in sed gsed; do 88510cc2eac3Smrg for ac_exec_ext in '' $ac_executable_extensions; do 88520cc2eac3Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 88530cc2eac3Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 88540cc2eac3Smrg fi 88550cc2eac3Smrg done 88560cc2eac3Smrg done 88570cc2eac3Smrgdone 88580cc2eac3SmrgIFS=$as_save_IFS 88590cc2eac3Smrglt_ac_max=0 88600cc2eac3Smrglt_ac_count=0 88610cc2eac3Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 88620cc2eac3Smrg# along with /bin/sed that truncates output. 88630cc2eac3Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 88640cc2eac3Smrg test ! -f $lt_ac_sed && continue 88650cc2eac3Smrg cat /dev/null > conftest.in 88660cc2eac3Smrg lt_ac_count=0 88670cc2eac3Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 88680cc2eac3Smrg # Check for GNU sed and select it if it is found. 88690cc2eac3Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 88700cc2eac3Smrg lt_cv_path_SED=$lt_ac_sed 88710cc2eac3Smrg break 88720cc2eac3Smrg fi 88730cc2eac3Smrg while true; do 88740cc2eac3Smrg cat conftest.in conftest.in >conftest.tmp 88750cc2eac3Smrg mv conftest.tmp conftest.in 88760cc2eac3Smrg cp conftest.in conftest.nl 88770cc2eac3Smrg echo >>conftest.nl 88780cc2eac3Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 88790cc2eac3Smrg cmp -s conftest.out conftest.nl || break 88800cc2eac3Smrg # 10000 chars as input seems more than enough 88810cc2eac3Smrg test $lt_ac_count -gt 10 && break 88820cc2eac3Smrg lt_ac_count=`expr $lt_ac_count + 1` 88830cc2eac3Smrg if test $lt_ac_count -gt $lt_ac_max; then 88840cc2eac3Smrg lt_ac_max=$lt_ac_count 88850cc2eac3Smrg lt_cv_path_SED=$lt_ac_sed 88860cc2eac3Smrg fi 88870cc2eac3Smrg done 88880cc2eac3Smrgdone 88890cc2eac3Smrg]) 88900cc2eac3SmrgSED=$lt_cv_path_SED 88910cc2eac3SmrgAC_SUBST([SED]) 88920cc2eac3SmrgAC_MSG_RESULT([$SED]) 88930cc2eac3Smrg])#AC_PROG_SED 88940cc2eac3Smrg])#m4_ifndef 8895e120bd27Smrg 88960cc2eac3Smrg# Old name: 88970cc2eac3SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 88980cc2eac3Smrgdnl aclocal-1.4 backwards compatibility: 88990cc2eac3Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 8900e120bd27Smrg 8901e120bd27Smrg 89020cc2eac3Smrg# _LT_CHECK_SHELL_FEATURES 89030cc2eac3Smrg# ------------------------ 89040cc2eac3Smrg# Find out whether the shell is Bourne or XSI compatible, 89050cc2eac3Smrg# or has some other useful features. 89060cc2eac3Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 89070cc2eac3Smrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 89080cc2eac3Smrg# Try some XSI features 89090cc2eac3Smrgxsi_shell=no 89100cc2eac3Smrg( _lt_dummy="a/b/c" 89110cc2eac3Smrg test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ 89120cc2eac3Smrg = c,a/b,b/c, \ 89130cc2eac3Smrg && eval 'test $(( 1 + 1 )) -eq 2 \ 89140cc2eac3Smrg && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 89150cc2eac3Smrg && xsi_shell=yes 89160cc2eac3SmrgAC_MSG_RESULT([$xsi_shell]) 89170cc2eac3Smrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 89186c321187Smrg 89190cc2eac3SmrgAC_MSG_CHECKING([whether the shell understands "+="]) 89200cc2eac3Smrglt_shell_append=no 89210cc2eac3Smrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 89220cc2eac3Smrg >/dev/null 2>&1 \ 89230cc2eac3Smrg && lt_shell_append=yes 89240cc2eac3SmrgAC_MSG_RESULT([$lt_shell_append]) 89250cc2eac3Smrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 89266c321187Smrg 89270cc2eac3Smrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 89280cc2eac3Smrg lt_unset=unset 89290cc2eac3Smrgelse 89300cc2eac3Smrg lt_unset=false 89310cc2eac3Smrgfi 89320cc2eac3Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 89336c321187Smrg 89340cc2eac3Smrg# test EBCDIC or ASCII 89350cc2eac3Smrgcase `echo X|tr X '\101'` in 89360cc2eac3Smrg A) # ASCII based system 89370cc2eac3Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 89380cc2eac3Smrg lt_SP2NL='tr \040 \012' 89390cc2eac3Smrg lt_NL2SP='tr \015\012 \040\040' 89400cc2eac3Smrg ;; 89410cc2eac3Smrg *) # EBCDIC based system 89420cc2eac3Smrg lt_SP2NL='tr \100 \n' 89430cc2eac3Smrg lt_NL2SP='tr \r\n \100\100' 89440cc2eac3Smrg ;; 89450cc2eac3Smrgesac 89460cc2eac3Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 89470cc2eac3Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 89480cc2eac3Smrg])# _LT_CHECK_SHELL_FEATURES 89496c321187Smrg 89506c321187Smrg 89510cc2eac3Smrg# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) 89520cc2eac3Smrg# ------------------------------------------------------ 89530cc2eac3Smrg# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and 89540cc2eac3Smrg# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. 89550cc2eac3Smrgm4_defun([_LT_PROG_FUNCTION_REPLACE], 89560cc2eac3Smrg[dnl { 89570cc2eac3Smrgsed -e '/^$1 ()$/,/^} # $1 /c\ 89580cc2eac3Smrg$1 ()\ 89590cc2eac3Smrg{\ 89600cc2eac3Smrgm4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) 89610cc2eac3Smrg} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ 89620cc2eac3Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 89630cc2eac3Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 89640cc2eac3Smrgtest 0 -eq $? || _lt_function_replace_fail=: 89650cc2eac3Smrg]) 89666c321187Smrg 89676c321187Smrg 89680cc2eac3Smrg# _LT_PROG_REPLACE_SHELLFNS 89690cc2eac3Smrg# ------------------------- 89700cc2eac3Smrg# Replace existing portable implementations of several shell functions with 89710cc2eac3Smrg# equivalent extended shell implementations where those features are available.. 89720cc2eac3Smrgm4_defun([_LT_PROG_REPLACE_SHELLFNS], 89730cc2eac3Smrg[if test x"$xsi_shell" = xyes; then 89740cc2eac3Smrg _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl 89750cc2eac3Smrg case ${1} in 89760cc2eac3Smrg */*) func_dirname_result="${1%/*}${2}" ;; 89770cc2eac3Smrg * ) func_dirname_result="${3}" ;; 89780cc2eac3Smrg esac]) 89790cc2eac3Smrg 89800cc2eac3Smrg _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl 89810cc2eac3Smrg func_basename_result="${1##*/}"]) 89820cc2eac3Smrg 89830cc2eac3Smrg _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl 89840cc2eac3Smrg case ${1} in 89850cc2eac3Smrg */*) func_dirname_result="${1%/*}${2}" ;; 89860cc2eac3Smrg * ) func_dirname_result="${3}" ;; 8987e120bd27Smrg esac 89880cc2eac3Smrg func_basename_result="${1##*/}"]) 89896c321187Smrg 89900cc2eac3Smrg _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl 89910cc2eac3Smrg # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 89920cc2eac3Smrg # positional parameters, so assign one to ordinary parameter first. 89930cc2eac3Smrg func_stripname_result=${3} 89940cc2eac3Smrg func_stripname_result=${func_stripname_result#"${1}"} 89950cc2eac3Smrg func_stripname_result=${func_stripname_result%"${2}"}]) 89960cc2eac3Smrg 89970cc2eac3Smrg _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl 89980cc2eac3Smrg func_split_long_opt_name=${1%%=*} 89990cc2eac3Smrg func_split_long_opt_arg=${1#*=}]) 90000cc2eac3Smrg 90010cc2eac3Smrg _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl 90020cc2eac3Smrg func_split_short_opt_arg=${1#??} 90030cc2eac3Smrg func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) 90040cc2eac3Smrg 90050cc2eac3Smrg _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl 90060cc2eac3Smrg case ${1} in 90070cc2eac3Smrg *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 90080cc2eac3Smrg *) func_lo2o_result=${1} ;; 90090cc2eac3Smrg esac]) 9010e120bd27Smrg 90110cc2eac3Smrg _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) 9012e120bd27Smrg 90130cc2eac3Smrg _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) 9014e120bd27Smrg 90150cc2eac3Smrg _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) 90160cc2eac3Smrgfi 9017e120bd27Smrg 90180cc2eac3Smrgif test x"$lt_shell_append" = xyes; then 90190cc2eac3Smrg _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) 90206c321187Smrg 90210cc2eac3Smrg _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl 90220cc2eac3Smrg func_quote_for_eval "${2}" 90230cc2eac3Smrgdnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ 90240cc2eac3Smrg eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) 90256c321187Smrg 90260cc2eac3Smrg # Save a `func_append' function call where possible by direct use of '+=' 90270cc2eac3Smrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ 90280cc2eac3Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 90290cc2eac3Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 90300cc2eac3Smrg test 0 -eq $? || _lt_function_replace_fail=: 90310cc2eac3Smrgelse 90320cc2eac3Smrg # Save a `func_append' function call even when '+=' is not available 90330cc2eac3Smrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ 90340cc2eac3Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 90350cc2eac3Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 90360cc2eac3Smrg test 0 -eq $? || _lt_function_replace_fail=: 90370cc2eac3Smrgfi 90386c321187Smrg 90390cc2eac3Smrgif test x"$_lt_function_replace_fail" = x":"; then 90400cc2eac3Smrg AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) 90410cc2eac3Smrgfi 90420cc2eac3Smrg]) 90436c321187Smrg 90440cc2eac3Smrg# _LT_PATH_CONVERSION_FUNCTIONS 90450cc2eac3Smrg# ----------------------------- 90460cc2eac3Smrg# Determine which file name conversion functions should be used by 90470cc2eac3Smrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 90480cc2eac3Smrg# for certain cross-compile configurations and native mingw. 90490cc2eac3Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 90500cc2eac3Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 90510cc2eac3SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 90520cc2eac3SmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 90530cc2eac3SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 90540cc2eac3Smrg[case $host in 90550cc2eac3Smrg *-*-mingw* ) 90560cc2eac3Smrg case $build in 90570cc2eac3Smrg *-*-mingw* ) # actually msys 90580cc2eac3Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 90590cc2eac3Smrg ;; 90600cc2eac3Smrg *-*-cygwin* ) 90610cc2eac3Smrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 90620cc2eac3Smrg ;; 90630cc2eac3Smrg * ) # otherwise, assume *nix 90640cc2eac3Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 90650cc2eac3Smrg ;; 90660cc2eac3Smrg esac 90670cc2eac3Smrg ;; 90680cc2eac3Smrg *-*-cygwin* ) 90690cc2eac3Smrg case $build in 90700cc2eac3Smrg *-*-mingw* ) # actually msys 90710cc2eac3Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 90720cc2eac3Smrg ;; 90730cc2eac3Smrg *-*-cygwin* ) 90740cc2eac3Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 90750cc2eac3Smrg ;; 90760cc2eac3Smrg * ) # otherwise, assume *nix 90770cc2eac3Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 90780cc2eac3Smrg ;; 90790cc2eac3Smrg esac 90800cc2eac3Smrg ;; 90810cc2eac3Smrg * ) # unhandled hosts (and "normal" native builds) 90820cc2eac3Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 90830cc2eac3Smrg ;; 90840cc2eac3Smrgesac 90856c321187Smrg]) 90860cc2eac3Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd 90870cc2eac3SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 90880cc2eac3Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 90890cc2eac3Smrg [0], [convert $build file names to $host format])dnl 90900cc2eac3Smrg 90910cc2eac3SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 90920cc2eac3SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 90930cc2eac3Smrg[#assume ordinary cross tools, or native build. 90940cc2eac3Smrglt_cv_to_tool_file_cmd=func_convert_file_noop 90950cc2eac3Smrgcase $host in 90960cc2eac3Smrg *-*-mingw* ) 90970cc2eac3Smrg case $build in 90980cc2eac3Smrg *-*-mingw* ) # actually msys 90990cc2eac3Smrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 91000cc2eac3Smrg ;; 91010cc2eac3Smrg esac 91020cc2eac3Smrg ;; 91030cc2eac3Smrgesac 91040cc2eac3Smrg]) 91050cc2eac3Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 91060cc2eac3SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 91070cc2eac3Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 91080cc2eac3Smrg [0], [convert $build files to toolchain format])dnl 91090cc2eac3Smrg])# _LT_PATH_CONVERSION_FUNCTIONS 91106c321187Smrg 91110cc2eac3Smrg# Helper functions for option handling. -*- Autoconf -*- 91120cc2eac3Smrg# 91130cc2eac3Smrg# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, 91140cc2eac3Smrg# Inc. 91150cc2eac3Smrg# Written by Gary V. Vaughan, 2004 91160cc2eac3Smrg# 91170cc2eac3Smrg# This file is free software; the Free Software Foundation gives 91180cc2eac3Smrg# unlimited permission to copy and/or distribute it, with or without 91190cc2eac3Smrg# modifications, as long as this notice is preserved. 91206c321187Smrg 91210cc2eac3Smrg# serial 7 ltoptions.m4 91226c321187Smrg 91230cc2eac3Smrg# This is to help aclocal find these macros, as it can't see m4_define. 91240cc2eac3SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 91256c321187Smrg 91266c321187Smrg 91270cc2eac3Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 91280cc2eac3Smrg# ------------------------------------------ 91290cc2eac3Smrgm4_define([_LT_MANGLE_OPTION], 91300cc2eac3Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 91316c321187Smrg 91326c321187Smrg 91330cc2eac3Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 91340cc2eac3Smrg# --------------------------------------- 91350cc2eac3Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 91360cc2eac3Smrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 91370cc2eac3Smrg# saved as a flag. 91380cc2eac3Smrgm4_define([_LT_SET_OPTION], 91390cc2eac3Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 91400cc2eac3Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 91410cc2eac3Smrg _LT_MANGLE_DEFUN([$1], [$2]), 91420cc2eac3Smrg [m4_warning([Unknown $1 option `$2'])])[]dnl 91430cc2eac3Smrg]) 91446c321187Smrg 91456c321187Smrg 91460cc2eac3Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 91470cc2eac3Smrg# ------------------------------------------------------------ 91480cc2eac3Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 91490cc2eac3Smrgm4_define([_LT_IF_OPTION], 91500cc2eac3Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 91516c321187Smrg 9152e120bd27Smrg 91530cc2eac3Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 91540cc2eac3Smrg# ------------------------------------------------------- 91550cc2eac3Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 91560cc2eac3Smrg# are set. 91570cc2eac3Smrgm4_define([_LT_UNLESS_OPTIONS], 91580cc2eac3Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 91590cc2eac3Smrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 91600cc2eac3Smrg [m4_define([$0_found])])])[]dnl 91610cc2eac3Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 91620cc2eac3Smrg])[]dnl 91630cc2eac3Smrg]) 9164e120bd27Smrg 9165e120bd27Smrg 91660cc2eac3Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 91670cc2eac3Smrg# ---------------------------------------- 91680cc2eac3Smrg# OPTION-LIST is a space-separated list of Libtool options associated 91690cc2eac3Smrg# with MACRO-NAME. If any OPTION has a matching handler declared with 91700cc2eac3Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 91710cc2eac3Smrg# the unknown option and exit. 91720cc2eac3Smrgm4_defun([_LT_SET_OPTIONS], 91730cc2eac3Smrg[# Set options 91740cc2eac3Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 91750cc2eac3Smrg [_LT_SET_OPTION([$1], _LT_Option)]) 91760cc2eac3Smrg 91770cc2eac3Smrgm4_if([$1],[LT_INIT],[ 91780cc2eac3Smrg dnl 91790cc2eac3Smrg dnl Simply set some default values (i.e off) if boolean options were not 91800cc2eac3Smrg dnl specified: 91810cc2eac3Smrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 91820cc2eac3Smrg ]) 91830cc2eac3Smrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 91840cc2eac3Smrg ]) 91850cc2eac3Smrg dnl 91860cc2eac3Smrg dnl If no reference was made to various pairs of opposing options, then 91870cc2eac3Smrg dnl we run the default mode handler for the pair. For example, if neither 91880cc2eac3Smrg dnl `shared' nor `disable-shared' was passed, we enable building of shared 91890cc2eac3Smrg dnl archives by default: 91900cc2eac3Smrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 91910cc2eac3Smrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 91920cc2eac3Smrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 91930cc2eac3Smrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 91940cc2eac3Smrg [_LT_ENABLE_FAST_INSTALL]) 91950cc2eac3Smrg ]) 91960cc2eac3Smrg])# _LT_SET_OPTIONS 9197e120bd27Smrg 9198e120bd27Smrg 91996c321187Smrg 92000cc2eac3Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 92010cc2eac3Smrg# ----------------------------------------- 92020cc2eac3Smrgm4_define([_LT_MANGLE_DEFUN], 92030cc2eac3Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 92046c321187Smrg 9205e120bd27Smrg 92060cc2eac3Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 92070cc2eac3Smrg# ----------------------------------------------- 92080cc2eac3Smrgm4_define([LT_OPTION_DEFINE], 92090cc2eac3Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 92100cc2eac3Smrg])# LT_OPTION_DEFINE 9211e120bd27Smrg 92126c321187Smrg 92130cc2eac3Smrg# dlopen 92140cc2eac3Smrg# ------ 92150cc2eac3SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 92160cc2eac3Smrg]) 92176c321187Smrg 92180cc2eac3SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 92190cc2eac3Smrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 92200cc2eac3SmrgAC_DIAGNOSE([obsolete], 92210cc2eac3Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 92220cc2eac3Smrgput the `dlopen' option into LT_INIT's first parameter.]) 92230cc2eac3Smrg]) 92246c321187Smrg 92250cc2eac3Smrgdnl aclocal-1.4 backwards compatibility: 92260cc2eac3Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 9227e120bd27Smrg 92286c321187Smrg 92290cc2eac3Smrg# win32-dll 92300cc2eac3Smrg# --------- 92310cc2eac3Smrg# Declare package support for building win32 dll's. 92320cc2eac3SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 92330cc2eac3Smrg[enable_win32_dll=yes 92346c321187Smrg 92350cc2eac3Smrgcase $host in 92360cc2eac3Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 92370cc2eac3Smrg AC_CHECK_TOOL(AS, as, false) 92380cc2eac3Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 92390cc2eac3Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 92400cc2eac3Smrg ;; 92410cc2eac3Smrgesac 92426c321187Smrg 92430cc2eac3Smrgtest -z "$AS" && AS=as 92440cc2eac3Smrg_LT_DECL([], [AS], [1], [Assembler program])dnl 92456c321187Smrg 92460cc2eac3Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 92470cc2eac3Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 92486c321187Smrg 92490cc2eac3Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 92500cc2eac3Smrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 92510cc2eac3Smrg])# win32-dll 92526c321187Smrg 92530cc2eac3SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 92540cc2eac3Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 92550cc2eac3Smrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 92560cc2eac3SmrgAC_DIAGNOSE([obsolete], 92570cc2eac3Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 92580cc2eac3Smrgput the `win32-dll' option into LT_INIT's first parameter.]) 92590cc2eac3Smrg]) 9260e120bd27Smrg 92610cc2eac3Smrgdnl aclocal-1.4 backwards compatibility: 92620cc2eac3Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 9263e120bd27Smrg 9264e120bd27Smrg 92650cc2eac3Smrg# _LT_ENABLE_SHARED([DEFAULT]) 92660cc2eac3Smrg# ---------------------------- 92670cc2eac3Smrg# implement the --enable-shared flag, and supports the `shared' and 92680cc2eac3Smrg# `disable-shared' LT_INIT options. 92690cc2eac3Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 92700cc2eac3Smrgm4_define([_LT_ENABLE_SHARED], 92710cc2eac3Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 92720cc2eac3SmrgAC_ARG_ENABLE([shared], 92730cc2eac3Smrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 92740cc2eac3Smrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 92750cc2eac3Smrg [p=${PACKAGE-default} 92760cc2eac3Smrg case $enableval in 92770cc2eac3Smrg yes) enable_shared=yes ;; 92780cc2eac3Smrg no) enable_shared=no ;; 92790cc2eac3Smrg *) 92800cc2eac3Smrg enable_shared=no 92810cc2eac3Smrg # Look at the argument we got. We use all the common list separators. 92820cc2eac3Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 92830cc2eac3Smrg for pkg in $enableval; do 92840cc2eac3Smrg IFS="$lt_save_ifs" 92850cc2eac3Smrg if test "X$pkg" = "X$p"; then 92860cc2eac3Smrg enable_shared=yes 92870cc2eac3Smrg fi 92880cc2eac3Smrg done 92890cc2eac3Smrg IFS="$lt_save_ifs" 92900cc2eac3Smrg ;; 92910cc2eac3Smrg esac], 92920cc2eac3Smrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 9293e120bd27Smrg 92940cc2eac3Smrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 92950cc2eac3Smrg [Whether or not to build shared libraries]) 92960cc2eac3Smrg])# _LT_ENABLE_SHARED 9297e120bd27Smrg 92980cc2eac3SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 92990cc2eac3SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 93006c321187Smrg 93010cc2eac3Smrg# Old names: 93020cc2eac3SmrgAC_DEFUN([AC_ENABLE_SHARED], 93030cc2eac3Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 93040cc2eac3Smrg]) 93056c321187Smrg 93060cc2eac3SmrgAC_DEFUN([AC_DISABLE_SHARED], 93070cc2eac3Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 93080cc2eac3Smrg]) 93096c321187Smrg 93100cc2eac3SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 93110cc2eac3SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 9312e120bd27Smrg 93130cc2eac3Smrgdnl aclocal-1.4 backwards compatibility: 93140cc2eac3Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 93150cc2eac3Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 93166c321187Smrg 9317e120bd27Smrg 9318e120bd27Smrg 93190cc2eac3Smrg# _LT_ENABLE_STATIC([DEFAULT]) 93200cc2eac3Smrg# ---------------------------- 93210cc2eac3Smrg# implement the --enable-static flag, and support the `static' and 93220cc2eac3Smrg# `disable-static' LT_INIT options. 93230cc2eac3Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 93240cc2eac3Smrgm4_define([_LT_ENABLE_STATIC], 93250cc2eac3Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 93260cc2eac3SmrgAC_ARG_ENABLE([static], 93270cc2eac3Smrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 93280cc2eac3Smrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 93290cc2eac3Smrg [p=${PACKAGE-default} 93300cc2eac3Smrg case $enableval in 93310cc2eac3Smrg yes) enable_static=yes ;; 93320cc2eac3Smrg no) enable_static=no ;; 93330cc2eac3Smrg *) 93340cc2eac3Smrg enable_static=no 93350cc2eac3Smrg # Look at the argument we got. We use all the common list separators. 93360cc2eac3Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 93370cc2eac3Smrg for pkg in $enableval; do 93380cc2eac3Smrg IFS="$lt_save_ifs" 93390cc2eac3Smrg if test "X$pkg" = "X$p"; then 93400cc2eac3Smrg enable_static=yes 93410cc2eac3Smrg fi 93420cc2eac3Smrg done 93430cc2eac3Smrg IFS="$lt_save_ifs" 93440cc2eac3Smrg ;; 93450cc2eac3Smrg esac], 93460cc2eac3Smrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 9347e120bd27Smrg 93480cc2eac3Smrg _LT_DECL([build_old_libs], [enable_static], [0], 93490cc2eac3Smrg [Whether or not to build static libraries]) 93500cc2eac3Smrg])# _LT_ENABLE_STATIC 9351e120bd27Smrg 93520cc2eac3SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 93530cc2eac3SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 93546c321187Smrg 93550cc2eac3Smrg# Old names: 93560cc2eac3SmrgAC_DEFUN([AC_ENABLE_STATIC], 93570cc2eac3Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 93580cc2eac3Smrg]) 93596c321187Smrg 93600cc2eac3SmrgAC_DEFUN([AC_DISABLE_STATIC], 93610cc2eac3Smrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 93620cc2eac3Smrg]) 93636c321187Smrg 93640cc2eac3SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 93650cc2eac3SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 9366e120bd27Smrg 93670cc2eac3Smrgdnl aclocal-1.4 backwards compatibility: 93680cc2eac3Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 93690cc2eac3Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 9370e120bd27Smrg 9371e120bd27Smrg 9372e120bd27Smrg 93730cc2eac3Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 93740cc2eac3Smrg# ---------------------------------- 93750cc2eac3Smrg# implement the --enable-fast-install flag, and support the `fast-install' 93760cc2eac3Smrg# and `disable-fast-install' LT_INIT options. 93770cc2eac3Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 93780cc2eac3Smrgm4_define([_LT_ENABLE_FAST_INSTALL], 93790cc2eac3Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 93800cc2eac3SmrgAC_ARG_ENABLE([fast-install], 93810cc2eac3Smrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 93820cc2eac3Smrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 93830cc2eac3Smrg [p=${PACKAGE-default} 93840cc2eac3Smrg case $enableval in 93850cc2eac3Smrg yes) enable_fast_install=yes ;; 93860cc2eac3Smrg no) enable_fast_install=no ;; 93870cc2eac3Smrg *) 93880cc2eac3Smrg enable_fast_install=no 93890cc2eac3Smrg # Look at the argument we got. We use all the common list separators. 93900cc2eac3Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 93910cc2eac3Smrg for pkg in $enableval; do 93920cc2eac3Smrg IFS="$lt_save_ifs" 93930cc2eac3Smrg if test "X$pkg" = "X$p"; then 93940cc2eac3Smrg enable_fast_install=yes 93956c321187Smrg fi 93960cc2eac3Smrg done 93970cc2eac3Smrg IFS="$lt_save_ifs" 93980cc2eac3Smrg ;; 93990cc2eac3Smrg esac], 94000cc2eac3Smrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 9401e120bd27Smrg 94020cc2eac3Smrg_LT_DECL([fast_install], [enable_fast_install], [0], 94030cc2eac3Smrg [Whether or not to optimize for fast installation])dnl 94040cc2eac3Smrg])# _LT_ENABLE_FAST_INSTALL 9405e120bd27Smrg 94060cc2eac3SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 94070cc2eac3SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 9408e120bd27Smrg 94090cc2eac3Smrg# Old names: 94100cc2eac3SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 94110cc2eac3Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 94120cc2eac3SmrgAC_DIAGNOSE([obsolete], 94130cc2eac3Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 94140cc2eac3Smrgthe `fast-install' option into LT_INIT's first parameter.]) 94150cc2eac3Smrg]) 9416e120bd27Smrg 94170cc2eac3SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 94180cc2eac3Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 94190cc2eac3SmrgAC_DIAGNOSE([obsolete], 94200cc2eac3Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 94210cc2eac3Smrgthe `disable-fast-install' option into LT_INIT's first parameter.]) 94220cc2eac3Smrg]) 9423e120bd27Smrg 94240cc2eac3Smrgdnl aclocal-1.4 backwards compatibility: 94250cc2eac3Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 94260cc2eac3Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 94276c321187Smrg 94286c321187Smrg 94290cc2eac3Smrg# _LT_WITH_PIC([MODE]) 94300cc2eac3Smrg# -------------------- 94310cc2eac3Smrg# implement the --with-pic flag, and support the `pic-only' and `no-pic' 94320cc2eac3Smrg# LT_INIT options. 94330cc2eac3Smrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 94340cc2eac3Smrgm4_define([_LT_WITH_PIC], 94350cc2eac3Smrg[AC_ARG_WITH([pic], 94369d0b5e55Smrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 94370cc2eac3Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 94389d0b5e55Smrg [lt_p=${PACKAGE-default} 94399d0b5e55Smrg case $withval in 94409d0b5e55Smrg yes|no) pic_mode=$withval ;; 94419d0b5e55Smrg *) 94429d0b5e55Smrg pic_mode=default 94439d0b5e55Smrg # Look at the argument we got. We use all the common list separators. 94449d0b5e55Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 94459d0b5e55Smrg for lt_pkg in $withval; do 94469d0b5e55Smrg IFS="$lt_save_ifs" 94479d0b5e55Smrg if test "X$lt_pkg" = "X$lt_p"; then 94489d0b5e55Smrg pic_mode=yes 94499d0b5e55Smrg fi 94509d0b5e55Smrg done 94519d0b5e55Smrg IFS="$lt_save_ifs" 94529d0b5e55Smrg ;; 94539d0b5e55Smrg esac], 94540cc2eac3Smrg [pic_mode=default]) 94550cc2eac3Smrg 94560cc2eac3Smrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 94576c321187Smrg 94580cc2eac3Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 94590cc2eac3Smrg])# _LT_WITH_PIC 94606c321187Smrg 94610cc2eac3SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 94620cc2eac3SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 94636c321187Smrg 94640cc2eac3Smrg# Old name: 94650cc2eac3SmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 94660cc2eac3Smrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 94670cc2eac3SmrgAC_DIAGNOSE([obsolete], 94680cc2eac3Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 94690cc2eac3Smrgput the `pic-only' option into LT_INIT's first parameter.]) 94700cc2eac3Smrg]) 94716c321187Smrg 94720cc2eac3Smrgdnl aclocal-1.4 backwards compatibility: 94730cc2eac3Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 94746c321187Smrg 94756c321187Smrg 94760cc2eac3Smrgm4_define([_LTDL_MODE], []) 94770cc2eac3SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 94780cc2eac3Smrg [m4_define([_LTDL_MODE], [nonrecursive])]) 94790cc2eac3SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 94800cc2eac3Smrg [m4_define([_LTDL_MODE], [recursive])]) 94810cc2eac3SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 94820cc2eac3Smrg [m4_define([_LTDL_MODE], [subproject])]) 94836c321187Smrg 94840cc2eac3Smrgm4_define([_LTDL_TYPE], []) 94850cc2eac3SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 94860cc2eac3Smrg [m4_define([_LTDL_TYPE], [installable])]) 94870cc2eac3SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 94880cc2eac3Smrg [m4_define([_LTDL_TYPE], [convenience])]) 94896c321187Smrg 94900cc2eac3Smrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 94910cc2eac3Smrg# 94920cc2eac3Smrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 94930cc2eac3Smrg# Written by Gary V. Vaughan, 2004 94940cc2eac3Smrg# 94950cc2eac3Smrg# This file is free software; the Free Software Foundation gives 94960cc2eac3Smrg# unlimited permission to copy and/or distribute it, with or without 94970cc2eac3Smrg# modifications, as long as this notice is preserved. 9498e120bd27Smrg 94990cc2eac3Smrg# serial 6 ltsugar.m4 9500e120bd27Smrg 95010cc2eac3Smrg# This is to help aclocal find these macros, as it can't see m4_define. 95020cc2eac3SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 9503e120bd27Smrg 9504e120bd27Smrg 95050cc2eac3Smrg# lt_join(SEP, ARG1, [ARG2...]) 95060cc2eac3Smrg# ----------------------------- 95070cc2eac3Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 95080cc2eac3Smrg# associated separator. 95090cc2eac3Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 95100cc2eac3Smrg# versions in m4sugar had bugs. 95110cc2eac3Smrgm4_define([lt_join], 95120cc2eac3Smrg[m4_if([$#], [1], [], 95130cc2eac3Smrg [$#], [2], [[$2]], 95140cc2eac3Smrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 95150cc2eac3Smrgm4_define([_lt_join], 95160cc2eac3Smrg[m4_if([$#$2], [2], [], 95170cc2eac3Smrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 9518e120bd27Smrg 9519e120bd27Smrg 95200cc2eac3Smrg# lt_car(LIST) 95210cc2eac3Smrg# lt_cdr(LIST) 95220cc2eac3Smrg# ------------ 95230cc2eac3Smrg# Manipulate m4 lists. 95240cc2eac3Smrg# These macros are necessary as long as will still need to support 95250cc2eac3Smrg# Autoconf-2.59 which quotes differently. 95260cc2eac3Smrgm4_define([lt_car], [[$1]]) 95270cc2eac3Smrgm4_define([lt_cdr], 95280cc2eac3Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 95290cc2eac3Smrg [$#], 1, [], 95300cc2eac3Smrg [m4_dquote(m4_shift($@))])]) 95310cc2eac3Smrgm4_define([lt_unquote], $1) 95326c321187Smrg 95336c321187Smrg 95340cc2eac3Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 95350cc2eac3Smrg# ------------------------------------------ 95360cc2eac3Smrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 95370cc2eac3Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 95380cc2eac3Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 95390cc2eac3Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 95400cc2eac3Smrg# than defined and empty). 95410cc2eac3Smrg# 95420cc2eac3Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 95430cc2eac3Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 95440cc2eac3Smrgm4_define([lt_append], 95450cc2eac3Smrg[m4_define([$1], 95460cc2eac3Smrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 95476c321187Smrg 95486c321187Smrg 95496c321187Smrg 95500cc2eac3Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 95510cc2eac3Smrg# ---------------------------------------------------------- 95520cc2eac3Smrg# Produce a SEP delimited list of all paired combinations of elements of 95530cc2eac3Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 95540cc2eac3Smrg# has the form PREFIXmINFIXSUFFIXn. 95550cc2eac3Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 95560cc2eac3Smrgm4_define([lt_combine], 95570cc2eac3Smrg[m4_if(m4_eval([$# > 3]), [1], 95580cc2eac3Smrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 95590cc2eac3Smrg[[m4_foreach([_Lt_prefix], [$2], 95600cc2eac3Smrg [m4_foreach([_Lt_suffix], 95610cc2eac3Smrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 95620cc2eac3Smrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 95636c321187Smrg 95646c321187Smrg 95650cc2eac3Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 95660cc2eac3Smrg# ----------------------------------------------------------------------- 95670cc2eac3Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 95680cc2eac3Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 95690cc2eac3Smrgm4_define([lt_if_append_uniq], 95700cc2eac3Smrg[m4_ifdef([$1], 95710cc2eac3Smrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 95720cc2eac3Smrg [lt_append([$1], [$2], [$3])$4], 95730cc2eac3Smrg [$5])], 95740cc2eac3Smrg [lt_append([$1], [$2], [$3])$4])]) 957593493779Smrg 95766c321187Smrg 95770cc2eac3Smrg# lt_dict_add(DICT, KEY, VALUE) 95780cc2eac3Smrg# ----------------------------- 95790cc2eac3Smrgm4_define([lt_dict_add], 95800cc2eac3Smrg[m4_define([$1($2)], [$3])]) 95816c321187Smrg 95826c321187Smrg 95830cc2eac3Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 95840cc2eac3Smrg# -------------------------------------------- 95850cc2eac3Smrgm4_define([lt_dict_add_subkey], 95860cc2eac3Smrg[m4_define([$1($2:$3)], [$4])]) 95876c321187Smrg 95886c321187Smrg 95890cc2eac3Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 95900cc2eac3Smrg# ---------------------------------- 95910cc2eac3Smrgm4_define([lt_dict_fetch], 95920cc2eac3Smrg[m4_ifval([$3], 95930cc2eac3Smrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 95940cc2eac3Smrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 95956c321187Smrg 95960cc2eac3Smrg 95970cc2eac3Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 95980cc2eac3Smrg# ----------------------------------------------------------------- 95990cc2eac3Smrgm4_define([lt_if_dict_fetch], 96000cc2eac3Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 96010cc2eac3Smrg [$5], 96020cc2eac3Smrg [$6])]) 96036c321187Smrg 9604e120bd27Smrg 96050cc2eac3Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 96060cc2eac3Smrg# -------------------------------------------------------------- 96070cc2eac3Smrgm4_define([lt_dict_filter], 96080cc2eac3Smrg[m4_if([$5], [], [], 96090cc2eac3Smrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 96100cc2eac3Smrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 96110cc2eac3Smrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 96126c321187Smrg]) 96136c321187Smrg 96140cc2eac3Smrg# ltversion.m4 -- version numbers -*- Autoconf -*- 96150cc2eac3Smrg# 96160cc2eac3Smrg# Copyright (C) 2004 Free Software Foundation, Inc. 96170cc2eac3Smrg# Written by Scott James Remnant, 2004 96180cc2eac3Smrg# 96190cc2eac3Smrg# This file is free software; the Free Software Foundation gives 96200cc2eac3Smrg# unlimited permission to copy and/or distribute it, with or without 96210cc2eac3Smrg# modifications, as long as this notice is preserved. 96226c321187Smrg 96230cc2eac3Smrg# @configure_input@ 9624e120bd27Smrg 96259d0b5e55Smrg# serial 3337 ltversion.m4 96260cc2eac3Smrg# This file is part of GNU Libtool 96276c321187Smrg 96289d0b5e55Smrgm4_define([LT_PACKAGE_VERSION], [2.4.2]) 96299d0b5e55Smrgm4_define([LT_PACKAGE_REVISION], [1.3337]) 96306c321187Smrg 96310cc2eac3SmrgAC_DEFUN([LTVERSION_VERSION], 96329d0b5e55Smrg[macro_version='2.4.2' 96339d0b5e55Smrgmacro_revision='1.3337' 96340cc2eac3Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 96350cc2eac3Smrg_LT_DECL(, macro_revision, 0) 9636e120bd27Smrg]) 9637e120bd27Smrg 96380cc2eac3Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 96390cc2eac3Smrg# 96400cc2eac3Smrg# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. 96410cc2eac3Smrg# Written by Scott James Remnant, 2004. 96420cc2eac3Smrg# 96430cc2eac3Smrg# This file is free software; the Free Software Foundation gives 96440cc2eac3Smrg# unlimited permission to copy and/or distribute it, with or without 96450cc2eac3Smrg# modifications, as long as this notice is preserved. 96460cc2eac3Smrg 96470cc2eac3Smrg# serial 5 lt~obsolete.m4 9648e120bd27Smrg 96490cc2eac3Smrg# These exist entirely to fool aclocal when bootstrapping libtool. 96500cc2eac3Smrg# 96510cc2eac3Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 96520cc2eac3Smrg# which have later been changed to m4_define as they aren't part of the 96530cc2eac3Smrg# exported API, or moved to Autoconf or Automake where they belong. 96540cc2eac3Smrg# 96550cc2eac3Smrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 96560cc2eac3Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 96570cc2eac3Smrg# using a macro with the same name in our local m4/libtool.m4 it'll 96580cc2eac3Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 96590cc2eac3Smrg# and doesn't know about Autoconf macros at all.) 96600cc2eac3Smrg# 96610cc2eac3Smrg# So we provide this file, which has a silly filename so it's always 96620cc2eac3Smrg# included after everything else. This provides aclocal with the 96630cc2eac3Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 96640cc2eac3Smrg# because those macros already exist, or will be overwritten later. 96650cc2eac3Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 96660cc2eac3Smrg# 96670cc2eac3Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 96680cc2eac3Smrg# Yes, that means every name once taken will need to remain here until 96690cc2eac3Smrg# we give up compatibility with versions before 1.7, at which point 96700cc2eac3Smrg# we need to keep only those names which we still refer to. 9671e120bd27Smrg 96720cc2eac3Smrg# This is to help aclocal find these macros, as it can't see m4_define. 96730cc2eac3SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 9674e120bd27Smrg 96750cc2eac3Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 96760cc2eac3Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 96770cc2eac3Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 96780cc2eac3Smrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 96790cc2eac3Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 96800cc2eac3Smrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 96810cc2eac3Smrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 96820cc2eac3Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 96830cc2eac3Smrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 96840cc2eac3Smrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 96850cc2eac3Smrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 96860cc2eac3Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 96870cc2eac3Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 96880cc2eac3Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 96890cc2eac3Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 96900cc2eac3Smrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 96910cc2eac3Smrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 96920cc2eac3Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 96930cc2eac3Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 96940cc2eac3Smrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 96950cc2eac3Smrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 96960cc2eac3Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 96970cc2eac3Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 96980cc2eac3Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 96990cc2eac3Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 97000cc2eac3Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 97010cc2eac3Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 97020cc2eac3Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 97030cc2eac3Smrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 97040cc2eac3Smrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 97050cc2eac3Smrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 97060cc2eac3Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 97070cc2eac3Smrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 97080cc2eac3Smrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 97090cc2eac3Smrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 97100cc2eac3Smrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 97110cc2eac3Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 97120cc2eac3Smrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 97130cc2eac3Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 97140cc2eac3Smrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 97150cc2eac3Smrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 97160cc2eac3Smrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 97170cc2eac3Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 97180cc2eac3Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 97190cc2eac3Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 97200cc2eac3Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 97210cc2eac3Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 97220cc2eac3Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 97230cc2eac3Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 97240cc2eac3Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 97250cc2eac3Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 97260cc2eac3Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 97270cc2eac3Smrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 97280cc2eac3Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 97290cc2eac3Smrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 97300cc2eac3Smrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 97310cc2eac3Smrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 97320cc2eac3Smrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 97330cc2eac3Smrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 97340cc2eac3Smrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 97350cc2eac3Smrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 9736e120bd27Smrg 97379d0b5e55Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 97389d0b5e55Smrg# 97399d0b5e55Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 97409d0b5e55Smrg# 97419d0b5e55Smrg# This program is free software; you can redistribute it and/or modify 97429d0b5e55Smrg# it under the terms of the GNU General Public License as published by 97439d0b5e55Smrg# the Free Software Foundation; either version 2 of the License, or 97449d0b5e55Smrg# (at your option) any later version. 97459d0b5e55Smrg# 97469d0b5e55Smrg# This program is distributed in the hope that it will be useful, but 97479d0b5e55Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 97489d0b5e55Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 97499d0b5e55Smrg# General Public License for more details. 97509d0b5e55Smrg# 97519d0b5e55Smrg# You should have received a copy of the GNU General Public License 97529d0b5e55Smrg# along with this program; if not, write to the Free Software 97539d0b5e55Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 97549d0b5e55Smrg# 97559d0b5e55Smrg# As a special exception to the GNU General Public License, if you 97569d0b5e55Smrg# distribute this file as part of a program that contains a 97579d0b5e55Smrg# configuration script generated by Autoconf, you may include it under 97589d0b5e55Smrg# the same distribution terms that you use for the rest of that program. 97599d0b5e55Smrg 97609d0b5e55Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 97619d0b5e55Smrg# ---------------------------------- 97629d0b5e55SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 97639d0b5e55Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 97649d0b5e55Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 97659d0b5e55SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 97669d0b5e55Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 97679d0b5e55Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 97689d0b5e55Smrgfi 97699d0b5e55Smrgif test -n "$PKG_CONFIG"; then 97709d0b5e55Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 97719d0b5e55Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 97729d0b5e55Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 97739d0b5e55Smrg AC_MSG_RESULT([yes]) 97749d0b5e55Smrg else 97759d0b5e55Smrg AC_MSG_RESULT([no]) 97769d0b5e55Smrg PKG_CONFIG="" 97779d0b5e55Smrg fi 97789d0b5e55Smrg 97799d0b5e55Smrgfi[]dnl 97809d0b5e55Smrg])# PKG_PROG_PKG_CONFIG 97819d0b5e55Smrg 97829d0b5e55Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 97839d0b5e55Smrg# 97849d0b5e55Smrg# Check to see whether a particular set of modules exists. Similar 97859d0b5e55Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 97869d0b5e55Smrg# 97879d0b5e55Smrg# 97889d0b5e55Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 97899d0b5e55Smrg# this or PKG_CHECK_MODULES is called, or make sure to call 97909d0b5e55Smrg# PKG_CHECK_EXISTS manually 97919d0b5e55Smrg# -------------------------------------------------------------- 97929d0b5e55SmrgAC_DEFUN([PKG_CHECK_EXISTS], 97939d0b5e55Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 97949d0b5e55Smrgif test -n "$PKG_CONFIG" && \ 97959d0b5e55Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 97969d0b5e55Smrg m4_ifval([$2], [$2], [:]) 97979d0b5e55Smrgm4_ifvaln([$3], [else 97989d0b5e55Smrg $3])dnl 97999d0b5e55Smrgfi]) 98009d0b5e55Smrg 98019d0b5e55Smrg 98029d0b5e55Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 98039d0b5e55Smrg# --------------------------------------------- 98049d0b5e55Smrgm4_define([_PKG_CONFIG], 98059d0b5e55Smrg[if test -n "$$1"; then 98069d0b5e55Smrg pkg_cv_[]$1="$$1" 98079d0b5e55Smrg elif test -n "$PKG_CONFIG"; then 98089d0b5e55Smrg PKG_CHECK_EXISTS([$3], 98099d0b5e55Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 98109d0b5e55Smrg [pkg_failed=yes]) 98119d0b5e55Smrg else 98129d0b5e55Smrg pkg_failed=untried 98139d0b5e55Smrgfi[]dnl 98149d0b5e55Smrg])# _PKG_CONFIG 98159d0b5e55Smrg 98169d0b5e55Smrg# _PKG_SHORT_ERRORS_SUPPORTED 98179d0b5e55Smrg# ----------------------------- 98189d0b5e55SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 98199d0b5e55Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 98209d0b5e55Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 98219d0b5e55Smrg _pkg_short_errors_supported=yes 98229d0b5e55Smrgelse 98239d0b5e55Smrg _pkg_short_errors_supported=no 98249d0b5e55Smrgfi[]dnl 98259d0b5e55Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 98269d0b5e55Smrg 98279d0b5e55Smrg 98289d0b5e55Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 98299d0b5e55Smrg# [ACTION-IF-NOT-FOUND]) 98309d0b5e55Smrg# 98319d0b5e55Smrg# 98329d0b5e55Smrg# Note that if there is a possibility the first call to 98339d0b5e55Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 98349d0b5e55Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 98359d0b5e55Smrg# 98369d0b5e55Smrg# 98379d0b5e55Smrg# -------------------------------------------------------------- 98389d0b5e55SmrgAC_DEFUN([PKG_CHECK_MODULES], 98399d0b5e55Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 98409d0b5e55SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 98419d0b5e55SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 98429d0b5e55Smrg 98439d0b5e55Smrgpkg_failed=no 98449d0b5e55SmrgAC_MSG_CHECKING([for $1]) 98459d0b5e55Smrg 98469d0b5e55Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 98479d0b5e55Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 98489d0b5e55Smrg 98499d0b5e55Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 98509d0b5e55Smrgand $1[]_LIBS to avoid the need to call pkg-config. 98519d0b5e55SmrgSee the pkg-config man page for more details.]) 98529d0b5e55Smrg 98539d0b5e55Smrgif test $pkg_failed = yes; then 98549d0b5e55Smrg _PKG_SHORT_ERRORS_SUPPORTED 98559d0b5e55Smrg if test $_pkg_short_errors_supported = yes; then 98569d0b5e55Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 98579d0b5e55Smrg else 98589d0b5e55Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 98599d0b5e55Smrg fi 98609d0b5e55Smrg # Put the nasty error message in config.log where it belongs 98619d0b5e55Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 98629d0b5e55Smrg 98639d0b5e55Smrg ifelse([$4], , [AC_MSG_ERROR(dnl 98649d0b5e55Smrg[Package requirements ($2) were not met: 98659d0b5e55Smrg 98669d0b5e55Smrg$$1_PKG_ERRORS 98679d0b5e55Smrg 98689d0b5e55SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 98699d0b5e55Smrginstalled software in a non-standard prefix. 98709d0b5e55Smrg 98719d0b5e55Smrg_PKG_TEXT 98729d0b5e55Smrg])], 98739d0b5e55Smrg [AC_MSG_RESULT([no]) 98749d0b5e55Smrg $4]) 98759d0b5e55Smrgelif test $pkg_failed = untried; then 98769d0b5e55Smrg ifelse([$4], , [AC_MSG_FAILURE(dnl 98779d0b5e55Smrg[The pkg-config script could not be found or is too old. Make sure it 98789d0b5e55Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 98799d0b5e55Smrgpath to pkg-config. 98809d0b5e55Smrg 98819d0b5e55Smrg_PKG_TEXT 98829d0b5e55Smrg 98839d0b5e55SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 98849d0b5e55Smrg [$4]) 98859d0b5e55Smrgelse 98869d0b5e55Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 98879d0b5e55Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 98889d0b5e55Smrg AC_MSG_RESULT([yes]) 98899d0b5e55Smrg ifelse([$3], , :, [$3]) 98909d0b5e55Smrgfi[]dnl 98919d0b5e55Smrg])# PKG_CHECK_MODULES 98929d0b5e55Smrg 98930cc2eac3Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 98940cc2eac3Smrgdnl 98950cc2eac3Smrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 98969d0b5e55Smrgdnl 98970cc2eac3Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 98980cc2eac3Smrgdnl copy of this software and associated documentation files (the "Software"), 98990cc2eac3Smrgdnl to deal in the Software without restriction, including without limitation 99000cc2eac3Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 99010cc2eac3Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 99020cc2eac3Smrgdnl Software is furnished to do so, subject to the following conditions: 99030cc2eac3Smrgdnl 99040cc2eac3Smrgdnl The above copyright notice and this permission notice (including the next 99050cc2eac3Smrgdnl paragraph) shall be included in all copies or substantial portions of the 99060cc2eac3Smrgdnl Software. 99070cc2eac3Smrgdnl 99080cc2eac3Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 99090cc2eac3Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 99100cc2eac3Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 99110cc2eac3Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 99120cc2eac3Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 99130cc2eac3Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 99140cc2eac3Smrgdnl DEALINGS IN THE SOFTWARE. 9915e120bd27Smrg 99160cc2eac3Smrg# XORG_MACROS_VERSION(required-version) 99170cc2eac3Smrg# ------------------------------------- 99180cc2eac3Smrg# Minimum version: 1.1.0 99190cc2eac3Smrg# 99200cc2eac3Smrg# If you're using a macro added in Version 1.1 or newer, include this in 99210cc2eac3Smrg# your configure.ac with the minimum required version, such as: 99220cc2eac3Smrg# XORG_MACROS_VERSION(1.1) 99230cc2eac3Smrg# 99240cc2eac3Smrg# To ensure that this macro is defined, also add: 99250cc2eac3Smrg# m4_ifndef([XORG_MACROS_VERSION], 99260cc2eac3Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 99270cc2eac3Smrg# 99280cc2eac3Smrg# 99299d0b5e55Smrg# See the "minimum version" comment for each macro you use to see what 99300cc2eac3Smrg# version you require. 99310cc2eac3Smrgm4_defun([XORG_MACROS_VERSION],[ 99329d0b5e55Smrgm4_define([vers_have], [1.17.1]) 99330cc2eac3Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 99340cc2eac3Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 99350cc2eac3Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 99360cc2eac3Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 99370cc2eac3Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 99380cc2eac3Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 99390cc2eac3Smrgm4_undefine([vers_have]) 99400cc2eac3Smrgm4_undefine([maj_have]) 99410cc2eac3Smrgm4_undefine([maj_needed]) 99420cc2eac3Smrg]) # XORG_MACROS_VERSION 9943e120bd27Smrg 99440cc2eac3Smrg# XORG_PROG_RAWCPP() 99450cc2eac3Smrg# ------------------ 99460cc2eac3Smrg# Minimum version: 1.0.0 99470cc2eac3Smrg# 99480cc2eac3Smrg# Find cpp program and necessary flags for use in pre-processing text files 99490cc2eac3Smrg# such as man pages and config files 99500cc2eac3SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 99510cc2eac3SmrgAC_REQUIRE([AC_PROG_CPP]) 99529d0b5e55SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 99530cc2eac3Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 9954e120bd27Smrg 99550cc2eac3Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 99560cc2eac3Smrg# which is not the best choice for supporting other OS'es, but covers most 99570cc2eac3Smrg# of the ones we need for now. 99580cc2eac3SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 99590cc2eac3SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 99600cc2eac3Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 99610cc2eac3Smrg AC_MSG_RESULT([no]) 99620cc2eac3Smrgelse 99630cc2eac3Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 99640cc2eac3Smrg RAWCPPFLAGS=-undef 99650cc2eac3Smrg AC_MSG_RESULT([yes]) 99660cc2eac3Smrg # under Cygwin unix is still defined even with -undef 99670cc2eac3Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 99680cc2eac3Smrg RAWCPPFLAGS="-undef -ansi" 99690cc2eac3Smrg AC_MSG_RESULT([yes, with -ansi]) 99700cc2eac3Smrg else 99710cc2eac3Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 99720cc2eac3Smrg fi 99730cc2eac3Smrgfi 99740cc2eac3Smrgrm -f conftest.$ac_ext 9975e120bd27Smrg 99760cc2eac3SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 99770cc2eac3SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 99780cc2eac3Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 99790cc2eac3Smrg AC_MSG_RESULT([no]) 9980e120bd27Smrgelse 99810cc2eac3Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 99820cc2eac3Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 99830cc2eac3Smrg AC_MSG_RESULT([yes]) 99840cc2eac3Smrg else 99850cc2eac3Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 99860cc2eac3Smrg fi 9987e120bd27Smrgfi 99880cc2eac3Smrgrm -f conftest.$ac_ext 99890cc2eac3SmrgAC_SUBST(RAWCPPFLAGS) 99900cc2eac3Smrg]) # XORG_PROG_RAWCPP 99916c321187Smrg 99920cc2eac3Smrg# XORG_MANPAGE_SECTIONS() 99930cc2eac3Smrg# ----------------------- 99940cc2eac3Smrg# Minimum version: 1.0.0 99950cc2eac3Smrg# 99960cc2eac3Smrg# Determine which sections man pages go in for the different man page types 99970cc2eac3Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 99980cc2eac3Smrg# Not sure if there's any better way than just hardcoding by OS name. 99990cc2eac3Smrg# Override default settings by setting environment variables 100000cc2eac3Smrg# Added MAN_SUBSTS in version 1.8 100010cc2eac3Smrg# Added AC_PROG_SED in version 1.8 10002e120bd27Smrg 100030cc2eac3SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 100040cc2eac3SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 100050cc2eac3SmrgAC_REQUIRE([AC_PROG_SED]) 10006e120bd27Smrg 100070cc2eac3Smrgif test x$APP_MAN_SUFFIX = x ; then 100080cc2eac3Smrg APP_MAN_SUFFIX=1 100090cc2eac3Smrgfi 100100cc2eac3Smrgif test x$APP_MAN_DIR = x ; then 100110cc2eac3Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 100120cc2eac3Smrgfi 100136c321187Smrg 100140cc2eac3Smrgif test x$LIB_MAN_SUFFIX = x ; then 100150cc2eac3Smrg LIB_MAN_SUFFIX=3 100160cc2eac3Smrgfi 100170cc2eac3Smrgif test x$LIB_MAN_DIR = x ; then 100180cc2eac3Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 100190cc2eac3Smrgfi 100206c321187Smrg 100210cc2eac3Smrgif test x$FILE_MAN_SUFFIX = x ; then 100220cc2eac3Smrg case $host_os in 100230cc2eac3Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 100240cc2eac3Smrg *) FILE_MAN_SUFFIX=5 ;; 100250cc2eac3Smrg esac 100260cc2eac3Smrgfi 100270cc2eac3Smrgif test x$FILE_MAN_DIR = x ; then 100280cc2eac3Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 100290cc2eac3Smrgfi 100306c321187Smrg 100310cc2eac3Smrgif test x$MISC_MAN_SUFFIX = x ; then 100320cc2eac3Smrg case $host_os in 100330cc2eac3Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 100340cc2eac3Smrg *) MISC_MAN_SUFFIX=7 ;; 100350cc2eac3Smrg esac 100360cc2eac3Smrgfi 100370cc2eac3Smrgif test x$MISC_MAN_DIR = x ; then 100380cc2eac3Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 100390cc2eac3Smrgfi 100406c321187Smrg 100410cc2eac3Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 100420cc2eac3Smrg case $host_os in 100430cc2eac3Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 100440cc2eac3Smrg *) DRIVER_MAN_SUFFIX=4 ;; 100450cc2eac3Smrg esac 100460cc2eac3Smrgfi 100470cc2eac3Smrgif test x$DRIVER_MAN_DIR = x ; then 100480cc2eac3Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 100490cc2eac3Smrgfi 100506c321187Smrg 100510cc2eac3Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 100520cc2eac3Smrg case $host_os in 100530cc2eac3Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 100540cc2eac3Smrg *) ADMIN_MAN_SUFFIX=8 ;; 100550cc2eac3Smrg esac 100560cc2eac3Smrgfi 100570cc2eac3Smrgif test x$ADMIN_MAN_DIR = x ; then 100580cc2eac3Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 100590cc2eac3Smrgfi 100606c321187Smrg 100616c321187Smrg 100620cc2eac3SmrgAC_SUBST([APP_MAN_SUFFIX]) 100630cc2eac3SmrgAC_SUBST([LIB_MAN_SUFFIX]) 100640cc2eac3SmrgAC_SUBST([FILE_MAN_SUFFIX]) 100650cc2eac3SmrgAC_SUBST([MISC_MAN_SUFFIX]) 100660cc2eac3SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 100670cc2eac3SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 100680cc2eac3SmrgAC_SUBST([APP_MAN_DIR]) 100690cc2eac3SmrgAC_SUBST([LIB_MAN_DIR]) 100700cc2eac3SmrgAC_SUBST([FILE_MAN_DIR]) 100710cc2eac3SmrgAC_SUBST([MISC_MAN_DIR]) 100720cc2eac3SmrgAC_SUBST([DRIVER_MAN_DIR]) 100730cc2eac3SmrgAC_SUBST([ADMIN_MAN_DIR]) 10074e120bd27Smrg 100750cc2eac3SmrgXORG_MAN_PAGE="X Version 11" 100760cc2eac3SmrgAC_SUBST([XORG_MAN_PAGE]) 100770cc2eac3SmrgMAN_SUBSTS="\ 100780cc2eac3Smrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 100790cc2eac3Smrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 100800cc2eac3Smrg -e 's|__xservername__|Xorg|g' \ 100810cc2eac3Smrg -e 's|__xconfigfile__|xorg.conf|g' \ 100820cc2eac3Smrg -e 's|__projectroot__|\$(prefix)|g' \ 100830cc2eac3Smrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 100840cc2eac3Smrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 100850cc2eac3Smrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 100860cc2eac3Smrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 100870cc2eac3Smrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 100880cc2eac3Smrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 100890cc2eac3Smrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 100900cc2eac3SmrgAC_SUBST([MAN_SUBSTS]) 100916c321187Smrg 100920cc2eac3Smrg]) # XORG_MANPAGE_SECTIONS 100936c321187Smrg 100940cc2eac3Smrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 100950cc2eac3Smrg# ------------------------ 100960cc2eac3Smrg# Minimum version: 1.7.0 100970cc2eac3Smrg# 100980cc2eac3Smrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 100990cc2eac3Smrg# provided by xorg-sgml-doctools, if installed. 101000cc2eac3SmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 101010cc2eac3SmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 101020cc2eac3SmrgXORG_SGML_PATH= 101030cc2eac3SmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 101040cc2eac3Smrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 101050cc2eac3Smrg [m4_ifval([$1],[:], 101060cc2eac3Smrg [if test x"$cross_compiling" != x"yes" ; then 101070cc2eac3Smrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 101080cc2eac3Smrg [XORG_SGML_PATH=$prefix/share/sgml]) 101090cc2eac3Smrg fi]) 101100cc2eac3Smrg ]) 101116c321187Smrg 101120cc2eac3Smrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 101130cc2eac3Smrg# the path and the name of the doc stylesheet 101140cc2eac3Smrgif test "x$XORG_SGML_PATH" != "x" ; then 101150cc2eac3Smrg AC_MSG_RESULT([$XORG_SGML_PATH]) 101160cc2eac3Smrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 101170cc2eac3Smrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 101180cc2eac3Smrgelse 101190cc2eac3Smrg AC_MSG_RESULT([no]) 101200cc2eac3Smrgfi 101216c321187Smrg 101220cc2eac3SmrgAC_SUBST(XORG_SGML_PATH) 101230cc2eac3SmrgAC_SUBST(STYLESHEET_SRCDIR) 101240cc2eac3SmrgAC_SUBST(XSL_STYLESHEET) 101250cc2eac3SmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 101260cc2eac3Smrg]) # XORG_CHECK_SGML_DOCTOOLS 101276c321187Smrg 101280cc2eac3Smrg# XORG_CHECK_LINUXDOC 101290cc2eac3Smrg# ------------------- 101300cc2eac3Smrg# Minimum version: 1.0.0 101310cc2eac3Smrg# 101320cc2eac3Smrg# Defines the variable MAKE_TEXT if the necessary tools and 101330cc2eac3Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 101340cc2eac3Smrg# Whether or not the necessary tools and files are found can be checked 101350cc2eac3Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 101360cc2eac3SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 101370cc2eac3SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 101380cc2eac3SmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 101396c321187Smrg 101400cc2eac3SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 101416c321187Smrg 101420cc2eac3SmrgAC_MSG_CHECKING([whether to build documentation]) 101436c321187Smrg 101440cc2eac3Smrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 101450cc2eac3Smrg BUILDDOC=yes 101460cc2eac3Smrgelse 101470cc2eac3Smrg BUILDDOC=no 101480cc2eac3Smrgfi 101496c321187Smrg 101500cc2eac3SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 10151e120bd27Smrg 101520cc2eac3SmrgAC_MSG_RESULT([$BUILDDOC]) 101536c321187Smrg 101540cc2eac3SmrgAC_MSG_CHECKING([whether to build pdf documentation]) 101556c321187Smrg 101560cc2eac3Smrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 101570cc2eac3Smrg BUILDPDFDOC=yes 101580cc2eac3Smrgelse 101590cc2eac3Smrg BUILDPDFDOC=no 101600cc2eac3Smrgfi 101616c321187Smrg 101620cc2eac3SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 101636c321187Smrg 101640cc2eac3SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 101656c321187Smrg 101660cc2eac3SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 101670cc2eac3SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 101680cc2eac3SmrgMAKE_PDF="$PS2PDF" 101690cc2eac3SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 101706c321187Smrg 101710cc2eac3SmrgAC_SUBST(MAKE_TEXT) 101720cc2eac3SmrgAC_SUBST(MAKE_PS) 101730cc2eac3SmrgAC_SUBST(MAKE_PDF) 101740cc2eac3SmrgAC_SUBST(MAKE_HTML) 101750cc2eac3Smrg]) # XORG_CHECK_LINUXDOC 101766c321187Smrg 101770cc2eac3Smrg# XORG_CHECK_DOCBOOK 101780cc2eac3Smrg# ------------------- 101790cc2eac3Smrg# Minimum version: 1.0.0 101800cc2eac3Smrg# 101810cc2eac3Smrg# Checks for the ability to build output formats from SGML DocBook source. 101820cc2eac3Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 101830cc2eac3Smrg# indicates whether the necessary tools and files are found and, if set, 101840cc2eac3Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 101850cc2eac3SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 101860cc2eac3SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 101876c321187Smrg 101880cc2eac3SmrgBUILDTXTDOC=no 101890cc2eac3SmrgBUILDPDFDOC=no 101900cc2eac3SmrgBUILDPSDOC=no 101910cc2eac3SmrgBUILDHTMLDOC=no 101926c321187Smrg 101930cc2eac3SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 101940cc2eac3SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 101950cc2eac3SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 101960cc2eac3SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 101976c321187Smrg 101980cc2eac3SmrgAC_MSG_CHECKING([whether to build text documentation]) 101990cc2eac3Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 102000cc2eac3Smrg test x$BUILD_TXTDOC != xno; then 102010cc2eac3Smrg BUILDTXTDOC=yes 102020cc2eac3Smrgfi 102030cc2eac3SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 102040cc2eac3SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 10205e120bd27Smrg 102060cc2eac3SmrgAC_MSG_CHECKING([whether to build PDF documentation]) 102070cc2eac3Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 102080cc2eac3Smrg test x$BUILD_PDFDOC != xno; then 102090cc2eac3Smrg BUILDPDFDOC=yes 102100cc2eac3Smrgfi 102110cc2eac3SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 102120cc2eac3SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 10213e120bd27Smrg 102140cc2eac3SmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 102150cc2eac3Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 102160cc2eac3Smrg test x$BUILD_PSDOC != xno; then 102170cc2eac3Smrg BUILDPSDOC=yes 102180cc2eac3Smrgfi 102190cc2eac3SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 102200cc2eac3SmrgAC_MSG_RESULT([$BUILDPSDOC]) 102216c321187Smrg 102220cc2eac3SmrgAC_MSG_CHECKING([whether to build HTML documentation]) 102230cc2eac3Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 102240cc2eac3Smrg test x$BUILD_HTMLDOC != xno; then 102250cc2eac3Smrg BUILDHTMLDOC=yes 102260cc2eac3Smrgfi 102270cc2eac3SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 102280cc2eac3SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 102296c321187Smrg 102300cc2eac3SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 102310cc2eac3SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 102320cc2eac3SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 102330cc2eac3SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 10234e120bd27Smrg 102350cc2eac3SmrgAC_SUBST(MAKE_TEXT) 102360cc2eac3SmrgAC_SUBST(MAKE_PS) 102370cc2eac3SmrgAC_SUBST(MAKE_PDF) 102380cc2eac3SmrgAC_SUBST(MAKE_HTML) 102390cc2eac3Smrg]) # XORG_CHECK_DOCBOOK 10240e120bd27Smrg 102410cc2eac3Smrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 102420cc2eac3Smrg# ---------------- 102430cc2eac3Smrg# Minimum version: 1.5.0 102440cc2eac3Smrg# Minimum version for optional DEFAULT argument: 1.11.0 102450cc2eac3Smrg# 102460cc2eac3Smrg# Documentation tools are not always available on all platforms and sometimes 102470cc2eac3Smrg# not at the appropriate level. This macro enables a module to test for the 102480cc2eac3Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 102490cc2eac3Smrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 102500cc2eac3Smrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 102510cc2eac3Smrg# --with-xmlto assumes 'auto'. 102520cc2eac3Smrg# 102530cc2eac3Smrg# Interface to module: 102540cc2eac3Smrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 102550cc2eac3Smrg# XMLTO: returns the path of the xmlto program found 102560cc2eac3Smrg# returns the path set by the user in the environment 102570cc2eac3Smrg# --with-xmlto: 'yes' user instructs the module to use xmlto 102580cc2eac3Smrg# 'no' user instructs the module not to use xmlto 102590cc2eac3Smrg# 102600cc2eac3Smrg# Added in version 1.10.0 102610cc2eac3Smrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 102620cc2eac3Smrg# xmlto for text output requires either lynx, links, or w3m browsers 102630cc2eac3Smrg# 102640cc2eac3Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 102650cc2eac3Smrg# 102660cc2eac3SmrgAC_DEFUN([XORG_WITH_XMLTO],[ 102670cc2eac3SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 102680cc2eac3Smrgm4_define([_defopt], m4_default([$2], [auto])) 102690cc2eac3SmrgAC_ARG_WITH(xmlto, 102700cc2eac3Smrg AS_HELP_STRING([--with-xmlto], 102710cc2eac3Smrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 102720cc2eac3Smrg [use_xmlto=$withval], [use_xmlto=]_defopt) 102730cc2eac3Smrgm4_undefine([_defopt]) 10274e120bd27Smrg 102750cc2eac3Smrgif test "x$use_xmlto" = x"auto"; then 102760cc2eac3Smrg AC_PATH_PROG([XMLTO], [xmlto]) 102770cc2eac3Smrg if test "x$XMLTO" = "x"; then 102780cc2eac3Smrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 102790cc2eac3Smrg have_xmlto=no 102800cc2eac3Smrg else 102810cc2eac3Smrg have_xmlto=yes 102820cc2eac3Smrg fi 102830cc2eac3Smrgelif test "x$use_xmlto" = x"yes" ; then 102840cc2eac3Smrg AC_PATH_PROG([XMLTO], [xmlto]) 102850cc2eac3Smrg if test "x$XMLTO" = "x"; then 102860cc2eac3Smrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 102870cc2eac3Smrg fi 102880cc2eac3Smrg have_xmlto=yes 102890cc2eac3Smrgelif test "x$use_xmlto" = x"no" ; then 102900cc2eac3Smrg if test "x$XMLTO" != "x"; then 102910cc2eac3Smrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 102920cc2eac3Smrg fi 102930cc2eac3Smrg have_xmlto=no 102940cc2eac3Smrgelse 102950cc2eac3Smrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 102960cc2eac3Smrgfi 10297e120bd27Smrg 102980cc2eac3Smrg# Test for a minimum version of xmlto, if provided. 102990cc2eac3Smrgm4_ifval([$1], 103000cc2eac3Smrg[if test "$have_xmlto" = yes; then 103010cc2eac3Smrg # scrape the xmlto version 103020cc2eac3Smrg AC_MSG_CHECKING([the xmlto version]) 103030cc2eac3Smrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 103040cc2eac3Smrg AC_MSG_RESULT([$xmlto_version]) 103050cc2eac3Smrg AS_VERSION_COMPARE([$xmlto_version], [$1], 103060cc2eac3Smrg [if test "x$use_xmlto" = xauto; then 103070cc2eac3Smrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 103080cc2eac3Smrg have_xmlto=no 103090cc2eac3Smrg else 103100cc2eac3Smrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 103110cc2eac3Smrg fi]) 103120cc2eac3Smrgfi]) 103136c321187Smrg 103140cc2eac3Smrg# Test for the ability of xmlto to generate a text target 103150cc2eac3Smrghave_xmlto_text=no 103160cc2eac3Smrgcat > conftest.xml << "EOF" 103170cc2eac3SmrgEOF 103180cc2eac3SmrgAS_IF([test "$have_xmlto" = yes], 103190cc2eac3Smrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 103200cc2eac3Smrg [have_xmlto_text=yes], 103210cc2eac3Smrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 103220cc2eac3Smrgrm -f conftest.xml 103230cc2eac3SmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 103240cc2eac3SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 103250cc2eac3Smrg]) # XORG_WITH_XMLTO 103266c321187Smrg 103270cc2eac3Smrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 103280cc2eac3Smrg# -------------------------------------------- 103290cc2eac3Smrg# Minimum version: 1.12.0 103300cc2eac3Smrg# Minimum version for optional DEFAULT argument: 1.12.0 103310cc2eac3Smrg# 103320cc2eac3Smrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 103330cc2eac3Smrg# XML-based language used for the transformation of XML documents. 103340cc2eac3Smrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 103350cc2eac3Smrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 103360cc2eac3Smrg# The XSLT processor is often used as a standalone tool for transformations. 103370cc2eac3Smrg# It should not be assumed that this tool is used only to work with documnetation. 103380cc2eac3Smrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 103390cc2eac3Smrg# 103400cc2eac3Smrg# Interface to module: 103410cc2eac3Smrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 103420cc2eac3Smrg# XSLTPROC: returns the path of the xsltproc program found 103430cc2eac3Smrg# returns the path set by the user in the environment 103440cc2eac3Smrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 103450cc2eac3Smrg# 'no' user instructs the module not to use xsltproc 103460cc2eac3Smrg# have_xsltproc: returns yes if xsltproc found in PATH or no 103470cc2eac3Smrg# 103480cc2eac3Smrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 103490cc2eac3Smrg# 103500cc2eac3SmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 103510cc2eac3SmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 103520cc2eac3Smrg# Preserves the interface, should it be implemented later 103530cc2eac3Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 103540cc2eac3Smrgm4_define([_defopt], m4_default([$2], [auto])) 103550cc2eac3SmrgAC_ARG_WITH(xsltproc, 103560cc2eac3Smrg AS_HELP_STRING([--with-xsltproc], 103570cc2eac3Smrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 103580cc2eac3Smrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 103590cc2eac3Smrgm4_undefine([_defopt]) 103606c321187Smrg 103610cc2eac3Smrgif test "x$use_xsltproc" = x"auto"; then 103620cc2eac3Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 103630cc2eac3Smrg if test "x$XSLTPROC" = "x"; then 103640cc2eac3Smrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 103650cc2eac3Smrg have_xsltproc=no 103660cc2eac3Smrg else 103670cc2eac3Smrg have_xsltproc=yes 103680cc2eac3Smrg fi 103690cc2eac3Smrgelif test "x$use_xsltproc" = x"yes" ; then 103700cc2eac3Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 103710cc2eac3Smrg if test "x$XSLTPROC" = "x"; then 103720cc2eac3Smrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 103730cc2eac3Smrg fi 103740cc2eac3Smrg have_xsltproc=yes 103750cc2eac3Smrgelif test "x$use_xsltproc" = x"no" ; then 103760cc2eac3Smrg if test "x$XSLTPROC" != "x"; then 103770cc2eac3Smrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 103780cc2eac3Smrg fi 103790cc2eac3Smrg have_xsltproc=no 103800cc2eac3Smrgelse 103810cc2eac3Smrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 103820cc2eac3Smrgfi 103836c321187Smrg 103840cc2eac3SmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 103850cc2eac3Smrg]) # XORG_WITH_XSLTPROC 103866c321187Smrg 103870cc2eac3Smrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 103880cc2eac3Smrg# ---------------------------------------- 103890cc2eac3Smrg# Minimum version: 1.15.0 103900cc2eac3Smrg# 103910cc2eac3Smrg# PERL (Practical Extraction and Report Language) is a language optimized for 103920cc2eac3Smrg# scanning arbitrary text files, extracting information from those text files, 103930cc2eac3Smrg# and printing reports based on that information. 103940cc2eac3Smrg# 103950cc2eac3Smrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 103960cc2eac3Smrg# 103970cc2eac3Smrg# Interface to module: 103980cc2eac3Smrg# HAVE_PERL: used in makefiles to conditionally scan text files 103990cc2eac3Smrg# PERL: returns the path of the perl program found 104000cc2eac3Smrg# returns the path set by the user in the environment 104010cc2eac3Smrg# --with-perl: 'yes' user instructs the module to use perl 104020cc2eac3Smrg# 'no' user instructs the module not to use perl 104030cc2eac3Smrg# have_perl: returns yes if perl found in PATH or no 104040cc2eac3Smrg# 104050cc2eac3Smrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 104060cc2eac3Smrg# 104070cc2eac3SmrgAC_DEFUN([XORG_WITH_PERL],[ 104080cc2eac3SmrgAC_ARG_VAR([PERL], [Path to perl command]) 104090cc2eac3Smrg# Preserves the interface, should it be implemented later 104100cc2eac3Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 104110cc2eac3Smrgm4_define([_defopt], m4_default([$2], [auto])) 104120cc2eac3SmrgAC_ARG_WITH(perl, 104130cc2eac3Smrg AS_HELP_STRING([--with-perl], 104140cc2eac3Smrg [Use perl for extracting information from files (default: ]_defopt[)]), 104150cc2eac3Smrg [use_perl=$withval], [use_perl=]_defopt) 104160cc2eac3Smrgm4_undefine([_defopt]) 104176c321187Smrg 104180cc2eac3Smrgif test "x$use_perl" = x"auto"; then 104190cc2eac3Smrg AC_PATH_PROG([PERL], [perl]) 104200cc2eac3Smrg if test "x$PERL" = "x"; then 104210cc2eac3Smrg AC_MSG_WARN([perl not found - cannot extract information and report]) 104220cc2eac3Smrg have_perl=no 104230cc2eac3Smrg else 104240cc2eac3Smrg have_perl=yes 104250cc2eac3Smrg fi 104260cc2eac3Smrgelif test "x$use_perl" = x"yes" ; then 104270cc2eac3Smrg AC_PATH_PROG([PERL], [perl]) 104280cc2eac3Smrg if test "x$PERL" = "x"; then 104290cc2eac3Smrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 104300cc2eac3Smrg fi 104310cc2eac3Smrg have_perl=yes 104320cc2eac3Smrgelif test "x$use_perl" = x"no" ; then 104330cc2eac3Smrg if test "x$PERL" != "x"; then 104340cc2eac3Smrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 104350cc2eac3Smrg fi 104360cc2eac3Smrg have_perl=no 104370cc2eac3Smrgelse 104380cc2eac3Smrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 104390cc2eac3Smrgfi 104406c321187Smrg 104410cc2eac3SmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 104420cc2eac3Smrg]) # XORG_WITH_PERL 104436c321187Smrg 104440cc2eac3Smrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 104450cc2eac3Smrg# ---------------- 104460cc2eac3Smrg# Minimum version: 1.5.0 104470cc2eac3Smrg# Minimum version for optional DEFAULT argument: 1.11.0 104480cc2eac3Smrg# 104490cc2eac3Smrg# Documentation tools are not always available on all platforms and sometimes 104500cc2eac3Smrg# not at the appropriate level. This macro enables a module to test for the 104510cc2eac3Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 104520cc2eac3Smrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 104530cc2eac3Smrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 104540cc2eac3Smrg# --with-asciidoc assumes 'auto'. 104550cc2eac3Smrg# 104560cc2eac3Smrg# Interface to module: 104570cc2eac3Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 104580cc2eac3Smrg# ASCIIDOC: returns the path of the asciidoc program found 104590cc2eac3Smrg# returns the path set by the user in the environment 104600cc2eac3Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 104610cc2eac3Smrg# 'no' user instructs the module not to use asciidoc 104620cc2eac3Smrg# 104630cc2eac3Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 104640cc2eac3Smrg# 104650cc2eac3SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 104660cc2eac3SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 104670cc2eac3Smrgm4_define([_defopt], m4_default([$2], [auto])) 104680cc2eac3SmrgAC_ARG_WITH(asciidoc, 104690cc2eac3Smrg AS_HELP_STRING([--with-asciidoc], 104700cc2eac3Smrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 104710cc2eac3Smrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 104720cc2eac3Smrgm4_undefine([_defopt]) 104736c321187Smrg 104740cc2eac3Smrgif test "x$use_asciidoc" = x"auto"; then 104750cc2eac3Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 104760cc2eac3Smrg if test "x$ASCIIDOC" = "x"; then 104770cc2eac3Smrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 104780cc2eac3Smrg have_asciidoc=no 104790cc2eac3Smrg else 104800cc2eac3Smrg have_asciidoc=yes 104810cc2eac3Smrg fi 104820cc2eac3Smrgelif test "x$use_asciidoc" = x"yes" ; then 104830cc2eac3Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 104840cc2eac3Smrg if test "x$ASCIIDOC" = "x"; then 104850cc2eac3Smrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 104860cc2eac3Smrg fi 104870cc2eac3Smrg have_asciidoc=yes 104880cc2eac3Smrgelif test "x$use_asciidoc" = x"no" ; then 104890cc2eac3Smrg if test "x$ASCIIDOC" != "x"; then 104900cc2eac3Smrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 104910cc2eac3Smrg fi 104920cc2eac3Smrg have_asciidoc=no 104930cc2eac3Smrgelse 104940cc2eac3Smrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 104950cc2eac3Smrgfi 104960cc2eac3Smrgm4_ifval([$1], 104970cc2eac3Smrg[if test "$have_asciidoc" = yes; then 104980cc2eac3Smrg # scrape the asciidoc version 104990cc2eac3Smrg AC_MSG_CHECKING([the asciidoc version]) 105000cc2eac3Smrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 105010cc2eac3Smrg AC_MSG_RESULT([$asciidoc_version]) 105020cc2eac3Smrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 105030cc2eac3Smrg [if test "x$use_asciidoc" = xauto; then 105040cc2eac3Smrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 105050cc2eac3Smrg have_asciidoc=no 105060cc2eac3Smrg else 105070cc2eac3Smrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 105080cc2eac3Smrg fi]) 105090cc2eac3Smrgfi]) 105100cc2eac3SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 105110cc2eac3Smrg]) # XORG_WITH_ASCIIDOC 105126c321187Smrg 105130cc2eac3Smrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 105140cc2eac3Smrg# -------------------------------- 105150cc2eac3Smrg# Minimum version: 1.5.0 105160cc2eac3Smrg# Minimum version for optional DEFAULT argument: 1.11.0 105170cc2eac3Smrg# 105180cc2eac3Smrg# Documentation tools are not always available on all platforms and sometimes 105190cc2eac3Smrg# not at the appropriate level. This macro enables a module to test for the 105200cc2eac3Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 105210cc2eac3Smrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 105220cc2eac3Smrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 105230cc2eac3Smrg# --with-doxygen assumes 'auto'. 105240cc2eac3Smrg# 105250cc2eac3Smrg# Interface to module: 105260cc2eac3Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 105270cc2eac3Smrg# DOXYGEN: returns the path of the doxygen program found 105280cc2eac3Smrg# returns the path set by the user in the environment 105290cc2eac3Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen 105300cc2eac3Smrg# 'no' user instructs the module not to use doxygen 105310cc2eac3Smrg# 105320cc2eac3Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 105330cc2eac3Smrg# 105340cc2eac3SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 105350cc2eac3SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 105360cc2eac3Smrgm4_define([_defopt], m4_default([$2], [auto])) 105370cc2eac3SmrgAC_ARG_WITH(doxygen, 105380cc2eac3Smrg AS_HELP_STRING([--with-doxygen], 105390cc2eac3Smrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 105400cc2eac3Smrg [use_doxygen=$withval], [use_doxygen=]_defopt) 105410cc2eac3Smrgm4_undefine([_defopt]) 105426c321187Smrg 105430cc2eac3Smrgif test "x$use_doxygen" = x"auto"; then 105440cc2eac3Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 105450cc2eac3Smrg if test "x$DOXYGEN" = "x"; then 105460cc2eac3Smrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 105470cc2eac3Smrg have_doxygen=no 105480cc2eac3Smrg else 105490cc2eac3Smrg have_doxygen=yes 105500cc2eac3Smrg fi 105510cc2eac3Smrgelif test "x$use_doxygen" = x"yes" ; then 105520cc2eac3Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 105530cc2eac3Smrg if test "x$DOXYGEN" = "x"; then 105540cc2eac3Smrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 105550cc2eac3Smrg fi 105560cc2eac3Smrg have_doxygen=yes 105570cc2eac3Smrgelif test "x$use_doxygen" = x"no" ; then 105580cc2eac3Smrg if test "x$DOXYGEN" != "x"; then 105590cc2eac3Smrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 105600cc2eac3Smrg fi 105610cc2eac3Smrg have_doxygen=no 105620cc2eac3Smrgelse 105630cc2eac3Smrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 105640cc2eac3Smrgfi 105650cc2eac3Smrgm4_ifval([$1], 105660cc2eac3Smrg[if test "$have_doxygen" = yes; then 105670cc2eac3Smrg # scrape the doxygen version 105680cc2eac3Smrg AC_MSG_CHECKING([the doxygen version]) 105690cc2eac3Smrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 105700cc2eac3Smrg AC_MSG_RESULT([$doxygen_version]) 105710cc2eac3Smrg AS_VERSION_COMPARE([$doxygen_version], [$1], 105720cc2eac3Smrg [if test "x$use_doxygen" = xauto; then 105730cc2eac3Smrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 105740cc2eac3Smrg have_doxygen=no 105750cc2eac3Smrg else 105760cc2eac3Smrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 105770cc2eac3Smrg fi]) 105780cc2eac3Smrgfi]) 105790cc2eac3SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 105800cc2eac3Smrg]) # XORG_WITH_DOXYGEN 105816c321187Smrg 105820cc2eac3Smrg# XORG_WITH_GROFF([DEFAULT]) 105830cc2eac3Smrg# ---------------- 105840cc2eac3Smrg# Minimum version: 1.6.0 105850cc2eac3Smrg# Minimum version for optional DEFAULT argument: 1.11.0 105860cc2eac3Smrg# 105870cc2eac3Smrg# Documentation tools are not always available on all platforms and sometimes 105880cc2eac3Smrg# not at the appropriate level. This macro enables a module to test for the 105890cc2eac3Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 105900cc2eac3Smrg# the --with-groff option, it allows maximum flexibilty in making decisions 105910cc2eac3Smrg# as whether or not to use the groff package. When DEFAULT is not specified, 105920cc2eac3Smrg# --with-groff assumes 'auto'. 105930cc2eac3Smrg# 105940cc2eac3Smrg# Interface to module: 105950cc2eac3Smrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 105960cc2eac3Smrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 105970cc2eac3Smrg# HAVE_GROFF_MS: the -ms macros package 105980cc2eac3Smrg# GROFF: returns the path of the groff program found 105990cc2eac3Smrg# returns the path set by the user in the environment 106000cc2eac3Smrg# --with-groff: 'yes' user instructs the module to use groff 106010cc2eac3Smrg# 'no' user instructs the module not to use groff 106020cc2eac3Smrg# 106030cc2eac3Smrg# Added in version 1.9.0: 106040cc2eac3Smrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 106050cc2eac3Smrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 106060cc2eac3Smrg# psselect from the psutils package. 106070cc2eac3Smrg# the ghostcript package. Refer to the grohtml man pages 106080cc2eac3Smrg# 106090cc2eac3Smrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 106100cc2eac3Smrg# 106110cc2eac3Smrg# OS and distros often splits groff in a basic and full package, the former 106120cc2eac3Smrg# having the groff program and the later having devices, fonts and macros 106130cc2eac3Smrg# Checking for the groff executable is not enough. 106140cc2eac3Smrg# 106150cc2eac3Smrg# If macros are missing, we cannot assume that groff is useless, so we don't 106160cc2eac3Smrg# unset HAVE_GROFF or GROFF env variables. 106170cc2eac3Smrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 106180cc2eac3Smrg# 106190cc2eac3SmrgAC_DEFUN([XORG_WITH_GROFF],[ 106200cc2eac3SmrgAC_ARG_VAR([GROFF], [Path to groff command]) 106210cc2eac3Smrgm4_define([_defopt], m4_default([$1], [auto])) 106220cc2eac3SmrgAC_ARG_WITH(groff, 106230cc2eac3Smrg AS_HELP_STRING([--with-groff], 106240cc2eac3Smrg [Use groff to regenerate documentation (default: ]_defopt[)]), 106250cc2eac3Smrg [use_groff=$withval], [use_groff=]_defopt) 106260cc2eac3Smrgm4_undefine([_defopt]) 106276c321187Smrg 106280cc2eac3Smrgif test "x$use_groff" = x"auto"; then 106290cc2eac3Smrg AC_PATH_PROG([GROFF], [groff]) 106300cc2eac3Smrg if test "x$GROFF" = "x"; then 106310cc2eac3Smrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 106320cc2eac3Smrg have_groff=no 106330cc2eac3Smrg else 106340cc2eac3Smrg have_groff=yes 106350cc2eac3Smrg fi 106360cc2eac3Smrgelif test "x$use_groff" = x"yes" ; then 106370cc2eac3Smrg AC_PATH_PROG([GROFF], [groff]) 106380cc2eac3Smrg if test "x$GROFF" = "x"; then 106390cc2eac3Smrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 106400cc2eac3Smrg fi 106410cc2eac3Smrg have_groff=yes 106420cc2eac3Smrgelif test "x$use_groff" = x"no" ; then 106430cc2eac3Smrg if test "x$GROFF" != "x"; then 106440cc2eac3Smrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 106450cc2eac3Smrg fi 106460cc2eac3Smrg have_groff=no 106470cc2eac3Smrgelse 106480cc2eac3Smrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 106490cc2eac3Smrgfi 106506c321187Smrg 106510cc2eac3Smrg# We have groff, test for the presence of the macro packages 106520cc2eac3Smrgif test "x$have_groff" = x"yes"; then 106530cc2eac3Smrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 106540cc2eac3Smrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 106550cc2eac3Smrg groff_ms_works=yes 106560cc2eac3Smrg else 106570cc2eac3Smrg groff_ms_works=no 106580cc2eac3Smrg fi 106590cc2eac3Smrg AC_MSG_RESULT([$groff_ms_works]) 106600cc2eac3Smrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 106610cc2eac3Smrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 106620cc2eac3Smrg groff_mm_works=yes 106630cc2eac3Smrg else 106640cc2eac3Smrg groff_mm_works=no 106650cc2eac3Smrg fi 106660cc2eac3Smrg AC_MSG_RESULT([$groff_mm_works]) 106670cc2eac3Smrgfi 106686c321187Smrg 106690cc2eac3Smrg# We have groff, test for HTML dependencies, one command per package 106700cc2eac3Smrgif test "x$have_groff" = x"yes"; then 106710cc2eac3Smrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 106720cc2eac3Smrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 106730cc2eac3Smrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 106740cc2eac3Smrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 106750cc2eac3Smrg have_groff_html=yes 106760cc2eac3Smrg else 106770cc2eac3Smrg have_groff_html=no 106780cc2eac3Smrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 106790cc2eac3Smrg fi 106800cc2eac3Smrgfi 106816c321187Smrg 106820cc2eac3Smrg# Set Automake conditionals for Makefiles 106830cc2eac3SmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 106840cc2eac3SmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 106850cc2eac3SmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 106860cc2eac3SmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 106870cc2eac3Smrg]) # XORG_WITH_GROFF 106886c321187Smrg 106890cc2eac3Smrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 106900cc2eac3Smrg# --------------------------------------- 106910cc2eac3Smrg# Minimum version: 1.6.0 106920cc2eac3Smrg# Minimum version for optional DEFAULT argument: 1.11.0 106930cc2eac3Smrg# Minimum version for optional MIN-VERSION argument: 1.15.0 106940cc2eac3Smrg# 106950cc2eac3Smrg# Documentation tools are not always available on all platforms and sometimes 106960cc2eac3Smrg# not at the appropriate level. This macro enables a module to test for the 106970cc2eac3Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 106980cc2eac3Smrg# the --with-fop option, it allows maximum flexibilty in making decisions 106990cc2eac3Smrg# as whether or not to use the fop package. When DEFAULT is not specified, 107000cc2eac3Smrg# --with-fop assumes 'auto'. 107010cc2eac3Smrg# 107020cc2eac3Smrg# Interface to module: 107030cc2eac3Smrg# HAVE_FOP: used in makefiles to conditionally generate documentation 107040cc2eac3Smrg# FOP: returns the path of the fop program found 107050cc2eac3Smrg# returns the path set by the user in the environment 107060cc2eac3Smrg# --with-fop: 'yes' user instructs the module to use fop 107070cc2eac3Smrg# 'no' user instructs the module not to use fop 107080cc2eac3Smrg# 107090cc2eac3Smrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 107100cc2eac3Smrg# 107110cc2eac3SmrgAC_DEFUN([XORG_WITH_FOP],[ 107120cc2eac3SmrgAC_ARG_VAR([FOP], [Path to fop command]) 107130cc2eac3Smrgm4_define([_defopt], m4_default([$2], [auto])) 107140cc2eac3SmrgAC_ARG_WITH(fop, 107150cc2eac3Smrg AS_HELP_STRING([--with-fop], 107160cc2eac3Smrg [Use fop to regenerate documentation (default: ]_defopt[)]), 107170cc2eac3Smrg [use_fop=$withval], [use_fop=]_defopt) 107180cc2eac3Smrgm4_undefine([_defopt]) 107196c321187Smrg 107200cc2eac3Smrgif test "x$use_fop" = x"auto"; then 107210cc2eac3Smrg AC_PATH_PROG([FOP], [fop]) 107220cc2eac3Smrg if test "x$FOP" = "x"; then 107230cc2eac3Smrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 107240cc2eac3Smrg have_fop=no 107250cc2eac3Smrg else 107260cc2eac3Smrg have_fop=yes 107270cc2eac3Smrg fi 107280cc2eac3Smrgelif test "x$use_fop" = x"yes" ; then 107290cc2eac3Smrg AC_PATH_PROG([FOP], [fop]) 107300cc2eac3Smrg if test "x$FOP" = "x"; then 107310cc2eac3Smrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 107320cc2eac3Smrg fi 107330cc2eac3Smrg have_fop=yes 107340cc2eac3Smrgelif test "x$use_fop" = x"no" ; then 107350cc2eac3Smrg if test "x$FOP" != "x"; then 107360cc2eac3Smrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 107370cc2eac3Smrg fi 107380cc2eac3Smrg have_fop=no 107390cc2eac3Smrgelse 107400cc2eac3Smrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 107410cc2eac3Smrgfi 107426c321187Smrg 107430cc2eac3Smrg# Test for a minimum version of fop, if provided. 107440cc2eac3Smrgm4_ifval([$1], 107450cc2eac3Smrg[if test "$have_fop" = yes; then 107460cc2eac3Smrg # scrape the fop version 107470cc2eac3Smrg AC_MSG_CHECKING([for fop minimum version]) 107480cc2eac3Smrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 107490cc2eac3Smrg AC_MSG_RESULT([$fop_version]) 107500cc2eac3Smrg AS_VERSION_COMPARE([$fop_version], [$1], 107510cc2eac3Smrg [if test "x$use_fop" = xauto; then 107520cc2eac3Smrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 107530cc2eac3Smrg have_fop=no 107540cc2eac3Smrg else 107550cc2eac3Smrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 107560cc2eac3Smrg fi]) 107570cc2eac3Smrgfi]) 107580cc2eac3SmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 107590cc2eac3Smrg]) # XORG_WITH_FOP 107606c321187Smrg 107610cc2eac3Smrg# XORG_WITH_PS2PDF([DEFAULT]) 107620cc2eac3Smrg# ---------------- 107630cc2eac3Smrg# Minimum version: 1.6.0 107640cc2eac3Smrg# Minimum version for optional DEFAULT argument: 1.11.0 107650cc2eac3Smrg# 107660cc2eac3Smrg# Documentation tools are not always available on all platforms and sometimes 107670cc2eac3Smrg# not at the appropriate level. This macro enables a module to test for the 107680cc2eac3Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 107690cc2eac3Smrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 107700cc2eac3Smrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 107710cc2eac3Smrg# --with-ps2pdf assumes 'auto'. 107720cc2eac3Smrg# 107730cc2eac3Smrg# Interface to module: 107740cc2eac3Smrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 107750cc2eac3Smrg# PS2PDF: returns the path of the ps2pdf program found 107760cc2eac3Smrg# returns the path set by the user in the environment 107770cc2eac3Smrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 107780cc2eac3Smrg# 'no' user instructs the module not to use ps2pdf 107790cc2eac3Smrg# 107800cc2eac3Smrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 107810cc2eac3Smrg# 107820cc2eac3SmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 107830cc2eac3SmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 107840cc2eac3Smrgm4_define([_defopt], m4_default([$1], [auto])) 107850cc2eac3SmrgAC_ARG_WITH(ps2pdf, 107860cc2eac3Smrg AS_HELP_STRING([--with-ps2pdf], 107870cc2eac3Smrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 107880cc2eac3Smrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 107890cc2eac3Smrgm4_undefine([_defopt]) 107906c321187Smrg 107910cc2eac3Smrgif test "x$use_ps2pdf" = x"auto"; then 107920cc2eac3Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 107930cc2eac3Smrg if test "x$PS2PDF" = "x"; then 107940cc2eac3Smrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 107950cc2eac3Smrg have_ps2pdf=no 107960cc2eac3Smrg else 107970cc2eac3Smrg have_ps2pdf=yes 107980cc2eac3Smrg fi 107990cc2eac3Smrgelif test "x$use_ps2pdf" = x"yes" ; then 108000cc2eac3Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 108010cc2eac3Smrg if test "x$PS2PDF" = "x"; then 108020cc2eac3Smrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 108030cc2eac3Smrg fi 108040cc2eac3Smrg have_ps2pdf=yes 108050cc2eac3Smrgelif test "x$use_ps2pdf" = x"no" ; then 108060cc2eac3Smrg if test "x$PS2PDF" != "x"; then 108070cc2eac3Smrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 108080cc2eac3Smrg fi 108090cc2eac3Smrg have_ps2pdf=no 108100cc2eac3Smrgelse 108110cc2eac3Smrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 108120cc2eac3Smrgfi 108130cc2eac3SmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 108140cc2eac3Smrg]) # XORG_WITH_PS2PDF 108156c321187Smrg 108160cc2eac3Smrg# XORG_ENABLE_DOCS (enable_docs=yes) 108170cc2eac3Smrg# ---------------- 108180cc2eac3Smrg# Minimum version: 1.6.0 108190cc2eac3Smrg# 108200cc2eac3Smrg# Documentation tools are not always available on all platforms and sometimes 108210cc2eac3Smrg# not at the appropriate level. This macro enables a builder to skip all 108220cc2eac3Smrg# documentation targets except traditional man pages. 108230cc2eac3Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 108240cc2eac3Smrg# maximum flexibilty in controlling documentation building. 108250cc2eac3Smrg# Refer to: 108260cc2eac3Smrg# XORG_WITH_XMLTO --with-xmlto 108270cc2eac3Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 108280cc2eac3Smrg# XORG_WITH_DOXYGEN --with-doxygen 108290cc2eac3Smrg# XORG_WITH_FOP --with-fop 108300cc2eac3Smrg# XORG_WITH_GROFF --with-groff 108310cc2eac3Smrg# XORG_WITH_PS2PDF --with-ps2pdf 108320cc2eac3Smrg# 108330cc2eac3Smrg# Interface to module: 108340cc2eac3Smrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 108350cc2eac3Smrg# --enable-docs: 'yes' user instructs the module to generate docs 108360cc2eac3Smrg# 'no' user instructs the module not to generate docs 108370cc2eac3Smrg# parm1: specify the default value, yes or no. 108380cc2eac3Smrg# 108390cc2eac3SmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 108400cc2eac3Smrgm4_define([docs_default], m4_default([$1], [yes])) 108410cc2eac3SmrgAC_ARG_ENABLE(docs, 108420cc2eac3Smrg AS_HELP_STRING([--enable-docs], 108430cc2eac3Smrg [Enable building the documentation (default: ]docs_default[)]), 108440cc2eac3Smrg [build_docs=$enableval], [build_docs=]docs_default) 108450cc2eac3Smrgm4_undefine([docs_default]) 108460cc2eac3SmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 108470cc2eac3SmrgAC_MSG_CHECKING([whether to build documentation]) 108480cc2eac3SmrgAC_MSG_RESULT([$build_docs]) 108490cc2eac3Smrg]) # XORG_ENABLE_DOCS 108506c321187Smrg 108510cc2eac3Smrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 108520cc2eac3Smrg# ---------------- 108530cc2eac3Smrg# Minimum version: 1.6.0 108540cc2eac3Smrg# 108550cc2eac3Smrg# This macro enables a builder to skip all developer documentation. 108560cc2eac3Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 108570cc2eac3Smrg# maximum flexibilty in controlling documentation building. 108580cc2eac3Smrg# Refer to: 108590cc2eac3Smrg# XORG_WITH_XMLTO --with-xmlto 108600cc2eac3Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 108610cc2eac3Smrg# XORG_WITH_DOXYGEN --with-doxygen 108620cc2eac3Smrg# XORG_WITH_FOP --with-fop 108630cc2eac3Smrg# XORG_WITH_GROFF --with-groff 108640cc2eac3Smrg# XORG_WITH_PS2PDF --with-ps2pdf 108650cc2eac3Smrg# 108660cc2eac3Smrg# Interface to module: 108670cc2eac3Smrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 108680cc2eac3Smrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 108690cc2eac3Smrg# 'no' user instructs the module not to generate developer docs 108700cc2eac3Smrg# parm1: specify the default value, yes or no. 108710cc2eac3Smrg# 108720cc2eac3SmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 108730cc2eac3Smrgm4_define([devel_default], m4_default([$1], [yes])) 108740cc2eac3SmrgAC_ARG_ENABLE(devel-docs, 108750cc2eac3Smrg AS_HELP_STRING([--enable-devel-docs], 108760cc2eac3Smrg [Enable building the developer documentation (default: ]devel_default[)]), 108770cc2eac3Smrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 108780cc2eac3Smrgm4_undefine([devel_default]) 108790cc2eac3SmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 108800cc2eac3SmrgAC_MSG_CHECKING([whether to build developer documentation]) 108810cc2eac3SmrgAC_MSG_RESULT([$build_devel_docs]) 108820cc2eac3Smrg]) # XORG_ENABLE_DEVEL_DOCS 108836c321187Smrg 108840cc2eac3Smrg# XORG_ENABLE_SPECS (enable_specs=yes) 108850cc2eac3Smrg# ---------------- 108860cc2eac3Smrg# Minimum version: 1.6.0 108870cc2eac3Smrg# 108880cc2eac3Smrg# This macro enables a builder to skip all functional specification targets. 108890cc2eac3Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 108900cc2eac3Smrg# maximum flexibilty in controlling documentation building. 108910cc2eac3Smrg# Refer to: 108920cc2eac3Smrg# XORG_WITH_XMLTO --with-xmlto 108930cc2eac3Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 108940cc2eac3Smrg# XORG_WITH_DOXYGEN --with-doxygen 108950cc2eac3Smrg# XORG_WITH_FOP --with-fop 108960cc2eac3Smrg# XORG_WITH_GROFF --with-groff 108970cc2eac3Smrg# XORG_WITH_PS2PDF --with-ps2pdf 108980cc2eac3Smrg# 108990cc2eac3Smrg# Interface to module: 109000cc2eac3Smrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 109010cc2eac3Smrg# --enable-specs: 'yes' user instructs the module to generate specs 109020cc2eac3Smrg# 'no' user instructs the module not to generate specs 109030cc2eac3Smrg# parm1: specify the default value, yes or no. 109040cc2eac3Smrg# 109050cc2eac3SmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 109060cc2eac3Smrgm4_define([spec_default], m4_default([$1], [yes])) 109070cc2eac3SmrgAC_ARG_ENABLE(specs, 109080cc2eac3Smrg AS_HELP_STRING([--enable-specs], 109090cc2eac3Smrg [Enable building the specs (default: ]spec_default[)]), 109100cc2eac3Smrg [build_specs=$enableval], [build_specs=]spec_default) 109110cc2eac3Smrgm4_undefine([spec_default]) 109120cc2eac3SmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 109130cc2eac3SmrgAC_MSG_CHECKING([whether to build functional specifications]) 109140cc2eac3SmrgAC_MSG_RESULT([$build_specs]) 109150cc2eac3Smrg]) # XORG_ENABLE_SPECS 109166c321187Smrg 109170cc2eac3Smrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 109180cc2eac3Smrg# ---------------------------------------------- 109190cc2eac3Smrg# Minimum version: 1.13.0 109200cc2eac3Smrg# 109210cc2eac3Smrg# This macro enables a builder to enable/disable unit testing 109220cc2eac3Smrg# It makes no assumption about the test cases implementation 109230cc2eac3Smrg# Test cases may or may not use Automake "Support for test suites" 109240cc2eac3Smrg# They may or may not use the software utility library GLib 109250cc2eac3Smrg# 109260cc2eac3Smrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 109270cc2eac3Smrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 109280cc2eac3Smrg# The variable enable_unit_tests is used by other macros in this file. 109290cc2eac3Smrg# 109300cc2eac3Smrg# Interface to module: 109310cc2eac3Smrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 109320cc2eac3Smrg# enable_unit_tests: used in configure.ac for additional configuration 109330cc2eac3Smrg# --enable-unit-tests: 'yes' user instructs the module to build tests 109340cc2eac3Smrg# 'no' user instructs the module not to build tests 109350cc2eac3Smrg# parm1: specify the default value, yes or no. 109360cc2eac3Smrg# 109370cc2eac3SmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 109380cc2eac3SmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 109390cc2eac3SmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 109400cc2eac3SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 109410cc2eac3Smrgm4_define([_defopt], m4_default([$1], [auto])) 109420cc2eac3SmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 109430cc2eac3Smrg [Enable building unit test cases (default: ]_defopt[)]), 109440cc2eac3Smrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 109450cc2eac3Smrgm4_undefine([_defopt]) 109460cc2eac3SmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 109470cc2eac3SmrgAC_MSG_CHECKING([whether to build unit test cases]) 109480cc2eac3SmrgAC_MSG_RESULT([$enable_unit_tests]) 109490cc2eac3Smrg]) # XORG_ENABLE_UNIT_TESTS 109506c321187Smrg 109519d0b5e55Smrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 109529d0b5e55Smrg# ------------------------------------------------------ 109539d0b5e55Smrg# Minimum version: 1.17.0 109549d0b5e55Smrg# 109559d0b5e55Smrg# This macro enables a builder to enable/disable integration testing 109569d0b5e55Smrg# It makes no assumption about the test cases' implementation 109579d0b5e55Smrg# Test cases may or may not use Automake "Support for test suites" 109589d0b5e55Smrg# 109599d0b5e55Smrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 109609d0b5e55Smrg# usually requires less dependencies and may be built and run under less 109619d0b5e55Smrg# stringent environments than integration tests. 109629d0b5e55Smrg# 109639d0b5e55Smrg# Interface to module: 109649d0b5e55Smrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 109659d0b5e55Smrg# enable_integration_tests: used in configure.ac for additional configuration 109669d0b5e55Smrg# --enable-integration-tests: 'yes' user instructs the module to build tests 109679d0b5e55Smrg# 'no' user instructs the module not to build tests 109689d0b5e55Smrg# parm1: specify the default value, yes or no. 109699d0b5e55Smrg# 109709d0b5e55SmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 109719d0b5e55SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 109729d0b5e55Smrgm4_define([_defopt], m4_default([$1], [auto])) 109739d0b5e55SmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 109749d0b5e55Smrg [Enable building integration test cases (default: ]_defopt[)]), 109759d0b5e55Smrg [enable_integration_tests=$enableval], 109769d0b5e55Smrg [enable_integration_tests=]_defopt) 109779d0b5e55Smrgm4_undefine([_defopt]) 109789d0b5e55SmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 109799d0b5e55Smrg [test "x$enable_integration_tests" != xno]) 109809d0b5e55SmrgAC_MSG_CHECKING([whether to build unit test cases]) 109819d0b5e55SmrgAC_MSG_RESULT([$enable_integration_tests]) 109829d0b5e55Smrg]) # XORG_ENABLE_INTEGRATION_TESTS 109839d0b5e55Smrg 109840cc2eac3Smrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 109850cc2eac3Smrg# ---------------------------------------- 109860cc2eac3Smrg# Minimum version: 1.13.0 109870cc2eac3Smrg# 109880cc2eac3Smrg# GLib is a library which provides advanced data structures and functions. 109890cc2eac3Smrg# This macro enables a module to test for the presence of Glib. 109900cc2eac3Smrg# 109910cc2eac3Smrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 109920cc2eac3Smrg# Otherwise the value of $enable_unit_tests is blank. 109930cc2eac3Smrg# 109949d0b5e55Smrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 109959d0b5e55Smrg# test support usually requires less dependencies and may be built and run under 109969d0b5e55Smrg# less stringent environments than integration tests. 109979d0b5e55Smrg# 109980cc2eac3Smrg# Interface to module: 109990cc2eac3Smrg# HAVE_GLIB: used in makefiles to conditionally build targets 110000cc2eac3Smrg# with_glib: used in configure.ac to know if GLib has been found 110010cc2eac3Smrg# --with-glib: 'yes' user instructs the module to use glib 110020cc2eac3Smrg# 'no' user instructs the module not to use glib 110030cc2eac3Smrg# 110040cc2eac3SmrgAC_DEFUN([XORG_WITH_GLIB],[ 110050cc2eac3SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 110060cc2eac3Smrgm4_define([_defopt], m4_default([$2], [auto])) 110070cc2eac3SmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 110080cc2eac3Smrg [Use GLib library for unit testing (default: ]_defopt[)]), 110090cc2eac3Smrg [with_glib=$withval], [with_glib=]_defopt) 110100cc2eac3Smrgm4_undefine([_defopt]) 110116c321187Smrg 110120cc2eac3Smrghave_glib=no 110130cc2eac3Smrg# Do not probe GLib if user explicitly disabled unit testing 110140cc2eac3Smrgif test "x$enable_unit_tests" != x"no"; then 110150cc2eac3Smrg # Do not probe GLib if user explicitly disabled it 110160cc2eac3Smrg if test "x$with_glib" != x"no"; then 110170cc2eac3Smrg m4_ifval( 110180cc2eac3Smrg [$1], 110190cc2eac3Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 110200cc2eac3Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 110210cc2eac3Smrg ) 110220cc2eac3Smrg fi 110230cc2eac3Smrgfi 110246c321187Smrg 110250cc2eac3Smrg# Not having GLib when unit testing has been explicitly requested is an error 110260cc2eac3Smrgif test "x$enable_unit_tests" = x"yes"; then 110270cc2eac3Smrg if test "x$have_glib" = x"no"; then 110280cc2eac3Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 110290cc2eac3Smrg fi 110300cc2eac3Smrgfi 110316c321187Smrg 110320cc2eac3Smrg# Having unit testing disabled when GLib has been explicitly requested is an error 110330cc2eac3Smrgif test "x$enable_unit_tests" = x"no"; then 110340cc2eac3Smrg if test "x$with_glib" = x"yes"; then 110350cc2eac3Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 110360cc2eac3Smrg fi 110370cc2eac3Smrgfi 110386c321187Smrg 110390cc2eac3Smrg# Not having GLib when it has been explicitly requested is an error 110400cc2eac3Smrgif test "x$with_glib" = x"yes"; then 110410cc2eac3Smrg if test "x$have_glib" = x"no"; then 110420cc2eac3Smrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 110430cc2eac3Smrg fi 110440cc2eac3Smrgfi 110456c321187Smrg 110460cc2eac3SmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 110470cc2eac3Smrg]) # XORG_WITH_GLIB 110486c321187Smrg 110490cc2eac3Smrg# XORG_LD_WRAP([required|optional]) 110500cc2eac3Smrg# --------------------------------- 110510cc2eac3Smrg# Minimum version: 1.13.0 110520cc2eac3Smrg# 110530cc2eac3Smrg# Check if linker supports -wrap, passed via compiler flags 110540cc2eac3Smrg# 110550cc2eac3Smrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 110560cc2eac3Smrg# Otherwise the value of $enable_unit_tests is blank. 110570cc2eac3Smrg# 110580cc2eac3Smrg# Argument added in 1.16.0 - default is "required", to match existing behavior 110590cc2eac3Smrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 110600cc2eac3Smrg# available, an argument of "optional" allows use when some unit tests require 110610cc2eac3Smrg# ld -wrap and others do not. 110620cc2eac3Smrg# 110630cc2eac3SmrgAC_DEFUN([XORG_LD_WRAP],[ 110640cc2eac3SmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 110650cc2eac3Smrg [AC_LANG_PROGRAM([#include <stdlib.h> 110660cc2eac3Smrg void __wrap_exit(int status) { return; }], 110670cc2eac3Smrg [exit(0);])]) 110680cc2eac3Smrg# Not having ld wrap when unit testing has been explicitly requested is an error 110690cc2eac3Smrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 110700cc2eac3Smrg if test "x$have_ld_wrap" = x"no"; then 110710cc2eac3Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 110720cc2eac3Smrg fi 110730cc2eac3Smrgfi 110740cc2eac3SmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 110750cc2eac3Smrg# 110760cc2eac3Smrg]) # XORG_LD_WRAP 110776c321187Smrg 110780cc2eac3Smrg# XORG_CHECK_LINKER_FLAGS 110790cc2eac3Smrg# ----------------------- 110800cc2eac3Smrg# SYNOPSIS 110810cc2eac3Smrg# 110820cc2eac3Smrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 110830cc2eac3Smrg# 110840cc2eac3Smrg# DESCRIPTION 110850cc2eac3Smrg# 110860cc2eac3Smrg# Check whether the given linker FLAGS work with the current language's 110870cc2eac3Smrg# linker, or whether they give an error. 110880cc2eac3Smrg# 110890cc2eac3Smrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 110900cc2eac3Smrg# success/failure. 110910cc2eac3Smrg# 110920cc2eac3Smrg# PROGRAM-SOURCE is the program source to link with, if needed 110930cc2eac3Smrg# 110940cc2eac3Smrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 110950cc2eac3Smrg# 110960cc2eac3Smrg# LICENSE 110970cc2eac3Smrg# 110980cc2eac3Smrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 110990cc2eac3Smrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 111000cc2eac3Smrg# Copyright (c) 2009 Matteo Frigo 111010cc2eac3Smrg# 111020cc2eac3Smrg# This program is free software: you can redistribute it and/or modify it 111030cc2eac3Smrg# under the terms of the GNU General Public License as published by the 111040cc2eac3Smrg# Free Software Foundation, either version 3 of the License, or (at your 111050cc2eac3Smrg# option) any later version. 111060cc2eac3Smrg# 111070cc2eac3Smrg# This program is distributed in the hope that it will be useful, but 111080cc2eac3Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 111090cc2eac3Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 111100cc2eac3Smrg# Public License for more details. 111110cc2eac3Smrg# 111120cc2eac3Smrg# You should have received a copy of the GNU General Public License along 111130cc2eac3Smrg# with this program. If not, see <http://www.gnu.org/licenses/>. 111140cc2eac3Smrg# 111150cc2eac3Smrg# As a special exception, the respective Autoconf Macro's copyright owner 111160cc2eac3Smrg# gives unlimited permission to copy, distribute and modify the configure 111170cc2eac3Smrg# scripts that are the output of Autoconf when processing the Macro. You 111180cc2eac3Smrg# need not follow the terms of the GNU General Public License when using 111190cc2eac3Smrg# or distributing such scripts, even though portions of the text of the 111200cc2eac3Smrg# Macro appear in them. The GNU General Public License (GPL) does govern 111210cc2eac3Smrg# all other use of the material that constitutes the Autoconf Macro. 111220cc2eac3Smrg# 111230cc2eac3Smrg# This special exception to the GPL applies to versions of the Autoconf 111240cc2eac3Smrg# Macro released by the Autoconf Archive. When you make and distribute a 111250cc2eac3Smrg# modified version of the Autoconf Macro, you may extend this special 111260cc2eac3Smrg# exception to the GPL to apply to your modified version as well.# 111270cc2eac3SmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 111280cc2eac3Smrg[AC_MSG_CHECKING([whether the linker accepts $1]) 111290cc2eac3Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 111300cc2eac3SmrgAS_LITERAL_IF([$1], 111310cc2eac3Smrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 111320cc2eac3Smrg ax_save_FLAGS=$LDFLAGS 111330cc2eac3Smrg LDFLAGS="$1" 111340cc2eac3Smrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 111350cc2eac3Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 111360cc2eac3Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 111370cc2eac3Smrg LDFLAGS=$ax_save_FLAGS])], 111380cc2eac3Smrg [ax_save_FLAGS=$LDFLAGS 111390cc2eac3Smrg LDFLAGS="$1" 111400cc2eac3Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 111410cc2eac3Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 111420cc2eac3Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 111430cc2eac3Smrg LDFLAGS=$ax_save_FLAGS]) 111440cc2eac3Smrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 111450cc2eac3SmrgAC_MSG_RESULT($xorg_check_linker_flags) 111460cc2eac3Smrgif test "x$xorg_check_linker_flags" = xyes; then 111470cc2eac3Smrg m4_default([$2], :) 111480cc2eac3Smrgelse 111490cc2eac3Smrg m4_default([$3], :) 111500cc2eac3Smrgfi 111510cc2eac3Smrg]) # XORG_CHECK_LINKER_FLAGS 111526c321187Smrg 111530cc2eac3Smrg# XORG_MEMORY_CHECK_FLAGS 111540cc2eac3Smrg# ----------------------- 111550cc2eac3Smrg# Minimum version: 1.16.0 111560cc2eac3Smrg# 111570cc2eac3Smrg# This macro attempts to find appropriate memory checking functionality 111580cc2eac3Smrg# for various platforms which unit testing code may use to catch various 111590cc2eac3Smrg# forms of memory allocation and access errors in testing. 111600cc2eac3Smrg# 111610cc2eac3Smrg# Interface to module: 111620cc2eac3Smrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 111630cc2eac3Smrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 111640cc2eac3Smrg# 111650cc2eac3Smrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 111660cc2eac3Smrg# 111670cc2eac3SmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 111686c321187Smrg 111690cc2eac3SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 111700cc2eac3SmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 111710cc2eac3Smrg [Environment variables to enable memory checking in tests]) 111726c321187Smrg 111730cc2eac3Smrg# Check for different types of support on different platforms 111740cc2eac3Smrgcase $host_os in 111750cc2eac3Smrg solaris*) 111760cc2eac3Smrg AC_CHECK_LIB([umem], [umem_alloc], 111770cc2eac3Smrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 111780cc2eac3Smrg ;; 111790cc2eac3Smrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 111800cc2eac3Smrg # both directly and inverted, so should not be 0 or 255. 111810cc2eac3Smrg malloc_debug_env='MALLOC_PERTURB_=15' 111820cc2eac3Smrg ;; 111830cc2eac3Smrg darwin*) 111840cc2eac3Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 111850cc2eac3Smrg ;; 111860cc2eac3Smrg *bsd*) 111870cc2eac3Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 111880cc2eac3Smrg ;; 111890cc2eac3Smrgesac 111906c321187Smrg 111910cc2eac3Smrg# User supplied flags override default flags 111920cc2eac3Smrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 111930cc2eac3Smrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 111940cc2eac3Smrgfi 111956c321187Smrg 111960cc2eac3SmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 111970cc2eac3Smrg]) # XORG_WITH_LINT 111986c321187Smrg 111990cc2eac3Smrg# XORG_CHECK_MALLOC_ZERO 112000cc2eac3Smrg# ---------------------- 112010cc2eac3Smrg# Minimum version: 1.0.0 112020cc2eac3Smrg# 112030cc2eac3Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 112040cc2eac3Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 112050cc2eac3Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 112060cc2eac3SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 112070cc2eac3SmrgAC_ARG_ENABLE(malloc0returnsnull, 112080cc2eac3Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 112090cc2eac3Smrg [malloc(0) returns NULL (default: auto)]), 112100cc2eac3Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 112110cc2eac3Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 112126c321187Smrg 112130cc2eac3SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 112140cc2eac3Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 112150cc2eac3Smrg AC_RUN_IFELSE([AC_LANG_PROGRAM([ 112160cc2eac3Smrg#include <stdlib.h> 112170cc2eac3Smrg],[ 112180cc2eac3Smrg char *m0, *r0, *c0, *p; 112190cc2eac3Smrg m0 = malloc(0); 112200cc2eac3Smrg p = malloc(10); 112210cc2eac3Smrg r0 = realloc(p,0); 112220cc2eac3Smrg c0 = calloc(0,10); 112230cc2eac3Smrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 112240cc2eac3Smrg])], 112250cc2eac3Smrg [MALLOC_ZERO_RETURNS_NULL=yes], 112260cc2eac3Smrg [MALLOC_ZERO_RETURNS_NULL=no], 112270cc2eac3Smrg [MALLOC_ZERO_RETURNS_NULL=yes]) 112280cc2eac3Smrgfi 112290cc2eac3SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 112306c321187Smrg 112310cc2eac3Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 112320cc2eac3Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 112330cc2eac3Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 112340cc2eac3Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 112350cc2eac3Smrgelse 112360cc2eac3Smrg MALLOC_ZERO_CFLAGS="" 112370cc2eac3Smrg XMALLOC_ZERO_CFLAGS="" 112380cc2eac3Smrg XTMALLOC_ZERO_CFLAGS="" 112390cc2eac3Smrgfi 112406c321187Smrg 112410cc2eac3SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 112420cc2eac3SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 112430cc2eac3SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 112440cc2eac3Smrg]) # XORG_CHECK_MALLOC_ZERO 112456c321187Smrg 112460cc2eac3Smrg# XORG_WITH_LINT() 112470cc2eac3Smrg# ---------------- 112480cc2eac3Smrg# Minimum version: 1.1.0 112490cc2eac3Smrg# 112500cc2eac3Smrg# This macro enables the use of a tool that flags some suspicious and 112510cc2eac3Smrg# non-portable constructs (likely to be bugs) in C language source code. 112520cc2eac3Smrg# It will attempt to locate the tool and use appropriate options. 112530cc2eac3Smrg# There are various lint type tools on different platforms. 112540cc2eac3Smrg# 112550cc2eac3Smrg# Interface to module: 112560cc2eac3Smrg# LINT: returns the path to the tool found on the platform 112570cc2eac3Smrg# or the value set to LINT on the configure cmd line 112580cc2eac3Smrg# also an Automake conditional 112590cc2eac3Smrg# LINT_FLAGS: an Automake variable with appropriate flags 112600cc2eac3Smrg# 112610cc2eac3Smrg# --with-lint: 'yes' user instructs the module to use lint 112620cc2eac3Smrg# 'no' user instructs the module not to use lint (default) 112630cc2eac3Smrg# 112640cc2eac3Smrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 112650cc2eac3Smrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 112660cc2eac3Smrg# 112670cc2eac3SmrgAC_DEFUN([XORG_WITH_LINT],[ 112686c321187Smrg 112690cc2eac3SmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 112700cc2eac3SmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 112710cc2eac3SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 112720cc2eac3Smrg [Use a lint-style source code checker (default: disabled)])], 112730cc2eac3Smrg [use_lint=$withval], [use_lint=no]) 112746c321187Smrg 112750cc2eac3Smrg# Obtain platform specific info like program name and options 112760cc2eac3Smrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 112770cc2eac3Smrgcase $host_os in 112780cc2eac3Smrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 112790cc2eac3Smrg lint_name=splint 112800cc2eac3Smrg lint_options="-badflag" 112810cc2eac3Smrg ;; 112820cc2eac3Smrg *freebsd* | *netbsd*) 112830cc2eac3Smrg lint_name=lint 112840cc2eac3Smrg lint_options="-u -b" 112850cc2eac3Smrg ;; 112860cc2eac3Smrg *solaris*) 112870cc2eac3Smrg lint_name=lint 112880cc2eac3Smrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 112890cc2eac3Smrg ;; 112900cc2eac3Smrgesac 1129193493779Smrg 112920cc2eac3Smrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 112930cc2eac3Smrgif test "x$use_lint" = x"yes" ; then 112940cc2eac3Smrg AC_PATH_PROG([LINT], [$lint_name]) 112950cc2eac3Smrg if test "x$LINT" = "x"; then 112960cc2eac3Smrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 112970cc2eac3Smrg fi 112980cc2eac3Smrgelif test "x$use_lint" = x"no" ; then 112990cc2eac3Smrg if test "x$LINT" != "x"; then 113000cc2eac3Smrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 113010cc2eac3Smrg fi 113020cc2eac3Smrgelse 113030cc2eac3Smrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 113040cc2eac3Smrgfi 1130593493779Smrg 113060cc2eac3Smrg# User supplied flags override default flags 113070cc2eac3Smrgif test "x$LINT_FLAGS" != "x"; then 113080cc2eac3Smrg lint_options=$LINT_FLAGS 113090cc2eac3Smrgfi 1131093493779Smrg 113110cc2eac3SmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 113120cc2eac3SmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 1131393493779Smrg 113140cc2eac3Smrg]) # XORG_WITH_LINT 113156c321187Smrg 113160cc2eac3Smrg# XORG_LINT_LIBRARY(LIBNAME) 113170cc2eac3Smrg# -------------------------- 113180cc2eac3Smrg# Minimum version: 1.1.0 113196c321187Smrg# 113200cc2eac3Smrg# Sets up flags for building lint libraries for checking programs that call 113210cc2eac3Smrg# functions in the library. 113226c321187Smrg# 113230cc2eac3Smrg# Interface to module: 113240cc2eac3Smrg# LINTLIB - Automake variable with the name of lint library file to make 113250cc2eac3Smrg# MAKE_LINT_LIB - Automake conditional 113260cc2eac3Smrg# 113270cc2eac3Smrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 113280cc2eac3Smrg# - 'no' user instructs the module not to create a lint library (default) 113296c321187Smrg 113300cc2eac3SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 113310cc2eac3SmrgAC_REQUIRE([XORG_WITH_LINT]) 113320cc2eac3SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 113330cc2eac3Smrg [Create lint library (default: disabled)])], 113340cc2eac3Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 113356c321187Smrg 113360cc2eac3Smrgif test "x$make_lint_lib" = x"yes" ; then 113370cc2eac3Smrg LINTLIB=llib-l$1.ln 113380cc2eac3Smrg if test "x$LINT" = "x"; then 113390cc2eac3Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 113400cc2eac3Smrg fi 113410cc2eac3Smrgelif test "x$make_lint_lib" != x"no" ; then 113420cc2eac3Smrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 113430cc2eac3Smrgfi 11344e120bd27Smrg 113450cc2eac3SmrgAC_SUBST(LINTLIB) 113460cc2eac3SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 11347e120bd27Smrg 113480cc2eac3Smrg]) # XORG_LINT_LIBRARY 11349e120bd27Smrg 113500cc2eac3Smrg# XORG_COMPILER_BRAND 113510cc2eac3Smrg# ------------------- 113520cc2eac3Smrg# Minimum version: 1.14.0 113530cc2eac3Smrg# 113540cc2eac3Smrg# Checks for various brands of compilers and sets flags as appropriate: 113550cc2eac3Smrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 113560cc2eac3Smrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 113570cc2eac3Smrg# clang compiler - sets CLANGCC to "yes" 113580cc2eac3Smrg# Intel compiler - sets INTELCC to "yes" 113590cc2eac3Smrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 113600cc2eac3Smrg# 113610cc2eac3SmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 113620cc2eac3SmrgAC_LANG_CASE( 113630cc2eac3Smrg [C], [ 113640cc2eac3Smrg AC_REQUIRE([AC_PROG_CC_C99]) 113650cc2eac3Smrg ], 113660cc2eac3Smrg [C++], [ 113670cc2eac3Smrg AC_REQUIRE([AC_PROG_CXX]) 113680cc2eac3Smrg ] 113690cc2eac3Smrg) 113700cc2eac3SmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 113710cc2eac3SmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 113720cc2eac3SmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 113730cc2eac3Smrg]) # XORG_COMPILER_BRAND 11374e120bd27Smrg 113750cc2eac3Smrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 113760cc2eac3Smrg# --------------- 113770cc2eac3Smrg# Minimum version: 1.16.0 113780cc2eac3Smrg# 113790cc2eac3Smrg# Test if the compiler works when passed the given flag as a command line argument. 113800cc2eac3Smrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 113810cc2eac3Smrg# next flag in the list until there are no more options. 113820cc2eac3Smrg# 113830cc2eac3Smrg# Note that this does not guarantee that the compiler supports the flag as some 113840cc2eac3Smrg# compilers will simply ignore arguments that they do not understand, but we do 113850cc2eac3Smrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 113860cc2eac3Smrg# -Werror=unused-command-line-argument 113870cc2eac3Smrg# 113880cc2eac3SmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 113890cc2eac3Smrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 113900cc2eac3Smrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 113910cc2eac3Smrg 113920cc2eac3SmrgAC_LANG_COMPILER_REQUIRE 113930cc2eac3Smrg 113940cc2eac3SmrgAC_LANG_CASE( 113950cc2eac3Smrg [C], [ 113960cc2eac3Smrg AC_REQUIRE([AC_PROG_CC_C99]) 113970cc2eac3Smrg define([PREFIX], [C]) 113989d0b5e55Smrg define([CACHE_PREFIX], [cc]) 113999d0b5e55Smrg define([COMPILER], [$CC]) 114000cc2eac3Smrg ], 114010cc2eac3Smrg [C++], [ 114020cc2eac3Smrg define([PREFIX], [CXX]) 114039d0b5e55Smrg define([CACHE_PREFIX], [cxx]) 114049d0b5e55Smrg define([COMPILER], [$CXX]) 114050cc2eac3Smrg ] 114060cc2eac3Smrg) 11407e120bd27Smrg 114080cc2eac3Smrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 114090cc2eac3Smrg 114109d0b5e55Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 114110cc2eac3Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 114129d0b5e55Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 114139d0b5e55Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 114140cc2eac3Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 114159d0b5e55Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 114169d0b5e55Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 114179d0b5e55Smrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 114180cc2eac3Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 114190cc2eac3Smrgfi 11420e120bd27Smrg 114219d0b5e55Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 114229d0b5e55Smrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 114230cc2eac3Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 114240cc2eac3Smrg fi 114250cc2eac3Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 114269d0b5e55Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 114279d0b5e55Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 114280cc2eac3Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 114299d0b5e55Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 114309d0b5e55Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 114319d0b5e55Smrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 114320cc2eac3Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 114330cc2eac3Smrgfi 11434e120bd27Smrg 114350cc2eac3Smrgfound="no" 114360cc2eac3Smrgm4_foreach([flag], m4_cdr($@), [ 114370cc2eac3Smrg if test $found = "no" ; then 114389d0b5e55Smrg if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then 114390cc2eac3Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 114400cc2eac3Smrg fi 114410cc2eac3Smrg 114429d0b5e55Smrg if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then 114430cc2eac3Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 114440cc2eac3Smrg fi 114450cc2eac3Smrg 114460cc2eac3Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 114470cc2eac3Smrg 114480cc2eac3Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 114499d0b5e55Smrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 114509d0b5e55Smrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 114519d0b5e55Smrg AC_CACHE_VAL($cacheid, 114520cc2eac3Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 114539d0b5e55Smrg [eval $cacheid=yes], 114549d0b5e55Smrg [eval $cacheid=no])]) 114550cc2eac3Smrg 114560cc2eac3Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 114570cc2eac3Smrg 114589d0b5e55Smrg eval supported=\$$cacheid 114590cc2eac3Smrg AC_MSG_RESULT([$supported]) 114600cc2eac3Smrg if test "$supported" = "yes" ; then 114610cc2eac3Smrg $1="$$1 ]flag[" 114620cc2eac3Smrg found="yes" 114630cc2eac3Smrg fi 114640cc2eac3Smrg fi 114650cc2eac3Smrg]) 114660cc2eac3Smrg]) # XORG_TESTSET_CFLAG 11467e120bd27Smrg 114680cc2eac3Smrg# XORG_COMPILER_FLAGS 114690cc2eac3Smrg# --------------- 114700cc2eac3Smrg# Minimum version: 1.16.0 114710cc2eac3Smrg# 114720cc2eac3Smrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 114730cc2eac3Smrg# arguments supported by the selected compiler which do NOT alter the generated 114740cc2eac3Smrg# code. These arguments will cause the compiler to print various warnings 114750cc2eac3Smrg# during compilation AND turn a conservative set of warnings into errors. 114760cc2eac3Smrg# 114770cc2eac3Smrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 114780cc2eac3Smrg# future versions of util-macros as options are added to new compilers. 114790cc2eac3Smrg# 114800cc2eac3SmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 114810cc2eac3SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 114820cc2eac3Smrg 114830cc2eac3SmrgAC_ARG_ENABLE(selective-werror, 114840cc2eac3Smrg AS_HELP_STRING([--disable-selective-werror], 114850cc2eac3Smrg [Turn off selective compiler errors. (default: enabled)]), 114860cc2eac3Smrg [SELECTIVE_WERROR=$enableval], 114870cc2eac3Smrg [SELECTIVE_WERROR=yes]) 114880cc2eac3Smrg 114890cc2eac3SmrgAC_LANG_CASE( 114900cc2eac3Smrg [C], [ 114910cc2eac3Smrg define([PREFIX], [C]) 114920cc2eac3Smrg ], 114930cc2eac3Smrg [C++], [ 114940cc2eac3Smrg define([PREFIX], [CXX]) 114950cc2eac3Smrg ] 114960cc2eac3Smrg) 114970cc2eac3Smrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 114980cc2eac3Smrgif test "x$SUNCC" = "xyes"; then 114990cc2eac3Smrg [BASE_]PREFIX[FLAGS]="-v" 115000cc2eac3Smrgelse 115010cc2eac3Smrg [BASE_]PREFIX[FLAGS]="" 115020cc2eac3Smrgfi 11503e120bd27Smrg 115040cc2eac3Smrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 115050cc2eac3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 115060cc2eac3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 115070cc2eac3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 115080cc2eac3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 115090cc2eac3Smrg 115100cc2eac3SmrgAC_LANG_CASE( 115110cc2eac3Smrg [C], [ 115120cc2eac3Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 115130cc2eac3Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 115140cc2eac3Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 115150cc2eac3Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 115160cc2eac3Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition]) 115170cc2eac3Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 115180cc2eac3Smrg ] 115190cc2eac3Smrg) 11520e120bd27Smrg 115210cc2eac3Smrg# This chunk adds additional warnings that could catch undesired effects. 115220cc2eac3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 115230cc2eac3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 115240cc2eac3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 115250cc2eac3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 115260cc2eac3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 115270cc2eac3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 115280cc2eac3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 115290cc2eac3Smrg 115300cc2eac3Smrg# These are currently disabled because they are noisy. They will be enabled 115310cc2eac3Smrg# in the future once the codebase is sufficiently modernized to silence 115320cc2eac3Smrg# them. For now, I don't want them to drown out the other warnings. 115330cc2eac3Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 115340cc2eac3Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 115350cc2eac3Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 115360cc2eac3Smrg 115370cc2eac3Smrg# Turn some warnings into errors, so we don't accidently get successful builds 115380cc2eac3Smrg# when there are problems that should be fixed. 115390cc2eac3Smrg 115400cc2eac3Smrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 115410cc2eac3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 115420cc2eac3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 115430cc2eac3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 115440cc2eac3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 115450cc2eac3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 115460cc2eac3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 115470cc2eac3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 115480cc2eac3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 115490cc2eac3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 115500cc2eac3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 115510cc2eac3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 115520cc2eac3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 115530cc2eac3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 115540cc2eac3Smrgelse 115550cc2eac3SmrgAC_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]) 115560cc2eac3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 115570cc2eac3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 115580cc2eac3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 115590cc2eac3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 115600cc2eac3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 115610cc2eac3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 115620cc2eac3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 115630cc2eac3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 115640cc2eac3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 115650cc2eac3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 115660cc2eac3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 115670cc2eac3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 115680cc2eac3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 115690cc2eac3Smrgfi 11570e120bd27Smrg 115710cc2eac3SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 115720cc2eac3Smrg]) # XORG_COMPILER_FLAGS 11573e120bd27Smrg 115740cc2eac3Smrg# XORG_CWARNFLAGS 115750cc2eac3Smrg# --------------- 115760cc2eac3Smrg# Minimum version: 1.2.0 115770cc2eac3Smrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 115780cc2eac3Smrg# 115790cc2eac3Smrg# Defines CWARNFLAGS to enable C compiler warnings. 115800cc2eac3Smrg# 115810cc2eac3Smrg# This function is deprecated because it defines -fno-strict-aliasing 115820cc2eac3Smrg# which alters the code generated by the compiler. If -fno-strict-aliasing 115830cc2eac3Smrg# is needed, then it should be added explicitly in the module when 115840cc2eac3Smrg# it is updated to use BASE_CFLAGS. 115850cc2eac3Smrg# 115860cc2eac3SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 115870cc2eac3SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 115880cc2eac3SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 115890cc2eac3SmrgAC_LANG_CASE( 115900cc2eac3Smrg [C], [ 115910cc2eac3Smrg CWARNFLAGS="$BASE_CFLAGS" 115920cc2eac3Smrg if test "x$GCC" = xyes ; then 115930cc2eac3Smrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 115940cc2eac3Smrg fi 115950cc2eac3Smrg AC_SUBST(CWARNFLAGS) 115960cc2eac3Smrg ] 115970cc2eac3Smrg) 115980cc2eac3Smrg]) # XORG_CWARNFLAGS 11599e120bd27Smrg 116000cc2eac3Smrg# XORG_STRICT_OPTION 116010cc2eac3Smrg# ----------------------- 116020cc2eac3Smrg# Minimum version: 1.3.0 116030cc2eac3Smrg# 116040cc2eac3Smrg# Add configure option to enable strict compilation flags, such as treating 116050cc2eac3Smrg# warnings as fatal errors. 116060cc2eac3Smrg# If --enable-strict-compilation is passed to configure, adds strict flags to 116070cc2eac3Smrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 116080cc2eac3Smrg# 116090cc2eac3Smrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 116100cc2eac3Smrg# when strict compilation is unconditionally desired. 116110cc2eac3SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 116120cc2eac3SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 116130cc2eac3SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 116146c321187Smrg 116150cc2eac3SmrgAC_ARG_ENABLE(strict-compilation, 116160cc2eac3Smrg AS_HELP_STRING([--enable-strict-compilation], 116170cc2eac3Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 116180cc2eac3Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 116196c321187Smrg 116200cc2eac3SmrgAC_LANG_CASE( 116210cc2eac3Smrg [C], [ 116220cc2eac3Smrg define([PREFIX], [C]) 116230cc2eac3Smrg ], 116240cc2eac3Smrg [C++], [ 116250cc2eac3Smrg define([PREFIX], [CXX]) 116260cc2eac3Smrg ] 116270cc2eac3Smrg) 116286c321187Smrg 116290cc2eac3Smrg[STRICT_]PREFIX[FLAGS]="" 116300cc2eac3SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 116310cc2eac3SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 1163293493779Smrg 116330cc2eac3Smrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 116340cc2eac3Smrg# activate it with -Werror, so we add it here explicitly. 116350cc2eac3SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 1163693493779Smrg 116370cc2eac3Smrgif test "x$STRICT_COMPILE" = "xyes"; then 116380cc2eac3Smrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 116390cc2eac3Smrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 116400cc2eac3Smrgfi 116410cc2eac3SmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 116420cc2eac3SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 116430cc2eac3SmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 116440cc2eac3Smrg]) # XORG_STRICT_OPTION 116456c321187Smrg 116460cc2eac3Smrg# XORG_DEFAULT_OPTIONS 116470cc2eac3Smrg# -------------------- 116480cc2eac3Smrg# Minimum version: 1.3.0 116490cc2eac3Smrg# 116500cc2eac3Smrg# Defines default options for X.Org modules. 116510cc2eac3Smrg# 116520cc2eac3SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 116530cc2eac3SmrgAC_REQUIRE([AC_PROG_INSTALL]) 116540cc2eac3SmrgXORG_COMPILER_FLAGS 116550cc2eac3SmrgXORG_CWARNFLAGS 116560cc2eac3SmrgXORG_STRICT_OPTION 116570cc2eac3SmrgXORG_RELEASE_VERSION 116580cc2eac3SmrgXORG_CHANGELOG 116590cc2eac3SmrgXORG_INSTALL 116600cc2eac3SmrgXORG_MANPAGE_SECTIONS 116610cc2eac3Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 116620cc2eac3Smrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 116630cc2eac3Smrg]) # XORG_DEFAULT_OPTIONS 116646c321187Smrg 116650cc2eac3Smrg# XORG_INSTALL() 116660cc2eac3Smrg# ---------------- 116670cc2eac3Smrg# Minimum version: 1.4.0 116680cc2eac3Smrg# 116690cc2eac3Smrg# Defines the variable INSTALL_CMD as the command to copy 116700cc2eac3Smrg# INSTALL from $prefix/share/util-macros. 116710cc2eac3Smrg# 116720cc2eac3SmrgAC_DEFUN([XORG_INSTALL], [ 116730cc2eac3SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 116740cc2eac3Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 116750cc2eac3SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 116760cc2eac3Smrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 116770cc2eac3Smrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 116780cc2eac3Smrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 116790cc2eac3SmrgAC_SUBST([INSTALL_CMD]) 116800cc2eac3Smrg]) # XORG_INSTALL 116810cc2eac3Smrgdnl Copyright 2005 Red Hat, Inc 116820cc2eac3Smrgdnl 116830cc2eac3Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 116840cc2eac3Smrgdnl documentation for any purpose is hereby granted without fee, provided that 116850cc2eac3Smrgdnl the above copyright notice appear in all copies and that both that 116860cc2eac3Smrgdnl copyright notice and this permission notice appear in supporting 116870cc2eac3Smrgdnl documentation. 116880cc2eac3Smrgdnl 116890cc2eac3Smrgdnl The above copyright notice and this permission notice shall be included 116900cc2eac3Smrgdnl in all copies or substantial portions of the Software. 116910cc2eac3Smrgdnl 116920cc2eac3Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 116930cc2eac3Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 116940cc2eac3Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 116950cc2eac3Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 116960cc2eac3Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 116970cc2eac3Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 116980cc2eac3Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 116990cc2eac3Smrgdnl 117000cc2eac3Smrgdnl Except as contained in this notice, the name of the copyright holders shall 117010cc2eac3Smrgdnl not be used in advertising or otherwise to promote the sale, use or 117020cc2eac3Smrgdnl other dealings in this Software without prior written authorization 117030cc2eac3Smrgdnl from the copyright holders. 117040cc2eac3Smrgdnl 117056c321187Smrg 117060cc2eac3Smrg# XORG_RELEASE_VERSION 117070cc2eac3Smrg# -------------------- 117080cc2eac3Smrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 117099d0b5e55Smrg 117100cc2eac3SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 117110cc2eac3Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 117120cc2eac3Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 117130cc2eac3Smrg [Major version of this package]) 117140cc2eac3Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 117150cc2eac3Smrg if test "x$PVM" = "x"; then 117160cc2eac3Smrg PVM="0" 117170cc2eac3Smrg fi 117180cc2eac3Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 117190cc2eac3Smrg [$PVM], 117200cc2eac3Smrg [Minor version of this package]) 117210cc2eac3Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 117220cc2eac3Smrg if test "x$PVP" = "x"; then 117230cc2eac3Smrg PVP="0" 117240cc2eac3Smrg fi 117250cc2eac3Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 117260cc2eac3Smrg [$PVP], 117270cc2eac3Smrg [Patch version of this package]) 11728e120bd27Smrg]) 1172993493779Smrg 117300cc2eac3Smrg# XORG_CHANGELOG() 117310cc2eac3Smrg# ---------------- 117320cc2eac3Smrg# Minimum version: 1.2.0 11733e120bd27Smrg# 117340cc2eac3Smrg# Defines the variable CHANGELOG_CMD as the command to generate 117350cc2eac3Smrg# ChangeLog from git. 11736e120bd27Smrg# 117370cc2eac3Smrg# 117380cc2eac3SmrgAC_DEFUN([XORG_CHANGELOG], [ 117390cc2eac3SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 117400cc2eac3Smrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 117410cc2eac3Smrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 117420cc2eac3Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 117430cc2eac3SmrgAC_SUBST([CHANGELOG_CMD]) 117440cc2eac3Smrg]) # XORG_CHANGELOG 117456c321187Smrg 117460cc2eac3Smrgdnl 117470cc2eac3Smrgdnl Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. 117480cc2eac3Smrgdnl 117490cc2eac3Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 117500cc2eac3Smrgdnl copy of this software and associated documentation files (the "Software"), 117510cc2eac3Smrgdnl to deal in the Software without restriction, including without limitation 117520cc2eac3Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 117530cc2eac3Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 117540cc2eac3Smrgdnl Software is furnished to do so, subject to the following conditions: 117550cc2eac3Smrgdnl 117560cc2eac3Smrgdnl The above copyright notice and this permission notice (including the next 117570cc2eac3Smrgdnl paragraph) shall be included in all copies or substantial portions of the 117580cc2eac3Smrgdnl Software. 117590cc2eac3Smrgdnl 117600cc2eac3Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 117610cc2eac3Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 117620cc2eac3Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 117630cc2eac3Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 117640cc2eac3Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 117650cc2eac3Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 117660cc2eac3Smrgdnl DEALINGS IN THE SOFTWARE. 117670cc2eac3Smrgdnl 1176893493779Smrg 117690cc2eac3Smrg# XTRANS_TCP_FLAGS() 117700cc2eac3Smrg# ------------------ 117710cc2eac3Smrg# Find needed libraries for TCP sockets, and check for IPv6 support 117720cc2eac3SmrgAC_DEFUN([XTRANS_TCP_FLAGS],[ 117730cc2eac3Smrg # SVR4 hides these in libraries other than libc 117740cc2eac3Smrg AC_SEARCH_LIBS(socket, [socket]) 117750cc2eac3Smrg AC_SEARCH_LIBS(gethostbyname, [nsl]) 117760cc2eac3Smrg if test "$ac_cv_search_socket$ac_cv_search_gethostbyname" = "nono"; then 117770cc2eac3Smrg AC_HAVE_LIBRARY([ws2_32]) 117780cc2eac3Smrg fi 1177993493779Smrg 117800cc2eac3Smrg # Needs to come after above checks for libsocket & libnsl for SVR4 systems 117810cc2eac3Smrg AC_ARG_ENABLE(ipv6, 117820cc2eac3Smrg AC_HELP_STRING([--enable-ipv6],[Enable IPv6 support]), 117830cc2eac3Smrg [IPV6CONN=$enableval], 117840cc2eac3Smrg [AC_CHECK_FUNC(getaddrinfo,[IPV6CONN=yes],[IPV6CONN=no])]) 117850cc2eac3Smrg AC_MSG_CHECKING([if IPv6 support should be built]) 117860cc2eac3Smrg if test "$IPV6CONN" = "yes"; then 117870cc2eac3Smrg AC_DEFINE(IPv6,1,[Support IPv6 for TCP connections]) 117880cc2eac3Smrg fi 117890cc2eac3Smrg AC_MSG_RESULT($IPV6CONN) 117906c321187Smrg 117910cc2eac3Smrg # 4.3BSD-Reno added a new member to struct sockaddr_in 117920cc2eac3Smrg AC_CHECK_MEMBER([struct sockaddr_in.sin_len], 117930cc2eac3Smrg AC_DEFINE([BSD44SOCKETS],1, 117940cc2eac3Smrg [Define to 1 if `struct sockaddr_in' has a `sin_len' member]), [], [ 117950cc2eac3Smrg#include <sys/types.h> 117960cc2eac3Smrg#include <sys/socket.h> 117970cc2eac3Smrg#include <netinet/in.h> 117980cc2eac3Smrg ]) 117996c321187Smrg 118000cc2eac3Smrg # POSIX.1g changed the type of pointer passed to getsockname/getpeername/etc. 118010cc2eac3Smrg AC_CHECK_TYPES([socklen_t], [], [], [ 118020cc2eac3SmrgAC_INCLUDES_DEFAULT 118030cc2eac3Smrg#include <sys/socket.h>]) 118046c321187Smrg 118050cc2eac3Smrg]) # XTRANS_TCP_FLAGS 11806e120bd27Smrg 118070cc2eac3Smrg# XTRANS_CONNECTION_FLAGS() 118080cc2eac3Smrg# ------------------------- 118090cc2eac3Smrg# Standard checks for which Xtrans transports to use by the Xorg packages 118100cc2eac3Smrg# that use Xtrans functions 118110cc2eac3SmrgAC_DEFUN([XTRANS_CONNECTION_FLAGS],[ 118120cc2eac3Smrg AC_REQUIRE([AC_CANONICAL_HOST]) 118130cc2eac3Smrg AC_REQUIRE([AC_TYPE_SIGNAL]) 118140cc2eac3Smrg [case $host_os in 118150cc2eac3Smrg mingw*) unixdef="no" ;; 118160cc2eac3Smrg *) unixdef="yes" ;; 118170cc2eac3Smrg esac] 118180cc2eac3Smrg AC_ARG_ENABLE(unix-transport, 118190cc2eac3Smrg AC_HELP_STRING([--enable-unix-transport],[Enable UNIX domain socket transport]), 118200cc2eac3Smrg [UNIXCONN=$enableval], [UNIXCONN=$unixdef]) 118210cc2eac3Smrg AC_MSG_CHECKING([if Xtrans should support UNIX socket connections]) 118220cc2eac3Smrg if test "$UNIXCONN" = "yes"; then 118230cc2eac3Smrg AC_DEFINE(UNIXCONN,1,[Support UNIX socket connections]) 118240cc2eac3Smrg fi 118250cc2eac3Smrg AC_MSG_RESULT($UNIXCONN) 118260cc2eac3Smrg AC_ARG_ENABLE(tcp-transport, 118270cc2eac3Smrg AC_HELP_STRING([--enable-tcp-transport],[Enable TCP socket transport]), 118280cc2eac3Smrg [TCPCONN=$enableval], [TCPCONN=yes]) 118290cc2eac3Smrg AC_MSG_CHECKING([if Xtrans should support TCP socket connections]) 118300cc2eac3Smrg AC_MSG_RESULT($TCPCONN) 118310cc2eac3Smrg if test "$TCPCONN" = "yes"; then 118320cc2eac3Smrg AC_DEFINE(TCPCONN,1,[Support TCP socket connections]) 118330cc2eac3Smrg XTRANS_TCP_FLAGS 118340cc2eac3Smrg fi 118350cc2eac3Smrg [case $host_os in 118360cc2eac3Smrg solaris*|sco*|sysv4*) localdef="yes" ;; 118370cc2eac3Smrg *) localdef="no" ;; 118380cc2eac3Smrg esac] 118390cc2eac3Smrg AC_ARG_ENABLE(local-transport, 118400cc2eac3Smrg AC_HELP_STRING([--enable-local-transport],[Enable os-specific local transport]), 118410cc2eac3Smrg [LOCALCONN=$enableval], [LOCALCONN=$localdef]) 118420cc2eac3Smrg AC_MSG_CHECKING([if Xtrans should support os-specific local connections]) 118430cc2eac3Smrg AC_MSG_RESULT($LOCALCONN) 118440cc2eac3Smrg if test "$LOCALCONN" = "yes"; then 118450cc2eac3Smrg AC_DEFINE(LOCALCONN,1,[Support os-specific local connections]) 118460cc2eac3Smrg fi 11847e120bd27Smrg 118480cc2eac3Smrg]) # XTRANS_CONNECTION_FLAGS 118490cc2eac3Smrg 118500cc2eac3Smrg 118510cc2eac3Smrg# XTRANS_SECURE_RPC_FLAGS() 118520cc2eac3Smrg# ------------------------- 118530cc2eac3Smrg# Check for Secure RPC functions - must come after XTRANS_TCP_FLAGS 118540cc2eac3Smrg# so that any necessary networking libraries are already found 118550cc2eac3SmrgAC_DEFUN([XTRANS_SECURE_RPC_FLAGS], 118560cc2eac3Smrg[AC_REQUIRE([XTRANS_TCP_FLAGS]) 118570cc2eac3Smrg AC_ARG_ENABLE(secure-rpc, 118580cc2eac3Smrg AC_HELP_STRING([--enable-secure-rpc],[Enable Secure RPC]), 118590cc2eac3Smrg [SECURE_RPC=$enableval], [SECURE_RPC="try"]) 118600cc2eac3Smrg 118610cc2eac3Smrg if test "x$SECURE_RPC" = "xyes" -o "x$SECURE_RPC" = "xtry" ; then 118620cc2eac3Smrg FOUND_SECURE_RPC="no" 118630cc2eac3Smrg AC_CHECK_FUNCS([authdes_seccreate authdes_create], 118640cc2eac3Smrg [FOUND_SECURE_RPC="yes"]) 118650cc2eac3Smrg if test "x$FOUND_SECURE_RPC" = "xno" ; then 118660cc2eac3Smrg if test "x$SECURE_RPC" = "xyes" ; then 118670cc2eac3Smrg AC_MSG_ERROR([Secure RPC requested, but required functions not found]) 118680cc2eac3Smrg fi 118690cc2eac3Smrg SECURE_RPC="no" 118700cc2eac3Smrg else 118710cc2eac3Smrg dnl FreeBSD keeps getsecretkey in librpcsvc 118720cc2eac3Smrg AC_SEARCH_LIBS(getsecretkey, [rpcsvc]) 118730cc2eac3Smrg SECURE_RPC="yes" 118740cc2eac3Smrg fi 118750cc2eac3Smrg fi 118760cc2eac3Smrg AC_MSG_CHECKING([if Secure RPC authentication ("SUN-DES-1") should be supported]) 118770cc2eac3Smrg if test "x$SECURE_RPC" = "xyes" ; then 118780cc2eac3Smrg AC_DEFINE(SECURE_RPC, 1, [Support Secure RPC ("SUN-DES-1") authentication for X11 clients]) 118790cc2eac3Smrg fi 118800cc2eac3Smrg AC_MSG_RESULT($SECURE_RPC) 118810cc2eac3Smrg]) # XTRANS_SECURE_RPC_FLAGS 11882e120bd27Smrg 118836c321187Smrg 11884