aclocal.m4 revision fb5e8d76
1fb5e8d76Smrg# generated automatically by aclocal 1.14 -*- Autoconf -*- 2fb5e8d76Smrg 3fb5e8d76Smrg# Copyright (C) 1996-2013 Free Software Foundation, Inc. 4266e564dSmrg 5266e564dSmrg# This file is free software; the Free Software Foundation 6266e564dSmrg# gives unlimited permission to copy and/or distribute it, 7266e564dSmrg# with or without modifications, as long as this notice is preserved. 8266e564dSmrg 9266e564dSmrg# This program is distributed in the hope that it will be useful, 10266e564dSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11266e564dSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12266e564dSmrg# PARTICULAR PURPOSE. 13266e564dSmrg 14fb5e8d76Smrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 15c5629e66Smrgm4_ifndef([AC_AUTOCONF_VERSION], 16c5629e66Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 179ef0b394Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, 189ef0b394Smrg[m4_warning([this file was generated for autoconf 2.68. 19c5629e66SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 20c5629e66SmrgIf you have problems, you may need to regenerate the build system entirely. 21fb5e8d76SmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])]) 22266e564dSmrg 23fb5e8d76Smrg# Copyright (C) 2002-2013 Free Software Foundation, Inc. 24698f425bSmrg# 259ef0b394Smrg# This file is free software; the Free Software Foundation 269ef0b394Smrg# gives unlimited permission to copy and/or distribute it, 279ef0b394Smrg# with or without modifications, as long as this notice is preserved. 289ef0b394Smrg 299ef0b394Smrg# AM_AUTOMAKE_VERSION(VERSION) 309ef0b394Smrg# ---------------------------- 319ef0b394Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 329ef0b394Smrg# generated from the m4 files accompanying Automake X.Y. 339ef0b394Smrg# (This private macro should not be called outside this file.) 349ef0b394SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 35fb5e8d76Smrg[am__api_version='1.14' 369ef0b394Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 379ef0b394Smrgdnl require some minimum version. Point them to the right macro. 38fb5e8d76Smrgm4_if([$1], [1.14], [], 399ef0b394Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 409ef0b394Smrg]) 419ef0b394Smrg 429ef0b394Smrg# _AM_AUTOCONF_VERSION(VERSION) 439ef0b394Smrg# ----------------------------- 449ef0b394Smrg# aclocal traces this macro to find the Autoconf version. 459ef0b394Smrg# This is a private macro too. Using m4_define simplifies 469ef0b394Smrg# the logic in aclocal, which can simply ignore this definition. 479ef0b394Smrgm4_define([_AM_AUTOCONF_VERSION], []) 489ef0b394Smrg 499ef0b394Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 509ef0b394Smrg# ------------------------------- 519ef0b394Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 529ef0b394Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 539ef0b394SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 54fb5e8d76Smrg[AM_AUTOMAKE_VERSION([1.14])dnl 559ef0b394Smrgm4_ifndef([AC_AUTOCONF_VERSION], 569ef0b394Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 579ef0b394Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 589ef0b394Smrg 599ef0b394Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 609ef0b394Smrg 61fb5e8d76Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 62698f425bSmrg# 639ef0b394Smrg# This file is free software; the Free Software Foundation 649ef0b394Smrg# gives unlimited permission to copy and/or distribute it, 659ef0b394Smrg# with or without modifications, as long as this notice is preserved. 66698f425bSmrg 679ef0b394Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 68fb5e8d76Smrg# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 69fb5e8d76Smrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 70698f425bSmrg# 719ef0b394Smrg# Of course, Automake must honor this variable whenever it calls a 729ef0b394Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 739ef0b394Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 749ef0b394Smrg# depending on how configure is run. This is pretty annoying, since 759ef0b394Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 769ef0b394Smrg# source directory, any form will work fine, but in subdirectories a 779ef0b394Smrg# relative path needs to be adjusted first. 78698f425bSmrg# 799ef0b394Smrg# $ac_aux_dir/missing 809ef0b394Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 819ef0b394Smrg# $top_srcdir/$ac_aux_dir/missing 829ef0b394Smrg# fails if $ac_aux_dir is absolute, 839ef0b394Smrg# fails when called from a subdirectory in a VPATH build with 849ef0b394Smrg# a relative $ac_aux_dir 85698f425bSmrg# 869ef0b394Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 879ef0b394Smrg# are both prefixed by $srcdir. In an in-source build this is usually 88fb5e8d76Smrg# harmless because $srcdir is '.', but things will broke when you 899ef0b394Smrg# start a VPATH build or use an absolute $srcdir. 90698f425bSmrg# 919ef0b394Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 929ef0b394Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 939ef0b394Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 949ef0b394Smrg# and then we would define $MISSING as 959ef0b394Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 969ef0b394Smrg# This will work as long as MISSING is not called from configure, because 979ef0b394Smrg# unfortunately $(top_srcdir) has no meaning in configure. 989ef0b394Smrg# However there are other variables, like CC, which are often used in 999ef0b394Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 100698f425bSmrg# 1019ef0b394Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 1029ef0b394Smrg# absolute PATH. The drawback is that using absolute paths prevent a 1039ef0b394Smrg# configured tree to be moved without reconfiguration. 104266e564dSmrg 1059ef0b394SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 1069ef0b394Smrg[dnl Rely on autoconf to set up CDPATH properly. 1079ef0b394SmrgAC_PREREQ([2.50])dnl 1089ef0b394Smrg# expand $ac_aux_dir to an absolute path 1099ef0b394Smrgam_aux_dir=`cd $ac_aux_dir && pwd` 110698f425bSmrg]) 111698f425bSmrg 1129ef0b394Smrg# AM_CONDITIONAL -*- Autoconf -*- 113698f425bSmrg 114fb5e8d76Smrg# Copyright (C) 1997-2013 Free Software Foundation, Inc. 1159ef0b394Smrg# 1169ef0b394Smrg# This file is free software; the Free Software Foundation 1179ef0b394Smrg# gives unlimited permission to copy and/or distribute it, 1189ef0b394Smrg# with or without modifications, as long as this notice is preserved. 119266e564dSmrg 1209ef0b394Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 1219ef0b394Smrg# ------------------------------------- 1229ef0b394Smrg# Define a conditional. 1239ef0b394SmrgAC_DEFUN([AM_CONDITIONAL], 124fb5e8d76Smrg[AC_PREREQ([2.52])dnl 125fb5e8d76Smrg m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 126fb5e8d76Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 1279ef0b394SmrgAC_SUBST([$1_TRUE])dnl 1289ef0b394SmrgAC_SUBST([$1_FALSE])dnl 1299ef0b394Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 1309ef0b394Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 1319ef0b394Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 1329ef0b394Smrgif $2; then 1339ef0b394Smrg $1_TRUE= 1349ef0b394Smrg $1_FALSE='#' 1359ef0b394Smrgelse 1369ef0b394Smrg $1_TRUE='#' 1379ef0b394Smrg $1_FALSE= 1389ef0b394Smrgfi 1399ef0b394SmrgAC_CONFIG_COMMANDS_PRE( 1409ef0b394Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 1419ef0b394Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 1429ef0b394SmrgUsually this means the macro was only invoked conditionally.]]) 1439ef0b394Smrgfi])]) 144266e564dSmrg 145fb5e8d76Smrg# Copyright (C) 1999-2013 Free Software Foundation, Inc. 1469ef0b394Smrg# 1479ef0b394Smrg# This file is free software; the Free Software Foundation 1489ef0b394Smrg# gives unlimited permission to copy and/or distribute it, 1499ef0b394Smrg# with or without modifications, as long as this notice is preserved. 150698f425bSmrg 151698f425bSmrg 152fb5e8d76Smrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 1539ef0b394Smrg# written in clear, in which case automake, when reading aclocal.m4, 1549ef0b394Smrg# will think it sees a *use*, and therefore will trigger all it's 1559ef0b394Smrg# C support machinery. Also note that it means that autoscan, seeing 1569ef0b394Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 157698f425bSmrg 158698f425bSmrg 1599ef0b394Smrg# _AM_DEPENDENCIES(NAME) 160698f425bSmrg# ---------------------- 1619ef0b394Smrg# See how the compiler implements dependency checking. 162fb5e8d76Smrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 1639ef0b394Smrg# We try a few techniques and use that to set a single cache variable. 1649ef0b394Smrg# 1659ef0b394Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 1669ef0b394Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 1679ef0b394Smrg# dependency, and given that the user is not expected to run this macro, 1689ef0b394Smrg# just rely on AC_PROG_CC. 1699ef0b394SmrgAC_DEFUN([_AM_DEPENDENCIES], 1709ef0b394Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 1719ef0b394SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 1729ef0b394SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 1739ef0b394SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 174698f425bSmrg 175fb5e8d76Smrgm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 176fb5e8d76Smrg [$1], [CXX], [depcc="$CXX" am_compiler_list=], 177fb5e8d76Smrg [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 178fb5e8d76Smrg [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 179fb5e8d76Smrg [$1], [UPC], [depcc="$UPC" am_compiler_list=], 180fb5e8d76Smrg [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 181fb5e8d76Smrg [depcc="$$1" am_compiler_list=]) 182698f425bSmrg 1839ef0b394SmrgAC_CACHE_CHECK([dependency style of $depcc], 1849ef0b394Smrg [am_cv_$1_dependencies_compiler_type], 1859ef0b394Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 1869ef0b394Smrg # We make a subdir and do the tests there. Otherwise we can end up 1879ef0b394Smrg # making bogus files that we don't know about and never remove. For 1889ef0b394Smrg # instance it was reported that on HP-UX the gcc test will end up 189fb5e8d76Smrg # making a dummy file named 'D' -- because '-MD' means "put the output 190fb5e8d76Smrg # in D". 191fb5e8d76Smrg rm -rf conftest.dir 1929ef0b394Smrg mkdir conftest.dir 1939ef0b394Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 1949ef0b394Smrg # using a relative directory. 1959ef0b394Smrg cp "$am_depcomp" conftest.dir 1969ef0b394Smrg cd conftest.dir 1979ef0b394Smrg # We will build objects and dependencies in a subdirectory because 1989ef0b394Smrg # it helps to detect inapplicable dependency modes. For instance 1999ef0b394Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 2009ef0b394Smrg # side effect of compilation, but ICC will put the dependencies in 2019ef0b394Smrg # the current directory while Tru64 will put them in the object 2029ef0b394Smrg # directory. 2039ef0b394Smrg mkdir sub 204266e564dSmrg 2059ef0b394Smrg am_cv_$1_dependencies_compiler_type=none 2069ef0b394Smrg if test "$am_compiler_list" = ""; then 2079ef0b394Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 208c5629e66Smrg fi 2099ef0b394Smrg am__universal=false 2109ef0b394Smrg m4_case([$1], [CC], 2119ef0b394Smrg [case " $depcc " in #( 2129ef0b394Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 2139ef0b394Smrg esac], 2149ef0b394Smrg [CXX], 2159ef0b394Smrg [case " $depcc " in #( 2169ef0b394Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 2179ef0b394Smrg esac]) 218266e564dSmrg 2199ef0b394Smrg for depmode in $am_compiler_list; do 2209ef0b394Smrg # Setup a source with many dependencies, because some compilers 2219ef0b394Smrg # like to wrap large dependency lists on column 80 (with \), and 2229ef0b394Smrg # we should not choose a depcomp mode which is confused by this. 2239ef0b394Smrg # 2249ef0b394Smrg # We need to recreate these files for each test, as the compiler may 2259ef0b394Smrg # overwrite some of them when testing with obscure command lines. 2269ef0b394Smrg # This happens at least with the AIX C compiler. 2279ef0b394Smrg : > sub/conftest.c 2289ef0b394Smrg for i in 1 2 3 4 5 6; do 2299ef0b394Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 230fb5e8d76Smrg # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 231fb5e8d76Smrg # Solaris 10 /bin/sh. 232fb5e8d76Smrg echo '/* dummy */' > sub/conftst$i.h 2339ef0b394Smrg done 2349ef0b394Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 235266e564dSmrg 236fb5e8d76Smrg # We check with '-c' and '-o' for the sake of the "dashmstdout" 2379ef0b394Smrg # mode. It turns out that the SunPro C++ compiler does not properly 238fb5e8d76Smrg # handle '-M -o', and we need to detect this. Also, some Intel 239fb5e8d76Smrg # versions had trouble with output in subdirs. 2409ef0b394Smrg am__obj=sub/conftest.${OBJEXT-o} 2419ef0b394Smrg am__minus_obj="-o $am__obj" 2429ef0b394Smrg case $depmode in 2439ef0b394Smrg gcc) 2449ef0b394Smrg # This depmode causes a compiler race in universal mode. 2459ef0b394Smrg test "$am__universal" = false || continue 2469ef0b394Smrg ;; 2479ef0b394Smrg nosideeffect) 248fb5e8d76Smrg # After this tag, mechanisms are not by side-effect, so they'll 249fb5e8d76Smrg # only be used when explicitly requested. 2509ef0b394Smrg if test "x$enable_dependency_tracking" = xyes; then 2519ef0b394Smrg continue 2529ef0b394Smrg else 2539ef0b394Smrg break 2549ef0b394Smrg fi 2559ef0b394Smrg ;; 256fb5e8d76Smrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 257fb5e8d76Smrg # This compiler won't grok '-c -o', but also, the minuso test has 2589ef0b394Smrg # not run yet. These depmodes are late enough in the game, and 2599ef0b394Smrg # so weak that their functioning should not be impacted. 2609ef0b394Smrg am__obj=conftest.${OBJEXT-o} 2619ef0b394Smrg am__minus_obj= 2629ef0b394Smrg ;; 2639ef0b394Smrg none) break ;; 2649ef0b394Smrg esac 2659ef0b394Smrg if depmode=$depmode \ 2669ef0b394Smrg source=sub/conftest.c object=$am__obj \ 2679ef0b394Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 2689ef0b394Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 2699ef0b394Smrg >/dev/null 2>conftest.err && 2709ef0b394Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 2719ef0b394Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 2729ef0b394Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 2739ef0b394Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 2749ef0b394Smrg # icc doesn't choke on unknown options, it will just issue warnings 2759ef0b394Smrg # or remarks (even with -Werror). So we grep stderr for any message 2769ef0b394Smrg # that says an option was ignored or not supported. 2779ef0b394Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 2789ef0b394Smrg # icc: Command line warning: ignoring option '-M'; no argument required 2799ef0b394Smrg # The diagnosis changed in icc 8.0: 2809ef0b394Smrg # icc: Command line remark: option '-MP' not supported 2819ef0b394Smrg if (grep 'ignoring option' conftest.err || 2829ef0b394Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 2839ef0b394Smrg am_cv_$1_dependencies_compiler_type=$depmode 2849ef0b394Smrg break 2859ef0b394Smrg fi 2869ef0b394Smrg fi 2879ef0b394Smrg done 288266e564dSmrg 2899ef0b394Smrg cd .. 2909ef0b394Smrg rm -rf conftest.dir 2919ef0b394Smrgelse 2929ef0b394Smrg am_cv_$1_dependencies_compiler_type=none 2939ef0b394Smrgfi 2949ef0b394Smrg]) 2959ef0b394SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 2969ef0b394SmrgAM_CONDITIONAL([am__fastdep$1], [ 2979ef0b394Smrg test "x$enable_dependency_tracking" != xno \ 2989ef0b394Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 2999ef0b394Smrg]) 300c5629e66Smrg 301266e564dSmrg 3029ef0b394Smrg# AM_SET_DEPDIR 3039ef0b394Smrg# ------------- 3049ef0b394Smrg# Choose a directory name for dependency files. 305fb5e8d76Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 3069ef0b394SmrgAC_DEFUN([AM_SET_DEPDIR], 3079ef0b394Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 3089ef0b394SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 3099ef0b394Smrg]) 310266e564dSmrg 311266e564dSmrg 3129ef0b394Smrg# AM_DEP_TRACK 3139ef0b394Smrg# ------------ 3149ef0b394SmrgAC_DEFUN([AM_DEP_TRACK], 315fb5e8d76Smrg[AC_ARG_ENABLE([dependency-tracking], [dnl 316fb5e8d76SmrgAS_HELP_STRING( 317fb5e8d76Smrg [--enable-dependency-tracking], 318fb5e8d76Smrg [do not reject slow dependency extractors]) 319fb5e8d76SmrgAS_HELP_STRING( 320fb5e8d76Smrg [--disable-dependency-tracking], 321fb5e8d76Smrg [speeds up one-time build])]) 3229ef0b394Smrgif test "x$enable_dependency_tracking" != xno; then 3239ef0b394Smrg am_depcomp="$ac_aux_dir/depcomp" 3249ef0b394Smrg AMDEPBACKSLASH='\' 325fb5e8d76Smrg am__nodep='_no' 3269ef0b394Smrgfi 3279ef0b394SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 3289ef0b394SmrgAC_SUBST([AMDEPBACKSLASH])dnl 3299ef0b394Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 330fb5e8d76SmrgAC_SUBST([am__nodep])dnl 331fb5e8d76Smrg_AM_SUBST_NOTMAKE([am__nodep])dnl 3329ef0b394Smrg]) 333266e564dSmrg 3349ef0b394Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 335266e564dSmrg 336fb5e8d76Smrg# Copyright (C) 1999-2013 Free Software Foundation, Inc. 3379ef0b394Smrg# 3389ef0b394Smrg# This file is free software; the Free Software Foundation 3399ef0b394Smrg# gives unlimited permission to copy and/or distribute it, 3409ef0b394Smrg# with or without modifications, as long as this notice is preserved. 341698f425bSmrg 342698f425bSmrg 3439ef0b394Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 344698f425bSmrg# ------------------------------ 3459ef0b394SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 3469ef0b394Smrg[{ 347fb5e8d76Smrg # Older Autoconf quotes --file arguments for eval, but not when files 3489ef0b394Smrg # are listed without --file. Let's play safe and only enable the eval 3499ef0b394Smrg # if we detect the quoting. 3509ef0b394Smrg case $CONFIG_FILES in 3519ef0b394Smrg *\'*) eval set x "$CONFIG_FILES" ;; 3529ef0b394Smrg *) set x $CONFIG_FILES ;; 3539ef0b394Smrg esac 3549ef0b394Smrg shift 3559ef0b394Smrg for mf 3569ef0b394Smrg do 3579ef0b394Smrg # Strip MF so we end up with the name of the file. 3589ef0b394Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 3599ef0b394Smrg # Check whether this is an Automake generated Makefile or not. 360fb5e8d76Smrg # We used to match only the files named 'Makefile.in', but 3619ef0b394Smrg # some people rename them; so instead we look at the file content. 3629ef0b394Smrg # Grep'ing the first line is not enough: some people post-process 3639ef0b394Smrg # each Makefile.in and add a new line on top of each file to say so. 3649ef0b394Smrg # Grep'ing the whole file is not good either: AIX grep has a line 3659ef0b394Smrg # limit of 2048, but all sed's we know have understand at least 4000. 3669ef0b394Smrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 3679ef0b394Smrg dirpart=`AS_DIRNAME("$mf")` 3689ef0b394Smrg else 3699ef0b394Smrg continue 3709ef0b394Smrg fi 3719ef0b394Smrg # Extract the definition of DEPDIR, am__include, and am__quote 372fb5e8d76Smrg # from the Makefile without running 'make'. 3739ef0b394Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 3749ef0b394Smrg test -z "$DEPDIR" && continue 3759ef0b394Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 376fb5e8d76Smrg test -z "$am__include" && continue 3779ef0b394Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 3789ef0b394Smrg # Find all dependency output files, they are included files with 3799ef0b394Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 3809ef0b394Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 3819ef0b394Smrg # expansion. 3829ef0b394Smrg for file in `sed -n " 3839ef0b394Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 384fb5e8d76Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do 3859ef0b394Smrg # Make sure the directory exists. 3869ef0b394Smrg test -f "$dirpart/$file" && continue 3879ef0b394Smrg fdir=`AS_DIRNAME(["$file"])` 3889ef0b394Smrg AS_MKDIR_P([$dirpart/$fdir]) 3899ef0b394Smrg # echo "creating $dirpart/$file" 3909ef0b394Smrg echo '# dummy' > "$dirpart/$file" 3919ef0b394Smrg done 3929ef0b394Smrg done 3939ef0b394Smrg} 3949ef0b394Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 395698f425bSmrg 396698f425bSmrg 3979ef0b394Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 398698f425bSmrg# ----------------------------- 3999ef0b394Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 4009ef0b394Smrg# 4019ef0b394Smrg# This code is only required when automatic dependency tracking 402fb5e8d76Smrg# is enabled. FIXME. This creates each '.P' file that we will 4039ef0b394Smrg# need in order to bootstrap the dependency handling code. 4049ef0b394SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 4059ef0b394Smrg[AC_CONFIG_COMMANDS([depfiles], 4069ef0b394Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 4079ef0b394Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 4089ef0b394Smrg]) 409698f425bSmrg 4109ef0b394Smrg# Do all the work for Automake. -*- Autoconf -*- 411698f425bSmrg 412fb5e8d76Smrg# Copyright (C) 1996-2013 Free Software Foundation, Inc. 4139ef0b394Smrg# 4149ef0b394Smrg# This file is free software; the Free Software Foundation 4159ef0b394Smrg# gives unlimited permission to copy and/or distribute it, 4169ef0b394Smrg# with or without modifications, as long as this notice is preserved. 417698f425bSmrg 4189ef0b394Smrg# This macro actually does too much. Some checks are only needed if 4199ef0b394Smrg# your package does certain things. But this isn't really a big deal. 420698f425bSmrg 421fb5e8d76Smrgdnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 422fb5e8d76Smrgm4_define([AC_PROG_CC], 423fb5e8d76Smrgm4_defn([AC_PROG_CC]) 424fb5e8d76Smrg[_AM_PROG_CC_C_O 425fb5e8d76Smrg]) 426fb5e8d76Smrg 4279ef0b394Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 4289ef0b394Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 4299ef0b394Smrg# ----------------------------------------------- 4309ef0b394Smrg# The call with PACKAGE and VERSION arguments is the old style 4319ef0b394Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 4329ef0b394Smrg# and VERSION should now be passed to AC_INIT and removed from 4339ef0b394Smrg# the call to AM_INIT_AUTOMAKE. 4349ef0b394Smrg# We support both call styles for the transition. After 4359ef0b394Smrg# the next Automake release, Autoconf can make the AC_INIT 4369ef0b394Smrg# arguments mandatory, and then we can depend on a new Autoconf 4379ef0b394Smrg# release and drop the old call support. 4389ef0b394SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 439fb5e8d76Smrg[AC_PREREQ([2.65])dnl 4409ef0b394Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 4419ef0b394Smrgdnl the ones we care about. 4429ef0b394Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 4439ef0b394SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 4449ef0b394SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 4459ef0b394Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 4469ef0b394Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 4479ef0b394Smrg # is not polluted with repeated "-I." 4489ef0b394Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 4499ef0b394Smrg # test to see if srcdir already configured 4509ef0b394Smrg if test -f $srcdir/config.status; then 4519ef0b394Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 4529ef0b394Smrg fi 4539ef0b394Smrgfi 454698f425bSmrg 4559ef0b394Smrg# test whether we have cygpath 4569ef0b394Smrgif test -z "$CYGPATH_W"; then 4579ef0b394Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 4589ef0b394Smrg CYGPATH_W='cygpath -w' 4599ef0b394Smrg else 4609ef0b394Smrg CYGPATH_W=echo 4619ef0b394Smrg fi 4629ef0b394Smrgfi 4639ef0b394SmrgAC_SUBST([CYGPATH_W]) 464698f425bSmrg 4659ef0b394Smrg# Define the identity of the package. 4669ef0b394Smrgdnl Distinguish between old-style and new-style calls. 4679ef0b394Smrgm4_ifval([$2], 468fb5e8d76Smrg[AC_DIAGNOSE([obsolete], 469fb5e8d76Smrg [$0: two- and three-arguments forms are deprecated.]) 470fb5e8d76Smrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 4719ef0b394Smrg AC_SUBST([PACKAGE], [$1])dnl 4729ef0b394Smrg AC_SUBST([VERSION], [$2])], 4739ef0b394Smrg[_AM_SET_OPTIONS([$1])dnl 4749ef0b394Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 475fb5e8d76Smrgm4_if( 476fb5e8d76Smrg m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), 477fb5e8d76Smrg [ok:ok],, 4789ef0b394Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 4799ef0b394Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 4809ef0b394Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 481698f425bSmrg 4829ef0b394Smrg_AM_IF_OPTION([no-define],, 483fb5e8d76Smrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 484fb5e8d76Smrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 485698f425bSmrg 4869ef0b394Smrg# Some tools Automake needs. 4879ef0b394SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 4889ef0b394SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 489fb5e8d76SmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 490fb5e8d76SmrgAM_MISSING_PROG([AUTOCONF], [autoconf]) 491fb5e8d76SmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 492fb5e8d76SmrgAM_MISSING_PROG([AUTOHEADER], [autoheader]) 493fb5e8d76SmrgAM_MISSING_PROG([MAKEINFO], [makeinfo]) 4949ef0b394SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 4959ef0b394SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 496fb5e8d76SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 497fb5e8d76Smrg# For better backward compatibility. To be removed once Automake 1.9.x 498fb5e8d76Smrg# dies out for good. For more background, see: 499fb5e8d76Smrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 500fb5e8d76Smrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 501fb5e8d76SmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 5029ef0b394Smrg# We need awk for the "check" target. The system "awk" is bad on 5039ef0b394Smrg# some platforms. 5049ef0b394SmrgAC_REQUIRE([AC_PROG_AWK])dnl 5059ef0b394SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 5069ef0b394SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 5079ef0b394Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 5089ef0b394Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 5099ef0b394Smrg [_AM_PROG_TAR([v7])])]) 5109ef0b394Smrg_AM_IF_OPTION([no-dependencies],, 5119ef0b394Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 512fb5e8d76Smrg [_AM_DEPENDENCIES([CC])], 513fb5e8d76Smrg [m4_define([AC_PROG_CC], 514fb5e8d76Smrg m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 5159ef0b394SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 516fb5e8d76Smrg [_AM_DEPENDENCIES([CXX])], 517fb5e8d76Smrg [m4_define([AC_PROG_CXX], 518fb5e8d76Smrg m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 5199ef0b394SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 520fb5e8d76Smrg [_AM_DEPENDENCIES([OBJC])], 521fb5e8d76Smrg [m4_define([AC_PROG_OBJC], 522fb5e8d76Smrg m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 523fb5e8d76SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 524fb5e8d76Smrg [_AM_DEPENDENCIES([OBJCXX])], 525fb5e8d76Smrg [m4_define([AC_PROG_OBJCXX], 526fb5e8d76Smrg m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 5279ef0b394Smrg]) 528fb5e8d76SmrgAC_REQUIRE([AM_SILENT_RULES])dnl 529fb5e8d76Smrgdnl The testsuite driver may need to know about EXEEXT, so add the 530fb5e8d76Smrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 531fb5e8d76Smrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 5329ef0b394SmrgAC_CONFIG_COMMANDS_PRE(dnl 5339ef0b394Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 5349ef0b394Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 535698f425bSmrg 536fb5e8d76Smrg# POSIX will say in a future version that running "rm -f" with no argument 537fb5e8d76Smrg# is OK; and we want to be able to make that assumption in our Makefile 538fb5e8d76Smrg# recipes. So use an aggressive probe to check that the usage we want is 539fb5e8d76Smrg# actually supported "in the wild" to an acceptable degree. 540fb5e8d76Smrg# See automake bug#10828. 541fb5e8d76Smrg# To make any issue more visible, cause the running configure to be aborted 542fb5e8d76Smrg# by default if the 'rm' program in use doesn't match our expectations; the 543fb5e8d76Smrg# user can still override this though. 544fb5e8d76Smrgif rm -f && rm -fr && rm -rf; then : OK; else 545fb5e8d76Smrg cat >&2 <<'END' 546fb5e8d76SmrgOops! 547fb5e8d76Smrg 548fb5e8d76SmrgYour 'rm' program seems unable to run without file operands specified 549fb5e8d76Smrgon the command line, even when the '-f' option is present. This is contrary 550fb5e8d76Smrgto the behaviour of most rm programs out there, and not conforming with 551fb5e8d76Smrgthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 552fb5e8d76Smrg 553fb5e8d76SmrgPlease tell bug-automake@gnu.org about your system, including the value 554fb5e8d76Smrgof your $PATH and any error possibly output before this message. This 555fb5e8d76Smrgcan help us improve future automake versions. 556fb5e8d76Smrg 557fb5e8d76SmrgEND 558fb5e8d76Smrg if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 559fb5e8d76Smrg echo 'Configuration will proceed anyway, since you have set the' >&2 560fb5e8d76Smrg echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 561fb5e8d76Smrg echo >&2 562fb5e8d76Smrg else 563fb5e8d76Smrg cat >&2 <<'END' 564fb5e8d76SmrgAborting the configuration process, to ensure you take notice of the issue. 565fb5e8d76Smrg 566fb5e8d76SmrgYou can download and install GNU coreutils to get an 'rm' implementation 567fb5e8d76Smrgthat behaves properly: <http://www.gnu.org/software/coreutils/>. 568fb5e8d76Smrg 569fb5e8d76SmrgIf you want to complete the configuration process using your problematic 570fb5e8d76Smrg'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 571fb5e8d76Smrgto "yes", and re-run configure. 572fb5e8d76Smrg 573fb5e8d76SmrgEND 574fb5e8d76Smrg AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 575fb5e8d76Smrg fi 576fb5e8d76Smrgfi]) 577fb5e8d76Smrg 578fb5e8d76Smrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 5799ef0b394Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 5809ef0b394Smrgdnl mangled by Autoconf and run in a shell conditional statement. 5819ef0b394Smrgm4_define([_AC_COMPILER_EXEEXT], 5829ef0b394Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 583698f425bSmrg 5849ef0b394Smrg# When config.status generates a header, we must update the stamp-h file. 5859ef0b394Smrg# This file resides in the same directory as the config header 5869ef0b394Smrg# that is generated. The stamp files are numbered to have different names. 587698f425bSmrg 5889ef0b394Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 5899ef0b394Smrg# loop where config.status creates the headers, so we can generate 5909ef0b394Smrg# our stamp files there. 5919ef0b394SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 5929ef0b394Smrg[# Compute $1's index in $config_headers. 5939ef0b394Smrg_am_arg=$1 5949ef0b394Smrg_am_stamp_count=1 5959ef0b394Smrgfor _am_header in $config_headers :; do 5969ef0b394Smrg case $_am_header in 5979ef0b394Smrg $_am_arg | $_am_arg:* ) 5989ef0b394Smrg break ;; 5999ef0b394Smrg * ) 6009ef0b394Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 6019ef0b394Smrg esac 6029ef0b394Smrgdone 6039ef0b394Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 604698f425bSmrg 605fb5e8d76Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 6069ef0b394Smrg# 6079ef0b394Smrg# This file is free software; the Free Software Foundation 6089ef0b394Smrg# gives unlimited permission to copy and/or distribute it, 6099ef0b394Smrg# with or without modifications, as long as this notice is preserved. 610698f425bSmrg 6119ef0b394Smrg# AM_PROG_INSTALL_SH 6129ef0b394Smrg# ------------------ 6139ef0b394Smrg# Define $install_sh. 6149ef0b394SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 6159ef0b394Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 6169ef0b394Smrgif test x"${install_sh}" != xset; then 6179ef0b394Smrg case $am_aux_dir in 6189ef0b394Smrg *\ * | *\ *) 6199ef0b394Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 6209ef0b394Smrg *) 6219ef0b394Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 6229ef0b394Smrg esac 6239ef0b394Smrgfi 624fb5e8d76SmrgAC_SUBST([install_sh])]) 625698f425bSmrg 626fb5e8d76Smrg# Copyright (C) 2003-2013 Free Software Foundation, Inc. 6279ef0b394Smrg# 6289ef0b394Smrg# This file is free software; the Free Software Foundation 6299ef0b394Smrg# gives unlimited permission to copy and/or distribute it, 6309ef0b394Smrg# with or without modifications, as long as this notice is preserved. 631698f425bSmrg 6329ef0b394Smrg# Check whether the underlying file-system supports filenames 6339ef0b394Smrg# with a leading dot. For instance MS-DOS doesn't. 6349ef0b394SmrgAC_DEFUN([AM_SET_LEADING_DOT], 6359ef0b394Smrg[rm -rf .tst 2>/dev/null 6369ef0b394Smrgmkdir .tst 2>/dev/null 6379ef0b394Smrgif test -d .tst; then 6389ef0b394Smrg am__leading_dot=. 6399ef0b394Smrgelse 6409ef0b394Smrg am__leading_dot=_ 6419ef0b394Smrgfi 6429ef0b394Smrgrmdir .tst 2>/dev/null 6439ef0b394SmrgAC_SUBST([am__leading_dot])]) 644698f425bSmrg 6459ef0b394Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 6469ef0b394Smrg 647fb5e8d76Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 648698f425bSmrg# 6499ef0b394Smrg# This file is free software; the Free Software Foundation 6509ef0b394Smrg# gives unlimited permission to copy and/or distribute it, 6519ef0b394Smrg# with or without modifications, as long as this notice is preserved. 652698f425bSmrg 6539ef0b394Smrg# AM_MAKE_INCLUDE() 6549ef0b394Smrg# ----------------- 6559ef0b394Smrg# Check to see how make treats includes. 6569ef0b394SmrgAC_DEFUN([AM_MAKE_INCLUDE], 6579ef0b394Smrg[am_make=${MAKE-make} 6589ef0b394Smrgcat > confinc << 'END' 6599ef0b394Smrgam__doit: 6609ef0b394Smrg @echo this is the am__doit target 6619ef0b394Smrg.PHONY: am__doit 6629ef0b394SmrgEND 6639ef0b394Smrg# If we don't find an include directive, just comment out the code. 6649ef0b394SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 6659ef0b394Smrgam__include="#" 6669ef0b394Smrgam__quote= 6679ef0b394Smrg_am_result=none 6689ef0b394Smrg# First try GNU make style include. 6699ef0b394Smrgecho "include confinc" > confmf 670fb5e8d76Smrg# Ignore all kinds of additional output from 'make'. 6719ef0b394Smrgcase `$am_make -s -f confmf 2> /dev/null` in #( 6729ef0b394Smrg*the\ am__doit\ target*) 6739ef0b394Smrg am__include=include 6749ef0b394Smrg am__quote= 6759ef0b394Smrg _am_result=GNU 6769ef0b394Smrg ;; 6779ef0b394Smrgesac 6789ef0b394Smrg# Now try BSD make style include. 6799ef0b394Smrgif test "$am__include" = "#"; then 6809ef0b394Smrg echo '.include "confinc"' > confmf 6819ef0b394Smrg case `$am_make -s -f confmf 2> /dev/null` in #( 6829ef0b394Smrg *the\ am__doit\ target*) 6839ef0b394Smrg am__include=.include 6849ef0b394Smrg am__quote="\"" 6859ef0b394Smrg _am_result=BSD 6869ef0b394Smrg ;; 6879ef0b394Smrg esac 6889ef0b394Smrgfi 6899ef0b394SmrgAC_SUBST([am__include]) 6909ef0b394SmrgAC_SUBST([am__quote]) 6919ef0b394SmrgAC_MSG_RESULT([$_am_result]) 6929ef0b394Smrgrm -f confinc confmf 6939ef0b394Smrg]) 694698f425bSmrg 6959ef0b394Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 696698f425bSmrg 697fb5e8d76Smrg# Copyright (C) 1997-2013 Free Software Foundation, Inc. 6989ef0b394Smrg# 6999ef0b394Smrg# This file is free software; the Free Software Foundation 7009ef0b394Smrg# gives unlimited permission to copy and/or distribute it, 7019ef0b394Smrg# with or without modifications, as long as this notice is preserved. 702698f425bSmrg 7039ef0b394Smrg# AM_MISSING_PROG(NAME, PROGRAM) 704698f425bSmrg# ------------------------------ 7059ef0b394SmrgAC_DEFUN([AM_MISSING_PROG], 7069ef0b394Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 7079ef0b394Smrg$1=${$1-"${am_missing_run}$2"} 7089ef0b394SmrgAC_SUBST($1)]) 709698f425bSmrg 7109ef0b394Smrg# AM_MISSING_HAS_RUN 7119ef0b394Smrg# ------------------ 712fb5e8d76Smrg# Define MISSING if not defined so far and test if it is modern enough. 713fb5e8d76Smrg# If it is, set am_missing_run to use it, otherwise, to nothing. 7149ef0b394SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 7159ef0b394Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 7169ef0b394SmrgAC_REQUIRE_AUX_FILE([missing])dnl 7179ef0b394Smrgif test x"${MISSING+set}" != xset; then 7189ef0b394Smrg case $am_aux_dir in 7199ef0b394Smrg *\ * | *\ *) 7209ef0b394Smrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 7219ef0b394Smrg *) 7229ef0b394Smrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 7239ef0b394Smrg esac 7249ef0b394Smrgfi 7259ef0b394Smrg# Use eval to expand $SHELL 726fb5e8d76Smrgif eval "$MISSING --is-lightweight"; then 727fb5e8d76Smrg am_missing_run="$MISSING " 7289ef0b394Smrgelse 7299ef0b394Smrg am_missing_run= 730fb5e8d76Smrg AC_MSG_WARN(['missing' script is too old or missing]) 7319ef0b394Smrgfi 7329ef0b394Smrg]) 733698f425bSmrg 7349ef0b394Smrg# Helper functions for option handling. -*- Autoconf -*- 735698f425bSmrg 736fb5e8d76Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 7379ef0b394Smrg# 7389ef0b394Smrg# This file is free software; the Free Software Foundation 7399ef0b394Smrg# gives unlimited permission to copy and/or distribute it, 7409ef0b394Smrg# with or without modifications, as long as this notice is preserved. 741698f425bSmrg 7429ef0b394Smrg# _AM_MANGLE_OPTION(NAME) 7439ef0b394Smrg# ----------------------- 7449ef0b394SmrgAC_DEFUN([_AM_MANGLE_OPTION], 7459ef0b394Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 746698f425bSmrg 7479ef0b394Smrg# _AM_SET_OPTION(NAME) 748fb5e8d76Smrg# -------------------- 7499ef0b394Smrg# Set option NAME. Presently that only means defining a flag for this option. 7509ef0b394SmrgAC_DEFUN([_AM_SET_OPTION], 751fb5e8d76Smrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 752698f425bSmrg 7539ef0b394Smrg# _AM_SET_OPTIONS(OPTIONS) 754fb5e8d76Smrg# ------------------------ 7559ef0b394Smrg# OPTIONS is a space-separated list of Automake options. 7569ef0b394SmrgAC_DEFUN([_AM_SET_OPTIONS], 7579ef0b394Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 758698f425bSmrg 7599ef0b394Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 7609ef0b394Smrg# ------------------------------------------- 7619ef0b394Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 7629ef0b394SmrgAC_DEFUN([_AM_IF_OPTION], 7639ef0b394Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 764698f425bSmrg 765fb5e8d76Smrg# Copyright (C) 1999-2013 Free Software Foundation, Inc. 766fb5e8d76Smrg# 767fb5e8d76Smrg# This file is free software; the Free Software Foundation 768fb5e8d76Smrg# gives unlimited permission to copy and/or distribute it, 769fb5e8d76Smrg# with or without modifications, as long as this notice is preserved. 770fb5e8d76Smrg 771fb5e8d76Smrg# _AM_PROG_CC_C_O 772fb5e8d76Smrg# --------------- 773fb5e8d76Smrg# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 774fb5e8d76Smrg# to automatically call this. 775fb5e8d76SmrgAC_DEFUN([_AM_PROG_CC_C_O], 776fb5e8d76Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 777fb5e8d76SmrgAC_REQUIRE_AUX_FILE([compile])dnl 778fb5e8d76SmrgAC_LANG_PUSH([C])dnl 779fb5e8d76SmrgAC_CACHE_CHECK( 780fb5e8d76Smrg [whether $CC understands -c and -o together], 781fb5e8d76Smrg [am_cv_prog_cc_c_o], 782fb5e8d76Smrg [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 783fb5e8d76Smrg # Make sure it works both with $CC and with simple cc. 784fb5e8d76Smrg # Following AC_PROG_CC_C_O, we do the test twice because some 785fb5e8d76Smrg # compilers refuse to overwrite an existing .o file with -o, 786fb5e8d76Smrg # though they will create one. 787fb5e8d76Smrg am_cv_prog_cc_c_o=yes 788fb5e8d76Smrg for am_i in 1 2; do 789fb5e8d76Smrg if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 790fb5e8d76Smrg && test -f conftest2.$ac_objext; then 791fb5e8d76Smrg : OK 792fb5e8d76Smrg else 793fb5e8d76Smrg am_cv_prog_cc_c_o=no 794fb5e8d76Smrg break 795fb5e8d76Smrg fi 796fb5e8d76Smrg done 797fb5e8d76Smrg rm -f core conftest* 798fb5e8d76Smrg unset am_i]) 799fb5e8d76Smrgif test "$am_cv_prog_cc_c_o" != yes; then 800fb5e8d76Smrg # Losing compiler, so override with the script. 801fb5e8d76Smrg # FIXME: It is wrong to rewrite CC. 802fb5e8d76Smrg # But if we don't then we get into trouble of one sort or another. 803fb5e8d76Smrg # A longer-term fix would be to have automake use am__CC in this case, 804fb5e8d76Smrg # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 805fb5e8d76Smrg CC="$am_aux_dir/compile $CC" 806fb5e8d76Smrgfi 807fb5e8d76SmrgAC_LANG_POP([C])]) 808fb5e8d76Smrg 809fb5e8d76Smrg# For backward compatibility. 810fb5e8d76SmrgAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 811698f425bSmrg 812fb5e8d76Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 8139ef0b394Smrg# 8149ef0b394Smrg# This file is free software; the Free Software Foundation 8159ef0b394Smrg# gives unlimited permission to copy and/or distribute it, 8169ef0b394Smrg# with or without modifications, as long as this notice is preserved. 817698f425bSmrg 818fb5e8d76Smrg# AM_RUN_LOG(COMMAND) 819fb5e8d76Smrg# ------------------- 820fb5e8d76Smrg# Run COMMAND, save the exit status in ac_status, and log it. 821fb5e8d76Smrg# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 822fb5e8d76SmrgAC_DEFUN([AM_RUN_LOG], 823fb5e8d76Smrg[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 824fb5e8d76Smrg ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 825fb5e8d76Smrg ac_status=$? 826fb5e8d76Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 827fb5e8d76Smrg (exit $ac_status); }]) 828fb5e8d76Smrg 829fb5e8d76Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 830fb5e8d76Smrg 831fb5e8d76Smrg# Copyright (C) 1996-2013 Free Software Foundation, Inc. 832fb5e8d76Smrg# 833fb5e8d76Smrg# This file is free software; the Free Software Foundation 834fb5e8d76Smrg# gives unlimited permission to copy and/or distribute it, 835fb5e8d76Smrg# with or without modifications, as long as this notice is preserved. 836698f425bSmrg 8379ef0b394Smrg# AM_SANITY_CHECK 8389ef0b394Smrg# --------------- 8399ef0b394SmrgAC_DEFUN([AM_SANITY_CHECK], 8409ef0b394Smrg[AC_MSG_CHECKING([whether build environment is sane]) 8419ef0b394Smrg# Reject unsafe characters in $srcdir or the absolute working directory 8429ef0b394Smrg# name. Accept space and tab only in the latter. 8439ef0b394Smrgam_lf=' 8449ef0b394Smrg' 8459ef0b394Smrgcase `pwd` in 8469ef0b394Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 8479ef0b394Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 8489ef0b394Smrgesac 8499ef0b394Smrgcase $srcdir in 8509ef0b394Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 851fb5e8d76Smrg AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 8529ef0b394Smrgesac 853698f425bSmrg 854fb5e8d76Smrg# Do 'set' in a subshell so we don't clobber the current shell's 8559ef0b394Smrg# arguments. Must try -L first in case configure is actually a 8569ef0b394Smrg# symlink; some systems play weird games with the mod time of symlinks 8579ef0b394Smrg# (eg FreeBSD returns the mod time of the symlink's containing 8589ef0b394Smrg# directory). 8599ef0b394Smrgif ( 860fb5e8d76Smrg am_has_slept=no 861fb5e8d76Smrg for am_try in 1 2; do 862fb5e8d76Smrg echo "timestamp, slept: $am_has_slept" > conftest.file 863fb5e8d76Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 864fb5e8d76Smrg if test "$[*]" = "X"; then 865fb5e8d76Smrg # -L didn't work. 866fb5e8d76Smrg set X `ls -t "$srcdir/configure" conftest.file` 867fb5e8d76Smrg fi 868fb5e8d76Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 869fb5e8d76Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 870fb5e8d76Smrg 871fb5e8d76Smrg # If neither matched, then we have a broken ls. This can happen 872fb5e8d76Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 873fb5e8d76Smrg # broken ls alias from the environment. This has actually 874fb5e8d76Smrg # happened. Such a system could not be considered "sane". 875fb5e8d76Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 876fb5e8d76Smrg alias in your environment]) 877fb5e8d76Smrg fi 878fb5e8d76Smrg if test "$[2]" = conftest.file || test $am_try -eq 2; then 879fb5e8d76Smrg break 880fb5e8d76Smrg fi 881fb5e8d76Smrg # Just in case. 882fb5e8d76Smrg sleep 1 883fb5e8d76Smrg am_has_slept=yes 884fb5e8d76Smrg done 8859ef0b394Smrg test "$[2]" = conftest.file 8869ef0b394Smrg ) 8879ef0b394Smrgthen 8889ef0b394Smrg # Ok. 8899ef0b394Smrg : 8909ef0b394Smrgelse 8919ef0b394Smrg AC_MSG_ERROR([newly created file is older than distributed files! 8929ef0b394SmrgCheck your system clock]) 893698f425bSmrgfi 894fb5e8d76SmrgAC_MSG_RESULT([yes]) 895fb5e8d76Smrg# If we didn't sleep, we still need to ensure time stamps of config.status and 896fb5e8d76Smrg# generated files are strictly newer. 897fb5e8d76Smrgam_sleep_pid= 898fb5e8d76Smrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then 899fb5e8d76Smrg ( sleep 1 ) & 900fb5e8d76Smrg am_sleep_pid=$! 901fb5e8d76Smrgfi 902fb5e8d76SmrgAC_CONFIG_COMMANDS_PRE( 903fb5e8d76Smrg [AC_MSG_CHECKING([that generated files are newer than configure]) 904fb5e8d76Smrg if test -n "$am_sleep_pid"; then 905fb5e8d76Smrg # Hide warnings about reused PIDs. 906fb5e8d76Smrg wait $am_sleep_pid 2>/dev/null 907fb5e8d76Smrg fi 908fb5e8d76Smrg AC_MSG_RESULT([done])]) 909fb5e8d76Smrgrm -f conftest.file 910fb5e8d76Smrg]) 911698f425bSmrg 912fb5e8d76Smrg# Copyright (C) 2009-2013 Free Software Foundation, Inc. 9139ef0b394Smrg# 9149ef0b394Smrg# This file is free software; the Free Software Foundation 9159ef0b394Smrg# gives unlimited permission to copy and/or distribute it, 9169ef0b394Smrg# with or without modifications, as long as this notice is preserved. 917698f425bSmrg 9189ef0b394Smrg# AM_SILENT_RULES([DEFAULT]) 9199ef0b394Smrg# -------------------------- 9209ef0b394Smrg# Enable less verbose build rules; with the default set to DEFAULT 921fb5e8d76Smrg# ("yes" being less verbose, "no" or empty being verbose). 9229ef0b394SmrgAC_DEFUN([AM_SILENT_RULES], 923fb5e8d76Smrg[AC_ARG_ENABLE([silent-rules], [dnl 924fb5e8d76SmrgAS_HELP_STRING( 925fb5e8d76Smrg [--enable-silent-rules], 926fb5e8d76Smrg [less verbose build output (undo: "make V=1")]) 927fb5e8d76SmrgAS_HELP_STRING( 928fb5e8d76Smrg [--disable-silent-rules], 929fb5e8d76Smrg [verbose build output (undo: "make V=0")])dnl 930fb5e8d76Smrg]) 931fb5e8d76Smrgcase $enable_silent_rules in @%:@ ((( 932fb5e8d76Smrg yes) AM_DEFAULT_VERBOSITY=0;; 933fb5e8d76Smrg no) AM_DEFAULT_VERBOSITY=1;; 934fb5e8d76Smrg *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 9359ef0b394Smrgesac 936fb5e8d76Smrgdnl 937fb5e8d76Smrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 938fb5e8d76Smrgdnl do not support nested variable expansions. 939fb5e8d76Smrgdnl See automake bug#9928 and bug#10237. 940fb5e8d76Smrgam_make=${MAKE-make} 941fb5e8d76SmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 942fb5e8d76Smrg [am_cv_make_support_nested_variables], 943fb5e8d76Smrg [if AS_ECHO([['TRUE=$(BAR$(V)) 944fb5e8d76SmrgBAR0=false 945fb5e8d76SmrgBAR1=true 946fb5e8d76SmrgV=1 947fb5e8d76Smrgam__doit: 948fb5e8d76Smrg @$(TRUE) 949fb5e8d76Smrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 950fb5e8d76Smrg am_cv_make_support_nested_variables=yes 951fb5e8d76Smrgelse 952fb5e8d76Smrg am_cv_make_support_nested_variables=no 953fb5e8d76Smrgfi]) 954fb5e8d76Smrgif test $am_cv_make_support_nested_variables = yes; then 955fb5e8d76Smrg dnl Using '$V' instead of '$(V)' breaks IRIX make. 956fb5e8d76Smrg AM_V='$(V)' 957fb5e8d76Smrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 958fb5e8d76Smrgelse 959fb5e8d76Smrg AM_V=$AM_DEFAULT_VERBOSITY 960fb5e8d76Smrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 961fb5e8d76Smrgfi 962fb5e8d76SmrgAC_SUBST([AM_V])dnl 963fb5e8d76SmrgAM_SUBST_NOTMAKE([AM_V])dnl 964fb5e8d76SmrgAC_SUBST([AM_DEFAULT_V])dnl 965fb5e8d76SmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 9669ef0b394SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 9679ef0b394SmrgAM_BACKSLASH='\' 9689ef0b394SmrgAC_SUBST([AM_BACKSLASH])dnl 9699ef0b394Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 9709ef0b394Smrg]) 971698f425bSmrg 972fb5e8d76Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 973698f425bSmrg# 9749ef0b394Smrg# This file is free software; the Free Software Foundation 9759ef0b394Smrg# gives unlimited permission to copy and/or distribute it, 9769ef0b394Smrg# with or without modifications, as long as this notice is preserved. 977698f425bSmrg 9789ef0b394Smrg# AM_PROG_INSTALL_STRIP 9799ef0b394Smrg# --------------------- 980fb5e8d76Smrg# One issue with vendor 'install' (even GNU) is that you can't 9819ef0b394Smrg# specify the program used to strip binaries. This is especially 9829ef0b394Smrg# annoying in cross-compiling environments, where the build's strip 9839ef0b394Smrg# is unlikely to handle the host's binaries. 9849ef0b394Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 985fb5e8d76Smrg# always use install-sh in "make install-strip", and initialize 9869ef0b394Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 9879ef0b394SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 9889ef0b394Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 989fb5e8d76Smrg# Installed binaries are usually stripped using 'strip' when the user 990fb5e8d76Smrg# run "make install-strip". However 'strip' might not be the right 9919ef0b394Smrg# tool to use in cross-compilation environments, therefore Automake 992fb5e8d76Smrg# will honor the 'STRIP' environment variable to overrule this program. 993fb5e8d76Smrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 9949ef0b394Smrgif test "$cross_compiling" != no; then 9959ef0b394Smrg AC_CHECK_TOOL([STRIP], [strip], :) 996698f425bSmrgfi 9979ef0b394SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 9989ef0b394SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 999698f425bSmrg 1000fb5e8d76Smrg# Copyright (C) 2006-2013 Free Software Foundation, Inc. 10019ef0b394Smrg# 10029ef0b394Smrg# This file is free software; the Free Software Foundation 10039ef0b394Smrg# gives unlimited permission to copy and/or distribute it, 10049ef0b394Smrg# with or without modifications, as long as this notice is preserved. 1005698f425bSmrg 10069ef0b394Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 10079ef0b394Smrg# --------------------------- 10089ef0b394Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 10099ef0b394Smrg# This macro is traced by Automake. 10109ef0b394SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 1011698f425bSmrg 10129ef0b394Smrg# AM_SUBST_NOTMAKE(VARIABLE) 1013fb5e8d76Smrg# -------------------------- 10149ef0b394Smrg# Public sister of _AM_SUBST_NOTMAKE. 10159ef0b394SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 1016698f425bSmrg 10179ef0b394Smrg# Check how to create a tarball. -*- Autoconf -*- 1018698f425bSmrg 1019fb5e8d76Smrg# Copyright (C) 2004-2013 Free Software Foundation, Inc. 10209ef0b394Smrg# 10219ef0b394Smrg# This file is free software; the Free Software Foundation 10229ef0b394Smrg# gives unlimited permission to copy and/or distribute it, 10239ef0b394Smrg# with or without modifications, as long as this notice is preserved. 1024698f425bSmrg 10259ef0b394Smrg# _AM_PROG_TAR(FORMAT) 10269ef0b394Smrg# -------------------- 10279ef0b394Smrg# Check how to create a tarball in format FORMAT. 1028fb5e8d76Smrg# FORMAT should be one of 'v7', 'ustar', or 'pax'. 10299ef0b394Smrg# 10309ef0b394Smrg# Substitute a variable $(am__tar) that is a command 10319ef0b394Smrg# writing to stdout a FORMAT-tarball containing the directory 10329ef0b394Smrg# $tardir. 10339ef0b394Smrg# tardir=directory && $(am__tar) > result.tar 10349ef0b394Smrg# 10359ef0b394Smrg# Substitute a variable $(am__untar) that extract such 10369ef0b394Smrg# a tarball read from stdin. 10379ef0b394Smrg# $(am__untar) < result.tar 10389ef0b394Smrg# 1039fb5e8d76SmrgAC_DEFUN([_AM_PROG_TAR], 1040fb5e8d76Smrg[# Always define AMTAR for backward compatibility. Yes, it's still used 1041fb5e8d76Smrg# in the wild :-( We should find a proper way to deprecate it ... 1042fb5e8d76SmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 1043698f425bSmrg 1044fb5e8d76Smrg# We'll loop over all known methods to create a tar archive until one works. 1045fb5e8d76Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 1046698f425bSmrg 1047fb5e8d76Smrgm4_if([$1], [v7], 1048fb5e8d76Smrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 1049fb5e8d76Smrg 1050fb5e8d76Smrg [m4_case([$1], 1051fb5e8d76Smrg [ustar], 1052fb5e8d76Smrg [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 1053fb5e8d76Smrg # There is notably a 21 bits limit for the UID and the GID. In fact, 1054fb5e8d76Smrg # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 1055fb5e8d76Smrg # and bug#13588). 1056fb5e8d76Smrg am_max_uid=2097151 # 2^21 - 1 1057fb5e8d76Smrg am_max_gid=$am_max_uid 1058fb5e8d76Smrg # The $UID and $GID variables are not portable, so we need to resort 1059fb5e8d76Smrg # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 1060fb5e8d76Smrg # below are definitely unexpected, so allow the users to see them 1061fb5e8d76Smrg # (that is, avoid stderr redirection). 1062fb5e8d76Smrg am_uid=`id -u || echo unknown` 1063fb5e8d76Smrg am_gid=`id -g || echo unknown` 1064fb5e8d76Smrg AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 1065fb5e8d76Smrg if test $am_uid -le $am_max_uid; then 1066fb5e8d76Smrg AC_MSG_RESULT([yes]) 1067fb5e8d76Smrg else 1068fb5e8d76Smrg AC_MSG_RESULT([no]) 1069fb5e8d76Smrg _am_tools=none 1070fb5e8d76Smrg fi 1071fb5e8d76Smrg AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 1072fb5e8d76Smrg if test $am_gid -le $am_max_gid; then 1073fb5e8d76Smrg AC_MSG_RESULT([yes]) 1074fb5e8d76Smrg else 1075fb5e8d76Smrg AC_MSG_RESULT([no]) 1076fb5e8d76Smrg _am_tools=none 1077fb5e8d76Smrg fi], 1078266e564dSmrg 1079fb5e8d76Smrg [pax], 1080fb5e8d76Smrg [], 1081698f425bSmrg 1082fb5e8d76Smrg [m4_fatal([Unknown tar format])]) 1083266e564dSmrg 1084fb5e8d76Smrg AC_MSG_CHECKING([how to create a $1 tar archive]) 1085266e564dSmrg 1086fb5e8d76Smrg # Go ahead even if we have the value already cached. We do so because we 1087fb5e8d76Smrg # need to set the values for the 'am__tar' and 'am__untar' variables. 1088fb5e8d76Smrg _am_tools=${am_cv_prog_tar_$1-$_am_tools} 1089266e564dSmrg 1090fb5e8d76Smrg for _am_tool in $_am_tools; do 1091fb5e8d76Smrg case $_am_tool in 1092fb5e8d76Smrg gnutar) 1093fb5e8d76Smrg for _am_tar in tar gnutar gtar; do 1094fb5e8d76Smrg AM_RUN_LOG([$_am_tar --version]) && break 1095fb5e8d76Smrg done 1096fb5e8d76Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 1097fb5e8d76Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 1098fb5e8d76Smrg am__untar="$_am_tar -xf -" 1099fb5e8d76Smrg ;; 1100fb5e8d76Smrg plaintar) 1101fb5e8d76Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 1102fb5e8d76Smrg # ustar tarball either. 1103fb5e8d76Smrg (tar --version) >/dev/null 2>&1 && continue 1104fb5e8d76Smrg am__tar='tar chf - "$$tardir"' 1105fb5e8d76Smrg am__tar_='tar chf - "$tardir"' 1106fb5e8d76Smrg am__untar='tar xf -' 1107fb5e8d76Smrg ;; 1108fb5e8d76Smrg pax) 1109fb5e8d76Smrg am__tar='pax -L -x $1 -w "$$tardir"' 1110fb5e8d76Smrg am__tar_='pax -L -x $1 -w "$tardir"' 1111fb5e8d76Smrg am__untar='pax -r' 1112fb5e8d76Smrg ;; 1113fb5e8d76Smrg cpio) 1114fb5e8d76Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 1115fb5e8d76Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 1116fb5e8d76Smrg am__untar='cpio -i -H $1 -d' 1117fb5e8d76Smrg ;; 1118fb5e8d76Smrg none) 1119fb5e8d76Smrg am__tar=false 1120fb5e8d76Smrg am__tar_=false 1121fb5e8d76Smrg am__untar=false 1122fb5e8d76Smrg ;; 1123fb5e8d76Smrg esac 1124266e564dSmrg 1125fb5e8d76Smrg # If the value was cached, stop now. We just wanted to have am__tar 1126fb5e8d76Smrg # and am__untar set. 1127fb5e8d76Smrg test -n "${am_cv_prog_tar_$1}" && break 1128fb5e8d76Smrg 1129fb5e8d76Smrg # tar/untar a dummy directory, and stop if the command works. 1130fb5e8d76Smrg rm -rf conftest.dir 1131fb5e8d76Smrg mkdir conftest.dir 1132fb5e8d76Smrg echo GrepMe > conftest.dir/file 1133fb5e8d76Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 1134fb5e8d76Smrg rm -rf conftest.dir 1135fb5e8d76Smrg if test -s conftest.tar; then 1136fb5e8d76Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 1137fb5e8d76Smrg AM_RUN_LOG([cat conftest.dir/file]) 1138fb5e8d76Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 1139fb5e8d76Smrg fi 1140fb5e8d76Smrg done 1141fb5e8d76Smrg rm -rf conftest.dir 1142266e564dSmrg 1143fb5e8d76Smrg AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 1144fb5e8d76Smrg AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 1145266e564dSmrg 1146fb5e8d76SmrgAC_SUBST([am__tar]) 1147fb5e8d76SmrgAC_SUBST([am__untar]) 1148fb5e8d76Smrg]) # _AM_PROG_TAR 1149266e564dSmrg 11509ef0b394Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 11519ef0b394Smrg# 11529ef0b394Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 1153fb5e8d76Smrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 1154fb5e8d76Smrg# Foundation, Inc. 11559ef0b394Smrg# Written by Gordon Matzigkeit, 1996 11569ef0b394Smrg# 11579ef0b394Smrg# This file is free software; the Free Software Foundation gives 11589ef0b394Smrg# unlimited permission to copy and/or distribute it, with or without 11599ef0b394Smrg# modifications, as long as this notice is preserved. 1160c5629e66Smrg 11619ef0b394Smrgm4_define([_LT_COPYING], [dnl 11629ef0b394Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 1163fb5e8d76Smrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 1164fb5e8d76Smrg# Foundation, Inc. 11659ef0b394Smrg# Written by Gordon Matzigkeit, 1996 11669ef0b394Smrg# 11679ef0b394Smrg# This file is part of GNU Libtool. 11689ef0b394Smrg# 11699ef0b394Smrg# GNU Libtool is free software; you can redistribute it and/or 11709ef0b394Smrg# modify it under the terms of the GNU General Public License as 11719ef0b394Smrg# published by the Free Software Foundation; either version 2 of 11729ef0b394Smrg# the License, or (at your option) any later version. 11739ef0b394Smrg# 11749ef0b394Smrg# As a special exception to the GNU General Public License, 11759ef0b394Smrg# if you distribute this file as part of a program or library that 11769ef0b394Smrg# is built using GNU Libtool, you may include this file under the 11779ef0b394Smrg# same distribution terms that you use for the rest of that program. 11789ef0b394Smrg# 11799ef0b394Smrg# GNU Libtool is distributed in the hope that it will be useful, 11809ef0b394Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 11819ef0b394Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11829ef0b394Smrg# GNU General Public License for more details. 11839ef0b394Smrg# 11849ef0b394Smrg# You should have received a copy of the GNU General Public License 11859ef0b394Smrg# along with GNU Libtool; see the file COPYING. If not, a copy 11869ef0b394Smrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 11879ef0b394Smrg# obtained by writing to the Free Software Foundation, Inc., 11889ef0b394Smrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 1189698f425bSmrg]) 1190698f425bSmrg 11919ef0b394Smrg# serial 57 LT_INIT 1192266e564dSmrg 1193266e564dSmrg 11949ef0b394Smrg# LT_PREREQ(VERSION) 11959ef0b394Smrg# ------------------ 11969ef0b394Smrg# Complain and exit if this libtool version is less that VERSION. 11979ef0b394Smrgm4_defun([LT_PREREQ], 11989ef0b394Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 11999ef0b394Smrg [m4_default([$3], 12009ef0b394Smrg [m4_fatal([Libtool version $1 or higher is required], 12019ef0b394Smrg 63)])], 12029ef0b394Smrg [$2])]) 1203266e564dSmrg 1204266e564dSmrg 12059ef0b394Smrg# _LT_CHECK_BUILDDIR 12069ef0b394Smrg# ------------------ 12079ef0b394Smrg# Complain if the absolute build directory name contains unusual characters 12089ef0b394Smrgm4_defun([_LT_CHECK_BUILDDIR], 12099ef0b394Smrg[case `pwd` in 12109ef0b394Smrg *\ * | *\ *) 12119ef0b394Smrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 1212c5629e66Smrgesac 12139ef0b394Smrg]) 1214c5629e66Smrg 1215266e564dSmrg 12169ef0b394Smrg# LT_INIT([OPTIONS]) 12179ef0b394Smrg# ------------------ 12189ef0b394SmrgAC_DEFUN([LT_INIT], 12199ef0b394Smrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 12209ef0b394SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 12219ef0b394SmrgAC_BEFORE([$0], [LT_LANG])dnl 12229ef0b394SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 12239ef0b394SmrgAC_BEFORE([$0], [LTDL_INIT])dnl 12249ef0b394Smrgm4_require([_LT_CHECK_BUILDDIR])dnl 1225266e564dSmrg 12269ef0b394Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 12279ef0b394Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 12289ef0b394Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 12299ef0b394Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 12309ef0b394Smrgdnl unless we require an AC_DEFUNed macro: 12319ef0b394SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 12329ef0b394SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 12339ef0b394SmrgAC_REQUIRE([LTVERSION_VERSION])dnl 12349ef0b394SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 12359ef0b394Smrgm4_require([_LT_PROG_LTMAIN])dnl 1236266e564dSmrg 12379ef0b394Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 1238266e564dSmrg 12399ef0b394Smrgdnl Parse OPTIONS 12409ef0b394Smrg_LT_SET_OPTIONS([$0], [$1]) 1241266e564dSmrg 12429ef0b394Smrg# This can be used to rebuild libtool when needed 12439ef0b394SmrgLIBTOOL_DEPS="$ltmain" 1244266e564dSmrg 12459ef0b394Smrg# Always use our own libtool. 12469ef0b394SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 12479ef0b394SmrgAC_SUBST(LIBTOOL)dnl 1248266e564dSmrg 12499ef0b394Smrg_LT_SETUP 1250266e564dSmrg 12519ef0b394Smrg# Only expand once: 12529ef0b394Smrgm4_define([LT_INIT]) 12539ef0b394Smrg])# LT_INIT 12549ef0b394Smrg 12559ef0b394Smrg# Old names: 12569ef0b394SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 12579ef0b394SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 12589ef0b394Smrgdnl aclocal-1.4 backwards compatibility: 12599ef0b394Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 12609ef0b394Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 1261266e564dSmrg 1262266e564dSmrg 12639ef0b394Smrg# _LT_CC_BASENAME(CC) 12649ef0b394Smrg# ------------------- 12659ef0b394Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 12669ef0b394Smrgm4_defun([_LT_CC_BASENAME], 12679ef0b394Smrg[for cc_temp in $1""; do 12689ef0b394Smrg case $cc_temp in 12699ef0b394Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 12709ef0b394Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 12719ef0b394Smrg \-*) ;; 12729ef0b394Smrg *) break;; 12739ef0b394Smrg esac 12749ef0b394Smrgdone 12759ef0b394Smrgcc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 1276698f425bSmrg]) 1277266e564dSmrg 1278266e564dSmrg 12799ef0b394Smrg# _LT_FILEUTILS_DEFAULTS 12809ef0b394Smrg# ---------------------- 12819ef0b394Smrg# It is okay to use these file commands and assume they have been set 12829ef0b394Smrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 12839ef0b394Smrgm4_defun([_LT_FILEUTILS_DEFAULTS], 12849ef0b394Smrg[: ${CP="cp -f"} 12859ef0b394Smrg: ${MV="mv -f"} 12869ef0b394Smrg: ${RM="rm -f"} 12879ef0b394Smrg])# _LT_FILEUTILS_DEFAULTS 1288266e564dSmrg 1289266e564dSmrg 12909ef0b394Smrg# _LT_SETUP 12919ef0b394Smrg# --------- 12929ef0b394Smrgm4_defun([_LT_SETUP], 12939ef0b394Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 12949ef0b394SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 12959ef0b394SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 12969ef0b394SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 1297266e564dSmrg 1298fb5e8d76Smrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 1299fb5e8d76Smrgdnl 13009ef0b394Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl 13019ef0b394Smrg_LT_DECL([], [host], [0])dnl 13029ef0b394Smrg_LT_DECL([], [host_os], [0])dnl 13039ef0b394Smrgdnl 13049ef0b394Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl 13059ef0b394Smrg_LT_DECL([], [build], [0])dnl 13069ef0b394Smrg_LT_DECL([], [build_os], [0])dnl 13079ef0b394Smrgdnl 13089ef0b394SmrgAC_REQUIRE([AC_PROG_CC])dnl 13099ef0b394SmrgAC_REQUIRE([LT_PATH_LD])dnl 13109ef0b394SmrgAC_REQUIRE([LT_PATH_NM])dnl 13119ef0b394Smrgdnl 13129ef0b394SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 13139ef0b394Smrgtest -z "$LN_S" && LN_S="ln -s" 13149ef0b394Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 13159ef0b394Smrgdnl 13169ef0b394SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 13179ef0b394Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 13189ef0b394Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 13199ef0b394Smrgdnl 13209ef0b394Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 13219ef0b394Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 13229ef0b394Smrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 13239ef0b394Smrgm4_require([_LT_CMD_RELOAD])dnl 13249ef0b394Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 13259ef0b394Smrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 13269ef0b394Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 13279ef0b394Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 13289ef0b394Smrgm4_require([_LT_WITH_SYSROOT])dnl 13299ef0b394Smrg 13309ef0b394Smrg_LT_CONFIG_LIBTOOL_INIT([ 13319ef0b394Smrg# See if we are running on zsh, and set the options which allow our 13329ef0b394Smrg# commands through without removal of \ escapes INIT. 13339ef0b394Smrgif test -n "\${ZSH_VERSION+set}" ; then 13349ef0b394Smrg setopt NO_GLOB_SUBST 13359ef0b394Smrgfi 13369ef0b394Smrg]) 13379ef0b394Smrgif test -n "${ZSH_VERSION+set}" ; then 13389ef0b394Smrg setopt NO_GLOB_SUBST 13399ef0b394Smrgfi 13409ef0b394Smrg 13419ef0b394Smrg_LT_CHECK_OBJDIR 13429ef0b394Smrg 13439ef0b394Smrgm4_require([_LT_TAG_COMPILER])dnl 13449ef0b394Smrg 13459ef0b394Smrgcase $host_os in 13469ef0b394Smrgaix3*) 13479ef0b394Smrg # AIX sometimes has problems with the GCC collect2 program. For some 13489ef0b394Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 13499ef0b394Smrg # vanish in a puff of smoke. 13509ef0b394Smrg if test "X${COLLECT_NAMES+set}" != Xset; then 13519ef0b394Smrg COLLECT_NAMES= 13529ef0b394Smrg export COLLECT_NAMES 1353c5629e66Smrg fi 1354c5629e66Smrg ;; 13559ef0b394Smrgesac 13569ef0b394Smrg 13579ef0b394Smrg# Global variables: 13589ef0b394Smrgofile=libtool 13599ef0b394Smrgcan_build_shared=yes 13609ef0b394Smrg 13619ef0b394Smrg# All known linkers require a `.a' archive for static linking (except MSVC, 13629ef0b394Smrg# which needs '.lib'). 13639ef0b394Smrglibext=a 13649ef0b394Smrg 13659ef0b394Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 13669ef0b394Smrg 13679ef0b394Smrgold_CC="$CC" 13689ef0b394Smrgold_CFLAGS="$CFLAGS" 13699ef0b394Smrg 13709ef0b394Smrg# Set sane defaults for various variables 13719ef0b394Smrgtest -z "$CC" && CC=cc 13729ef0b394Smrgtest -z "$LTCC" && LTCC=$CC 13739ef0b394Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 13749ef0b394Smrgtest -z "$LD" && LD=ld 13759ef0b394Smrgtest -z "$ac_objext" && ac_objext=o 13769ef0b394Smrg 13779ef0b394Smrg_LT_CC_BASENAME([$compiler]) 13789ef0b394Smrg 13799ef0b394Smrg# Only perform the check for file, if the check method requires it 13809ef0b394Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 13819ef0b394Smrgcase $deplibs_check_method in 13829ef0b394Smrgfile_magic*) 13839ef0b394Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 13849ef0b394Smrg _LT_PATH_MAGIC 1385c5629e66Smrg fi 1386c5629e66Smrg ;; 1387c5629e66Smrgesac 1388266e564dSmrg 13899ef0b394Smrg# Use C for the default configuration in the libtool script 13909ef0b394SmrgLT_SUPPORTED_TAG([CC]) 13919ef0b394Smrg_LT_LANG_C_CONFIG 13929ef0b394Smrg_LT_LANG_DEFAULT_CONFIG 13939ef0b394Smrg_LT_CONFIG_COMMANDS 13949ef0b394Smrg])# _LT_SETUP 1395698f425bSmrg 1396698f425bSmrg 13979ef0b394Smrg# _LT_PREPARE_SED_QUOTE_VARS 13989ef0b394Smrg# -------------------------- 13999ef0b394Smrg# Define a few sed substitution that help us do robust quoting. 14009ef0b394Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 14019ef0b394Smrg[# Backslashify metacharacters that are still active within 14029ef0b394Smrg# double-quoted strings. 14039ef0b394Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 1404698f425bSmrg 14059ef0b394Smrg# Same as above, but do not quote variable references. 14069ef0b394Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 1407698f425bSmrg 14089ef0b394Smrg# Sed substitution to delay expansion of an escaped shell variable in a 14099ef0b394Smrg# double_quote_subst'ed string. 14109ef0b394Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 1411698f425bSmrg 14129ef0b394Smrg# Sed substitution to delay expansion of an escaped single quote. 14139ef0b394Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 1414266e564dSmrg 14159ef0b394Smrg# Sed substitution to avoid accidental globbing in evaled expressions 14169ef0b394Smrgno_glob_subst='s/\*/\\\*/g' 14179ef0b394Smrg]) 1418266e564dSmrg 14199ef0b394Smrg# _LT_PROG_LTMAIN 14209ef0b394Smrg# --------------- 14219ef0b394Smrg# Note that this code is called both from `configure', and `config.status' 14229ef0b394Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 14239ef0b394Smrg# `config.status' has no value for ac_aux_dir unless we are using Automake, 14249ef0b394Smrg# so we pass a copy along to make sure it has a sensible value anyway. 14259ef0b394Smrgm4_defun([_LT_PROG_LTMAIN], 14269ef0b394Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 14279ef0b394Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 14289ef0b394Smrgltmain="$ac_aux_dir/ltmain.sh" 14299ef0b394Smrg])# _LT_PROG_LTMAIN 1430266e564dSmrg 1431266e564dSmrg 1432c5629e66Smrg 14339ef0b394Smrg# So that we can recreate a full libtool script including additional 14349ef0b394Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 14359ef0b394Smrg# in macros and then make a single call at the end using the `libtool' 14369ef0b394Smrg# label. 1437c5629e66Smrg 1438c5629e66Smrg 14399ef0b394Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 14409ef0b394Smrg# ---------------------------------------- 14419ef0b394Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 14429ef0b394Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 14439ef0b394Smrg[m4_ifval([$1], 14449ef0b394Smrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 14459ef0b394Smrg [$1 14469ef0b394Smrg])])]) 1447698f425bSmrg 14489ef0b394Smrg# Initialize. 14499ef0b394Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 1450c5629e66Smrg 1451c5629e66Smrg 14529ef0b394Smrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 14539ef0b394Smrg# ------------------------------ 14549ef0b394Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 14559ef0b394Smrgm4_define([_LT_CONFIG_LIBTOOL], 14569ef0b394Smrg[m4_ifval([$1], 14579ef0b394Smrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 14589ef0b394Smrg [$1 14599ef0b394Smrg])])]) 1460c5629e66Smrg 14619ef0b394Smrg# Initialize. 14629ef0b394Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 1463c5629e66Smrg 1464c5629e66Smrg 14659ef0b394Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 14669ef0b394Smrg# ----------------------------------------------------- 14679ef0b394Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 14689ef0b394Smrg[_LT_CONFIG_LIBTOOL([$1]) 14699ef0b394Smrg_LT_CONFIG_LIBTOOL_INIT([$2]) 14709ef0b394Smrg]) 1471c5629e66Smrg 1472c5629e66Smrg 14739ef0b394Smrg# _LT_FORMAT_COMMENT([COMMENT]) 14749ef0b394Smrg# ----------------------------- 14759ef0b394Smrg# Add leading comment marks to the start of each line, and a trailing 14769ef0b394Smrg# full-stop to the whole comment if one is not present already. 14779ef0b394Smrgm4_define([_LT_FORMAT_COMMENT], 14789ef0b394Smrg[m4_ifval([$1], [ 14799ef0b394Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 14809ef0b394Smrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 14819ef0b394Smrg)]) 1482266e564dSmrg 1483266e564dSmrg 1484698f425bSmrg 1485266e564dSmrg 1486266e564dSmrg 14879ef0b394Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 14889ef0b394Smrg# ------------------------------------------------------------------- 14899ef0b394Smrg# CONFIGNAME is the name given to the value in the libtool script. 14909ef0b394Smrg# VARNAME is the (base) name used in the configure script. 14919ef0b394Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 14929ef0b394Smrg# VARNAME. Any other value will be used directly. 14939ef0b394Smrgm4_define([_LT_DECL], 14949ef0b394Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 14959ef0b394Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 14969ef0b394Smrg [m4_ifval([$1], [$1], [$2])]) 14979ef0b394Smrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 14989ef0b394Smrg m4_ifval([$4], 14999ef0b394Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 15009ef0b394Smrg lt_dict_add_subkey([lt_decl_dict], [$2], 15019ef0b394Smrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 15029ef0b394Smrg]) 1503266e564dSmrg 1504266e564dSmrg 15059ef0b394Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 15069ef0b394Smrg# -------------------------------------------------------- 15079ef0b394Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 1508266e564dSmrg 1509266e564dSmrg 15109ef0b394Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 15119ef0b394Smrg# ------------------------------------------------ 15129ef0b394Smrgm4_define([lt_decl_tag_varnames], 15139ef0b394Smrg[_lt_decl_filter([tagged?], [yes], $@)]) 1514266e564dSmrg 1515266e564dSmrg 15169ef0b394Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 15179ef0b394Smrg# --------------------------------------------------------- 15189ef0b394Smrgm4_define([_lt_decl_filter], 15199ef0b394Smrg[m4_case([$#], 15209ef0b394Smrg [0], [m4_fatal([$0: too few arguments: $#])], 15219ef0b394Smrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 15229ef0b394Smrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 15239ef0b394Smrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 15249ef0b394Smrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 15259ef0b394Smrg]) 1526266e564dSmrg 1527266e564dSmrg 15289ef0b394Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 15299ef0b394Smrg# -------------------------------------------------- 15309ef0b394Smrgm4_define([lt_decl_quote_varnames], 15319ef0b394Smrg[_lt_decl_filter([value], [1], $@)]) 1532266e564dSmrg 1533266e564dSmrg 15349ef0b394Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 15359ef0b394Smrg# --------------------------------------------------- 15369ef0b394Smrgm4_define([lt_decl_dquote_varnames], 15379ef0b394Smrg[_lt_decl_filter([value], [2], $@)]) 1538266e564dSmrg 1539266e564dSmrg 15409ef0b394Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 15419ef0b394Smrg# --------------------------------------------------- 15429ef0b394Smrgm4_define([lt_decl_varnames_tagged], 15439ef0b394Smrg[m4_assert([$# <= 2])dnl 15449ef0b394Smrg_$0(m4_quote(m4_default([$1], [[, ]])), 15459ef0b394Smrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 15469ef0b394Smrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 15479ef0b394Smrgm4_define([_lt_decl_varnames_tagged], 15489ef0b394Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 1549266e564dSmrg 1550266e564dSmrg 15519ef0b394Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 15529ef0b394Smrg# ------------------------------------------------ 15539ef0b394Smrgm4_define([lt_decl_all_varnames], 15549ef0b394Smrg[_$0(m4_quote(m4_default([$1], [[, ]])), 15559ef0b394Smrg m4_if([$2], [], 15569ef0b394Smrg m4_quote(lt_decl_varnames), 15579ef0b394Smrg m4_quote(m4_shift($@))))[]dnl 15589ef0b394Smrg]) 15599ef0b394Smrgm4_define([_lt_decl_all_varnames], 15609ef0b394Smrg[lt_join($@, lt_decl_varnames_tagged([$1], 15619ef0b394Smrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 15629ef0b394Smrg]) 1563266e564dSmrg 1564266e564dSmrg 15659ef0b394Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 15669ef0b394Smrg# ------------------------------------ 15679ef0b394Smrg# Quote a variable value, and forward it to `config.status' so that its 15689ef0b394Smrg# declaration there will have the same value as in `configure'. VARNAME 15699ef0b394Smrg# must have a single quote delimited value for this to work. 15709ef0b394Smrgm4_define([_LT_CONFIG_STATUS_DECLARE], 15719ef0b394Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 1572266e564dSmrg 1573266e564dSmrg 15749ef0b394Smrg# _LT_CONFIG_STATUS_DECLARATIONS 15759ef0b394Smrg# ------------------------------ 15769ef0b394Smrg# We delimit libtool config variables with single quotes, so when 15779ef0b394Smrg# we write them to config.status, we have to be sure to quote all 15789ef0b394Smrg# embedded single quotes properly. In configure, this macro expands 15799ef0b394Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 15809ef0b394Smrg# 15819ef0b394Smrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 15829ef0b394Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 15839ef0b394Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 15849ef0b394Smrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 1585266e564dSmrg 1586266e564dSmrg 15879ef0b394Smrg# _LT_LIBTOOL_TAGS 15889ef0b394Smrg# ---------------- 15899ef0b394Smrg# Output comment and list of tags supported by the script 15909ef0b394Smrgm4_defun([_LT_LIBTOOL_TAGS], 15919ef0b394Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 15929ef0b394Smrgavailable_tags="_LT_TAGS"dnl 15939ef0b394Smrg]) 1594266e564dSmrg 1595266e564dSmrg 15969ef0b394Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 15979ef0b394Smrg# ----------------------------------- 15989ef0b394Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and 15999ef0b394Smrg# expand to a commented shell variable setting: 16009ef0b394Smrg# 16019ef0b394Smrg# # Some comment about what VAR is for. 16029ef0b394Smrg# visible_name=$lt_internal_name 16039ef0b394Smrgm4_define([_LT_LIBTOOL_DECLARE], 16049ef0b394Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 16059ef0b394Smrg [description])))[]dnl 16069ef0b394Smrgm4_pushdef([_libtool_name], 16079ef0b394Smrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 16089ef0b394Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 16099ef0b394Smrg [0], [_libtool_name=[$]$1], 16109ef0b394Smrg [1], [_libtool_name=$lt_[]$1], 16119ef0b394Smrg [2], [_libtool_name=$lt_[]$1], 16129ef0b394Smrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 16139ef0b394Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 16149ef0b394Smrg]) 1615266e564dSmrg 1616266e564dSmrg 16179ef0b394Smrg# _LT_LIBTOOL_CONFIG_VARS 16189ef0b394Smrg# ----------------------- 16199ef0b394Smrg# Produce commented declarations of non-tagged libtool config variables 16209ef0b394Smrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 16219ef0b394Smrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 16229ef0b394Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 16239ef0b394Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 16249ef0b394Smrg[m4_foreach([_lt_var], 16259ef0b394Smrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 16269ef0b394Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 1627698f425bSmrg 1628266e564dSmrg 16299ef0b394Smrg# _LT_LIBTOOL_TAG_VARS(TAG) 16309ef0b394Smrg# ------------------------- 16319ef0b394Smrgm4_define([_LT_LIBTOOL_TAG_VARS], 16329ef0b394Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 16339ef0b394Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 1634266e564dSmrg 1635266e564dSmrg 16369ef0b394Smrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 16379ef0b394Smrg# ------------------------------ 16389ef0b394Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 1639266e564dSmrg 1640266e564dSmrg 16419ef0b394Smrg# _LT_CONFIG_COMMANDS 16429ef0b394Smrg# ------------------- 16439ef0b394Smrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 16449ef0b394Smrg# variables for single and double quote escaping we saved from calls 16459ef0b394Smrg# to _LT_DECL, we can put quote escaped variables declarations 16469ef0b394Smrg# into `config.status', and then the shell code to quote escape them in 16479ef0b394Smrg# for loops in `config.status'. Finally, any additional code accumulated 16489ef0b394Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 16499ef0b394Smrgm4_defun([_LT_CONFIG_COMMANDS], 16509ef0b394Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 16519ef0b394Smrg dnl If the libtool generation code has been placed in $CONFIG_LT, 16529ef0b394Smrg dnl instead of duplicating it all over again into config.status, 16539ef0b394Smrg dnl then we will have config.status run $CONFIG_LT later, so it 16549ef0b394Smrg dnl needs to know what name is stored there: 16559ef0b394Smrg [AC_CONFIG_COMMANDS([libtool], 16569ef0b394Smrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 16579ef0b394Smrg dnl If the libtool generation code is destined for config.status, 16589ef0b394Smrg dnl expand the accumulated commands and init code now: 16599ef0b394Smrg [AC_CONFIG_COMMANDS([libtool], 16609ef0b394Smrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 16619ef0b394Smrg])#_LT_CONFIG_COMMANDS 1662c5629e66Smrg 1663266e564dSmrg 16649ef0b394Smrg# Initialize. 16659ef0b394Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 16669ef0b394Smrg[ 1667266e564dSmrg 16689ef0b394Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 16699ef0b394Smrg# if CDPATH is set. 16709ef0b394Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 1671266e564dSmrg 16729ef0b394Smrgsed_quote_subst='$sed_quote_subst' 16739ef0b394Smrgdouble_quote_subst='$double_quote_subst' 16749ef0b394Smrgdelay_variable_subst='$delay_variable_subst' 16759ef0b394Smrg_LT_CONFIG_STATUS_DECLARATIONS 16769ef0b394SmrgLTCC='$LTCC' 16779ef0b394SmrgLTCFLAGS='$LTCFLAGS' 16789ef0b394Smrgcompiler='$compiler_DEFAULT' 1679266e564dSmrg 16809ef0b394Smrg# A function that is used when there is no print builtin or printf. 16819ef0b394Smrgfunc_fallback_echo () 16829ef0b394Smrg{ 16839ef0b394Smrg eval 'cat <<_LTECHO_EOF 16849ef0b394Smrg\$[]1 16859ef0b394Smrg_LTECHO_EOF' 16869ef0b394Smrg} 1687266e564dSmrg 16889ef0b394Smrg# Quote evaled strings. 16899ef0b394Smrgfor var in lt_decl_all_varnames([[ \ 16909ef0b394Smrg]], lt_decl_quote_varnames); do 16919ef0b394Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 16929ef0b394Smrg *[[\\\\\\\`\\"\\\$]]*) 16939ef0b394Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 16949ef0b394Smrg ;; 16959ef0b394Smrg *) 16969ef0b394Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 16979ef0b394Smrg ;; 16989ef0b394Smrg esac 16999ef0b394Smrgdone 1700266e564dSmrg 17019ef0b394Smrg# Double-quote double-evaled strings. 17029ef0b394Smrgfor var in lt_decl_all_varnames([[ \ 17039ef0b394Smrg]], lt_decl_dquote_varnames); do 17049ef0b394Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 17059ef0b394Smrg *[[\\\\\\\`\\"\\\$]]*) 17069ef0b394Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 17079ef0b394Smrg ;; 17089ef0b394Smrg *) 17099ef0b394Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 17109ef0b394Smrg ;; 17119ef0b394Smrg esac 17129ef0b394Smrgdone 1713266e564dSmrg 17149ef0b394Smrg_LT_OUTPUT_LIBTOOL_INIT 17159ef0b394Smrg]) 1716266e564dSmrg 17179ef0b394Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 17189ef0b394Smrg# ------------------------------------ 17199ef0b394Smrg# Generate a child script FILE with all initialization necessary to 17209ef0b394Smrg# reuse the environment learned by the parent script, and make the 17219ef0b394Smrg# file executable. If COMMENT is supplied, it is inserted after the 17229ef0b394Smrg# `#!' sequence but before initialization text begins. After this 17239ef0b394Smrg# macro, additional text can be appended to FILE to form the body of 17249ef0b394Smrg# the child script. The macro ends with non-zero status if the 17259ef0b394Smrg# file could not be fully written (such as if the disk is full). 17269ef0b394Smrgm4_ifdef([AS_INIT_GENERATED], 17279ef0b394Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 17289ef0b394Smrg[m4_defun([_LT_GENERATED_FILE_INIT], 17299ef0b394Smrg[m4_require([AS_PREPARE])]dnl 17309ef0b394Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 17319ef0b394Smrg[lt_write_fail=0 17329ef0b394Smrgcat >$1 <<_ASEOF || lt_write_fail=1 17339ef0b394Smrg#! $SHELL 17349ef0b394Smrg# Generated by $as_me. 17359ef0b394Smrg$2 17369ef0b394SmrgSHELL=\${CONFIG_SHELL-$SHELL} 17379ef0b394Smrgexport SHELL 17389ef0b394Smrg_ASEOF 17399ef0b394Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1 17409ef0b394SmrgAS_SHELL_SANITIZE 17419ef0b394Smrg_AS_PREPARE 17429ef0b394Smrgexec AS_MESSAGE_FD>&1 17439ef0b394Smrg_ASEOF 17449ef0b394Smrgtest $lt_write_fail = 0 && chmod +x $1[]dnl 17459ef0b394Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 1746266e564dSmrg 17479ef0b394Smrg# LT_OUTPUT 17489ef0b394Smrg# --------- 17499ef0b394Smrg# This macro allows early generation of the libtool script (before 17509ef0b394Smrg# AC_OUTPUT is called), incase it is used in configure for compilation 17519ef0b394Smrg# tests. 17529ef0b394SmrgAC_DEFUN([LT_OUTPUT], 17539ef0b394Smrg[: ${CONFIG_LT=./config.lt} 17549ef0b394SmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 17559ef0b394Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 17569ef0b394Smrg[# Run this file to recreate a libtool stub with the current configuration.]) 1757266e564dSmrg 17589ef0b394Smrgcat >>"$CONFIG_LT" <<\_LTEOF 17599ef0b394Smrglt_cl_silent=false 17609ef0b394Smrgexec AS_MESSAGE_LOG_FD>>config.log 17619ef0b394Smrg{ 17629ef0b394Smrg echo 17639ef0b394Smrg AS_BOX([Running $as_me.]) 17649ef0b394Smrg} >&AS_MESSAGE_LOG_FD 1765266e564dSmrg 17669ef0b394Smrglt_cl_help="\ 17679ef0b394Smrg\`$as_me' creates a local libtool stub from the current configuration, 17689ef0b394Smrgfor use in further configure time tests before the real libtool is 17699ef0b394Smrggenerated. 1770266e564dSmrg 17719ef0b394SmrgUsage: $[0] [[OPTIONS]] 1772266e564dSmrg 17739ef0b394Smrg -h, --help print this help, then exit 17749ef0b394Smrg -V, --version print version number, then exit 17759ef0b394Smrg -q, --quiet do not print progress messages 17769ef0b394Smrg -d, --debug don't remove temporary files 1777266e564dSmrg 17789ef0b394SmrgReport bugs to <bug-libtool@gnu.org>." 1779266e564dSmrg 17809ef0b394Smrglt_cl_version="\ 17819ef0b394Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 17829ef0b394Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 17839ef0b394Smrgconfigured by $[0], generated by m4_PACKAGE_STRING. 1784266e564dSmrg 1785fb5e8d76SmrgCopyright (C) 2011 Free Software Foundation, Inc. 17869ef0b394SmrgThis config.lt script is free software; the Free Software Foundation 17879ef0b394Smrggives unlimited permision to copy, distribute and modify it." 1788266e564dSmrg 17899ef0b394Smrgwhile test $[#] != 0 17909ef0b394Smrgdo 17919ef0b394Smrg case $[1] in 17929ef0b394Smrg --version | --v* | -V ) 17939ef0b394Smrg echo "$lt_cl_version"; exit 0 ;; 17949ef0b394Smrg --help | --h* | -h ) 17959ef0b394Smrg echo "$lt_cl_help"; exit 0 ;; 17969ef0b394Smrg --debug | --d* | -d ) 17979ef0b394Smrg debug=: ;; 17989ef0b394Smrg --quiet | --q* | --silent | --s* | -q ) 17999ef0b394Smrg lt_cl_silent=: ;; 1800266e564dSmrg 18019ef0b394Smrg -*) AC_MSG_ERROR([unrecognized option: $[1] 18029ef0b394SmrgTry \`$[0] --help' for more information.]) ;; 1803266e564dSmrg 18049ef0b394Smrg *) AC_MSG_ERROR([unrecognized argument: $[1] 18059ef0b394SmrgTry \`$[0] --help' for more information.]) ;; 1806c5629e66Smrg esac 18079ef0b394Smrg shift 18089ef0b394Smrgdone 1809266e564dSmrg 18109ef0b394Smrgif $lt_cl_silent; then 18119ef0b394Smrg exec AS_MESSAGE_FD>/dev/null 18129ef0b394Smrgfi 18139ef0b394Smrg_LTEOF 1814266e564dSmrg 18159ef0b394Smrgcat >>"$CONFIG_LT" <<_LTEOF 18169ef0b394Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 18179ef0b394Smrg_LTEOF 1818266e564dSmrg 18199ef0b394Smrgcat >>"$CONFIG_LT" <<\_LTEOF 18209ef0b394SmrgAC_MSG_NOTICE([creating $ofile]) 18219ef0b394Smrg_LT_OUTPUT_LIBTOOL_COMMANDS 18229ef0b394SmrgAS_EXIT(0) 18239ef0b394Smrg_LTEOF 18249ef0b394Smrgchmod +x "$CONFIG_LT" 1825266e564dSmrg 18269ef0b394Smrg# configure is writing to config.log, but config.lt does its own redirection, 18279ef0b394Smrg# appending to config.log, which fails on DOS, as config.log is still kept 18289ef0b394Smrg# open by configure. Here we exec the FD to /dev/null, effectively closing 18299ef0b394Smrg# config.log, so it can be properly (re)opened and appended to by config.lt. 18309ef0b394Smrglt_cl_success=: 18319ef0b394Smrgtest "$silent" = yes && 18329ef0b394Smrg lt_config_lt_args="$lt_config_lt_args --quiet" 18339ef0b394Smrgexec AS_MESSAGE_LOG_FD>/dev/null 18349ef0b394Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 18359ef0b394Smrgexec AS_MESSAGE_LOG_FD>>config.log 18369ef0b394Smrg$lt_cl_success || AS_EXIT(1) 18379ef0b394Smrg])# LT_OUTPUT 1838266e564dSmrg 1839266e564dSmrg 18409ef0b394Smrg# _LT_CONFIG(TAG) 18419ef0b394Smrg# --------------- 18429ef0b394Smrg# If TAG is the built-in tag, create an initial libtool script with a 18439ef0b394Smrg# default configuration from the untagged config vars. Otherwise add code 18449ef0b394Smrg# to config.status for appending the configuration named by TAG from the 18459ef0b394Smrg# matching tagged config vars. 18469ef0b394Smrgm4_defun([_LT_CONFIG], 18479ef0b394Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 18489ef0b394Smrg_LT_CONFIG_SAVE_COMMANDS([ 18499ef0b394Smrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 18509ef0b394Smrg m4_if(_LT_TAG, [C], [ 18519ef0b394Smrg # See if we are running on zsh, and set the options which allow our 18529ef0b394Smrg # commands through without removal of \ escapes. 18539ef0b394Smrg if test -n "${ZSH_VERSION+set}" ; then 18549ef0b394Smrg setopt NO_GLOB_SUBST 1855c5629e66Smrg fi 1856266e564dSmrg 18579ef0b394Smrg cfgfile="${ofile}T" 18589ef0b394Smrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 18599ef0b394Smrg $RM "$cfgfile" 18609ef0b394Smrg 18619ef0b394Smrg cat <<_LT_EOF >> "$cfgfile" 18629ef0b394Smrg#! $SHELL 18639ef0b394Smrg 18649ef0b394Smrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 18659ef0b394Smrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 18669ef0b394Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 18679ef0b394Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 18689ef0b394Smrg# 18699ef0b394Smrg_LT_COPYING 18709ef0b394Smrg_LT_LIBTOOL_TAGS 18719ef0b394Smrg 18729ef0b394Smrg# ### BEGIN LIBTOOL CONFIG 18739ef0b394Smrg_LT_LIBTOOL_CONFIG_VARS 18749ef0b394Smrg_LT_LIBTOOL_TAG_VARS 18759ef0b394Smrg# ### END LIBTOOL CONFIG 18769ef0b394Smrg 18779ef0b394Smrg_LT_EOF 1878266e564dSmrg 1879c5629e66Smrg case $host_os in 18809ef0b394Smrg aix3*) 18819ef0b394Smrg cat <<\_LT_EOF >> "$cfgfile" 18829ef0b394Smrg# AIX sometimes has problems with the GCC collect2 program. For some 18839ef0b394Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 18849ef0b394Smrg# vanish in a puff of smoke. 18859ef0b394Smrgif test "X${COLLECT_NAMES+set}" != Xset; then 18869ef0b394Smrg COLLECT_NAMES= 18879ef0b394Smrg export COLLECT_NAMES 18889ef0b394Smrgfi 18899ef0b394Smrg_LT_EOF 1890c5629e66Smrg ;; 1891c5629e66Smrg esac 1892266e564dSmrg 18939ef0b394Smrg _LT_PROG_LTMAIN 1894266e564dSmrg 18959ef0b394Smrg # We use sed instead of cat because bash on DJGPP gets confused if 18969ef0b394Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 18979ef0b394Smrg # text mode, it properly converts lines to CR/LF. This bash problem 18989ef0b394Smrg # is reportedly fixed, but why not run on old versions too? 18999ef0b394Smrg sed '$q' "$ltmain" >> "$cfgfile" \ 19009ef0b394Smrg || (rm -f "$cfgfile"; exit 1) 1901698f425bSmrg 19029ef0b394Smrg _LT_PROG_REPLACE_SHELLFNS 1903266e564dSmrg 19049ef0b394Smrg mv -f "$cfgfile" "$ofile" || 19059ef0b394Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 19069ef0b394Smrg chmod +x "$ofile" 19079ef0b394Smrg], 19089ef0b394Smrg[cat <<_LT_EOF >> "$ofile" 1909266e564dSmrg 19109ef0b394Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 19119ef0b394Smrgdnl in a comment (ie after a #). 19129ef0b394Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1 19139ef0b394Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 19149ef0b394Smrg# ### END LIBTOOL TAG CONFIG: $1 19159ef0b394Smrg_LT_EOF 19169ef0b394Smrg])dnl /m4_if 19179ef0b394Smrg], 19189ef0b394Smrg[m4_if([$1], [], [ 19199ef0b394Smrg PACKAGE='$PACKAGE' 19209ef0b394Smrg VERSION='$VERSION' 19219ef0b394Smrg TIMESTAMP='$TIMESTAMP' 19229ef0b394Smrg RM='$RM' 19239ef0b394Smrg ofile='$ofile'], []) 19249ef0b394Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS 19259ef0b394Smrg])# _LT_CONFIG 1926266e564dSmrg 1927266e564dSmrg 19289ef0b394Smrg# LT_SUPPORTED_TAG(TAG) 19299ef0b394Smrg# --------------------- 19309ef0b394Smrg# Trace this macro to discover what tags are supported by the libtool 19319ef0b394Smrg# --tag option, using: 19329ef0b394Smrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 19339ef0b394SmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 1934266e564dSmrg 1935266e564dSmrg 19369ef0b394Smrg# C support is built-in for now 19379ef0b394Smrgm4_define([_LT_LANG_C_enabled], []) 19389ef0b394Smrgm4_define([_LT_TAGS], []) 1939266e564dSmrg 1940266e564dSmrg 19419ef0b394Smrg# LT_LANG(LANG) 19429ef0b394Smrg# ------------- 19439ef0b394Smrg# Enable libtool support for the given language if not already enabled. 19449ef0b394SmrgAC_DEFUN([LT_LANG], 19459ef0b394Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 19469ef0b394Smrgm4_case([$1], 19479ef0b394Smrg [C], [_LT_LANG(C)], 19489ef0b394Smrg [C++], [_LT_LANG(CXX)], 1949fb5e8d76Smrg [Go], [_LT_LANG(GO)], 19509ef0b394Smrg [Java], [_LT_LANG(GCJ)], 19519ef0b394Smrg [Fortran 77], [_LT_LANG(F77)], 19529ef0b394Smrg [Fortran], [_LT_LANG(FC)], 19539ef0b394Smrg [Windows Resource], [_LT_LANG(RC)], 19549ef0b394Smrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 19559ef0b394Smrg [_LT_LANG($1)], 19569ef0b394Smrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 19579ef0b394Smrg])# LT_LANG 1958266e564dSmrg 1959266e564dSmrg 19609ef0b394Smrg# _LT_LANG(LANGNAME) 19619ef0b394Smrg# ------------------ 19629ef0b394Smrgm4_defun([_LT_LANG], 19639ef0b394Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 19649ef0b394Smrg [LT_SUPPORTED_TAG([$1])dnl 19659ef0b394Smrg m4_append([_LT_TAGS], [$1 ])dnl 19669ef0b394Smrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 19679ef0b394Smrg _LT_LANG_$1_CONFIG($1)])dnl 19689ef0b394Smrg])# _LT_LANG 1969266e564dSmrg 1970266e564dSmrg 1971fb5e8d76Smrgm4_ifndef([AC_PROG_GO], [ 1972fb5e8d76Smrg# NOTE: This macro has been submitted for inclusion into # 1973fb5e8d76Smrg# GNU Autoconf as AC_PROG_GO. When it is available in # 1974fb5e8d76Smrg# a released version of Autoconf we should remove this # 1975fb5e8d76Smrg# macro and use it instead. # 1976fb5e8d76Smrgm4_defun([AC_PROG_GO], 1977fb5e8d76Smrg[AC_LANG_PUSH(Go)dnl 1978fb5e8d76SmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 1979fb5e8d76SmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 1980fb5e8d76Smrg_AC_ARG_VAR_LDFLAGS()dnl 1981fb5e8d76SmrgAC_CHECK_TOOL(GOC, gccgo) 1982fb5e8d76Smrgif test -z "$GOC"; then 1983fb5e8d76Smrg if test -n "$ac_tool_prefix"; then 1984fb5e8d76Smrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 1985fb5e8d76Smrg fi 1986fb5e8d76Smrgfi 1987fb5e8d76Smrgif test -z "$GOC"; then 1988fb5e8d76Smrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 1989fb5e8d76Smrgfi 1990fb5e8d76Smrg])#m4_defun 1991fb5e8d76Smrg])#m4_ifndef 1992fb5e8d76Smrg 1993fb5e8d76Smrg 19949ef0b394Smrg# _LT_LANG_DEFAULT_CONFIG 19959ef0b394Smrg# ----------------------- 19969ef0b394Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 19979ef0b394Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 19989ef0b394Smrg [LT_LANG(CXX)], 19999ef0b394Smrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 2000266e564dSmrg 20019ef0b394SmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 20029ef0b394Smrg [LT_LANG(F77)], 20039ef0b394Smrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 2004266e564dSmrg 20059ef0b394SmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 20069ef0b394Smrg [LT_LANG(FC)], 20079ef0b394Smrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 2008266e564dSmrg 20099ef0b394Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 20109ef0b394Smrgdnl pulling things in needlessly. 20119ef0b394SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 20129ef0b394Smrg [LT_LANG(GCJ)], 20139ef0b394Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 20149ef0b394Smrg [LT_LANG(GCJ)], 20159ef0b394Smrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 20169ef0b394Smrg [LT_LANG(GCJ)], 20179ef0b394Smrg [m4_ifdef([AC_PROG_GCJ], 20189ef0b394Smrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 20199ef0b394Smrg m4_ifdef([A][M_PROG_GCJ], 20209ef0b394Smrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 20219ef0b394Smrg m4_ifdef([LT_PROG_GCJ], 20229ef0b394Smrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 2023266e564dSmrg 2024fb5e8d76SmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 2025fb5e8d76Smrg [LT_LANG(GO)], 2026fb5e8d76Smrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 2027fb5e8d76Smrg 20289ef0b394SmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 20299ef0b394Smrg [LT_LANG(RC)], 20309ef0b394Smrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 20319ef0b394Smrg])# _LT_LANG_DEFAULT_CONFIG 2032266e564dSmrg 20339ef0b394Smrg# Obsolete macros: 20349ef0b394SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 20359ef0b394SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 20369ef0b394SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 20379ef0b394SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 20389ef0b394SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 20399ef0b394Smrgdnl aclocal-1.4 backwards compatibility: 20409ef0b394Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 20419ef0b394Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 20429ef0b394Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 20439ef0b394Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 20449ef0b394Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 2045266e564dSmrg 2046698f425bSmrg 20479ef0b394Smrg# _LT_TAG_COMPILER 20489ef0b394Smrg# ---------------- 20499ef0b394Smrgm4_defun([_LT_TAG_COMPILER], 20509ef0b394Smrg[AC_REQUIRE([AC_PROG_CC])dnl 2051698f425bSmrg 20529ef0b394Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 20539ef0b394Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 20549ef0b394Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 20559ef0b394Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 2056266e564dSmrg 20579ef0b394Smrg# If no C compiler was specified, use CC. 20589ef0b394SmrgLTCC=${LTCC-"$CC"} 2059266e564dSmrg 20609ef0b394Smrg# If no C compiler flags were specified, use CFLAGS. 20619ef0b394SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 2062266e564dSmrg 20639ef0b394Smrg# Allow CC to be a program name with arguments. 20649ef0b394Smrgcompiler=$CC 20659ef0b394Smrg])# _LT_TAG_COMPILER 2066266e564dSmrg 2067698f425bSmrg 20689ef0b394Smrg# _LT_COMPILER_BOILERPLATE 20699ef0b394Smrg# ------------------------ 20709ef0b394Smrg# Check for compiler boilerplate output or warnings with 20719ef0b394Smrg# the simple compiler test code. 20729ef0b394Smrgm4_defun([_LT_COMPILER_BOILERPLATE], 20739ef0b394Smrg[m4_require([_LT_DECL_SED])dnl 20749ef0b394Smrgac_outfile=conftest.$ac_objext 20759ef0b394Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 20769ef0b394Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 20779ef0b394Smrg_lt_compiler_boilerplate=`cat conftest.err` 20789ef0b394Smrg$RM conftest* 20799ef0b394Smrg])# _LT_COMPILER_BOILERPLATE 2080266e564dSmrg 2081266e564dSmrg 20829ef0b394Smrg# _LT_LINKER_BOILERPLATE 20839ef0b394Smrg# ---------------------- 20849ef0b394Smrg# Check for linker boilerplate output or warnings with 20859ef0b394Smrg# the simple link test code. 20869ef0b394Smrgm4_defun([_LT_LINKER_BOILERPLATE], 20879ef0b394Smrg[m4_require([_LT_DECL_SED])dnl 20889ef0b394Smrgac_outfile=conftest.$ac_objext 20899ef0b394Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 20909ef0b394Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 20919ef0b394Smrg_lt_linker_boilerplate=`cat conftest.err` 20929ef0b394Smrg$RM -r conftest* 20939ef0b394Smrg])# _LT_LINKER_BOILERPLATE 2094698f425bSmrg 20959ef0b394Smrg# _LT_REQUIRED_DARWIN_CHECKS 20969ef0b394Smrg# ------------------------- 20979ef0b394Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 20989ef0b394Smrg case $host_os in 20999ef0b394Smrg rhapsody* | darwin*) 21009ef0b394Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 21019ef0b394Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 21029ef0b394Smrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 21039ef0b394Smrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 21049ef0b394Smrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 21059ef0b394Smrg _LT_DECL([], [DSYMUTIL], [1], 21069ef0b394Smrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 21079ef0b394Smrg _LT_DECL([], [NMEDIT], [1], 21089ef0b394Smrg [Tool to change global to local symbols on Mac OS X]) 21099ef0b394Smrg _LT_DECL([], [LIPO], [1], 21109ef0b394Smrg [Tool to manipulate fat objects and archives on Mac OS X]) 21119ef0b394Smrg _LT_DECL([], [OTOOL], [1], 21129ef0b394Smrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 21139ef0b394Smrg _LT_DECL([], [OTOOL64], [1], 21149ef0b394Smrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 2115698f425bSmrg 21169ef0b394Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 21179ef0b394Smrg [lt_cv_apple_cc_single_mod=no 21189ef0b394Smrg if test -z "${LT_MULTI_MODULE}"; then 21199ef0b394Smrg # By default we will add the -single_module flag. You can override 21209ef0b394Smrg # by either setting the environment variable LT_MULTI_MODULE 21219ef0b394Smrg # non-empty at configure time, or by adding -multi_module to the 21229ef0b394Smrg # link flags. 21239ef0b394Smrg rm -rf libconftest.dylib* 21249ef0b394Smrg echo "int foo(void){return 1;}" > conftest.c 21259ef0b394Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 21269ef0b394Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 21279ef0b394Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 21289ef0b394Smrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 21299ef0b394Smrg _lt_result=$? 2130fb5e8d76Smrg # If there is a non-empty error log, and "single_module" 2131fb5e8d76Smrg # appears in it, assume the flag caused a linker warning 2132fb5e8d76Smrg if test -s conftest.err && $GREP single_module conftest.err; then 2133fb5e8d76Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 2134fb5e8d76Smrg # Otherwise, if the output was created with a 0 exit code from 2135fb5e8d76Smrg # the compiler, it worked. 2136fb5e8d76Smrg elif test -f libconftest.dylib && test $_lt_result -eq 0; then 21379ef0b394Smrg lt_cv_apple_cc_single_mod=yes 21389ef0b394Smrg else 21399ef0b394Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 21409ef0b394Smrg fi 21419ef0b394Smrg rm -rf libconftest.dylib* 21429ef0b394Smrg rm -f conftest.* 21439ef0b394Smrg fi]) 2144fb5e8d76Smrg 21459ef0b394Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 21469ef0b394Smrg [lt_cv_ld_exported_symbols_list], 21479ef0b394Smrg [lt_cv_ld_exported_symbols_list=no 21489ef0b394Smrg save_LDFLAGS=$LDFLAGS 21499ef0b394Smrg echo "_main" > conftest.sym 21509ef0b394Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 21519ef0b394Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 21529ef0b394Smrg [lt_cv_ld_exported_symbols_list=yes], 21539ef0b394Smrg [lt_cv_ld_exported_symbols_list=no]) 21549ef0b394Smrg LDFLAGS="$save_LDFLAGS" 21559ef0b394Smrg ]) 2156fb5e8d76Smrg 21579ef0b394Smrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 21589ef0b394Smrg [lt_cv_ld_force_load=no 21599ef0b394Smrg cat > conftest.c << _LT_EOF 21609ef0b394Smrgint forced_loaded() { return 2;} 21619ef0b394Smrg_LT_EOF 21629ef0b394Smrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 21639ef0b394Smrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 21649ef0b394Smrg echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 21659ef0b394Smrg $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 21669ef0b394Smrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 21679ef0b394Smrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 21689ef0b394Smrg cat > conftest.c << _LT_EOF 21699ef0b394Smrgint main() { return 0;} 21709ef0b394Smrg_LT_EOF 21719ef0b394Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 21729ef0b394Smrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 21739ef0b394Smrg _lt_result=$? 2174fb5e8d76Smrg if test -s conftest.err && $GREP force_load conftest.err; then 2175fb5e8d76Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 2176fb5e8d76Smrg elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then 21779ef0b394Smrg lt_cv_ld_force_load=yes 21789ef0b394Smrg else 21799ef0b394Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 21809ef0b394Smrg fi 21819ef0b394Smrg rm -f conftest.err libconftest.a conftest conftest.c 21829ef0b394Smrg rm -rf conftest.dSYM 21839ef0b394Smrg ]) 21849ef0b394Smrg case $host_os in 21859ef0b394Smrg rhapsody* | darwin1.[[012]]) 21869ef0b394Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 21879ef0b394Smrg darwin1.*) 21889ef0b394Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 21899ef0b394Smrg darwin*) # darwin 5.x on 21909ef0b394Smrg # if running on 10.5 or later, the deployment target defaults 21919ef0b394Smrg # to the OS version, if on x86, and 10.4, the deployment 21929ef0b394Smrg # target defaults to 10.4. Don't you love it? 21939ef0b394Smrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 21949ef0b394Smrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 21959ef0b394Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 21969ef0b394Smrg 10.[[012]]*) 21979ef0b394Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 21989ef0b394Smrg 10.*) 21999ef0b394Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 22009ef0b394Smrg esac 2201266e564dSmrg ;; 22029ef0b394Smrg esac 22039ef0b394Smrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 22049ef0b394Smrg _lt_dar_single_mod='$single_module' 22059ef0b394Smrg fi 22069ef0b394Smrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 22079ef0b394Smrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 22089ef0b394Smrg else 22099ef0b394Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 22109ef0b394Smrg fi 22119ef0b394Smrg if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then 22129ef0b394Smrg _lt_dsymutil='~$DSYMUTIL $lib || :' 22139ef0b394Smrg else 22149ef0b394Smrg _lt_dsymutil= 22159ef0b394Smrg fi 2216266e564dSmrg ;; 2217c5629e66Smrg esac 22189ef0b394Smrg]) 22199ef0b394Smrg 22209ef0b394Smrg 2221fb5e8d76Smrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 2222fb5e8d76Smrg# --------------------------------- 22239ef0b394Smrg# Checks for linker and compiler features on darwin 22249ef0b394Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 22259ef0b394Smrg[ 22269ef0b394Smrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 22279ef0b394Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 22289ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=no 22299ef0b394Smrg _LT_TAGVAR(hardcode_automatic, $1)=yes 22309ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 22319ef0b394Smrg if test "$lt_cv_ld_force_load" = "yes"; then 22329ef0b394Smrg _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\"`' 2233fb5e8d76Smrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 2234fb5e8d76Smrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 22359ef0b394Smrg else 22369ef0b394Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 22379ef0b394Smrg fi 22389ef0b394Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 22399ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 22409ef0b394Smrg case $cc_basename in 22419ef0b394Smrg ifort*) _lt_dar_can_shared=yes ;; 22429ef0b394Smrg *) _lt_dar_can_shared=$GCC ;; 22439ef0b394Smrg esac 22449ef0b394Smrg if test "$_lt_dar_can_shared" = "yes"; then 22459ef0b394Smrg output_verbose_link_cmd=func_echo_all 22469ef0b394Smrg _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}" 22479ef0b394Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 22489ef0b394Smrg _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}" 22499ef0b394Smrg _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}" 22509ef0b394Smrg m4_if([$1], [CXX], 22519ef0b394Smrg[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 22529ef0b394Smrg _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}" 22539ef0b394Smrg _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}" 2254266e564dSmrg fi 22559ef0b394Smrg],[]) 22569ef0b394Smrg else 22579ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 22589ef0b394Smrg fi 22599ef0b394Smrg]) 22609ef0b394Smrg 22619ef0b394Smrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 22629ef0b394Smrg# ---------------------------------- 22639ef0b394Smrg# Links a minimal program and checks the executable 22649ef0b394Smrg# for the system default hardcoded library path. In most cases, 22659ef0b394Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 22669ef0b394Smrg# the location of the communication and MPI libs are included too. 22679ef0b394Smrg# If we don't find anything, use the default library path according 22689ef0b394Smrg# to the aix ld manual. 22699ef0b394Smrg# Store the results from the different compilers for each TAGNAME. 22709ef0b394Smrg# Allow to override them for all tags through lt_cv_aix_libpath. 22719ef0b394Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 22729ef0b394Smrg[m4_require([_LT_DECL_SED])dnl 22739ef0b394Smrgif test "${lt_cv_aix_libpath+set}" = set; then 22749ef0b394Smrg aix_libpath=$lt_cv_aix_libpath 2275c5629e66Smrgelse 22769ef0b394Smrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 22779ef0b394Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 22789ef0b394Smrg lt_aix_libpath_sed='[ 22799ef0b394Smrg /Import File Strings/,/^$/ { 22809ef0b394Smrg /^0/ { 22819ef0b394Smrg s/^0 *\([^ ]*\) *$/\1/ 22829ef0b394Smrg p 22839ef0b394Smrg } 22849ef0b394Smrg }]' 22859ef0b394Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 22869ef0b394Smrg # Check for a 64-bit object if we didn't find anything. 22879ef0b394Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 22889ef0b394Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 22899ef0b394Smrg fi],[]) 22909ef0b394Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 22919ef0b394Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" 22929ef0b394Smrg fi 22939ef0b394Smrg ]) 22949ef0b394Smrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 2295266e564dSmrgfi 22969ef0b394Smrg])# _LT_SYS_MODULE_PATH_AIX 2297266e564dSmrg 2298266e564dSmrg 22999ef0b394Smrg# _LT_SHELL_INIT(ARG) 23009ef0b394Smrg# ------------------- 23019ef0b394Smrgm4_define([_LT_SHELL_INIT], 23029ef0b394Smrg[m4_divert_text([M4SH-INIT], [$1 23039ef0b394Smrg])])# _LT_SHELL_INIT 2304698f425bSmrg 2305698f425bSmrg 2306266e564dSmrg 23079ef0b394Smrg# _LT_PROG_ECHO_BACKSLASH 23089ef0b394Smrg# ----------------------- 23099ef0b394Smrg# Find how we can fake an echo command that does not interpret backslash. 23109ef0b394Smrg# In particular, with Autoconf 2.60 or later we add some code to the start 23119ef0b394Smrg# of the generated configure script which will find a shell with a builtin 23129ef0b394Smrg# printf (which we can use as an echo command). 23139ef0b394Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 23149ef0b394Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 23159ef0b394SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 23169ef0b394SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 23179ef0b394Smrg 23189ef0b394SmrgAC_MSG_CHECKING([how to print strings]) 23199ef0b394Smrg# Test print first, because it will be a builtin if present. 23209ef0b394Smrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 23219ef0b394Smrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 23229ef0b394Smrg ECHO='print -r --' 23239ef0b394Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 23249ef0b394Smrg ECHO='printf %s\n' 23259ef0b394Smrgelse 23269ef0b394Smrg # Use this function as a fallback that always works. 23279ef0b394Smrg func_fallback_echo () 23289ef0b394Smrg { 23299ef0b394Smrg eval 'cat <<_LTECHO_EOF 23309ef0b394Smrg$[]1 23319ef0b394Smrg_LTECHO_EOF' 23329ef0b394Smrg } 23339ef0b394Smrg ECHO='func_fallback_echo' 23349ef0b394Smrgfi 2335266e564dSmrg 23369ef0b394Smrg# func_echo_all arg... 23379ef0b394Smrg# Invoke $ECHO with all args, space-separated. 23389ef0b394Smrgfunc_echo_all () 23399ef0b394Smrg{ 23409ef0b394Smrg $ECHO "$*" 23419ef0b394Smrg} 23429ef0b394Smrg 23439ef0b394Smrgcase "$ECHO" in 23449ef0b394Smrg printf*) AC_MSG_RESULT([printf]) ;; 23459ef0b394Smrg print*) AC_MSG_RESULT([print -r]) ;; 23469ef0b394Smrg *) AC_MSG_RESULT([cat]) ;; 2347c5629e66Smrgesac 2348266e564dSmrg 23499ef0b394Smrgm4_ifdef([_AS_DETECT_SUGGESTED], 23509ef0b394Smrg[_AS_DETECT_SUGGESTED([ 23519ef0b394Smrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 23529ef0b394Smrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 23539ef0b394Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 23549ef0b394Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 23559ef0b394Smrg PATH=/empty FPATH=/empty; export PATH FPATH 23569ef0b394Smrg test "X`printf %s $ECHO`" = "X$ECHO" \ 23579ef0b394Smrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 2358266e564dSmrg 23599ef0b394Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 23609ef0b394Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 23619ef0b394Smrg])# _LT_PROG_ECHO_BACKSLASH 2362266e564dSmrg 2363266e564dSmrg 23649ef0b394Smrg# _LT_WITH_SYSROOT 23659ef0b394Smrg# ---------------- 23669ef0b394SmrgAC_DEFUN([_LT_WITH_SYSROOT], 23679ef0b394Smrg[AC_MSG_CHECKING([for sysroot]) 23689ef0b394SmrgAC_ARG_WITH([sysroot], 23699ef0b394Smrg[ --with-sysroot[=DIR] Search for dependent libraries within DIR 23709ef0b394Smrg (or the compiler's sysroot if not specified).], 23719ef0b394Smrg[], [with_sysroot=no]) 23729ef0b394Smrg 23739ef0b394Smrgdnl lt_sysroot will always be passed unquoted. We quote it here 23749ef0b394Smrgdnl in case the user passed a directory name. 23759ef0b394Smrglt_sysroot= 23769ef0b394Smrgcase ${with_sysroot} in #( 23779ef0b394Smrg yes) 23789ef0b394Smrg if test "$GCC" = yes; then 23799ef0b394Smrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 23809ef0b394Smrg fi 23819ef0b394Smrg ;; #( 23829ef0b394Smrg /*) 23839ef0b394Smrg lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 23849ef0b394Smrg ;; #( 23859ef0b394Smrg no|'') 23869ef0b394Smrg ;; #( 23879ef0b394Smrg *) 23889ef0b394Smrg AC_MSG_RESULT([${with_sysroot}]) 23899ef0b394Smrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 23909ef0b394Smrg ;; 23919ef0b394Smrgesac 2392266e564dSmrg 23939ef0b394Smrg AC_MSG_RESULT([${lt_sysroot:-no}]) 23949ef0b394Smrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 23959ef0b394Smrg[dependent libraries, and in which our libraries should be installed.])]) 2396266e564dSmrg 23979ef0b394Smrg# _LT_ENABLE_LOCK 23989ef0b394Smrg# --------------- 23999ef0b394Smrgm4_defun([_LT_ENABLE_LOCK], 24009ef0b394Smrg[AC_ARG_ENABLE([libtool-lock], 24019ef0b394Smrg [AS_HELP_STRING([--disable-libtool-lock], 24029ef0b394Smrg [avoid locking (might break parallel builds)])]) 24039ef0b394Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 2404266e564dSmrg 24059ef0b394Smrg# Some flags need to be propagated to the compiler or linker for good 24069ef0b394Smrg# libtool support. 24079ef0b394Smrgcase $host in 24089ef0b394Smrgia64-*-hpux*) 24099ef0b394Smrg # Find out which ABI we are using. 24109ef0b394Smrg echo 'int i;' > conftest.$ac_ext 24119ef0b394Smrg if AC_TRY_EVAL(ac_compile); then 24129ef0b394Smrg case `/usr/bin/file conftest.$ac_objext` in 24139ef0b394Smrg *ELF-32*) 24149ef0b394Smrg HPUX_IA64_MODE="32" 24159ef0b394Smrg ;; 24169ef0b394Smrg *ELF-64*) 24179ef0b394Smrg HPUX_IA64_MODE="64" 24189ef0b394Smrg ;; 24199ef0b394Smrg esac 2420c5629e66Smrg fi 24219ef0b394Smrg rm -rf conftest* 2422c5629e66Smrg ;; 24239ef0b394Smrg*-*-irix6*) 24249ef0b394Smrg # Find out which ABI we are using. 24259ef0b394Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 24269ef0b394Smrg if AC_TRY_EVAL(ac_compile); then 24279ef0b394Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 24289ef0b394Smrg case `/usr/bin/file conftest.$ac_objext` in 24299ef0b394Smrg *32-bit*) 24309ef0b394Smrg LD="${LD-ld} -melf32bsmip" 24319ef0b394Smrg ;; 24329ef0b394Smrg *N32*) 24339ef0b394Smrg LD="${LD-ld} -melf32bmipn32" 24349ef0b394Smrg ;; 24359ef0b394Smrg *64-bit*) 24369ef0b394Smrg LD="${LD-ld} -melf64bmip" 24379ef0b394Smrg ;; 24389ef0b394Smrg esac 24399ef0b394Smrg else 24409ef0b394Smrg case `/usr/bin/file conftest.$ac_objext` in 24419ef0b394Smrg *32-bit*) 24429ef0b394Smrg LD="${LD-ld} -32" 24439ef0b394Smrg ;; 24449ef0b394Smrg *N32*) 24459ef0b394Smrg LD="${LD-ld} -n32" 24469ef0b394Smrg ;; 24479ef0b394Smrg *64-bit*) 24489ef0b394Smrg LD="${LD-ld} -64" 24499ef0b394Smrg ;; 24509ef0b394Smrg esac 24519ef0b394Smrg fi 24529ef0b394Smrg fi 24539ef0b394Smrg rm -rf conftest* 2454698f425bSmrg ;; 2455698f425bSmrg 24569ef0b394Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 24579ef0b394Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 24589ef0b394Smrg # Find out which ABI we are using. 24599ef0b394Smrg echo 'int i;' > conftest.$ac_ext 24609ef0b394Smrg if AC_TRY_EVAL(ac_compile); then 24619ef0b394Smrg case `/usr/bin/file conftest.o` in 24629ef0b394Smrg *32-bit*) 24639ef0b394Smrg case $host in 24649ef0b394Smrg x86_64-*kfreebsd*-gnu) 24659ef0b394Smrg LD="${LD-ld} -m elf_i386_fbsd" 24669ef0b394Smrg ;; 24679ef0b394Smrg x86_64-*linux*) 24689ef0b394Smrg LD="${LD-ld} -m elf_i386" 24699ef0b394Smrg ;; 24709ef0b394Smrg ppc64-*linux*|powerpc64-*linux*) 24719ef0b394Smrg LD="${LD-ld} -m elf32ppclinux" 24729ef0b394Smrg ;; 24739ef0b394Smrg s390x-*linux*) 24749ef0b394Smrg LD="${LD-ld} -m elf_s390" 24759ef0b394Smrg ;; 24769ef0b394Smrg sparc64-*linux*) 24779ef0b394Smrg LD="${LD-ld} -m elf32_sparc" 24789ef0b394Smrg ;; 24799ef0b394Smrg esac 24809ef0b394Smrg ;; 24819ef0b394Smrg *64-bit*) 24829ef0b394Smrg case $host in 24839ef0b394Smrg x86_64-*kfreebsd*-gnu) 24849ef0b394Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 24859ef0b394Smrg ;; 24869ef0b394Smrg x86_64-*linux*) 24879ef0b394Smrg LD="${LD-ld} -m elf_x86_64" 24889ef0b394Smrg ;; 24899ef0b394Smrg ppc*-*linux*|powerpc*-*linux*) 24909ef0b394Smrg LD="${LD-ld} -m elf64ppc" 24919ef0b394Smrg ;; 24929ef0b394Smrg s390*-*linux*|s390*-*tpf*) 24939ef0b394Smrg LD="${LD-ld} -m elf64_s390" 24949ef0b394Smrg ;; 24959ef0b394Smrg sparc*-*linux*) 24969ef0b394Smrg LD="${LD-ld} -m elf64_sparc" 24979ef0b394Smrg ;; 24989ef0b394Smrg esac 24999ef0b394Smrg ;; 25009ef0b394Smrg esac 25019ef0b394Smrg fi 25029ef0b394Smrg rm -rf conftest* 2503c5629e66Smrg ;; 2504c5629e66Smrg 25059ef0b394Smrg*-*-sco3.2v5*) 25069ef0b394Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 25079ef0b394Smrg SAVE_CFLAGS="$CFLAGS" 25089ef0b394Smrg CFLAGS="$CFLAGS -belf" 25099ef0b394Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 25109ef0b394Smrg [AC_LANG_PUSH(C) 25119ef0b394Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 25129ef0b394Smrg AC_LANG_POP]) 25139ef0b394Smrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 25149ef0b394Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 25159ef0b394Smrg CFLAGS="$SAVE_CFLAGS" 25169ef0b394Smrg fi 25179ef0b394Smrg ;; 2518fb5e8d76Smrg*-*solaris*) 25199ef0b394Smrg # Find out which ABI we are using. 25209ef0b394Smrg echo 'int i;' > conftest.$ac_ext 25219ef0b394Smrg if AC_TRY_EVAL(ac_compile); then 25229ef0b394Smrg case `/usr/bin/file conftest.o` in 25239ef0b394Smrg *64-bit*) 25249ef0b394Smrg case $lt_cv_prog_gnu_ld in 2525fb5e8d76Smrg yes*) 2526fb5e8d76Smrg case $host in 2527fb5e8d76Smrg i?86-*-solaris*) 2528fb5e8d76Smrg LD="${LD-ld} -m elf_x86_64" 2529fb5e8d76Smrg ;; 2530fb5e8d76Smrg sparc*-*-solaris*) 2531fb5e8d76Smrg LD="${LD-ld} -m elf64_sparc" 2532fb5e8d76Smrg ;; 2533fb5e8d76Smrg esac 2534fb5e8d76Smrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 2535fb5e8d76Smrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 2536fb5e8d76Smrg LD="${LD-ld}_sol2" 2537fb5e8d76Smrg fi 2538fb5e8d76Smrg ;; 25399ef0b394Smrg *) 25409ef0b394Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 25419ef0b394Smrg LD="${LD-ld} -64" 25429ef0b394Smrg fi 25439ef0b394Smrg ;; 25449ef0b394Smrg esac 2545c5629e66Smrg ;; 2546266e564dSmrg esac 2547266e564dSmrg fi 25489ef0b394Smrg rm -rf conftest* 2549c5629e66Smrg ;; 25509ef0b394Smrgesac 2551266e564dSmrg 25529ef0b394Smrgneed_locks="$enable_libtool_lock" 25539ef0b394Smrg])# _LT_ENABLE_LOCK 2554266e564dSmrg 2555c5629e66Smrg 25569ef0b394Smrg# _LT_PROG_AR 25579ef0b394Smrg# ----------- 25589ef0b394Smrgm4_defun([_LT_PROG_AR], 25599ef0b394Smrg[AC_CHECK_TOOLS(AR, [ar], false) 25609ef0b394Smrg: ${AR=ar} 25619ef0b394Smrg: ${AR_FLAGS=cru} 25629ef0b394Smrg_LT_DECL([], [AR], [1], [The archiver]) 25639ef0b394Smrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 25649ef0b394Smrg 25659ef0b394SmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 25669ef0b394Smrg [lt_cv_ar_at_file=no 25679ef0b394Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 25689ef0b394Smrg [echo conftest.$ac_objext > conftest.lst 25699ef0b394Smrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 25709ef0b394Smrg AC_TRY_EVAL([lt_ar_try]) 25719ef0b394Smrg if test "$ac_status" -eq 0; then 25729ef0b394Smrg # Ensure the archiver fails upon bogus file names. 25739ef0b394Smrg rm -f conftest.$ac_objext libconftest.a 25749ef0b394Smrg AC_TRY_EVAL([lt_ar_try]) 25759ef0b394Smrg if test "$ac_status" -ne 0; then 25769ef0b394Smrg lt_cv_ar_at_file=@ 25779ef0b394Smrg fi 25789ef0b394Smrg fi 25799ef0b394Smrg rm -f conftest.* libconftest.a 25809ef0b394Smrg ]) 25819ef0b394Smrg ]) 2582c5629e66Smrg 25839ef0b394Smrgif test "x$lt_cv_ar_at_file" = xno; then 25849ef0b394Smrg archiver_list_spec= 25859ef0b394Smrgelse 25869ef0b394Smrg archiver_list_spec=$lt_cv_ar_at_file 25879ef0b394Smrgfi 25889ef0b394Smrg_LT_DECL([], [archiver_list_spec], [1], 25899ef0b394Smrg [How to feed a file listing to the archiver]) 25909ef0b394Smrg])# _LT_PROG_AR 2591c5629e66Smrg 2592266e564dSmrg 25939ef0b394Smrg# _LT_CMD_OLD_ARCHIVE 25949ef0b394Smrg# ------------------- 25959ef0b394Smrgm4_defun([_LT_CMD_OLD_ARCHIVE], 25969ef0b394Smrg[_LT_PROG_AR 2597266e564dSmrg 25989ef0b394SmrgAC_CHECK_TOOL(STRIP, strip, :) 25999ef0b394Smrgtest -z "$STRIP" && STRIP=: 26009ef0b394Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 2601266e564dSmrg 26029ef0b394SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 26039ef0b394Smrgtest -z "$RANLIB" && RANLIB=: 26049ef0b394Smrg_LT_DECL([], [RANLIB], [1], 26059ef0b394Smrg [Commands used to install an old-style archive]) 2606266e564dSmrg 26079ef0b394Smrg# Determine commands to create old-style static archives. 26089ef0b394Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 26099ef0b394Smrgold_postinstall_cmds='chmod 644 $oldlib' 26109ef0b394Smrgold_postuninstall_cmds= 2611266e564dSmrg 26129ef0b394Smrgif test -n "$RANLIB"; then 26139ef0b394Smrg case $host_os in 26149ef0b394Smrg openbsd*) 2615fb5e8d76Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 26169ef0b394Smrg ;; 26179ef0b394Smrg *) 2618fb5e8d76Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 26199ef0b394Smrg ;; 26209ef0b394Smrg esac 2621fb5e8d76Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 26229ef0b394Smrgfi 2623266e564dSmrg 26249ef0b394Smrgcase $host_os in 26259ef0b394Smrg darwin*) 26269ef0b394Smrg lock_old_archive_extraction=yes ;; 26279ef0b394Smrg *) 26289ef0b394Smrg lock_old_archive_extraction=no ;; 2629c5629e66Smrgesac 26309ef0b394Smrg_LT_DECL([], [old_postinstall_cmds], [2]) 26319ef0b394Smrg_LT_DECL([], [old_postuninstall_cmds], [2]) 26329ef0b394Smrg_LT_TAGDECL([], [old_archive_cmds], [2], 26339ef0b394Smrg [Commands used to build an old-style archive]) 26349ef0b394Smrg_LT_DECL([], [lock_old_archive_extraction], [0], 26359ef0b394Smrg [Whether to use a lock for old archive extraction]) 26369ef0b394Smrg])# _LT_CMD_OLD_ARCHIVE 2637266e564dSmrg 2638266e564dSmrg 26399ef0b394Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 26409ef0b394Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 26419ef0b394Smrg# ---------------------------------------------------------------- 26429ef0b394Smrg# Check whether the given compiler option works 26439ef0b394SmrgAC_DEFUN([_LT_COMPILER_OPTION], 26449ef0b394Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 26459ef0b394Smrgm4_require([_LT_DECL_SED])dnl 26469ef0b394SmrgAC_CACHE_CHECK([$1], [$2], 26479ef0b394Smrg [$2=no 26489ef0b394Smrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 26499ef0b394Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 26509ef0b394Smrg lt_compiler_flag="$3" 26519ef0b394Smrg # Insert the option either (1) after the last *FLAGS variable, or 26529ef0b394Smrg # (2) before a word containing "conftest.", or (3) at the end. 26539ef0b394Smrg # Note that $ac_compile itself does not contain backslashes and begins 26549ef0b394Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 26559ef0b394Smrg # The option is referenced via a variable to avoid confusing sed. 26569ef0b394Smrg lt_compile=`echo "$ac_compile" | $SED \ 26579ef0b394Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 26589ef0b394Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 26599ef0b394Smrg -e 's:$: $lt_compiler_flag:'` 26609ef0b394Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 26619ef0b394Smrg (eval "$lt_compile" 2>conftest.err) 26629ef0b394Smrg ac_status=$? 26639ef0b394Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 26649ef0b394Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 26659ef0b394Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 26669ef0b394Smrg # The compiler can only warn and ignore the option if not recognized 26679ef0b394Smrg # So say no if there are warnings other than the usual output. 26689ef0b394Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 26699ef0b394Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 26709ef0b394Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 26719ef0b394Smrg $2=yes 26729ef0b394Smrg fi 26739ef0b394Smrg fi 26749ef0b394Smrg $RM conftest* 26759ef0b394Smrg]) 2676698f425bSmrg 26779ef0b394Smrgif test x"[$]$2" = xyes; then 26789ef0b394Smrg m4_if([$5], , :, [$5]) 2679698f425bSmrgelse 26809ef0b394Smrg m4_if([$6], , :, [$6]) 2681698f425bSmrgfi 26829ef0b394Smrg])# _LT_COMPILER_OPTION 2683266e564dSmrg 26849ef0b394Smrg# Old name: 26859ef0b394SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 2686698f425bSmrgdnl aclocal-1.4 backwards compatibility: 26879ef0b394Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 2688266e564dSmrg 2689698f425bSmrg 26909ef0b394Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 26919ef0b394Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 26929ef0b394Smrg# ---------------------------------------------------- 26939ef0b394Smrg# Check whether the given linker option works 26949ef0b394SmrgAC_DEFUN([_LT_LINKER_OPTION], 26959ef0b394Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 26969ef0b394Smrgm4_require([_LT_DECL_SED])dnl 26979ef0b394SmrgAC_CACHE_CHECK([$1], [$2], 26989ef0b394Smrg [$2=no 26999ef0b394Smrg save_LDFLAGS="$LDFLAGS" 27009ef0b394Smrg LDFLAGS="$LDFLAGS $3" 27019ef0b394Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 27029ef0b394Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 27039ef0b394Smrg # The linker can only warn and ignore the option if not recognized 27049ef0b394Smrg # So say no if there are warnings 27059ef0b394Smrg if test -s conftest.err; then 27069ef0b394Smrg # Append any errors to the config.log. 27079ef0b394Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 27089ef0b394Smrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 27099ef0b394Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 27109ef0b394Smrg if diff conftest.exp conftest.er2 >/dev/null; then 27119ef0b394Smrg $2=yes 27129ef0b394Smrg fi 27139ef0b394Smrg else 27149ef0b394Smrg $2=yes 27159ef0b394Smrg fi 27169ef0b394Smrg fi 27179ef0b394Smrg $RM -r conftest* 27189ef0b394Smrg LDFLAGS="$save_LDFLAGS" 27199ef0b394Smrg]) 27209ef0b394Smrg 27219ef0b394Smrgif test x"[$]$2" = xyes; then 27229ef0b394Smrg m4_if([$4], , :, [$4]) 27239ef0b394Smrgelse 27249ef0b394Smrg m4_if([$5], , :, [$5]) 27259ef0b394Smrgfi 27269ef0b394Smrg])# _LT_LINKER_OPTION 2727266e564dSmrg 2728698f425bSmrg# Old name: 27299ef0b394SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 2730698f425bSmrgdnl aclocal-1.4 backwards compatibility: 27319ef0b394Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 2732266e564dSmrg 2733c5629e66Smrg 27349ef0b394Smrg# LT_CMD_MAX_LEN 27359ef0b394Smrg#--------------- 27369ef0b394SmrgAC_DEFUN([LT_CMD_MAX_LEN], 27379ef0b394Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 27389ef0b394Smrg# find the maximum length of command line arguments 27399ef0b394SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 27409ef0b394SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 27419ef0b394Smrg i=0 27429ef0b394Smrg teststring="ABCD" 2743266e564dSmrg 27449ef0b394Smrg case $build_os in 27459ef0b394Smrg msdosdjgpp*) 27469ef0b394Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 27479ef0b394Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 27489ef0b394Smrg # during glob expansion). Even if it were fixed, the result of this 27499ef0b394Smrg # check would be larger than it should be. 27509ef0b394Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 27519ef0b394Smrg ;; 2752266e564dSmrg 27539ef0b394Smrg gnu*) 27549ef0b394Smrg # Under GNU Hurd, this test is not required because there is 27559ef0b394Smrg # no limit to the length of command line arguments. 27569ef0b394Smrg # Libtool will interpret -1 as no limit whatsoever 27579ef0b394Smrg lt_cv_sys_max_cmd_len=-1; 27589ef0b394Smrg ;; 2759266e564dSmrg 27609ef0b394Smrg cygwin* | mingw* | cegcc*) 27619ef0b394Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 27629ef0b394Smrg # about 5 minutes as the teststring grows exponentially. 27639ef0b394Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 27649ef0b394Smrg # you end up with a "frozen" computer, even though with patience 27659ef0b394Smrg # the test eventually succeeds (with a max line length of 256k). 27669ef0b394Smrg # Instead, let's just punt: use the minimum linelength reported by 27679ef0b394Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 27689ef0b394Smrg lt_cv_sys_max_cmd_len=8192; 27699ef0b394Smrg ;; 2770266e564dSmrg 27719ef0b394Smrg mint*) 27729ef0b394Smrg # On MiNT this can take a long time and run out of memory. 27739ef0b394Smrg lt_cv_sys_max_cmd_len=8192; 27749ef0b394Smrg ;; 2775266e564dSmrg 27769ef0b394Smrg amigaos*) 27779ef0b394Smrg # On AmigaOS with pdksh, this test takes hours, literally. 27789ef0b394Smrg # So we just punt and use a minimum line length of 8192. 27799ef0b394Smrg lt_cv_sys_max_cmd_len=8192; 27809ef0b394Smrg ;; 2781266e564dSmrg 27829ef0b394Smrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 27839ef0b394Smrg # This has been around since 386BSD, at least. Likely further. 27849ef0b394Smrg if test -x /sbin/sysctl; then 27859ef0b394Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 27869ef0b394Smrg elif test -x /usr/sbin/sysctl; then 27879ef0b394Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 27889ef0b394Smrg else 27899ef0b394Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 27909ef0b394Smrg fi 27919ef0b394Smrg # And add a safety zone 27929ef0b394Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 27939ef0b394Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 27949ef0b394Smrg ;; 2795266e564dSmrg 27969ef0b394Smrg interix*) 27979ef0b394Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 27989ef0b394Smrg lt_cv_sys_max_cmd_len=196608 27999ef0b394Smrg ;; 2800266e564dSmrg 2801fb5e8d76Smrg os2*) 2802fb5e8d76Smrg # The test takes a long time on OS/2. 2803fb5e8d76Smrg lt_cv_sys_max_cmd_len=8192 2804fb5e8d76Smrg ;; 2805fb5e8d76Smrg 28069ef0b394Smrg osf*) 28079ef0b394Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 28089ef0b394Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 28099ef0b394Smrg # nice to cause kernel panics so lets avoid the loop below. 28109ef0b394Smrg # First set a reasonable default. 28119ef0b394Smrg lt_cv_sys_max_cmd_len=16384 28129ef0b394Smrg # 28139ef0b394Smrg if test -x /sbin/sysconfig; then 28149ef0b394Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 28159ef0b394Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 28169ef0b394Smrg esac 28179ef0b394Smrg fi 28189ef0b394Smrg ;; 28199ef0b394Smrg sco3.2v5*) 28209ef0b394Smrg lt_cv_sys_max_cmd_len=102400 28219ef0b394Smrg ;; 28229ef0b394Smrg sysv5* | sco5v6* | sysv4.2uw2*) 28239ef0b394Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 28249ef0b394Smrg if test -n "$kargmax"; then 28259ef0b394Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 28269ef0b394Smrg else 28279ef0b394Smrg lt_cv_sys_max_cmd_len=32768 28289ef0b394Smrg fi 28299ef0b394Smrg ;; 28309ef0b394Smrg *) 28319ef0b394Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 28329ef0b394Smrg if test -n "$lt_cv_sys_max_cmd_len"; then 28339ef0b394Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 28349ef0b394Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 28359ef0b394Smrg else 28369ef0b394Smrg # Make teststring a little bigger before we do anything with it. 28379ef0b394Smrg # a 1K string should be a reasonable start. 28389ef0b394Smrg for i in 1 2 3 4 5 6 7 8 ; do 28399ef0b394Smrg teststring=$teststring$teststring 28409ef0b394Smrg done 28419ef0b394Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 28429ef0b394Smrg # If test is not a shell built-in, we'll probably end up computing a 28439ef0b394Smrg # maximum length that is only half of the actual maximum length, but 28449ef0b394Smrg # we can't tell. 2845fb5e8d76Smrg while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ 28469ef0b394Smrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 28479ef0b394Smrg test $i != 17 # 1/2 MB should be enough 28489ef0b394Smrg do 28499ef0b394Smrg i=`expr $i + 1` 28509ef0b394Smrg teststring=$teststring$teststring 28519ef0b394Smrg done 28529ef0b394Smrg # Only check the string length outside the loop. 28539ef0b394Smrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 28549ef0b394Smrg teststring= 28559ef0b394Smrg # Add a significant safety factor because C++ compilers can tack on 28569ef0b394Smrg # massive amounts of additional arguments before passing them to the 28579ef0b394Smrg # linker. It appears as though 1/2 is a usable value. 28589ef0b394Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 28599ef0b394Smrg fi 28609ef0b394Smrg ;; 28619ef0b394Smrg esac 28629ef0b394Smrg]) 28639ef0b394Smrgif test -n $lt_cv_sys_max_cmd_len ; then 28649ef0b394Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 28659ef0b394Smrgelse 28669ef0b394Smrg AC_MSG_RESULT(none) 28679ef0b394Smrgfi 28689ef0b394Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 28699ef0b394Smrg_LT_DECL([], [max_cmd_len], [0], 28709ef0b394Smrg [What is the maximum length of a command?]) 28719ef0b394Smrg])# LT_CMD_MAX_LEN 2872266e564dSmrg 28739ef0b394Smrg# Old name: 28749ef0b394SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 28759ef0b394Smrgdnl aclocal-1.4 backwards compatibility: 28769ef0b394Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 2877266e564dSmrg 2878266e564dSmrg 28799ef0b394Smrg# _LT_HEADER_DLFCN 28809ef0b394Smrg# ---------------- 28819ef0b394Smrgm4_defun([_LT_HEADER_DLFCN], 28829ef0b394Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 28839ef0b394Smrg])# _LT_HEADER_DLFCN 2884266e564dSmrg 2885266e564dSmrg 28869ef0b394Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 28879ef0b394Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 28889ef0b394Smrg# ---------------------------------------------------------------- 28899ef0b394Smrgm4_defun([_LT_TRY_DLOPEN_SELF], 28909ef0b394Smrg[m4_require([_LT_HEADER_DLFCN])dnl 28919ef0b394Smrgif test "$cross_compiling" = yes; then : 28929ef0b394Smrg [$4] 28939ef0b394Smrgelse 28949ef0b394Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 28959ef0b394Smrg lt_status=$lt_dlunknown 28969ef0b394Smrg cat > conftest.$ac_ext <<_LT_EOF 28979ef0b394Smrg[#line $LINENO "configure" 28989ef0b394Smrg#include "confdefs.h" 2899266e564dSmrg 29009ef0b394Smrg#if HAVE_DLFCN_H 29019ef0b394Smrg#include <dlfcn.h> 29029ef0b394Smrg#endif 2903266e564dSmrg 29049ef0b394Smrg#include <stdio.h> 2905266e564dSmrg 29069ef0b394Smrg#ifdef RTLD_GLOBAL 29079ef0b394Smrg# define LT_DLGLOBAL RTLD_GLOBAL 29089ef0b394Smrg#else 29099ef0b394Smrg# ifdef DL_GLOBAL 29109ef0b394Smrg# define LT_DLGLOBAL DL_GLOBAL 29119ef0b394Smrg# else 29129ef0b394Smrg# define LT_DLGLOBAL 0 29139ef0b394Smrg# endif 2914698f425bSmrg#endif 2915266e564dSmrg 29169ef0b394Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 29179ef0b394Smrg find out it does not work in some platform. */ 29189ef0b394Smrg#ifndef LT_DLLAZY_OR_NOW 29199ef0b394Smrg# ifdef RTLD_LAZY 29209ef0b394Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 29219ef0b394Smrg# else 29229ef0b394Smrg# ifdef DL_LAZY 29239ef0b394Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 29249ef0b394Smrg# else 29259ef0b394Smrg# ifdef RTLD_NOW 29269ef0b394Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 29279ef0b394Smrg# else 29289ef0b394Smrg# ifdef DL_NOW 29299ef0b394Smrg# define LT_DLLAZY_OR_NOW DL_NOW 29309ef0b394Smrg# else 29319ef0b394Smrg# define LT_DLLAZY_OR_NOW 0 29329ef0b394Smrg# endif 29339ef0b394Smrg# endif 29349ef0b394Smrg# endif 29359ef0b394Smrg# endif 2936698f425bSmrg#endif 2937266e564dSmrg 29389ef0b394Smrg/* When -fvisbility=hidden is used, assume the code has been annotated 29399ef0b394Smrg correspondingly for the symbols needed. */ 29409ef0b394Smrg#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 29419ef0b394Smrgint fnord () __attribute__((visibility("default"))); 29429ef0b394Smrg#endif 2943266e564dSmrg 29449ef0b394Smrgint fnord () { return 42; } 29459ef0b394Smrgint main () 2946698f425bSmrg{ 29479ef0b394Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 29489ef0b394Smrg int status = $lt_dlunknown; 2949c5629e66Smrg 29509ef0b394Smrg if (self) 29519ef0b394Smrg { 29529ef0b394Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 2953698f425bSmrg else 29549ef0b394Smrg { 29559ef0b394Smrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 29569ef0b394Smrg else puts (dlerror ()); 29579ef0b394Smrg } 29589ef0b394Smrg /* dlclose (self); */ 29599ef0b394Smrg } 2960c5629e66Smrg else 29619ef0b394Smrg puts (dlerror ()); 2962266e564dSmrg 29639ef0b394Smrg return status; 29649ef0b394Smrg}] 29659ef0b394Smrg_LT_EOF 29669ef0b394Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 29679ef0b394Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 29689ef0b394Smrg lt_status=$? 29699ef0b394Smrg case x$lt_status in 29709ef0b394Smrg x$lt_dlno_uscore) $1 ;; 29719ef0b394Smrg x$lt_dlneed_uscore) $2 ;; 29729ef0b394Smrg x$lt_dlunknown|x*) $3 ;; 29739ef0b394Smrg esac 29749ef0b394Smrg else : 29759ef0b394Smrg # compilation failed 29769ef0b394Smrg $3 2977698f425bSmrg fi 2978698f425bSmrgfi 29799ef0b394Smrgrm -fr conftest* 29809ef0b394Smrg])# _LT_TRY_DLOPEN_SELF 29819ef0b394Smrg 29829ef0b394Smrg 29839ef0b394Smrg# LT_SYS_DLOPEN_SELF 29849ef0b394Smrg# ------------------ 29859ef0b394SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 29869ef0b394Smrg[m4_require([_LT_HEADER_DLFCN])dnl 29879ef0b394Smrgif test "x$enable_dlopen" != xyes; then 29889ef0b394Smrg enable_dlopen=unknown 29899ef0b394Smrg enable_dlopen_self=unknown 29909ef0b394Smrg enable_dlopen_self_static=unknown 2991c5629e66Smrgelse 29929ef0b394Smrg lt_cv_dlopen=no 29939ef0b394Smrg lt_cv_dlopen_libs= 2994c5629e66Smrg 29959ef0b394Smrg case $host_os in 29969ef0b394Smrg beos*) 29979ef0b394Smrg lt_cv_dlopen="load_add_on" 29989ef0b394Smrg lt_cv_dlopen_libs= 29999ef0b394Smrg lt_cv_dlopen_self=yes 30009ef0b394Smrg ;; 3001266e564dSmrg 30029ef0b394Smrg mingw* | pw32* | cegcc*) 30039ef0b394Smrg lt_cv_dlopen="LoadLibrary" 30049ef0b394Smrg lt_cv_dlopen_libs= 30059ef0b394Smrg ;; 3006266e564dSmrg 30079ef0b394Smrg cygwin*) 30089ef0b394Smrg lt_cv_dlopen="dlopen" 30099ef0b394Smrg lt_cv_dlopen_libs= 30109ef0b394Smrg ;; 3011266e564dSmrg 30129ef0b394Smrg darwin*) 30139ef0b394Smrg # if libdl is installed we need to link against it 30149ef0b394Smrg AC_CHECK_LIB([dl], [dlopen], 30159ef0b394Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 30169ef0b394Smrg lt_cv_dlopen="dyld" 30179ef0b394Smrg lt_cv_dlopen_libs= 30189ef0b394Smrg lt_cv_dlopen_self=yes 30199ef0b394Smrg ]) 30209ef0b394Smrg ;; 3021266e564dSmrg 30229ef0b394Smrg *) 30239ef0b394Smrg AC_CHECK_FUNC([shl_load], 30249ef0b394Smrg [lt_cv_dlopen="shl_load"], 30259ef0b394Smrg [AC_CHECK_LIB([dld], [shl_load], 30269ef0b394Smrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 30279ef0b394Smrg [AC_CHECK_FUNC([dlopen], 30289ef0b394Smrg [lt_cv_dlopen="dlopen"], 30299ef0b394Smrg [AC_CHECK_LIB([dl], [dlopen], 30309ef0b394Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 30319ef0b394Smrg [AC_CHECK_LIB([svld], [dlopen], 30329ef0b394Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 30339ef0b394Smrg [AC_CHECK_LIB([dld], [dld_link], 30349ef0b394Smrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 30359ef0b394Smrg ]) 30369ef0b394Smrg ]) 30379ef0b394Smrg ]) 30389ef0b394Smrg ]) 30399ef0b394Smrg ]) 30409ef0b394Smrg ;; 30419ef0b394Smrg esac 3042266e564dSmrg 30439ef0b394Smrg if test "x$lt_cv_dlopen" != xno; then 30449ef0b394Smrg enable_dlopen=yes 30459ef0b394Smrg else 30469ef0b394Smrg enable_dlopen=no 30479ef0b394Smrg fi 3048266e564dSmrg 30499ef0b394Smrg case $lt_cv_dlopen in 30509ef0b394Smrg dlopen) 30519ef0b394Smrg save_CPPFLAGS="$CPPFLAGS" 30529ef0b394Smrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 30539ef0b394Smrg 30549ef0b394Smrg save_LDFLAGS="$LDFLAGS" 30559ef0b394Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 30569ef0b394Smrg 30579ef0b394Smrg save_LIBS="$LIBS" 30589ef0b394Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 30599ef0b394Smrg 30609ef0b394Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 30619ef0b394Smrg lt_cv_dlopen_self, [dnl 30629ef0b394Smrg _LT_TRY_DLOPEN_SELF( 30639ef0b394Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 30649ef0b394Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 30659ef0b394Smrg ]) 30669ef0b394Smrg 30679ef0b394Smrg if test "x$lt_cv_dlopen_self" = xyes; then 30689ef0b394Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 30699ef0b394Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 30709ef0b394Smrg lt_cv_dlopen_self_static, [dnl 30719ef0b394Smrg _LT_TRY_DLOPEN_SELF( 30729ef0b394Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 30739ef0b394Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 30749ef0b394Smrg ]) 30759ef0b394Smrg fi 30769ef0b394Smrg 30779ef0b394Smrg CPPFLAGS="$save_CPPFLAGS" 30789ef0b394Smrg LDFLAGS="$save_LDFLAGS" 30799ef0b394Smrg LIBS="$save_LIBS" 30809ef0b394Smrg ;; 30819ef0b394Smrg esac 30829ef0b394Smrg 30839ef0b394Smrg case $lt_cv_dlopen_self in 30849ef0b394Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 30859ef0b394Smrg *) enable_dlopen_self=unknown ;; 30869ef0b394Smrg esac 30879ef0b394Smrg 30889ef0b394Smrg case $lt_cv_dlopen_self_static in 30899ef0b394Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 30909ef0b394Smrg *) enable_dlopen_self_static=unknown ;; 30919ef0b394Smrg esac 30929ef0b394Smrgfi 30939ef0b394Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 30949ef0b394Smrg [Whether dlopen is supported]) 30959ef0b394Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 30969ef0b394Smrg [Whether dlopen of programs is supported]) 30979ef0b394Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 30989ef0b394Smrg [Whether dlopen of statically linked programs is supported]) 30999ef0b394Smrg])# LT_SYS_DLOPEN_SELF 31009ef0b394Smrg 31019ef0b394Smrg# Old name: 31029ef0b394SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 31039ef0b394Smrgdnl aclocal-1.4 backwards compatibility: 31049ef0b394Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 31059ef0b394Smrg 31069ef0b394Smrg 31079ef0b394Smrg# _LT_COMPILER_C_O([TAGNAME]) 31089ef0b394Smrg# --------------------------- 31099ef0b394Smrg# Check to see if options -c and -o are simultaneously supported by compiler. 31109ef0b394Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 31119ef0b394Smrgm4_defun([_LT_COMPILER_C_O], 31129ef0b394Smrg[m4_require([_LT_DECL_SED])dnl 31139ef0b394Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 31149ef0b394Smrgm4_require([_LT_TAG_COMPILER])dnl 31159ef0b394SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 31169ef0b394Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 31179ef0b394Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 31189ef0b394Smrg $RM -r conftest 2>/dev/null 31199ef0b394Smrg mkdir conftest 31209ef0b394Smrg cd conftest 31219ef0b394Smrg mkdir out 31229ef0b394Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 31239ef0b394Smrg 31249ef0b394Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 31259ef0b394Smrg # Insert the option either (1) after the last *FLAGS variable, or 31269ef0b394Smrg # (2) before a word containing "conftest.", or (3) at the end. 31279ef0b394Smrg # Note that $ac_compile itself does not contain backslashes and begins 31289ef0b394Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 31299ef0b394Smrg lt_compile=`echo "$ac_compile" | $SED \ 31309ef0b394Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 31319ef0b394Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 31329ef0b394Smrg -e 's:$: $lt_compiler_flag:'` 31339ef0b394Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 31349ef0b394Smrg (eval "$lt_compile" 2>out/conftest.err) 31359ef0b394Smrg ac_status=$? 31369ef0b394Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 31379ef0b394Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 31389ef0b394Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 31399ef0b394Smrg then 31409ef0b394Smrg # The compiler can only warn and ignore the option if not recognized 31419ef0b394Smrg # So say no if there are warnings 31429ef0b394Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 31439ef0b394Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 31449ef0b394Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 31459ef0b394Smrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 31469ef0b394Smrg fi 31479ef0b394Smrg fi 31489ef0b394Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 31499ef0b394Smrg $RM conftest* 31509ef0b394Smrg # SGI C++ compiler will create directory out/ii_files/ for 31519ef0b394Smrg # template instantiation 31529ef0b394Smrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 31539ef0b394Smrg $RM out/* && rmdir out 31549ef0b394Smrg cd .. 31559ef0b394Smrg $RM -r conftest 31569ef0b394Smrg $RM conftest* 31579ef0b394Smrg]) 31589ef0b394Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 31599ef0b394Smrg [Does compiler simultaneously support -c and -o options?]) 31609ef0b394Smrg])# _LT_COMPILER_C_O 31619ef0b394Smrg 31629ef0b394Smrg 31639ef0b394Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 31649ef0b394Smrg# ---------------------------------- 31659ef0b394Smrg# Check to see if we can do hard links to lock some files if needed 31669ef0b394Smrgm4_defun([_LT_COMPILER_FILE_LOCKS], 31679ef0b394Smrg[m4_require([_LT_ENABLE_LOCK])dnl 31689ef0b394Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 31699ef0b394Smrg_LT_COMPILER_C_O([$1]) 31709ef0b394Smrg 31719ef0b394Smrghard_links="nottested" 31729ef0b394Smrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 31739ef0b394Smrg # do not overwrite the value of need_locks provided by the user 31749ef0b394Smrg AC_MSG_CHECKING([if we can lock with hard links]) 31759ef0b394Smrg hard_links=yes 31769ef0b394Smrg $RM conftest* 31779ef0b394Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 31789ef0b394Smrg touch conftest.a 31799ef0b394Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 31809ef0b394Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 31819ef0b394Smrg AC_MSG_RESULT([$hard_links]) 31829ef0b394Smrg if test "$hard_links" = no; then 31839ef0b394Smrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 31849ef0b394Smrg need_locks=warn 31859ef0b394Smrg fi 31869ef0b394Smrgelse 31879ef0b394Smrg need_locks=no 31889ef0b394Smrgfi 31899ef0b394Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 31909ef0b394Smrg])# _LT_COMPILER_FILE_LOCKS 31919ef0b394Smrg 31929ef0b394Smrg 31939ef0b394Smrg# _LT_CHECK_OBJDIR 31949ef0b394Smrg# ---------------- 31959ef0b394Smrgm4_defun([_LT_CHECK_OBJDIR], 31969ef0b394Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 31979ef0b394Smrg[rm -f .libs 2>/dev/null 31989ef0b394Smrgmkdir .libs 2>/dev/null 31999ef0b394Smrgif test -d .libs; then 32009ef0b394Smrg lt_cv_objdir=.libs 32019ef0b394Smrgelse 32029ef0b394Smrg # MS-DOS does not allow filenames that begin with a dot. 32039ef0b394Smrg lt_cv_objdir=_libs 32049ef0b394Smrgfi 32059ef0b394Smrgrmdir .libs 2>/dev/null]) 32069ef0b394Smrgobjdir=$lt_cv_objdir 32079ef0b394Smrg_LT_DECL([], [objdir], [0], 32089ef0b394Smrg [The name of the directory that contains temporary libtool files])dnl 32099ef0b394Smrgm4_pattern_allow([LT_OBJDIR])dnl 32109ef0b394SmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 32119ef0b394Smrg [Define to the sub-directory in which libtool stores uninstalled libraries.]) 32129ef0b394Smrg])# _LT_CHECK_OBJDIR 32139ef0b394Smrg 32149ef0b394Smrg 32159ef0b394Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 32169ef0b394Smrg# -------------------------------------- 32179ef0b394Smrg# Check hardcoding attributes. 32189ef0b394Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 32199ef0b394Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 32209ef0b394Smrg_LT_TAGVAR(hardcode_action, $1)= 32219ef0b394Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 32229ef0b394Smrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 32239ef0b394Smrg test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 32249ef0b394Smrg 32259ef0b394Smrg # We can hardcode non-existent directories. 32269ef0b394Smrg if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 32279ef0b394Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 32289ef0b394Smrg # have to relink, otherwise we might link with an installed library 32299ef0b394Smrg # when we should be linking with a yet-to-be-installed one 32309ef0b394Smrg ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 32319ef0b394Smrg test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 32329ef0b394Smrg # Linking always hardcodes the temporary library directory. 32339ef0b394Smrg _LT_TAGVAR(hardcode_action, $1)=relink 32349ef0b394Smrg else 32359ef0b394Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 32369ef0b394Smrg _LT_TAGVAR(hardcode_action, $1)=immediate 32379ef0b394Smrg fi 32389ef0b394Smrgelse 32399ef0b394Smrg # We cannot hardcode anything, or else we can only hardcode existing 32409ef0b394Smrg # directories. 32419ef0b394Smrg _LT_TAGVAR(hardcode_action, $1)=unsupported 32429ef0b394Smrgfi 32439ef0b394SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 32449ef0b394Smrg 32459ef0b394Smrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 32469ef0b394Smrg test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 32479ef0b394Smrg # Fast installation is not supported 32489ef0b394Smrg enable_fast_install=no 32499ef0b394Smrgelif test "$shlibpath_overrides_runpath" = yes || 32509ef0b394Smrg test "$enable_shared" = no; then 32519ef0b394Smrg # Fast installation is not necessary 32529ef0b394Smrg enable_fast_install=needless 32539ef0b394Smrgfi 32549ef0b394Smrg_LT_TAGDECL([], [hardcode_action], [0], 32559ef0b394Smrg [How to hardcode a shared library path into an executable]) 32569ef0b394Smrg])# _LT_LINKER_HARDCODE_LIBPATH 32579ef0b394Smrg 32589ef0b394Smrg 32599ef0b394Smrg# _LT_CMD_STRIPLIB 32609ef0b394Smrg# ---------------- 32619ef0b394Smrgm4_defun([_LT_CMD_STRIPLIB], 32629ef0b394Smrg[m4_require([_LT_DECL_EGREP]) 32639ef0b394Smrgstriplib= 32649ef0b394Smrgold_striplib= 32659ef0b394SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 32669ef0b394Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 32679ef0b394Smrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 32689ef0b394Smrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 32699ef0b394Smrg AC_MSG_RESULT([yes]) 32709ef0b394Smrgelse 32719ef0b394Smrg# FIXME - insert some real tests, host_os isn't really good enough 32729ef0b394Smrg case $host_os in 32739ef0b394Smrg darwin*) 32749ef0b394Smrg if test -n "$STRIP" ; then 32759ef0b394Smrg striplib="$STRIP -x" 32769ef0b394Smrg old_striplib="$STRIP -S" 32779ef0b394Smrg AC_MSG_RESULT([yes]) 32789ef0b394Smrg else 32799ef0b394Smrg AC_MSG_RESULT([no]) 32809ef0b394Smrg fi 32819ef0b394Smrg ;; 32829ef0b394Smrg *) 32839ef0b394Smrg AC_MSG_RESULT([no]) 32849ef0b394Smrg ;; 32859ef0b394Smrg esac 32869ef0b394Smrgfi 32879ef0b394Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 32889ef0b394Smrg_LT_DECL([], [striplib], [1]) 32899ef0b394Smrg])# _LT_CMD_STRIPLIB 32909ef0b394Smrg 32919ef0b394Smrg 32929ef0b394Smrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 32939ef0b394Smrg# ----------------------------- 32949ef0b394Smrg# PORTME Fill in your ld.so characteristics 32959ef0b394Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 32969ef0b394Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 32979ef0b394Smrgm4_require([_LT_DECL_EGREP])dnl 32989ef0b394Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 32999ef0b394Smrgm4_require([_LT_DECL_OBJDUMP])dnl 33009ef0b394Smrgm4_require([_LT_DECL_SED])dnl 33019ef0b394Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 33029ef0b394SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 33039ef0b394Smrgm4_if([$1], 33049ef0b394Smrg [], [ 33059ef0b394Smrgif test "$GCC" = yes; then 33069ef0b394Smrg case $host_os in 33079ef0b394Smrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 33089ef0b394Smrg *) lt_awk_arg="/^libraries:/" ;; 33099ef0b394Smrg esac 33109ef0b394Smrg case $host_os in 33119ef0b394Smrg mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 33129ef0b394Smrg *) lt_sed_strip_eq="s,=/,/,g" ;; 33139ef0b394Smrg esac 33149ef0b394Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 33159ef0b394Smrg case $lt_search_path_spec in 33169ef0b394Smrg *\;*) 33179ef0b394Smrg # if the path contains ";" then we assume it to be the separator 33189ef0b394Smrg # otherwise default to the standard path separator (i.e. ":") - it is 33199ef0b394Smrg # assumed that no part of a normal pathname contains ";" but that should 33209ef0b394Smrg # okay in the real world where ";" in dirpaths is itself problematic. 33219ef0b394Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 33229ef0b394Smrg ;; 33239ef0b394Smrg *) 33249ef0b394Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 33259ef0b394Smrg ;; 33269ef0b394Smrg esac 33279ef0b394Smrg # Ok, now we have the path, separated by spaces, we can step through it 33289ef0b394Smrg # and add multilib dir if necessary. 33299ef0b394Smrg lt_tmp_lt_search_path_spec= 33309ef0b394Smrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 33319ef0b394Smrg for lt_sys_path in $lt_search_path_spec; do 33329ef0b394Smrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 33339ef0b394Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 33349ef0b394Smrg else 33359ef0b394Smrg test -d "$lt_sys_path" && \ 33369ef0b394Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 33379ef0b394Smrg fi 33389ef0b394Smrg done 33399ef0b394Smrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 33409ef0b394SmrgBEGIN {RS=" "; FS="/|\n";} { 33419ef0b394Smrg lt_foo=""; 33429ef0b394Smrg lt_count=0; 33439ef0b394Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 33449ef0b394Smrg if ($lt_i != "" && $lt_i != ".") { 33459ef0b394Smrg if ($lt_i == "..") { 33469ef0b394Smrg lt_count++; 33479ef0b394Smrg } else { 33489ef0b394Smrg if (lt_count == 0) { 33499ef0b394Smrg lt_foo="/" $lt_i lt_foo; 33509ef0b394Smrg } else { 33519ef0b394Smrg lt_count--; 33529ef0b394Smrg } 33539ef0b394Smrg } 33549ef0b394Smrg } 33559ef0b394Smrg } 33569ef0b394Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 33579ef0b394Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 33589ef0b394Smrg}'` 33599ef0b394Smrg # AWK program above erroneously prepends '/' to C:/dos/paths 33609ef0b394Smrg # for these hosts. 33619ef0b394Smrg case $host_os in 33629ef0b394Smrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 33639ef0b394Smrg $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 33649ef0b394Smrg esac 33659ef0b394Smrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 33669ef0b394Smrgelse 33679ef0b394Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 33689ef0b394Smrgfi]) 33699ef0b394Smrglibrary_names_spec= 33709ef0b394Smrglibname_spec='lib$name' 33719ef0b394Smrgsoname_spec= 33729ef0b394Smrgshrext_cmds=".so" 33739ef0b394Smrgpostinstall_cmds= 33749ef0b394Smrgpostuninstall_cmds= 33759ef0b394Smrgfinish_cmds= 33769ef0b394Smrgfinish_eval= 33779ef0b394Smrgshlibpath_var= 33789ef0b394Smrgshlibpath_overrides_runpath=unknown 33799ef0b394Smrgversion_type=none 33809ef0b394Smrgdynamic_linker="$host_os ld.so" 33819ef0b394Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 33829ef0b394Smrgneed_lib_prefix=unknown 33839ef0b394Smrghardcode_into_libs=no 33849ef0b394Smrg 33859ef0b394Smrg# when you set need_version to no, make sure it does not cause -set_version 33869ef0b394Smrg# flags to be left without arguments 33879ef0b394Smrgneed_version=unknown 33889ef0b394Smrg 33899ef0b394Smrgcase $host_os in 33909ef0b394Smrgaix3*) 3391fb5e8d76Smrg version_type=linux # correct to gnu/linux during the next big refactor 33929ef0b394Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 33939ef0b394Smrg shlibpath_var=LIBPATH 33949ef0b394Smrg 33959ef0b394Smrg # AIX 3 has no versioning support, so we append a major version to the name. 33969ef0b394Smrg soname_spec='${libname}${release}${shared_ext}$major' 33979ef0b394Smrg ;; 33989ef0b394Smrg 33999ef0b394Smrgaix[[4-9]]*) 3400fb5e8d76Smrg version_type=linux # correct to gnu/linux during the next big refactor 34019ef0b394Smrg need_lib_prefix=no 34029ef0b394Smrg need_version=no 34039ef0b394Smrg hardcode_into_libs=yes 34049ef0b394Smrg if test "$host_cpu" = ia64; then 34059ef0b394Smrg # AIX 5 supports IA64 34069ef0b394Smrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 34079ef0b394Smrg shlibpath_var=LD_LIBRARY_PATH 34089ef0b394Smrg else 34099ef0b394Smrg # With GCC up to 2.95.x, collect2 would create an import file 34109ef0b394Smrg # for dependence libraries. The import file would start with 34119ef0b394Smrg # the line `#! .'. This would cause the generated library to 34129ef0b394Smrg # depend on `.', always an invalid library. This was fixed in 34139ef0b394Smrg # development snapshots of GCC prior to 3.0. 34149ef0b394Smrg case $host_os in 34159ef0b394Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 34169ef0b394Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 34179ef0b394Smrg echo ' yes ' 34189ef0b394Smrg echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 34199ef0b394Smrg : 34209ef0b394Smrg else 34219ef0b394Smrg can_build_shared=no 34229ef0b394Smrg fi 3423698f425bSmrg ;; 34249ef0b394Smrg esac 34259ef0b394Smrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 34269ef0b394Smrg # soname into executable. Probably we can add versioning support to 34279ef0b394Smrg # collect2, so additional links can be useful in future. 34289ef0b394Smrg if test "$aix_use_runtimelinking" = yes; then 34299ef0b394Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 34309ef0b394Smrg # instead of lib<name>.a to let people know that these are not 34319ef0b394Smrg # typical AIX shared libraries. 34329ef0b394Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 34339ef0b394Smrg else 34349ef0b394Smrg # We preserve .a as extension for shared libraries through AIX4.2 34359ef0b394Smrg # and later when we are not doing run time linking. 34369ef0b394Smrg library_names_spec='${libname}${release}.a $libname.a' 34379ef0b394Smrg soname_spec='${libname}${release}${shared_ext}$major' 34389ef0b394Smrg fi 34399ef0b394Smrg shlibpath_var=LIBPATH 34409ef0b394Smrg fi 34419ef0b394Smrg ;; 34429ef0b394Smrg 34439ef0b394Smrgamigaos*) 34449ef0b394Smrg case $host_cpu in 34459ef0b394Smrg powerpc) 34469ef0b394Smrg # Since July 2007 AmigaOS4 officially supports .so libraries. 34479ef0b394Smrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 34489ef0b394Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 34499ef0b394Smrg ;; 34509ef0b394Smrg m68k) 34519ef0b394Smrg library_names_spec='$libname.ixlibrary $libname.a' 34529ef0b394Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 34539ef0b394Smrg 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' 34549ef0b394Smrg ;; 34559ef0b394Smrg esac 34569ef0b394Smrg ;; 34579ef0b394Smrg 34589ef0b394Smrgbeos*) 34599ef0b394Smrg library_names_spec='${libname}${shared_ext}' 34609ef0b394Smrg dynamic_linker="$host_os ld.so" 34619ef0b394Smrg shlibpath_var=LIBRARY_PATH 34629ef0b394Smrg ;; 34639ef0b394Smrg 34649ef0b394Smrgbsdi[[45]]*) 3465fb5e8d76Smrg version_type=linux # correct to gnu/linux during the next big refactor 34669ef0b394Smrg need_version=no 34679ef0b394Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 34689ef0b394Smrg soname_spec='${libname}${release}${shared_ext}$major' 34699ef0b394Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 34709ef0b394Smrg shlibpath_var=LD_LIBRARY_PATH 34719ef0b394Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 34729ef0b394Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 34739ef0b394Smrg # the default ld.so.conf also contains /usr/contrib/lib and 34749ef0b394Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 34759ef0b394Smrg # libtool to hard-code these into programs 34769ef0b394Smrg ;; 34779ef0b394Smrg 34789ef0b394Smrgcygwin* | mingw* | pw32* | cegcc*) 34799ef0b394Smrg version_type=windows 34809ef0b394Smrg shrext_cmds=".dll" 34819ef0b394Smrg need_version=no 34829ef0b394Smrg need_lib_prefix=no 34839ef0b394Smrg 34849ef0b394Smrg case $GCC,$cc_basename in 34859ef0b394Smrg yes,*) 34869ef0b394Smrg # gcc 34879ef0b394Smrg library_names_spec='$libname.dll.a' 34889ef0b394Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 34899ef0b394Smrg postinstall_cmds='base_file=`basename \${file}`~ 34909ef0b394Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 34919ef0b394Smrg dldir=$destdir/`dirname \$dlpath`~ 34929ef0b394Smrg test -d \$dldir || mkdir -p \$dldir~ 34939ef0b394Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 34949ef0b394Smrg chmod a+x \$dldir/$dlname~ 34959ef0b394Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 34969ef0b394Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 34979ef0b394Smrg fi' 34989ef0b394Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 34999ef0b394Smrg dlpath=$dir/\$dldll~ 35009ef0b394Smrg $RM \$dlpath' 35019ef0b394Smrg shlibpath_overrides_runpath=yes 35029ef0b394Smrg 35039ef0b394Smrg case $host_os in 35049ef0b394Smrg cygwin*) 35059ef0b394Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 35069ef0b394Smrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 35079ef0b394Smrgm4_if([$1], [],[ 35089ef0b394Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 35099ef0b394Smrg ;; 35109ef0b394Smrg mingw* | cegcc*) 35119ef0b394Smrg # MinGW DLLs use traditional 'lib' prefix 35129ef0b394Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 35139ef0b394Smrg ;; 35149ef0b394Smrg pw32*) 35159ef0b394Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 35169ef0b394Smrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 35179ef0b394Smrg ;; 35189ef0b394Smrg esac 35199ef0b394Smrg dynamic_linker='Win32 ld.exe' 35209ef0b394Smrg ;; 35219ef0b394Smrg 35229ef0b394Smrg *,cl*) 35239ef0b394Smrg # Native MSVC 35249ef0b394Smrg libname_spec='$name' 35259ef0b394Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 35269ef0b394Smrg library_names_spec='${libname}.dll.lib' 35279ef0b394Smrg 35289ef0b394Smrg case $build_os in 35299ef0b394Smrg mingw*) 35309ef0b394Smrg sys_lib_search_path_spec= 35319ef0b394Smrg lt_save_ifs=$IFS 35329ef0b394Smrg IFS=';' 35339ef0b394Smrg for lt_path in $LIB 35349ef0b394Smrg do 35359ef0b394Smrg IFS=$lt_save_ifs 35369ef0b394Smrg # Let DOS variable expansion print the short 8.3 style file name. 35379ef0b394Smrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 35389ef0b394Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 35399ef0b394Smrg done 35409ef0b394Smrg IFS=$lt_save_ifs 35419ef0b394Smrg # Convert to MSYS style. 35429ef0b394Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 35439ef0b394Smrg ;; 35449ef0b394Smrg cygwin*) 35459ef0b394Smrg # Convert to unix form, then to dos form, then back to unix form 35469ef0b394Smrg # but this time dos style (no spaces!) so that the unix form looks 35479ef0b394Smrg # like /cygdrive/c/PROGRA~1:/cygdr... 35489ef0b394Smrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 35499ef0b394Smrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 35509ef0b394Smrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 35519ef0b394Smrg ;; 35529ef0b394Smrg *) 35539ef0b394Smrg sys_lib_search_path_spec="$LIB" 35549ef0b394Smrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 35559ef0b394Smrg # It is most probably a Windows format PATH. 35569ef0b394Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 35579ef0b394Smrg else 35589ef0b394Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 35599ef0b394Smrg fi 35609ef0b394Smrg # FIXME: find the short name or the path components, as spaces are 35619ef0b394Smrg # common. (e.g. "Program Files" -> "PROGRA~1") 35629ef0b394Smrg ;; 35639ef0b394Smrg esac 35649ef0b394Smrg 35659ef0b394Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 35669ef0b394Smrg postinstall_cmds='base_file=`basename \${file}`~ 35679ef0b394Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 35689ef0b394Smrg dldir=$destdir/`dirname \$dlpath`~ 35699ef0b394Smrg test -d \$dldir || mkdir -p \$dldir~ 35709ef0b394Smrg $install_prog $dir/$dlname \$dldir/$dlname' 35719ef0b394Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 35729ef0b394Smrg dlpath=$dir/\$dldll~ 35739ef0b394Smrg $RM \$dlpath' 35749ef0b394Smrg shlibpath_overrides_runpath=yes 35759ef0b394Smrg dynamic_linker='Win32 link.exe' 35769ef0b394Smrg ;; 35779ef0b394Smrg 35789ef0b394Smrg *) 35799ef0b394Smrg # Assume MSVC wrapper 35809ef0b394Smrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 35819ef0b394Smrg dynamic_linker='Win32 ld.exe' 35829ef0b394Smrg ;; 35839ef0b394Smrg esac 35849ef0b394Smrg # FIXME: first we should search . and the directory the executable is in 35859ef0b394Smrg shlibpath_var=PATH 35869ef0b394Smrg ;; 35879ef0b394Smrg 35889ef0b394Smrgdarwin* | rhapsody*) 35899ef0b394Smrg dynamic_linker="$host_os dyld" 35909ef0b394Smrg version_type=darwin 35919ef0b394Smrg need_lib_prefix=no 35929ef0b394Smrg need_version=no 35939ef0b394Smrg library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 35949ef0b394Smrg soname_spec='${libname}${release}${major}$shared_ext' 35959ef0b394Smrg shlibpath_overrides_runpath=yes 35969ef0b394Smrg shlibpath_var=DYLD_LIBRARY_PATH 35979ef0b394Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 35989ef0b394Smrgm4_if([$1], [],[ 35999ef0b394Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 36009ef0b394Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 36019ef0b394Smrg ;; 36029ef0b394Smrg 36039ef0b394Smrgdgux*) 3604fb5e8d76Smrg version_type=linux # correct to gnu/linux during the next big refactor 36059ef0b394Smrg need_lib_prefix=no 36069ef0b394Smrg need_version=no 36079ef0b394Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 36089ef0b394Smrg soname_spec='${libname}${release}${shared_ext}$major' 36099ef0b394Smrg shlibpath_var=LD_LIBRARY_PATH 36109ef0b394Smrg ;; 36119ef0b394Smrg 36129ef0b394Smrgfreebsd* | dragonfly*) 36139ef0b394Smrg # DragonFly does not have aout. When/if they implement a new 36149ef0b394Smrg # versioning mechanism, adjust this. 36159ef0b394Smrg if test -x /usr/bin/objformat; then 36169ef0b394Smrg objformat=`/usr/bin/objformat` 36179ef0b394Smrg else 36189ef0b394Smrg case $host_os in 3619fb5e8d76Smrg freebsd[[23]].*) objformat=aout ;; 36209ef0b394Smrg *) objformat=elf ;; 36219ef0b394Smrg esac 36229ef0b394Smrg fi 36239ef0b394Smrg version_type=freebsd-$objformat 36249ef0b394Smrg case $version_type in 36259ef0b394Smrg freebsd-elf*) 36269ef0b394Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 36279ef0b394Smrg need_version=no 36289ef0b394Smrg need_lib_prefix=no 36299ef0b394Smrg ;; 36309ef0b394Smrg freebsd-*) 36319ef0b394Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 36329ef0b394Smrg need_version=yes 3633698f425bSmrg ;; 36349ef0b394Smrg esac 36359ef0b394Smrg shlibpath_var=LD_LIBRARY_PATH 36369ef0b394Smrg case $host_os in 3637fb5e8d76Smrg freebsd2.*) 36389ef0b394Smrg shlibpath_overrides_runpath=yes 36399ef0b394Smrg ;; 36409ef0b394Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 36419ef0b394Smrg shlibpath_overrides_runpath=yes 36429ef0b394Smrg hardcode_into_libs=yes 36439ef0b394Smrg ;; 36449ef0b394Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 36459ef0b394Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 36469ef0b394Smrg shlibpath_overrides_runpath=no 36479ef0b394Smrg hardcode_into_libs=yes 36489ef0b394Smrg ;; 36499ef0b394Smrg *) # from 4.6 on, and DragonFly 36509ef0b394Smrg shlibpath_overrides_runpath=yes 36519ef0b394Smrg hardcode_into_libs=yes 36529ef0b394Smrg ;; 36539ef0b394Smrg esac 36549ef0b394Smrg ;; 36559ef0b394Smrg 36569ef0b394Smrggnu*) 3657fb5e8d76Smrg version_type=linux # correct to gnu/linux during the next big refactor 36589ef0b394Smrg need_lib_prefix=no 36599ef0b394Smrg need_version=no 36609ef0b394Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 36619ef0b394Smrg soname_spec='${libname}${release}${shared_ext}$major' 36629ef0b394Smrg shlibpath_var=LD_LIBRARY_PATH 3663fb5e8d76Smrg shlibpath_overrides_runpath=no 36649ef0b394Smrg hardcode_into_libs=yes 36659ef0b394Smrg ;; 36669ef0b394Smrg 36679ef0b394Smrghaiku*) 3668fb5e8d76Smrg version_type=linux # correct to gnu/linux during the next big refactor 36699ef0b394Smrg need_lib_prefix=no 36709ef0b394Smrg need_version=no 36719ef0b394Smrg dynamic_linker="$host_os runtime_loader" 36729ef0b394Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 36739ef0b394Smrg soname_spec='${libname}${release}${shared_ext}$major' 36749ef0b394Smrg shlibpath_var=LIBRARY_PATH 36759ef0b394Smrg shlibpath_overrides_runpath=yes 36769ef0b394Smrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 36779ef0b394Smrg hardcode_into_libs=yes 36789ef0b394Smrg ;; 36799ef0b394Smrg 36809ef0b394Smrghpux9* | hpux10* | hpux11*) 36819ef0b394Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 36829ef0b394Smrg # link against other versions. 36839ef0b394Smrg version_type=sunos 36849ef0b394Smrg need_lib_prefix=no 36859ef0b394Smrg need_version=no 36869ef0b394Smrg case $host_cpu in 36879ef0b394Smrg ia64*) 36889ef0b394Smrg shrext_cmds='.so' 36899ef0b394Smrg hardcode_into_libs=yes 36909ef0b394Smrg dynamic_linker="$host_os dld.so" 36919ef0b394Smrg shlibpath_var=LD_LIBRARY_PATH 36929ef0b394Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 36939ef0b394Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 36949ef0b394Smrg soname_spec='${libname}${release}${shared_ext}$major' 36959ef0b394Smrg if test "X$HPUX_IA64_MODE" = X32; then 36969ef0b394Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 36979ef0b394Smrg else 36989ef0b394Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 36999ef0b394Smrg fi 37009ef0b394Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 37019ef0b394Smrg ;; 37029ef0b394Smrg hppa*64*) 37039ef0b394Smrg shrext_cmds='.sl' 37049ef0b394Smrg hardcode_into_libs=yes 37059ef0b394Smrg dynamic_linker="$host_os dld.sl" 37069ef0b394Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 37079ef0b394Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 37089ef0b394Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 37099ef0b394Smrg soname_spec='${libname}${release}${shared_ext}$major' 37109ef0b394Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 37119ef0b394Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 37129ef0b394Smrg ;; 37139ef0b394Smrg *) 37149ef0b394Smrg shrext_cmds='.sl' 37159ef0b394Smrg dynamic_linker="$host_os dld.sl" 37169ef0b394Smrg shlibpath_var=SHLIB_PATH 37179ef0b394Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 37189ef0b394Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 37199ef0b394Smrg soname_spec='${libname}${release}${shared_ext}$major' 37209ef0b394Smrg ;; 37219ef0b394Smrg esac 37229ef0b394Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 37239ef0b394Smrg postinstall_cmds='chmod 555 $lib' 37249ef0b394Smrg # or fails outright, so override atomically: 37259ef0b394Smrg install_override_mode=555 37269ef0b394Smrg ;; 37279ef0b394Smrg 37289ef0b394Smrginterix[[3-9]]*) 3729fb5e8d76Smrg version_type=linux # correct to gnu/linux during the next big refactor 37309ef0b394Smrg need_lib_prefix=no 37319ef0b394Smrg need_version=no 37329ef0b394Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 37339ef0b394Smrg soname_spec='${libname}${release}${shared_ext}$major' 37349ef0b394Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 37359ef0b394Smrg shlibpath_var=LD_LIBRARY_PATH 37369ef0b394Smrg shlibpath_overrides_runpath=no 37379ef0b394Smrg hardcode_into_libs=yes 37389ef0b394Smrg ;; 37399ef0b394Smrg 37409ef0b394Smrgirix5* | irix6* | nonstopux*) 37419ef0b394Smrg case $host_os in 37429ef0b394Smrg nonstopux*) version_type=nonstopux ;; 3743698f425bSmrg *) 37449ef0b394Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 3745fb5e8d76Smrg version_type=linux # correct to gnu/linux during the next big refactor 3746698f425bSmrg else 37479ef0b394Smrg version_type=irix 37489ef0b394Smrg fi ;; 37499ef0b394Smrg esac 37509ef0b394Smrg need_lib_prefix=no 37519ef0b394Smrg need_version=no 37529ef0b394Smrg soname_spec='${libname}${release}${shared_ext}$major' 37539ef0b394Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 37549ef0b394Smrg case $host_os in 37559ef0b394Smrg irix5* | nonstopux*) 37569ef0b394Smrg libsuff= shlibsuff= 37579ef0b394Smrg ;; 37589ef0b394Smrg *) 37599ef0b394Smrg case $LD in # libtool.m4 will add one of these switches to LD 37609ef0b394Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 37619ef0b394Smrg libsuff= shlibsuff= libmagic=32-bit;; 37629ef0b394Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 37639ef0b394Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 37649ef0b394Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 37659ef0b394Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 37669ef0b394Smrg *) libsuff= shlibsuff= libmagic=never-match;; 37679ef0b394Smrg esac 37689ef0b394Smrg ;; 37699ef0b394Smrg esac 37709ef0b394Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 37719ef0b394Smrg shlibpath_overrides_runpath=no 37729ef0b394Smrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 37739ef0b394Smrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 37749ef0b394Smrg hardcode_into_libs=yes 37759ef0b394Smrg ;; 37769ef0b394Smrg 37779ef0b394Smrg# No shared lib support for Linux oldld, aout, or coff. 37789ef0b394Smrglinux*oldld* | linux*aout* | linux*coff*) 37799ef0b394Smrg dynamic_linker=no 37809ef0b394Smrg ;; 37819ef0b394Smrg 3782fb5e8d76Smrg# This must be glibc/ELF. 37839ef0b394Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 3784fb5e8d76Smrg version_type=linux # correct to gnu/linux during the next big refactor 37859ef0b394Smrg need_lib_prefix=no 37869ef0b394Smrg need_version=no 37879ef0b394Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 37889ef0b394Smrg soname_spec='${libname}${release}${shared_ext}$major' 37899ef0b394Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 37909ef0b394Smrg shlibpath_var=LD_LIBRARY_PATH 37919ef0b394Smrg shlibpath_overrides_runpath=no 37929ef0b394Smrg 37939ef0b394Smrg # Some binutils ld are patched to set DT_RUNPATH 37949ef0b394Smrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 37959ef0b394Smrg [lt_cv_shlibpath_overrides_runpath=no 37969ef0b394Smrg save_LDFLAGS=$LDFLAGS 37979ef0b394Smrg save_libdir=$libdir 37989ef0b394Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 37999ef0b394Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 38009ef0b394Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 38019ef0b394Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 38029ef0b394Smrg [lt_cv_shlibpath_overrides_runpath=yes])]) 38039ef0b394Smrg LDFLAGS=$save_LDFLAGS 38049ef0b394Smrg libdir=$save_libdir 38059ef0b394Smrg ]) 38069ef0b394Smrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 38079ef0b394Smrg 38089ef0b394Smrg # This implies no fast_install, which is unacceptable. 38099ef0b394Smrg # Some rework will be needed to allow for fast_install 38109ef0b394Smrg # before this can be enabled. 38119ef0b394Smrg hardcode_into_libs=yes 38129ef0b394Smrg 38139ef0b394Smrg # Append ld.so.conf contents to the search path 38149ef0b394Smrg if test -f /etc/ld.so.conf; then 38159ef0b394Smrg 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' ' '` 38169ef0b394Smrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 38179ef0b394Smrg fi 38189ef0b394Smrg 38199ef0b394Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 38209ef0b394Smrg # powerpc, because MkLinux only supported shared libraries with the 38219ef0b394Smrg # GNU dynamic linker. Since this was broken with cross compilers, 38229ef0b394Smrg # most powerpc-linux boxes support dynamic linking these days and 38239ef0b394Smrg # people can always --disable-shared, the test was removed, and we 38249ef0b394Smrg # assume the GNU/Linux dynamic linker is in use. 38259ef0b394Smrg dynamic_linker='GNU/Linux ld.so' 38269ef0b394Smrg ;; 38279ef0b394Smrg 38289ef0b394Smrgnetbsd*) 38299ef0b394Smrg version_type=sunos 38309ef0b394Smrg need_lib_prefix=no 38319ef0b394Smrg need_version=no 38329ef0b394Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 38339ef0b394Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 38349ef0b394Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 38359ef0b394Smrg dynamic_linker='NetBSD (a.out) ld.so' 38369ef0b394Smrg else 38379ef0b394Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 38389ef0b394Smrg soname_spec='${libname}${release}${shared_ext}$major' 38399ef0b394Smrg dynamic_linker='NetBSD ld.elf_so' 38409ef0b394Smrg fi 38419ef0b394Smrg shlibpath_var=LD_LIBRARY_PATH 38429ef0b394Smrg shlibpath_overrides_runpath=yes 38439ef0b394Smrg hardcode_into_libs=yes 38449ef0b394Smrg ;; 38459ef0b394Smrg 38469ef0b394Smrgnewsos6) 3847fb5e8d76Smrg version_type=linux # correct to gnu/linux during the next big refactor 38489ef0b394Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 38499ef0b394Smrg shlibpath_var=LD_LIBRARY_PATH 38509ef0b394Smrg shlibpath_overrides_runpath=yes 38519ef0b394Smrg ;; 38529ef0b394Smrg 38539ef0b394Smrg*nto* | *qnx*) 38549ef0b394Smrg version_type=qnx 38559ef0b394Smrg need_lib_prefix=no 38569ef0b394Smrg need_version=no 38579ef0b394Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 38589ef0b394Smrg soname_spec='${libname}${release}${shared_ext}$major' 38599ef0b394Smrg shlibpath_var=LD_LIBRARY_PATH 38609ef0b394Smrg shlibpath_overrides_runpath=no 38619ef0b394Smrg hardcode_into_libs=yes 38629ef0b394Smrg dynamic_linker='ldqnx.so' 38639ef0b394Smrg ;; 38649ef0b394Smrg 38659ef0b394Smrgopenbsd*) 38669ef0b394Smrg version_type=sunos 38679ef0b394Smrg sys_lib_dlsearch_path_spec="/usr/lib" 38689ef0b394Smrg need_lib_prefix=no 38699ef0b394Smrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 38709ef0b394Smrg case $host_os in 38719ef0b394Smrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 38729ef0b394Smrg *) need_version=no ;; 38739ef0b394Smrg esac 38749ef0b394Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 38759ef0b394Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 38769ef0b394Smrg shlibpath_var=LD_LIBRARY_PATH 38779ef0b394Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 38789ef0b394Smrg case $host_os in 38799ef0b394Smrg openbsd2.[[89]] | openbsd2.[[89]].*) 38809ef0b394Smrg shlibpath_overrides_runpath=no 3881c5629e66Smrg ;; 3882c5629e66Smrg *) 38839ef0b394Smrg shlibpath_overrides_runpath=yes 3884698f425bSmrg ;; 38859ef0b394Smrg esac 38869ef0b394Smrg else 38879ef0b394Smrg shlibpath_overrides_runpath=yes 3888698f425bSmrg fi 38899ef0b394Smrg ;; 3890266e564dSmrg 38919ef0b394Smrgos2*) 38929ef0b394Smrg libname_spec='$name' 38939ef0b394Smrg shrext_cmds=".dll" 38949ef0b394Smrg need_lib_prefix=no 38959ef0b394Smrg library_names_spec='$libname${shared_ext} $libname.a' 38969ef0b394Smrg dynamic_linker='OS/2 ld.exe' 38979ef0b394Smrg shlibpath_var=LIBPATH 38989ef0b394Smrg ;; 3899266e564dSmrg 39009ef0b394Smrgosf3* | osf4* | osf5*) 39019ef0b394Smrg version_type=osf 39029ef0b394Smrg need_lib_prefix=no 39039ef0b394Smrg need_version=no 39049ef0b394Smrg soname_spec='${libname}${release}${shared_ext}$major' 39059ef0b394Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 39069ef0b394Smrg shlibpath_var=LD_LIBRARY_PATH 39079ef0b394Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 39089ef0b394Smrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 39099ef0b394Smrg ;; 39109ef0b394Smrg 39119ef0b394Smrgrdos*) 39129ef0b394Smrg dynamic_linker=no 39139ef0b394Smrg ;; 39149ef0b394Smrg 39159ef0b394Smrgsolaris*) 3916fb5e8d76Smrg version_type=linux # correct to gnu/linux during the next big refactor 39179ef0b394Smrg need_lib_prefix=no 39189ef0b394Smrg need_version=no 39199ef0b394Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 39209ef0b394Smrg soname_spec='${libname}${release}${shared_ext}$major' 39219ef0b394Smrg shlibpath_var=LD_LIBRARY_PATH 39229ef0b394Smrg shlibpath_overrides_runpath=yes 39239ef0b394Smrg hardcode_into_libs=yes 39249ef0b394Smrg # ldd complains unless libraries are executable 39259ef0b394Smrg postinstall_cmds='chmod +x $lib' 39269ef0b394Smrg ;; 39279ef0b394Smrg 39289ef0b394Smrgsunos4*) 39299ef0b394Smrg version_type=sunos 39309ef0b394Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 39319ef0b394Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 39329ef0b394Smrg shlibpath_var=LD_LIBRARY_PATH 39339ef0b394Smrg shlibpath_overrides_runpath=yes 39349ef0b394Smrg if test "$with_gnu_ld" = yes; then 39359ef0b394Smrg need_lib_prefix=no 39369ef0b394Smrg fi 39379ef0b394Smrg need_version=yes 39389ef0b394Smrg ;; 39399ef0b394Smrg 39409ef0b394Smrgsysv4 | sysv4.3*) 3941fb5e8d76Smrg version_type=linux # correct to gnu/linux during the next big refactor 39429ef0b394Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 39439ef0b394Smrg soname_spec='${libname}${release}${shared_ext}$major' 39449ef0b394Smrg shlibpath_var=LD_LIBRARY_PATH 39459ef0b394Smrg case $host_vendor in 39469ef0b394Smrg sni) 39479ef0b394Smrg shlibpath_overrides_runpath=no 39489ef0b394Smrg need_lib_prefix=no 39499ef0b394Smrg runpath_var=LD_RUN_PATH 39509ef0b394Smrg ;; 39519ef0b394Smrg siemens) 39529ef0b394Smrg need_lib_prefix=no 39539ef0b394Smrg ;; 39549ef0b394Smrg motorola) 39559ef0b394Smrg need_lib_prefix=no 39569ef0b394Smrg need_version=no 39579ef0b394Smrg shlibpath_overrides_runpath=no 39589ef0b394Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 3959698f425bSmrg ;; 39609ef0b394Smrg esac 39619ef0b394Smrg ;; 39629ef0b394Smrg 39639ef0b394Smrgsysv4*MP*) 39649ef0b394Smrg if test -d /usr/nec ;then 3965fb5e8d76Smrg version_type=linux # correct to gnu/linux during the next big refactor 39669ef0b394Smrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 39679ef0b394Smrg soname_spec='$libname${shared_ext}.$major' 39689ef0b394Smrg shlibpath_var=LD_LIBRARY_PATH 39699ef0b394Smrg fi 39709ef0b394Smrg ;; 39719ef0b394Smrg 39729ef0b394Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 39739ef0b394Smrg version_type=freebsd-elf 39749ef0b394Smrg need_lib_prefix=no 39759ef0b394Smrg need_version=no 39769ef0b394Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 39779ef0b394Smrg soname_spec='${libname}${release}${shared_ext}$major' 39789ef0b394Smrg shlibpath_var=LD_LIBRARY_PATH 39799ef0b394Smrg shlibpath_overrides_runpath=yes 39809ef0b394Smrg hardcode_into_libs=yes 39819ef0b394Smrg if test "$with_gnu_ld" = yes; then 39829ef0b394Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 39839ef0b394Smrg else 39849ef0b394Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 39859ef0b394Smrg case $host_os in 39869ef0b394Smrg sco3.2v5*) 39879ef0b394Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 39889ef0b394Smrg ;; 39899ef0b394Smrg esac 39909ef0b394Smrg fi 39919ef0b394Smrg sys_lib_dlsearch_path_spec='/usr/lib' 39929ef0b394Smrg ;; 39939ef0b394Smrg 39949ef0b394Smrgtpf*) 39959ef0b394Smrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 3996fb5e8d76Smrg version_type=linux # correct to gnu/linux during the next big refactor 39979ef0b394Smrg need_lib_prefix=no 39989ef0b394Smrg need_version=no 39999ef0b394Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 40009ef0b394Smrg shlibpath_var=LD_LIBRARY_PATH 40019ef0b394Smrg shlibpath_overrides_runpath=no 40029ef0b394Smrg hardcode_into_libs=yes 40039ef0b394Smrg ;; 4004266e564dSmrg 40059ef0b394Smrguts4*) 4006fb5e8d76Smrg version_type=linux # correct to gnu/linux during the next big refactor 40079ef0b394Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 40089ef0b394Smrg soname_spec='${libname}${release}${shared_ext}$major' 40099ef0b394Smrg shlibpath_var=LD_LIBRARY_PATH 40109ef0b394Smrg ;; 4011698f425bSmrg 40129ef0b394Smrg*) 40139ef0b394Smrg dynamic_linker=no 40149ef0b394Smrg ;; 40159ef0b394Smrgesac 40169ef0b394SmrgAC_MSG_RESULT([$dynamic_linker]) 40179ef0b394Smrgtest "$dynamic_linker" = no && can_build_shared=no 4018698f425bSmrg 40199ef0b394Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 40209ef0b394Smrgif test "$GCC" = yes; then 40219ef0b394Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 40229ef0b394Smrgfi 4023698f425bSmrg 40249ef0b394Smrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 40259ef0b394Smrg sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 40269ef0b394Smrgfi 40279ef0b394Smrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 40289ef0b394Smrg sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 40299ef0b394Smrgfi 4030698f425bSmrg 40319ef0b394Smrg_LT_DECL([], [variables_saved_for_relink], [1], 40329ef0b394Smrg [Variables whose values should be saved in libtool wrapper scripts and 40339ef0b394Smrg restored at link time]) 40349ef0b394Smrg_LT_DECL([], [need_lib_prefix], [0], 40359ef0b394Smrg [Do we need the "lib" prefix for modules?]) 40369ef0b394Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 40379ef0b394Smrg_LT_DECL([], [version_type], [0], [Library versioning type]) 40389ef0b394Smrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 40399ef0b394Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 40409ef0b394Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 40419ef0b394Smrg [Is shlibpath searched before the hard-coded library search path?]) 40429ef0b394Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 40439ef0b394Smrg_LT_DECL([], [library_names_spec], [1], 40449ef0b394Smrg [[List of archive names. First name is the real one, the rest are links. 40459ef0b394Smrg The last name is the one that the linker finds with -lNAME]]) 40469ef0b394Smrg_LT_DECL([], [soname_spec], [1], 40479ef0b394Smrg [[The coded name of the library, if different from the real name]]) 40489ef0b394Smrg_LT_DECL([], [install_override_mode], [1], 40499ef0b394Smrg [Permission mode override for installation of shared libraries]) 40509ef0b394Smrg_LT_DECL([], [postinstall_cmds], [2], 40519ef0b394Smrg [Command to use after installation of a shared archive]) 40529ef0b394Smrg_LT_DECL([], [postuninstall_cmds], [2], 40539ef0b394Smrg [Command to use after uninstallation of a shared archive]) 40549ef0b394Smrg_LT_DECL([], [finish_cmds], [2], 40559ef0b394Smrg [Commands used to finish a libtool library installation in a directory]) 40569ef0b394Smrg_LT_DECL([], [finish_eval], [1], 40579ef0b394Smrg [[As "finish_cmds", except a single script fragment to be evaled but 40589ef0b394Smrg not shown]]) 40599ef0b394Smrg_LT_DECL([], [hardcode_into_libs], [0], 40609ef0b394Smrg [Whether we should hardcode library paths into libraries]) 40619ef0b394Smrg_LT_DECL([], [sys_lib_search_path_spec], [2], 40629ef0b394Smrg [Compile-time system search path for libraries]) 40639ef0b394Smrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 40649ef0b394Smrg [Run-time system search path for libraries]) 40659ef0b394Smrg])# _LT_SYS_DYNAMIC_LINKER 4066698f425bSmrg 4067698f425bSmrg 40689ef0b394Smrg# _LT_PATH_TOOL_PREFIX(TOOL) 40699ef0b394Smrg# -------------------------- 40709ef0b394Smrg# find a file program which can recognize shared library 40719ef0b394SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 40729ef0b394Smrg[m4_require([_LT_DECL_EGREP])dnl 40739ef0b394SmrgAC_MSG_CHECKING([for $1]) 40749ef0b394SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 40759ef0b394Smrg[case $MAGIC_CMD in 40769ef0b394Smrg[[\\/*] | ?:[\\/]*]) 40779ef0b394Smrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 40789ef0b394Smrg ;; 40799ef0b394Smrg*) 40809ef0b394Smrg lt_save_MAGIC_CMD="$MAGIC_CMD" 40819ef0b394Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 40829ef0b394Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 40839ef0b394Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 40849ef0b394Smrgdnl not every word. This closes a longstanding sh security hole. 40859ef0b394Smrg ac_dummy="m4_if([$2], , $PATH, [$2])" 40869ef0b394Smrg for ac_dir in $ac_dummy; do 40879ef0b394Smrg IFS="$lt_save_ifs" 40889ef0b394Smrg test -z "$ac_dir" && ac_dir=. 40899ef0b394Smrg if test -f $ac_dir/$1; then 40909ef0b394Smrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 40919ef0b394Smrg if test -n "$file_magic_test_file"; then 40929ef0b394Smrg case $deplibs_check_method in 40939ef0b394Smrg "file_magic "*) 40949ef0b394Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 40959ef0b394Smrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 40969ef0b394Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 40979ef0b394Smrg $EGREP "$file_magic_regex" > /dev/null; then 40989ef0b394Smrg : 40999ef0b394Smrg else 41009ef0b394Smrg cat <<_LT_EOF 1>&2 4101698f425bSmrg 41029ef0b394Smrg*** Warning: the command libtool uses to detect shared libraries, 41039ef0b394Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 41049ef0b394Smrg*** The result is that libtool may fail to recognize shared libraries 41059ef0b394Smrg*** as such. This will affect the creation of libtool libraries that 41069ef0b394Smrg*** depend on shared libraries, but programs linked with such libtool 41079ef0b394Smrg*** libraries will work regardless of this problem. Nevertheless, you 41089ef0b394Smrg*** may want to report the problem to your system manager and/or to 41099ef0b394Smrg*** bug-libtool@gnu.org 41109ef0b394Smrg 41119ef0b394Smrg_LT_EOF 41129ef0b394Smrg fi ;; 41139ef0b394Smrg esac 4114698f425bSmrg fi 41159ef0b394Smrg break 41169ef0b394Smrg fi 41179ef0b394Smrg done 41189ef0b394Smrg IFS="$lt_save_ifs" 41199ef0b394Smrg MAGIC_CMD="$lt_save_MAGIC_CMD" 41209ef0b394Smrg ;; 41219ef0b394Smrgesac]) 41229ef0b394SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 41239ef0b394Smrgif test -n "$MAGIC_CMD"; then 41249ef0b394Smrg AC_MSG_RESULT($MAGIC_CMD) 41259ef0b394Smrgelse 41269ef0b394Smrg AC_MSG_RESULT(no) 41279ef0b394Smrgfi 41289ef0b394Smrg_LT_DECL([], [MAGIC_CMD], [0], 41299ef0b394Smrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 41309ef0b394Smrg])# _LT_PATH_TOOL_PREFIX 4131698f425bSmrg 41329ef0b394Smrg# Old name: 41339ef0b394SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 41349ef0b394Smrgdnl aclocal-1.4 backwards compatibility: 41359ef0b394Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 41369ef0b394Smrg 41379ef0b394Smrg 41389ef0b394Smrg# _LT_PATH_MAGIC 41399ef0b394Smrg# -------------- 41409ef0b394Smrg# find a file program which can recognize a shared library 41419ef0b394Smrgm4_defun([_LT_PATH_MAGIC], 41429ef0b394Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 41439ef0b394Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 41449ef0b394Smrg if test -n "$ac_tool_prefix"; then 41459ef0b394Smrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 4146698f425bSmrg else 41479ef0b394Smrg MAGIC_CMD=: 41489ef0b394Smrg fi 41499ef0b394Smrgfi 41509ef0b394Smrg])# _LT_PATH_MAGIC 4151698f425bSmrg 4152698f425bSmrg 41539ef0b394Smrg# LT_PATH_LD 41549ef0b394Smrg# ---------- 41559ef0b394Smrg# find the pathname to the GNU or non-GNU linker 41569ef0b394SmrgAC_DEFUN([LT_PATH_LD], 41579ef0b394Smrg[AC_REQUIRE([AC_PROG_CC])dnl 41589ef0b394SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 41599ef0b394SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 41609ef0b394Smrgm4_require([_LT_DECL_SED])dnl 41619ef0b394Smrgm4_require([_LT_DECL_EGREP])dnl 41629ef0b394Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 41639ef0b394Smrg 41649ef0b394SmrgAC_ARG_WITH([gnu-ld], 41659ef0b394Smrg [AS_HELP_STRING([--with-gnu-ld], 41669ef0b394Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 41679ef0b394Smrg [test "$withval" = no || with_gnu_ld=yes], 41689ef0b394Smrg [with_gnu_ld=no])dnl 41699ef0b394Smrg 41709ef0b394Smrgac_prog=ld 41719ef0b394Smrgif test "$GCC" = yes; then 41729ef0b394Smrg # Check if gcc -print-prog-name=ld gives a path. 41739ef0b394Smrg AC_MSG_CHECKING([for ld used by $CC]) 41749ef0b394Smrg case $host in 41759ef0b394Smrg *-*-mingw*) 41769ef0b394Smrg # gcc leaves a trailing carriage return which upsets mingw 41779ef0b394Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 41789ef0b394Smrg *) 41799ef0b394Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 41809ef0b394Smrg esac 41819ef0b394Smrg case $ac_prog in 41829ef0b394Smrg # Accept absolute paths. 41839ef0b394Smrg [[\\/]]* | ?:[[\\/]]*) 41849ef0b394Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 41859ef0b394Smrg # Canonicalize the pathname of ld 41869ef0b394Smrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 41879ef0b394Smrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 41889ef0b394Smrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 41899ef0b394Smrg done 41909ef0b394Smrg test -z "$LD" && LD="$ac_prog" 41919ef0b394Smrg ;; 41929ef0b394Smrg "") 41939ef0b394Smrg # If it fails, then pretend we aren't using GCC. 41949ef0b394Smrg ac_prog=ld 41959ef0b394Smrg ;; 41969ef0b394Smrg *) 41979ef0b394Smrg # If it is relative, then search for the first ld in PATH. 41989ef0b394Smrg with_gnu_ld=unknown 41999ef0b394Smrg ;; 42009ef0b394Smrg esac 42019ef0b394Smrgelif test "$with_gnu_ld" = yes; then 42029ef0b394Smrg AC_MSG_CHECKING([for GNU ld]) 42039ef0b394Smrgelse 42049ef0b394Smrg AC_MSG_CHECKING([for non-GNU ld]) 42059ef0b394Smrgfi 42069ef0b394SmrgAC_CACHE_VAL(lt_cv_path_LD, 42079ef0b394Smrg[if test -z "$LD"; then 42089ef0b394Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 42099ef0b394Smrg for ac_dir in $PATH; do 42109ef0b394Smrg IFS="$lt_save_ifs" 42119ef0b394Smrg test -z "$ac_dir" && ac_dir=. 42129ef0b394Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 42139ef0b394Smrg lt_cv_path_LD="$ac_dir/$ac_prog" 42149ef0b394Smrg # Check to see if the program is GNU ld. I'd rather use --version, 42159ef0b394Smrg # but apparently some variants of GNU ld only accept -v. 42169ef0b394Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 42179ef0b394Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 42189ef0b394Smrg *GNU* | *'with BFD'*) 42199ef0b394Smrg test "$with_gnu_ld" != no && break 4220c5629e66Smrg ;; 4221c5629e66Smrg *) 42229ef0b394Smrg test "$with_gnu_ld" != yes && break 4223c5629e66Smrg ;; 4224698f425bSmrg esac 42259ef0b394Smrg fi 42269ef0b394Smrg done 42279ef0b394Smrg IFS="$lt_save_ifs" 42289ef0b394Smrgelse 42299ef0b394Smrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 42309ef0b394Smrgfi]) 42319ef0b394SmrgLD="$lt_cv_path_LD" 42329ef0b394Smrgif test -n "$LD"; then 42339ef0b394Smrg AC_MSG_RESULT($LD) 42349ef0b394Smrgelse 42359ef0b394Smrg AC_MSG_RESULT(no) 42369ef0b394Smrgfi 42379ef0b394Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 42389ef0b394Smrg_LT_PATH_LD_GNU 42399ef0b394SmrgAC_SUBST([LD]) 4240698f425bSmrg 42419ef0b394Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 42429ef0b394Smrg])# LT_PATH_LD 4243698f425bSmrg 42449ef0b394Smrg# Old names: 42459ef0b394SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 42469ef0b394SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 42479ef0b394Smrgdnl aclocal-1.4 backwards compatibility: 42489ef0b394Smrgdnl AC_DEFUN([AM_PROG_LD], []) 42499ef0b394Smrgdnl AC_DEFUN([AC_PROG_LD], []) 4250266e564dSmrg 4251266e564dSmrg 42529ef0b394Smrg# _LT_PATH_LD_GNU 42539ef0b394Smrg#- -------------- 42549ef0b394Smrgm4_defun([_LT_PATH_LD_GNU], 42559ef0b394Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 42569ef0b394Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 42579ef0b394Smrgcase `$LD -v 2>&1 </dev/null` in 42589ef0b394Smrg*GNU* | *'with BFD'*) 42599ef0b394Smrg lt_cv_prog_gnu_ld=yes 42609ef0b394Smrg ;; 42619ef0b394Smrg*) 42629ef0b394Smrg lt_cv_prog_gnu_ld=no 42639ef0b394Smrg ;; 42649ef0b394Smrgesac]) 42659ef0b394Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 42669ef0b394Smrg])# _LT_PATH_LD_GNU 4267266e564dSmrg 4268c5629e66Smrg 42699ef0b394Smrg# _LT_CMD_RELOAD 42709ef0b394Smrg# -------------- 42719ef0b394Smrg# find reload flag for linker 42729ef0b394Smrg# -- PORTME Some linkers may need a different reload flag. 42739ef0b394Smrgm4_defun([_LT_CMD_RELOAD], 42749ef0b394Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 42759ef0b394Smrg lt_cv_ld_reload_flag, 42769ef0b394Smrg [lt_cv_ld_reload_flag='-r']) 42779ef0b394Smrgreload_flag=$lt_cv_ld_reload_flag 42789ef0b394Smrgcase $reload_flag in 42799ef0b394Smrg"" | " "*) ;; 42809ef0b394Smrg*) reload_flag=" $reload_flag" ;; 42819ef0b394Smrgesac 42829ef0b394Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 42839ef0b394Smrgcase $host_os in 42849ef0b394Smrg cygwin* | mingw* | pw32* | cegcc*) 42859ef0b394Smrg if test "$GCC" != yes; then 42869ef0b394Smrg reload_cmds=false 42879ef0b394Smrg fi 42889ef0b394Smrg ;; 42899ef0b394Smrg darwin*) 42909ef0b394Smrg if test "$GCC" = yes; then 42919ef0b394Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 42929ef0b394Smrg else 42939ef0b394Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 42949ef0b394Smrg fi 42959ef0b394Smrg ;; 42969ef0b394Smrgesac 42979ef0b394Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 42989ef0b394Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl 42999ef0b394Smrg])# _LT_CMD_RELOAD 4300c5629e66Smrg 4301c5629e66Smrg 43029ef0b394Smrg# _LT_CHECK_MAGIC_METHOD 43039ef0b394Smrg# ---------------------- 43049ef0b394Smrg# how to check for library dependencies 43059ef0b394Smrg# -- PORTME fill in with the dynamic library characteristics 43069ef0b394Smrgm4_defun([_LT_CHECK_MAGIC_METHOD], 43079ef0b394Smrg[m4_require([_LT_DECL_EGREP]) 43089ef0b394Smrgm4_require([_LT_DECL_OBJDUMP]) 43099ef0b394SmrgAC_CACHE_CHECK([how to recognize dependent libraries], 43109ef0b394Smrglt_cv_deplibs_check_method, 43119ef0b394Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 43129ef0b394Smrglt_cv_file_magic_test_file= 43139ef0b394Smrglt_cv_deplibs_check_method='unknown' 43149ef0b394Smrg# Need to set the preceding variable on all platforms that support 43159ef0b394Smrg# interlibrary dependencies. 43169ef0b394Smrg# 'none' -- dependencies not supported. 43179ef0b394Smrg# `unknown' -- same as none, but documents that we really don't know. 43189ef0b394Smrg# 'pass_all' -- all dependencies passed with no checks. 43199ef0b394Smrg# 'test_compile' -- check by making test program. 43209ef0b394Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 43219ef0b394Smrg# which responds to the $file_magic_cmd with a given extended regex. 43229ef0b394Smrg# If you have `file' or equivalent on your system and you're not sure 43239ef0b394Smrg# whether `pass_all' will *always* work, you probably want this one. 4324c5629e66Smrg 43259ef0b394Smrgcase $host_os in 43269ef0b394Smrgaix[[4-9]]*) 43279ef0b394Smrg lt_cv_deplibs_check_method=pass_all 43289ef0b394Smrg ;; 4329c5629e66Smrg 43309ef0b394Smrgbeos*) 43319ef0b394Smrg lt_cv_deplibs_check_method=pass_all 43329ef0b394Smrg ;; 4333c5629e66Smrg 43349ef0b394Smrgbsdi[[45]]*) 43359ef0b394Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 43369ef0b394Smrg lt_cv_file_magic_cmd='/usr/bin/file -L' 43379ef0b394Smrg lt_cv_file_magic_test_file=/shlib/libc.so 43389ef0b394Smrg ;; 4339c5629e66Smrg 43409ef0b394Smrgcygwin*) 43419ef0b394Smrg # func_win32_libid is a shell function defined in ltmain.sh 43429ef0b394Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 43439ef0b394Smrg lt_cv_file_magic_cmd='func_win32_libid' 43449ef0b394Smrg ;; 43459ef0b394Smrg 43469ef0b394Smrgmingw* | pw32*) 43479ef0b394Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 43489ef0b394Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 43499ef0b394Smrg # unless we find 'file', for example because we are cross-compiling. 43509ef0b394Smrg # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 43519ef0b394Smrg if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 43529ef0b394Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 43539ef0b394Smrg lt_cv_file_magic_cmd='func_win32_libid' 43549ef0b394Smrg else 43559ef0b394Smrg # Keep this pattern in sync with the one in func_win32_libid. 43569ef0b394Smrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 43579ef0b394Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 43589ef0b394Smrg fi 43599ef0b394Smrg ;; 4360c5629e66Smrg 43619ef0b394Smrgcegcc*) 43629ef0b394Smrg # use the weaker test based on 'objdump'. See mingw*. 43639ef0b394Smrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 43649ef0b394Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 43659ef0b394Smrg ;; 4366c5629e66Smrg 43679ef0b394Smrgdarwin* | rhapsody*) 43689ef0b394Smrg lt_cv_deplibs_check_method=pass_all 43699ef0b394Smrg ;; 43709ef0b394Smrg 43719ef0b394Smrgfreebsd* | dragonfly*) 43729ef0b394Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 43739ef0b394Smrg case $host_cpu in 43749ef0b394Smrg i*86 ) 43759ef0b394Smrg # Not sure whether the presence of OpenBSD here was a mistake. 43769ef0b394Smrg # Let's accept both of them until this is cleared up. 43779ef0b394Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 43789ef0b394Smrg lt_cv_file_magic_cmd=/usr/bin/file 43799ef0b394Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 4380698f425bSmrg ;; 4381c5629e66Smrg esac 43829ef0b394Smrg else 43839ef0b394Smrg lt_cv_deplibs_check_method=pass_all 4384698f425bSmrg fi 43859ef0b394Smrg ;; 43869ef0b394Smrg 43879ef0b394Smrggnu*) 43889ef0b394Smrg lt_cv_deplibs_check_method=pass_all 43899ef0b394Smrg ;; 43909ef0b394Smrg 43919ef0b394Smrghaiku*) 43929ef0b394Smrg lt_cv_deplibs_check_method=pass_all 43939ef0b394Smrg ;; 43949ef0b394Smrg 43959ef0b394Smrghpux10.20* | hpux11*) 43969ef0b394Smrg lt_cv_file_magic_cmd=/usr/bin/file 43979ef0b394Smrg case $host_cpu in 43989ef0b394Smrg ia64*) 43999ef0b394Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 44009ef0b394Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 44019ef0b394Smrg ;; 44029ef0b394Smrg hppa*64*) 44039ef0b394Smrg [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]'] 44049ef0b394Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 4405698f425bSmrg ;; 4406698f425bSmrg *) 44079ef0b394Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 44089ef0b394Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 4409698f425bSmrg ;; 44109ef0b394Smrg esac 44119ef0b394Smrg ;; 4412c5629e66Smrg 44139ef0b394Smrginterix[[3-9]]*) 44149ef0b394Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 44159ef0b394Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 44169ef0b394Smrg ;; 4417c5629e66Smrg 44189ef0b394Smrgirix5* | irix6* | nonstopux*) 44199ef0b394Smrg case $LD in 44209ef0b394Smrg *-32|*"-32 ") libmagic=32-bit;; 44219ef0b394Smrg *-n32|*"-n32 ") libmagic=N32;; 44229ef0b394Smrg *-64|*"-64 ") libmagic=64-bit;; 44239ef0b394Smrg *) libmagic=never-match;; 44249ef0b394Smrg esac 44259ef0b394Smrg lt_cv_deplibs_check_method=pass_all 4426c5629e66Smrg ;; 44279ef0b394Smrg 4428fb5e8d76Smrg# This must be glibc/ELF. 44299ef0b394Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 44309ef0b394Smrg lt_cv_deplibs_check_method=pass_all 4431698f425bSmrg ;; 44329ef0b394Smrg 44339ef0b394Smrgnetbsd*) 44349ef0b394Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 44359ef0b394Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 44369ef0b394Smrg else 44379ef0b394Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 44389ef0b394Smrg fi 4439698f425bSmrg ;; 4440c5629e66Smrg 44419ef0b394Smrgnewos6*) 44429ef0b394Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 44439ef0b394Smrg lt_cv_file_magic_cmd=/usr/bin/file 44449ef0b394Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 44459ef0b394Smrg ;; 4446c5629e66Smrg 44479ef0b394Smrg*nto* | *qnx*) 44489ef0b394Smrg lt_cv_deplibs_check_method=pass_all 44499ef0b394Smrg ;; 4450266e564dSmrg 44519ef0b394Smrgopenbsd*) 44529ef0b394Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 44539ef0b394Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 44549ef0b394Smrg else 44559ef0b394Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 44569ef0b394Smrg fi 44579ef0b394Smrg ;; 4458266e564dSmrg 44599ef0b394Smrgosf3* | osf4* | osf5*) 44609ef0b394Smrg lt_cv_deplibs_check_method=pass_all 44619ef0b394Smrg ;; 4462266e564dSmrg 44639ef0b394Smrgrdos*) 44649ef0b394Smrg lt_cv_deplibs_check_method=pass_all 44659ef0b394Smrg ;; 4466266e564dSmrg 44679ef0b394Smrgsolaris*) 44689ef0b394Smrg lt_cv_deplibs_check_method=pass_all 44699ef0b394Smrg ;; 4470266e564dSmrg 44719ef0b394Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 44729ef0b394Smrg lt_cv_deplibs_check_method=pass_all 44739ef0b394Smrg ;; 4474266e564dSmrg 44759ef0b394Smrgsysv4 | sysv4.3*) 44769ef0b394Smrg case $host_vendor in 44779ef0b394Smrg motorola) 44789ef0b394Smrg 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]]' 44799ef0b394Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 44809ef0b394Smrg ;; 44819ef0b394Smrg ncr) 44829ef0b394Smrg lt_cv_deplibs_check_method=pass_all 44839ef0b394Smrg ;; 44849ef0b394Smrg sequent) 44859ef0b394Smrg lt_cv_file_magic_cmd='/bin/file' 44869ef0b394Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 44879ef0b394Smrg ;; 44889ef0b394Smrg sni) 44899ef0b394Smrg lt_cv_file_magic_cmd='/bin/file' 44909ef0b394Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 44919ef0b394Smrg lt_cv_file_magic_test_file=/lib/libc.so 44929ef0b394Smrg ;; 44939ef0b394Smrg siemens) 44949ef0b394Smrg lt_cv_deplibs_check_method=pass_all 44959ef0b394Smrg ;; 44969ef0b394Smrg pc) 44979ef0b394Smrg lt_cv_deplibs_check_method=pass_all 44989ef0b394Smrg ;; 44999ef0b394Smrg esac 45009ef0b394Smrg ;; 4501266e564dSmrg 45029ef0b394Smrgtpf*) 45039ef0b394Smrg lt_cv_deplibs_check_method=pass_all 45049ef0b394Smrg ;; 45059ef0b394Smrgesac 45069ef0b394Smrg]) 4507698f425bSmrg 45089ef0b394Smrgfile_magic_glob= 45099ef0b394Smrgwant_nocaseglob=no 45109ef0b394Smrgif test "$build" = "$host"; then 45119ef0b394Smrg case $host_os in 45129ef0b394Smrg mingw* | pw32*) 45139ef0b394Smrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 45149ef0b394Smrg want_nocaseglob=yes 45159ef0b394Smrg else 45169ef0b394Smrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 45179ef0b394Smrg fi 45189ef0b394Smrg ;; 45199ef0b394Smrg esac 45209ef0b394Smrgfi 4521266e564dSmrg 45229ef0b394Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 45239ef0b394Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 45249ef0b394Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 4525266e564dSmrg 45269ef0b394Smrg_LT_DECL([], [deplibs_check_method], [1], 45279ef0b394Smrg [Method to check whether dependent libraries are shared objects]) 45289ef0b394Smrg_LT_DECL([], [file_magic_cmd], [1], 45299ef0b394Smrg [Command to use when deplibs_check_method = "file_magic"]) 45309ef0b394Smrg_LT_DECL([], [file_magic_glob], [1], 45319ef0b394Smrg [How to find potential files when deplibs_check_method = "file_magic"]) 45329ef0b394Smrg_LT_DECL([], [want_nocaseglob], [1], 45339ef0b394Smrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 45349ef0b394Smrg])# _LT_CHECK_MAGIC_METHOD 4535266e564dSmrg 4536266e564dSmrg 45379ef0b394Smrg# LT_PATH_NM 45389ef0b394Smrg# ---------- 45399ef0b394Smrg# find the pathname to a BSD- or MS-compatible name lister 45409ef0b394SmrgAC_DEFUN([LT_PATH_NM], 45419ef0b394Smrg[AC_REQUIRE([AC_PROG_CC])dnl 45429ef0b394SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 45439ef0b394Smrg[if test -n "$NM"; then 45449ef0b394Smrg # Let the user override the test. 45459ef0b394Smrg lt_cv_path_NM="$NM" 45469ef0b394Smrgelse 45479ef0b394Smrg lt_nm_to_check="${ac_tool_prefix}nm" 45489ef0b394Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 45499ef0b394Smrg lt_nm_to_check="$lt_nm_to_check nm" 45509ef0b394Smrg fi 45519ef0b394Smrg for lt_tmp_nm in $lt_nm_to_check; do 45529ef0b394Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 45539ef0b394Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 45549ef0b394Smrg IFS="$lt_save_ifs" 45559ef0b394Smrg test -z "$ac_dir" && ac_dir=. 45569ef0b394Smrg tmp_nm="$ac_dir/$lt_tmp_nm" 45579ef0b394Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 45589ef0b394Smrg # Check to see if the nm accepts a BSD-compat flag. 45599ef0b394Smrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 45609ef0b394Smrg # nm: unknown option "B" ignored 45619ef0b394Smrg # Tru64's nm complains that /dev/null is an invalid object file 45629ef0b394Smrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 45639ef0b394Smrg */dev/null* | *'Invalid file or object type'*) 45649ef0b394Smrg lt_cv_path_NM="$tmp_nm -B" 45659ef0b394Smrg break 45669ef0b394Smrg ;; 45679ef0b394Smrg *) 45689ef0b394Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 45699ef0b394Smrg */dev/null*) 45709ef0b394Smrg lt_cv_path_NM="$tmp_nm -p" 45719ef0b394Smrg break 45729ef0b394Smrg ;; 45739ef0b394Smrg *) 45749ef0b394Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 45759ef0b394Smrg continue # so that we can try to find one that supports BSD flags 45769ef0b394Smrg ;; 45779ef0b394Smrg esac 4578698f425bSmrg ;; 4579698f425bSmrg esac 4580698f425bSmrg fi 45819ef0b394Smrg done 45829ef0b394Smrg IFS="$lt_save_ifs" 45839ef0b394Smrg done 45849ef0b394Smrg : ${lt_cv_path_NM=no} 45859ef0b394Smrgfi]) 45869ef0b394Smrgif test "$lt_cv_path_NM" != "no"; then 45879ef0b394Smrg NM="$lt_cv_path_NM" 45889ef0b394Smrgelse 45899ef0b394Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 45909ef0b394Smrg if test -n "$DUMPBIN"; then : 45919ef0b394Smrg # Let the user override the test. 45929ef0b394Smrg else 45939ef0b394Smrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 45949ef0b394Smrg case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 45959ef0b394Smrg *COFF*) 45969ef0b394Smrg DUMPBIN="$DUMPBIN -symbols" 4597698f425bSmrg ;; 45989ef0b394Smrg *) 45999ef0b394Smrg DUMPBIN=: 4600698f425bSmrg ;; 46019ef0b394Smrg esac 46029ef0b394Smrg fi 46039ef0b394Smrg AC_SUBST([DUMPBIN]) 46049ef0b394Smrg if test "$DUMPBIN" != ":"; then 46059ef0b394Smrg NM="$DUMPBIN" 46069ef0b394Smrg fi 46079ef0b394Smrgfi 46089ef0b394Smrgtest -z "$NM" && NM=nm 46099ef0b394SmrgAC_SUBST([NM]) 46109ef0b394Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 4611266e564dSmrg 46129ef0b394SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 46139ef0b394Smrg [lt_cv_nm_interface="BSD nm" 46149ef0b394Smrg echo "int some_variable = 0;" > conftest.$ac_ext 46159ef0b394Smrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 46169ef0b394Smrg (eval "$ac_compile" 2>conftest.err) 46179ef0b394Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 46189ef0b394Smrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 46199ef0b394Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 46209ef0b394Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 46219ef0b394Smrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 46229ef0b394Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 46239ef0b394Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 46249ef0b394Smrg lt_cv_nm_interface="MS dumpbin" 46259ef0b394Smrg fi 46269ef0b394Smrg rm -f conftest*]) 46279ef0b394Smrg])# LT_PATH_NM 4628266e564dSmrg 46299ef0b394Smrg# Old names: 46309ef0b394SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 46319ef0b394SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 46329ef0b394Smrgdnl aclocal-1.4 backwards compatibility: 46339ef0b394Smrgdnl AC_DEFUN([AM_PROG_NM], []) 46349ef0b394Smrgdnl AC_DEFUN([AC_PROG_NM], []) 4635266e564dSmrg 46369ef0b394Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 46379ef0b394Smrg# -------------------------------- 46389ef0b394Smrg# how to determine the name of the shared library 46399ef0b394Smrg# associated with a specific link library. 46409ef0b394Smrg# -- PORTME fill in with the dynamic library characteristics 46419ef0b394Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 46429ef0b394Smrg[m4_require([_LT_DECL_EGREP]) 46439ef0b394Smrgm4_require([_LT_DECL_OBJDUMP]) 46449ef0b394Smrgm4_require([_LT_DECL_DLLTOOL]) 46459ef0b394SmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 46469ef0b394Smrglt_cv_sharedlib_from_linklib_cmd, 46479ef0b394Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 4648266e564dSmrg 46499ef0b394Smrgcase $host_os in 46509ef0b394Smrgcygwin* | mingw* | pw32* | cegcc*) 46519ef0b394Smrg # two different shell functions defined in ltmain.sh 46529ef0b394Smrg # decide which to use based on capabilities of $DLLTOOL 46539ef0b394Smrg case `$DLLTOOL --help 2>&1` in 46549ef0b394Smrg *--identify-strict*) 46559ef0b394Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 46569ef0b394Smrg ;; 46579ef0b394Smrg *) 46589ef0b394Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 46599ef0b394Smrg ;; 46609ef0b394Smrg esac 46619ef0b394Smrg ;; 46629ef0b394Smrg*) 46639ef0b394Smrg # fallback: assume linklib IS sharedlib 46649ef0b394Smrg lt_cv_sharedlib_from_linklib_cmd="$ECHO" 46659ef0b394Smrg ;; 46669ef0b394Smrgesac 46679ef0b394Smrg]) 46689ef0b394Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 46699ef0b394Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 4670266e564dSmrg 46719ef0b394Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 46729ef0b394Smrg [Command to associate shared and link libraries]) 46739ef0b394Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 4674266e564dSmrg 4675266e564dSmrg 46769ef0b394Smrg# _LT_PATH_MANIFEST_TOOL 46779ef0b394Smrg# ---------------------- 46789ef0b394Smrg# locate the manifest tool 46799ef0b394Smrgm4_defun([_LT_PATH_MANIFEST_TOOL], 46809ef0b394Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 46819ef0b394Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 46829ef0b394SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 46839ef0b394Smrg [lt_cv_path_mainfest_tool=no 46849ef0b394Smrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 46859ef0b394Smrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 46869ef0b394Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 46879ef0b394Smrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 46889ef0b394Smrg lt_cv_path_mainfest_tool=yes 46899ef0b394Smrg fi 46909ef0b394Smrg rm -f conftest*]) 46919ef0b394Smrgif test "x$lt_cv_path_mainfest_tool" != xyes; then 46929ef0b394Smrg MANIFEST_TOOL=: 46939ef0b394Smrgfi 46949ef0b394Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 46959ef0b394Smrg])# _LT_PATH_MANIFEST_TOOL 4696266e564dSmrg 4697266e564dSmrg 46989ef0b394Smrg# LT_LIB_M 46999ef0b394Smrg# -------- 47009ef0b394Smrg# check for math library 47019ef0b394SmrgAC_DEFUN([LT_LIB_M], 47029ef0b394Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 47039ef0b394SmrgLIBM= 47049ef0b394Smrgcase $host in 47059ef0b394Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 47069ef0b394Smrg # These system don't have libm, or don't need it 47079ef0b394Smrg ;; 47089ef0b394Smrg*-ncr-sysv4.3*) 47099ef0b394Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 47109ef0b394Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 47119ef0b394Smrg ;; 47129ef0b394Smrg*) 47139ef0b394Smrg AC_CHECK_LIB(m, cos, LIBM="-lm") 47149ef0b394Smrg ;; 47159ef0b394Smrgesac 47169ef0b394SmrgAC_SUBST([LIBM]) 47179ef0b394Smrg])# LT_LIB_M 4718266e564dSmrg 47199ef0b394Smrg# Old name: 47209ef0b394SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 47219ef0b394Smrgdnl aclocal-1.4 backwards compatibility: 47229ef0b394Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 4723698f425bSmrg 4724266e564dSmrg 47259ef0b394Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 47269ef0b394Smrg# ------------------------------- 47279ef0b394Smrgm4_defun([_LT_COMPILER_NO_RTTI], 47289ef0b394Smrg[m4_require([_LT_TAG_COMPILER])dnl 4729266e564dSmrg 47309ef0b394Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 4731266e564dSmrg 47329ef0b394Smrgif test "$GCC" = yes; then 47339ef0b394Smrg case $cc_basename in 47349ef0b394Smrg nvcc*) 47359ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 47369ef0b394Smrg *) 47379ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 47389ef0b394Smrg esac 4739266e564dSmrg 47409ef0b394Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 47419ef0b394Smrg lt_cv_prog_compiler_rtti_exceptions, 47429ef0b394Smrg [-fno-rtti -fno-exceptions], [], 47439ef0b394Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 47449ef0b394Smrgfi 47459ef0b394Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 47469ef0b394Smrg [Compiler flag to turn off builtin functions]) 47479ef0b394Smrg])# _LT_COMPILER_NO_RTTI 4748266e564dSmrg 4749266e564dSmrg 47509ef0b394Smrg# _LT_CMD_GLOBAL_SYMBOLS 47519ef0b394Smrg# ---------------------- 47529ef0b394Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 47539ef0b394Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 47549ef0b394SmrgAC_REQUIRE([AC_PROG_CC])dnl 47559ef0b394SmrgAC_REQUIRE([AC_PROG_AWK])dnl 47569ef0b394SmrgAC_REQUIRE([LT_PATH_NM])dnl 47579ef0b394SmrgAC_REQUIRE([LT_PATH_LD])dnl 47589ef0b394Smrgm4_require([_LT_DECL_SED])dnl 47599ef0b394Smrgm4_require([_LT_DECL_EGREP])dnl 47609ef0b394Smrgm4_require([_LT_TAG_COMPILER])dnl 4761c5629e66Smrg 47629ef0b394Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 47639ef0b394SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 47649ef0b394SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 47659ef0b394Smrg[ 47669ef0b394Smrg# These are sane defaults that work on at least a few old systems. 47679ef0b394Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 4768c5629e66Smrg 47699ef0b394Smrg# Character class describing NM global symbol codes. 47709ef0b394Smrgsymcode='[[BCDEGRST]]' 4771c5629e66Smrg 47729ef0b394Smrg# Regexp to match symbols that can be accessed directly from C. 47739ef0b394Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 4774c5629e66Smrg 47759ef0b394Smrg# Define system-specific variables. 47769ef0b394Smrgcase $host_os in 47779ef0b394Smrgaix*) 47789ef0b394Smrg symcode='[[BCDT]]' 47799ef0b394Smrg ;; 47809ef0b394Smrgcygwin* | mingw* | pw32* | cegcc*) 47819ef0b394Smrg symcode='[[ABCDGISTW]]' 47829ef0b394Smrg ;; 47839ef0b394Smrghpux*) 47849ef0b394Smrg if test "$host_cpu" = ia64; then 47859ef0b394Smrg symcode='[[ABCDEGRST]]' 47869ef0b394Smrg fi 47879ef0b394Smrg ;; 47889ef0b394Smrgirix* | nonstopux*) 47899ef0b394Smrg symcode='[[BCDEGRST]]' 47909ef0b394Smrg ;; 47919ef0b394Smrgosf*) 47929ef0b394Smrg symcode='[[BCDEGQRST]]' 47939ef0b394Smrg ;; 47949ef0b394Smrgsolaris*) 47959ef0b394Smrg symcode='[[BDRT]]' 47969ef0b394Smrg ;; 47979ef0b394Smrgsco3.2v5*) 47989ef0b394Smrg symcode='[[DT]]' 47999ef0b394Smrg ;; 48009ef0b394Smrgsysv4.2uw2*) 48019ef0b394Smrg symcode='[[DT]]' 48029ef0b394Smrg ;; 48039ef0b394Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 48049ef0b394Smrg symcode='[[ABDT]]' 48059ef0b394Smrg ;; 48069ef0b394Smrgsysv4) 48079ef0b394Smrg symcode='[[DFNSTU]]' 48089ef0b394Smrg ;; 48099ef0b394Smrgesac 4810c5629e66Smrg 48119ef0b394Smrg# If we're using GNU nm, then use its standard symbol codes. 48129ef0b394Smrgcase `$NM -V 2>&1` in 48139ef0b394Smrg*GNU* | *'with BFD'*) 48149ef0b394Smrg symcode='[[ABCDGIRSTW]]' ;; 48159ef0b394Smrgesac 4816c5629e66Smrg 48179ef0b394Smrg# Transform an extracted symbol line into a proper C declaration. 48189ef0b394Smrg# Some systems (esp. on ia64) link data and code symbols differently, 48199ef0b394Smrg# so use this general approach. 48209ef0b394Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 4821c5629e66Smrg 48229ef0b394Smrg# Transform an extracted symbol line into symbol name and symbol address 48239ef0b394Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 48249ef0b394Smrglt_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'" 4825c5629e66Smrg 48269ef0b394Smrg# Handle CRLF in mingw tool chain 48279ef0b394Smrgopt_cr= 48289ef0b394Smrgcase $build_os in 48299ef0b394Smrgmingw*) 48309ef0b394Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 48319ef0b394Smrg ;; 48329ef0b394Smrgesac 4833c5629e66Smrg 48349ef0b394Smrg# Try without a prefix underscore, then with it. 48359ef0b394Smrgfor ac_symprfx in "" "_"; do 4836c5629e66Smrg 48379ef0b394Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 48389ef0b394Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 4839c5629e66Smrg 48409ef0b394Smrg # Write the raw and C identifiers. 48419ef0b394Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 48429ef0b394Smrg # Fake it for dumpbin and say T for any non-static function 48439ef0b394Smrg # and D for any global variable. 48449ef0b394Smrg # Also find C++ and __fastcall symbols from MSVC++, 48459ef0b394Smrg # which start with @ or ?. 48469ef0b394Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 48479ef0b394Smrg" {last_section=section; section=\$ 3};"\ 4848fb5e8d76Smrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 48499ef0b394Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 48509ef0b394Smrg" \$ 0!~/External *\|/{next};"\ 48519ef0b394Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 48529ef0b394Smrg" {if(hide[section]) next};"\ 48539ef0b394Smrg" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 48549ef0b394Smrg" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 48559ef0b394Smrg" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 48569ef0b394Smrg" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 48579ef0b394Smrg" ' prfx=^$ac_symprfx]" 48589ef0b394Smrg else 48599ef0b394Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 48609ef0b394Smrg fi 48619ef0b394Smrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 4862698f425bSmrg 48639ef0b394Smrg # Check to see that the pipe works correctly. 48649ef0b394Smrg pipe_works=no 4865698f425bSmrg 48669ef0b394Smrg rm -f conftest* 48679ef0b394Smrg cat > conftest.$ac_ext <<_LT_EOF 48689ef0b394Smrg#ifdef __cplusplus 48699ef0b394Smrgextern "C" { 48709ef0b394Smrg#endif 48719ef0b394Smrgchar nm_test_var; 48729ef0b394Smrgvoid nm_test_func(void); 48739ef0b394Smrgvoid nm_test_func(void){} 48749ef0b394Smrg#ifdef __cplusplus 48759ef0b394Smrg} 48769ef0b394Smrg#endif 48779ef0b394Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 48789ef0b394Smrg_LT_EOF 48799ef0b394Smrg 48809ef0b394Smrg if AC_TRY_EVAL(ac_compile); then 48819ef0b394Smrg # Now try to grab the symbols. 48829ef0b394Smrg nlist=conftest.nm 48839ef0b394Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 48849ef0b394Smrg # Try sorting and uniquifying the output. 48859ef0b394Smrg if sort "$nlist" | uniq > "$nlist"T; then 48869ef0b394Smrg mv -f "$nlist"T "$nlist" 4887698f425bSmrg else 48889ef0b394Smrg rm -f "$nlist"T 4889698f425bSmrg fi 4890c5629e66Smrg 48919ef0b394Smrg # Make sure that we snagged all the symbols we need. 48929ef0b394Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 48939ef0b394Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 48949ef0b394Smrg cat <<_LT_EOF > conftest.$ac_ext 48959ef0b394Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 48969ef0b394Smrg#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) 48979ef0b394Smrg/* DATA imports from DLLs on WIN32 con't be const, because runtime 48989ef0b394Smrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 48999ef0b394Smrg# define LT@&t@_DLSYM_CONST 49009ef0b394Smrg#elif defined(__osf__) 49019ef0b394Smrg/* This system does not cope well with relocations in const data. */ 49029ef0b394Smrg# define LT@&t@_DLSYM_CONST 49039ef0b394Smrg#else 49049ef0b394Smrg# define LT@&t@_DLSYM_CONST const 49059ef0b394Smrg#endif 49069ef0b394Smrg 49079ef0b394Smrg#ifdef __cplusplus 49089ef0b394Smrgextern "C" { 49099ef0b394Smrg#endif 49109ef0b394Smrg 49119ef0b394Smrg_LT_EOF 49129ef0b394Smrg # Now generate the symbol file. 49139ef0b394Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 4914266e564dSmrg 49159ef0b394Smrg cat <<_LT_EOF >> conftest.$ac_ext 4916266e564dSmrg 49179ef0b394Smrg/* The mapping between symbol names and symbols. */ 49189ef0b394SmrgLT@&t@_DLSYM_CONST struct { 49199ef0b394Smrg const char *name; 49209ef0b394Smrg void *address; 49219ef0b394Smrg} 49229ef0b394Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 49239ef0b394Smrg{ 49249ef0b394Smrg { "@PROGRAM@", (void *) 0 }, 49259ef0b394Smrg_LT_EOF 49269ef0b394Smrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 49279ef0b394Smrg cat <<\_LT_EOF >> conftest.$ac_ext 49289ef0b394Smrg {0, (void *) 0} 49299ef0b394Smrg}; 4930266e564dSmrg 49319ef0b394Smrg/* This works around a problem in FreeBSD linker */ 49329ef0b394Smrg#ifdef FREEBSD_WORKAROUND 49339ef0b394Smrgstatic const void *lt_preloaded_setup() { 49349ef0b394Smrg return lt__PROGRAM__LTX_preloaded_symbols; 49359ef0b394Smrg} 49369ef0b394Smrg#endif 49379ef0b394Smrg 49389ef0b394Smrg#ifdef __cplusplus 49399ef0b394Smrg} 49409ef0b394Smrg#endif 49419ef0b394Smrg_LT_EOF 49429ef0b394Smrg # Now try linking the two files. 49439ef0b394Smrg mv conftest.$ac_objext conftstm.$ac_objext 49449ef0b394Smrg lt_globsym_save_LIBS=$LIBS 49459ef0b394Smrg lt_globsym_save_CFLAGS=$CFLAGS 49469ef0b394Smrg LIBS="conftstm.$ac_objext" 49479ef0b394Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 49489ef0b394Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 49499ef0b394Smrg pipe_works=yes 49509ef0b394Smrg fi 49519ef0b394Smrg LIBS=$lt_globsym_save_LIBS 49529ef0b394Smrg CFLAGS=$lt_globsym_save_CFLAGS 4953698f425bSmrg else 49549ef0b394Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 4955698f425bSmrg fi 4956698f425bSmrg else 49579ef0b394Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 4958698f425bSmrg fi 49599ef0b394Smrg else 49609ef0b394Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 49619ef0b394Smrg fi 49629ef0b394Smrg else 49639ef0b394Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 49649ef0b394Smrg cat conftest.$ac_ext >&5 49659ef0b394Smrg fi 49669ef0b394Smrg rm -rf conftest* conftst* 4967266e564dSmrg 49689ef0b394Smrg # Do not use the global_symbol_pipe unless it works. 49699ef0b394Smrg if test "$pipe_works" = yes; then 49709ef0b394Smrg break 49719ef0b394Smrg else 49729ef0b394Smrg lt_cv_sys_global_symbol_pipe= 49739ef0b394Smrg fi 49749ef0b394Smrgdone 49759ef0b394Smrg]) 49769ef0b394Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 49779ef0b394Smrg lt_cv_sys_global_symbol_to_cdecl= 49789ef0b394Smrgfi 49799ef0b394Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 49809ef0b394Smrg AC_MSG_RESULT(failed) 49819ef0b394Smrgelse 49829ef0b394Smrg AC_MSG_RESULT(ok) 49839ef0b394Smrgfi 4984266e564dSmrg 49859ef0b394Smrg# Response file support. 49869ef0b394Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 49879ef0b394Smrg nm_file_list_spec='@' 49889ef0b394Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 49899ef0b394Smrg nm_file_list_spec='@' 49909ef0b394Smrgfi 4991266e564dSmrg 49929ef0b394Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 49939ef0b394Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 49949ef0b394Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 49959ef0b394Smrg [Transform the output of nm in a proper C declaration]) 49969ef0b394Smrg_LT_DECL([global_symbol_to_c_name_address], 49979ef0b394Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 49989ef0b394Smrg [Transform the output of nm in a C name address pair]) 49999ef0b394Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 50009ef0b394Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 50019ef0b394Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 50029ef0b394Smrg_LT_DECL([], [nm_file_list_spec], [1], 50039ef0b394Smrg [Specify filename containing input files for $NM]) 50049ef0b394Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 5005266e564dSmrg 5006266e564dSmrg 50079ef0b394Smrg# _LT_COMPILER_PIC([TAGNAME]) 50089ef0b394Smrg# --------------------------- 50099ef0b394Smrgm4_defun([_LT_COMPILER_PIC], 50109ef0b394Smrg[m4_require([_LT_TAG_COMPILER])dnl 50119ef0b394Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 50129ef0b394Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 50139ef0b394Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 5014266e564dSmrg 50159ef0b394Smrgm4_if([$1], [CXX], [ 50169ef0b394Smrg # C++ specific cases for pic, static, wl, etc. 50179ef0b394Smrg if test "$GXX" = yes; then 50189ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 50199ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 50209ef0b394Smrg 50219ef0b394Smrg case $host_os in 50229ef0b394Smrg aix*) 50239ef0b394Smrg # All AIX code is PIC. 50249ef0b394Smrg if test "$host_cpu" = ia64; then 50259ef0b394Smrg # AIX 5 now supports IA64 processor 50269ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5027698f425bSmrg fi 5028698f425bSmrg ;; 5029266e564dSmrg 50309ef0b394Smrg amigaos*) 50319ef0b394Smrg case $host_cpu in 50329ef0b394Smrg powerpc) 50339ef0b394Smrg # see comment about AmigaOS4 .so support 50349ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 50359ef0b394Smrg ;; 50369ef0b394Smrg m68k) 50379ef0b394Smrg # FIXME: we need at least 68020 code to build shared libraries, but 50389ef0b394Smrg # adding the `-m68020' flag to GCC prevents building anything better, 50399ef0b394Smrg # like `-m68040'. 50409ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 5041698f425bSmrg ;; 5042698f425bSmrg esac 5043698f425bSmrg ;; 50449ef0b394Smrg 50459ef0b394Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 50469ef0b394Smrg # PIC is the default for these OSes. 50479ef0b394Smrg ;; 50489ef0b394Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 50499ef0b394Smrg # This hack is so that the source file can tell whether it is being 50509ef0b394Smrg # built for inclusion in a dll (and should export symbols for example). 50519ef0b394Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 50529ef0b394Smrg # (--disable-auto-import) libraries 50539ef0b394Smrg m4_if([$1], [GCJ], [], 50549ef0b394Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 50559ef0b394Smrg ;; 50569ef0b394Smrg darwin* | rhapsody*) 50579ef0b394Smrg # PIC is the default on this platform 50589ef0b394Smrg # Common symbols not allowed in MH_DYLIB files 50599ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 50609ef0b394Smrg ;; 50619ef0b394Smrg *djgpp*) 50629ef0b394Smrg # DJGPP does not support shared libraries at all 50639ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 50649ef0b394Smrg ;; 50659ef0b394Smrg haiku*) 50669ef0b394Smrg # PIC is the default for Haiku. 50679ef0b394Smrg # The "-static" flag exists, but is broken. 50689ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 50699ef0b394Smrg ;; 50709ef0b394Smrg interix[[3-9]]*) 50719ef0b394Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 50729ef0b394Smrg # Instead, we relocate shared libraries at runtime. 5073698f425bSmrg ;; 5074698f425bSmrg sysv4*MP*) 5075698f425bSmrg if test -d /usr/nec; then 50769ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 5077698f425bSmrg fi 5078698f425bSmrg ;; 50799ef0b394Smrg hpux*) 50809ef0b394Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 50819ef0b394Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 50829ef0b394Smrg # sets the default TLS model and affects inlining. 50839ef0b394Smrg case $host_cpu in 50849ef0b394Smrg hppa*64*) 50859ef0b394Smrg ;; 50869ef0b394Smrg *) 50879ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 50889ef0b394Smrg ;; 50899ef0b394Smrg esac 5090698f425bSmrg ;; 50919ef0b394Smrg *qnx* | *nto*) 50929ef0b394Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 50939ef0b394Smrg # it will coredump. 50949ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 5095698f425bSmrg ;; 5096698f425bSmrg *) 50979ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5098698f425bSmrg ;; 5099698f425bSmrg esac 51009ef0b394Smrg else 51019ef0b394Smrg case $host_os in 51029ef0b394Smrg aix[[4-9]]*) 51039ef0b394Smrg # All AIX code is PIC. 51049ef0b394Smrg if test "$host_cpu" = ia64; then 51059ef0b394Smrg # AIX 5 now supports IA64 processor 51069ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 51079ef0b394Smrg else 51089ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 51099ef0b394Smrg fi 51109ef0b394Smrg ;; 51119ef0b394Smrg chorus*) 51129ef0b394Smrg case $cc_basename in 51139ef0b394Smrg cxch68*) 51149ef0b394Smrg # Green Hills C++ Compiler 51159ef0b394Smrg # _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" 51169ef0b394Smrg ;; 51179ef0b394Smrg esac 51189ef0b394Smrg ;; 51199ef0b394Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 51209ef0b394Smrg # This hack is so that the source file can tell whether it is being 51219ef0b394Smrg # built for inclusion in a dll (and should export symbols for example). 51229ef0b394Smrg m4_if([$1], [GCJ], [], 51239ef0b394Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 51249ef0b394Smrg ;; 51259ef0b394Smrg dgux*) 51269ef0b394Smrg case $cc_basename in 51279ef0b394Smrg ec++*) 51289ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 51299ef0b394Smrg ;; 51309ef0b394Smrg ghcx*) 51319ef0b394Smrg # Green Hills C++ Compiler 51329ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 51339ef0b394Smrg ;; 51349ef0b394Smrg *) 51359ef0b394Smrg ;; 51369ef0b394Smrg esac 51379ef0b394Smrg ;; 51389ef0b394Smrg freebsd* | dragonfly*) 51399ef0b394Smrg # FreeBSD uses GNU C++ 51409ef0b394Smrg ;; 51419ef0b394Smrg hpux9* | hpux10* | hpux11*) 51429ef0b394Smrg case $cc_basename in 51439ef0b394Smrg CC*) 51449ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51459ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 51469ef0b394Smrg if test "$host_cpu" != ia64; then 51479ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 51489ef0b394Smrg fi 51499ef0b394Smrg ;; 51509ef0b394Smrg aCC*) 51519ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51529ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 51539ef0b394Smrg case $host_cpu in 51549ef0b394Smrg hppa*64*|ia64*) 51559ef0b394Smrg # +Z the default 51569ef0b394Smrg ;; 51579ef0b394Smrg *) 51589ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 51599ef0b394Smrg ;; 51609ef0b394Smrg esac 51619ef0b394Smrg ;; 51629ef0b394Smrg *) 51639ef0b394Smrg ;; 51649ef0b394Smrg esac 51659ef0b394Smrg ;; 51669ef0b394Smrg interix*) 51679ef0b394Smrg # This is c89, which is MS Visual C++ (no shared libs) 51689ef0b394Smrg # Anyone wants to do a port? 51699ef0b394Smrg ;; 51709ef0b394Smrg irix5* | irix6* | nonstopux*) 51719ef0b394Smrg case $cc_basename in 51729ef0b394Smrg CC*) 51739ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51749ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 51759ef0b394Smrg # CC pic flag -KPIC is the default. 51769ef0b394Smrg ;; 51779ef0b394Smrg *) 51789ef0b394Smrg ;; 51799ef0b394Smrg esac 51809ef0b394Smrg ;; 51819ef0b394Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 51829ef0b394Smrg case $cc_basename in 51839ef0b394Smrg KCC*) 51849ef0b394Smrg # KAI C++ Compiler 51859ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 51869ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 51879ef0b394Smrg ;; 51889ef0b394Smrg ecpc* ) 51899ef0b394Smrg # old Intel C++ for x86_64 which still supported -KPIC. 51909ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51919ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 51929ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 51939ef0b394Smrg ;; 51949ef0b394Smrg icpc* ) 51959ef0b394Smrg # Intel C++, used to be incompatible with GCC. 51969ef0b394Smrg # ICC 10 doesn't accept -KPIC any more. 51979ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51989ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 51999ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 52009ef0b394Smrg ;; 52019ef0b394Smrg pgCC* | pgcpp*) 52029ef0b394Smrg # Portland Group C++ compiler 52039ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 52049ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 52059ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 52069ef0b394Smrg ;; 52079ef0b394Smrg cxx*) 52089ef0b394Smrg # Compaq C++ 52099ef0b394Smrg # Make sure the PIC flag is empty. It appears that all Alpha 52109ef0b394Smrg # Linux and Compaq Tru64 Unix objects are PIC. 52119ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 52129ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 52139ef0b394Smrg ;; 52149ef0b394Smrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 52159ef0b394Smrg # IBM XL 8.0, 9.0 on PPC and BlueGene 52169ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 52179ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 52189ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 52199ef0b394Smrg ;; 52209ef0b394Smrg *) 52219ef0b394Smrg case `$CC -V 2>&1 | sed 5q` in 52229ef0b394Smrg *Sun\ C*) 52239ef0b394Smrg # Sun C++ 5.9 52249ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 52259ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 52269ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 52279ef0b394Smrg ;; 52289ef0b394Smrg esac 52299ef0b394Smrg ;; 52309ef0b394Smrg esac 52319ef0b394Smrg ;; 52329ef0b394Smrg lynxos*) 52339ef0b394Smrg ;; 52349ef0b394Smrg m88k*) 52359ef0b394Smrg ;; 52369ef0b394Smrg mvs*) 52379ef0b394Smrg case $cc_basename in 52389ef0b394Smrg cxx*) 52399ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 52409ef0b394Smrg ;; 52419ef0b394Smrg *) 52429ef0b394Smrg ;; 52439ef0b394Smrg esac 52449ef0b394Smrg ;; 52459ef0b394Smrg netbsd*) 52469ef0b394Smrg ;; 52479ef0b394Smrg *qnx* | *nto*) 52489ef0b394Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 52499ef0b394Smrg # it will coredump. 52509ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 52519ef0b394Smrg ;; 52529ef0b394Smrg osf3* | osf4* | osf5*) 52539ef0b394Smrg case $cc_basename in 52549ef0b394Smrg KCC*) 52559ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 52569ef0b394Smrg ;; 52579ef0b394Smrg RCC*) 52589ef0b394Smrg # Rational C++ 2.4.1 52599ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 52609ef0b394Smrg ;; 52619ef0b394Smrg cxx*) 52629ef0b394Smrg # Digital/Compaq C++ 52639ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 52649ef0b394Smrg # Make sure the PIC flag is empty. It appears that all Alpha 52659ef0b394Smrg # Linux and Compaq Tru64 Unix objects are PIC. 52669ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 52679ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 52689ef0b394Smrg ;; 52699ef0b394Smrg *) 52709ef0b394Smrg ;; 52719ef0b394Smrg esac 5272698f425bSmrg ;; 52739ef0b394Smrg psos*) 52749ef0b394Smrg ;; 52759ef0b394Smrg solaris*) 52769ef0b394Smrg case $cc_basename in 52779ef0b394Smrg CC* | sunCC*) 52789ef0b394Smrg # Sun C++ 4.2, 5.x and Centerline C++ 52799ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 52809ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 52819ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 52829ef0b394Smrg ;; 52839ef0b394Smrg gcx*) 52849ef0b394Smrg # Green Hills C++ Compiler 52859ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 52869ef0b394Smrg ;; 52879ef0b394Smrg *) 52889ef0b394Smrg ;; 52899ef0b394Smrg esac 52909ef0b394Smrg ;; 52919ef0b394Smrg sunos4*) 52929ef0b394Smrg case $cc_basename in 52939ef0b394Smrg CC*) 52949ef0b394Smrg # Sun C++ 4.x 52959ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 52969ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 52979ef0b394Smrg ;; 52989ef0b394Smrg lcc*) 52999ef0b394Smrg # Lucid 53009ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 53019ef0b394Smrg ;; 53029ef0b394Smrg *) 53039ef0b394Smrg ;; 53049ef0b394Smrg esac 53059ef0b394Smrg ;; 53069ef0b394Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 53079ef0b394Smrg case $cc_basename in 53089ef0b394Smrg CC*) 53099ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 53109ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 53119ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 53129ef0b394Smrg ;; 53139ef0b394Smrg esac 53149ef0b394Smrg ;; 53159ef0b394Smrg tandem*) 53169ef0b394Smrg case $cc_basename in 53179ef0b394Smrg NCC*) 53189ef0b394Smrg # NonStop-UX NCC 3.20 53199ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 53209ef0b394Smrg ;; 53219ef0b394Smrg *) 53229ef0b394Smrg ;; 53239ef0b394Smrg esac 53249ef0b394Smrg ;; 53259ef0b394Smrg vxworks*) 53269ef0b394Smrg ;; 53279ef0b394Smrg *) 53289ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 53299ef0b394Smrg ;; 53309ef0b394Smrg esac 53319ef0b394Smrg fi 53329ef0b394Smrg], 5333698f425bSmrg[ 53349ef0b394Smrg if test "$GCC" = yes; then 53359ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 53369ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5337266e564dSmrg 53389ef0b394Smrg case $host_os in 53399ef0b394Smrg aix*) 53409ef0b394Smrg # All AIX code is PIC. 53419ef0b394Smrg if test "$host_cpu" = ia64; then 53429ef0b394Smrg # AIX 5 now supports IA64 processor 53439ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 53449ef0b394Smrg fi 53459ef0b394Smrg ;; 5346698f425bSmrg 53479ef0b394Smrg amigaos*) 53489ef0b394Smrg case $host_cpu in 53499ef0b394Smrg powerpc) 53509ef0b394Smrg # see comment about AmigaOS4 .so support 53519ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 53529ef0b394Smrg ;; 53539ef0b394Smrg m68k) 53549ef0b394Smrg # FIXME: we need at least 68020 code to build shared libraries, but 53559ef0b394Smrg # adding the `-m68020' flag to GCC prevents building anything better, 53569ef0b394Smrg # like `-m68040'. 53579ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 53589ef0b394Smrg ;; 53599ef0b394Smrg esac 53609ef0b394Smrg ;; 5361698f425bSmrg 53629ef0b394Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 53639ef0b394Smrg # PIC is the default for these OSes. 53649ef0b394Smrg ;; 5365698f425bSmrg 53669ef0b394Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 53679ef0b394Smrg # This hack is so that the source file can tell whether it is being 53689ef0b394Smrg # built for inclusion in a dll (and should export symbols for example). 53699ef0b394Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 53709ef0b394Smrg # (--disable-auto-import) libraries 53719ef0b394Smrg m4_if([$1], [GCJ], [], 53729ef0b394Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 53739ef0b394Smrg ;; 5374698f425bSmrg 53759ef0b394Smrg darwin* | rhapsody*) 53769ef0b394Smrg # PIC is the default on this platform 53779ef0b394Smrg # Common symbols not allowed in MH_DYLIB files 53789ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 53799ef0b394Smrg ;; 5380698f425bSmrg 53819ef0b394Smrg haiku*) 53829ef0b394Smrg # PIC is the default for Haiku. 53839ef0b394Smrg # The "-static" flag exists, but is broken. 53849ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 53859ef0b394Smrg ;; 5386266e564dSmrg 53879ef0b394Smrg hpux*) 53889ef0b394Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 53899ef0b394Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 53909ef0b394Smrg # sets the default TLS model and affects inlining. 53919ef0b394Smrg case $host_cpu in 53929ef0b394Smrg hppa*64*) 53939ef0b394Smrg # +Z the default 53949ef0b394Smrg ;; 53959ef0b394Smrg *) 53969ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 53979ef0b394Smrg ;; 53989ef0b394Smrg esac 53999ef0b394Smrg ;; 5400266e564dSmrg 54019ef0b394Smrg interix[[3-9]]*) 54029ef0b394Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 54039ef0b394Smrg # Instead, we relocate shared libraries at runtime. 54049ef0b394Smrg ;; 5405266e564dSmrg 54069ef0b394Smrg msdosdjgpp*) 54079ef0b394Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 54089ef0b394Smrg # on systems that don't support them. 54099ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 54109ef0b394Smrg enable_shared=no 54119ef0b394Smrg ;; 5412266e564dSmrg 54139ef0b394Smrg *nto* | *qnx*) 54149ef0b394Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 54159ef0b394Smrg # it will coredump. 54169ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 54179ef0b394Smrg ;; 5418266e564dSmrg 54199ef0b394Smrg sysv4*MP*) 54209ef0b394Smrg if test -d /usr/nec; then 54219ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 54229ef0b394Smrg fi 54239ef0b394Smrg ;; 5424266e564dSmrg 54259ef0b394Smrg *) 54269ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 54279ef0b394Smrg ;; 54289ef0b394Smrg esac 5429266e564dSmrg 54309ef0b394Smrg case $cc_basename in 54319ef0b394Smrg nvcc*) # Cuda Compiler Driver 2.2 54329ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 5433fb5e8d76Smrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 5434fb5e8d76Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 5435fb5e8d76Smrg fi 54369ef0b394Smrg ;; 54379ef0b394Smrg esac 54389ef0b394Smrg else 54399ef0b394Smrg # PORTME Check for flag to pass linker flags through the system compiler. 54409ef0b394Smrg case $host_os in 54419ef0b394Smrg aix*) 54429ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54439ef0b394Smrg if test "$host_cpu" = ia64; then 54449ef0b394Smrg # AIX 5 now supports IA64 processor 54459ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5446698f425bSmrg else 54479ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 5448698f425bSmrg fi 54499ef0b394Smrg ;; 5450266e564dSmrg 54519ef0b394Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 54529ef0b394Smrg # This hack is so that the source file can tell whether it is being 54539ef0b394Smrg # built for inclusion in a dll (and should export symbols for example). 54549ef0b394Smrg m4_if([$1], [GCJ], [], 54559ef0b394Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 54569ef0b394Smrg ;; 5457266e564dSmrg 54589ef0b394Smrg hpux9* | hpux10* | hpux11*) 54599ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54609ef0b394Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 54619ef0b394Smrg # not for PA HP-UX. 54629ef0b394Smrg case $host_cpu in 54639ef0b394Smrg hppa*64*|ia64*) 54649ef0b394Smrg # +Z the default 54659ef0b394Smrg ;; 54669ef0b394Smrg *) 54679ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 54689ef0b394Smrg ;; 54699ef0b394Smrg esac 54709ef0b394Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 54719ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 54729ef0b394Smrg ;; 5473698f425bSmrg 54749ef0b394Smrg irix5* | irix6* | nonstopux*) 54759ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54769ef0b394Smrg # PIC (with -KPIC) is the default. 54779ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 54789ef0b394Smrg ;; 5479266e564dSmrg 54809ef0b394Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 54819ef0b394Smrg case $cc_basename in 54829ef0b394Smrg # old Intel for x86_64 which still supported -KPIC. 54839ef0b394Smrg ecc*) 54849ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54859ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 54869ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 54879ef0b394Smrg ;; 54889ef0b394Smrg # icc used to be incompatible with GCC. 54899ef0b394Smrg # ICC 10 doesn't accept -KPIC any more. 54909ef0b394Smrg icc* | ifort*) 54919ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54929ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 54939ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 54949ef0b394Smrg ;; 54959ef0b394Smrg # Lahey Fortran 8.1. 54969ef0b394Smrg lf95*) 54979ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54989ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 54999ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 55009ef0b394Smrg ;; 55019ef0b394Smrg nagfor*) 55029ef0b394Smrg # NAG Fortran compiler 55039ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 55049ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 55059ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55069ef0b394Smrg ;; 55079ef0b394Smrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 55089ef0b394Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 55099ef0b394Smrg # which looks to be a dead project) 55109ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 55119ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 55129ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55139ef0b394Smrg ;; 55149ef0b394Smrg ccc*) 55159ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 55169ef0b394Smrg # All Alpha code is PIC. 55179ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 55189ef0b394Smrg ;; 55199ef0b394Smrg xl* | bgxl* | bgf* | mpixl*) 55209ef0b394Smrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 55219ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 55229ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 55239ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 55249ef0b394Smrg ;; 55259ef0b394Smrg *) 55269ef0b394Smrg case `$CC -V 2>&1 | sed 5q` in 5527fb5e8d76Smrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 55289ef0b394Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 55299ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 55309ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55319ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 55329ef0b394Smrg ;; 5533fb5e8d76Smrg *Sun\ F* | *Sun*Fortran*) 5534fb5e8d76Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 5535fb5e8d76Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5536fb5e8d76Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 5537fb5e8d76Smrg ;; 55389ef0b394Smrg *Sun\ C*) 55399ef0b394Smrg # Sun C 5.9 55409ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 55419ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55429ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 55439ef0b394Smrg ;; 5544fb5e8d76Smrg *Intel*\ [[CF]]*Compiler*) 5545fb5e8d76Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5546fb5e8d76Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5547fb5e8d76Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5548fb5e8d76Smrg ;; 5549fb5e8d76Smrg *Portland\ Group*) 5550fb5e8d76Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 5551fb5e8d76Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 5552fb5e8d76Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5553fb5e8d76Smrg ;; 55549ef0b394Smrg esac 55559ef0b394Smrg ;; 55569ef0b394Smrg esac 55579ef0b394Smrg ;; 5558266e564dSmrg 55599ef0b394Smrg newsos6) 55609ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 55619ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55629ef0b394Smrg ;; 5563698f425bSmrg 55649ef0b394Smrg *nto* | *qnx*) 55659ef0b394Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 55669ef0b394Smrg # it will coredump. 55679ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 55689ef0b394Smrg ;; 5569698f425bSmrg 55709ef0b394Smrg osf3* | osf4* | osf5*) 55719ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 55729ef0b394Smrg # All OSF/1 code is PIC. 55739ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 55749ef0b394Smrg ;; 5575266e564dSmrg 55769ef0b394Smrg rdos*) 55779ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 55789ef0b394Smrg ;; 5579698f425bSmrg 55809ef0b394Smrg solaris*) 55819ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 55829ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55839ef0b394Smrg case $cc_basename in 55849ef0b394Smrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 55859ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 55869ef0b394Smrg *) 55879ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 55889ef0b394Smrg esac 55899ef0b394Smrg ;; 5590266e564dSmrg 55919ef0b394Smrg sunos4*) 55929ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 55939ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 55949ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55959ef0b394Smrg ;; 5596266e564dSmrg 55979ef0b394Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 55989ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 55999ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 56009ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 56019ef0b394Smrg ;; 5602266e564dSmrg 56039ef0b394Smrg sysv4*MP*) 56049ef0b394Smrg if test -d /usr/nec ;then 56059ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 56069ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 56079ef0b394Smrg fi 56089ef0b394Smrg ;; 5609266e564dSmrg 56109ef0b394Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 56119ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 56129ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 56139ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 56149ef0b394Smrg ;; 5615698f425bSmrg 56169ef0b394Smrg unicos*) 56179ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 56189ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 56199ef0b394Smrg ;; 5620266e564dSmrg 56219ef0b394Smrg uts4*) 56229ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 56239ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 56249ef0b394Smrg ;; 5625266e564dSmrg 56269ef0b394Smrg *) 56279ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 56289ef0b394Smrg ;; 56299ef0b394Smrg esac 56309ef0b394Smrg fi 56319ef0b394Smrg]) 56329ef0b394Smrgcase $host_os in 56339ef0b394Smrg # For platforms which do not support PIC, -DPIC is meaningless: 56349ef0b394Smrg *djgpp*) 56359ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 56369ef0b394Smrg ;; 56379ef0b394Smrg *) 56389ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 56399ef0b394Smrg ;; 56409ef0b394Smrgesac 5641266e564dSmrg 56429ef0b394SmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 56439ef0b394Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 56449ef0b394Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 56459ef0b394Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 5646266e564dSmrg 56479ef0b394Smrg# 56489ef0b394Smrg# Check to make sure the PIC flag actually works. 56499ef0b394Smrg# 56509ef0b394Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 56519ef0b394Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 56529ef0b394Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 56539ef0b394Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 56549ef0b394Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 56559ef0b394Smrg "" | " "*) ;; 56569ef0b394Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 56579ef0b394Smrg esac], 56589ef0b394Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 56599ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 56609ef0b394Smrgfi 56619ef0b394Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 56629ef0b394Smrg [Additional compiler flags for building library objects]) 5663698f425bSmrg 56649ef0b394Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 56659ef0b394Smrg [How to pass a linker flag through the compiler]) 56669ef0b394Smrg# 56679ef0b394Smrg# Check to make sure the static flag actually works. 56689ef0b394Smrg# 56699ef0b394Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 56709ef0b394Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 56719ef0b394Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 56729ef0b394Smrg $lt_tmp_static_flag, 56739ef0b394Smrg [], 56749ef0b394Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 56759ef0b394Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 56769ef0b394Smrg [Compiler flag to prevent dynamic linking]) 56779ef0b394Smrg])# _LT_COMPILER_PIC 5678266e564dSmrg 5679698f425bSmrg 56809ef0b394Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 56819ef0b394Smrg# ---------------------------- 56829ef0b394Smrg# See if the linker supports building shared libraries. 56839ef0b394Smrgm4_defun([_LT_LINKER_SHLIBS], 56849ef0b394Smrg[AC_REQUIRE([LT_PATH_LD])dnl 56859ef0b394SmrgAC_REQUIRE([LT_PATH_NM])dnl 56869ef0b394Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 56879ef0b394Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 56889ef0b394Smrgm4_require([_LT_DECL_EGREP])dnl 56899ef0b394Smrgm4_require([_LT_DECL_SED])dnl 56909ef0b394Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 56919ef0b394Smrgm4_require([_LT_TAG_COMPILER])dnl 56929ef0b394SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 56939ef0b394Smrgm4_if([$1], [CXX], [ 56949ef0b394Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 56959ef0b394Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 56969ef0b394Smrg case $host_os in 56979ef0b394Smrg aix[[4-9]]*) 56989ef0b394Smrg # If we're using GNU nm, then we don't want the "-C" option. 56999ef0b394Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 57009ef0b394Smrg # Also, AIX nm treats weak defined symbols like other global defined 57019ef0b394Smrg # symbols, whereas GNU nm marks them as "W". 57029ef0b394Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 57039ef0b394Smrg _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' 57049ef0b394Smrg else 57059ef0b394Smrg _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' 57069ef0b394Smrg fi 57079ef0b394Smrg ;; 57089ef0b394Smrg pw32*) 57099ef0b394Smrg _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 57109ef0b394Smrg ;; 57119ef0b394Smrg cygwin* | mingw* | cegcc*) 57129ef0b394Smrg case $cc_basename in 5713fb5e8d76Smrg cl*) 5714fb5e8d76Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 5715fb5e8d76Smrg ;; 57169ef0b394Smrg *) 57179ef0b394Smrg _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' 57189ef0b394Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 57199ef0b394Smrg ;; 57209ef0b394Smrg esac 57219ef0b394Smrg ;; 57229ef0b394Smrg *) 57239ef0b394Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 57249ef0b394Smrg ;; 57259ef0b394Smrg esac 57269ef0b394Smrg], [ 57279ef0b394Smrg runpath_var= 57289ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 57299ef0b394Smrg _LT_TAGVAR(always_export_symbols, $1)=no 57309ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)= 57319ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 57329ef0b394Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 57339ef0b394Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 57349ef0b394Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 57359ef0b394Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 57369ef0b394Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 57379ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=no 57389ef0b394Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 57399ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 57409ef0b394Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 57419ef0b394Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 57429ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 57439ef0b394Smrg _LT_TAGVAR(inherit_rpath, $1)=no 57449ef0b394Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 57459ef0b394Smrg _LT_TAGVAR(module_cmds, $1)= 57469ef0b394Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 57479ef0b394Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 57489ef0b394Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 57499ef0b394Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 57509ef0b394Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 57519ef0b394Smrg # include_expsyms should be a list of space-separated symbols to be *always* 57529ef0b394Smrg # included in the symbol list 57539ef0b394Smrg _LT_TAGVAR(include_expsyms, $1)= 57549ef0b394Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 57559ef0b394Smrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 57569ef0b394Smrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 57579ef0b394Smrg # as well as any symbol that contains `d'. 57589ef0b394Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 57599ef0b394Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 57609ef0b394Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 57619ef0b394Smrg # the symbol is explicitly referenced. Since portable code cannot 57629ef0b394Smrg # rely on this symbol name, it's probably fine to never include it in 57639ef0b394Smrg # preloaded symbol tables. 57649ef0b394Smrg # Exclude shared library initialization/finalization symbols. 57659ef0b394Smrgdnl Note also adjust exclude_expsyms for C++ above. 57669ef0b394Smrg extract_expsyms_cmds= 5767698f425bSmrg 57689ef0b394Smrg case $host_os in 57699ef0b394Smrg cygwin* | mingw* | pw32* | cegcc*) 57709ef0b394Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 57719ef0b394Smrg # When not using gcc, we currently assume that we are using 57729ef0b394Smrg # Microsoft Visual C++. 57739ef0b394Smrg if test "$GCC" != yes; then 57749ef0b394Smrg with_gnu_ld=no 57759ef0b394Smrg fi 57769ef0b394Smrg ;; 57779ef0b394Smrg interix*) 57789ef0b394Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 57799ef0b394Smrg with_gnu_ld=yes 57809ef0b394Smrg ;; 57819ef0b394Smrg openbsd*) 57829ef0b394Smrg with_gnu_ld=no 57839ef0b394Smrg ;; 57849ef0b394Smrg esac 5785266e564dSmrg 57869ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 5787698f425bSmrg 57889ef0b394Smrg # On some targets, GNU ld is compatible enough with the native linker 57899ef0b394Smrg # that we're better off using the native interface for both. 57909ef0b394Smrg lt_use_gnu_ld_interface=no 57919ef0b394Smrg if test "$with_gnu_ld" = yes; then 57929ef0b394Smrg case $host_os in 57939ef0b394Smrg aix*) 57949ef0b394Smrg # The AIX port of GNU ld has always aspired to compatibility 57959ef0b394Smrg # with the native linker. However, as the warning in the GNU ld 57969ef0b394Smrg # block says, versions before 2.19.5* couldn't really create working 57979ef0b394Smrg # shared libraries, regardless of the interface used. 57989ef0b394Smrg case `$LD -v 2>&1` in 57999ef0b394Smrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 58009ef0b394Smrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 58019ef0b394Smrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 58029ef0b394Smrg *) 58039ef0b394Smrg lt_use_gnu_ld_interface=yes 5804698f425bSmrg ;; 58059ef0b394Smrg esac 58069ef0b394Smrg ;; 58079ef0b394Smrg *) 58089ef0b394Smrg lt_use_gnu_ld_interface=yes 58099ef0b394Smrg ;; 58109ef0b394Smrg esac 58119ef0b394Smrg fi 5812266e564dSmrg 58139ef0b394Smrg if test "$lt_use_gnu_ld_interface" = yes; then 58149ef0b394Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 58159ef0b394Smrg wlarc='${wl}' 5816698f425bSmrg 58179ef0b394Smrg # Set some defaults for GNU ld with shared library support. These 58189ef0b394Smrg # are reset later if shared libraries are not supported. Putting them 58199ef0b394Smrg # here allows them to be overridden if necessary. 58209ef0b394Smrg runpath_var=LD_RUN_PATH 58219ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 58229ef0b394Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 58239ef0b394Smrg # ancient GNU ld didn't support --whole-archive et. al. 58249ef0b394Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 58259ef0b394Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 58269ef0b394Smrg else 58279ef0b394Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 58289ef0b394Smrg fi 58299ef0b394Smrg supports_anon_versioning=no 58309ef0b394Smrg case `$LD -v 2>&1` in 58319ef0b394Smrg *GNU\ gold*) supports_anon_versioning=yes ;; 58329ef0b394Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 58339ef0b394Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 58349ef0b394Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 58359ef0b394Smrg *\ 2.11.*) ;; # other 2.11 versions 58369ef0b394Smrg *) supports_anon_versioning=yes ;; 58379ef0b394Smrg esac 5838698f425bSmrg 58399ef0b394Smrg # See if GNU ld supports shared libraries. 58409ef0b394Smrg case $host_os in 58419ef0b394Smrg aix[[3-9]]*) 58429ef0b394Smrg # On AIX/PPC, the GNU linker is very broken 58439ef0b394Smrg if test "$host_cpu" != ia64; then 58449ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 58459ef0b394Smrg cat <<_LT_EOF 1>&2 5846698f425bSmrg 58479ef0b394Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported 58489ef0b394Smrg*** to be unable to reliably create shared libraries on AIX. 58499ef0b394Smrg*** Therefore, libtool is disabling shared libraries support. If you 58509ef0b394Smrg*** really care for shared libraries, you may want to install binutils 58519ef0b394Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 58529ef0b394Smrg*** You will then need to restart the configuration process. 5853266e564dSmrg 58549ef0b394Smrg_LT_EOF 58559ef0b394Smrg fi 58569ef0b394Smrg ;; 5857266e564dSmrg 58589ef0b394Smrg amigaos*) 58599ef0b394Smrg case $host_cpu in 58609ef0b394Smrg powerpc) 58619ef0b394Smrg # see comment about AmigaOS4 .so support 58629ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 58639ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 58649ef0b394Smrg ;; 58659ef0b394Smrg m68k) 58669ef0b394Smrg _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)' 58679ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 58689ef0b394Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 58699ef0b394Smrg ;; 58709ef0b394Smrg esac 58719ef0b394Smrg ;; 5872266e564dSmrg 58739ef0b394Smrg beos*) 58749ef0b394Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 58759ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 58769ef0b394Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 58779ef0b394Smrg # support --undefined. This deserves some investigation. FIXME 58789ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 58799ef0b394Smrg else 58809ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 58819ef0b394Smrg fi 58829ef0b394Smrg ;; 5883698f425bSmrg 58849ef0b394Smrg cygwin* | mingw* | pw32* | cegcc*) 58859ef0b394Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 58869ef0b394Smrg # as there is no search path for DLLs. 58879ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 58889ef0b394Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 58899ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 58909ef0b394Smrg _LT_TAGVAR(always_export_symbols, $1)=no 58919ef0b394Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 58929ef0b394Smrg _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' 58939ef0b394Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 58949ef0b394Smrg 58959ef0b394Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 58969ef0b394Smrg _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' 58979ef0b394Smrg # If the export-symbols file already is a .def file (1st line 58989ef0b394Smrg # is EXPORTS), use it as is; otherwise, prepend... 58999ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 59009ef0b394Smrg cp $export_symbols $output_objdir/$soname.def; 59019ef0b394Smrg else 59029ef0b394Smrg echo EXPORTS > $output_objdir/$soname.def; 59039ef0b394Smrg cat $export_symbols >> $output_objdir/$soname.def; 59049ef0b394Smrg fi~ 59059ef0b394Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 59069ef0b394Smrg else 59079ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 59089ef0b394Smrg fi 59099ef0b394Smrg ;; 59109ef0b394Smrg 59119ef0b394Smrg haiku*) 59129ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 59139ef0b394Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 59149ef0b394Smrg ;; 59159ef0b394Smrg 59169ef0b394Smrg interix[[3-9]]*) 59179ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=no 59189ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 59199ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 59209ef0b394Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 59219ef0b394Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 59229ef0b394Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 59239ef0b394Smrg # default) and relocated if they conflict, which is a slow very memory 59249ef0b394Smrg # consuming and fragmenting process. To avoid this, we pick a random, 59259ef0b394Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 59269ef0b394Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 59279ef0b394Smrg _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' 59289ef0b394Smrg _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' 59299ef0b394Smrg ;; 5930698f425bSmrg 59319ef0b394Smrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 59329ef0b394Smrg tmp_diet=no 59339ef0b394Smrg if test "$host_os" = linux-dietlibc; then 59349ef0b394Smrg case $cc_basename in 59359ef0b394Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 5936698f425bSmrg esac 59379ef0b394Smrg fi 59389ef0b394Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 59399ef0b394Smrg && test "$tmp_diet" = no 59409ef0b394Smrg then 59419ef0b394Smrg tmp_addflag=' $pic_flag' 59429ef0b394Smrg tmp_sharedflag='-shared' 59439ef0b394Smrg case $cc_basename,$host_cpu in 59449ef0b394Smrg pgcc*) # Portland Group C compiler 59459ef0b394Smrg _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' 59469ef0b394Smrg tmp_addflag=' $pic_flag' 59479ef0b394Smrg ;; 59489ef0b394Smrg pgf77* | pgf90* | pgf95* | pgfortran*) 59499ef0b394Smrg # Portland Group f77 and f90 compilers 59509ef0b394Smrg _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' 59519ef0b394Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 59529ef0b394Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 59539ef0b394Smrg tmp_addflag=' -i_dynamic' ;; 59549ef0b394Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 59559ef0b394Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 59569ef0b394Smrg ifc* | ifort*) # Intel Fortran compiler 59579ef0b394Smrg tmp_addflag=' -nofor_main' ;; 59589ef0b394Smrg lf95*) # Lahey Fortran 8.1 59599ef0b394Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 59609ef0b394Smrg tmp_sharedflag='--shared' ;; 59619ef0b394Smrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 59629ef0b394Smrg tmp_sharedflag='-qmkshrobj' 59639ef0b394Smrg tmp_addflag= ;; 59649ef0b394Smrg nvcc*) # Cuda Compiler Driver 2.2 59659ef0b394Smrg _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' 59669ef0b394Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 59679ef0b394Smrg ;; 59689ef0b394Smrg esac 59699ef0b394Smrg case `$CC -V 2>&1 | sed 5q` in 59709ef0b394Smrg *Sun\ C*) # Sun C 5.9 59719ef0b394Smrg _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' 59729ef0b394Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 59739ef0b394Smrg tmp_sharedflag='-G' ;; 59749ef0b394Smrg *Sun\ F*) # Sun Fortran 8.3 59759ef0b394Smrg tmp_sharedflag='-G' ;; 59769ef0b394Smrg esac 59779ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5978266e564dSmrg 59799ef0b394Smrg if test "x$supports_anon_versioning" = xyes; then 59809ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 59819ef0b394Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 59829ef0b394Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 59839ef0b394Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 59849ef0b394Smrg fi 5985266e564dSmrg 59869ef0b394Smrg case $cc_basename in 59879ef0b394Smrg xlf* | bgf* | bgxlf* | mpixlf*) 59889ef0b394Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 59899ef0b394Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 5990fb5e8d76Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 59919ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 59929ef0b394Smrg if test "x$supports_anon_versioning" = xyes; then 59939ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 59949ef0b394Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 59959ef0b394Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 59969ef0b394Smrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 59979ef0b394Smrg fi 59989ef0b394Smrg ;; 59999ef0b394Smrg esac 60009ef0b394Smrg else 6001698f425bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 60029ef0b394Smrg fi 60039ef0b394Smrg ;; 6004266e564dSmrg 60059ef0b394Smrg netbsd*) 60069ef0b394Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 60079ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 60089ef0b394Smrg wlarc= 60099ef0b394Smrg else 60109ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 60119ef0b394Smrg _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' 60129ef0b394Smrg fi 60139ef0b394Smrg ;; 6014266e564dSmrg 60159ef0b394Smrg solaris*) 60169ef0b394Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 60179ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 60189ef0b394Smrg cat <<_LT_EOF 1>&2 6019266e564dSmrg 60209ef0b394Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 60219ef0b394Smrg*** create shared libraries on Solaris systems. Therefore, libtool 60229ef0b394Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 60239ef0b394Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 60249ef0b394Smrg*** your PATH or compiler configuration so that the native linker is 60259ef0b394Smrg*** used, and then restart. 6026266e564dSmrg 60279ef0b394Smrg_LT_EOF 60289ef0b394Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 60299ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 60309ef0b394Smrg _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' 60319ef0b394Smrg else 6032698f425bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 60339ef0b394Smrg fi 60349ef0b394Smrg ;; 6035266e564dSmrg 60369ef0b394Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 60379ef0b394Smrg case `$LD -v 2>&1` in 60389ef0b394Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 60399ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 60409ef0b394Smrg cat <<_LT_EOF 1>&2 60419ef0b394Smrg 60429ef0b394Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 60439ef0b394Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 60449ef0b394Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 60459ef0b394Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 60469ef0b394Smrg*** your PATH or compiler configuration so that the native linker is 60479ef0b394Smrg*** used, and then restart. 60489ef0b394Smrg 60499ef0b394Smrg_LT_EOF 60509ef0b394Smrg ;; 60519ef0b394Smrg *) 60529ef0b394Smrg # For security reasons, it is highly recommended that you always 60539ef0b394Smrg # use absolute paths for naming shared libraries, and exclude the 60549ef0b394Smrg # DT_RUNPATH tag from executables and libraries. But doing so 60559ef0b394Smrg # requires that you compile everything twice, which is a pain. 60569ef0b394Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 60579ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 60589ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 60599ef0b394Smrg _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' 60609ef0b394Smrg else 60619ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6062698f425bSmrg fi 6063698f425bSmrg ;; 60649ef0b394Smrg esac 60659ef0b394Smrg ;; 6066266e564dSmrg 60679ef0b394Smrg sunos4*) 60689ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 60699ef0b394Smrg wlarc= 60709ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 60719ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60729ef0b394Smrg ;; 6073698f425bSmrg 60749ef0b394Smrg *) 60759ef0b394Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 60769ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 60779ef0b394Smrg _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' 60789ef0b394Smrg else 60799ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 60809ef0b394Smrg fi 60819ef0b394Smrg ;; 60829ef0b394Smrg esac 6083698f425bSmrg 60849ef0b394Smrg if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 60859ef0b394Smrg runpath_var= 60869ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 60879ef0b394Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 60889ef0b394Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 60899ef0b394Smrg fi 60909ef0b394Smrg else 60919ef0b394Smrg # PORTME fill in a description of your system's linker (not GNU ld) 60929ef0b394Smrg case $host_os in 60939ef0b394Smrg aix3*) 60949ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 60959ef0b394Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 60969ef0b394Smrg _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' 60979ef0b394Smrg # Note: this linker hardcodes the directories in LIBPATH if there 60989ef0b394Smrg # are no directories specified by -L. 60999ef0b394Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 61009ef0b394Smrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 61019ef0b394Smrg # Neither direct hardcoding nor static linking is supported with a 61029ef0b394Smrg # broken collect2. 61039ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 61049ef0b394Smrg fi 61059ef0b394Smrg ;; 6106698f425bSmrg 61079ef0b394Smrg aix[[4-9]]*) 61089ef0b394Smrg if test "$host_cpu" = ia64; then 61099ef0b394Smrg # On IA64, the linker does run time linking by default, so we don't 61109ef0b394Smrg # have to do anything special. 61119ef0b394Smrg aix_use_runtimelinking=no 61129ef0b394Smrg exp_sym_flag='-Bexport' 61139ef0b394Smrg no_entry_flag="" 61149ef0b394Smrg else 61159ef0b394Smrg # If we're using GNU nm, then we don't want the "-C" option. 61169ef0b394Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 61179ef0b394Smrg # Also, AIX nm treats weak defined symbols like other global 61189ef0b394Smrg # defined symbols, whereas GNU nm marks them as "W". 61199ef0b394Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 61209ef0b394Smrg _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' 61219ef0b394Smrg else 61229ef0b394Smrg _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' 61239ef0b394Smrg fi 61249ef0b394Smrg aix_use_runtimelinking=no 6125266e564dSmrg 61269ef0b394Smrg # Test if we are trying to use run time linking or normal 61279ef0b394Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 61289ef0b394Smrg # need to do runtime linking. 61299ef0b394Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 61309ef0b394Smrg for ld_flag in $LDFLAGS; do 61319ef0b394Smrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 61329ef0b394Smrg aix_use_runtimelinking=yes 61339ef0b394Smrg break 61349ef0b394Smrg fi 61359ef0b394Smrg done 61369ef0b394Smrg ;; 61379ef0b394Smrg esac 6138266e564dSmrg 61399ef0b394Smrg exp_sym_flag='-bexport' 61409ef0b394Smrg no_entry_flag='-bnoentry' 61419ef0b394Smrg fi 6142698f425bSmrg 61439ef0b394Smrg # When large executables or shared objects are built, AIX ld can 61449ef0b394Smrg # have problems creating the table of contents. If linking a library 61459ef0b394Smrg # or program results in "error TOC overflow" add -mminimal-toc to 61469ef0b394Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 61479ef0b394Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 6148698f425bSmrg 61499ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='' 61509ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 61519ef0b394Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 61529ef0b394Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 61539ef0b394Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 61549ef0b394Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 6155698f425bSmrg 61569ef0b394Smrg if test "$GCC" = yes; then 61579ef0b394Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 61589ef0b394Smrg # We only want to do this on AIX 4.2 and lower, the check 61599ef0b394Smrg # below for broken collect2 doesn't work under 4.3+ 61609ef0b394Smrg collect2name=`${CC} -print-prog-name=collect2` 61619ef0b394Smrg if test -f "$collect2name" && 61629ef0b394Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 61639ef0b394Smrg then 61649ef0b394Smrg # We have reworked collect2 61659ef0b394Smrg : 61669ef0b394Smrg else 61679ef0b394Smrg # We have old collect2 61689ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 61699ef0b394Smrg # It fails to find uninstalled libraries when the uninstalled 61709ef0b394Smrg # path is not listed in the libpath. Setting hardcode_minus_L 61719ef0b394Smrg # to unsupported forces relinking 61729ef0b394Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 61739ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 61749ef0b394Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 61759ef0b394Smrg fi 61769ef0b394Smrg ;; 61779ef0b394Smrg esac 61789ef0b394Smrg shared_flag='-shared' 61799ef0b394Smrg if test "$aix_use_runtimelinking" = yes; then 61809ef0b394Smrg shared_flag="$shared_flag "'${wl}-G' 61819ef0b394Smrg fi 61829ef0b394Smrg else 61839ef0b394Smrg # not using gcc 61849ef0b394Smrg if test "$host_cpu" = ia64; then 61859ef0b394Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 61869ef0b394Smrg # chokes on -Wl,-G. The following line is correct: 61879ef0b394Smrg shared_flag='-G' 61889ef0b394Smrg else 61899ef0b394Smrg if test "$aix_use_runtimelinking" = yes; then 61909ef0b394Smrg shared_flag='${wl}-G' 61919ef0b394Smrg else 61929ef0b394Smrg shared_flag='${wl}-bM:SRE' 61939ef0b394Smrg fi 61949ef0b394Smrg fi 61959ef0b394Smrg fi 6196266e564dSmrg 61979ef0b394Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 61989ef0b394Smrg # It seems that -bexpall does not export symbols beginning with 61999ef0b394Smrg # underscore (_), so it is better to generate a list of symbols to export. 62009ef0b394Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 62019ef0b394Smrg if test "$aix_use_runtimelinking" = yes; then 62029ef0b394Smrg # Warning - without using the other runtime loading flags (-brtl), 62039ef0b394Smrg # -berok will link without error, but may produce a broken library. 62049ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 62059ef0b394Smrg # Determine the default libpath from the value encoded in an 62069ef0b394Smrg # empty executable. 62079ef0b394Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 62089ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 62099ef0b394Smrg _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" 62109ef0b394Smrg else 62119ef0b394Smrg if test "$host_cpu" = ia64; then 62129ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 62139ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 62149ef0b394Smrg _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" 62159ef0b394Smrg else 62169ef0b394Smrg # Determine the default libpath from the value encoded in an 62179ef0b394Smrg # empty executable. 62189ef0b394Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 62199ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 62209ef0b394Smrg # Warning - without using the other run time loading flags, 62219ef0b394Smrg # -berok will link without error, but may produce a broken library. 62229ef0b394Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 62239ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 62249ef0b394Smrg if test "$with_gnu_ld" = yes; then 62259ef0b394Smrg # We only use this code for GNU lds that support --whole-archive. 62269ef0b394Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 62279ef0b394Smrg else 62289ef0b394Smrg # Exported symbols can be pulled into shared objects from archives 62299ef0b394Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 62309ef0b394Smrg fi 62319ef0b394Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 62329ef0b394Smrg # This is similar to how AIX traditionally builds its shared libraries. 62339ef0b394Smrg _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' 62349ef0b394Smrg fi 62359ef0b394Smrg fi 62369ef0b394Smrg ;; 6237266e564dSmrg 62389ef0b394Smrg amigaos*) 62399ef0b394Smrg case $host_cpu in 62409ef0b394Smrg powerpc) 62419ef0b394Smrg # see comment about AmigaOS4 .so support 62429ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 62439ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 62449ef0b394Smrg ;; 62459ef0b394Smrg m68k) 62469ef0b394Smrg _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)' 62479ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 62489ef0b394Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6249698f425bSmrg ;; 62509ef0b394Smrg esac 62519ef0b394Smrg ;; 6252266e564dSmrg 62539ef0b394Smrg bsdi[[45]]*) 62549ef0b394Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 62559ef0b394Smrg ;; 6256698f425bSmrg 62579ef0b394Smrg cygwin* | mingw* | pw32* | cegcc*) 62589ef0b394Smrg # When not using gcc, we currently assume that we are using 62599ef0b394Smrg # Microsoft Visual C++. 62609ef0b394Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 62619ef0b394Smrg # no search path for DLLs. 62629ef0b394Smrg case $cc_basename in 62639ef0b394Smrg cl*) 62649ef0b394Smrg # Native MSVC 62659ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 62669ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 62679ef0b394Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 62689ef0b394Smrg _LT_TAGVAR(file_list_spec, $1)='@' 62699ef0b394Smrg # Tell ltmain to make .lib files, not .a files. 62709ef0b394Smrg libext=lib 62719ef0b394Smrg # Tell ltmain to make .dll files, not .so files. 62729ef0b394Smrg shrext_cmds=".dll" 62739ef0b394Smrg # FIXME: Setting linknames here is a bad hack. 62749ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 62759ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 62769ef0b394Smrg sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 62779ef0b394Smrg else 62789ef0b394Smrg sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 62799ef0b394Smrg fi~ 62809ef0b394Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 62819ef0b394Smrg linknames=' 62829ef0b394Smrg # The linker will not automatically build a static lib if we build a DLL. 62839ef0b394Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 62849ef0b394Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6285fb5e8d76Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 62869ef0b394Smrg _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' 62879ef0b394Smrg # Don't use ranlib 62889ef0b394Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 62899ef0b394Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 62909ef0b394Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 62919ef0b394Smrg case $lt_outputfile in 62929ef0b394Smrg *.exe|*.EXE) ;; 62939ef0b394Smrg *) 62949ef0b394Smrg lt_outputfile="$lt_outputfile.exe" 62959ef0b394Smrg lt_tool_outputfile="$lt_tool_outputfile.exe" 62969ef0b394Smrg ;; 62979ef0b394Smrg esac~ 62989ef0b394Smrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 62999ef0b394Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 63009ef0b394Smrg $RM "$lt_outputfile.manifest"; 63019ef0b394Smrg fi' 63029ef0b394Smrg ;; 63039ef0b394Smrg *) 63049ef0b394Smrg # Assume MSVC wrapper 63059ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 63069ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 63079ef0b394Smrg # Tell ltmain to make .lib files, not .a files. 63089ef0b394Smrg libext=lib 63099ef0b394Smrg # Tell ltmain to make .dll files, not .so files. 63109ef0b394Smrg shrext_cmds=".dll" 63119ef0b394Smrg # FIXME: Setting linknames here is a bad hack. 63129ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 63139ef0b394Smrg # The linker will automatically build a .lib file if we build a DLL. 63149ef0b394Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 63159ef0b394Smrg # FIXME: Should let the user specify the lib program. 63169ef0b394Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 63179ef0b394Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 63189ef0b394Smrg ;; 63199ef0b394Smrg esac 63209ef0b394Smrg ;; 6321266e564dSmrg 63229ef0b394Smrg darwin* | rhapsody*) 63239ef0b394Smrg _LT_DARWIN_LINKER_FEATURES($1) 63249ef0b394Smrg ;; 6325266e564dSmrg 63269ef0b394Smrg dgux*) 63279ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 63289ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 63299ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 63309ef0b394Smrg ;; 6331266e564dSmrg 63329ef0b394Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 63339ef0b394Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 63349ef0b394Smrg # does not break anything, and helps significantly (at the cost of a little 63359ef0b394Smrg # extra space). 63369ef0b394Smrg freebsd2.2*) 63379ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 63389ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 63399ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 63409ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 63419ef0b394Smrg ;; 63429ef0b394Smrg 63439ef0b394Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 6344fb5e8d76Smrg freebsd2.*) 63459ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 63469ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 63479ef0b394Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 63489ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 63499ef0b394Smrg ;; 6350698f425bSmrg 63519ef0b394Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 63529ef0b394Smrg freebsd* | dragonfly*) 63539ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 63549ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 63559ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 63569ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 63579ef0b394Smrg ;; 6358698f425bSmrg 63599ef0b394Smrg hpux9*) 63609ef0b394Smrg if test "$GCC" = yes; then 63619ef0b394Smrg _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' 63629ef0b394Smrg else 63639ef0b394Smrg _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' 63649ef0b394Smrg fi 63659ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 63669ef0b394Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 63679ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6368698f425bSmrg 63699ef0b394Smrg # hardcode_minus_L: Not really in the search PATH, 63709ef0b394Smrg # but as the default location of the library. 63719ef0b394Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 63729ef0b394Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 63739ef0b394Smrg ;; 6374266e564dSmrg 63759ef0b394Smrg hpux10*) 63769ef0b394Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 63779ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 63789ef0b394Smrg else 63799ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 63809ef0b394Smrg fi 63819ef0b394Smrg if test "$with_gnu_ld" = no; then 63829ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 63839ef0b394Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 63849ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 63859ef0b394Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 63869ef0b394Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 63879ef0b394Smrg # hardcode_minus_L: Not really in the search PATH, 63889ef0b394Smrg # but as the default location of the library. 63899ef0b394Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 63909ef0b394Smrg fi 63919ef0b394Smrg ;; 6392266e564dSmrg 63939ef0b394Smrg hpux11*) 63949ef0b394Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 63959ef0b394Smrg case $host_cpu in 63969ef0b394Smrg hppa*64*) 63979ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 63989ef0b394Smrg ;; 63999ef0b394Smrg ia64*) 64009ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 6401698f425bSmrg ;; 6402698f425bSmrg *) 64039ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 6404698f425bSmrg ;; 64059ef0b394Smrg esac 64069ef0b394Smrg else 64079ef0b394Smrg case $host_cpu in 64089ef0b394Smrg hppa*64*) 64099ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 64109ef0b394Smrg ;; 64119ef0b394Smrg ia64*) 64129ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 64139ef0b394Smrg ;; 64149ef0b394Smrg *) 64159ef0b394Smrg m4_if($1, [], [ 64169ef0b394Smrg # Older versions of the 11.00 compiler do not understand -b yet 64179ef0b394Smrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 64189ef0b394Smrg _LT_LINKER_OPTION([if $CC understands -b], 64199ef0b394Smrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 64209ef0b394Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 64219ef0b394Smrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 64229ef0b394Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 64239ef0b394Smrg ;; 64249ef0b394Smrg esac 64259ef0b394Smrg fi 64269ef0b394Smrg if test "$with_gnu_ld" = no; then 64279ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 64289ef0b394Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6429266e564dSmrg 64309ef0b394Smrg case $host_cpu in 64319ef0b394Smrg hppa*64*|ia64*) 64329ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=no 64339ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 64349ef0b394Smrg ;; 64359ef0b394Smrg *) 64369ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 64379ef0b394Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 64389ef0b394Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6439266e564dSmrg 64409ef0b394Smrg # hardcode_minus_L: Not really in the search PATH, 64419ef0b394Smrg # but as the default location of the library. 64429ef0b394Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 64439ef0b394Smrg ;; 6444698f425bSmrg esac 64459ef0b394Smrg fi 6446698f425bSmrg ;; 6447266e564dSmrg 64489ef0b394Smrg irix5* | irix6* | nonstopux*) 64499ef0b394Smrg if test "$GCC" = yes; then 64509ef0b394Smrg _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' 64519ef0b394Smrg # Try to use the -exported_symbol ld option, if it does not 64529ef0b394Smrg # work, assume that -exports_file does not work either and 64539ef0b394Smrg # implicitly export all symbols. 64549ef0b394Smrg # This should be the same for all languages, so no per-tag cache variable. 64559ef0b394Smrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 64569ef0b394Smrg [lt_cv_irix_exported_symbol], 64579ef0b394Smrg [save_LDFLAGS="$LDFLAGS" 64589ef0b394Smrg LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 64599ef0b394Smrg AC_LINK_IFELSE( 64609ef0b394Smrg [AC_LANG_SOURCE( 64619ef0b394Smrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 64629ef0b394Smrg [C++], [[int foo (void) { return 0; }]], 64639ef0b394Smrg [Fortran 77], [[ 64649ef0b394Smrg subroutine foo 64659ef0b394Smrg end]], 64669ef0b394Smrg [Fortran], [[ 64679ef0b394Smrg subroutine foo 64689ef0b394Smrg end]])])], 64699ef0b394Smrg [lt_cv_irix_exported_symbol=yes], 64709ef0b394Smrg [lt_cv_irix_exported_symbol=no]) 64719ef0b394Smrg LDFLAGS="$save_LDFLAGS"]) 64729ef0b394Smrg if test "$lt_cv_irix_exported_symbol" = yes; then 64739ef0b394Smrg _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' 64749ef0b394Smrg fi 64759ef0b394Smrg else 64769ef0b394Smrg _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' 64779ef0b394Smrg _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' 64789ef0b394Smrg fi 64799ef0b394Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 64809ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 64819ef0b394Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 64829ef0b394Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 64839ef0b394Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 64849ef0b394Smrg ;; 6485266e564dSmrg 64869ef0b394Smrg netbsd*) 64879ef0b394Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 64889ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 64899ef0b394Smrg else 64909ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 64919ef0b394Smrg fi 64929ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 64939ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 64949ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 64959ef0b394Smrg ;; 6496266e564dSmrg 64979ef0b394Smrg newsos6) 64989ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 64999ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 65009ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 65019ef0b394Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 65029ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 65039ef0b394Smrg ;; 6504698f425bSmrg 65059ef0b394Smrg *nto* | *qnx*) 65069ef0b394Smrg ;; 6507698f425bSmrg 65089ef0b394Smrg openbsd*) 65099ef0b394Smrg if test -f /usr/libexec/ld.so; then 65109ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 65119ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 65129ef0b394Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 65139ef0b394Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 65149ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 65159ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 65169ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 65179ef0b394Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 65189ef0b394Smrg else 65199ef0b394Smrg case $host_os in 65209ef0b394Smrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 65219ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 65229ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 65239ef0b394Smrg ;; 65249ef0b394Smrg *) 65259ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 65269ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 65279ef0b394Smrg ;; 65289ef0b394Smrg esac 65299ef0b394Smrg fi 65309ef0b394Smrg else 65319ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 65329ef0b394Smrg fi 65339ef0b394Smrg ;; 6534698f425bSmrg 65359ef0b394Smrg os2*) 65369ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 65379ef0b394Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 65389ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 65399ef0b394Smrg _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' 65409ef0b394Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 65419ef0b394Smrg ;; 6542698f425bSmrg 65439ef0b394Smrg osf3*) 65449ef0b394Smrg if test "$GCC" = yes; then 65459ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 65469ef0b394Smrg _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' 65479ef0b394Smrg else 65489ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 65499ef0b394Smrg _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' 65509ef0b394Smrg fi 65519ef0b394Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 65529ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 65539ef0b394Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 65549ef0b394Smrg ;; 6555266e564dSmrg 65569ef0b394Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 65579ef0b394Smrg if test "$GCC" = yes; then 65589ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 65599ef0b394Smrg _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' 65609ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 65619ef0b394Smrg else 65629ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 65639ef0b394Smrg _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' 65649ef0b394Smrg _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~ 65659ef0b394Smrg $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' 6566266e564dSmrg 65679ef0b394Smrg # Both c and cxx compiler support -rpath directly 65689ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 65699ef0b394Smrg fi 65709ef0b394Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 65719ef0b394Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 65729ef0b394Smrg ;; 6573266e564dSmrg 65749ef0b394Smrg solaris*) 65759ef0b394Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 65769ef0b394Smrg if test "$GCC" = yes; then 65779ef0b394Smrg wlarc='${wl}' 65789ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 65799ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 65809ef0b394Smrg $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' 65819ef0b394Smrg else 65829ef0b394Smrg case `$CC -V 2>&1` in 65839ef0b394Smrg *"Compilers 5.0"*) 65849ef0b394Smrg wlarc='' 65859ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 65869ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 65879ef0b394Smrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 65889ef0b394Smrg ;; 65899ef0b394Smrg *) 65909ef0b394Smrg wlarc='${wl}' 65919ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 65929ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 65939ef0b394Smrg $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 65949ef0b394Smrg ;; 65959ef0b394Smrg esac 65969ef0b394Smrg fi 65979ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 65989ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 65999ef0b394Smrg case $host_os in 66009ef0b394Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 66019ef0b394Smrg *) 66029ef0b394Smrg # The compiler driver will combine and reorder linker options, 66039ef0b394Smrg # but understands `-z linker_flag'. GCC discards it without `$wl', 66049ef0b394Smrg # but is careful enough not to reorder. 66059ef0b394Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 66069ef0b394Smrg if test "$GCC" = yes; then 66079ef0b394Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 66089ef0b394Smrg else 66099ef0b394Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 66109ef0b394Smrg fi 66119ef0b394Smrg ;; 66129ef0b394Smrg esac 66139ef0b394Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 66149ef0b394Smrg ;; 6615266e564dSmrg 66169ef0b394Smrg sunos4*) 66179ef0b394Smrg if test "x$host_vendor" = xsequent; then 66189ef0b394Smrg # Use $CC to link under sequent, because it throws in some extra .o 66199ef0b394Smrg # files that make .init and .fini sections work. 66209ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 66219ef0b394Smrg else 66229ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 66239ef0b394Smrg fi 66249ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 66259ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 66269ef0b394Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 66279ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 66289ef0b394Smrg ;; 6629266e564dSmrg 66309ef0b394Smrg sysv4) 66319ef0b394Smrg case $host_vendor in 66329ef0b394Smrg sni) 66339ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 66349ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 66359ef0b394Smrg ;; 66369ef0b394Smrg siemens) 66379ef0b394Smrg ## LD is ld it makes a PLAMLIB 66389ef0b394Smrg ## CC just makes a GrossModule. 66399ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 66409ef0b394Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 66419ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=no 66429ef0b394Smrg ;; 66439ef0b394Smrg motorola) 66449ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 66459ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 66469ef0b394Smrg ;; 66479ef0b394Smrg esac 66489ef0b394Smrg runpath_var='LD_RUN_PATH' 66499ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 66509ef0b394Smrg ;; 6651266e564dSmrg 66529ef0b394Smrg sysv4.3*) 66539ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 66549ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 66559ef0b394Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 66569ef0b394Smrg ;; 6657266e564dSmrg 66589ef0b394Smrg sysv4*MP*) 66599ef0b394Smrg if test -d /usr/nec; then 66609ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 66619ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 66629ef0b394Smrg runpath_var=LD_RUN_PATH 66639ef0b394Smrg hardcode_runpath_var=yes 66649ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 66659ef0b394Smrg fi 66669ef0b394Smrg ;; 6667266e564dSmrg 66689ef0b394Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 66699ef0b394Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 66709ef0b394Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 66719ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 66729ef0b394Smrg runpath_var='LD_RUN_PATH' 6673266e564dSmrg 66749ef0b394Smrg if test "$GCC" = yes; then 66759ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 66769ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 66779ef0b394Smrg else 66789ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 66799ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 66809ef0b394Smrg fi 66819ef0b394Smrg ;; 6682266e564dSmrg 66839ef0b394Smrg sysv5* | sco3.2v5* | sco5v6*) 66849ef0b394Smrg # Note: We can NOT use -z defs as we might desire, because we do not 66859ef0b394Smrg # link with -lc, and that would cause any symbols used from libc to 66869ef0b394Smrg # always be unresolved, which means just about no library would 66879ef0b394Smrg # ever link correctly. If we're not using GNU ld we use -z text 66889ef0b394Smrg # though, which does catch some bad symbols but isn't as heavy-handed 66899ef0b394Smrg # as -z defs. 66909ef0b394Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 66919ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 66929ef0b394Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 66939ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 66949ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 66959ef0b394Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 66969ef0b394Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 66979ef0b394Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 66989ef0b394Smrg runpath_var='LD_RUN_PATH' 6699266e564dSmrg 67009ef0b394Smrg if test "$GCC" = yes; then 67019ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 67029ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 67039ef0b394Smrg else 67049ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 67059ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 67069ef0b394Smrg fi 67079ef0b394Smrg ;; 67089ef0b394Smrg 67099ef0b394Smrg uts4*) 67109ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 67119ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 67129ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 67139ef0b394Smrg ;; 6714266e564dSmrg 67159ef0b394Smrg *) 67169ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 67179ef0b394Smrg ;; 6718698f425bSmrg esac 6719266e564dSmrg 67209ef0b394Smrg if test x$host_vendor = xsni; then 67219ef0b394Smrg case $host in 67229ef0b394Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 67239ef0b394Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 67249ef0b394Smrg ;; 67259ef0b394Smrg esac 67269ef0b394Smrg fi 67279ef0b394Smrg fi 67289ef0b394Smrg]) 67299ef0b394SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 67309ef0b394Smrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 6731266e564dSmrg 67329ef0b394Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 6733266e564dSmrg 67349ef0b394Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 67359ef0b394Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 67369ef0b394Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 67379ef0b394Smrg [The commands to extract the exported symbol list from a shared archive]) 6738266e564dSmrg 67399ef0b394Smrg# 67409ef0b394Smrg# Do we need to explicitly link libc? 67419ef0b394Smrg# 67429ef0b394Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 67439ef0b394Smrgx|xyes) 67449ef0b394Smrg # Assume -lc should be added 67459ef0b394Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6746266e564dSmrg 67479ef0b394Smrg if test "$enable_shared" = yes && test "$GCC" = yes; then 67489ef0b394Smrg case $_LT_TAGVAR(archive_cmds, $1) in 67499ef0b394Smrg *'~'*) 67509ef0b394Smrg # FIXME: we may have to deal with multi-command sequences. 6751698f425bSmrg ;; 67529ef0b394Smrg '$CC '*) 67539ef0b394Smrg # Test whether the compiler implicitly links with -lc since on some 67549ef0b394Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 67559ef0b394Smrg # to ld, don't add -lc before -lgcc. 67569ef0b394Smrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 67579ef0b394Smrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 67589ef0b394Smrg [$RM conftest* 67599ef0b394Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 67609ef0b394Smrg 67619ef0b394Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 67629ef0b394Smrg soname=conftest 67639ef0b394Smrg lib=conftest 67649ef0b394Smrg libobjs=conftest.$ac_objext 67659ef0b394Smrg deplibs= 67669ef0b394Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 67679ef0b394Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 67689ef0b394Smrg compiler_flags=-v 67699ef0b394Smrg linker_flags=-v 67709ef0b394Smrg verstring= 67719ef0b394Smrg output_objdir=. 67729ef0b394Smrg libname=conftest 67739ef0b394Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 67749ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 67759ef0b394Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 67769ef0b394Smrg then 67779ef0b394Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 67789ef0b394Smrg else 67799ef0b394Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 67809ef0b394Smrg fi 67819ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 67829ef0b394Smrg else 67839ef0b394Smrg cat conftest.err 1>&5 67849ef0b394Smrg fi 67859ef0b394Smrg $RM conftest* 67869ef0b394Smrg ]) 67879ef0b394Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 6788698f425bSmrg ;; 6789698f425bSmrg esac 67909ef0b394Smrg fi 6791698f425bSmrg ;; 6792698f425bSmrgesac 6793266e564dSmrg 67949ef0b394Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 67959ef0b394Smrg [Whether or not to add -lc for building shared libraries]) 67969ef0b394Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 67979ef0b394Smrg [enable_shared_with_static_runtimes], [0], 67989ef0b394Smrg [Whether or not to disallow shared libs when runtime libs are static]) 67999ef0b394Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 68009ef0b394Smrg [Compiler flag to allow reflexive dlopens]) 68019ef0b394Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 68029ef0b394Smrg [Compiler flag to generate shared objects directly from archives]) 68039ef0b394Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 68049ef0b394Smrg [Whether the compiler copes with passing no objects directly]) 68059ef0b394Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 68069ef0b394Smrg [Create an old-style archive from a shared archive]) 68079ef0b394Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 68089ef0b394Smrg [Create a temporary old-style archive to link instead of a shared archive]) 68099ef0b394Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 68109ef0b394Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 68119ef0b394Smrg_LT_TAGDECL([], [module_cmds], [2], 68129ef0b394Smrg [Commands used to build a loadable module if different from building 68139ef0b394Smrg a shared archive.]) 68149ef0b394Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 68159ef0b394Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 68169ef0b394Smrg [Whether we are building with GNU ld or not]) 68179ef0b394Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 68189ef0b394Smrg [Flag that allows shared libraries with undefined symbols to be built]) 68199ef0b394Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 68209ef0b394Smrg [Flag that enforces no undefined symbols]) 68219ef0b394Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 68229ef0b394Smrg [Flag to hardcode $libdir into a binary during linking. 68239ef0b394Smrg This must work even if $libdir does not exist]) 68249ef0b394Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 68259ef0b394Smrg [Whether we need a single "-rpath" flag with a separated argument]) 68269ef0b394Smrg_LT_TAGDECL([], [hardcode_direct], [0], 68279ef0b394Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 68289ef0b394Smrg DIR into the resulting binary]) 68299ef0b394Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 68309ef0b394Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 68319ef0b394Smrg DIR into the resulting binary and the resulting library dependency is 68329ef0b394Smrg "absolute", i.e impossible to change by setting ${shlibpath_var} if the 68339ef0b394Smrg library is relocated]) 68349ef0b394Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 68359ef0b394Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 68369ef0b394Smrg into the resulting binary]) 68379ef0b394Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 68389ef0b394Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 68399ef0b394Smrg into the resulting binary]) 68409ef0b394Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 68419ef0b394Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 68429ef0b394Smrg into the library and all subsequent libraries and executables linked 68439ef0b394Smrg against it]) 68449ef0b394Smrg_LT_TAGDECL([], [inherit_rpath], [0], 68459ef0b394Smrg [Set to yes if linker adds runtime paths of dependent libraries 68469ef0b394Smrg to runtime path list]) 68479ef0b394Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 68489ef0b394Smrg [Whether libtool must link a program against all its dependency libraries]) 68499ef0b394Smrg_LT_TAGDECL([], [always_export_symbols], [0], 68509ef0b394Smrg [Set to "yes" if exported symbols are required]) 68519ef0b394Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 68529ef0b394Smrg [The commands to list exported symbols]) 68539ef0b394Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 68549ef0b394Smrg [Symbols that should not be listed in the preloaded symbols]) 68559ef0b394Smrg_LT_TAGDECL([], [include_expsyms], [1], 68569ef0b394Smrg [Symbols that must always be exported]) 68579ef0b394Smrg_LT_TAGDECL([], [prelink_cmds], [2], 68589ef0b394Smrg [Commands necessary for linking programs (against libraries) with templates]) 68599ef0b394Smrg_LT_TAGDECL([], [postlink_cmds], [2], 68609ef0b394Smrg [Commands necessary for finishing linking programs]) 68619ef0b394Smrg_LT_TAGDECL([], [file_list_spec], [1], 68629ef0b394Smrg [Specify filename containing input files]) 68639ef0b394Smrgdnl FIXME: Not yet implemented 68649ef0b394Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 68659ef0b394Smrgdnl [Compiler flag to generate thread safe objects]) 68669ef0b394Smrg])# _LT_LINKER_SHLIBS 68679ef0b394Smrg 68689ef0b394Smrg 68699ef0b394Smrg# _LT_LANG_C_CONFIG([TAG]) 68709ef0b394Smrg# ------------------------ 68719ef0b394Smrg# Ensure that the configuration variables for a C compiler are suitably 68729ef0b394Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 68739ef0b394Smrg# the compiler configuration to `libtool'. 68749ef0b394Smrgm4_defun([_LT_LANG_C_CONFIG], 68759ef0b394Smrg[m4_require([_LT_DECL_EGREP])dnl 68769ef0b394Smrglt_save_CC="$CC" 68779ef0b394SmrgAC_LANG_PUSH(C) 68789ef0b394Smrg 68799ef0b394Smrg# Source file extension for C test sources. 68809ef0b394Smrgac_ext=c 68819ef0b394Smrg 68829ef0b394Smrg# Object file extension for compiled C test sources. 68839ef0b394Smrgobjext=o 68849ef0b394Smrg_LT_TAGVAR(objext, $1)=$objext 68859ef0b394Smrg 68869ef0b394Smrg# Code to be used in simple compile tests 68879ef0b394Smrglt_simple_compile_test_code="int some_variable = 0;" 68889ef0b394Smrg 68899ef0b394Smrg# Code to be used in simple link tests 68909ef0b394Smrglt_simple_link_test_code='int main(){return(0);}' 68919ef0b394Smrg 68929ef0b394Smrg_LT_TAG_COMPILER 68939ef0b394Smrg# Save the default compiler, since it gets overwritten when the other 68949ef0b394Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 68959ef0b394Smrgcompiler_DEFAULT=$CC 68969ef0b394Smrg 68979ef0b394Smrg# save warnings/boilerplate of simple test code 68989ef0b394Smrg_LT_COMPILER_BOILERPLATE 68999ef0b394Smrg_LT_LINKER_BOILERPLATE 69009ef0b394Smrg 69019ef0b394Smrgif test -n "$compiler"; then 69029ef0b394Smrg _LT_COMPILER_NO_RTTI($1) 69039ef0b394Smrg _LT_COMPILER_PIC($1) 69049ef0b394Smrg _LT_COMPILER_C_O($1) 69059ef0b394Smrg _LT_COMPILER_FILE_LOCKS($1) 69069ef0b394Smrg _LT_LINKER_SHLIBS($1) 69079ef0b394Smrg _LT_SYS_DYNAMIC_LINKER($1) 69089ef0b394Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 69099ef0b394Smrg LT_SYS_DLOPEN_SELF 69109ef0b394Smrg _LT_CMD_STRIPLIB 69119ef0b394Smrg 69129ef0b394Smrg # Report which library types will actually be built 69139ef0b394Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 69149ef0b394Smrg AC_MSG_RESULT([$can_build_shared]) 69159ef0b394Smrg 69169ef0b394Smrg AC_MSG_CHECKING([whether to build shared libraries]) 69179ef0b394Smrg test "$can_build_shared" = "no" && enable_shared=no 6918698f425bSmrg 69199ef0b394Smrg # On AIX, shared libraries and static libraries use the same namespace, and 69209ef0b394Smrg # are all built from PIC. 69219ef0b394Smrg case $host_os in 69229ef0b394Smrg aix3*) 69239ef0b394Smrg test "$enable_shared" = yes && enable_static=no 69249ef0b394Smrg if test -n "$RANLIB"; then 69259ef0b394Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 69269ef0b394Smrg postinstall_cmds='$RANLIB $lib' 69279ef0b394Smrg fi 69289ef0b394Smrg ;; 6929698f425bSmrg 69309ef0b394Smrg aix[[4-9]]*) 69319ef0b394Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 69329ef0b394Smrg test "$enable_shared" = yes && enable_static=no 69339ef0b394Smrg fi 69349ef0b394Smrg ;; 69359ef0b394Smrg esac 69369ef0b394Smrg AC_MSG_RESULT([$enable_shared]) 6937266e564dSmrg 69389ef0b394Smrg AC_MSG_CHECKING([whether to build static libraries]) 69399ef0b394Smrg # Make sure either enable_shared or enable_static is yes. 69409ef0b394Smrg test "$enable_shared" = yes || enable_static=yes 69419ef0b394Smrg AC_MSG_RESULT([$enable_static]) 69429ef0b394Smrg 69439ef0b394Smrg _LT_CONFIG($1) 69449ef0b394Smrgfi 69459ef0b394SmrgAC_LANG_POP 69469ef0b394SmrgCC="$lt_save_CC" 69479ef0b394Smrg])# _LT_LANG_C_CONFIG 6948266e564dSmrg 6949266e564dSmrg 69509ef0b394Smrg# _LT_LANG_CXX_CONFIG([TAG]) 6951698f425bSmrg# -------------------------- 69529ef0b394Smrg# Ensure that the configuration variables for a C++ compiler are suitably 69539ef0b394Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 69549ef0b394Smrg# the compiler configuration to `libtool'. 69559ef0b394Smrgm4_defun([_LT_LANG_CXX_CONFIG], 69569ef0b394Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 69579ef0b394Smrgm4_require([_LT_DECL_EGREP])dnl 69589ef0b394Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 69599ef0b394Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 69609ef0b394Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 69619ef0b394Smrg (test "X$CXX" != "Xg++"))) ; then 69629ef0b394Smrg AC_PROG_CXXCPP 69639ef0b394Smrgelse 69649ef0b394Smrg _lt_caught_CXX_error=yes 69659ef0b394Smrgfi 6966266e564dSmrg 69679ef0b394SmrgAC_LANG_PUSH(C++) 6968698f425bSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6969698f425bSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 6970698f425bSmrg_LT_TAGVAR(always_export_symbols, $1)=no 6971698f425bSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 69729ef0b394Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 6973698f425bSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 6974698f425bSmrg_LT_TAGVAR(hardcode_direct, $1)=no 6975698f425bSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 6976698f425bSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6977698f425bSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 6978698f425bSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 69799ef0b394Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 6980698f425bSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 6981698f425bSmrg_LT_TAGVAR(inherit_rpath, $1)=no 6982698f425bSmrg_LT_TAGVAR(module_cmds, $1)= 6983698f425bSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 6984698f425bSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 6985698f425bSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 69869ef0b394Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 69879ef0b394Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 6988698f425bSmrg_LT_TAGVAR(no_undefined_flag, $1)= 6989698f425bSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 6990698f425bSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6991266e564dSmrg 69929ef0b394Smrg# Source file extension for C++ test sources. 69939ef0b394Smrgac_ext=cpp 6994266e564dSmrg 69959ef0b394Smrg# Object file extension for compiled C++ test sources. 6996698f425bSmrgobjext=o 6997698f425bSmrg_LT_TAGVAR(objext, $1)=$objext 6998698f425bSmrg 6999698f425bSmrg# No sense in running all these tests if we already determined that 70009ef0b394Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 7001698f425bSmrg# are currently assumed to apply to all compilers on this platform, 7002698f425bSmrg# and will be corrupted by setting them based on a non-working compiler. 70039ef0b394Smrgif test "$_lt_caught_CXX_error" != yes; then 7004698f425bSmrg # Code to be used in simple compile tests 70059ef0b394Smrg lt_simple_compile_test_code="int some_variable = 0;" 7006266e564dSmrg 7007698f425bSmrg # Code to be used in simple link tests 70089ef0b394Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 7009266e564dSmrg 7010698f425bSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7011698f425bSmrg _LT_TAG_COMPILER 7012266e564dSmrg 7013698f425bSmrg # save warnings/boilerplate of simple test code 7014698f425bSmrg _LT_COMPILER_BOILERPLATE 7015698f425bSmrg _LT_LINKER_BOILERPLATE 7016266e564dSmrg 7017698f425bSmrg # Allow CC to be a program name with arguments. 70189ef0b394Smrg lt_save_CC=$CC 70199ef0b394Smrg lt_save_CFLAGS=$CFLAGS 70209ef0b394Smrg lt_save_LD=$LD 7021698f425bSmrg lt_save_GCC=$GCC 70229ef0b394Smrg GCC=$GXX 70239ef0b394Smrg lt_save_with_gnu_ld=$with_gnu_ld 70249ef0b394Smrg lt_save_path_LD=$lt_cv_path_LD 70259ef0b394Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 70269ef0b394Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 70279ef0b394Smrg else 70289ef0b394Smrg $as_unset lt_cv_prog_gnu_ld 70299ef0b394Smrg fi 70309ef0b394Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 70319ef0b394Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 70329ef0b394Smrg else 70339ef0b394Smrg $as_unset lt_cv_path_LD 70349ef0b394Smrg fi 70359ef0b394Smrg test -z "${LDCXX+set}" || LD=$LDCXX 70369ef0b394Smrg CC=${CXX-"c++"} 70379ef0b394Smrg CFLAGS=$CXXFLAGS 7038698f425bSmrg compiler=$CC 7039698f425bSmrg _LT_TAGVAR(compiler, $1)=$CC 7040698f425bSmrg _LT_CC_BASENAME([$compiler]) 7041698f425bSmrg 70429ef0b394Smrg if test -n "$compiler"; then 70439ef0b394Smrg # We don't want -fno-exception when compiling C++ code, so set the 70449ef0b394Smrg # no_builtin_flag separately 70459ef0b394Smrg if test "$GXX" = yes; then 70469ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 70479ef0b394Smrg else 70489ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 70499ef0b394Smrg fi 7050266e564dSmrg 70519ef0b394Smrg if test "$GXX" = yes; then 70529ef0b394Smrg # Set up default GNU C++ configuration 7053266e564dSmrg 70549ef0b394Smrg LT_PATH_LD 7055266e564dSmrg 70569ef0b394Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 70579ef0b394Smrg # archiving commands below assume that GNU ld is being used. 70589ef0b394Smrg if test "$with_gnu_ld" = yes; then 70599ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 70609ef0b394Smrg _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' 7061266e564dSmrg 70629ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 70639ef0b394Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7064266e564dSmrg 70659ef0b394Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 70669ef0b394Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 70679ef0b394Smrg # investigate it a little bit more. (MM) 70689ef0b394Smrg wlarc='${wl}' 7069698f425bSmrg 70709ef0b394Smrg # ancient GNU ld didn't support --whole-archive et. al. 70719ef0b394Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 70729ef0b394Smrg $GREP 'no-whole-archive' > /dev/null; then 70739ef0b394Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 70749ef0b394Smrg else 70759ef0b394Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 70769ef0b394Smrg fi 70779ef0b394Smrg else 70789ef0b394Smrg with_gnu_ld=no 70799ef0b394Smrg wlarc= 7080698f425bSmrg 70819ef0b394Smrg # A generic and very simple default shared library creation 70829ef0b394Smrg # command for GNU C++ for the case where it uses the native 70839ef0b394Smrg # linker, instead of GNU ld. If possible, this setting should 70849ef0b394Smrg # overridden to take advantage of the native linker features on 70859ef0b394Smrg # the platform it is being used on. 70869ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 70879ef0b394Smrg fi 7088698f425bSmrg 70899ef0b394Smrg # Commands to make compiler produce verbose output that lists 70909ef0b394Smrg # what "hidden" libraries, object files and flags are used when 70919ef0b394Smrg # linking a shared library. 70929ef0b394Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7093698f425bSmrg 70949ef0b394Smrg else 70959ef0b394Smrg GXX=no 70969ef0b394Smrg with_gnu_ld=no 70979ef0b394Smrg wlarc= 70989ef0b394Smrg fi 7099266e564dSmrg 71009ef0b394Smrg # PORTME: fill in a description of your system's C++ link characteristics 71019ef0b394Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 71029ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 71039ef0b394Smrg case $host_os in 71049ef0b394Smrg aix3*) 71059ef0b394Smrg # FIXME: insert proper C++ library support 71069ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 71079ef0b394Smrg ;; 71089ef0b394Smrg aix[[4-9]]*) 71099ef0b394Smrg if test "$host_cpu" = ia64; then 71109ef0b394Smrg # On IA64, the linker does run time linking by default, so we don't 71119ef0b394Smrg # have to do anything special. 71129ef0b394Smrg aix_use_runtimelinking=no 71139ef0b394Smrg exp_sym_flag='-Bexport' 71149ef0b394Smrg no_entry_flag="" 71159ef0b394Smrg else 71169ef0b394Smrg aix_use_runtimelinking=no 7117266e564dSmrg 71189ef0b394Smrg # Test if we are trying to use run time linking or normal 71199ef0b394Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 71209ef0b394Smrg # need to do runtime linking. 71219ef0b394Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 71229ef0b394Smrg for ld_flag in $LDFLAGS; do 71239ef0b394Smrg case $ld_flag in 71249ef0b394Smrg *-brtl*) 71259ef0b394Smrg aix_use_runtimelinking=yes 71269ef0b394Smrg break 71279ef0b394Smrg ;; 71289ef0b394Smrg esac 71299ef0b394Smrg done 71309ef0b394Smrg ;; 71319ef0b394Smrg esac 7132266e564dSmrg 71339ef0b394Smrg exp_sym_flag='-bexport' 71349ef0b394Smrg no_entry_flag='-bnoentry' 71359ef0b394Smrg fi 7136266e564dSmrg 71379ef0b394Smrg # When large executables or shared objects are built, AIX ld can 71389ef0b394Smrg # have problems creating the table of contents. If linking a library 71399ef0b394Smrg # or program results in "error TOC overflow" add -mminimal-toc to 71409ef0b394Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 71419ef0b394Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 7142698f425bSmrg 71439ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='' 71449ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 71459ef0b394Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 71469ef0b394Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 71479ef0b394Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 71489ef0b394Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 7149698f425bSmrg 71509ef0b394Smrg if test "$GXX" = yes; then 71519ef0b394Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 71529ef0b394Smrg # We only want to do this on AIX 4.2 and lower, the check 71539ef0b394Smrg # below for broken collect2 doesn't work under 4.3+ 71549ef0b394Smrg collect2name=`${CC} -print-prog-name=collect2` 71559ef0b394Smrg if test -f "$collect2name" && 71569ef0b394Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 71579ef0b394Smrg then 71589ef0b394Smrg # We have reworked collect2 71599ef0b394Smrg : 71609ef0b394Smrg else 71619ef0b394Smrg # We have old collect2 71629ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 71639ef0b394Smrg # It fails to find uninstalled libraries when the uninstalled 71649ef0b394Smrg # path is not listed in the libpath. Setting hardcode_minus_L 71659ef0b394Smrg # to unsupported forces relinking 71669ef0b394Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 71679ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 71689ef0b394Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 71699ef0b394Smrg fi 71709ef0b394Smrg esac 71719ef0b394Smrg shared_flag='-shared' 71729ef0b394Smrg if test "$aix_use_runtimelinking" = yes; then 71739ef0b394Smrg shared_flag="$shared_flag "'${wl}-G' 71749ef0b394Smrg fi 71759ef0b394Smrg else 71769ef0b394Smrg # not using gcc 71779ef0b394Smrg if test "$host_cpu" = ia64; then 71789ef0b394Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 71799ef0b394Smrg # chokes on -Wl,-G. The following line is correct: 71809ef0b394Smrg shared_flag='-G' 71819ef0b394Smrg else 71829ef0b394Smrg if test "$aix_use_runtimelinking" = yes; then 71839ef0b394Smrg shared_flag='${wl}-G' 71849ef0b394Smrg else 71859ef0b394Smrg shared_flag='${wl}-bM:SRE' 71869ef0b394Smrg fi 71879ef0b394Smrg fi 71889ef0b394Smrg fi 7189266e564dSmrg 71909ef0b394Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 71919ef0b394Smrg # It seems that -bexpall does not export symbols beginning with 71929ef0b394Smrg # underscore (_), so it is better to generate a list of symbols to 71939ef0b394Smrg # export. 71949ef0b394Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 71959ef0b394Smrg if test "$aix_use_runtimelinking" = yes; then 71969ef0b394Smrg # Warning - without using the other runtime loading flags (-brtl), 71979ef0b394Smrg # -berok will link without error, but may produce a broken library. 71989ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 71999ef0b394Smrg # Determine the default libpath from the value encoded in an empty 72009ef0b394Smrg # executable. 72019ef0b394Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 72029ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 7203698f425bSmrg 72049ef0b394Smrg _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" 72059ef0b394Smrg else 72069ef0b394Smrg if test "$host_cpu" = ia64; then 72079ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 72089ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 72099ef0b394Smrg _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" 72109ef0b394Smrg else 72119ef0b394Smrg # Determine the default libpath from the value encoded in an 72129ef0b394Smrg # empty executable. 72139ef0b394Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 72149ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 72159ef0b394Smrg # Warning - without using the other run time loading flags, 72169ef0b394Smrg # -berok will link without error, but may produce a broken library. 72179ef0b394Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 72189ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 72199ef0b394Smrg if test "$with_gnu_ld" = yes; then 72209ef0b394Smrg # We only use this code for GNU lds that support --whole-archive. 72219ef0b394Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 72229ef0b394Smrg else 72239ef0b394Smrg # Exported symbols can be pulled into shared objects from archives 72249ef0b394Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 72259ef0b394Smrg fi 72269ef0b394Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 72279ef0b394Smrg # This is similar to how AIX traditionally builds its shared 72289ef0b394Smrg # libraries. 72299ef0b394Smrg _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' 72309ef0b394Smrg fi 7231698f425bSmrg fi 7232698f425bSmrg ;; 7233698f425bSmrg 72349ef0b394Smrg beos*) 72359ef0b394Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 72369ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 72379ef0b394Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 72389ef0b394Smrg # support --undefined. This deserves some investigation. FIXME 72399ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 72409ef0b394Smrg else 72419ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 72429ef0b394Smrg fi 72439ef0b394Smrg ;; 7244698f425bSmrg 72459ef0b394Smrg chorus*) 72469ef0b394Smrg case $cc_basename in 72479ef0b394Smrg *) 72489ef0b394Smrg # FIXME: insert proper C++ library support 72499ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 72509ef0b394Smrg ;; 72519ef0b394Smrg esac 72529ef0b394Smrg ;; 7253698f425bSmrg 72549ef0b394Smrg cygwin* | mingw* | pw32* | cegcc*) 72559ef0b394Smrg case $GXX,$cc_basename in 72569ef0b394Smrg ,cl* | no,cl*) 72579ef0b394Smrg # Native MSVC 72589ef0b394Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 72599ef0b394Smrg # no search path for DLLs. 72609ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 72619ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 72629ef0b394Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 72639ef0b394Smrg _LT_TAGVAR(file_list_spec, $1)='@' 72649ef0b394Smrg # Tell ltmain to make .lib files, not .a files. 72659ef0b394Smrg libext=lib 72669ef0b394Smrg # Tell ltmain to make .dll files, not .so files. 72679ef0b394Smrg shrext_cmds=".dll" 72689ef0b394Smrg # FIXME: Setting linknames here is a bad hack. 72699ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 72709ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 72719ef0b394Smrg $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 72729ef0b394Smrg else 72739ef0b394Smrg $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 72749ef0b394Smrg fi~ 72759ef0b394Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 72769ef0b394Smrg linknames=' 72779ef0b394Smrg # The linker will not automatically build a static lib if we build a DLL. 72789ef0b394Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 72799ef0b394Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 72809ef0b394Smrg # Don't use ranlib 72819ef0b394Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 72829ef0b394Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 72839ef0b394Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 72849ef0b394Smrg case $lt_outputfile in 72859ef0b394Smrg *.exe|*.EXE) ;; 72869ef0b394Smrg *) 72879ef0b394Smrg lt_outputfile="$lt_outputfile.exe" 72889ef0b394Smrg lt_tool_outputfile="$lt_tool_outputfile.exe" 72899ef0b394Smrg ;; 72909ef0b394Smrg esac~ 72919ef0b394Smrg func_to_tool_file "$lt_outputfile"~ 72929ef0b394Smrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 72939ef0b394Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 72949ef0b394Smrg $RM "$lt_outputfile.manifest"; 72959ef0b394Smrg fi' 72969ef0b394Smrg ;; 72979ef0b394Smrg *) 72989ef0b394Smrg # g++ 72999ef0b394Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 73009ef0b394Smrg # as there is no search path for DLLs. 73019ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 73029ef0b394Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 73039ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 73049ef0b394Smrg _LT_TAGVAR(always_export_symbols, $1)=no 73059ef0b394Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 73069ef0b394Smrg 73079ef0b394Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 73089ef0b394Smrg _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' 73099ef0b394Smrg # If the export-symbols file already is a .def file (1st line 73109ef0b394Smrg # is EXPORTS), use it as is; otherwise, prepend... 73119ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 73129ef0b394Smrg cp $export_symbols $output_objdir/$soname.def; 73139ef0b394Smrg else 73149ef0b394Smrg echo EXPORTS > $output_objdir/$soname.def; 73159ef0b394Smrg cat $export_symbols >> $output_objdir/$soname.def; 73169ef0b394Smrg fi~ 73179ef0b394Smrg $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' 73189ef0b394Smrg else 73199ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 73209ef0b394Smrg fi 73219ef0b394Smrg ;; 73229ef0b394Smrg esac 73239ef0b394Smrg ;; 73249ef0b394Smrg darwin* | rhapsody*) 73259ef0b394Smrg _LT_DARWIN_LINKER_FEATURES($1) 73269ef0b394Smrg ;; 7327266e564dSmrg 73289ef0b394Smrg dgux*) 73299ef0b394Smrg case $cc_basename in 73309ef0b394Smrg ec++*) 73319ef0b394Smrg # FIXME: insert proper C++ library support 73329ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 73339ef0b394Smrg ;; 73349ef0b394Smrg ghcx*) 73359ef0b394Smrg # Green Hills C++ Compiler 73369ef0b394Smrg # FIXME: insert proper C++ library support 73379ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 73389ef0b394Smrg ;; 73399ef0b394Smrg *) 73409ef0b394Smrg # FIXME: insert proper C++ library support 73419ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 73429ef0b394Smrg ;; 73439ef0b394Smrg esac 73449ef0b394Smrg ;; 7345266e564dSmrg 7346fb5e8d76Smrg freebsd2.*) 73479ef0b394Smrg # C++ shared libraries reported to be fairly broken before 73489ef0b394Smrg # switch to ELF 73499ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 73509ef0b394Smrg ;; 7351266e564dSmrg 73529ef0b394Smrg freebsd-elf*) 73539ef0b394Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 73549ef0b394Smrg ;; 7355266e564dSmrg 73569ef0b394Smrg freebsd* | dragonfly*) 73579ef0b394Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 73589ef0b394Smrg # conventions 73599ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 73609ef0b394Smrg ;; 7361266e564dSmrg 73629ef0b394Smrg gnu*) 73639ef0b394Smrg ;; 7364266e564dSmrg 73659ef0b394Smrg haiku*) 73669ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 73679ef0b394Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 73689ef0b394Smrg ;; 7369266e564dSmrg 73709ef0b394Smrg hpux9*) 73719ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 73729ef0b394Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 73739ef0b394Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 73749ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 73759ef0b394Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 73769ef0b394Smrg # but as the default 73779ef0b394Smrg # location of the library. 7378266e564dSmrg 73799ef0b394Smrg case $cc_basename in 73809ef0b394Smrg CC*) 73819ef0b394Smrg # FIXME: insert proper C++ library support 73829ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 73839ef0b394Smrg ;; 73849ef0b394Smrg aCC*) 73859ef0b394Smrg _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' 73869ef0b394Smrg # Commands to make compiler produce verbose output that lists 73879ef0b394Smrg # what "hidden" libraries, object files and flags are used when 73889ef0b394Smrg # linking a shared library. 73899ef0b394Smrg # 73909ef0b394Smrg # There doesn't appear to be a way to prevent this compiler from 73919ef0b394Smrg # explicitly linking system object files so we need to strip them 73929ef0b394Smrg # from the output so that they don't get included in the library 73939ef0b394Smrg # dependencies. 73949ef0b394Smrg 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"' 73959ef0b394Smrg ;; 73969ef0b394Smrg *) 73979ef0b394Smrg if test "$GXX" = yes; then 73989ef0b394Smrg _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' 73999ef0b394Smrg else 74009ef0b394Smrg # FIXME: insert proper C++ library support 74019ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 74029ef0b394Smrg fi 74039ef0b394Smrg ;; 74049ef0b394Smrg esac 74059ef0b394Smrg ;; 7406266e564dSmrg 74079ef0b394Smrg hpux10*|hpux11*) 74089ef0b394Smrg if test $with_gnu_ld = no; then 74099ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 74109ef0b394Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7411266e564dSmrg 74129ef0b394Smrg case $host_cpu in 74139ef0b394Smrg hppa*64*|ia64*) 74149ef0b394Smrg ;; 74159ef0b394Smrg *) 74169ef0b394Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 74179ef0b394Smrg ;; 74189ef0b394Smrg esac 74199ef0b394Smrg fi 74209ef0b394Smrg case $host_cpu in 74219ef0b394Smrg hppa*64*|ia64*) 74229ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=no 74239ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 74249ef0b394Smrg ;; 74259ef0b394Smrg *) 74269ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 74279ef0b394Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 74289ef0b394Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 74299ef0b394Smrg # but as the default 74309ef0b394Smrg # location of the library. 74319ef0b394Smrg ;; 74329ef0b394Smrg esac 7433266e564dSmrg 74349ef0b394Smrg case $cc_basename in 74359ef0b394Smrg CC*) 74369ef0b394Smrg # FIXME: insert proper C++ library support 74379ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 74389ef0b394Smrg ;; 74399ef0b394Smrg aCC*) 74409ef0b394Smrg case $host_cpu in 74419ef0b394Smrg hppa*64*) 74429ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 74439ef0b394Smrg ;; 74449ef0b394Smrg ia64*) 74459ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 74469ef0b394Smrg ;; 74479ef0b394Smrg *) 74489ef0b394Smrg _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' 74499ef0b394Smrg ;; 74509ef0b394Smrg esac 74519ef0b394Smrg # Commands to make compiler produce verbose output that lists 74529ef0b394Smrg # what "hidden" libraries, object files and flags are used when 74539ef0b394Smrg # linking a shared library. 74549ef0b394Smrg # 74559ef0b394Smrg # There doesn't appear to be a way to prevent this compiler from 74569ef0b394Smrg # explicitly linking system object files so we need to strip them 74579ef0b394Smrg # from the output so that they don't get included in the library 74589ef0b394Smrg # dependencies. 74599ef0b394Smrg 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"' 74609ef0b394Smrg ;; 74619ef0b394Smrg *) 74629ef0b394Smrg if test "$GXX" = yes; then 74639ef0b394Smrg if test $with_gnu_ld = no; then 74649ef0b394Smrg case $host_cpu in 74659ef0b394Smrg hppa*64*) 74669ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 74679ef0b394Smrg ;; 74689ef0b394Smrg ia64*) 74699ef0b394Smrg _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' 74709ef0b394Smrg ;; 74719ef0b394Smrg *) 74729ef0b394Smrg _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' 74739ef0b394Smrg ;; 74749ef0b394Smrg esac 74759ef0b394Smrg fi 74769ef0b394Smrg else 74779ef0b394Smrg # FIXME: insert proper C++ library support 74789ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 74799ef0b394Smrg fi 74809ef0b394Smrg ;; 74819ef0b394Smrg esac 74829ef0b394Smrg ;; 7483c5629e66Smrg 74849ef0b394Smrg interix[[3-9]]*) 74859ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=no 74869ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 74879ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 74889ef0b394Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 74899ef0b394Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 74909ef0b394Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 74919ef0b394Smrg # default) and relocated if they conflict, which is a slow very memory 74929ef0b394Smrg # consuming and fragmenting process. To avoid this, we pick a random, 74939ef0b394Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 74949ef0b394Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 74959ef0b394Smrg _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' 74969ef0b394Smrg _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' 74979ef0b394Smrg ;; 74989ef0b394Smrg irix5* | irix6*) 74999ef0b394Smrg case $cc_basename in 75009ef0b394Smrg CC*) 75019ef0b394Smrg # SGI C++ 75029ef0b394Smrg _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' 7503266e564dSmrg 75049ef0b394Smrg # Archives containing C++ object files must be created using 75059ef0b394Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 75069ef0b394Smrg # necessary to make sure instantiated templates are included 75079ef0b394Smrg # in the archive. 75089ef0b394Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 75099ef0b394Smrg ;; 75109ef0b394Smrg *) 75119ef0b394Smrg if test "$GXX" = yes; then 75129ef0b394Smrg if test "$with_gnu_ld" = no; then 75139ef0b394Smrg _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' 75149ef0b394Smrg else 75159ef0b394Smrg _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' 75169ef0b394Smrg fi 75179ef0b394Smrg fi 75189ef0b394Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 75199ef0b394Smrg ;; 75209ef0b394Smrg esac 75219ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 75229ef0b394Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 75239ef0b394Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 75249ef0b394Smrg ;; 7525266e564dSmrg 75269ef0b394Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 75279ef0b394Smrg case $cc_basename in 75289ef0b394Smrg KCC*) 75299ef0b394Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 7530266e564dSmrg 75319ef0b394Smrg # KCC will only create a shared library if the output file 75329ef0b394Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 75339ef0b394Smrg # to its proper name (with version) after linking. 75349ef0b394Smrg _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' 75359ef0b394Smrg _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' 75369ef0b394Smrg # Commands to make compiler produce verbose output that lists 75379ef0b394Smrg # what "hidden" libraries, object files and flags are used when 75389ef0b394Smrg # linking a shared library. 75399ef0b394Smrg # 75409ef0b394Smrg # There doesn't appear to be a way to prevent this compiler from 75419ef0b394Smrg # explicitly linking system object files so we need to strip them 75429ef0b394Smrg # from the output so that they don't get included in the library 75439ef0b394Smrg # dependencies. 75449ef0b394Smrg 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"' 7545266e564dSmrg 75469ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 75479ef0b394Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7548266e564dSmrg 75499ef0b394Smrg # Archives containing C++ object files must be created using 75509ef0b394Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 75519ef0b394Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 75529ef0b394Smrg ;; 75539ef0b394Smrg icpc* | ecpc* ) 75549ef0b394Smrg # Intel C++ 75559ef0b394Smrg with_gnu_ld=yes 75569ef0b394Smrg # version 8.0 and above of icpc choke on multiply defined symbols 75579ef0b394Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 75589ef0b394Smrg # earlier do not add the objects themselves. 75599ef0b394Smrg case `$CC -V 2>&1` in 75609ef0b394Smrg *"Version 7."*) 75619ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 75629ef0b394Smrg _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' 75639ef0b394Smrg ;; 75649ef0b394Smrg *) # Version 8.0 or newer 75659ef0b394Smrg tmp_idyn= 75669ef0b394Smrg case $host_cpu in 75679ef0b394Smrg ia64*) tmp_idyn=' -i_dynamic';; 75689ef0b394Smrg esac 75699ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 75709ef0b394Smrg _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' 75719ef0b394Smrg ;; 75729ef0b394Smrg esac 75739ef0b394Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 75749ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 75759ef0b394Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 75769ef0b394Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 75779ef0b394Smrg ;; 75789ef0b394Smrg pgCC* | pgcpp*) 75799ef0b394Smrg # Portland Group C++ compiler 75809ef0b394Smrg case `$CC -V` in 75819ef0b394Smrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 75829ef0b394Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 75839ef0b394Smrg rm -rf $tpldir~ 75849ef0b394Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 75859ef0b394Smrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 75869ef0b394Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 75879ef0b394Smrg rm -rf $tpldir~ 75889ef0b394Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 75899ef0b394Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 75909ef0b394Smrg $RANLIB $oldlib' 75919ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 75929ef0b394Smrg rm -rf $tpldir~ 75939ef0b394Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 75949ef0b394Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 75959ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 75969ef0b394Smrg rm -rf $tpldir~ 75979ef0b394Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 75989ef0b394Smrg $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' 75999ef0b394Smrg ;; 76009ef0b394Smrg *) # Version 6 and above use weak symbols 76019ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 76029ef0b394Smrg _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' 76039ef0b394Smrg ;; 76049ef0b394Smrg esac 7605266e564dSmrg 76069ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 76079ef0b394Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 76089ef0b394Smrg _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' 76099ef0b394Smrg ;; 76109ef0b394Smrg cxx*) 76119ef0b394Smrg # Compaq C++ 76129ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 76139ef0b394Smrg _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' 7614266e564dSmrg 76159ef0b394Smrg runpath_var=LD_RUN_PATH 76169ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 76179ef0b394Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7618266e564dSmrg 76199ef0b394Smrg # Commands to make compiler produce verbose output that lists 76209ef0b394Smrg # what "hidden" libraries, object files and flags are used when 76219ef0b394Smrg # linking a shared library. 76229ef0b394Smrg # 76239ef0b394Smrg # There doesn't appear to be a way to prevent this compiler from 76249ef0b394Smrg # explicitly linking system object files so we need to strip them 76259ef0b394Smrg # from the output so that they don't get included in the library 76269ef0b394Smrg # dependencies. 76279ef0b394Smrg 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' 76289ef0b394Smrg ;; 76299ef0b394Smrg xl* | mpixl* | bgxl*) 76309ef0b394Smrg # IBM XL 8.0 on PPC, with GNU ld 76319ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 76329ef0b394Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 76339ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 76349ef0b394Smrg if test "x$supports_anon_versioning" = xyes; then 76359ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 76369ef0b394Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 76379ef0b394Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 76389ef0b394Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 76399ef0b394Smrg fi 76409ef0b394Smrg ;; 76419ef0b394Smrg *) 76429ef0b394Smrg case `$CC -V 2>&1 | sed 5q` in 76439ef0b394Smrg *Sun\ C*) 76449ef0b394Smrg # Sun C++ 5.9 76459ef0b394Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 76469ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 76479ef0b394Smrg _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' 76489ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 76499ef0b394Smrg _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' 76509ef0b394Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 7651266e564dSmrg 76529ef0b394Smrg # Not sure whether something based on 76539ef0b394Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 76549ef0b394Smrg # would be better. 76559ef0b394Smrg output_verbose_link_cmd='func_echo_all' 7656266e564dSmrg 76579ef0b394Smrg # Archives containing C++ object files must be created using 76589ef0b394Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 76599ef0b394Smrg # necessary to make sure instantiated templates are included 76609ef0b394Smrg # in the archive. 76619ef0b394Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 76629ef0b394Smrg ;; 76639ef0b394Smrg esac 76649ef0b394Smrg ;; 76659ef0b394Smrg esac 76669ef0b394Smrg ;; 7667266e564dSmrg 76689ef0b394Smrg lynxos*) 76699ef0b394Smrg # FIXME: insert proper C++ library support 76709ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 76719ef0b394Smrg ;; 7672266e564dSmrg 76739ef0b394Smrg m88k*) 76749ef0b394Smrg # FIXME: insert proper C++ library support 76759ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 76769ef0b394Smrg ;; 7677266e564dSmrg 76789ef0b394Smrg mvs*) 76799ef0b394Smrg case $cc_basename in 76809ef0b394Smrg cxx*) 76819ef0b394Smrg # FIXME: insert proper C++ library support 76829ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 76839ef0b394Smrg ;; 76849ef0b394Smrg *) 76859ef0b394Smrg # FIXME: insert proper C++ library support 76869ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 76879ef0b394Smrg ;; 76889ef0b394Smrg esac 76899ef0b394Smrg ;; 7690266e564dSmrg 76919ef0b394Smrg netbsd*) 76929ef0b394Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 76939ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 76949ef0b394Smrg wlarc= 76959ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 76969ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 76979ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 76989ef0b394Smrg fi 76999ef0b394Smrg # Workaround some broken pre-1.5 toolchains 77009ef0b394Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 77019ef0b394Smrg ;; 7702266e564dSmrg 77039ef0b394Smrg *nto* | *qnx*) 77049ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 77059ef0b394Smrg ;; 7706266e564dSmrg 77079ef0b394Smrg openbsd2*) 77089ef0b394Smrg # C++ shared libraries are fairly broken 77099ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 77109ef0b394Smrg ;; 7711266e564dSmrg 77129ef0b394Smrg openbsd*) 77139ef0b394Smrg if test -f /usr/libexec/ld.so; then 77149ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 77159ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 77169ef0b394Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 77179ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 77189ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 77199ef0b394Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 77209ef0b394Smrg _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' 77219ef0b394Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 77229ef0b394Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 77239ef0b394Smrg fi 77249ef0b394Smrg output_verbose_link_cmd=func_echo_all 77259ef0b394Smrg else 77269ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 77279ef0b394Smrg fi 77289ef0b394Smrg ;; 7729266e564dSmrg 77309ef0b394Smrg osf3* | osf4* | osf5*) 77319ef0b394Smrg case $cc_basename in 77329ef0b394Smrg KCC*) 77339ef0b394Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 7734266e564dSmrg 77359ef0b394Smrg # KCC will only create a shared library if the output file 77369ef0b394Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 77379ef0b394Smrg # to its proper name (with version) after linking. 77389ef0b394Smrg _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' 7739266e564dSmrg 77409ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 77419ef0b394Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7742266e564dSmrg 77439ef0b394Smrg # Archives containing C++ object files must be created using 77449ef0b394Smrg # the KAI C++ compiler. 77459ef0b394Smrg case $host in 77469ef0b394Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 77479ef0b394Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 77489ef0b394Smrg esac 77499ef0b394Smrg ;; 77509ef0b394Smrg RCC*) 77519ef0b394Smrg # Rational C++ 2.4.1 77529ef0b394Smrg # FIXME: insert proper C++ library support 77539ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 77549ef0b394Smrg ;; 77559ef0b394Smrg cxx*) 77569ef0b394Smrg case $host in 77579ef0b394Smrg osf3*) 77589ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 77599ef0b394Smrg _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' 77609ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 77619ef0b394Smrg ;; 77629ef0b394Smrg *) 77639ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 77649ef0b394Smrg _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' 77659ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 77669ef0b394Smrg echo "-hidden">> $lib.exp~ 77679ef0b394Smrg $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~ 77689ef0b394Smrg $RM $lib.exp' 77699ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 77709ef0b394Smrg ;; 77719ef0b394Smrg esac 7772266e564dSmrg 77739ef0b394Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7774266e564dSmrg 77759ef0b394Smrg # Commands to make compiler produce verbose output that lists 77769ef0b394Smrg # what "hidden" libraries, object files and flags are used when 77779ef0b394Smrg # linking a shared library. 77789ef0b394Smrg # 77799ef0b394Smrg # There doesn't appear to be a way to prevent this compiler from 77809ef0b394Smrg # explicitly linking system object files so we need to strip them 77819ef0b394Smrg # from the output so that they don't get included in the library 77829ef0b394Smrg # dependencies. 77839ef0b394Smrg 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"' 77849ef0b394Smrg ;; 77859ef0b394Smrg *) 77869ef0b394Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 77879ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 77889ef0b394Smrg case $host in 77899ef0b394Smrg osf3*) 77909ef0b394Smrg _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' 77919ef0b394Smrg ;; 77929ef0b394Smrg *) 77939ef0b394Smrg _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' 77949ef0b394Smrg ;; 77959ef0b394Smrg esac 7796266e564dSmrg 77979ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 77989ef0b394Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7799266e564dSmrg 78009ef0b394Smrg # Commands to make compiler produce verbose output that lists 78019ef0b394Smrg # what "hidden" libraries, object files and flags are used when 78029ef0b394Smrg # linking a shared library. 78039ef0b394Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7804266e564dSmrg 78059ef0b394Smrg else 78069ef0b394Smrg # FIXME: insert proper C++ library support 78079ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 78089ef0b394Smrg fi 78099ef0b394Smrg ;; 78109ef0b394Smrg esac 78119ef0b394Smrg ;; 7812266e564dSmrg 78139ef0b394Smrg psos*) 78149ef0b394Smrg # FIXME: insert proper C++ library support 78159ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 78169ef0b394Smrg ;; 7817266e564dSmrg 78189ef0b394Smrg sunos4*) 78199ef0b394Smrg case $cc_basename in 78209ef0b394Smrg CC*) 78219ef0b394Smrg # Sun C++ 4.x 78229ef0b394Smrg # FIXME: insert proper C++ library support 78239ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 78249ef0b394Smrg ;; 78259ef0b394Smrg lcc*) 78269ef0b394Smrg # Lucid 78279ef0b394Smrg # FIXME: insert proper C++ library support 78289ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 78299ef0b394Smrg ;; 78309ef0b394Smrg *) 78319ef0b394Smrg # FIXME: insert proper C++ library support 78329ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 78339ef0b394Smrg ;; 78349ef0b394Smrg esac 78359ef0b394Smrg ;; 7836266e564dSmrg 78379ef0b394Smrg solaris*) 78389ef0b394Smrg case $cc_basename in 78399ef0b394Smrg CC* | sunCC*) 78409ef0b394Smrg # Sun C++ 4.2, 5.x and Centerline C++ 78419ef0b394Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 78429ef0b394Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 78439ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 78449ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 78459ef0b394Smrg $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' 7846266e564dSmrg 78479ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 78489ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 78499ef0b394Smrg case $host_os in 78509ef0b394Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 78519ef0b394Smrg *) 78529ef0b394Smrg # The compiler driver will combine and reorder linker options, 78539ef0b394Smrg # but understands `-z linker_flag'. 78549ef0b394Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 78559ef0b394Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 78569ef0b394Smrg ;; 78579ef0b394Smrg esac 78589ef0b394Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7859266e564dSmrg 78609ef0b394Smrg output_verbose_link_cmd='func_echo_all' 7861266e564dSmrg 78629ef0b394Smrg # Archives containing C++ object files must be created using 78639ef0b394Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 78649ef0b394Smrg # necessary to make sure instantiated templates are included 78659ef0b394Smrg # in the archive. 78669ef0b394Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 78679ef0b394Smrg ;; 78689ef0b394Smrg gcx*) 78699ef0b394Smrg # Green Hills C++ Compiler 78709ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 7871698f425bSmrg 78729ef0b394Smrg # The C++ compiler must be used to create the archive. 78739ef0b394Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 78749ef0b394Smrg ;; 78759ef0b394Smrg *) 78769ef0b394Smrg # GNU C++ compiler with Solaris linker 78779ef0b394Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 78789ef0b394Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 78799ef0b394Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 78809ef0b394Smrg _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' 78819ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 78829ef0b394Smrg $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 7883698f425bSmrg 78849ef0b394Smrg # Commands to make compiler produce verbose output that lists 78859ef0b394Smrg # what "hidden" libraries, object files and flags are used when 78869ef0b394Smrg # linking a shared library. 78879ef0b394Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 78889ef0b394Smrg else 78899ef0b394Smrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 78909ef0b394Smrg # platform. 78919ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 78929ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 78939ef0b394Smrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 7894698f425bSmrg 78959ef0b394Smrg # Commands to make compiler produce verbose output that lists 78969ef0b394Smrg # what "hidden" libraries, object files and flags are used when 78979ef0b394Smrg # linking a shared library. 78989ef0b394Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 78999ef0b394Smrg fi 7900266e564dSmrg 79019ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 79029ef0b394Smrg case $host_os in 79039ef0b394Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 79049ef0b394Smrg *) 79059ef0b394Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 79069ef0b394Smrg ;; 79079ef0b394Smrg esac 79089ef0b394Smrg fi 79099ef0b394Smrg ;; 79109ef0b394Smrg esac 79119ef0b394Smrg ;; 7912266e564dSmrg 79139ef0b394Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 79149ef0b394Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 79159ef0b394Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 79169ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 79179ef0b394Smrg runpath_var='LD_RUN_PATH' 7918266e564dSmrg 79199ef0b394Smrg case $cc_basename in 79209ef0b394Smrg CC*) 79219ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 79229ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 79239ef0b394Smrg ;; 79249ef0b394Smrg *) 79259ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 79269ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 79279ef0b394Smrg ;; 79289ef0b394Smrg esac 79299ef0b394Smrg ;; 7930266e564dSmrg 79319ef0b394Smrg sysv5* | sco3.2v5* | sco5v6*) 79329ef0b394Smrg # Note: We can NOT use -z defs as we might desire, because we do not 79339ef0b394Smrg # link with -lc, and that would cause any symbols used from libc to 79349ef0b394Smrg # always be unresolved, which means just about no library would 79359ef0b394Smrg # ever link correctly. If we're not using GNU ld we use -z text 79369ef0b394Smrg # though, which does catch some bad symbols but isn't as heavy-handed 79379ef0b394Smrg # as -z defs. 79389ef0b394Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 79399ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 79409ef0b394Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 79419ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 79429ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 79439ef0b394Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 79449ef0b394Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 79459ef0b394Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 79469ef0b394Smrg runpath_var='LD_RUN_PATH' 7947266e564dSmrg 79489ef0b394Smrg case $cc_basename in 79499ef0b394Smrg CC*) 79509ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 79519ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 79529ef0b394Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 79539ef0b394Smrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 79549ef0b394Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 79559ef0b394Smrg '"$_LT_TAGVAR(reload_cmds, $1)" 79569ef0b394Smrg ;; 79579ef0b394Smrg *) 79589ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 79599ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 79609ef0b394Smrg ;; 79619ef0b394Smrg esac 79629ef0b394Smrg ;; 79639ef0b394Smrg 79649ef0b394Smrg tandem*) 79659ef0b394Smrg case $cc_basename in 79669ef0b394Smrg NCC*) 79679ef0b394Smrg # NonStop-UX NCC 3.20 79689ef0b394Smrg # FIXME: insert proper C++ library support 79699ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 79709ef0b394Smrg ;; 79719ef0b394Smrg *) 79729ef0b394Smrg # FIXME: insert proper C++ library support 79739ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 79749ef0b394Smrg ;; 79759ef0b394Smrg esac 79769ef0b394Smrg ;; 7977c5629e66Smrg 79789ef0b394Smrg vxworks*) 79799ef0b394Smrg # FIXME: insert proper C++ library support 79809ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 79819ef0b394Smrg ;; 7982266e564dSmrg 79839ef0b394Smrg *) 79849ef0b394Smrg # FIXME: insert proper C++ library support 79859ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 79869ef0b394Smrg ;; 79879ef0b394Smrg esac 7988266e564dSmrg 79899ef0b394Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 79909ef0b394Smrg test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 7991266e564dSmrg 79929ef0b394Smrg _LT_TAGVAR(GCC, $1)="$GXX" 79939ef0b394Smrg _LT_TAGVAR(LD, $1)="$LD" 7994266e564dSmrg 79959ef0b394Smrg ## CAVEAT EMPTOR: 79969ef0b394Smrg ## There is no encapsulation within the following macros, do not change 79979ef0b394Smrg ## the running order or otherwise move them around unless you know exactly 79989ef0b394Smrg ## what you are doing... 79999ef0b394Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 80009ef0b394Smrg _LT_COMPILER_PIC($1) 80019ef0b394Smrg _LT_COMPILER_C_O($1) 80029ef0b394Smrg _LT_COMPILER_FILE_LOCKS($1) 80039ef0b394Smrg _LT_LINKER_SHLIBS($1) 80049ef0b394Smrg _LT_SYS_DYNAMIC_LINKER($1) 80059ef0b394Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 8006266e564dSmrg 80079ef0b394Smrg _LT_CONFIG($1) 80089ef0b394Smrg fi # test -n "$compiler" 8009266e564dSmrg 80109ef0b394Smrg CC=$lt_save_CC 80119ef0b394Smrg CFLAGS=$lt_save_CFLAGS 80129ef0b394Smrg LDCXX=$LD 80139ef0b394Smrg LD=$lt_save_LD 80149ef0b394Smrg GCC=$lt_save_GCC 80159ef0b394Smrg with_gnu_ld=$lt_save_with_gnu_ld 80169ef0b394Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 80179ef0b394Smrg lt_cv_path_LD=$lt_save_path_LD 80189ef0b394Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 80199ef0b394Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 80209ef0b394Smrgfi # test "$_lt_caught_CXX_error" != yes 8021266e564dSmrg 80229ef0b394SmrgAC_LANG_POP 80239ef0b394Smrg])# _LT_LANG_CXX_CONFIG 8024266e564dSmrg 8025698f425bSmrg 80269ef0b394Smrg# _LT_FUNC_STRIPNAME_CNF 80279ef0b394Smrg# ---------------------- 80289ef0b394Smrg# func_stripname_cnf prefix suffix name 8029698f425bSmrg# strip PREFIX and SUFFIX off of NAME. 8030698f425bSmrg# PREFIX and SUFFIX must not contain globbing or regex special 8031698f425bSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading 8032698f425bSmrg# dot (in which case that matches only a dot). 80339ef0b394Smrg# 80349ef0b394Smrg# This function is identical to the (non-XSI) version of func_stripname, 80359ef0b394Smrg# except this one can be used by m4 code that may be executed by configure, 80369ef0b394Smrg# rather than the libtool script. 80379ef0b394Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 80389ef0b394SmrgAC_REQUIRE([_LT_DECL_SED]) 80399ef0b394SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 80409ef0b394Smrgfunc_stripname_cnf () 8041698f425bSmrg{ 8042698f425bSmrg case ${2} in 80439ef0b394Smrg .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 80449ef0b394Smrg *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 8045698f425bSmrg esac 80469ef0b394Smrg} # func_stripname_cnf 80479ef0b394Smrg])# _LT_FUNC_STRIPNAME_CNF 8048266e564dSmrg 80499ef0b394Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 80509ef0b394Smrg# --------------------------------- 80519ef0b394Smrg# Figure out "hidden" library dependencies from verbose 80529ef0b394Smrg# compiler output when linking a shared library. 80539ef0b394Smrg# Parse the compiler output and extract the necessary 80549ef0b394Smrg# objects, libraries and library flags. 80559ef0b394Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 80569ef0b394Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 80579ef0b394SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 80589ef0b394Smrg# Dependencies to place before and after the object being linked: 80599ef0b394Smrg_LT_TAGVAR(predep_objects, $1)= 80609ef0b394Smrg_LT_TAGVAR(postdep_objects, $1)= 80619ef0b394Smrg_LT_TAGVAR(predeps, $1)= 80629ef0b394Smrg_LT_TAGVAR(postdeps, $1)= 80639ef0b394Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 8064266e564dSmrg 80659ef0b394Smrgdnl we can't use the lt_simple_compile_test_code here, 80669ef0b394Smrgdnl because it contains code intended for an executable, 80679ef0b394Smrgdnl not a library. It's possible we should let each 80689ef0b394Smrgdnl tag define a new lt_????_link_test_code variable, 80699ef0b394Smrgdnl but it's only used here... 80709ef0b394Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 80719ef0b394Smrgint a; 80729ef0b394Smrgvoid foo (void) { a = 0; } 8073698f425bSmrg_LT_EOF 80749ef0b394Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 80759ef0b394Smrgclass Foo 8076698f425bSmrg{ 80779ef0b394Smrgpublic: 80789ef0b394Smrg Foo (void) { a = 0; } 80799ef0b394Smrgprivate: 80809ef0b394Smrg int a; 80819ef0b394Smrg}; 8082698f425bSmrg_LT_EOF 80839ef0b394Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 80849ef0b394Smrg subroutine foo 80859ef0b394Smrg implicit none 80869ef0b394Smrg integer*4 a 80879ef0b394Smrg a=0 80889ef0b394Smrg return 80899ef0b394Smrg end 80909ef0b394Smrg_LT_EOF 80919ef0b394Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 80929ef0b394Smrg subroutine foo 80939ef0b394Smrg implicit none 80949ef0b394Smrg integer a 80959ef0b394Smrg a=0 80969ef0b394Smrg return 80979ef0b394Smrg end 80989ef0b394Smrg_LT_EOF 80999ef0b394Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 81009ef0b394Smrgpublic class foo { 81019ef0b394Smrg private int a; 81029ef0b394Smrg public void bar (void) { 81039ef0b394Smrg a = 0; 81049ef0b394Smrg } 81059ef0b394Smrg}; 8106698f425bSmrg_LT_EOF 8107fb5e8d76Smrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 8108fb5e8d76Smrgpackage foo 8109fb5e8d76Smrgfunc foo() { 8110fb5e8d76Smrg} 8111fb5e8d76Smrg_LT_EOF 8112698f425bSmrg]) 8113266e564dSmrg 81149ef0b394Smrg_lt_libdeps_save_CFLAGS=$CFLAGS 81159ef0b394Smrgcase "$CC $CFLAGS " in #( 81169ef0b394Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 81179ef0b394Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 8118fb5e8d76Smrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 81199ef0b394Smrgesac 8120c5629e66Smrg 81219ef0b394Smrgdnl Parse the compiler output and extract the necessary 81229ef0b394Smrgdnl objects, libraries and library flags. 81239ef0b394Smrgif AC_TRY_EVAL(ac_compile); then 81249ef0b394Smrg # Parse the compiler output and extract the necessary 81259ef0b394Smrg # objects, libraries and library flags. 8126c5629e66Smrg 81279ef0b394Smrg # Sentinel used to keep track of whether or not we are before 81289ef0b394Smrg # the conftest object file. 81299ef0b394Smrg pre_test_object_deps_done=no 8130c5629e66Smrg 81319ef0b394Smrg for p in `eval "$output_verbose_link_cmd"`; do 81329ef0b394Smrg case ${prev}${p} in 8133c5629e66Smrg 81349ef0b394Smrg -L* | -R* | -l*) 81359ef0b394Smrg # Some compilers place space between "-{L,R}" and the path. 81369ef0b394Smrg # Remove the space. 81379ef0b394Smrg if test $p = "-L" || 81389ef0b394Smrg test $p = "-R"; then 81399ef0b394Smrg prev=$p 81409ef0b394Smrg continue 81419ef0b394Smrg fi 8142698f425bSmrg 81439ef0b394Smrg # Expand the sysroot to ease extracting the directories later. 81449ef0b394Smrg if test -z "$prev"; then 81459ef0b394Smrg case $p in 81469ef0b394Smrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 81479ef0b394Smrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 81489ef0b394Smrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 81499ef0b394Smrg esac 81509ef0b394Smrg fi 81519ef0b394Smrg case $p in 81529ef0b394Smrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 81539ef0b394Smrg esac 81549ef0b394Smrg if test "$pre_test_object_deps_done" = no; then 81559ef0b394Smrg case ${prev} in 81569ef0b394Smrg -L | -R) 81579ef0b394Smrg # Internal compiler library paths should come after those 81589ef0b394Smrg # provided the user. The postdeps already come after the 81599ef0b394Smrg # user supplied libs so there is no need to process them. 81609ef0b394Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 81619ef0b394Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 81629ef0b394Smrg else 81639ef0b394Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 81649ef0b394Smrg fi 81659ef0b394Smrg ;; 81669ef0b394Smrg # The "-l" case would never come before the object being 81679ef0b394Smrg # linked, so don't bother handling this case. 81689ef0b394Smrg esac 81699ef0b394Smrg else 81709ef0b394Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 81719ef0b394Smrg _LT_TAGVAR(postdeps, $1)="${prev}${p}" 81729ef0b394Smrg else 81739ef0b394Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 81749ef0b394Smrg fi 81759ef0b394Smrg fi 81769ef0b394Smrg prev= 81779ef0b394Smrg ;; 8178698f425bSmrg 81799ef0b394Smrg *.lto.$objext) ;; # Ignore GCC LTO objects 81809ef0b394Smrg *.$objext) 81819ef0b394Smrg # This assumes that the test object file only shows up 81829ef0b394Smrg # once in the compiler output. 81839ef0b394Smrg if test "$p" = "conftest.$objext"; then 81849ef0b394Smrg pre_test_object_deps_done=yes 81859ef0b394Smrg continue 81869ef0b394Smrg fi 8187c5629e66Smrg 81889ef0b394Smrg if test "$pre_test_object_deps_done" = no; then 81899ef0b394Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 81909ef0b394Smrg _LT_TAGVAR(predep_objects, $1)="$p" 81919ef0b394Smrg else 81929ef0b394Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 81939ef0b394Smrg fi 81949ef0b394Smrg else 81959ef0b394Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 81969ef0b394Smrg _LT_TAGVAR(postdep_objects, $1)="$p" 81979ef0b394Smrg else 81989ef0b394Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 81999ef0b394Smrg fi 82009ef0b394Smrg fi 82019ef0b394Smrg ;; 8202c5629e66Smrg 82039ef0b394Smrg *) ;; # Ignore the rest. 8204698f425bSmrg 82059ef0b394Smrg esac 82069ef0b394Smrg done 8207c5629e66Smrg 82089ef0b394Smrg # Clean up. 82099ef0b394Smrg rm -f a.out a.exe 82109ef0b394Smrgelse 82119ef0b394Smrg echo "libtool.m4: error: problem compiling $1 test program" 82129ef0b394Smrgfi 8213c5629e66Smrg 82149ef0b394Smrg$RM -f confest.$objext 82159ef0b394SmrgCFLAGS=$_lt_libdeps_save_CFLAGS 8216c5629e66Smrg 82179ef0b394Smrg# PORTME: override above test on systems where it is broken 82189ef0b394Smrgm4_if([$1], [CXX], 82199ef0b394Smrg[case $host_os in 82209ef0b394Smrginterix[[3-9]]*) 82219ef0b394Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 82229ef0b394Smrg # hack all around it, let's just trust "g++" to DTRT. 82239ef0b394Smrg _LT_TAGVAR(predep_objects,$1)= 82249ef0b394Smrg _LT_TAGVAR(postdep_objects,$1)= 82259ef0b394Smrg _LT_TAGVAR(postdeps,$1)= 82269ef0b394Smrg ;; 8227c5629e66Smrg 82289ef0b394Smrglinux*) 82299ef0b394Smrg case `$CC -V 2>&1 | sed 5q` in 82309ef0b394Smrg *Sun\ C*) 82319ef0b394Smrg # Sun C++ 5.9 8232c5629e66Smrg 82339ef0b394Smrg # The more standards-conforming stlport4 library is 82349ef0b394Smrg # incompatible with the Cstd library. Avoid specifying 82359ef0b394Smrg # it if it's in CXXFLAGS. Ignore libCrun as 82369ef0b394Smrg # -library=stlport4 depends on it. 82379ef0b394Smrg case " $CXX $CXXFLAGS " in 82389ef0b394Smrg *" -library=stlport4 "*) 82399ef0b394Smrg solaris_use_stlport4=yes 82409ef0b394Smrg ;; 82419ef0b394Smrg esac 8242c5629e66Smrg 82439ef0b394Smrg if test "$solaris_use_stlport4" != yes; then 82449ef0b394Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 82459ef0b394Smrg fi 82469ef0b394Smrg ;; 82479ef0b394Smrg esac 82489ef0b394Smrg ;; 8249c5629e66Smrg 82509ef0b394Smrgsolaris*) 82519ef0b394Smrg case $cc_basename in 82529ef0b394Smrg CC* | sunCC*) 82539ef0b394Smrg # The more standards-conforming stlport4 library is 82549ef0b394Smrg # incompatible with the Cstd library. Avoid specifying 82559ef0b394Smrg # it if it's in CXXFLAGS. Ignore libCrun as 82569ef0b394Smrg # -library=stlport4 depends on it. 82579ef0b394Smrg case " $CXX $CXXFLAGS " in 82589ef0b394Smrg *" -library=stlport4 "*) 82599ef0b394Smrg solaris_use_stlport4=yes 82609ef0b394Smrg ;; 82619ef0b394Smrg esac 8262c5629e66Smrg 82639ef0b394Smrg # Adding this requires a known-good setup of shared libraries for 82649ef0b394Smrg # Sun compiler versions before 5.6, else PIC objects from an old 82659ef0b394Smrg # archive will be linked into the output, leading to subtle bugs. 82669ef0b394Smrg if test "$solaris_use_stlport4" != yes; then 82679ef0b394Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 82689ef0b394Smrg fi 82699ef0b394Smrg ;; 82709ef0b394Smrg esac 82719ef0b394Smrg ;; 82729ef0b394Smrgesac 8273698f425bSmrg]) 8274c5629e66Smrg 82759ef0b394Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 82769ef0b394Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 82779ef0b394Smrgesac 82789ef0b394Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 82799ef0b394Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 82809ef0b394Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 82819ef0b394Smrgfi 82829ef0b394Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 82839ef0b394Smrg [The directories searched by this compiler when creating a shared library]) 82849ef0b394Smrg_LT_TAGDECL([], [predep_objects], [1], 82859ef0b394Smrg [Dependencies to place before and after the objects being linked to 82869ef0b394Smrg create a shared library]) 82879ef0b394Smrg_LT_TAGDECL([], [postdep_objects], [1]) 82889ef0b394Smrg_LT_TAGDECL([], [predeps], [1]) 82899ef0b394Smrg_LT_TAGDECL([], [postdeps], [1]) 82909ef0b394Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 82919ef0b394Smrg [The library search path used internally by the compiler when linking 82929ef0b394Smrg a shared library]) 82939ef0b394Smrg])# _LT_SYS_HIDDEN_LIBDEPS 8294c5629e66Smrg 8295c5629e66Smrg 82969ef0b394Smrg# _LT_LANG_F77_CONFIG([TAG]) 82979ef0b394Smrg# -------------------------- 82989ef0b394Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 82999ef0b394Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 83009ef0b394Smrg# to write the compiler configuration to `libtool'. 83019ef0b394Smrgm4_defun([_LT_LANG_F77_CONFIG], 83029ef0b394Smrg[AC_LANG_PUSH(Fortran 77) 83039ef0b394Smrgif test -z "$F77" || test "X$F77" = "Xno"; then 83049ef0b394Smrg _lt_disable_F77=yes 83059ef0b394Smrgfi 8306698f425bSmrg 83079ef0b394Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 83089ef0b394Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 83099ef0b394Smrg_LT_TAGVAR(always_export_symbols, $1)=no 83109ef0b394Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 83119ef0b394Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 83129ef0b394Smrg_LT_TAGVAR(hardcode_direct, $1)=no 83139ef0b394Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 83149ef0b394Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 83159ef0b394Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 83169ef0b394Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 83179ef0b394Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 83189ef0b394Smrg_LT_TAGVAR(inherit_rpath, $1)=no 83199ef0b394Smrg_LT_TAGVAR(module_cmds, $1)= 83209ef0b394Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 83219ef0b394Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 83229ef0b394Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 83239ef0b394Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 83249ef0b394Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 83259ef0b394Smrg_LT_TAGVAR(no_undefined_flag, $1)= 83269ef0b394Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 83279ef0b394Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 8328698f425bSmrg 83299ef0b394Smrg# Source file extension for f77 test sources. 83309ef0b394Smrgac_ext=f 8331698f425bSmrg 83329ef0b394Smrg# Object file extension for compiled f77 test sources. 83339ef0b394Smrgobjext=o 83349ef0b394Smrg_LT_TAGVAR(objext, $1)=$objext 8335698f425bSmrg 83369ef0b394Smrg# No sense in running all these tests if we already determined that 83379ef0b394Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 83389ef0b394Smrg# are currently assumed to apply to all compilers on this platform, 83399ef0b394Smrg# and will be corrupted by setting them based on a non-working compiler. 83409ef0b394Smrgif test "$_lt_disable_F77" != yes; then 83419ef0b394Smrg # Code to be used in simple compile tests 83429ef0b394Smrg lt_simple_compile_test_code="\ 83439ef0b394Smrg subroutine t 83449ef0b394Smrg return 83459ef0b394Smrg end 83469ef0b394Smrg" 8347698f425bSmrg 83489ef0b394Smrg # Code to be used in simple link tests 83499ef0b394Smrg lt_simple_link_test_code="\ 83509ef0b394Smrg program t 83519ef0b394Smrg end 83529ef0b394Smrg" 8353698f425bSmrg 83549ef0b394Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 83559ef0b394Smrg _LT_TAG_COMPILER 8356c5629e66Smrg 83579ef0b394Smrg # save warnings/boilerplate of simple test code 83589ef0b394Smrg _LT_COMPILER_BOILERPLATE 83599ef0b394Smrg _LT_LINKER_BOILERPLATE 8360c5629e66Smrg 83619ef0b394Smrg # Allow CC to be a program name with arguments. 83629ef0b394Smrg lt_save_CC="$CC" 83639ef0b394Smrg lt_save_GCC=$GCC 83649ef0b394Smrg lt_save_CFLAGS=$CFLAGS 83659ef0b394Smrg CC=${F77-"f77"} 83669ef0b394Smrg CFLAGS=$FFLAGS 83679ef0b394Smrg compiler=$CC 83689ef0b394Smrg _LT_TAGVAR(compiler, $1)=$CC 83699ef0b394Smrg _LT_CC_BASENAME([$compiler]) 83709ef0b394Smrg GCC=$G77 83719ef0b394Smrg if test -n "$compiler"; then 83729ef0b394Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 83739ef0b394Smrg AC_MSG_RESULT([$can_build_shared]) 83749ef0b394Smrg 83759ef0b394Smrg AC_MSG_CHECKING([whether to build shared libraries]) 83769ef0b394Smrg test "$can_build_shared" = "no" && enable_shared=no 83779ef0b394Smrg 83789ef0b394Smrg # On AIX, shared libraries and static libraries use the same namespace, and 83799ef0b394Smrg # are all built from PIC. 83809ef0b394Smrg case $host_os in 83819ef0b394Smrg aix3*) 83829ef0b394Smrg test "$enable_shared" = yes && enable_static=no 83839ef0b394Smrg if test -n "$RANLIB"; then 83849ef0b394Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 83859ef0b394Smrg postinstall_cmds='$RANLIB $lib' 83869ef0b394Smrg fi 83879ef0b394Smrg ;; 83889ef0b394Smrg aix[[4-9]]*) 83899ef0b394Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 83909ef0b394Smrg test "$enable_shared" = yes && enable_static=no 8391698f425bSmrg fi 83929ef0b394Smrg ;; 83939ef0b394Smrg esac 83949ef0b394Smrg AC_MSG_RESULT([$enable_shared]) 83959ef0b394Smrg 83969ef0b394Smrg AC_MSG_CHECKING([whether to build static libraries]) 83979ef0b394Smrg # Make sure either enable_shared or enable_static is yes. 83989ef0b394Smrg test "$enable_shared" = yes || enable_static=yes 83999ef0b394Smrg AC_MSG_RESULT([$enable_static]) 8400698f425bSmrg 84019ef0b394Smrg _LT_TAGVAR(GCC, $1)="$G77" 84029ef0b394Smrg _LT_TAGVAR(LD, $1)="$LD" 8403698f425bSmrg 84049ef0b394Smrg ## CAVEAT EMPTOR: 84059ef0b394Smrg ## There is no encapsulation within the following macros, do not change 84069ef0b394Smrg ## the running order or otherwise move them around unless you know exactly 84079ef0b394Smrg ## what you are doing... 84089ef0b394Smrg _LT_COMPILER_PIC($1) 84099ef0b394Smrg _LT_COMPILER_C_O($1) 84109ef0b394Smrg _LT_COMPILER_FILE_LOCKS($1) 84119ef0b394Smrg _LT_LINKER_SHLIBS($1) 84129ef0b394Smrg _LT_SYS_DYNAMIC_LINKER($1) 84139ef0b394Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 8414698f425bSmrg 84159ef0b394Smrg _LT_CONFIG($1) 84169ef0b394Smrg fi # test -n "$compiler" 8417c5629e66Smrg 84189ef0b394Smrg GCC=$lt_save_GCC 84199ef0b394Smrg CC="$lt_save_CC" 84209ef0b394Smrg CFLAGS="$lt_save_CFLAGS" 84219ef0b394Smrgfi # test "$_lt_disable_F77" != yes 8422c5629e66Smrg 84239ef0b394SmrgAC_LANG_POP 84249ef0b394Smrg])# _LT_LANG_F77_CONFIG 8425698f425bSmrg 8426698f425bSmrg 84279ef0b394Smrg# _LT_LANG_FC_CONFIG([TAG]) 84289ef0b394Smrg# ------------------------- 84299ef0b394Smrg# Ensure that the configuration variables for a Fortran compiler are 84309ef0b394Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 84319ef0b394Smrg# to write the compiler configuration to `libtool'. 84329ef0b394Smrgm4_defun([_LT_LANG_FC_CONFIG], 84339ef0b394Smrg[AC_LANG_PUSH(Fortran) 8434698f425bSmrg 84359ef0b394Smrgif test -z "$FC" || test "X$FC" = "Xno"; then 84369ef0b394Smrg _lt_disable_FC=yes 84379ef0b394Smrgfi 8438698f425bSmrg 84399ef0b394Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 84409ef0b394Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 84419ef0b394Smrg_LT_TAGVAR(always_export_symbols, $1)=no 84429ef0b394Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 84439ef0b394Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 84449ef0b394Smrg_LT_TAGVAR(hardcode_direct, $1)=no 84459ef0b394Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 84469ef0b394Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 84479ef0b394Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 84489ef0b394Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 84499ef0b394Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 84509ef0b394Smrg_LT_TAGVAR(inherit_rpath, $1)=no 84519ef0b394Smrg_LT_TAGVAR(module_cmds, $1)= 84529ef0b394Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 84539ef0b394Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 84549ef0b394Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 84559ef0b394Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 84569ef0b394Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 84579ef0b394Smrg_LT_TAGVAR(no_undefined_flag, $1)= 84589ef0b394Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 84599ef0b394Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 8460c5629e66Smrg 84619ef0b394Smrg# Source file extension for fc test sources. 84629ef0b394Smrgac_ext=${ac_fc_srcext-f} 8463698f425bSmrg 84649ef0b394Smrg# Object file extension for compiled fc test sources. 84659ef0b394Smrgobjext=o 84669ef0b394Smrg_LT_TAGVAR(objext, $1)=$objext 8467698f425bSmrg 84689ef0b394Smrg# No sense in running all these tests if we already determined that 84699ef0b394Smrg# the FC compiler isn't working. Some variables (like enable_shared) 84709ef0b394Smrg# are currently assumed to apply to all compilers on this platform, 84719ef0b394Smrg# and will be corrupted by setting them based on a non-working compiler. 84729ef0b394Smrgif test "$_lt_disable_FC" != yes; then 84739ef0b394Smrg # Code to be used in simple compile tests 84749ef0b394Smrg lt_simple_compile_test_code="\ 84759ef0b394Smrg subroutine t 84769ef0b394Smrg return 84779ef0b394Smrg end 84789ef0b394Smrg" 8479698f425bSmrg 84809ef0b394Smrg # Code to be used in simple link tests 84819ef0b394Smrg lt_simple_link_test_code="\ 84829ef0b394Smrg program t 84839ef0b394Smrg end 84849ef0b394Smrg" 8485698f425bSmrg 84869ef0b394Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 84879ef0b394Smrg _LT_TAG_COMPILER 8488698f425bSmrg 84899ef0b394Smrg # save warnings/boilerplate of simple test code 84909ef0b394Smrg _LT_COMPILER_BOILERPLATE 84919ef0b394Smrg _LT_LINKER_BOILERPLATE 8492698f425bSmrg 84939ef0b394Smrg # Allow CC to be a program name with arguments. 84949ef0b394Smrg lt_save_CC="$CC" 84959ef0b394Smrg lt_save_GCC=$GCC 84969ef0b394Smrg lt_save_CFLAGS=$CFLAGS 84979ef0b394Smrg CC=${FC-"f95"} 84989ef0b394Smrg CFLAGS=$FCFLAGS 84999ef0b394Smrg compiler=$CC 85009ef0b394Smrg GCC=$ac_cv_fc_compiler_gnu 8501698f425bSmrg 85029ef0b394Smrg _LT_TAGVAR(compiler, $1)=$CC 85039ef0b394Smrg _LT_CC_BASENAME([$compiler]) 8504698f425bSmrg 85059ef0b394Smrg if test -n "$compiler"; then 85069ef0b394Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 85079ef0b394Smrg AC_MSG_RESULT([$can_build_shared]) 85089ef0b394Smrg 85099ef0b394Smrg AC_MSG_CHECKING([whether to build shared libraries]) 85109ef0b394Smrg test "$can_build_shared" = "no" && enable_shared=no 85119ef0b394Smrg 85129ef0b394Smrg # On AIX, shared libraries and static libraries use the same namespace, and 85139ef0b394Smrg # are all built from PIC. 85149ef0b394Smrg case $host_os in 85159ef0b394Smrg aix3*) 85169ef0b394Smrg test "$enable_shared" = yes && enable_static=no 85179ef0b394Smrg if test -n "$RANLIB"; then 85189ef0b394Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 85199ef0b394Smrg postinstall_cmds='$RANLIB $lib' 85209ef0b394Smrg fi 85219ef0b394Smrg ;; 85229ef0b394Smrg aix[[4-9]]*) 85239ef0b394Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 85249ef0b394Smrg test "$enable_shared" = yes && enable_static=no 8525698f425bSmrg fi 85269ef0b394Smrg ;; 85279ef0b394Smrg esac 85289ef0b394Smrg AC_MSG_RESULT([$enable_shared]) 8529c5629e66Smrg 85309ef0b394Smrg AC_MSG_CHECKING([whether to build static libraries]) 85319ef0b394Smrg # Make sure either enable_shared or enable_static is yes. 85329ef0b394Smrg test "$enable_shared" = yes || enable_static=yes 85339ef0b394Smrg AC_MSG_RESULT([$enable_static]) 8534c5629e66Smrg 85359ef0b394Smrg _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 85369ef0b394Smrg _LT_TAGVAR(LD, $1)="$LD" 8537698f425bSmrg 85389ef0b394Smrg ## CAVEAT EMPTOR: 85399ef0b394Smrg ## There is no encapsulation within the following macros, do not change 85409ef0b394Smrg ## the running order or otherwise move them around unless you know exactly 85419ef0b394Smrg ## what you are doing... 85429ef0b394Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 85439ef0b394Smrg _LT_COMPILER_PIC($1) 85449ef0b394Smrg _LT_COMPILER_C_O($1) 85459ef0b394Smrg _LT_COMPILER_FILE_LOCKS($1) 85469ef0b394Smrg _LT_LINKER_SHLIBS($1) 85479ef0b394Smrg _LT_SYS_DYNAMIC_LINKER($1) 85489ef0b394Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 8549698f425bSmrg 8550fb5e8d76Smrg _LT_CONFIG($1) 8551fb5e8d76Smrg fi # test -n "$compiler" 8552fb5e8d76Smrg 8553fb5e8d76Smrg GCC=$lt_save_GCC 8554fb5e8d76Smrg CC=$lt_save_CC 8555fb5e8d76Smrg CFLAGS=$lt_save_CFLAGS 8556fb5e8d76Smrgfi # test "$_lt_disable_FC" != yes 8557fb5e8d76Smrg 8558fb5e8d76SmrgAC_LANG_POP 8559fb5e8d76Smrg])# _LT_LANG_FC_CONFIG 8560fb5e8d76Smrg 8561fb5e8d76Smrg 8562fb5e8d76Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 8563fb5e8d76Smrg# -------------------------- 8564fb5e8d76Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 8565fb5e8d76Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 8566fb5e8d76Smrg# to write the compiler configuration to `libtool'. 8567fb5e8d76Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 8568fb5e8d76Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 8569fb5e8d76SmrgAC_LANG_SAVE 8570fb5e8d76Smrg 8571fb5e8d76Smrg# Source file extension for Java test sources. 8572fb5e8d76Smrgac_ext=java 8573fb5e8d76Smrg 8574fb5e8d76Smrg# Object file extension for compiled Java test sources. 8575fb5e8d76Smrgobjext=o 8576fb5e8d76Smrg_LT_TAGVAR(objext, $1)=$objext 8577fb5e8d76Smrg 8578fb5e8d76Smrg# Code to be used in simple compile tests 8579fb5e8d76Smrglt_simple_compile_test_code="class foo {}" 8580fb5e8d76Smrg 8581fb5e8d76Smrg# Code to be used in simple link tests 8582fb5e8d76Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 8583fb5e8d76Smrg 8584fb5e8d76Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8585fb5e8d76Smrg_LT_TAG_COMPILER 8586fb5e8d76Smrg 8587fb5e8d76Smrg# save warnings/boilerplate of simple test code 8588fb5e8d76Smrg_LT_COMPILER_BOILERPLATE 8589fb5e8d76Smrg_LT_LINKER_BOILERPLATE 8590fb5e8d76Smrg 8591fb5e8d76Smrg# Allow CC to be a program name with arguments. 8592fb5e8d76Smrglt_save_CC=$CC 8593fb5e8d76Smrglt_save_CFLAGS=$CFLAGS 8594fb5e8d76Smrglt_save_GCC=$GCC 8595fb5e8d76SmrgGCC=yes 8596fb5e8d76SmrgCC=${GCJ-"gcj"} 8597fb5e8d76SmrgCFLAGS=$GCJFLAGS 8598fb5e8d76Smrgcompiler=$CC 8599fb5e8d76Smrg_LT_TAGVAR(compiler, $1)=$CC 8600fb5e8d76Smrg_LT_TAGVAR(LD, $1)="$LD" 8601fb5e8d76Smrg_LT_CC_BASENAME([$compiler]) 8602fb5e8d76Smrg 8603fb5e8d76Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 8604fb5e8d76Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8605fb5e8d76Smrg 8606fb5e8d76Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8607fb5e8d76Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 8608fb5e8d76Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8609fb5e8d76Smrg 8610fb5e8d76Smrgif test -n "$compiler"; then 8611fb5e8d76Smrg _LT_COMPILER_NO_RTTI($1) 8612fb5e8d76Smrg _LT_COMPILER_PIC($1) 8613fb5e8d76Smrg _LT_COMPILER_C_O($1) 8614fb5e8d76Smrg _LT_COMPILER_FILE_LOCKS($1) 8615fb5e8d76Smrg _LT_LINKER_SHLIBS($1) 8616fb5e8d76Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 8617698f425bSmrg 8618fb5e8d76Smrg _LT_CONFIG($1) 8619fb5e8d76Smrgfi 8620698f425bSmrg 8621fb5e8d76SmrgAC_LANG_RESTORE 8622fb5e8d76Smrg 8623fb5e8d76SmrgGCC=$lt_save_GCC 8624fb5e8d76SmrgCC=$lt_save_CC 8625fb5e8d76SmrgCFLAGS=$lt_save_CFLAGS 8626fb5e8d76Smrg])# _LT_LANG_GCJ_CONFIG 8627698f425bSmrg 8628698f425bSmrg 8629fb5e8d76Smrg# _LT_LANG_GO_CONFIG([TAG]) 86309ef0b394Smrg# -------------------------- 8631fb5e8d76Smrg# Ensure that the configuration variables for the GNU Go compiler 86329ef0b394Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 86339ef0b394Smrg# to write the compiler configuration to `libtool'. 8634fb5e8d76Smrgm4_defun([_LT_LANG_GO_CONFIG], 8635fb5e8d76Smrg[AC_REQUIRE([LT_PROG_GO])dnl 86369ef0b394SmrgAC_LANG_SAVE 86379ef0b394Smrg 8638fb5e8d76Smrg# Source file extension for Go test sources. 8639fb5e8d76Smrgac_ext=go 8640698f425bSmrg 8641fb5e8d76Smrg# Object file extension for compiled Go test sources. 86429ef0b394Smrgobjext=o 86439ef0b394Smrg_LT_TAGVAR(objext, $1)=$objext 8644698f425bSmrg 86459ef0b394Smrg# Code to be used in simple compile tests 8646fb5e8d76Smrglt_simple_compile_test_code="package main; func main() { }" 8647698f425bSmrg 86489ef0b394Smrg# Code to be used in simple link tests 8649fb5e8d76Smrglt_simple_link_test_code='package main; func main() { }' 8650698f425bSmrg 86519ef0b394Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 86529ef0b394Smrg_LT_TAG_COMPILER 8653698f425bSmrg 86549ef0b394Smrg# save warnings/boilerplate of simple test code 86559ef0b394Smrg_LT_COMPILER_BOILERPLATE 86569ef0b394Smrg_LT_LINKER_BOILERPLATE 8657698f425bSmrg 86589ef0b394Smrg# Allow CC to be a program name with arguments. 86599ef0b394Smrglt_save_CC=$CC 86609ef0b394Smrglt_save_CFLAGS=$CFLAGS 86619ef0b394Smrglt_save_GCC=$GCC 86629ef0b394SmrgGCC=yes 8663fb5e8d76SmrgCC=${GOC-"gccgo"} 8664fb5e8d76SmrgCFLAGS=$GOFLAGS 86659ef0b394Smrgcompiler=$CC 86669ef0b394Smrg_LT_TAGVAR(compiler, $1)=$CC 86679ef0b394Smrg_LT_TAGVAR(LD, $1)="$LD" 86689ef0b394Smrg_LT_CC_BASENAME([$compiler]) 8669698f425bSmrg 8670fb5e8d76Smrg# Go did not exist at the time GCC didn't implicitly link libc in. 86719ef0b394Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8672698f425bSmrg 86739ef0b394Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 86749ef0b394Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 86759ef0b394Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8676698f425bSmrg 86779ef0b394Smrgif test -n "$compiler"; then 86789ef0b394Smrg _LT_COMPILER_NO_RTTI($1) 86799ef0b394Smrg _LT_COMPILER_PIC($1) 86809ef0b394Smrg _LT_COMPILER_C_O($1) 86819ef0b394Smrg _LT_COMPILER_FILE_LOCKS($1) 86829ef0b394Smrg _LT_LINKER_SHLIBS($1) 86839ef0b394Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 8684698f425bSmrg 86859ef0b394Smrg _LT_CONFIG($1) 86869ef0b394Smrgfi 8687698f425bSmrg 86889ef0b394SmrgAC_LANG_RESTORE 8689698f425bSmrg 86909ef0b394SmrgGCC=$lt_save_GCC 86919ef0b394SmrgCC=$lt_save_CC 86929ef0b394SmrgCFLAGS=$lt_save_CFLAGS 8693fb5e8d76Smrg])# _LT_LANG_GO_CONFIG 8694698f425bSmrg 8695698f425bSmrg 86969ef0b394Smrg# _LT_LANG_RC_CONFIG([TAG]) 86979ef0b394Smrg# ------------------------- 86989ef0b394Smrg# Ensure that the configuration variables for the Windows resource compiler 86999ef0b394Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 87009ef0b394Smrg# to write the compiler configuration to `libtool'. 87019ef0b394Smrgm4_defun([_LT_LANG_RC_CONFIG], 87029ef0b394Smrg[AC_REQUIRE([LT_PROG_RC])dnl 87039ef0b394SmrgAC_LANG_SAVE 8704698f425bSmrg 87059ef0b394Smrg# Source file extension for RC test sources. 87069ef0b394Smrgac_ext=rc 8707698f425bSmrg 87089ef0b394Smrg# Object file extension for compiled RC test sources. 87099ef0b394Smrgobjext=o 87109ef0b394Smrg_LT_TAGVAR(objext, $1)=$objext 8711698f425bSmrg 87129ef0b394Smrg# Code to be used in simple compile tests 87139ef0b394Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 8714698f425bSmrg 87159ef0b394Smrg# Code to be used in simple link tests 87169ef0b394Smrglt_simple_link_test_code="$lt_simple_compile_test_code" 8717698f425bSmrg 87189ef0b394Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 87199ef0b394Smrg_LT_TAG_COMPILER 8720698f425bSmrg 87219ef0b394Smrg# save warnings/boilerplate of simple test code 87229ef0b394Smrg_LT_COMPILER_BOILERPLATE 87239ef0b394Smrg_LT_LINKER_BOILERPLATE 8724698f425bSmrg 87259ef0b394Smrg# Allow CC to be a program name with arguments. 87269ef0b394Smrglt_save_CC="$CC" 87279ef0b394Smrglt_save_CFLAGS=$CFLAGS 87289ef0b394Smrglt_save_GCC=$GCC 87299ef0b394SmrgGCC= 87309ef0b394SmrgCC=${RC-"windres"} 87319ef0b394SmrgCFLAGS= 87329ef0b394Smrgcompiler=$CC 87339ef0b394Smrg_LT_TAGVAR(compiler, $1)=$CC 87349ef0b394Smrg_LT_CC_BASENAME([$compiler]) 87359ef0b394Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 8736698f425bSmrg 87379ef0b394Smrgif test -n "$compiler"; then 87389ef0b394Smrg : 87399ef0b394Smrg _LT_CONFIG($1) 87409ef0b394Smrgfi 8741698f425bSmrg 87429ef0b394SmrgGCC=$lt_save_GCC 87439ef0b394SmrgAC_LANG_RESTORE 87449ef0b394SmrgCC=$lt_save_CC 87459ef0b394SmrgCFLAGS=$lt_save_CFLAGS 87469ef0b394Smrg])# _LT_LANG_RC_CONFIG 8747c5629e66Smrg 8748c5629e66Smrg 87499ef0b394Smrg# LT_PROG_GCJ 87509ef0b394Smrg# ----------- 87519ef0b394SmrgAC_DEFUN([LT_PROG_GCJ], 87529ef0b394Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 87539ef0b394Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 87549ef0b394Smrg [AC_CHECK_TOOL(GCJ, gcj,) 87559ef0b394Smrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 87569ef0b394Smrg AC_SUBST(GCJFLAGS)])])[]dnl 87579ef0b394Smrg]) 8758c5629e66Smrg 87599ef0b394Smrg# Old name: 87609ef0b394SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 87619ef0b394Smrgdnl aclocal-1.4 backwards compatibility: 87629ef0b394Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 8763c5629e66Smrg 8764c5629e66Smrg 8765fb5e8d76Smrg# LT_PROG_GO 8766fb5e8d76Smrg# ---------- 8767fb5e8d76SmrgAC_DEFUN([LT_PROG_GO], 8768fb5e8d76Smrg[AC_CHECK_TOOL(GOC, gccgo,) 8769fb5e8d76Smrg]) 8770fb5e8d76Smrg 8771fb5e8d76Smrg 87729ef0b394Smrg# LT_PROG_RC 87739ef0b394Smrg# ---------- 87749ef0b394SmrgAC_DEFUN([LT_PROG_RC], 87759ef0b394Smrg[AC_CHECK_TOOL(RC, windres,) 87769ef0b394Smrg]) 8777c5629e66Smrg 87789ef0b394Smrg# Old name: 87799ef0b394SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 87809ef0b394Smrgdnl aclocal-1.4 backwards compatibility: 87819ef0b394Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 8782c5629e66Smrg 8783698f425bSmrg 87849ef0b394Smrg# _LT_DECL_EGREP 87859ef0b394Smrg# -------------- 87869ef0b394Smrg# If we don't have a new enough Autoconf to choose the best grep 87879ef0b394Smrg# available, choose the one first in the user's PATH. 87889ef0b394Smrgm4_defun([_LT_DECL_EGREP], 87899ef0b394Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 87909ef0b394SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 87919ef0b394Smrgtest -z "$GREP" && GREP=grep 87929ef0b394Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 87939ef0b394Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 87949ef0b394Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 87959ef0b394Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 87969ef0b394SmrgAC_SUBST([GREP]) 8797c5629e66Smrg]) 8798c5629e66Smrg 8799c5629e66Smrg 88009ef0b394Smrg# _LT_DECL_OBJDUMP 88019ef0b394Smrg# -------------- 88029ef0b394Smrg# If we don't have a new enough Autoconf to choose the best objdump 88039ef0b394Smrg# available, choose the one first in the user's PATH. 88049ef0b394Smrgm4_defun([_LT_DECL_OBJDUMP], 88059ef0b394Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 88069ef0b394Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 88079ef0b394Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 88089ef0b394SmrgAC_SUBST([OBJDUMP]) 88099ef0b394Smrg]) 88109ef0b394Smrg 88119ef0b394Smrg# _LT_DECL_DLLTOOL 88129ef0b394Smrg# ---------------- 88139ef0b394Smrg# Ensure DLLTOOL variable is set. 88149ef0b394Smrgm4_defun([_LT_DECL_DLLTOOL], 88159ef0b394Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 88169ef0b394Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 88179ef0b394Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 88189ef0b394SmrgAC_SUBST([DLLTOOL]) 88199ef0b394Smrg]) 8820c5629e66Smrg 88219ef0b394Smrg# _LT_DECL_SED 88229ef0b394Smrg# ------------ 88239ef0b394Smrg# Check for a fully-functional sed program, that truncates 88249ef0b394Smrg# as few characters as possible. Prefer GNU sed if found. 88259ef0b394Smrgm4_defun([_LT_DECL_SED], 88269ef0b394Smrg[AC_PROG_SED 88279ef0b394Smrgtest -z "$SED" && SED=sed 88289ef0b394SmrgXsed="$SED -e 1s/^X//" 88299ef0b394Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 88309ef0b394Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 88319ef0b394Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 88329ef0b394Smrg])# _LT_DECL_SED 8833c5629e66Smrg 88349ef0b394Smrgm4_ifndef([AC_PROG_SED], [ 88359ef0b394Smrg# NOTE: This macro has been submitted for inclusion into # 88369ef0b394Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 88379ef0b394Smrg# a released version of Autoconf we should remove this # 88389ef0b394Smrg# macro and use it instead. # 8839c5629e66Smrg 88409ef0b394Smrgm4_defun([AC_PROG_SED], 88419ef0b394Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 88429ef0b394SmrgAC_CACHE_VAL(lt_cv_path_SED, 88439ef0b394Smrg[# Loop through the user's path and test for sed and gsed. 88449ef0b394Smrg# Then use that list of sed's as ones to test for truncation. 88459ef0b394Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 88469ef0b394Smrgfor as_dir in $PATH 88479ef0b394Smrgdo 88489ef0b394Smrg IFS=$as_save_IFS 88499ef0b394Smrg test -z "$as_dir" && as_dir=. 88509ef0b394Smrg for lt_ac_prog in sed gsed; do 88519ef0b394Smrg for ac_exec_ext in '' $ac_executable_extensions; do 88529ef0b394Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 88539ef0b394Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 88549ef0b394Smrg fi 88559ef0b394Smrg done 88569ef0b394Smrg done 88579ef0b394Smrgdone 88589ef0b394SmrgIFS=$as_save_IFS 88599ef0b394Smrglt_ac_max=0 88609ef0b394Smrglt_ac_count=0 88619ef0b394Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 88629ef0b394Smrg# along with /bin/sed that truncates output. 88639ef0b394Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 88649ef0b394Smrg test ! -f $lt_ac_sed && continue 88659ef0b394Smrg cat /dev/null > conftest.in 88669ef0b394Smrg lt_ac_count=0 88679ef0b394Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 88689ef0b394Smrg # Check for GNU sed and select it if it is found. 88699ef0b394Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 88709ef0b394Smrg lt_cv_path_SED=$lt_ac_sed 88719ef0b394Smrg break 88729ef0b394Smrg fi 88739ef0b394Smrg while true; do 88749ef0b394Smrg cat conftest.in conftest.in >conftest.tmp 88759ef0b394Smrg mv conftest.tmp conftest.in 88769ef0b394Smrg cp conftest.in conftest.nl 88779ef0b394Smrg echo >>conftest.nl 88789ef0b394Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 88799ef0b394Smrg cmp -s conftest.out conftest.nl || break 88809ef0b394Smrg # 10000 chars as input seems more than enough 88819ef0b394Smrg test $lt_ac_count -gt 10 && break 88829ef0b394Smrg lt_ac_count=`expr $lt_ac_count + 1` 88839ef0b394Smrg if test $lt_ac_count -gt $lt_ac_max; then 88849ef0b394Smrg lt_ac_max=$lt_ac_count 88859ef0b394Smrg lt_cv_path_SED=$lt_ac_sed 88869ef0b394Smrg fi 88879ef0b394Smrg done 88889ef0b394Smrgdone 8889c5629e66Smrg]) 88909ef0b394SmrgSED=$lt_cv_path_SED 88919ef0b394SmrgAC_SUBST([SED]) 88929ef0b394SmrgAC_MSG_RESULT([$SED]) 88939ef0b394Smrg])#AC_PROG_SED 88949ef0b394Smrg])#m4_ifndef 8895c5629e66Smrg 88969ef0b394Smrg# Old name: 88979ef0b394SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 88989ef0b394Smrgdnl aclocal-1.4 backwards compatibility: 88999ef0b394Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 8900698f425bSmrg 8901698f425bSmrg 89029ef0b394Smrg# _LT_CHECK_SHELL_FEATURES 89039ef0b394Smrg# ------------------------ 89049ef0b394Smrg# Find out whether the shell is Bourne or XSI compatible, 89059ef0b394Smrg# or has some other useful features. 89069ef0b394Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 89079ef0b394Smrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 89089ef0b394Smrg# Try some XSI features 89099ef0b394Smrgxsi_shell=no 89109ef0b394Smrg( _lt_dummy="a/b/c" 89119ef0b394Smrg test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ 89129ef0b394Smrg = c,a/b,b/c, \ 89139ef0b394Smrg && eval 'test $(( 1 + 1 )) -eq 2 \ 89149ef0b394Smrg && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 89159ef0b394Smrg && xsi_shell=yes 89169ef0b394SmrgAC_MSG_RESULT([$xsi_shell]) 89179ef0b394Smrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 8918698f425bSmrg 89199ef0b394SmrgAC_MSG_CHECKING([whether the shell understands "+="]) 89209ef0b394Smrglt_shell_append=no 89219ef0b394Smrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 89229ef0b394Smrg >/dev/null 2>&1 \ 89239ef0b394Smrg && lt_shell_append=yes 89249ef0b394SmrgAC_MSG_RESULT([$lt_shell_append]) 89259ef0b394Smrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 8926c5629e66Smrg 89279ef0b394Smrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 89289ef0b394Smrg lt_unset=unset 89299ef0b394Smrgelse 89309ef0b394Smrg lt_unset=false 8931c5629e66Smrgfi 89329ef0b394Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 89339ef0b394Smrg 89349ef0b394Smrg# test EBCDIC or ASCII 89359ef0b394Smrgcase `echo X|tr X '\101'` in 89369ef0b394Smrg A) # ASCII based system 89379ef0b394Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 89389ef0b394Smrg lt_SP2NL='tr \040 \012' 89399ef0b394Smrg lt_NL2SP='tr \015\012 \040\040' 89409ef0b394Smrg ;; 89419ef0b394Smrg *) # EBCDIC based system 89429ef0b394Smrg lt_SP2NL='tr \100 \n' 89439ef0b394Smrg lt_NL2SP='tr \r\n \100\100' 89449ef0b394Smrg ;; 89459ef0b394Smrgesac 89469ef0b394Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 89479ef0b394Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 89489ef0b394Smrg])# _LT_CHECK_SHELL_FEATURES 8949c5629e66Smrg 8950c5629e66Smrg 89519ef0b394Smrg# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) 89529ef0b394Smrg# ------------------------------------------------------ 89539ef0b394Smrg# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and 89549ef0b394Smrg# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. 89559ef0b394Smrgm4_defun([_LT_PROG_FUNCTION_REPLACE], 89569ef0b394Smrg[dnl { 89579ef0b394Smrgsed -e '/^$1 ()$/,/^} # $1 /c\ 89589ef0b394Smrg$1 ()\ 89599ef0b394Smrg{\ 89609ef0b394Smrgm4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) 89619ef0b394Smrg} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ 89629ef0b394Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 89639ef0b394Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 89649ef0b394Smrgtest 0 -eq $? || _lt_function_replace_fail=: 89659ef0b394Smrg]) 8966c5629e66Smrg 8967c5629e66Smrg 89689ef0b394Smrg# _LT_PROG_REPLACE_SHELLFNS 89699ef0b394Smrg# ------------------------- 89709ef0b394Smrg# Replace existing portable implementations of several shell functions with 89719ef0b394Smrg# equivalent extended shell implementations where those features are available.. 89729ef0b394Smrgm4_defun([_LT_PROG_REPLACE_SHELLFNS], 89739ef0b394Smrg[if test x"$xsi_shell" = xyes; then 89749ef0b394Smrg _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl 89759ef0b394Smrg case ${1} in 89769ef0b394Smrg */*) func_dirname_result="${1%/*}${2}" ;; 89779ef0b394Smrg * ) func_dirname_result="${3}" ;; 89789ef0b394Smrg esac]) 89799ef0b394Smrg 89809ef0b394Smrg _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl 89819ef0b394Smrg func_basename_result="${1##*/}"]) 89829ef0b394Smrg 89839ef0b394Smrg _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl 89849ef0b394Smrg case ${1} in 89859ef0b394Smrg */*) func_dirname_result="${1%/*}${2}" ;; 89869ef0b394Smrg * ) func_dirname_result="${3}" ;; 89879ef0b394Smrg esac 89889ef0b394Smrg func_basename_result="${1##*/}"]) 89899ef0b394Smrg 89909ef0b394Smrg _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl 89919ef0b394Smrg # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 89929ef0b394Smrg # positional parameters, so assign one to ordinary parameter first. 89939ef0b394Smrg func_stripname_result=${3} 89949ef0b394Smrg func_stripname_result=${func_stripname_result#"${1}"} 89959ef0b394Smrg func_stripname_result=${func_stripname_result%"${2}"}]) 89969ef0b394Smrg 89979ef0b394Smrg _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl 89989ef0b394Smrg func_split_long_opt_name=${1%%=*} 89999ef0b394Smrg func_split_long_opt_arg=${1#*=}]) 90009ef0b394Smrg 90019ef0b394Smrg _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl 90029ef0b394Smrg func_split_short_opt_arg=${1#??} 90039ef0b394Smrg func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) 90049ef0b394Smrg 90059ef0b394Smrg _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl 90069ef0b394Smrg case ${1} in 90079ef0b394Smrg *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 90089ef0b394Smrg *) func_lo2o_result=${1} ;; 90099ef0b394Smrg esac]) 90109ef0b394Smrg 90119ef0b394Smrg _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) 90129ef0b394Smrg 90139ef0b394Smrg _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) 90149ef0b394Smrg 90159ef0b394Smrg _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) 90169ef0b394Smrgfi 90179ef0b394Smrg 90189ef0b394Smrgif test x"$lt_shell_append" = xyes; then 90199ef0b394Smrg _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) 90209ef0b394Smrg 90219ef0b394Smrg _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl 90229ef0b394Smrg func_quote_for_eval "${2}" 90239ef0b394Smrgdnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ 90249ef0b394Smrg eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) 90259ef0b394Smrg 90269ef0b394Smrg # Save a `func_append' function call where possible by direct use of '+=' 90279ef0b394Smrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ 90289ef0b394Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 90299ef0b394Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 90309ef0b394Smrg test 0 -eq $? || _lt_function_replace_fail=: 9031c5629e66Smrgelse 90329ef0b394Smrg # Save a `func_append' function call even when '+=' is not available 90339ef0b394Smrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ 90349ef0b394Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 90359ef0b394Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 90369ef0b394Smrg test 0 -eq $? || _lt_function_replace_fail=: 90379ef0b394Smrgfi 9038c5629e66Smrg 90399ef0b394Smrgif test x"$_lt_function_replace_fail" = x":"; then 90409ef0b394Smrg AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) 90419ef0b394Smrgfi 90429ef0b394Smrg]) 9043c5629e66Smrg 90449ef0b394Smrg# _LT_PATH_CONVERSION_FUNCTIONS 90459ef0b394Smrg# ----------------------------- 90469ef0b394Smrg# Determine which file name conversion functions should be used by 90479ef0b394Smrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 90489ef0b394Smrg# for certain cross-compile configurations and native mingw. 90499ef0b394Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 90509ef0b394Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 90519ef0b394SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 90529ef0b394SmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 90539ef0b394SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 90549ef0b394Smrg[case $host in 90559ef0b394Smrg *-*-mingw* ) 90569ef0b394Smrg case $build in 90579ef0b394Smrg *-*-mingw* ) # actually msys 90589ef0b394Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 90599ef0b394Smrg ;; 90609ef0b394Smrg *-*-cygwin* ) 90619ef0b394Smrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 90629ef0b394Smrg ;; 90639ef0b394Smrg * ) # otherwise, assume *nix 90649ef0b394Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 90659ef0b394Smrg ;; 90669ef0b394Smrg esac 90679ef0b394Smrg ;; 90689ef0b394Smrg *-*-cygwin* ) 90699ef0b394Smrg case $build in 90709ef0b394Smrg *-*-mingw* ) # actually msys 90719ef0b394Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 90729ef0b394Smrg ;; 90739ef0b394Smrg *-*-cygwin* ) 90749ef0b394Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 90759ef0b394Smrg ;; 90769ef0b394Smrg * ) # otherwise, assume *nix 90779ef0b394Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 90789ef0b394Smrg ;; 90799ef0b394Smrg esac 90809ef0b394Smrg ;; 90819ef0b394Smrg * ) # unhandled hosts (and "normal" native builds) 90829ef0b394Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 90839ef0b394Smrg ;; 90849ef0b394Smrgesac 90859ef0b394Smrg]) 90869ef0b394Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd 90879ef0b394SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 90889ef0b394Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 90899ef0b394Smrg [0], [convert $build file names to $host format])dnl 90909ef0b394Smrg 90919ef0b394SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 90929ef0b394SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 90939ef0b394Smrg[#assume ordinary cross tools, or native build. 90949ef0b394Smrglt_cv_to_tool_file_cmd=func_convert_file_noop 90959ef0b394Smrgcase $host in 90969ef0b394Smrg *-*-mingw* ) 90979ef0b394Smrg case $build in 90989ef0b394Smrg *-*-mingw* ) # actually msys 90999ef0b394Smrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 91009ef0b394Smrg ;; 91019ef0b394Smrg esac 91029ef0b394Smrg ;; 91039ef0b394Smrgesac 91049ef0b394Smrg]) 91059ef0b394Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 91069ef0b394SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 91079ef0b394Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 91089ef0b394Smrg [0], [convert $build files to toolchain format])dnl 91099ef0b394Smrg])# _LT_PATH_CONVERSION_FUNCTIONS 91109ef0b394Smrg 91119ef0b394Smrg# Helper functions for option handling. -*- Autoconf -*- 9112c5629e66Smrg# 91139ef0b394Smrg# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, 91149ef0b394Smrg# Inc. 91159ef0b394Smrg# Written by Gary V. Vaughan, 2004 9116c5629e66Smrg# 91179ef0b394Smrg# This file is free software; the Free Software Foundation gives 91189ef0b394Smrg# unlimited permission to copy and/or distribute it, with or without 91199ef0b394Smrg# modifications, as long as this notice is preserved. 9120c5629e66Smrg 91219ef0b394Smrg# serial 7 ltoptions.m4 9122c5629e66Smrg 91239ef0b394Smrg# This is to help aclocal find these macros, as it can't see m4_define. 91249ef0b394SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 9125c5629e66Smrg 9126c5629e66Smrg 91279ef0b394Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 91289ef0b394Smrg# ------------------------------------------ 91299ef0b394Smrgm4_define([_LT_MANGLE_OPTION], 91309ef0b394Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 9131c5629e66Smrg 9132c5629e66Smrg 91339ef0b394Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 91349ef0b394Smrg# --------------------------------------- 91359ef0b394Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 91369ef0b394Smrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 91379ef0b394Smrg# saved as a flag. 91389ef0b394Smrgm4_define([_LT_SET_OPTION], 91399ef0b394Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 91409ef0b394Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 91419ef0b394Smrg _LT_MANGLE_DEFUN([$1], [$2]), 91429ef0b394Smrg [m4_warning([Unknown $1 option `$2'])])[]dnl 91439ef0b394Smrg]) 9144c5629e66Smrg 9145c5629e66Smrg 91469ef0b394Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 91479ef0b394Smrg# ------------------------------------------------------------ 91489ef0b394Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 91499ef0b394Smrgm4_define([_LT_IF_OPTION], 91509ef0b394Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 9151c5629e66Smrg 9152c5629e66Smrg 91539ef0b394Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 91549ef0b394Smrg# ------------------------------------------------------- 91559ef0b394Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 91569ef0b394Smrg# are set. 91579ef0b394Smrgm4_define([_LT_UNLESS_OPTIONS], 91589ef0b394Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 91599ef0b394Smrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 91609ef0b394Smrg [m4_define([$0_found])])])[]dnl 91619ef0b394Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 91629ef0b394Smrg])[]dnl 91639ef0b394Smrg]) 9164c5629e66Smrg 9165266e564dSmrg 91669ef0b394Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 91679ef0b394Smrg# ---------------------------------------- 91689ef0b394Smrg# OPTION-LIST is a space-separated list of Libtool options associated 91699ef0b394Smrg# with MACRO-NAME. If any OPTION has a matching handler declared with 91709ef0b394Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 91719ef0b394Smrg# the unknown option and exit. 91729ef0b394Smrgm4_defun([_LT_SET_OPTIONS], 91739ef0b394Smrg[# Set options 91749ef0b394Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 91759ef0b394Smrg [_LT_SET_OPTION([$1], _LT_Option)]) 91769ef0b394Smrg 91779ef0b394Smrgm4_if([$1],[LT_INIT],[ 91789ef0b394Smrg dnl 91799ef0b394Smrg dnl Simply set some default values (i.e off) if boolean options were not 91809ef0b394Smrg dnl specified: 91819ef0b394Smrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 91829ef0b394Smrg ]) 91839ef0b394Smrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 91849ef0b394Smrg ]) 91859ef0b394Smrg dnl 91869ef0b394Smrg dnl If no reference was made to various pairs of opposing options, then 91879ef0b394Smrg dnl we run the default mode handler for the pair. For example, if neither 91889ef0b394Smrg dnl `shared' nor `disable-shared' was passed, we enable building of shared 91899ef0b394Smrg dnl archives by default: 91909ef0b394Smrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 91919ef0b394Smrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 91929ef0b394Smrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 91939ef0b394Smrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 91949ef0b394Smrg [_LT_ENABLE_FAST_INSTALL]) 91959ef0b394Smrg ]) 91969ef0b394Smrg])# _LT_SET_OPTIONS 91979ef0b394Smrg 91989ef0b394Smrg 91999ef0b394Smrg 92009ef0b394Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 92019ef0b394Smrg# ----------------------------------------- 92029ef0b394Smrgm4_define([_LT_MANGLE_DEFUN], 92039ef0b394Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 9204c5629e66Smrg 9205266e564dSmrg 92069ef0b394Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 92079ef0b394Smrg# ----------------------------------------------- 92089ef0b394Smrgm4_define([LT_OPTION_DEFINE], 92099ef0b394Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 92109ef0b394Smrg])# LT_OPTION_DEFINE 9211266e564dSmrg 9212266e564dSmrg 92139ef0b394Smrg# dlopen 92149ef0b394Smrg# ------ 92159ef0b394SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 92169ef0b394Smrg]) 9217266e564dSmrg 92189ef0b394SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 92199ef0b394Smrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 92209ef0b394SmrgAC_DIAGNOSE([obsolete], 92219ef0b394Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 92229ef0b394Smrgput the `dlopen' option into LT_INIT's first parameter.]) 92239ef0b394Smrg]) 9224266e564dSmrg 92259ef0b394Smrgdnl aclocal-1.4 backwards compatibility: 92269ef0b394Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 9227266e564dSmrg 9228266e564dSmrg 92299ef0b394Smrg# win32-dll 92309ef0b394Smrg# --------- 92319ef0b394Smrg# Declare package support for building win32 dll's. 92329ef0b394SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 92339ef0b394Smrg[enable_win32_dll=yes 9234266e564dSmrg 92359ef0b394Smrgcase $host in 92369ef0b394Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 92379ef0b394Smrg AC_CHECK_TOOL(AS, as, false) 92389ef0b394Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 92399ef0b394Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 92409ef0b394Smrg ;; 92419ef0b394Smrgesac 9242266e564dSmrg 92439ef0b394Smrgtest -z "$AS" && AS=as 92449ef0b394Smrg_LT_DECL([], [AS], [1], [Assembler program])dnl 9245266e564dSmrg 92469ef0b394Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 92479ef0b394Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 9248c5629e66Smrg 92499ef0b394Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 92509ef0b394Smrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 92519ef0b394Smrg])# win32-dll 9252c5629e66Smrg 92539ef0b394SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 92549ef0b394Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 92559ef0b394Smrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 92569ef0b394SmrgAC_DIAGNOSE([obsolete], 92579ef0b394Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 92589ef0b394Smrgput the `win32-dll' option into LT_INIT's first parameter.]) 92599ef0b394Smrg]) 9260c5629e66Smrg 92619ef0b394Smrgdnl aclocal-1.4 backwards compatibility: 92629ef0b394Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 9263d17cd367Smrg 9264d17cd367Smrg 92659ef0b394Smrg# _LT_ENABLE_SHARED([DEFAULT]) 92669ef0b394Smrg# ---------------------------- 92679ef0b394Smrg# implement the --enable-shared flag, and supports the `shared' and 92689ef0b394Smrg# `disable-shared' LT_INIT options. 92699ef0b394Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 92709ef0b394Smrgm4_define([_LT_ENABLE_SHARED], 92719ef0b394Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 92729ef0b394SmrgAC_ARG_ENABLE([shared], 92739ef0b394Smrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 92749ef0b394Smrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 92759ef0b394Smrg [p=${PACKAGE-default} 92769ef0b394Smrg case $enableval in 92779ef0b394Smrg yes) enable_shared=yes ;; 92789ef0b394Smrg no) enable_shared=no ;; 92799ef0b394Smrg *) 92809ef0b394Smrg enable_shared=no 92819ef0b394Smrg # Look at the argument we got. We use all the common list separators. 92829ef0b394Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 92839ef0b394Smrg for pkg in $enableval; do 92849ef0b394Smrg IFS="$lt_save_ifs" 92859ef0b394Smrg if test "X$pkg" = "X$p"; then 92869ef0b394Smrg enable_shared=yes 92879ef0b394Smrg fi 92889ef0b394Smrg done 92899ef0b394Smrg IFS="$lt_save_ifs" 92909ef0b394Smrg ;; 92919ef0b394Smrg esac], 92929ef0b394Smrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 9293d17cd367Smrg 92949ef0b394Smrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 92959ef0b394Smrg [Whether or not to build shared libraries]) 92969ef0b394Smrg])# _LT_ENABLE_SHARED 9297266e564dSmrg 92989ef0b394SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 92999ef0b394SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 9300266e564dSmrg 93019ef0b394Smrg# Old names: 93029ef0b394SmrgAC_DEFUN([AC_ENABLE_SHARED], 93039ef0b394Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 93049ef0b394Smrg]) 93059ef0b394Smrg 93069ef0b394SmrgAC_DEFUN([AC_DISABLE_SHARED], 93079ef0b394Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 93089ef0b394Smrg]) 9309266e564dSmrg 93109ef0b394SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 93119ef0b394SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 9312266e564dSmrg 93139ef0b394Smrgdnl aclocal-1.4 backwards compatibility: 93149ef0b394Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 93159ef0b394Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 9316d17cd367Smrg 9317266e564dSmrg 9318266e564dSmrg 93199ef0b394Smrg# _LT_ENABLE_STATIC([DEFAULT]) 93209ef0b394Smrg# ---------------------------- 93219ef0b394Smrg# implement the --enable-static flag, and support the `static' and 93229ef0b394Smrg# `disable-static' LT_INIT options. 93239ef0b394Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 93249ef0b394Smrgm4_define([_LT_ENABLE_STATIC], 93259ef0b394Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 93269ef0b394SmrgAC_ARG_ENABLE([static], 93279ef0b394Smrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 93289ef0b394Smrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 93299ef0b394Smrg [p=${PACKAGE-default} 93309ef0b394Smrg case $enableval in 93319ef0b394Smrg yes) enable_static=yes ;; 93329ef0b394Smrg no) enable_static=no ;; 93339ef0b394Smrg *) 93349ef0b394Smrg enable_static=no 93359ef0b394Smrg # Look at the argument we got. We use all the common list separators. 93369ef0b394Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 93379ef0b394Smrg for pkg in $enableval; do 93389ef0b394Smrg IFS="$lt_save_ifs" 93399ef0b394Smrg if test "X$pkg" = "X$p"; then 93409ef0b394Smrg enable_static=yes 93419ef0b394Smrg fi 93429ef0b394Smrg done 93439ef0b394Smrg IFS="$lt_save_ifs" 93449ef0b394Smrg ;; 93459ef0b394Smrg esac], 93469ef0b394Smrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 9347266e564dSmrg 93489ef0b394Smrg _LT_DECL([build_old_libs], [enable_static], [0], 93499ef0b394Smrg [Whether or not to build static libraries]) 93509ef0b394Smrg])# _LT_ENABLE_STATIC 9351266e564dSmrg 93529ef0b394SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 93539ef0b394SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 9354266e564dSmrg 93559ef0b394Smrg# Old names: 93569ef0b394SmrgAC_DEFUN([AC_ENABLE_STATIC], 93579ef0b394Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 93589ef0b394Smrg]) 9359c5629e66Smrg 93609ef0b394SmrgAC_DEFUN([AC_DISABLE_STATIC], 93619ef0b394Smrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 93629ef0b394Smrg]) 9363266e564dSmrg 93649ef0b394SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 93659ef0b394SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 9366266e564dSmrg 93679ef0b394Smrgdnl aclocal-1.4 backwards compatibility: 93689ef0b394Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 93699ef0b394Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 9370266e564dSmrg 9371266e564dSmrg 9372266e564dSmrg 93739ef0b394Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 93749ef0b394Smrg# ---------------------------------- 93759ef0b394Smrg# implement the --enable-fast-install flag, and support the `fast-install' 93769ef0b394Smrg# and `disable-fast-install' LT_INIT options. 93779ef0b394Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 93789ef0b394Smrgm4_define([_LT_ENABLE_FAST_INSTALL], 93799ef0b394Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 93809ef0b394SmrgAC_ARG_ENABLE([fast-install], 93819ef0b394Smrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 93829ef0b394Smrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 93839ef0b394Smrg [p=${PACKAGE-default} 93849ef0b394Smrg case $enableval in 93859ef0b394Smrg yes) enable_fast_install=yes ;; 93869ef0b394Smrg no) enable_fast_install=no ;; 93879ef0b394Smrg *) 93889ef0b394Smrg enable_fast_install=no 93899ef0b394Smrg # Look at the argument we got. We use all the common list separators. 93909ef0b394Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 93919ef0b394Smrg for pkg in $enableval; do 93929ef0b394Smrg IFS="$lt_save_ifs" 93939ef0b394Smrg if test "X$pkg" = "X$p"; then 93949ef0b394Smrg enable_fast_install=yes 93959ef0b394Smrg fi 93969ef0b394Smrg done 93979ef0b394Smrg IFS="$lt_save_ifs" 93989ef0b394Smrg ;; 93999ef0b394Smrg esac], 94009ef0b394Smrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 9401266e564dSmrg 94029ef0b394Smrg_LT_DECL([fast_install], [enable_fast_install], [0], 94039ef0b394Smrg [Whether or not to optimize for fast installation])dnl 94049ef0b394Smrg])# _LT_ENABLE_FAST_INSTALL 9405266e564dSmrg 94069ef0b394SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 94079ef0b394SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 9408266e564dSmrg 94099ef0b394Smrg# Old names: 94109ef0b394SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 94119ef0b394Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 94129ef0b394SmrgAC_DIAGNOSE([obsolete], 94139ef0b394Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 94149ef0b394Smrgthe `fast-install' option into LT_INIT's first parameter.]) 94159ef0b394Smrg]) 9416266e564dSmrg 94179ef0b394SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 94189ef0b394Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 94199ef0b394SmrgAC_DIAGNOSE([obsolete], 94209ef0b394Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 94219ef0b394Smrgthe `disable-fast-install' option into LT_INIT's first parameter.]) 94229ef0b394Smrg]) 9423c5629e66Smrg 94249ef0b394Smrgdnl aclocal-1.4 backwards compatibility: 94259ef0b394Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 94269ef0b394Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 9427266e564dSmrg 9428266e564dSmrg 94299ef0b394Smrg# _LT_WITH_PIC([MODE]) 94309ef0b394Smrg# -------------------- 94319ef0b394Smrg# implement the --with-pic flag, and support the `pic-only' and `no-pic' 94329ef0b394Smrg# LT_INIT options. 94339ef0b394Smrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 94349ef0b394Smrgm4_define([_LT_WITH_PIC], 94359ef0b394Smrg[AC_ARG_WITH([pic], 9436fb5e8d76Smrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 94379ef0b394Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 9438fb5e8d76Smrg [lt_p=${PACKAGE-default} 9439fb5e8d76Smrg case $withval in 9440fb5e8d76Smrg yes|no) pic_mode=$withval ;; 9441fb5e8d76Smrg *) 9442fb5e8d76Smrg pic_mode=default 9443fb5e8d76Smrg # Look at the argument we got. We use all the common list separators. 9444fb5e8d76Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 9445fb5e8d76Smrg for lt_pkg in $withval; do 9446fb5e8d76Smrg IFS="$lt_save_ifs" 9447fb5e8d76Smrg if test "X$lt_pkg" = "X$lt_p"; then 9448fb5e8d76Smrg pic_mode=yes 9449fb5e8d76Smrg fi 9450fb5e8d76Smrg done 9451fb5e8d76Smrg IFS="$lt_save_ifs" 9452fb5e8d76Smrg ;; 9453fb5e8d76Smrg esac], 94549ef0b394Smrg [pic_mode=default]) 9455d17cd367Smrg 94569ef0b394Smrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 94579ef0b394Smrg 94589ef0b394Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 94599ef0b394Smrg])# _LT_WITH_PIC 94609ef0b394Smrg 94619ef0b394SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 94629ef0b394SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 94639ef0b394Smrg 94649ef0b394Smrg# Old name: 94659ef0b394SmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 94669ef0b394Smrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 94679ef0b394SmrgAC_DIAGNOSE([obsolete], 94689ef0b394Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 94699ef0b394Smrgput the `pic-only' option into LT_INIT's first parameter.]) 94709ef0b394Smrg]) 94719ef0b394Smrg 94729ef0b394Smrgdnl aclocal-1.4 backwards compatibility: 94739ef0b394Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 9474266e564dSmrg 9475266e564dSmrg 94769ef0b394Smrgm4_define([_LTDL_MODE], []) 94779ef0b394SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 94789ef0b394Smrg [m4_define([_LTDL_MODE], [nonrecursive])]) 94799ef0b394SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 94809ef0b394Smrg [m4_define([_LTDL_MODE], [recursive])]) 94819ef0b394SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 94829ef0b394Smrg [m4_define([_LTDL_MODE], [subproject])]) 9483d17cd367Smrg 94849ef0b394Smrgm4_define([_LTDL_TYPE], []) 94859ef0b394SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 94869ef0b394Smrg [m4_define([_LTDL_TYPE], [installable])]) 94879ef0b394SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 94889ef0b394Smrg [m4_define([_LTDL_TYPE], [convenience])]) 94899ef0b394Smrg 94909ef0b394Smrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 9491d17cd367Smrg# 94929ef0b394Smrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 94939ef0b394Smrg# Written by Gary V. Vaughan, 2004 9494d17cd367Smrg# 94959ef0b394Smrg# This file is free software; the Free Software Foundation gives 94969ef0b394Smrg# unlimited permission to copy and/or distribute it, with or without 94979ef0b394Smrg# modifications, as long as this notice is preserved. 9498d17cd367Smrg 94999ef0b394Smrg# serial 6 ltsugar.m4 9500c5629e66Smrg 95019ef0b394Smrg# This is to help aclocal find these macros, as it can't see m4_define. 95029ef0b394SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 9503d17cd367Smrg 9504698f425bSmrg 95059ef0b394Smrg# lt_join(SEP, ARG1, [ARG2...]) 95069ef0b394Smrg# ----------------------------- 95079ef0b394Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 95089ef0b394Smrg# associated separator. 95099ef0b394Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 95109ef0b394Smrg# versions in m4sugar had bugs. 95119ef0b394Smrgm4_define([lt_join], 95129ef0b394Smrg[m4_if([$#], [1], [], 95139ef0b394Smrg [$#], [2], [[$2]], 95149ef0b394Smrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 95159ef0b394Smrgm4_define([_lt_join], 95169ef0b394Smrg[m4_if([$#$2], [2], [], 95179ef0b394Smrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 95189ef0b394Smrg 95199ef0b394Smrg 95209ef0b394Smrg# lt_car(LIST) 95219ef0b394Smrg# lt_cdr(LIST) 95229ef0b394Smrg# ------------ 95239ef0b394Smrg# Manipulate m4 lists. 95249ef0b394Smrg# These macros are necessary as long as will still need to support 95259ef0b394Smrg# Autoconf-2.59 which quotes differently. 95269ef0b394Smrgm4_define([lt_car], [[$1]]) 95279ef0b394Smrgm4_define([lt_cdr], 95289ef0b394Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 95299ef0b394Smrg [$#], 1, [], 95309ef0b394Smrg [m4_dquote(m4_shift($@))])]) 95319ef0b394Smrgm4_define([lt_unquote], $1) 95329ef0b394Smrg 95339ef0b394Smrg 95349ef0b394Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 95359ef0b394Smrg# ------------------------------------------ 95369ef0b394Smrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 95379ef0b394Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 95389ef0b394Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 95399ef0b394Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 95409ef0b394Smrg# than defined and empty). 9541d17cd367Smrg# 95429ef0b394Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 95439ef0b394Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 95449ef0b394Smrgm4_define([lt_append], 95459ef0b394Smrg[m4_define([$1], 95469ef0b394Smrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 95479ef0b394Smrg 95489ef0b394Smrg 95499ef0b394Smrg 95509ef0b394Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 95519ef0b394Smrg# ---------------------------------------------------------- 95529ef0b394Smrg# Produce a SEP delimited list of all paired combinations of elements of 95539ef0b394Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 95549ef0b394Smrg# has the form PREFIXmINFIXSUFFIXn. 95559ef0b394Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 95569ef0b394Smrgm4_define([lt_combine], 95579ef0b394Smrg[m4_if(m4_eval([$# > 3]), [1], 95589ef0b394Smrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 95599ef0b394Smrg[[m4_foreach([_Lt_prefix], [$2], 95609ef0b394Smrg [m4_foreach([_Lt_suffix], 95619ef0b394Smrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 95629ef0b394Smrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 9563d17cd367Smrg 9564266e564dSmrg 95659ef0b394Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 95669ef0b394Smrg# ----------------------------------------------------------------------- 95679ef0b394Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 95689ef0b394Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 95699ef0b394Smrgm4_define([lt_if_append_uniq], 95709ef0b394Smrg[m4_ifdef([$1], 95719ef0b394Smrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 95729ef0b394Smrg [lt_append([$1], [$2], [$3])$4], 95739ef0b394Smrg [$5])], 95749ef0b394Smrg [lt_append([$1], [$2], [$3])$4])]) 9575266e564dSmrg 9576266e564dSmrg 95779ef0b394Smrg# lt_dict_add(DICT, KEY, VALUE) 95789ef0b394Smrg# ----------------------------- 95799ef0b394Smrgm4_define([lt_dict_add], 95809ef0b394Smrg[m4_define([$1($2)], [$3])]) 9581266e564dSmrg 9582d17cd367Smrg 95839ef0b394Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 95849ef0b394Smrg# -------------------------------------------- 95859ef0b394Smrgm4_define([lt_dict_add_subkey], 95869ef0b394Smrg[m4_define([$1($2:$3)], [$4])]) 9587266e564dSmrg 9588d17cd367Smrg 95899ef0b394Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 95909ef0b394Smrg# ---------------------------------- 95919ef0b394Smrgm4_define([lt_dict_fetch], 95929ef0b394Smrg[m4_ifval([$3], 95939ef0b394Smrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 95949ef0b394Smrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 9595266e564dSmrg 95969ef0b394Smrg 95979ef0b394Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 95989ef0b394Smrg# ----------------------------------------------------------------- 95999ef0b394Smrgm4_define([lt_if_dict_fetch], 96009ef0b394Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 96019ef0b394Smrg [$5], 96029ef0b394Smrg [$6])]) 96039ef0b394Smrg 96049ef0b394Smrg 96059ef0b394Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 96069ef0b394Smrg# -------------------------------------------------------------- 96079ef0b394Smrgm4_define([lt_dict_filter], 96089ef0b394Smrg[m4_if([$5], [], [], 96099ef0b394Smrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 96109ef0b394Smrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 96119ef0b394Smrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 96129ef0b394Smrg]) 96139ef0b394Smrg 96149ef0b394Smrg# ltversion.m4 -- version numbers -*- Autoconf -*- 9615d17cd367Smrg# 96169ef0b394Smrg# Copyright (C) 2004 Free Software Foundation, Inc. 96179ef0b394Smrg# Written by Scott James Remnant, 2004 9618d17cd367Smrg# 96199ef0b394Smrg# This file is free software; the Free Software Foundation gives 96209ef0b394Smrg# unlimited permission to copy and/or distribute it, with or without 96219ef0b394Smrg# modifications, as long as this notice is preserved. 9622d17cd367Smrg 96239ef0b394Smrg# @configure_input@ 96249ef0b394Smrg 9625fb5e8d76Smrg# serial 3337 ltversion.m4 96269ef0b394Smrg# This file is part of GNU Libtool 96279ef0b394Smrg 9628fb5e8d76Smrgm4_define([LT_PACKAGE_VERSION], [2.4.2]) 9629fb5e8d76Smrgm4_define([LT_PACKAGE_REVISION], [1.3337]) 96309ef0b394Smrg 96319ef0b394SmrgAC_DEFUN([LTVERSION_VERSION], 9632fb5e8d76Smrg[macro_version='2.4.2' 9633fb5e8d76Smrgmacro_revision='1.3337' 96349ef0b394Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 96359ef0b394Smrg_LT_DECL(, macro_revision, 0) 96369ef0b394Smrg]) 96379ef0b394Smrg 96389ef0b394Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 9639d17cd367Smrg# 96409ef0b394Smrg# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. 96419ef0b394Smrg# Written by Scott James Remnant, 2004. 9642d17cd367Smrg# 96439ef0b394Smrg# This file is free software; the Free Software Foundation gives 96449ef0b394Smrg# unlimited permission to copy and/or distribute it, with or without 96459ef0b394Smrg# modifications, as long as this notice is preserved. 9646d17cd367Smrg 96479ef0b394Smrg# serial 5 lt~obsolete.m4 96489ef0b394Smrg 96499ef0b394Smrg# These exist entirely to fool aclocal when bootstrapping libtool. 9650d17cd367Smrg# 96519ef0b394Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 96529ef0b394Smrg# which have later been changed to m4_define as they aren't part of the 96539ef0b394Smrg# exported API, or moved to Autoconf or Automake where they belong. 9654d17cd367Smrg# 96559ef0b394Smrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 96569ef0b394Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 96579ef0b394Smrg# using a macro with the same name in our local m4/libtool.m4 it'll 96589ef0b394Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 96599ef0b394Smrg# and doesn't know about Autoconf macros at all.) 9660d17cd367Smrg# 96619ef0b394Smrg# So we provide this file, which has a silly filename so it's always 96629ef0b394Smrg# included after everything else. This provides aclocal with the 96639ef0b394Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 96649ef0b394Smrg# because those macros already exist, or will be overwritten later. 96659ef0b394Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 9666d17cd367Smrg# 96679ef0b394Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 96689ef0b394Smrg# Yes, that means every name once taken will need to remain here until 96699ef0b394Smrg# we give up compatibility with versions before 1.7, at which point 96709ef0b394Smrg# we need to keep only those names which we still refer to. 9671266e564dSmrg 96729ef0b394Smrg# This is to help aclocal find these macros, as it can't see m4_define. 96739ef0b394SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 9674d17cd367Smrg 96759ef0b394Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 96769ef0b394Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 96779ef0b394Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 96789ef0b394Smrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 96799ef0b394Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 96809ef0b394Smrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 96819ef0b394Smrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 96829ef0b394Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 96839ef0b394Smrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 96849ef0b394Smrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 96859ef0b394Smrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 96869ef0b394Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 96879ef0b394Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 96889ef0b394Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 96899ef0b394Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 96909ef0b394Smrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 96919ef0b394Smrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 96929ef0b394Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 96939ef0b394Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 96949ef0b394Smrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 96959ef0b394Smrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 96969ef0b394Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 96979ef0b394Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 96989ef0b394Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 96999ef0b394Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 97009ef0b394Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 97019ef0b394Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 97029ef0b394Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 97039ef0b394Smrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 97049ef0b394Smrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 97059ef0b394Smrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 97069ef0b394Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 97079ef0b394Smrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 97089ef0b394Smrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 97099ef0b394Smrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 97109ef0b394Smrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 97119ef0b394Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 97129ef0b394Smrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 97139ef0b394Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 97149ef0b394Smrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 97159ef0b394Smrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 97169ef0b394Smrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 97179ef0b394Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 97189ef0b394Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 97199ef0b394Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 97209ef0b394Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 97219ef0b394Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 97229ef0b394Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 97239ef0b394Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 97249ef0b394Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 97259ef0b394Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 97269ef0b394Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 97279ef0b394Smrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 97289ef0b394Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 97299ef0b394Smrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 97309ef0b394Smrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 97319ef0b394Smrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 97329ef0b394Smrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 97339ef0b394Smrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 97349ef0b394Smrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 97359ef0b394Smrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 9736266e564dSmrg 9737fb5e8d76Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 9738fb5e8d76Smrg# 9739fb5e8d76Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 9740fb5e8d76Smrg# 9741fb5e8d76Smrg# This program is free software; you can redistribute it and/or modify 9742fb5e8d76Smrg# it under the terms of the GNU General Public License as published by 9743fb5e8d76Smrg# the Free Software Foundation; either version 2 of the License, or 9744fb5e8d76Smrg# (at your option) any later version. 9745fb5e8d76Smrg# 9746fb5e8d76Smrg# This program is distributed in the hope that it will be useful, but 9747fb5e8d76Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 9748fb5e8d76Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 9749fb5e8d76Smrg# General Public License for more details. 9750fb5e8d76Smrg# 9751fb5e8d76Smrg# You should have received a copy of the GNU General Public License 9752fb5e8d76Smrg# along with this program; if not, write to the Free Software 9753fb5e8d76Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 9754fb5e8d76Smrg# 9755fb5e8d76Smrg# As a special exception to the GNU General Public License, if you 9756fb5e8d76Smrg# distribute this file as part of a program that contains a 9757fb5e8d76Smrg# configuration script generated by Autoconf, you may include it under 9758fb5e8d76Smrg# the same distribution terms that you use for the rest of that program. 9759fb5e8d76Smrg 9760fb5e8d76Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 9761fb5e8d76Smrg# ---------------------------------- 9762fb5e8d76SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 9763fb5e8d76Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 9764fb5e8d76Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 9765fb5e8d76SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 9766fb5e8d76Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 9767fb5e8d76Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 9768fb5e8d76Smrgfi 9769fb5e8d76Smrgif test -n "$PKG_CONFIG"; then 9770fb5e8d76Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 9771fb5e8d76Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 9772fb5e8d76Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 9773fb5e8d76Smrg AC_MSG_RESULT([yes]) 9774fb5e8d76Smrg else 9775fb5e8d76Smrg AC_MSG_RESULT([no]) 9776fb5e8d76Smrg PKG_CONFIG="" 9777fb5e8d76Smrg fi 9778fb5e8d76Smrg 9779fb5e8d76Smrgfi[]dnl 9780fb5e8d76Smrg])# PKG_PROG_PKG_CONFIG 9781fb5e8d76Smrg 9782fb5e8d76Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 9783fb5e8d76Smrg# 9784fb5e8d76Smrg# Check to see whether a particular set of modules exists. Similar 9785fb5e8d76Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 9786fb5e8d76Smrg# 9787fb5e8d76Smrg# 9788fb5e8d76Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 9789fb5e8d76Smrg# this or PKG_CHECK_MODULES is called, or make sure to call 9790fb5e8d76Smrg# PKG_CHECK_EXISTS manually 9791fb5e8d76Smrg# -------------------------------------------------------------- 9792fb5e8d76SmrgAC_DEFUN([PKG_CHECK_EXISTS], 9793fb5e8d76Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9794fb5e8d76Smrgif test -n "$PKG_CONFIG" && \ 9795fb5e8d76Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 9796fb5e8d76Smrg m4_ifval([$2], [$2], [:]) 9797fb5e8d76Smrgm4_ifvaln([$3], [else 9798fb5e8d76Smrg $3])dnl 9799fb5e8d76Smrgfi]) 9800fb5e8d76Smrg 9801fb5e8d76Smrg 9802fb5e8d76Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 9803fb5e8d76Smrg# --------------------------------------------- 9804fb5e8d76Smrgm4_define([_PKG_CONFIG], 9805fb5e8d76Smrg[if test -n "$$1"; then 9806fb5e8d76Smrg pkg_cv_[]$1="$$1" 9807fb5e8d76Smrg elif test -n "$PKG_CONFIG"; then 9808fb5e8d76Smrg PKG_CHECK_EXISTS([$3], 9809fb5e8d76Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 9810fb5e8d76Smrg [pkg_failed=yes]) 9811fb5e8d76Smrg else 9812fb5e8d76Smrg pkg_failed=untried 9813fb5e8d76Smrgfi[]dnl 9814fb5e8d76Smrg])# _PKG_CONFIG 9815fb5e8d76Smrg 9816fb5e8d76Smrg# _PKG_SHORT_ERRORS_SUPPORTED 9817fb5e8d76Smrg# ----------------------------- 9818fb5e8d76SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 9819fb5e8d76Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 9820fb5e8d76Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 9821fb5e8d76Smrg _pkg_short_errors_supported=yes 9822fb5e8d76Smrgelse 9823fb5e8d76Smrg _pkg_short_errors_supported=no 9824fb5e8d76Smrgfi[]dnl 9825fb5e8d76Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 9826fb5e8d76Smrg 9827fb5e8d76Smrg 9828fb5e8d76Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 9829fb5e8d76Smrg# [ACTION-IF-NOT-FOUND]) 9830fb5e8d76Smrg# 9831fb5e8d76Smrg# 9832fb5e8d76Smrg# Note that if there is a possibility the first call to 9833fb5e8d76Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 9834fb5e8d76Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 9835fb5e8d76Smrg# 9836fb5e8d76Smrg# 9837fb5e8d76Smrg# -------------------------------------------------------------- 9838fb5e8d76SmrgAC_DEFUN([PKG_CHECK_MODULES], 9839fb5e8d76Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9840fb5e8d76SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 9841fb5e8d76SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 9842fb5e8d76Smrg 9843fb5e8d76Smrgpkg_failed=no 9844fb5e8d76SmrgAC_MSG_CHECKING([for $1]) 9845fb5e8d76Smrg 9846fb5e8d76Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 9847fb5e8d76Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 9848fb5e8d76Smrg 9849fb5e8d76Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 9850fb5e8d76Smrgand $1[]_LIBS to avoid the need to call pkg-config. 9851fb5e8d76SmrgSee the pkg-config man page for more details.]) 9852fb5e8d76Smrg 9853fb5e8d76Smrgif test $pkg_failed = yes; then 9854fb5e8d76Smrg _PKG_SHORT_ERRORS_SUPPORTED 9855fb5e8d76Smrg if test $_pkg_short_errors_supported = yes; then 9856fb5e8d76Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 9857fb5e8d76Smrg else 9858fb5e8d76Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 9859fb5e8d76Smrg fi 9860fb5e8d76Smrg # Put the nasty error message in config.log where it belongs 9861fb5e8d76Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 9862fb5e8d76Smrg 9863fb5e8d76Smrg ifelse([$4], , [AC_MSG_ERROR(dnl 9864fb5e8d76Smrg[Package requirements ($2) were not met: 9865fb5e8d76Smrg 9866fb5e8d76Smrg$$1_PKG_ERRORS 9867fb5e8d76Smrg 9868fb5e8d76SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 9869fb5e8d76Smrginstalled software in a non-standard prefix. 9870fb5e8d76Smrg 9871fb5e8d76Smrg_PKG_TEXT 9872fb5e8d76Smrg])], 9873fb5e8d76Smrg [AC_MSG_RESULT([no]) 9874fb5e8d76Smrg $4]) 9875fb5e8d76Smrgelif test $pkg_failed = untried; then 9876fb5e8d76Smrg ifelse([$4], , [AC_MSG_FAILURE(dnl 9877fb5e8d76Smrg[The pkg-config script could not be found or is too old. Make sure it 9878fb5e8d76Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 9879fb5e8d76Smrgpath to pkg-config. 9880fb5e8d76Smrg 9881fb5e8d76Smrg_PKG_TEXT 9882fb5e8d76Smrg 9883fb5e8d76SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 9884fb5e8d76Smrg [$4]) 9885fb5e8d76Smrgelse 9886fb5e8d76Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 9887fb5e8d76Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 9888fb5e8d76Smrg AC_MSG_RESULT([yes]) 9889fb5e8d76Smrg ifelse([$3], , :, [$3]) 9890fb5e8d76Smrgfi[]dnl 9891fb5e8d76Smrg])# PKG_CHECK_MODULES 9892fb5e8d76Smrg 98939ef0b394Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 98949ef0b394Smrgdnl 98959ef0b394Smrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 9896fb5e8d76Smrgdnl 98979ef0b394Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 98989ef0b394Smrgdnl copy of this software and associated documentation files (the "Software"), 98999ef0b394Smrgdnl to deal in the Software without restriction, including without limitation 99009ef0b394Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 99019ef0b394Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 99029ef0b394Smrgdnl Software is furnished to do so, subject to the following conditions: 99039ef0b394Smrgdnl 99049ef0b394Smrgdnl The above copyright notice and this permission notice (including the next 99059ef0b394Smrgdnl paragraph) shall be included in all copies or substantial portions of the 99069ef0b394Smrgdnl Software. 99079ef0b394Smrgdnl 99089ef0b394Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 99099ef0b394Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 99109ef0b394Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 99119ef0b394Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 99129ef0b394Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 99139ef0b394Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 99149ef0b394Smrgdnl DEALINGS IN THE SOFTWARE. 9915d17cd367Smrg 99169ef0b394Smrg# XORG_MACROS_VERSION(required-version) 99179ef0b394Smrg# ------------------------------------- 9918d17cd367Smrg# Minimum version: 1.1.0 9919698f425bSmrg# 99209ef0b394Smrg# If you're using a macro added in Version 1.1 or newer, include this in 99219ef0b394Smrg# your configure.ac with the minimum required version, such as: 99229ef0b394Smrg# XORG_MACROS_VERSION(1.1) 9923d17cd367Smrg# 99249ef0b394Smrg# To ensure that this macro is defined, also add: 99259ef0b394Smrg# m4_ifndef([XORG_MACROS_VERSION], 99269ef0b394Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 9927d17cd367Smrg# 9928d17cd367Smrg# 9929fb5e8d76Smrg# See the "minimum version" comment for each macro you use to see what 99309ef0b394Smrg# version you require. 99319ef0b394Smrgm4_defun([XORG_MACROS_VERSION],[ 9932fb5e8d76Smrgm4_define([vers_have], [1.19.0]) 99339ef0b394Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 99349ef0b394Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 99359ef0b394Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 99369ef0b394Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 99379ef0b394Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 99389ef0b394Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 99399ef0b394Smrgm4_undefine([vers_have]) 99409ef0b394Smrgm4_undefine([maj_have]) 99419ef0b394Smrgm4_undefine([maj_needed]) 99429ef0b394Smrg]) # XORG_MACROS_VERSION 9943d17cd367Smrg 99449ef0b394Smrg# XORG_PROG_RAWCPP() 99459ef0b394Smrg# ------------------ 99469ef0b394Smrg# Minimum version: 1.0.0 99479ef0b394Smrg# 99489ef0b394Smrg# Find cpp program and necessary flags for use in pre-processing text files 99499ef0b394Smrg# such as man pages and config files 99509ef0b394SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 99519ef0b394SmrgAC_REQUIRE([AC_PROG_CPP]) 9952fb5e8d76SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 99539ef0b394Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 9954266e564dSmrg 99559ef0b394Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 99569ef0b394Smrg# which is not the best choice for supporting other OS'es, but covers most 99579ef0b394Smrg# of the ones we need for now. 99589ef0b394SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 99599ef0b394SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 99609ef0b394Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 99619ef0b394Smrg AC_MSG_RESULT([no]) 9962d17cd367Smrgelse 99639ef0b394Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 99649ef0b394Smrg RAWCPPFLAGS=-undef 99659ef0b394Smrg AC_MSG_RESULT([yes]) 99669ef0b394Smrg # under Cygwin unix is still defined even with -undef 99679ef0b394Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 99689ef0b394Smrg RAWCPPFLAGS="-undef -ansi" 99699ef0b394Smrg AC_MSG_RESULT([yes, with -ansi]) 99709ef0b394Smrg else 99719ef0b394Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 99729ef0b394Smrg fi 9973d17cd367Smrgfi 99749ef0b394Smrgrm -f conftest.$ac_ext 9975266e564dSmrg 99769ef0b394SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 99779ef0b394SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 99789ef0b394Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 99799ef0b394Smrg AC_MSG_RESULT([no]) 99809ef0b394Smrgelse 99819ef0b394Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 9982fb5e8d76Smrg TRADITIONALCPPFLAGS="-traditional" 99839ef0b394Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 99849ef0b394Smrg AC_MSG_RESULT([yes]) 99859ef0b394Smrg else 99869ef0b394Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 99879ef0b394Smrg fi 9988d17cd367Smrgfi 99899ef0b394Smrgrm -f conftest.$ac_ext 99909ef0b394SmrgAC_SUBST(RAWCPPFLAGS) 9991fb5e8d76SmrgAC_SUBST(TRADITIONALCPPFLAGS) 99929ef0b394Smrg]) # XORG_PROG_RAWCPP 9993266e564dSmrg 99949ef0b394Smrg# XORG_MANPAGE_SECTIONS() 99959ef0b394Smrg# ----------------------- 99969ef0b394Smrg# Minimum version: 1.0.0 9997d17cd367Smrg# 99989ef0b394Smrg# Determine which sections man pages go in for the different man page types 99999ef0b394Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 100009ef0b394Smrg# Not sure if there's any better way than just hardcoding by OS name. 100019ef0b394Smrg# Override default settings by setting environment variables 100029ef0b394Smrg# Added MAN_SUBSTS in version 1.8 100039ef0b394Smrg# Added AC_PROG_SED in version 1.8 10004266e564dSmrg 100059ef0b394SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 100069ef0b394SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 100079ef0b394SmrgAC_REQUIRE([AC_PROG_SED]) 10008266e564dSmrg 100099ef0b394Smrgif test x$APP_MAN_SUFFIX = x ; then 100109ef0b394Smrg APP_MAN_SUFFIX=1 100119ef0b394Smrgfi 100129ef0b394Smrgif test x$APP_MAN_DIR = x ; then 100139ef0b394Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 10014d17cd367Smrgfi 10015266e564dSmrg 100169ef0b394Smrgif test x$LIB_MAN_SUFFIX = x ; then 100179ef0b394Smrg LIB_MAN_SUFFIX=3 100189ef0b394Smrgfi 100199ef0b394Smrgif test x$LIB_MAN_DIR = x ; then 100209ef0b394Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 100219ef0b394Smrgfi 10022266e564dSmrg 100239ef0b394Smrgif test x$FILE_MAN_SUFFIX = x ; then 100249ef0b394Smrg case $host_os in 100259ef0b394Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 100269ef0b394Smrg *) FILE_MAN_SUFFIX=5 ;; 100279ef0b394Smrg esac 100289ef0b394Smrgfi 100299ef0b394Smrgif test x$FILE_MAN_DIR = x ; then 100309ef0b394Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 100319ef0b394Smrgfi 10032d17cd367Smrg 100339ef0b394Smrgif test x$MISC_MAN_SUFFIX = x ; then 100349ef0b394Smrg case $host_os in 100359ef0b394Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 100369ef0b394Smrg *) MISC_MAN_SUFFIX=7 ;; 10037d17cd367Smrg esac 10038698f425bSmrgfi 100399ef0b394Smrgif test x$MISC_MAN_DIR = x ; then 100409ef0b394Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 100419ef0b394Smrgfi 10042266e564dSmrg 100439ef0b394Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 100449ef0b394Smrg case $host_os in 100459ef0b394Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 100469ef0b394Smrg *) DRIVER_MAN_SUFFIX=4 ;; 100479ef0b394Smrg esac 100489ef0b394Smrgfi 100499ef0b394Smrgif test x$DRIVER_MAN_DIR = x ; then 100509ef0b394Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 100519ef0b394Smrgfi 10052d17cd367Smrg 100539ef0b394Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 100549ef0b394Smrg case $host_os in 100559ef0b394Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 100569ef0b394Smrg *) ADMIN_MAN_SUFFIX=8 ;; 100579ef0b394Smrg esac 100589ef0b394Smrgfi 100599ef0b394Smrgif test x$ADMIN_MAN_DIR = x ; then 100609ef0b394Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 10061d17cd367Smrgfi 10062266e564dSmrg 10063d17cd367Smrg 100649ef0b394SmrgAC_SUBST([APP_MAN_SUFFIX]) 100659ef0b394SmrgAC_SUBST([LIB_MAN_SUFFIX]) 100669ef0b394SmrgAC_SUBST([FILE_MAN_SUFFIX]) 100679ef0b394SmrgAC_SUBST([MISC_MAN_SUFFIX]) 100689ef0b394SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 100699ef0b394SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 100709ef0b394SmrgAC_SUBST([APP_MAN_DIR]) 100719ef0b394SmrgAC_SUBST([LIB_MAN_DIR]) 100729ef0b394SmrgAC_SUBST([FILE_MAN_DIR]) 100739ef0b394SmrgAC_SUBST([MISC_MAN_DIR]) 100749ef0b394SmrgAC_SUBST([DRIVER_MAN_DIR]) 100759ef0b394SmrgAC_SUBST([ADMIN_MAN_DIR]) 100769ef0b394Smrg 100779ef0b394SmrgXORG_MAN_PAGE="X Version 11" 100789ef0b394SmrgAC_SUBST([XORG_MAN_PAGE]) 100799ef0b394SmrgMAN_SUBSTS="\ 100809ef0b394Smrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 100819ef0b394Smrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 100829ef0b394Smrg -e 's|__xservername__|Xorg|g' \ 100839ef0b394Smrg -e 's|__xconfigfile__|xorg.conf|g' \ 100849ef0b394Smrg -e 's|__projectroot__|\$(prefix)|g' \ 100859ef0b394Smrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 100869ef0b394Smrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 100879ef0b394Smrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 100889ef0b394Smrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 100899ef0b394Smrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 100909ef0b394Smrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 100919ef0b394Smrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 100929ef0b394SmrgAC_SUBST([MAN_SUBSTS]) 100939ef0b394Smrg 100949ef0b394Smrg]) # XORG_MANPAGE_SECTIONS 100959ef0b394Smrg 100969ef0b394Smrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 100979ef0b394Smrg# ------------------------ 100989ef0b394Smrg# Minimum version: 1.7.0 10099d17cd367Smrg# 101009ef0b394Smrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 101019ef0b394Smrg# provided by xorg-sgml-doctools, if installed. 101029ef0b394SmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 101039ef0b394SmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 101049ef0b394SmrgXORG_SGML_PATH= 101059ef0b394SmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 101069ef0b394Smrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 101079ef0b394Smrg [m4_ifval([$1],[:], 101089ef0b394Smrg [if test x"$cross_compiling" != x"yes" ; then 101099ef0b394Smrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 101109ef0b394Smrg [XORG_SGML_PATH=$prefix/share/sgml]) 101119ef0b394Smrg fi]) 101129ef0b394Smrg ]) 101139ef0b394Smrg 101149ef0b394Smrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 101159ef0b394Smrg# the path and the name of the doc stylesheet 101169ef0b394Smrgif test "x$XORG_SGML_PATH" != "x" ; then 101179ef0b394Smrg AC_MSG_RESULT([$XORG_SGML_PATH]) 101189ef0b394Smrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 101199ef0b394Smrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 101209ef0b394Smrgelse 101219ef0b394Smrg AC_MSG_RESULT([no]) 101229ef0b394Smrgfi 10123266e564dSmrg 101249ef0b394SmrgAC_SUBST(XORG_SGML_PATH) 101259ef0b394SmrgAC_SUBST(STYLESHEET_SRCDIR) 101269ef0b394SmrgAC_SUBST(XSL_STYLESHEET) 101279ef0b394SmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 101289ef0b394Smrg]) # XORG_CHECK_SGML_DOCTOOLS 10129698f425bSmrg 101309ef0b394Smrg# XORG_CHECK_LINUXDOC 101319ef0b394Smrg# ------------------- 101329ef0b394Smrg# Minimum version: 1.0.0 10133c5629e66Smrg# 101349ef0b394Smrg# Defines the variable MAKE_TEXT if the necessary tools and 101359ef0b394Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 101369ef0b394Smrg# Whether or not the necessary tools and files are found can be checked 101379ef0b394Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 101389ef0b394SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 101399ef0b394SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 101409ef0b394SmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 10141266e564dSmrg 101429ef0b394SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 10143d17cd367Smrg 101449ef0b394SmrgAC_MSG_CHECKING([whether to build documentation]) 10145d17cd367Smrg 101469ef0b394Smrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 101479ef0b394Smrg BUILDDOC=yes 101489ef0b394Smrgelse 101499ef0b394Smrg BUILDDOC=no 101509ef0b394Smrgfi 10151d17cd367Smrg 101529ef0b394SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 10153d17cd367Smrg 101549ef0b394SmrgAC_MSG_RESULT([$BUILDDOC]) 10155d17cd367Smrg 101569ef0b394SmrgAC_MSG_CHECKING([whether to build pdf documentation]) 10157d17cd367Smrg 101589ef0b394Smrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 101599ef0b394Smrg BUILDPDFDOC=yes 101609ef0b394Smrgelse 101619ef0b394Smrg BUILDPDFDOC=no 101629ef0b394Smrgfi 10163d17cd367Smrg 101649ef0b394SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 10165d17cd367Smrg 101669ef0b394SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 101679ef0b394Smrg 101689ef0b394SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 101699ef0b394SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 101709ef0b394SmrgMAKE_PDF="$PS2PDF" 101719ef0b394SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 101729ef0b394Smrg 101739ef0b394SmrgAC_SUBST(MAKE_TEXT) 101749ef0b394SmrgAC_SUBST(MAKE_PS) 101759ef0b394SmrgAC_SUBST(MAKE_PDF) 101769ef0b394SmrgAC_SUBST(MAKE_HTML) 101779ef0b394Smrg]) # XORG_CHECK_LINUXDOC 101789ef0b394Smrg 101799ef0b394Smrg# XORG_CHECK_DOCBOOK 101809ef0b394Smrg# ------------------- 101819ef0b394Smrg# Minimum version: 1.0.0 101829ef0b394Smrg# 101839ef0b394Smrg# Checks for the ability to build output formats from SGML DocBook source. 101849ef0b394Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 101859ef0b394Smrg# indicates whether the necessary tools and files are found and, if set, 101869ef0b394Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 101879ef0b394SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 101889ef0b394SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 101899ef0b394Smrg 101909ef0b394SmrgBUILDTXTDOC=no 101919ef0b394SmrgBUILDPDFDOC=no 101929ef0b394SmrgBUILDPSDOC=no 101939ef0b394SmrgBUILDHTMLDOC=no 101949ef0b394Smrg 101959ef0b394SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 101969ef0b394SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 101979ef0b394SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 101989ef0b394SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 101999ef0b394Smrg 102009ef0b394SmrgAC_MSG_CHECKING([whether to build text documentation]) 102019ef0b394Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 102029ef0b394Smrg test x$BUILD_TXTDOC != xno; then 102039ef0b394Smrg BUILDTXTDOC=yes 102049ef0b394Smrgfi 102059ef0b394SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 102069ef0b394SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 102079ef0b394Smrg 102089ef0b394SmrgAC_MSG_CHECKING([whether to build PDF documentation]) 102099ef0b394Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 102109ef0b394Smrg test x$BUILD_PDFDOC != xno; then 102119ef0b394Smrg BUILDPDFDOC=yes 102129ef0b394Smrgfi 102139ef0b394SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 102149ef0b394SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 102159ef0b394Smrg 102169ef0b394SmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 102179ef0b394Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 102189ef0b394Smrg test x$BUILD_PSDOC != xno; then 102199ef0b394Smrg BUILDPSDOC=yes 102209ef0b394Smrgfi 102219ef0b394SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 102229ef0b394SmrgAC_MSG_RESULT([$BUILDPSDOC]) 102239ef0b394Smrg 102249ef0b394SmrgAC_MSG_CHECKING([whether to build HTML documentation]) 102259ef0b394Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 102269ef0b394Smrg test x$BUILD_HTMLDOC != xno; then 102279ef0b394Smrg BUILDHTMLDOC=yes 102289ef0b394Smrgfi 102299ef0b394SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 102309ef0b394SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 10231d17cd367Smrg 102329ef0b394SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 102339ef0b394SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 102349ef0b394SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 102359ef0b394SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 10236d17cd367Smrg 102379ef0b394SmrgAC_SUBST(MAKE_TEXT) 102389ef0b394SmrgAC_SUBST(MAKE_PS) 102399ef0b394SmrgAC_SUBST(MAKE_PDF) 102409ef0b394SmrgAC_SUBST(MAKE_HTML) 102419ef0b394Smrg]) # XORG_CHECK_DOCBOOK 10242d17cd367Smrg 102439ef0b394Smrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 102449ef0b394Smrg# ---------------- 102459ef0b394Smrg# Minimum version: 1.5.0 102469ef0b394Smrg# Minimum version for optional DEFAULT argument: 1.11.0 102479ef0b394Smrg# 102489ef0b394Smrg# Documentation tools are not always available on all platforms and sometimes 102499ef0b394Smrg# not at the appropriate level. This macro enables a module to test for the 102509ef0b394Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 102519ef0b394Smrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 102529ef0b394Smrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 102539ef0b394Smrg# --with-xmlto assumes 'auto'. 102549ef0b394Smrg# 102559ef0b394Smrg# Interface to module: 102569ef0b394Smrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 102579ef0b394Smrg# XMLTO: returns the path of the xmlto program found 102589ef0b394Smrg# returns the path set by the user in the environment 102599ef0b394Smrg# --with-xmlto: 'yes' user instructs the module to use xmlto 102609ef0b394Smrg# 'no' user instructs the module not to use xmlto 102619ef0b394Smrg# 102629ef0b394Smrg# Added in version 1.10.0 102639ef0b394Smrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 102649ef0b394Smrg# xmlto for text output requires either lynx, links, or w3m browsers 102659ef0b394Smrg# 102669ef0b394Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 102679ef0b394Smrg# 102689ef0b394SmrgAC_DEFUN([XORG_WITH_XMLTO],[ 102699ef0b394SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 102709ef0b394Smrgm4_define([_defopt], m4_default([$2], [auto])) 102719ef0b394SmrgAC_ARG_WITH(xmlto, 102729ef0b394Smrg AS_HELP_STRING([--with-xmlto], 102739ef0b394Smrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 102749ef0b394Smrg [use_xmlto=$withval], [use_xmlto=]_defopt) 102759ef0b394Smrgm4_undefine([_defopt]) 10276d17cd367Smrg 102779ef0b394Smrgif test "x$use_xmlto" = x"auto"; then 102789ef0b394Smrg AC_PATH_PROG([XMLTO], [xmlto]) 102799ef0b394Smrg if test "x$XMLTO" = "x"; then 102809ef0b394Smrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 102819ef0b394Smrg have_xmlto=no 102829ef0b394Smrg else 102839ef0b394Smrg have_xmlto=yes 102849ef0b394Smrg fi 102859ef0b394Smrgelif test "x$use_xmlto" = x"yes" ; then 102869ef0b394Smrg AC_PATH_PROG([XMLTO], [xmlto]) 102879ef0b394Smrg if test "x$XMLTO" = "x"; then 102889ef0b394Smrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 102899ef0b394Smrg fi 102909ef0b394Smrg have_xmlto=yes 102919ef0b394Smrgelif test "x$use_xmlto" = x"no" ; then 102929ef0b394Smrg if test "x$XMLTO" != "x"; then 102939ef0b394Smrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 102949ef0b394Smrg fi 102959ef0b394Smrg have_xmlto=no 102969ef0b394Smrgelse 102979ef0b394Smrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 102989ef0b394Smrgfi 10299d17cd367Smrg 103009ef0b394Smrg# Test for a minimum version of xmlto, if provided. 103019ef0b394Smrgm4_ifval([$1], 103029ef0b394Smrg[if test "$have_xmlto" = yes; then 103039ef0b394Smrg # scrape the xmlto version 103049ef0b394Smrg AC_MSG_CHECKING([the xmlto version]) 103059ef0b394Smrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 103069ef0b394Smrg AC_MSG_RESULT([$xmlto_version]) 103079ef0b394Smrg AS_VERSION_COMPARE([$xmlto_version], [$1], 103089ef0b394Smrg [if test "x$use_xmlto" = xauto; then 103099ef0b394Smrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 103109ef0b394Smrg have_xmlto=no 103119ef0b394Smrg else 103129ef0b394Smrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 103139ef0b394Smrg fi]) 103149ef0b394Smrgfi]) 10315d17cd367Smrg 103169ef0b394Smrg# Test for the ability of xmlto to generate a text target 103179ef0b394Smrghave_xmlto_text=no 103189ef0b394Smrgcat > conftest.xml << "EOF" 103199ef0b394SmrgEOF 103209ef0b394SmrgAS_IF([test "$have_xmlto" = yes], 103219ef0b394Smrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 103229ef0b394Smrg [have_xmlto_text=yes], 103239ef0b394Smrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 103249ef0b394Smrgrm -f conftest.xml 103259ef0b394SmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 103269ef0b394SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 103279ef0b394Smrg]) # XORG_WITH_XMLTO 10328d17cd367Smrg 103299ef0b394Smrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 103309ef0b394Smrg# -------------------------------------------- 103319ef0b394Smrg# Minimum version: 1.12.0 103329ef0b394Smrg# Minimum version for optional DEFAULT argument: 1.12.0 10333c5629e66Smrg# 103349ef0b394Smrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 103359ef0b394Smrg# XML-based language used for the transformation of XML documents. 103369ef0b394Smrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 103379ef0b394Smrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 103389ef0b394Smrg# The XSLT processor is often used as a standalone tool for transformations. 103399ef0b394Smrg# It should not be assumed that this tool is used only to work with documnetation. 103409ef0b394Smrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 103419ef0b394Smrg# 103429ef0b394Smrg# Interface to module: 103439ef0b394Smrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 103449ef0b394Smrg# XSLTPROC: returns the path of the xsltproc program found 103459ef0b394Smrg# returns the path set by the user in the environment 103469ef0b394Smrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 103479ef0b394Smrg# 'no' user instructs the module not to use xsltproc 103489ef0b394Smrg# have_xsltproc: returns yes if xsltproc found in PATH or no 103499ef0b394Smrg# 103509ef0b394Smrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 103519ef0b394Smrg# 103529ef0b394SmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 103539ef0b394SmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 103549ef0b394Smrg# Preserves the interface, should it be implemented later 103559ef0b394Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 103569ef0b394Smrgm4_define([_defopt], m4_default([$2], [auto])) 103579ef0b394SmrgAC_ARG_WITH(xsltproc, 103589ef0b394Smrg AS_HELP_STRING([--with-xsltproc], 103599ef0b394Smrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 103609ef0b394Smrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 103619ef0b394Smrgm4_undefine([_defopt]) 103629ef0b394Smrg 103639ef0b394Smrgif test "x$use_xsltproc" = x"auto"; then 103649ef0b394Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 103659ef0b394Smrg if test "x$XSLTPROC" = "x"; then 103669ef0b394Smrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 103679ef0b394Smrg have_xsltproc=no 103689ef0b394Smrg else 103699ef0b394Smrg have_xsltproc=yes 103709ef0b394Smrg fi 103719ef0b394Smrgelif test "x$use_xsltproc" = x"yes" ; then 103729ef0b394Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 103739ef0b394Smrg if test "x$XSLTPROC" = "x"; then 103749ef0b394Smrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 103759ef0b394Smrg fi 103769ef0b394Smrg have_xsltproc=yes 103779ef0b394Smrgelif test "x$use_xsltproc" = x"no" ; then 103789ef0b394Smrg if test "x$XSLTPROC" != "x"; then 103799ef0b394Smrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 103809ef0b394Smrg fi 103819ef0b394Smrg have_xsltproc=no 103829ef0b394Smrgelse 103839ef0b394Smrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 103849ef0b394Smrgfi 10385d17cd367Smrg 103869ef0b394SmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 103879ef0b394Smrg]) # XORG_WITH_XSLTPROC 103889ef0b394Smrg 103899ef0b394Smrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 103909ef0b394Smrg# ---------------------------------------- 103919ef0b394Smrg# Minimum version: 1.15.0 10392d17cd367Smrg# 103939ef0b394Smrg# PERL (Practical Extraction and Report Language) is a language optimized for 103949ef0b394Smrg# scanning arbitrary text files, extracting information from those text files, 103959ef0b394Smrg# and printing reports based on that information. 10396d17cd367Smrg# 103979ef0b394Smrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 10398d17cd367Smrg# 103999ef0b394Smrg# Interface to module: 104009ef0b394Smrg# HAVE_PERL: used in makefiles to conditionally scan text files 104019ef0b394Smrg# PERL: returns the path of the perl program found 104029ef0b394Smrg# returns the path set by the user in the environment 104039ef0b394Smrg# --with-perl: 'yes' user instructs the module to use perl 104049ef0b394Smrg# 'no' user instructs the module not to use perl 104059ef0b394Smrg# have_perl: returns yes if perl found in PATH or no 104069ef0b394Smrg# 104079ef0b394Smrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 104089ef0b394Smrg# 104099ef0b394SmrgAC_DEFUN([XORG_WITH_PERL],[ 104109ef0b394SmrgAC_ARG_VAR([PERL], [Path to perl command]) 104119ef0b394Smrg# Preserves the interface, should it be implemented later 104129ef0b394Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 104139ef0b394Smrgm4_define([_defopt], m4_default([$2], [auto])) 104149ef0b394SmrgAC_ARG_WITH(perl, 104159ef0b394Smrg AS_HELP_STRING([--with-perl], 104169ef0b394Smrg [Use perl for extracting information from files (default: ]_defopt[)]), 104179ef0b394Smrg [use_perl=$withval], [use_perl=]_defopt) 104189ef0b394Smrgm4_undefine([_defopt]) 104199ef0b394Smrg 104209ef0b394Smrgif test "x$use_perl" = x"auto"; then 104219ef0b394Smrg AC_PATH_PROG([PERL], [perl]) 104229ef0b394Smrg if test "x$PERL" = "x"; then 104239ef0b394Smrg AC_MSG_WARN([perl not found - cannot extract information and report]) 104249ef0b394Smrg have_perl=no 104259ef0b394Smrg else 104269ef0b394Smrg have_perl=yes 104279ef0b394Smrg fi 104289ef0b394Smrgelif test "x$use_perl" = x"yes" ; then 104299ef0b394Smrg AC_PATH_PROG([PERL], [perl]) 104309ef0b394Smrg if test "x$PERL" = "x"; then 104319ef0b394Smrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 104329ef0b394Smrg fi 104339ef0b394Smrg have_perl=yes 104349ef0b394Smrgelif test "x$use_perl" = x"no" ; then 104359ef0b394Smrg if test "x$PERL" != "x"; then 104369ef0b394Smrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 104379ef0b394Smrg fi 104389ef0b394Smrg have_perl=no 104399ef0b394Smrgelse 104409ef0b394Smrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 104419ef0b394Smrgfi 104429ef0b394Smrg 104439ef0b394SmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 104449ef0b394Smrg]) # XORG_WITH_PERL 104459ef0b394Smrg 104469ef0b394Smrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 104479ef0b394Smrg# ---------------- 104489ef0b394Smrg# Minimum version: 1.5.0 104499ef0b394Smrg# Minimum version for optional DEFAULT argument: 1.11.0 10450d17cd367Smrg# 104519ef0b394Smrg# Documentation tools are not always available on all platforms and sometimes 104529ef0b394Smrg# not at the appropriate level. This macro enables a module to test for the 104539ef0b394Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 104549ef0b394Smrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 104559ef0b394Smrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 104569ef0b394Smrg# --with-asciidoc assumes 'auto'. 10457d17cd367Smrg# 104589ef0b394Smrg# Interface to module: 104599ef0b394Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 104609ef0b394Smrg# ASCIIDOC: returns the path of the asciidoc program found 104619ef0b394Smrg# returns the path set by the user in the environment 104629ef0b394Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 104639ef0b394Smrg# 'no' user instructs the module not to use asciidoc 104649ef0b394Smrg# 104659ef0b394Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 104669ef0b394Smrg# 104679ef0b394SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 104689ef0b394SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 104699ef0b394Smrgm4_define([_defopt], m4_default([$2], [auto])) 104709ef0b394SmrgAC_ARG_WITH(asciidoc, 104719ef0b394Smrg AS_HELP_STRING([--with-asciidoc], 104729ef0b394Smrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 104739ef0b394Smrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 104749ef0b394Smrgm4_undefine([_defopt]) 10475d17cd367Smrg 104769ef0b394Smrgif test "x$use_asciidoc" = x"auto"; then 104779ef0b394Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 104789ef0b394Smrg if test "x$ASCIIDOC" = "x"; then 104799ef0b394Smrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 104809ef0b394Smrg have_asciidoc=no 104819ef0b394Smrg else 104829ef0b394Smrg have_asciidoc=yes 104839ef0b394Smrg fi 104849ef0b394Smrgelif test "x$use_asciidoc" = x"yes" ; then 104859ef0b394Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 104869ef0b394Smrg if test "x$ASCIIDOC" = "x"; then 104879ef0b394Smrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 104889ef0b394Smrg fi 104899ef0b394Smrg have_asciidoc=yes 104909ef0b394Smrgelif test "x$use_asciidoc" = x"no" ; then 104919ef0b394Smrg if test "x$ASCIIDOC" != "x"; then 104929ef0b394Smrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 104939ef0b394Smrg fi 104949ef0b394Smrg have_asciidoc=no 104959ef0b394Smrgelse 104969ef0b394Smrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 104979ef0b394Smrgfi 104989ef0b394Smrgm4_ifval([$1], 104999ef0b394Smrg[if test "$have_asciidoc" = yes; then 105009ef0b394Smrg # scrape the asciidoc version 105019ef0b394Smrg AC_MSG_CHECKING([the asciidoc version]) 105029ef0b394Smrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 105039ef0b394Smrg AC_MSG_RESULT([$asciidoc_version]) 105049ef0b394Smrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 105059ef0b394Smrg [if test "x$use_asciidoc" = xauto; then 105069ef0b394Smrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 105079ef0b394Smrg have_asciidoc=no 105089ef0b394Smrg else 105099ef0b394Smrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 105109ef0b394Smrg fi]) 105119ef0b394Smrgfi]) 105129ef0b394SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 105139ef0b394Smrg]) # XORG_WITH_ASCIIDOC 10514d17cd367Smrg 105159ef0b394Smrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 10516fb5e8d76Smrg# ------------------------------------------- 105179ef0b394Smrg# Minimum version: 1.5.0 105189ef0b394Smrg# Minimum version for optional DEFAULT argument: 1.11.0 10519fb5e8d76Smrg# Minimum version for optional DOT checking: 1.18.0 105209ef0b394Smrg# 105219ef0b394Smrg# Documentation tools are not always available on all platforms and sometimes 105229ef0b394Smrg# not at the appropriate level. This macro enables a module to test for the 105239ef0b394Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 105249ef0b394Smrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 105259ef0b394Smrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 105269ef0b394Smrg# --with-doxygen assumes 'auto'. 105279ef0b394Smrg# 105289ef0b394Smrg# Interface to module: 105299ef0b394Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 105309ef0b394Smrg# DOXYGEN: returns the path of the doxygen program found 105319ef0b394Smrg# returns the path set by the user in the environment 105329ef0b394Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen 105339ef0b394Smrg# 'no' user instructs the module not to use doxygen 105349ef0b394Smrg# 105359ef0b394Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 10536d17cd367Smrg# 105379ef0b394SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 105389ef0b394SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 10539fb5e8d76SmrgAC_ARG_VAR([DOT], [Path to the dot graphics utility]) 105409ef0b394Smrgm4_define([_defopt], m4_default([$2], [auto])) 105419ef0b394SmrgAC_ARG_WITH(doxygen, 105429ef0b394Smrg AS_HELP_STRING([--with-doxygen], 105439ef0b394Smrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 105449ef0b394Smrg [use_doxygen=$withval], [use_doxygen=]_defopt) 105459ef0b394Smrgm4_undefine([_defopt]) 10546d17cd367Smrg 105479ef0b394Smrgif test "x$use_doxygen" = x"auto"; then 105489ef0b394Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 105499ef0b394Smrg if test "x$DOXYGEN" = "x"; then 105509ef0b394Smrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 105519ef0b394Smrg have_doxygen=no 105529ef0b394Smrg else 105539ef0b394Smrg have_doxygen=yes 105549ef0b394Smrg fi 105559ef0b394Smrgelif test "x$use_doxygen" = x"yes" ; then 105569ef0b394Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 105579ef0b394Smrg if test "x$DOXYGEN" = "x"; then 105589ef0b394Smrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 105599ef0b394Smrg fi 105609ef0b394Smrg have_doxygen=yes 105619ef0b394Smrgelif test "x$use_doxygen" = x"no" ; then 105629ef0b394Smrg if test "x$DOXYGEN" != "x"; then 105639ef0b394Smrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 105649ef0b394Smrg fi 105659ef0b394Smrg have_doxygen=no 10566d17cd367Smrgelse 105679ef0b394Smrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 10568d17cd367Smrgfi 105699ef0b394Smrgm4_ifval([$1], 105709ef0b394Smrg[if test "$have_doxygen" = yes; then 105719ef0b394Smrg # scrape the doxygen version 105729ef0b394Smrg AC_MSG_CHECKING([the doxygen version]) 105739ef0b394Smrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 105749ef0b394Smrg AC_MSG_RESULT([$doxygen_version]) 105759ef0b394Smrg AS_VERSION_COMPARE([$doxygen_version], [$1], 105769ef0b394Smrg [if test "x$use_doxygen" = xauto; then 105779ef0b394Smrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 105789ef0b394Smrg have_doxygen=no 105799ef0b394Smrg else 105809ef0b394Smrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 105819ef0b394Smrg fi]) 105829ef0b394Smrgfi]) 10583fb5e8d76Smrg 10584fb5e8d76Smrgdnl Check for DOT if we have doxygen. The caller decides if it is mandatory 10585fb5e8d76Smrgdnl HAVE_DOT is a variable that can be used in your doxygen.in config file: 10586fb5e8d76Smrgdnl HAVE_DOT = @HAVE_DOT@ 10587fb5e8d76SmrgHAVE_DOT=no 10588fb5e8d76Smrgif test "x$have_doxygen" = "xyes"; then 10589fb5e8d76Smrg AC_PATH_PROG([DOT], [dot]) 10590fb5e8d76Smrg if test "x$DOT" != "x"; then 10591fb5e8d76Smrg HAVE_DOT=yes 10592fb5e8d76Smrg fi 10593fb5e8d76Smrgfi 10594fb5e8d76Smrg 10595fb5e8d76SmrgAC_SUBST([HAVE_DOT]) 10596fb5e8d76SmrgAM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"]) 105979ef0b394SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 105989ef0b394Smrg]) # XORG_WITH_DOXYGEN 10599d17cd367Smrg 106009ef0b394Smrg# XORG_WITH_GROFF([DEFAULT]) 106019ef0b394Smrg# ---------------- 106029ef0b394Smrg# Minimum version: 1.6.0 106039ef0b394Smrg# Minimum version for optional DEFAULT argument: 1.11.0 10604d17cd367Smrg# 106059ef0b394Smrg# Documentation tools are not always available on all platforms and sometimes 106069ef0b394Smrg# not at the appropriate level. This macro enables a module to test for the 106079ef0b394Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 106089ef0b394Smrg# the --with-groff option, it allows maximum flexibilty in making decisions 106099ef0b394Smrg# as whether or not to use the groff package. When DEFAULT is not specified, 106109ef0b394Smrg# --with-groff assumes 'auto'. 10611d17cd367Smrg# 106129ef0b394Smrg# Interface to module: 106139ef0b394Smrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 106149ef0b394Smrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 106159ef0b394Smrg# HAVE_GROFF_MS: the -ms macros package 106169ef0b394Smrg# GROFF: returns the path of the groff program found 106179ef0b394Smrg# returns the path set by the user in the environment 106189ef0b394Smrg# --with-groff: 'yes' user instructs the module to use groff 106199ef0b394Smrg# 'no' user instructs the module not to use groff 106209ef0b394Smrg# 106219ef0b394Smrg# Added in version 1.9.0: 106229ef0b394Smrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 106239ef0b394Smrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 106249ef0b394Smrg# psselect from the psutils package. 106259ef0b394Smrg# the ghostcript package. Refer to the grohtml man pages 106269ef0b394Smrg# 106279ef0b394Smrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 106289ef0b394Smrg# 106299ef0b394Smrg# OS and distros often splits groff in a basic and full package, the former 106309ef0b394Smrg# having the groff program and the later having devices, fonts and macros 106319ef0b394Smrg# Checking for the groff executable is not enough. 106329ef0b394Smrg# 106339ef0b394Smrg# If macros are missing, we cannot assume that groff is useless, so we don't 106349ef0b394Smrg# unset HAVE_GROFF or GROFF env variables. 106359ef0b394Smrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 106369ef0b394Smrg# 106379ef0b394SmrgAC_DEFUN([XORG_WITH_GROFF],[ 106389ef0b394SmrgAC_ARG_VAR([GROFF], [Path to groff command]) 106399ef0b394Smrgm4_define([_defopt], m4_default([$1], [auto])) 106409ef0b394SmrgAC_ARG_WITH(groff, 106419ef0b394Smrg AS_HELP_STRING([--with-groff], 106429ef0b394Smrg [Use groff to regenerate documentation (default: ]_defopt[)]), 106439ef0b394Smrg [use_groff=$withval], [use_groff=]_defopt) 106449ef0b394Smrgm4_undefine([_defopt]) 10645266e564dSmrg 106469ef0b394Smrgif test "x$use_groff" = x"auto"; then 106479ef0b394Smrg AC_PATH_PROG([GROFF], [groff]) 106489ef0b394Smrg if test "x$GROFF" = "x"; then 106499ef0b394Smrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 106509ef0b394Smrg have_groff=no 106519ef0b394Smrg else 106529ef0b394Smrg have_groff=yes 106539ef0b394Smrg fi 106549ef0b394Smrgelif test "x$use_groff" = x"yes" ; then 106559ef0b394Smrg AC_PATH_PROG([GROFF], [groff]) 106569ef0b394Smrg if test "x$GROFF" = "x"; then 106579ef0b394Smrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 106589ef0b394Smrg fi 106599ef0b394Smrg have_groff=yes 106609ef0b394Smrgelif test "x$use_groff" = x"no" ; then 106619ef0b394Smrg if test "x$GROFF" != "x"; then 106629ef0b394Smrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 106639ef0b394Smrg fi 106649ef0b394Smrg have_groff=no 10665d17cd367Smrgelse 106669ef0b394Smrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 10667d17cd367Smrgfi 10668c5629e66Smrg 106699ef0b394Smrg# We have groff, test for the presence of the macro packages 106709ef0b394Smrgif test "x$have_groff" = x"yes"; then 106719ef0b394Smrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 106729ef0b394Smrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 106739ef0b394Smrg groff_ms_works=yes 106749ef0b394Smrg else 106759ef0b394Smrg groff_ms_works=no 106769ef0b394Smrg fi 106779ef0b394Smrg AC_MSG_RESULT([$groff_ms_works]) 106789ef0b394Smrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 106799ef0b394Smrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 106809ef0b394Smrg groff_mm_works=yes 106819ef0b394Smrg else 106829ef0b394Smrg groff_mm_works=no 106839ef0b394Smrg fi 106849ef0b394Smrg AC_MSG_RESULT([$groff_mm_works]) 106859ef0b394Smrgfi 10686266e564dSmrg 106879ef0b394Smrg# We have groff, test for HTML dependencies, one command per package 106889ef0b394Smrgif test "x$have_groff" = x"yes"; then 106899ef0b394Smrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 106909ef0b394Smrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 106919ef0b394Smrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 106929ef0b394Smrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 106939ef0b394Smrg have_groff_html=yes 106949ef0b394Smrg else 106959ef0b394Smrg have_groff_html=no 106969ef0b394Smrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 106979ef0b394Smrg fi 106989ef0b394Smrgfi 10699698f425bSmrg 107009ef0b394Smrg# Set Automake conditionals for Makefiles 107019ef0b394SmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 107029ef0b394SmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 107039ef0b394SmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 107049ef0b394SmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 107059ef0b394Smrg]) # XORG_WITH_GROFF 10706d17cd367Smrg 107079ef0b394Smrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 107089ef0b394Smrg# --------------------------------------- 107099ef0b394Smrg# Minimum version: 1.6.0 107109ef0b394Smrg# Minimum version for optional DEFAULT argument: 1.11.0 107119ef0b394Smrg# Minimum version for optional MIN-VERSION argument: 1.15.0 107129ef0b394Smrg# 107139ef0b394Smrg# Documentation tools are not always available on all platforms and sometimes 107149ef0b394Smrg# not at the appropriate level. This macro enables a module to test for the 107159ef0b394Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 107169ef0b394Smrg# the --with-fop option, it allows maximum flexibilty in making decisions 107179ef0b394Smrg# as whether or not to use the fop package. When DEFAULT is not specified, 107189ef0b394Smrg# --with-fop assumes 'auto'. 107199ef0b394Smrg# 107209ef0b394Smrg# Interface to module: 107219ef0b394Smrg# HAVE_FOP: used in makefiles to conditionally generate documentation 107229ef0b394Smrg# FOP: returns the path of the fop program found 107239ef0b394Smrg# returns the path set by the user in the environment 107249ef0b394Smrg# --with-fop: 'yes' user instructs the module to use fop 107259ef0b394Smrg# 'no' user instructs the module not to use fop 107269ef0b394Smrg# 107279ef0b394Smrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 107289ef0b394Smrg# 107299ef0b394SmrgAC_DEFUN([XORG_WITH_FOP],[ 107309ef0b394SmrgAC_ARG_VAR([FOP], [Path to fop command]) 107319ef0b394Smrgm4_define([_defopt], m4_default([$2], [auto])) 107329ef0b394SmrgAC_ARG_WITH(fop, 107339ef0b394Smrg AS_HELP_STRING([--with-fop], 107349ef0b394Smrg [Use fop to regenerate documentation (default: ]_defopt[)]), 107359ef0b394Smrg [use_fop=$withval], [use_fop=]_defopt) 107369ef0b394Smrgm4_undefine([_defopt]) 107379ef0b394Smrg 107389ef0b394Smrgif test "x$use_fop" = x"auto"; then 107399ef0b394Smrg AC_PATH_PROG([FOP], [fop]) 107409ef0b394Smrg if test "x$FOP" = "x"; then 107419ef0b394Smrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 107429ef0b394Smrg have_fop=no 107439ef0b394Smrg else 107449ef0b394Smrg have_fop=yes 107459ef0b394Smrg fi 107469ef0b394Smrgelif test "x$use_fop" = x"yes" ; then 107479ef0b394Smrg AC_PATH_PROG([FOP], [fop]) 107489ef0b394Smrg if test "x$FOP" = "x"; then 107499ef0b394Smrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 107509ef0b394Smrg fi 107519ef0b394Smrg have_fop=yes 107529ef0b394Smrgelif test "x$use_fop" = x"no" ; then 107539ef0b394Smrg if test "x$FOP" != "x"; then 107549ef0b394Smrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 107559ef0b394Smrg fi 107569ef0b394Smrg have_fop=no 107579ef0b394Smrgelse 107589ef0b394Smrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 10759d17cd367Smrgfi 10760d17cd367Smrg 107619ef0b394Smrg# Test for a minimum version of fop, if provided. 107629ef0b394Smrgm4_ifval([$1], 107639ef0b394Smrg[if test "$have_fop" = yes; then 107649ef0b394Smrg # scrape the fop version 107659ef0b394Smrg AC_MSG_CHECKING([for fop minimum version]) 107669ef0b394Smrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 107679ef0b394Smrg AC_MSG_RESULT([$fop_version]) 107689ef0b394Smrg AS_VERSION_COMPARE([$fop_version], [$1], 107699ef0b394Smrg [if test "x$use_fop" = xauto; then 107709ef0b394Smrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 107719ef0b394Smrg have_fop=no 107729ef0b394Smrg else 107739ef0b394Smrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 107749ef0b394Smrg fi]) 107759ef0b394Smrgfi]) 107769ef0b394SmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 107779ef0b394Smrg]) # XORG_WITH_FOP 10778d17cd367Smrg 10779fb5e8d76Smrg# XORG_WITH_M4([MIN-VERSION]) 10780fb5e8d76Smrg# --------------------------- 10781fb5e8d76Smrg# Minimum version: 1.19.0 10782fb5e8d76Smrg# 10783fb5e8d76Smrg# This macro attempts to locate an m4 macro processor which supports 10784fb5e8d76Smrg# -I option and is only useful for modules relying on M4 in order to 10785fb5e8d76Smrg# expand macros in source code files. 10786fb5e8d76Smrg# 10787fb5e8d76Smrg# Interface to module: 10788fb5e8d76Smrg# M4: returns the path of the m4 program found 10789fb5e8d76Smrg# returns the path set by the user in the environment 10790fb5e8d76Smrg# 10791fb5e8d76SmrgAC_DEFUN([XORG_WITH_M4], [ 10792fb5e8d76SmrgAC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4], 10793fb5e8d76Smrg [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4], 10794fb5e8d76Smrg [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \ 10795fb5e8d76Smrg ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]], 10796fb5e8d76Smrg [AC_MSG_ERROR([could not find m4 that supports -I option])], 10797fb5e8d76Smrg [$PATH:/usr/gnu/bin])]) 10798fb5e8d76Smrg 10799fb5e8d76SmrgAC_SUBST([M4], [$ac_cv_path_M4]) 10800fb5e8d76Smrg]) # XORG_WITH_M4 10801fb5e8d76Smrg 108029ef0b394Smrg# XORG_WITH_PS2PDF([DEFAULT]) 108039ef0b394Smrg# ---------------- 108049ef0b394Smrg# Minimum version: 1.6.0 108059ef0b394Smrg# Minimum version for optional DEFAULT argument: 1.11.0 10806698f425bSmrg# 108079ef0b394Smrg# Documentation tools are not always available on all platforms and sometimes 108089ef0b394Smrg# not at the appropriate level. This macro enables a module to test for the 108099ef0b394Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 108109ef0b394Smrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 108119ef0b394Smrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 108129ef0b394Smrg# --with-ps2pdf assumes 'auto'. 108139ef0b394Smrg# 108149ef0b394Smrg# Interface to module: 108159ef0b394Smrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 108169ef0b394Smrg# PS2PDF: returns the path of the ps2pdf program found 108179ef0b394Smrg# returns the path set by the user in the environment 108189ef0b394Smrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 108199ef0b394Smrg# 'no' user instructs the module not to use ps2pdf 108209ef0b394Smrg# 108219ef0b394Smrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 108229ef0b394Smrg# 108239ef0b394SmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 108249ef0b394SmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 108259ef0b394Smrgm4_define([_defopt], m4_default([$1], [auto])) 108269ef0b394SmrgAC_ARG_WITH(ps2pdf, 108279ef0b394Smrg AS_HELP_STRING([--with-ps2pdf], 108289ef0b394Smrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 108299ef0b394Smrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 108309ef0b394Smrgm4_undefine([_defopt]) 10831d17cd367Smrg 108329ef0b394Smrgif test "x$use_ps2pdf" = x"auto"; then 108339ef0b394Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 108349ef0b394Smrg if test "x$PS2PDF" = "x"; then 108359ef0b394Smrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 108369ef0b394Smrg have_ps2pdf=no 108379ef0b394Smrg else 108389ef0b394Smrg have_ps2pdf=yes 108399ef0b394Smrg fi 108409ef0b394Smrgelif test "x$use_ps2pdf" = x"yes" ; then 108419ef0b394Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 108429ef0b394Smrg if test "x$PS2PDF" = "x"; then 108439ef0b394Smrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 108449ef0b394Smrg fi 108459ef0b394Smrg have_ps2pdf=yes 108469ef0b394Smrgelif test "x$use_ps2pdf" = x"no" ; then 108479ef0b394Smrg if test "x$PS2PDF" != "x"; then 108489ef0b394Smrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 108499ef0b394Smrg fi 108509ef0b394Smrg have_ps2pdf=no 108519ef0b394Smrgelse 108529ef0b394Smrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 108539ef0b394Smrgfi 108549ef0b394SmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 108559ef0b394Smrg]) # XORG_WITH_PS2PDF 10856d17cd367Smrg 108579ef0b394Smrg# XORG_ENABLE_DOCS (enable_docs=yes) 108589ef0b394Smrg# ---------------- 108599ef0b394Smrg# Minimum version: 1.6.0 108609ef0b394Smrg# 108619ef0b394Smrg# Documentation tools are not always available on all platforms and sometimes 108629ef0b394Smrg# not at the appropriate level. This macro enables a builder to skip all 108639ef0b394Smrg# documentation targets except traditional man pages. 108649ef0b394Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 108659ef0b394Smrg# maximum flexibilty in controlling documentation building. 108669ef0b394Smrg# Refer to: 108679ef0b394Smrg# XORG_WITH_XMLTO --with-xmlto 108689ef0b394Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 108699ef0b394Smrg# XORG_WITH_DOXYGEN --with-doxygen 108709ef0b394Smrg# XORG_WITH_FOP --with-fop 108719ef0b394Smrg# XORG_WITH_GROFF --with-groff 108729ef0b394Smrg# XORG_WITH_PS2PDF --with-ps2pdf 108739ef0b394Smrg# 108749ef0b394Smrg# Interface to module: 108759ef0b394Smrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 108769ef0b394Smrg# --enable-docs: 'yes' user instructs the module to generate docs 108779ef0b394Smrg# 'no' user instructs the module not to generate docs 108789ef0b394Smrg# parm1: specify the default value, yes or no. 108799ef0b394Smrg# 108809ef0b394SmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 108819ef0b394Smrgm4_define([docs_default], m4_default([$1], [yes])) 108829ef0b394SmrgAC_ARG_ENABLE(docs, 108839ef0b394Smrg AS_HELP_STRING([--enable-docs], 108849ef0b394Smrg [Enable building the documentation (default: ]docs_default[)]), 108859ef0b394Smrg [build_docs=$enableval], [build_docs=]docs_default) 108869ef0b394Smrgm4_undefine([docs_default]) 108879ef0b394SmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 108889ef0b394SmrgAC_MSG_CHECKING([whether to build documentation]) 108899ef0b394SmrgAC_MSG_RESULT([$build_docs]) 108909ef0b394Smrg]) # XORG_ENABLE_DOCS 10891d17cd367Smrg 108929ef0b394Smrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 108939ef0b394Smrg# ---------------- 108949ef0b394Smrg# Minimum version: 1.6.0 10895698f425bSmrg# 108969ef0b394Smrg# This macro enables a builder to skip all developer documentation. 108979ef0b394Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 108989ef0b394Smrg# maximum flexibilty in controlling documentation building. 108999ef0b394Smrg# Refer to: 109009ef0b394Smrg# XORG_WITH_XMLTO --with-xmlto 109019ef0b394Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 109029ef0b394Smrg# XORG_WITH_DOXYGEN --with-doxygen 109039ef0b394Smrg# XORG_WITH_FOP --with-fop 109049ef0b394Smrg# XORG_WITH_GROFF --with-groff 109059ef0b394Smrg# XORG_WITH_PS2PDF --with-ps2pdf 10906698f425bSmrg# 109079ef0b394Smrg# Interface to module: 109089ef0b394Smrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 109099ef0b394Smrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 109109ef0b394Smrg# 'no' user instructs the module not to generate developer docs 109119ef0b394Smrg# parm1: specify the default value, yes or no. 10912698f425bSmrg# 109139ef0b394SmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 109149ef0b394Smrgm4_define([devel_default], m4_default([$1], [yes])) 109159ef0b394SmrgAC_ARG_ENABLE(devel-docs, 109169ef0b394Smrg AS_HELP_STRING([--enable-devel-docs], 109179ef0b394Smrg [Enable building the developer documentation (default: ]devel_default[)]), 109189ef0b394Smrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 109199ef0b394Smrgm4_undefine([devel_default]) 109209ef0b394SmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 109219ef0b394SmrgAC_MSG_CHECKING([whether to build developer documentation]) 109229ef0b394SmrgAC_MSG_RESULT([$build_devel_docs]) 109239ef0b394Smrg]) # XORG_ENABLE_DEVEL_DOCS 10924698f425bSmrg 109259ef0b394Smrg# XORG_ENABLE_SPECS (enable_specs=yes) 109269ef0b394Smrg# ---------------- 109279ef0b394Smrg# Minimum version: 1.6.0 109289ef0b394Smrg# 109299ef0b394Smrg# This macro enables a builder to skip all functional specification targets. 109309ef0b394Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 109319ef0b394Smrg# maximum flexibilty in controlling documentation building. 109329ef0b394Smrg# Refer to: 109339ef0b394Smrg# XORG_WITH_XMLTO --with-xmlto 109349ef0b394Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 109359ef0b394Smrg# XORG_WITH_DOXYGEN --with-doxygen 109369ef0b394Smrg# XORG_WITH_FOP --with-fop 109379ef0b394Smrg# XORG_WITH_GROFF --with-groff 109389ef0b394Smrg# XORG_WITH_PS2PDF --with-ps2pdf 109399ef0b394Smrg# 109409ef0b394Smrg# Interface to module: 109419ef0b394Smrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 109429ef0b394Smrg# --enable-specs: 'yes' user instructs the module to generate specs 109439ef0b394Smrg# 'no' user instructs the module not to generate specs 109449ef0b394Smrg# parm1: specify the default value, yes or no. 109459ef0b394Smrg# 109469ef0b394SmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 109479ef0b394Smrgm4_define([spec_default], m4_default([$1], [yes])) 109489ef0b394SmrgAC_ARG_ENABLE(specs, 109499ef0b394Smrg AS_HELP_STRING([--enable-specs], 109509ef0b394Smrg [Enable building the specs (default: ]spec_default[)]), 109519ef0b394Smrg [build_specs=$enableval], [build_specs=]spec_default) 109529ef0b394Smrgm4_undefine([spec_default]) 109539ef0b394SmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 109549ef0b394SmrgAC_MSG_CHECKING([whether to build functional specifications]) 109559ef0b394SmrgAC_MSG_RESULT([$build_specs]) 109569ef0b394Smrg]) # XORG_ENABLE_SPECS 10957698f425bSmrg 109589ef0b394Smrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 109599ef0b394Smrg# ---------------------------------------------- 109609ef0b394Smrg# Minimum version: 1.13.0 109619ef0b394Smrg# 109629ef0b394Smrg# This macro enables a builder to enable/disable unit testing 109639ef0b394Smrg# It makes no assumption about the test cases implementation 109649ef0b394Smrg# Test cases may or may not use Automake "Support for test suites" 109659ef0b394Smrg# They may or may not use the software utility library GLib 109669ef0b394Smrg# 109679ef0b394Smrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 109689ef0b394Smrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 109699ef0b394Smrg# The variable enable_unit_tests is used by other macros in this file. 109709ef0b394Smrg# 109719ef0b394Smrg# Interface to module: 109729ef0b394Smrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 109739ef0b394Smrg# enable_unit_tests: used in configure.ac for additional configuration 109749ef0b394Smrg# --enable-unit-tests: 'yes' user instructs the module to build tests 109759ef0b394Smrg# 'no' user instructs the module not to build tests 109769ef0b394Smrg# parm1: specify the default value, yes or no. 109779ef0b394Smrg# 109789ef0b394SmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 109799ef0b394SmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 109809ef0b394SmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 109819ef0b394SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 109829ef0b394Smrgm4_define([_defopt], m4_default([$1], [auto])) 109839ef0b394SmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 109849ef0b394Smrg [Enable building unit test cases (default: ]_defopt[)]), 109859ef0b394Smrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 109869ef0b394Smrgm4_undefine([_defopt]) 109879ef0b394SmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 109889ef0b394SmrgAC_MSG_CHECKING([whether to build unit test cases]) 109899ef0b394SmrgAC_MSG_RESULT([$enable_unit_tests]) 109909ef0b394Smrg]) # XORG_ENABLE_UNIT_TESTS 109919ef0b394Smrg 10992fb5e8d76Smrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 10993fb5e8d76Smrg# ------------------------------------------------------ 10994fb5e8d76Smrg# Minimum version: 1.17.0 10995fb5e8d76Smrg# 10996fb5e8d76Smrg# This macro enables a builder to enable/disable integration testing 10997fb5e8d76Smrg# It makes no assumption about the test cases' implementation 10998fb5e8d76Smrg# Test cases may or may not use Automake "Support for test suites" 10999fb5e8d76Smrg# 11000fb5e8d76Smrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 11001fb5e8d76Smrg# usually requires less dependencies and may be built and run under less 11002fb5e8d76Smrg# stringent environments than integration tests. 11003fb5e8d76Smrg# 11004fb5e8d76Smrg# Interface to module: 11005fb5e8d76Smrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 11006fb5e8d76Smrg# enable_integration_tests: used in configure.ac for additional configuration 11007fb5e8d76Smrg# --enable-integration-tests: 'yes' user instructs the module to build tests 11008fb5e8d76Smrg# 'no' user instructs the module not to build tests 11009fb5e8d76Smrg# parm1: specify the default value, yes or no. 11010fb5e8d76Smrg# 11011fb5e8d76SmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 11012fb5e8d76SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 11013fb5e8d76Smrgm4_define([_defopt], m4_default([$1], [auto])) 11014fb5e8d76SmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 11015fb5e8d76Smrg [Enable building integration test cases (default: ]_defopt[)]), 11016fb5e8d76Smrg [enable_integration_tests=$enableval], 11017fb5e8d76Smrg [enable_integration_tests=]_defopt) 11018fb5e8d76Smrgm4_undefine([_defopt]) 11019fb5e8d76SmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 11020fb5e8d76Smrg [test "x$enable_integration_tests" != xno]) 11021fb5e8d76SmrgAC_MSG_CHECKING([whether to build unit test cases]) 11022fb5e8d76SmrgAC_MSG_RESULT([$enable_integration_tests]) 11023fb5e8d76Smrg]) # XORG_ENABLE_INTEGRATION_TESTS 11024fb5e8d76Smrg 110259ef0b394Smrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 110269ef0b394Smrg# ---------------------------------------- 110279ef0b394Smrg# Minimum version: 1.13.0 110289ef0b394Smrg# 110299ef0b394Smrg# GLib is a library which provides advanced data structures and functions. 110309ef0b394Smrg# This macro enables a module to test for the presence of Glib. 110319ef0b394Smrg# 110329ef0b394Smrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 110339ef0b394Smrg# Otherwise the value of $enable_unit_tests is blank. 110349ef0b394Smrg# 11035fb5e8d76Smrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 11036fb5e8d76Smrg# test support usually requires less dependencies and may be built and run under 11037fb5e8d76Smrg# less stringent environments than integration tests. 11038fb5e8d76Smrg# 110399ef0b394Smrg# Interface to module: 110409ef0b394Smrg# HAVE_GLIB: used in makefiles to conditionally build targets 110419ef0b394Smrg# with_glib: used in configure.ac to know if GLib has been found 110429ef0b394Smrg# --with-glib: 'yes' user instructs the module to use glib 110439ef0b394Smrg# 'no' user instructs the module not to use glib 110449ef0b394Smrg# 110459ef0b394SmrgAC_DEFUN([XORG_WITH_GLIB],[ 110469ef0b394SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 110479ef0b394Smrgm4_define([_defopt], m4_default([$2], [auto])) 110489ef0b394SmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 110499ef0b394Smrg [Use GLib library for unit testing (default: ]_defopt[)]), 110509ef0b394Smrg [with_glib=$withval], [with_glib=]_defopt) 110519ef0b394Smrgm4_undefine([_defopt]) 110529ef0b394Smrg 110539ef0b394Smrghave_glib=no 110549ef0b394Smrg# Do not probe GLib if user explicitly disabled unit testing 110559ef0b394Smrgif test "x$enable_unit_tests" != x"no"; then 110569ef0b394Smrg # Do not probe GLib if user explicitly disabled it 110579ef0b394Smrg if test "x$with_glib" != x"no"; then 110589ef0b394Smrg m4_ifval( 110599ef0b394Smrg [$1], 110609ef0b394Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 110619ef0b394Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 110629ef0b394Smrg ) 11063d17cd367Smrg fi 11064698f425bSmrgfi 11065698f425bSmrg 110669ef0b394Smrg# Not having GLib when unit testing has been explicitly requested is an error 110679ef0b394Smrgif test "x$enable_unit_tests" = x"yes"; then 110689ef0b394Smrg if test "x$have_glib" = x"no"; then 110699ef0b394Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 11070d17cd367Smrg fi 11071698f425bSmrgfi 11072d17cd367Smrg 110739ef0b394Smrg# Having unit testing disabled when GLib has been explicitly requested is an error 110749ef0b394Smrgif test "x$enable_unit_tests" = x"no"; then 110759ef0b394Smrg if test "x$with_glib" = x"yes"; then 110769ef0b394Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 110779ef0b394Smrg fi 110789ef0b394Smrgfi 11079d17cd367Smrg 110809ef0b394Smrg# Not having GLib when it has been explicitly requested is an error 110819ef0b394Smrgif test "x$with_glib" = x"yes"; then 110829ef0b394Smrg if test "x$have_glib" = x"no"; then 110839ef0b394Smrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 110849ef0b394Smrg fi 110859ef0b394Smrgfi 11086d17cd367Smrg 110879ef0b394SmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 110889ef0b394Smrg]) # XORG_WITH_GLIB 11089d17cd367Smrg 110909ef0b394Smrg# XORG_LD_WRAP([required|optional]) 110919ef0b394Smrg# --------------------------------- 110929ef0b394Smrg# Minimum version: 1.13.0 110939ef0b394Smrg# 110949ef0b394Smrg# Check if linker supports -wrap, passed via compiler flags 110959ef0b394Smrg# 110969ef0b394Smrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 110979ef0b394Smrg# Otherwise the value of $enable_unit_tests is blank. 110989ef0b394Smrg# 110999ef0b394Smrg# Argument added in 1.16.0 - default is "required", to match existing behavior 111009ef0b394Smrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 111019ef0b394Smrg# available, an argument of "optional" allows use when some unit tests require 111029ef0b394Smrg# ld -wrap and others do not. 111039ef0b394Smrg# 111049ef0b394SmrgAC_DEFUN([XORG_LD_WRAP],[ 111059ef0b394SmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 111069ef0b394Smrg [AC_LANG_PROGRAM([#include <stdlib.h> 111079ef0b394Smrg void __wrap_exit(int status) { return; }], 111089ef0b394Smrg [exit(0);])]) 111099ef0b394Smrg# Not having ld wrap when unit testing has been explicitly requested is an error 111109ef0b394Smrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 111119ef0b394Smrg if test "x$have_ld_wrap" = x"no"; then 111129ef0b394Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 111139ef0b394Smrg fi 111149ef0b394Smrgfi 111159ef0b394SmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 11116d17cd367Smrg# 111179ef0b394Smrg]) # XORG_LD_WRAP 11118d17cd367Smrg 111199ef0b394Smrg# XORG_CHECK_LINKER_FLAGS 111209ef0b394Smrg# ----------------------- 111219ef0b394Smrg# SYNOPSIS 111229ef0b394Smrg# 111239ef0b394Smrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 111249ef0b394Smrg# 111259ef0b394Smrg# DESCRIPTION 111269ef0b394Smrg# 111279ef0b394Smrg# Check whether the given linker FLAGS work with the current language's 111289ef0b394Smrg# linker, or whether they give an error. 111299ef0b394Smrg# 111309ef0b394Smrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 111319ef0b394Smrg# success/failure. 111329ef0b394Smrg# 111339ef0b394Smrg# PROGRAM-SOURCE is the program source to link with, if needed 111349ef0b394Smrg# 111359ef0b394Smrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 111369ef0b394Smrg# 111379ef0b394Smrg# LICENSE 111389ef0b394Smrg# 111399ef0b394Smrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 111409ef0b394Smrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 111419ef0b394Smrg# Copyright (c) 2009 Matteo Frigo 111429ef0b394Smrg# 111439ef0b394Smrg# This program is free software: you can redistribute it and/or modify it 111449ef0b394Smrg# under the terms of the GNU General Public License as published by the 111459ef0b394Smrg# Free Software Foundation, either version 3 of the License, or (at your 111469ef0b394Smrg# option) any later version. 111479ef0b394Smrg# 111489ef0b394Smrg# This program is distributed in the hope that it will be useful, but 111499ef0b394Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 111509ef0b394Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 111519ef0b394Smrg# Public License for more details. 111529ef0b394Smrg# 111539ef0b394Smrg# You should have received a copy of the GNU General Public License along 111549ef0b394Smrg# with this program. If not, see <http://www.gnu.org/licenses/>. 111559ef0b394Smrg# 111569ef0b394Smrg# As a special exception, the respective Autoconf Macro's copyright owner 111579ef0b394Smrg# gives unlimited permission to copy, distribute and modify the configure 111589ef0b394Smrg# scripts that are the output of Autoconf when processing the Macro. You 111599ef0b394Smrg# need not follow the terms of the GNU General Public License when using 111609ef0b394Smrg# or distributing such scripts, even though portions of the text of the 111619ef0b394Smrg# Macro appear in them. The GNU General Public License (GPL) does govern 111629ef0b394Smrg# all other use of the material that constitutes the Autoconf Macro. 111639ef0b394Smrg# 111649ef0b394Smrg# This special exception to the GPL applies to versions of the Autoconf 111659ef0b394Smrg# Macro released by the Autoconf Archive. When you make and distribute a 111669ef0b394Smrg# modified version of the Autoconf Macro, you may extend this special 111679ef0b394Smrg# exception to the GPL to apply to your modified version as well.# 111689ef0b394SmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 111699ef0b394Smrg[AC_MSG_CHECKING([whether the linker accepts $1]) 111709ef0b394Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 111719ef0b394SmrgAS_LITERAL_IF([$1], 111729ef0b394Smrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 111739ef0b394Smrg ax_save_FLAGS=$LDFLAGS 111749ef0b394Smrg LDFLAGS="$1" 111759ef0b394Smrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 111769ef0b394Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 111779ef0b394Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 111789ef0b394Smrg LDFLAGS=$ax_save_FLAGS])], 111799ef0b394Smrg [ax_save_FLAGS=$LDFLAGS 111809ef0b394Smrg LDFLAGS="$1" 111819ef0b394Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 111829ef0b394Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 111839ef0b394Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 111849ef0b394Smrg LDFLAGS=$ax_save_FLAGS]) 111859ef0b394Smrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 111869ef0b394SmrgAC_MSG_RESULT($xorg_check_linker_flags) 111879ef0b394Smrgif test "x$xorg_check_linker_flags" = xyes; then 111889ef0b394Smrg m4_default([$2], :) 111899ef0b394Smrgelse 111909ef0b394Smrg m4_default([$3], :) 11191698f425bSmrgfi 111929ef0b394Smrg]) # XORG_CHECK_LINKER_FLAGS 11193698f425bSmrg 111949ef0b394Smrg# XORG_MEMORY_CHECK_FLAGS 111959ef0b394Smrg# ----------------------- 111969ef0b394Smrg# Minimum version: 1.16.0 11197698f425bSmrg# 111989ef0b394Smrg# This macro attempts to find appropriate memory checking functionality 111999ef0b394Smrg# for various platforms which unit testing code may use to catch various 112009ef0b394Smrg# forms of memory allocation and access errors in testing. 112019ef0b394Smrg# 112029ef0b394Smrg# Interface to module: 112039ef0b394Smrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 112049ef0b394Smrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 112059ef0b394Smrg# 112069ef0b394Smrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 112079ef0b394Smrg# 112089ef0b394SmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 11209d17cd367Smrg 112109ef0b394SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 112119ef0b394SmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 112129ef0b394Smrg [Environment variables to enable memory checking in tests]) 112139ef0b394Smrg 112149ef0b394Smrg# Check for different types of support on different platforms 112159ef0b394Smrgcase $host_os in 112169ef0b394Smrg solaris*) 112179ef0b394Smrg AC_CHECK_LIB([umem], [umem_alloc], 112189ef0b394Smrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 112199ef0b394Smrg ;; 112209ef0b394Smrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 112219ef0b394Smrg # both directly and inverted, so should not be 0 or 255. 112229ef0b394Smrg malloc_debug_env='MALLOC_PERTURB_=15' 112239ef0b394Smrg ;; 112249ef0b394Smrg darwin*) 112259ef0b394Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 112269ef0b394Smrg ;; 112279ef0b394Smrg *bsd*) 112289ef0b394Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 112299ef0b394Smrg ;; 112309ef0b394Smrgesac 11231698f425bSmrg 112329ef0b394Smrg# User supplied flags override default flags 112339ef0b394Smrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 112349ef0b394Smrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 11235698f425bSmrgfi 11236698f425bSmrg 112379ef0b394SmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 112389ef0b394Smrg]) # XORG_WITH_LINT 11239698f425bSmrg 112409ef0b394Smrg# XORG_CHECK_MALLOC_ZERO 112419ef0b394Smrg# ---------------------- 112429ef0b394Smrg# Minimum version: 1.0.0 11243d17cd367Smrg# 112449ef0b394Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 112459ef0b394Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 112469ef0b394Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 112479ef0b394SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 112489ef0b394SmrgAC_ARG_ENABLE(malloc0returnsnull, 112499ef0b394Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 112509ef0b394Smrg [malloc(0) returns NULL (default: auto)]), 112519ef0b394Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 112529ef0b394Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 11253698f425bSmrg 112549ef0b394SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 112559ef0b394Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 11256fb5e8d76SmrgAC_CACHE_VAL([xorg_cv_malloc0_returns_null], 11257fb5e8d76Smrg [AC_RUN_IFELSE([AC_LANG_PROGRAM([ 112589ef0b394Smrg#include <stdlib.h> 112599ef0b394Smrg],[ 112609ef0b394Smrg char *m0, *r0, *c0, *p; 112619ef0b394Smrg m0 = malloc(0); 112629ef0b394Smrg p = malloc(10); 112639ef0b394Smrg r0 = realloc(p,0); 112649ef0b394Smrg c0 = calloc(0,10); 112659ef0b394Smrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 112669ef0b394Smrg])], 11267fb5e8d76Smrg [xorg_cv_malloc0_returns_null=yes], 11268fb5e8d76Smrg [xorg_cv_malloc0_returns_null=no])]) 11269fb5e8d76SmrgMALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null 112709ef0b394Smrgfi 112719ef0b394SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 11272698f425bSmrg 112739ef0b394Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 112749ef0b394Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 112759ef0b394Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 112769ef0b394Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 112779ef0b394Smrgelse 112789ef0b394Smrg MALLOC_ZERO_CFLAGS="" 112799ef0b394Smrg XMALLOC_ZERO_CFLAGS="" 112809ef0b394Smrg XTMALLOC_ZERO_CFLAGS="" 112819ef0b394Smrgfi 11282698f425bSmrg 112839ef0b394SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 112849ef0b394SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 112859ef0b394SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 112869ef0b394Smrg]) # XORG_CHECK_MALLOC_ZERO 11287698f425bSmrg 112889ef0b394Smrg# XORG_WITH_LINT() 112899ef0b394Smrg# ---------------- 112909ef0b394Smrg# Minimum version: 1.1.0 11291d17cd367Smrg# 112929ef0b394Smrg# This macro enables the use of a tool that flags some suspicious and 112939ef0b394Smrg# non-portable constructs (likely to be bugs) in C language source code. 112949ef0b394Smrg# It will attempt to locate the tool and use appropriate options. 112959ef0b394Smrg# There are various lint type tools on different platforms. 112969ef0b394Smrg# 112979ef0b394Smrg# Interface to module: 112989ef0b394Smrg# LINT: returns the path to the tool found on the platform 112999ef0b394Smrg# or the value set to LINT on the configure cmd line 113009ef0b394Smrg# also an Automake conditional 113019ef0b394Smrg# LINT_FLAGS: an Automake variable with appropriate flags 113029ef0b394Smrg# 113039ef0b394Smrg# --with-lint: 'yes' user instructs the module to use lint 113049ef0b394Smrg# 'no' user instructs the module not to use lint (default) 113059ef0b394Smrg# 113069ef0b394Smrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 113079ef0b394Smrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 113089ef0b394Smrg# 113099ef0b394SmrgAC_DEFUN([XORG_WITH_LINT],[ 11310d17cd367Smrg 113119ef0b394SmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 113129ef0b394SmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 113139ef0b394SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 113149ef0b394Smrg [Use a lint-style source code checker (default: disabled)])], 113159ef0b394Smrg [use_lint=$withval], [use_lint=no]) 11316d17cd367Smrg 113179ef0b394Smrg# Obtain platform specific info like program name and options 113189ef0b394Smrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 113199ef0b394Smrgcase $host_os in 113209ef0b394Smrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 113219ef0b394Smrg lint_name=splint 113229ef0b394Smrg lint_options="-badflag" 113239ef0b394Smrg ;; 113249ef0b394Smrg *freebsd* | *netbsd*) 113259ef0b394Smrg lint_name=lint 113269ef0b394Smrg lint_options="-u -b" 113279ef0b394Smrg ;; 113289ef0b394Smrg *solaris*) 113299ef0b394Smrg lint_name=lint 113309ef0b394Smrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 113319ef0b394Smrg ;; 11332d17cd367Smrgesac 113339ef0b394Smrg 113349ef0b394Smrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 113359ef0b394Smrgif test "x$use_lint" = x"yes" ; then 113369ef0b394Smrg AC_PATH_PROG([LINT], [$lint_name]) 113379ef0b394Smrg if test "x$LINT" = "x"; then 113389ef0b394Smrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 113399ef0b394Smrg fi 113409ef0b394Smrgelif test "x$use_lint" = x"no" ; then 113419ef0b394Smrg if test "x$LINT" != "x"; then 113429ef0b394Smrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 113439ef0b394Smrg fi 113449ef0b394Smrgelse 113459ef0b394Smrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 11346698f425bSmrgfi 11347698f425bSmrg 113489ef0b394Smrg# User supplied flags override default flags 113499ef0b394Smrgif test "x$LINT_FLAGS" != "x"; then 113509ef0b394Smrg lint_options=$LINT_FLAGS 113519ef0b394Smrgfi 11352698f425bSmrg 113539ef0b394SmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 113549ef0b394SmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 11355698f425bSmrg 113569ef0b394Smrg]) # XORG_WITH_LINT 11357698f425bSmrg 113589ef0b394Smrg# XORG_LINT_LIBRARY(LIBNAME) 113599ef0b394Smrg# -------------------------- 113609ef0b394Smrg# Minimum version: 1.1.0 113619ef0b394Smrg# 113629ef0b394Smrg# Sets up flags for building lint libraries for checking programs that call 113639ef0b394Smrg# functions in the library. 113649ef0b394Smrg# 113659ef0b394Smrg# Interface to module: 113669ef0b394Smrg# LINTLIB - Automake variable with the name of lint library file to make 113679ef0b394Smrg# MAKE_LINT_LIB - Automake conditional 113689ef0b394Smrg# 113699ef0b394Smrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 113709ef0b394Smrg# - 'no' user instructs the module not to create a lint library (default) 11371698f425bSmrg 113729ef0b394SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 113739ef0b394SmrgAC_REQUIRE([XORG_WITH_LINT]) 113749ef0b394SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 113759ef0b394Smrg [Create lint library (default: disabled)])], 113769ef0b394Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 11377d17cd367Smrg 113789ef0b394Smrgif test "x$make_lint_lib" = x"yes" ; then 113799ef0b394Smrg LINTLIB=llib-l$1.ln 113809ef0b394Smrg if test "x$LINT" = "x"; then 113819ef0b394Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 113829ef0b394Smrg fi 113839ef0b394Smrgelif test "x$make_lint_lib" != x"no" ; then 113849ef0b394Smrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 11385d17cd367Smrgfi 11386698f425bSmrg 113879ef0b394SmrgAC_SUBST(LINTLIB) 113889ef0b394SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 113899ef0b394Smrg 113909ef0b394Smrg]) # XORG_LINT_LIBRARY 113919ef0b394Smrg 113929ef0b394Smrg# XORG_COMPILER_BRAND 113939ef0b394Smrg# ------------------- 113949ef0b394Smrg# Minimum version: 1.14.0 11395d17cd367Smrg# 113969ef0b394Smrg# Checks for various brands of compilers and sets flags as appropriate: 113979ef0b394Smrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 11398fb5e8d76Smrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 113999ef0b394Smrg# clang compiler - sets CLANGCC to "yes" 114009ef0b394Smrg# Intel compiler - sets INTELCC to "yes" 114019ef0b394Smrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 114029ef0b394Smrg# 114039ef0b394SmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 11404fb5e8d76SmrgAC_LANG_CASE( 11405fb5e8d76Smrg [C], [ 11406fb5e8d76Smrg AC_REQUIRE([AC_PROG_CC_C99]) 11407fb5e8d76Smrg ], 11408fb5e8d76Smrg [C++], [ 11409fb5e8d76Smrg AC_REQUIRE([AC_PROG_CXX]) 11410fb5e8d76Smrg ] 11411fb5e8d76Smrg) 114129ef0b394SmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 114139ef0b394SmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 114149ef0b394SmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 114159ef0b394Smrg]) # XORG_COMPILER_BRAND 11416698f425bSmrg 114179ef0b394Smrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 11418d17cd367Smrg# --------------- 114199ef0b394Smrg# Minimum version: 1.16.0 11420d17cd367Smrg# 114219ef0b394Smrg# Test if the compiler works when passed the given flag as a command line argument. 114229ef0b394Smrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 114239ef0b394Smrg# next flag in the list until there are no more options. 114249ef0b394Smrg# 114259ef0b394Smrg# Note that this does not guarantee that the compiler supports the flag as some 114269ef0b394Smrg# compilers will simply ignore arguments that they do not understand, but we do 114279ef0b394Smrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 114289ef0b394Smrg# -Werror=unused-command-line-argument 114299ef0b394Smrg# 114309ef0b394SmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 114319ef0b394Smrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 114329ef0b394Smrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 114339ef0b394Smrg 11434fb5e8d76SmrgAC_LANG_COMPILER_REQUIRE 11435fb5e8d76Smrg 11436fb5e8d76SmrgAC_LANG_CASE( 11437fb5e8d76Smrg [C], [ 11438fb5e8d76Smrg AC_REQUIRE([AC_PROG_CC_C99]) 11439fb5e8d76Smrg define([PREFIX], [C]) 11440fb5e8d76Smrg define([CACHE_PREFIX], [cc]) 11441fb5e8d76Smrg define([COMPILER], [$CC]) 11442fb5e8d76Smrg ], 11443fb5e8d76Smrg [C++], [ 11444fb5e8d76Smrg define([PREFIX], [CXX]) 11445fb5e8d76Smrg define([CACHE_PREFIX], [cxx]) 11446fb5e8d76Smrg define([COMPILER], [$CXX]) 11447fb5e8d76Smrg ] 11448fb5e8d76Smrg) 11449fb5e8d76Smrg 11450fb5e8d76Smrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 114519ef0b394Smrg 11452fb5e8d76Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 11453fb5e8d76Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 11454fb5e8d76Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 11455fb5e8d76Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 114569ef0b394Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 11457fb5e8d76Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 11458fb5e8d76Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 11459fb5e8d76Smrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 11460fb5e8d76Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 114619ef0b394Smrgfi 11462698f425bSmrg 11463fb5e8d76Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 11464fb5e8d76Smrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 11465fb5e8d76Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 114669ef0b394Smrg fi 11467fb5e8d76Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 11468fb5e8d76Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 11469fb5e8d76Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 114709ef0b394Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 11471fb5e8d76Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 11472fb5e8d76Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 11473fb5e8d76Smrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 11474fb5e8d76Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 114759ef0b394Smrgfi 11476d17cd367Smrg 114779ef0b394Smrgfound="no" 114789ef0b394Smrgm4_foreach([flag], m4_cdr($@), [ 114799ef0b394Smrg if test $found = "no" ; then 11480fb5e8d76Smrg if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then 11481fb5e8d76Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 114829ef0b394Smrg fi 114839ef0b394Smrg 11484fb5e8d76Smrg if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then 11485fb5e8d76Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 114869ef0b394Smrg fi 114879ef0b394Smrg 11488fb5e8d76Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 114899ef0b394Smrg 114909ef0b394Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 11491fb5e8d76Smrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 11492fb5e8d76Smrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 11493fb5e8d76Smrg AC_CACHE_VAL($cacheid, 114949ef0b394Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 11495fb5e8d76Smrg [eval $cacheid=yes], 11496fb5e8d76Smrg [eval $cacheid=no])]) 114979ef0b394Smrg 11498fb5e8d76Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 114999ef0b394Smrg 11500fb5e8d76Smrg eval supported=\$$cacheid 115019ef0b394Smrg AC_MSG_RESULT([$supported]) 115029ef0b394Smrg if test "$supported" = "yes" ; then 115039ef0b394Smrg $1="$$1 ]flag[" 115049ef0b394Smrg found="yes" 115059ef0b394Smrg fi 115069ef0b394Smrg fi 115079ef0b394Smrg]) 115089ef0b394Smrg]) # XORG_TESTSET_CFLAG 11509d17cd367Smrg 115109ef0b394Smrg# XORG_COMPILER_FLAGS 115119ef0b394Smrg# --------------- 115129ef0b394Smrg# Minimum version: 1.16.0 115139ef0b394Smrg# 11514fb5e8d76Smrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 11515fb5e8d76Smrg# arguments supported by the selected compiler which do NOT alter the generated 11516fb5e8d76Smrg# code. These arguments will cause the compiler to print various warnings 11517fb5e8d76Smrg# during compilation AND turn a conservative set of warnings into errors. 115189ef0b394Smrg# 11519fb5e8d76Smrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 11520fb5e8d76Smrg# future versions of util-macros as options are added to new compilers. 115219ef0b394Smrg# 115229ef0b394SmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 115239ef0b394SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 11524698f425bSmrg 115259ef0b394SmrgAC_ARG_ENABLE(selective-werror, 115269ef0b394Smrg AS_HELP_STRING([--disable-selective-werror], 115279ef0b394Smrg [Turn off selective compiler errors. (default: enabled)]), 115289ef0b394Smrg [SELECTIVE_WERROR=$enableval], 115299ef0b394Smrg [SELECTIVE_WERROR=yes]) 11530698f425bSmrg 11531fb5e8d76SmrgAC_LANG_CASE( 11532fb5e8d76Smrg [C], [ 11533fb5e8d76Smrg define([PREFIX], [C]) 11534fb5e8d76Smrg ], 11535fb5e8d76Smrg [C++], [ 11536fb5e8d76Smrg define([PREFIX], [CXX]) 11537fb5e8d76Smrg ] 11538fb5e8d76Smrg) 115399ef0b394Smrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 115409ef0b394Smrgif test "x$SUNCC" = "xyes"; then 11541fb5e8d76Smrg [BASE_]PREFIX[FLAGS]="-v" 115429ef0b394Smrgelse 11543fb5e8d76Smrg [BASE_]PREFIX[FLAGS]="" 115449ef0b394Smrgfi 11545698f425bSmrg 115469ef0b394Smrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 11547fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 11548fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 11549fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 11550fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 11551fb5e8d76Smrg 11552fb5e8d76SmrgAC_LANG_CASE( 11553fb5e8d76Smrg [C], [ 11554fb5e8d76Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 11555fb5e8d76Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 11556fb5e8d76Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 11557fb5e8d76Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 11558fb5e8d76Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd]) 11559fb5e8d76Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 11560fb5e8d76Smrg ] 11561fb5e8d76Smrg) 115629ef0b394Smrg 115639ef0b394Smrg# This chunk adds additional warnings that could catch undesired effects. 11564fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 11565fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 11566fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 11567fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 11568fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 11569fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 11570fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 115719ef0b394Smrg 115729ef0b394Smrg# These are currently disabled because they are noisy. They will be enabled 115739ef0b394Smrg# in the future once the codebase is sufficiently modernized to silence 115749ef0b394Smrg# them. For now, I don't want them to drown out the other warnings. 11575fb5e8d76Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 11576fb5e8d76Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 11577fb5e8d76Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 115789ef0b394Smrg 115799ef0b394Smrg# Turn some warnings into errors, so we don't accidently get successful builds 115809ef0b394Smrg# when there are problems that should be fixed. 115819ef0b394Smrg 115829ef0b394Smrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 11583fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 11584fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 11585fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 11586fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 11587fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 11588fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 11589fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 11590fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 11591fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 11592fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 11593fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 11594fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 11595fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 115969ef0b394Smrgelse 115979ef0b394SmrgAC_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]) 11598fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 11599fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 11600fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 11601fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 11602fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 11603fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 11604fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 11605fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 11606fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 11607fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 11608fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 11609fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 11610fb5e8d76SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 116119ef0b394Smrgfi 11612698f425bSmrg 11613fb5e8d76SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 116149ef0b394Smrg]) # XORG_COMPILER_FLAGS 116159ef0b394Smrg 116169ef0b394Smrg# XORG_CWARNFLAGS 116179ef0b394Smrg# --------------- 116189ef0b394Smrg# Minimum version: 1.2.0 116199ef0b394Smrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 11620698f425bSmrg# 116219ef0b394Smrg# Defines CWARNFLAGS to enable C compiler warnings. 116229ef0b394Smrg# 116239ef0b394Smrg# This function is deprecated because it defines -fno-strict-aliasing 116249ef0b394Smrg# which alters the code generated by the compiler. If -fno-strict-aliasing 116259ef0b394Smrg# is needed, then it should be added explicitly in the module when 116269ef0b394Smrg# it is updated to use BASE_CFLAGS. 116279ef0b394Smrg# 116289ef0b394SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 116299ef0b394SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 116309ef0b394SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 11631fb5e8d76SmrgAC_LANG_CASE( 11632fb5e8d76Smrg [C], [ 11633fb5e8d76Smrg CWARNFLAGS="$BASE_CFLAGS" 11634fb5e8d76Smrg if test "x$GCC" = xyes ; then 11635fb5e8d76Smrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 11636fb5e8d76Smrg fi 11637fb5e8d76Smrg AC_SUBST(CWARNFLAGS) 11638fb5e8d76Smrg ] 11639fb5e8d76Smrg) 116409ef0b394Smrg]) # XORG_CWARNFLAGS 11641698f425bSmrg 116429ef0b394Smrg# XORG_STRICT_OPTION 116439ef0b394Smrg# ----------------------- 116449ef0b394Smrg# Minimum version: 1.3.0 116459ef0b394Smrg# 116469ef0b394Smrg# Add configure option to enable strict compilation flags, such as treating 116479ef0b394Smrg# warnings as fatal errors. 116489ef0b394Smrg# If --enable-strict-compilation is passed to configure, adds strict flags to 11649fb5e8d76Smrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 116509ef0b394Smrg# 116519ef0b394Smrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 116529ef0b394Smrg# when strict compilation is unconditionally desired. 116539ef0b394SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 116549ef0b394SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 116559ef0b394SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 11656698f425bSmrg 116579ef0b394SmrgAC_ARG_ENABLE(strict-compilation, 116589ef0b394Smrg AS_HELP_STRING([--enable-strict-compilation], 116599ef0b394Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 116609ef0b394Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 11661698f425bSmrg 11662fb5e8d76SmrgAC_LANG_CASE( 11663fb5e8d76Smrg [C], [ 11664fb5e8d76Smrg define([PREFIX], [C]) 11665fb5e8d76Smrg ], 11666fb5e8d76Smrg [C++], [ 11667fb5e8d76Smrg define([PREFIX], [CXX]) 11668fb5e8d76Smrg ] 11669fb5e8d76Smrg) 11670fb5e8d76Smrg 11671fb5e8d76Smrg[STRICT_]PREFIX[FLAGS]="" 11672fb5e8d76SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 11673fb5e8d76SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 11674698f425bSmrg 116759ef0b394Smrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 116769ef0b394Smrg# activate it with -Werror, so we add it here explicitly. 11677fb5e8d76SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 11678698f425bSmrg 116799ef0b394Smrgif test "x$STRICT_COMPILE" = "xyes"; then 11680fb5e8d76Smrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 11681fb5e8d76Smrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 11682698f425bSmrgfi 11683fb5e8d76SmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 11684fb5e8d76SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 11685fb5e8d76SmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 116869ef0b394Smrg]) # XORG_STRICT_OPTION 11687698f425bSmrg 116889ef0b394Smrg# XORG_DEFAULT_OPTIONS 116899ef0b394Smrg# -------------------- 116909ef0b394Smrg# Minimum version: 1.3.0 11691698f425bSmrg# 116929ef0b394Smrg# Defines default options for X.Org modules. 116939ef0b394Smrg# 116949ef0b394SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 116959ef0b394SmrgAC_REQUIRE([AC_PROG_INSTALL]) 116969ef0b394SmrgXORG_COMPILER_FLAGS 116979ef0b394SmrgXORG_CWARNFLAGS 116989ef0b394SmrgXORG_STRICT_OPTION 116999ef0b394SmrgXORG_RELEASE_VERSION 117009ef0b394SmrgXORG_CHANGELOG 117019ef0b394SmrgXORG_INSTALL 117029ef0b394SmrgXORG_MANPAGE_SECTIONS 117039ef0b394Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 117049ef0b394Smrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 117059ef0b394Smrg]) # XORG_DEFAULT_OPTIONS 11706698f425bSmrg 117079ef0b394Smrg# XORG_INSTALL() 117089ef0b394Smrg# ---------------- 117099ef0b394Smrg# Minimum version: 1.4.0 117109ef0b394Smrg# 117119ef0b394Smrg# Defines the variable INSTALL_CMD as the command to copy 117129ef0b394Smrg# INSTALL from $prefix/share/util-macros. 117139ef0b394Smrg# 117149ef0b394SmrgAC_DEFUN([XORG_INSTALL], [ 117159ef0b394SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 117169ef0b394Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 117179ef0b394SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 117189ef0b394Smrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 117199ef0b394Smrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 117209ef0b394Smrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 117219ef0b394SmrgAC_SUBST([INSTALL_CMD]) 117229ef0b394Smrg]) # XORG_INSTALL 117239ef0b394Smrgdnl Copyright 2005 Red Hat, Inc 117249ef0b394Smrgdnl 117259ef0b394Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 117269ef0b394Smrgdnl documentation for any purpose is hereby granted without fee, provided that 117279ef0b394Smrgdnl the above copyright notice appear in all copies and that both that 117289ef0b394Smrgdnl copyright notice and this permission notice appear in supporting 117299ef0b394Smrgdnl documentation. 117309ef0b394Smrgdnl 117319ef0b394Smrgdnl The above copyright notice and this permission notice shall be included 117329ef0b394Smrgdnl in all copies or substantial portions of the Software. 117339ef0b394Smrgdnl 117349ef0b394Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 117359ef0b394Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 117369ef0b394Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 117379ef0b394Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 117389ef0b394Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 117399ef0b394Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 117409ef0b394Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 117419ef0b394Smrgdnl 117429ef0b394Smrgdnl Except as contained in this notice, the name of the copyright holders shall 117439ef0b394Smrgdnl not be used in advertising or otherwise to promote the sale, use or 117449ef0b394Smrgdnl other dealings in this Software without prior written authorization 117459ef0b394Smrgdnl from the copyright holders. 117469ef0b394Smrgdnl 11747698f425bSmrg 117489ef0b394Smrg# XORG_RELEASE_VERSION 117499ef0b394Smrg# -------------------- 117509ef0b394Smrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 11751fb5e8d76Smrg 117529ef0b394SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 117539ef0b394Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 117549ef0b394Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 117559ef0b394Smrg [Major version of this package]) 117569ef0b394Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 117579ef0b394Smrg if test "x$PVM" = "x"; then 117589ef0b394Smrg PVM="0" 117599ef0b394Smrg fi 117609ef0b394Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 117619ef0b394Smrg [$PVM], 117629ef0b394Smrg [Minor version of this package]) 117639ef0b394Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 117649ef0b394Smrg if test "x$PVP" = "x"; then 117659ef0b394Smrg PVP="0" 117669ef0b394Smrg fi 117679ef0b394Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 117689ef0b394Smrg [$PVP], 117699ef0b394Smrg [Patch version of this package]) 11770d17cd367Smrg]) 11771698f425bSmrg 117729ef0b394Smrg# XORG_CHANGELOG() 117739ef0b394Smrg# ---------------- 117749ef0b394Smrg# Minimum version: 1.2.0 11775698f425bSmrg# 117769ef0b394Smrg# Defines the variable CHANGELOG_CMD as the command to generate 117779ef0b394Smrg# ChangeLog from git. 117789ef0b394Smrg# 117799ef0b394Smrg# 117809ef0b394SmrgAC_DEFUN([XORG_CHANGELOG], [ 117819ef0b394SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 117829ef0b394Smrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 117839ef0b394Smrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 117849ef0b394Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 117859ef0b394SmrgAC_SUBST([CHANGELOG_CMD]) 117869ef0b394Smrg]) # XORG_CHANGELOG 11787698f425bSmrg 117889ef0b394Smrgdnl 117899ef0b394Smrgdnl Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. 117909ef0b394Smrgdnl 117919ef0b394Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 117929ef0b394Smrgdnl copy of this software and associated documentation files (the "Software"), 117939ef0b394Smrgdnl to deal in the Software without restriction, including without limitation 117949ef0b394Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 117959ef0b394Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 117969ef0b394Smrgdnl Software is furnished to do so, subject to the following conditions: 117979ef0b394Smrgdnl 117989ef0b394Smrgdnl The above copyright notice and this permission notice (including the next 117999ef0b394Smrgdnl paragraph) shall be included in all copies or substantial portions of the 118009ef0b394Smrgdnl Software. 118019ef0b394Smrgdnl 118029ef0b394Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 118039ef0b394Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 118049ef0b394Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 118059ef0b394Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 118069ef0b394Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 118079ef0b394Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 118089ef0b394Smrgdnl DEALINGS IN THE SOFTWARE. 118099ef0b394Smrgdnl 11810698f425bSmrg 118119ef0b394Smrg# XTRANS_TCP_FLAGS() 118129ef0b394Smrg# ------------------ 118139ef0b394Smrg# Find needed libraries for TCP sockets, and check for IPv6 support 118149ef0b394SmrgAC_DEFUN([XTRANS_TCP_FLAGS],[ 118159ef0b394Smrg # SVR4 hides these in libraries other than libc 118169ef0b394Smrg AC_SEARCH_LIBS(socket, [socket]) 118179ef0b394Smrg AC_SEARCH_LIBS(gethostbyname, [nsl]) 118189ef0b394Smrg if test "$ac_cv_search_socket$ac_cv_search_gethostbyname" = "nono"; then 11819fb5e8d76Smrg AC_CHECK_LIB([ws2_32],[main]) 118209ef0b394Smrg fi 11821698f425bSmrg 118229ef0b394Smrg # Needs to come after above checks for libsocket & libnsl for SVR4 systems 118239ef0b394Smrg AC_ARG_ENABLE(ipv6, 11824fb5e8d76Smrg AS_HELP_STRING([--enable-ipv6],[Enable IPv6 support]), 118259ef0b394Smrg [IPV6CONN=$enableval], 118269ef0b394Smrg [AC_CHECK_FUNC(getaddrinfo,[IPV6CONN=yes],[IPV6CONN=no])]) 118279ef0b394Smrg AC_MSG_CHECKING([if IPv6 support should be built]) 118289ef0b394Smrg if test "$IPV6CONN" = "yes"; then 118299ef0b394Smrg AC_DEFINE(IPv6,1,[Support IPv6 for TCP connections]) 118309ef0b394Smrg fi 118319ef0b394Smrg AC_MSG_RESULT($IPV6CONN) 11832698f425bSmrg 118339ef0b394Smrg # 4.3BSD-Reno added a new member to struct sockaddr_in 118349ef0b394Smrg AC_CHECK_MEMBER([struct sockaddr_in.sin_len], 118359ef0b394Smrg AC_DEFINE([BSD44SOCKETS],1, 118369ef0b394Smrg [Define to 1 if `struct sockaddr_in' has a `sin_len' member]), [], [ 118379ef0b394Smrg#include <sys/types.h> 118389ef0b394Smrg#include <sys/socket.h> 118399ef0b394Smrg#include <netinet/in.h> 118409ef0b394Smrg ]) 11841698f425bSmrg 118429ef0b394Smrg # POSIX.1g changed the type of pointer passed to getsockname/getpeername/etc. 118439ef0b394Smrg AC_CHECK_TYPES([socklen_t], [], [], [ 118449ef0b394SmrgAC_INCLUDES_DEFAULT 118459ef0b394Smrg#include <sys/socket.h>]) 11846698f425bSmrg 11847fb5e8d76Smrg # XPG4v2/UNIX95 added msg_control - check to see if we need to define 11848fb5e8d76Smrg # _XOPEN_SOURCE to get it (such as on Solaris) 11849fb5e8d76Smrg AC_CHECK_MEMBER([struct msghdr.msg_control], [], [], 11850fb5e8d76Smrg [ 11851fb5e8d76SmrgAC_INCLUDES_DEFAULT 11852fb5e8d76Smrg#include <sys/socket.h> 11853fb5e8d76Smrg ]) 11854fb5e8d76Smrg # First try for Solaris in C99 compliant mode, which requires XPG6/UNIX03 11855fb5e8d76Smrg if test "x$ac_cv_member_struct_msghdr_msg_control" = xno; then 11856fb5e8d76Smrg unset ac_cv_member_struct_msghdr_msg_control 11857fb5e8d76Smrg AC_MSG_NOTICE([trying again with _XOPEN_SOURCE=600]) 11858fb5e8d76Smrg AC_CHECK_MEMBER([struct msghdr.msg_control], 11859fb5e8d76Smrg [AC_DEFINE([_XOPEN_SOURCE], [600], 11860fb5e8d76Smrg [Defined if needed to expose struct msghdr.msg_control]) 11861fb5e8d76Smrg ], [], [ 11862fb5e8d76Smrg#define _XOPEN_SOURCE 600 11863fb5e8d76SmrgAC_INCLUDES_DEFAULT 11864fb5e8d76Smrg#include <sys/socket.h> 11865fb5e8d76Smrg ]) 11866fb5e8d76Smrg fi 11867fb5e8d76Smrg # If that didn't work, fall back to XPG5/UNIX98 with C89 11868fb5e8d76Smrg if test "x$ac_cv_member_struct_msghdr_msg_control" = xno; then 11869fb5e8d76Smrg unset ac_cv_member_struct_msghdr_msg_control 11870fb5e8d76Smrg AC_MSG_NOTICE([trying again with _XOPEN_SOURCE=500]) 11871fb5e8d76Smrg AC_CHECK_MEMBER([struct msghdr.msg_control], 11872fb5e8d76Smrg [AC_DEFINE([_XOPEN_SOURCE], [500], 11873fb5e8d76Smrg [Defined if needed to expose struct msghdr.msg_control]) 11874fb5e8d76Smrg ], [], [ 11875fb5e8d76Smrg#define _XOPEN_SOURCE 500 11876fb5e8d76SmrgAC_INCLUDES_DEFAULT 11877fb5e8d76Smrg#include <sys/socket.h> 11878fb5e8d76Smrg ]) 11879fb5e8d76Smrg fi 11880fb5e8d76Smrg 11881fb5e8d76Smrg 118829ef0b394Smrg]) # XTRANS_TCP_FLAGS 11883698f425bSmrg 118849ef0b394Smrg# XTRANS_CONNECTION_FLAGS() 118859ef0b394Smrg# ------------------------- 118869ef0b394Smrg# Standard checks for which Xtrans transports to use by the Xorg packages 118879ef0b394Smrg# that use Xtrans functions 118889ef0b394SmrgAC_DEFUN([XTRANS_CONNECTION_FLAGS],[ 118899ef0b394Smrg AC_REQUIRE([AC_CANONICAL_HOST]) 118909ef0b394Smrg [case $host_os in 118919ef0b394Smrg mingw*) unixdef="no" ;; 118929ef0b394Smrg *) unixdef="yes" ;; 118939ef0b394Smrg esac] 118949ef0b394Smrg AC_ARG_ENABLE(unix-transport, 11895fb5e8d76Smrg AS_HELP_STRING([--enable-unix-transport],[Enable UNIX domain socket transport]), 118969ef0b394Smrg [UNIXCONN=$enableval], [UNIXCONN=$unixdef]) 118979ef0b394Smrg AC_MSG_CHECKING([if Xtrans should support UNIX socket connections]) 118989ef0b394Smrg if test "$UNIXCONN" = "yes"; then 118999ef0b394Smrg AC_DEFINE(UNIXCONN,1,[Support UNIX socket connections]) 119009ef0b394Smrg fi 119019ef0b394Smrg AC_MSG_RESULT($UNIXCONN) 119029ef0b394Smrg AC_ARG_ENABLE(tcp-transport, 11903fb5e8d76Smrg AS_HELP_STRING([--enable-tcp-transport],[Enable TCP socket transport]), 119049ef0b394Smrg [TCPCONN=$enableval], [TCPCONN=yes]) 119059ef0b394Smrg AC_MSG_CHECKING([if Xtrans should support TCP socket connections]) 119069ef0b394Smrg AC_MSG_RESULT($TCPCONN) 119079ef0b394Smrg if test "$TCPCONN" = "yes"; then 119089ef0b394Smrg AC_DEFINE(TCPCONN,1,[Support TCP socket connections]) 119099ef0b394Smrg XTRANS_TCP_FLAGS 119109ef0b394Smrg fi 119119ef0b394Smrg [case $host_os in 119129ef0b394Smrg solaris*|sco*|sysv4*) localdef="yes" ;; 119139ef0b394Smrg *) localdef="no" ;; 119149ef0b394Smrg esac] 119159ef0b394Smrg AC_ARG_ENABLE(local-transport, 11916fb5e8d76Smrg AS_HELP_STRING([--enable-local-transport],[Enable os-specific local transport]), 119179ef0b394Smrg [LOCALCONN=$enableval], [LOCALCONN=$localdef]) 119189ef0b394Smrg AC_MSG_CHECKING([if Xtrans should support os-specific local connections]) 119199ef0b394Smrg AC_MSG_RESULT($LOCALCONN) 119209ef0b394Smrg if test "$LOCALCONN" = "yes"; then 119219ef0b394Smrg AC_DEFINE(LOCALCONN,1,[Support os-specific local connections]) 119229ef0b394Smrg fi 11923698f425bSmrg 119249ef0b394Smrg]) # XTRANS_CONNECTION_FLAGS 11925698f425bSmrg 11926698f425bSmrg 119279ef0b394Smrg# XTRANS_SECURE_RPC_FLAGS() 119289ef0b394Smrg# ------------------------- 119299ef0b394Smrg# Check for Secure RPC functions - must come after XTRANS_TCP_FLAGS 119309ef0b394Smrg# so that any necessary networking libraries are already found 119319ef0b394SmrgAC_DEFUN([XTRANS_SECURE_RPC_FLAGS], 119329ef0b394Smrg[AC_REQUIRE([XTRANS_TCP_FLAGS]) 119339ef0b394Smrg AC_ARG_ENABLE(secure-rpc, 11934fb5e8d76Smrg AS_HELP_STRING([--enable-secure-rpc],[Enable Secure RPC]), 119359ef0b394Smrg [SECURE_RPC=$enableval], [SECURE_RPC="try"]) 11936698f425bSmrg 119379ef0b394Smrg if test "x$SECURE_RPC" = "xyes" -o "x$SECURE_RPC" = "xtry" ; then 119389ef0b394Smrg FOUND_SECURE_RPC="no" 119399ef0b394Smrg AC_CHECK_FUNCS([authdes_seccreate authdes_create], 119409ef0b394Smrg [FOUND_SECURE_RPC="yes"]) 119419ef0b394Smrg if test "x$FOUND_SECURE_RPC" = "xno" ; then 119429ef0b394Smrg if test "x$SECURE_RPC" = "xyes" ; then 119439ef0b394Smrg AC_MSG_ERROR([Secure RPC requested, but required functions not found]) 119449ef0b394Smrg fi 119459ef0b394Smrg SECURE_RPC="no" 119469ef0b394Smrg else 119479ef0b394Smrg dnl FreeBSD keeps getsecretkey in librpcsvc 119489ef0b394Smrg AC_SEARCH_LIBS(getsecretkey, [rpcsvc]) 119499ef0b394Smrg SECURE_RPC="yes" 119509ef0b394Smrg fi 119519ef0b394Smrg fi 119529ef0b394Smrg AC_MSG_CHECKING([if Secure RPC authentication ("SUN-DES-1") should be supported]) 119539ef0b394Smrg if test "x$SECURE_RPC" = "xyes" ; then 119549ef0b394Smrg AC_DEFINE(SECURE_RPC, 1, [Support Secure RPC ("SUN-DES-1") authentication for X11 clients]) 119559ef0b394Smrg fi 119569ef0b394Smrg AC_MSG_RESULT($SECURE_RPC) 119579ef0b394Smrg]) # XTRANS_SECURE_RPC_FLAGS 11958698f425bSmrg 11959698f425bSmrg 11960