aclocal.m4 revision 9ef0b394
1d17cd367Smrg# generated automatically by aclocal 1.11.1 -*- Autoconf -*- 2266e564dSmrg 3266e564dSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4698f425bSmrg# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 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 14c5629e66Smrgm4_ifndef([AC_AUTOCONF_VERSION], 15c5629e66Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 169ef0b394Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, 179ef0b394Smrg[m4_warning([this file was generated for autoconf 2.68. 18c5629e66SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 19c5629e66SmrgIf you have problems, you may need to regenerate the build system entirely. 20c5629e66SmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])]) 21266e564dSmrg 229ef0b394Smrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 23698f425bSmrg# 249ef0b394Smrg# This file is free software; the Free Software Foundation 259ef0b394Smrg# gives unlimited permission to copy and/or distribute it, 269ef0b394Smrg# with or without modifications, as long as this notice is preserved. 279ef0b394Smrg 289ef0b394Smrg# AM_AUTOMAKE_VERSION(VERSION) 299ef0b394Smrg# ---------------------------- 309ef0b394Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 319ef0b394Smrg# generated from the m4 files accompanying Automake X.Y. 329ef0b394Smrg# (This private macro should not be called outside this file.) 339ef0b394SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 349ef0b394Smrg[am__api_version='1.11' 359ef0b394Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 369ef0b394Smrgdnl require some minimum version. Point them to the right macro. 379ef0b394Smrgm4_if([$1], [1.11.1], [], 389ef0b394Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 399ef0b394Smrg]) 409ef0b394Smrg 419ef0b394Smrg# _AM_AUTOCONF_VERSION(VERSION) 429ef0b394Smrg# ----------------------------- 439ef0b394Smrg# aclocal traces this macro to find the Autoconf version. 449ef0b394Smrg# This is a private macro too. Using m4_define simplifies 459ef0b394Smrg# the logic in aclocal, which can simply ignore this definition. 469ef0b394Smrgm4_define([_AM_AUTOCONF_VERSION], []) 479ef0b394Smrg 489ef0b394Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 499ef0b394Smrg# ------------------------------- 509ef0b394Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 519ef0b394Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 529ef0b394SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 539ef0b394Smrg[AM_AUTOMAKE_VERSION([1.11.1])dnl 549ef0b394Smrgm4_ifndef([AC_AUTOCONF_VERSION], 559ef0b394Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 569ef0b394Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 579ef0b394Smrg 589ef0b394Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 599ef0b394Smrg 609ef0b394Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 61698f425bSmrg# 629ef0b394Smrg# This file is free software; the Free Software Foundation 639ef0b394Smrg# gives unlimited permission to copy and/or distribute it, 649ef0b394Smrg# with or without modifications, as long as this notice is preserved. 65698f425bSmrg 669ef0b394Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 679ef0b394Smrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 689ef0b394Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 69698f425bSmrg# 709ef0b394Smrg# Of course, Automake must honor this variable whenever it calls a 719ef0b394Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 729ef0b394Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 739ef0b394Smrg# depending on how configure is run. This is pretty annoying, since 749ef0b394Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 759ef0b394Smrg# source directory, any form will work fine, but in subdirectories a 769ef0b394Smrg# relative path needs to be adjusted first. 77698f425bSmrg# 789ef0b394Smrg# $ac_aux_dir/missing 799ef0b394Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 809ef0b394Smrg# $top_srcdir/$ac_aux_dir/missing 819ef0b394Smrg# fails if $ac_aux_dir is absolute, 829ef0b394Smrg# fails when called from a subdirectory in a VPATH build with 839ef0b394Smrg# a relative $ac_aux_dir 84698f425bSmrg# 859ef0b394Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 869ef0b394Smrg# are both prefixed by $srcdir. In an in-source build this is usually 879ef0b394Smrg# harmless because $srcdir is `.', but things will broke when you 889ef0b394Smrg# start a VPATH build or use an absolute $srcdir. 89698f425bSmrg# 909ef0b394Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 919ef0b394Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 929ef0b394Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 939ef0b394Smrg# and then we would define $MISSING as 949ef0b394Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 959ef0b394Smrg# This will work as long as MISSING is not called from configure, because 969ef0b394Smrg# unfortunately $(top_srcdir) has no meaning in configure. 979ef0b394Smrg# However there are other variables, like CC, which are often used in 989ef0b394Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 99698f425bSmrg# 1009ef0b394Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 1019ef0b394Smrg# absolute PATH. The drawback is that using absolute paths prevent a 1029ef0b394Smrg# configured tree to be moved without reconfiguration. 103266e564dSmrg 1049ef0b394SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 1059ef0b394Smrg[dnl Rely on autoconf to set up CDPATH properly. 1069ef0b394SmrgAC_PREREQ([2.50])dnl 1079ef0b394Smrg# expand $ac_aux_dir to an absolute path 1089ef0b394Smrgam_aux_dir=`cd $ac_aux_dir && pwd` 109698f425bSmrg]) 110698f425bSmrg 1119ef0b394Smrg# AM_CONDITIONAL -*- Autoconf -*- 112698f425bSmrg 1139ef0b394Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 1149ef0b394Smrg# 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# serial 9 121266e564dSmrg 1229ef0b394Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 1239ef0b394Smrg# ------------------------------------- 1249ef0b394Smrg# Define a conditional. 1259ef0b394SmrgAC_DEFUN([AM_CONDITIONAL], 1269ef0b394Smrg[AC_PREREQ(2.52)dnl 1279ef0b394Smrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 1289ef0b394Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 1299ef0b394SmrgAC_SUBST([$1_TRUE])dnl 1309ef0b394SmrgAC_SUBST([$1_FALSE])dnl 1319ef0b394Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 1329ef0b394Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 1339ef0b394Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 1349ef0b394Smrgif $2; then 1359ef0b394Smrg $1_TRUE= 1369ef0b394Smrg $1_FALSE='#' 1379ef0b394Smrgelse 1389ef0b394Smrg $1_TRUE='#' 1399ef0b394Smrg $1_FALSE= 1409ef0b394Smrgfi 1419ef0b394SmrgAC_CONFIG_COMMANDS_PRE( 1429ef0b394Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 1439ef0b394Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 1449ef0b394SmrgUsually this means the macro was only invoked conditionally.]]) 1459ef0b394Smrgfi])]) 146266e564dSmrg 1479ef0b394Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 1489ef0b394Smrg# Free Software Foundation, Inc. 1499ef0b394Smrg# 1509ef0b394Smrg# This file is free software; the Free Software Foundation 1519ef0b394Smrg# gives unlimited permission to copy and/or distribute it, 1529ef0b394Smrg# with or without modifications, as long as this notice is preserved. 153698f425bSmrg 1549ef0b394Smrg# serial 10 155698f425bSmrg 1569ef0b394Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 1579ef0b394Smrg# written in clear, in which case automake, when reading aclocal.m4, 1589ef0b394Smrg# will think it sees a *use*, and therefore will trigger all it's 1599ef0b394Smrg# C support machinery. Also note that it means that autoscan, seeing 1609ef0b394Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 161698f425bSmrg 162698f425bSmrg 1639ef0b394Smrg# _AM_DEPENDENCIES(NAME) 164698f425bSmrg# ---------------------- 1659ef0b394Smrg# See how the compiler implements dependency checking. 1669ef0b394Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 1679ef0b394Smrg# We try a few techniques and use that to set a single cache variable. 1689ef0b394Smrg# 1699ef0b394Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 1709ef0b394Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 1719ef0b394Smrg# dependency, and given that the user is not expected to run this macro, 1729ef0b394Smrg# just rely on AC_PROG_CC. 1739ef0b394SmrgAC_DEFUN([_AM_DEPENDENCIES], 1749ef0b394Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 1759ef0b394SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 1769ef0b394SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 1779ef0b394SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 178698f425bSmrg 1799ef0b394Smrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 1809ef0b394Smrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 1819ef0b394Smrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 1829ef0b394Smrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 1839ef0b394Smrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 1849ef0b394Smrg [depcc="$$1" am_compiler_list=]) 185698f425bSmrg 1869ef0b394SmrgAC_CACHE_CHECK([dependency style of $depcc], 1879ef0b394Smrg [am_cv_$1_dependencies_compiler_type], 1889ef0b394Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 1899ef0b394Smrg # We make a subdir and do the tests there. Otherwise we can end up 1909ef0b394Smrg # making bogus files that we don't know about and never remove. For 1919ef0b394Smrg # instance it was reported that on HP-UX the gcc test will end up 1929ef0b394Smrg # making a dummy file named `D' -- because `-MD' means `put the output 1939ef0b394Smrg # in D'. 1949ef0b394Smrg mkdir conftest.dir 1959ef0b394Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 1969ef0b394Smrg # using a relative directory. 1979ef0b394Smrg cp "$am_depcomp" conftest.dir 1989ef0b394Smrg cd conftest.dir 1999ef0b394Smrg # We will build objects and dependencies in a subdirectory because 2009ef0b394Smrg # it helps to detect inapplicable dependency modes. For instance 2019ef0b394Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 2029ef0b394Smrg # side effect of compilation, but ICC will put the dependencies in 2039ef0b394Smrg # the current directory while Tru64 will put them in the object 2049ef0b394Smrg # directory. 2059ef0b394Smrg mkdir sub 206266e564dSmrg 2079ef0b394Smrg am_cv_$1_dependencies_compiler_type=none 2089ef0b394Smrg if test "$am_compiler_list" = ""; then 2099ef0b394Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 210c5629e66Smrg fi 2119ef0b394Smrg am__universal=false 2129ef0b394Smrg m4_case([$1], [CC], 2139ef0b394Smrg [case " $depcc " in #( 2149ef0b394Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 2159ef0b394Smrg esac], 2169ef0b394Smrg [CXX], 2179ef0b394Smrg [case " $depcc " in #( 2189ef0b394Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 2199ef0b394Smrg esac]) 220266e564dSmrg 2219ef0b394Smrg for depmode in $am_compiler_list; do 2229ef0b394Smrg # Setup a source with many dependencies, because some compilers 2239ef0b394Smrg # like to wrap large dependency lists on column 80 (with \), and 2249ef0b394Smrg # we should not choose a depcomp mode which is confused by this. 2259ef0b394Smrg # 2269ef0b394Smrg # We need to recreate these files for each test, as the compiler may 2279ef0b394Smrg # overwrite some of them when testing with obscure command lines. 2289ef0b394Smrg # This happens at least with the AIX C compiler. 2299ef0b394Smrg : > sub/conftest.c 2309ef0b394Smrg for i in 1 2 3 4 5 6; do 2319ef0b394Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 2329ef0b394Smrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 2339ef0b394Smrg # Solaris 8's {/usr,}/bin/sh. 2349ef0b394Smrg touch sub/conftst$i.h 2359ef0b394Smrg done 2369ef0b394Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 237266e564dSmrg 2389ef0b394Smrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 2399ef0b394Smrg # mode. It turns out that the SunPro C++ compiler does not properly 2409ef0b394Smrg # handle `-M -o', and we need to detect this. Also, some Intel 2419ef0b394Smrg # versions had trouble with output in subdirs 2429ef0b394Smrg am__obj=sub/conftest.${OBJEXT-o} 2439ef0b394Smrg am__minus_obj="-o $am__obj" 2449ef0b394Smrg case $depmode in 2459ef0b394Smrg gcc) 2469ef0b394Smrg # This depmode causes a compiler race in universal mode. 2479ef0b394Smrg test "$am__universal" = false || continue 2489ef0b394Smrg ;; 2499ef0b394Smrg nosideeffect) 2509ef0b394Smrg # after this tag, mechanisms are not by side-effect, so they'll 2519ef0b394Smrg # only be used when explicitly requested 2529ef0b394Smrg if test "x$enable_dependency_tracking" = xyes; then 2539ef0b394Smrg continue 2549ef0b394Smrg else 2559ef0b394Smrg break 2569ef0b394Smrg fi 2579ef0b394Smrg ;; 2589ef0b394Smrg msvisualcpp | msvcmsys) 2599ef0b394Smrg # This compiler won't grok `-c -o', but also, the minuso test has 2609ef0b394Smrg # not run yet. These depmodes are late enough in the game, and 2619ef0b394Smrg # so weak that their functioning should not be impacted. 2629ef0b394Smrg am__obj=conftest.${OBJEXT-o} 2639ef0b394Smrg am__minus_obj= 2649ef0b394Smrg ;; 2659ef0b394Smrg none) break ;; 2669ef0b394Smrg esac 2679ef0b394Smrg if depmode=$depmode \ 2689ef0b394Smrg source=sub/conftest.c object=$am__obj \ 2699ef0b394Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 2709ef0b394Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 2719ef0b394Smrg >/dev/null 2>conftest.err && 2729ef0b394Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 2739ef0b394Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 2749ef0b394Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 2759ef0b394Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 2769ef0b394Smrg # icc doesn't choke on unknown options, it will just issue warnings 2779ef0b394Smrg # or remarks (even with -Werror). So we grep stderr for any message 2789ef0b394Smrg # that says an option was ignored or not supported. 2799ef0b394Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 2809ef0b394Smrg # icc: Command line warning: ignoring option '-M'; no argument required 2819ef0b394Smrg # The diagnosis changed in icc 8.0: 2829ef0b394Smrg # icc: Command line remark: option '-MP' not supported 2839ef0b394Smrg if (grep 'ignoring option' conftest.err || 2849ef0b394Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 2859ef0b394Smrg am_cv_$1_dependencies_compiler_type=$depmode 2869ef0b394Smrg break 2879ef0b394Smrg fi 2889ef0b394Smrg fi 2899ef0b394Smrg done 290266e564dSmrg 2919ef0b394Smrg cd .. 2929ef0b394Smrg rm -rf conftest.dir 2939ef0b394Smrgelse 2949ef0b394Smrg am_cv_$1_dependencies_compiler_type=none 2959ef0b394Smrgfi 2969ef0b394Smrg]) 2979ef0b394SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 2989ef0b394SmrgAM_CONDITIONAL([am__fastdep$1], [ 2999ef0b394Smrg test "x$enable_dependency_tracking" != xno \ 3009ef0b394Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 3019ef0b394Smrg]) 302c5629e66Smrg 303266e564dSmrg 3049ef0b394Smrg# AM_SET_DEPDIR 3059ef0b394Smrg# ------------- 3069ef0b394Smrg# Choose a directory name for dependency files. 3079ef0b394Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 3089ef0b394SmrgAC_DEFUN([AM_SET_DEPDIR], 3099ef0b394Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 3109ef0b394SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 3119ef0b394Smrg]) 312266e564dSmrg 313266e564dSmrg 3149ef0b394Smrg# AM_DEP_TRACK 3159ef0b394Smrg# ------------ 3169ef0b394SmrgAC_DEFUN([AM_DEP_TRACK], 3179ef0b394Smrg[AC_ARG_ENABLE(dependency-tracking, 3189ef0b394Smrg[ --disable-dependency-tracking speeds up one-time build 3199ef0b394Smrg --enable-dependency-tracking do not reject slow dependency extractors]) 3209ef0b394Smrgif test "x$enable_dependency_tracking" != xno; then 3219ef0b394Smrg am_depcomp="$ac_aux_dir/depcomp" 3229ef0b394Smrg AMDEPBACKSLASH='\' 3239ef0b394Smrgfi 3249ef0b394SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 3259ef0b394SmrgAC_SUBST([AMDEPBACKSLASH])dnl 3269ef0b394Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 3279ef0b394Smrg]) 328266e564dSmrg 3299ef0b394Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 330266e564dSmrg 3319ef0b394Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 3329ef0b394Smrg# Free Software Foundation, Inc. 3339ef0b394Smrg# 3349ef0b394Smrg# This file is free software; the Free Software Foundation 3359ef0b394Smrg# gives unlimited permission to copy and/or distribute it, 3369ef0b394Smrg# with or without modifications, as long as this notice is preserved. 337698f425bSmrg 3389ef0b394Smrg#serial 5 339698f425bSmrg 3409ef0b394Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 341698f425bSmrg# ------------------------------ 3429ef0b394SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 3439ef0b394Smrg[{ 3449ef0b394Smrg # Autoconf 2.62 quotes --file arguments for eval, but not when files 3459ef0b394Smrg # are listed without --file. Let's play safe and only enable the eval 3469ef0b394Smrg # if we detect the quoting. 3479ef0b394Smrg case $CONFIG_FILES in 3489ef0b394Smrg *\'*) eval set x "$CONFIG_FILES" ;; 3499ef0b394Smrg *) set x $CONFIG_FILES ;; 3509ef0b394Smrg esac 3519ef0b394Smrg shift 3529ef0b394Smrg for mf 3539ef0b394Smrg do 3549ef0b394Smrg # Strip MF so we end up with the name of the file. 3559ef0b394Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 3569ef0b394Smrg # Check whether this is an Automake generated Makefile or not. 3579ef0b394Smrg # We used to match only the files named `Makefile.in', but 3589ef0b394Smrg # some people rename them; so instead we look at the file content. 3599ef0b394Smrg # Grep'ing the first line is not enough: some people post-process 3609ef0b394Smrg # each Makefile.in and add a new line on top of each file to say so. 3619ef0b394Smrg # Grep'ing the whole file is not good either: AIX grep has a line 3629ef0b394Smrg # limit of 2048, but all sed's we know have understand at least 4000. 3639ef0b394Smrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 3649ef0b394Smrg dirpart=`AS_DIRNAME("$mf")` 3659ef0b394Smrg else 3669ef0b394Smrg continue 3679ef0b394Smrg fi 3689ef0b394Smrg # Extract the definition of DEPDIR, am__include, and am__quote 3699ef0b394Smrg # from the Makefile without running `make'. 3709ef0b394Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 3719ef0b394Smrg test -z "$DEPDIR" && continue 3729ef0b394Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 3739ef0b394Smrg test -z "am__include" && continue 3749ef0b394Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 3759ef0b394Smrg # When using ansi2knr, U may be empty or an underscore; expand it 3769ef0b394Smrg U=`sed -n 's/^U = //p' < "$mf"` 3779ef0b394Smrg # Find all dependency output files, they are included files with 3789ef0b394Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 3799ef0b394Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 3809ef0b394Smrg # expansion. 3819ef0b394Smrg for file in `sed -n " 3829ef0b394Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 3839ef0b394Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 3849ef0b394Smrg # Make sure the directory exists. 3859ef0b394Smrg test -f "$dirpart/$file" && continue 3869ef0b394Smrg fdir=`AS_DIRNAME(["$file"])` 3879ef0b394Smrg AS_MKDIR_P([$dirpart/$fdir]) 3889ef0b394Smrg # echo "creating $dirpart/$file" 3899ef0b394Smrg echo '# dummy' > "$dirpart/$file" 3909ef0b394Smrg done 3919ef0b394Smrg done 3929ef0b394Smrg} 3939ef0b394Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 394698f425bSmrg 395698f425bSmrg 3969ef0b394Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 397698f425bSmrg# ----------------------------- 3989ef0b394Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 3999ef0b394Smrg# 4009ef0b394Smrg# This code is only required when automatic dependency tracking 4019ef0b394Smrg# is enabled. FIXME. This creates each `.P' file that we will 4029ef0b394Smrg# need in order to bootstrap the dependency handling code. 4039ef0b394SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 4049ef0b394Smrg[AC_CONFIG_COMMANDS([depfiles], 4059ef0b394Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 4069ef0b394Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 4079ef0b394Smrg]) 408698f425bSmrg 4099ef0b394Smrg# Do all the work for Automake. -*- Autoconf -*- 410698f425bSmrg 4119ef0b394Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4129ef0b394Smrg# 2005, 2006, 2008, 2009 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# serial 16 419698f425bSmrg 4209ef0b394Smrg# This macro actually does too much. Some checks are only needed if 4219ef0b394Smrg# your package does certain things. But this isn't really a big deal. 422698f425bSmrg 4239ef0b394Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 4249ef0b394Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 4259ef0b394Smrg# ----------------------------------------------- 4269ef0b394Smrg# The call with PACKAGE and VERSION arguments is the old style 4279ef0b394Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 4289ef0b394Smrg# and VERSION should now be passed to AC_INIT and removed from 4299ef0b394Smrg# the call to AM_INIT_AUTOMAKE. 4309ef0b394Smrg# We support both call styles for the transition. After 4319ef0b394Smrg# the next Automake release, Autoconf can make the AC_INIT 4329ef0b394Smrg# arguments mandatory, and then we can depend on a new Autoconf 4339ef0b394Smrg# release and drop the old call support. 4349ef0b394SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 4359ef0b394Smrg[AC_PREREQ([2.62])dnl 4369ef0b394Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 4379ef0b394Smrgdnl the ones we care about. 4389ef0b394Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 4399ef0b394SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 4409ef0b394SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 4419ef0b394Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 4429ef0b394Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 4439ef0b394Smrg # is not polluted with repeated "-I." 4449ef0b394Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 4459ef0b394Smrg # test to see if srcdir already configured 4469ef0b394Smrg if test -f $srcdir/config.status; then 4479ef0b394Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 4489ef0b394Smrg fi 4499ef0b394Smrgfi 450698f425bSmrg 4519ef0b394Smrg# test whether we have cygpath 4529ef0b394Smrgif test -z "$CYGPATH_W"; then 4539ef0b394Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 4549ef0b394Smrg CYGPATH_W='cygpath -w' 4559ef0b394Smrg else 4569ef0b394Smrg CYGPATH_W=echo 4579ef0b394Smrg fi 4589ef0b394Smrgfi 4599ef0b394SmrgAC_SUBST([CYGPATH_W]) 460698f425bSmrg 4619ef0b394Smrg# Define the identity of the package. 4629ef0b394Smrgdnl Distinguish between old-style and new-style calls. 4639ef0b394Smrgm4_ifval([$2], 4649ef0b394Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 4659ef0b394Smrg AC_SUBST([PACKAGE], [$1])dnl 4669ef0b394Smrg AC_SUBST([VERSION], [$2])], 4679ef0b394Smrg[_AM_SET_OPTIONS([$1])dnl 4689ef0b394Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 4699ef0b394Smrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 4709ef0b394Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 4719ef0b394Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 4729ef0b394Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 473698f425bSmrg 4749ef0b394Smrg_AM_IF_OPTION([no-define],, 4759ef0b394Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 4769ef0b394Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 477698f425bSmrg 4789ef0b394Smrg# Some tools Automake needs. 4799ef0b394SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 4809ef0b394SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 4819ef0b394SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 4829ef0b394SmrgAM_MISSING_PROG(AUTOCONF, autoconf) 4839ef0b394SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 4849ef0b394SmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 4859ef0b394SmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 4869ef0b394SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 4879ef0b394SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 4889ef0b394SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 4899ef0b394Smrg# We need awk for the "check" target. The system "awk" is bad on 4909ef0b394Smrg# some platforms. 4919ef0b394SmrgAC_REQUIRE([AC_PROG_AWK])dnl 4929ef0b394SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 4939ef0b394SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 4949ef0b394Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 4959ef0b394Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 4969ef0b394Smrg [_AM_PROG_TAR([v7])])]) 4979ef0b394Smrg_AM_IF_OPTION([no-dependencies],, 4989ef0b394Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 4999ef0b394Smrg [_AM_DEPENDENCIES(CC)], 5009ef0b394Smrg [define([AC_PROG_CC], 5019ef0b394Smrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 5029ef0b394SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 5039ef0b394Smrg [_AM_DEPENDENCIES(CXX)], 5049ef0b394Smrg [define([AC_PROG_CXX], 5059ef0b394Smrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 5069ef0b394SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 5079ef0b394Smrg [_AM_DEPENDENCIES(OBJC)], 5089ef0b394Smrg [define([AC_PROG_OBJC], 5099ef0b394Smrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 5109ef0b394Smrg]) 5119ef0b394Smrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 5129ef0b394Smrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the 5139ef0b394Smrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 5149ef0b394Smrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 5159ef0b394SmrgAC_CONFIG_COMMANDS_PRE(dnl 5169ef0b394Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 5179ef0b394Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 518698f425bSmrg]) 519698f425bSmrg 5209ef0b394Smrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 5219ef0b394Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 5229ef0b394Smrgdnl mangled by Autoconf and run in a shell conditional statement. 5239ef0b394Smrgm4_define([_AC_COMPILER_EXEEXT], 5249ef0b394Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 525698f425bSmrg 526698f425bSmrg 5279ef0b394Smrg# When config.status generates a header, we must update the stamp-h file. 5289ef0b394Smrg# This file resides in the same directory as the config header 5299ef0b394Smrg# that is generated. The stamp files are numbered to have different names. 530698f425bSmrg 5319ef0b394Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 5329ef0b394Smrg# loop where config.status creates the headers, so we can generate 5339ef0b394Smrg# our stamp files there. 5349ef0b394SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 5359ef0b394Smrg[# Compute $1's index in $config_headers. 5369ef0b394Smrg_am_arg=$1 5379ef0b394Smrg_am_stamp_count=1 5389ef0b394Smrgfor _am_header in $config_headers :; do 5399ef0b394Smrg case $_am_header in 5409ef0b394Smrg $_am_arg | $_am_arg:* ) 5419ef0b394Smrg break ;; 5429ef0b394Smrg * ) 5439ef0b394Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 5449ef0b394Smrg esac 5459ef0b394Smrgdone 5469ef0b394Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 547698f425bSmrg 5489ef0b394Smrg# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. 5499ef0b394Smrg# 5509ef0b394Smrg# This file is free software; the Free Software Foundation 5519ef0b394Smrg# gives unlimited permission to copy and/or distribute it, 5529ef0b394Smrg# with or without modifications, as long as this notice is preserved. 553698f425bSmrg 5549ef0b394Smrg# AM_PROG_INSTALL_SH 5559ef0b394Smrg# ------------------ 5569ef0b394Smrg# Define $install_sh. 5579ef0b394SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 5589ef0b394Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 5599ef0b394Smrgif test x"${install_sh}" != xset; then 5609ef0b394Smrg case $am_aux_dir in 5619ef0b394Smrg *\ * | *\ *) 5629ef0b394Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 5639ef0b394Smrg *) 5649ef0b394Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 5659ef0b394Smrg esac 5669ef0b394Smrgfi 5679ef0b394SmrgAC_SUBST(install_sh)]) 568698f425bSmrg 5699ef0b394Smrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 5709ef0b394Smrg# 5719ef0b394Smrg# This file is free software; the Free Software Foundation 5729ef0b394Smrg# gives unlimited permission to copy and/or distribute it, 5739ef0b394Smrg# with or without modifications, as long as this notice is preserved. 574698f425bSmrg 5759ef0b394Smrg# serial 2 576698f425bSmrg 5779ef0b394Smrg# Check whether the underlying file-system supports filenames 5789ef0b394Smrg# with a leading dot. For instance MS-DOS doesn't. 5799ef0b394SmrgAC_DEFUN([AM_SET_LEADING_DOT], 5809ef0b394Smrg[rm -rf .tst 2>/dev/null 5819ef0b394Smrgmkdir .tst 2>/dev/null 5829ef0b394Smrgif test -d .tst; then 5839ef0b394Smrg am__leading_dot=. 5849ef0b394Smrgelse 5859ef0b394Smrg am__leading_dot=_ 5869ef0b394Smrgfi 5879ef0b394Smrgrmdir .tst 2>/dev/null 5889ef0b394SmrgAC_SUBST([am__leading_dot])]) 589698f425bSmrg 5909ef0b394Smrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 5919ef0b394Smrg# From Jim Meyering 592698f425bSmrg 5939ef0b394Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 5949ef0b394Smrg# Free Software Foundation, Inc. 595698f425bSmrg# 5969ef0b394Smrg# This file is free software; the Free Software Foundation 5979ef0b394Smrg# gives unlimited permission to copy and/or distribute it, 5989ef0b394Smrg# with or without modifications, as long as this notice is preserved. 599266e564dSmrg 6009ef0b394Smrg# serial 5 601266e564dSmrg 6029ef0b394Smrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 6039ef0b394Smrg# ---------------------------------- 6049ef0b394Smrg# Control maintainer-specific portions of Makefiles. 6059ef0b394Smrg# Default is to disable them, unless `enable' is passed literally. 6069ef0b394Smrg# For symmetry, `disable' may be passed as well. Anyway, the user 6079ef0b394Smrg# can override the default with the --enable/--disable switch. 6089ef0b394SmrgAC_DEFUN([AM_MAINTAINER_MODE], 6099ef0b394Smrg[m4_case(m4_default([$1], [disable]), 6109ef0b394Smrg [enable], [m4_define([am_maintainer_other], [disable])], 6119ef0b394Smrg [disable], [m4_define([am_maintainer_other], [enable])], 6129ef0b394Smrg [m4_define([am_maintainer_other], [enable]) 6139ef0b394Smrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 6149ef0b394SmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) 6159ef0b394Smrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 6169ef0b394Smrg AC_ARG_ENABLE([maintainer-mode], 6179ef0b394Smrg[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful 6189ef0b394Smrg (and sometimes confusing) to the casual installer], 6199ef0b394Smrg [USE_MAINTAINER_MODE=$enableval], 6209ef0b394Smrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 6219ef0b394Smrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 6229ef0b394Smrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 6239ef0b394Smrg MAINT=$MAINTAINER_MODE_TRUE 6249ef0b394Smrg AC_SUBST([MAINT])dnl 6259ef0b394Smrg] 6269ef0b394Smrg) 627698f425bSmrg 6289ef0b394SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 629698f425bSmrg 6309ef0b394Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 6319ef0b394Smrg 6329ef0b394Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 633698f425bSmrg# 6349ef0b394Smrg# This file is free software; the Free Software Foundation 6359ef0b394Smrg# gives unlimited permission to copy and/or distribute it, 6369ef0b394Smrg# with or without modifications, as long as this notice is preserved. 637698f425bSmrg 6389ef0b394Smrg# serial 4 639698f425bSmrg 6409ef0b394Smrg# AM_MAKE_INCLUDE() 6419ef0b394Smrg# ----------------- 6429ef0b394Smrg# Check to see how make treats includes. 6439ef0b394SmrgAC_DEFUN([AM_MAKE_INCLUDE], 6449ef0b394Smrg[am_make=${MAKE-make} 6459ef0b394Smrgcat > confinc << 'END' 6469ef0b394Smrgam__doit: 6479ef0b394Smrg @echo this is the am__doit target 6489ef0b394Smrg.PHONY: am__doit 6499ef0b394SmrgEND 6509ef0b394Smrg# If we don't find an include directive, just comment out the code. 6519ef0b394SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 6529ef0b394Smrgam__include="#" 6539ef0b394Smrgam__quote= 6549ef0b394Smrg_am_result=none 6559ef0b394Smrg# First try GNU make style include. 6569ef0b394Smrgecho "include confinc" > confmf 6579ef0b394Smrg# Ignore all kinds of additional output from `make'. 6589ef0b394Smrgcase `$am_make -s -f confmf 2> /dev/null` in #( 6599ef0b394Smrg*the\ am__doit\ target*) 6609ef0b394Smrg am__include=include 6619ef0b394Smrg am__quote= 6629ef0b394Smrg _am_result=GNU 6639ef0b394Smrg ;; 6649ef0b394Smrgesac 6659ef0b394Smrg# Now try BSD make style include. 6669ef0b394Smrgif test "$am__include" = "#"; then 6679ef0b394Smrg echo '.include "confinc"' > confmf 6689ef0b394Smrg case `$am_make -s -f confmf 2> /dev/null` in #( 6699ef0b394Smrg *the\ am__doit\ target*) 6709ef0b394Smrg am__include=.include 6719ef0b394Smrg am__quote="\"" 6729ef0b394Smrg _am_result=BSD 6739ef0b394Smrg ;; 6749ef0b394Smrg esac 6759ef0b394Smrgfi 6769ef0b394SmrgAC_SUBST([am__include]) 6779ef0b394SmrgAC_SUBST([am__quote]) 6789ef0b394SmrgAC_MSG_RESULT([$_am_result]) 6799ef0b394Smrgrm -f confinc confmf 6809ef0b394Smrg]) 681698f425bSmrg 6829ef0b394Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 683698f425bSmrg 6849ef0b394Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 6859ef0b394Smrg# Free Software Foundation, Inc. 6869ef0b394Smrg# 6879ef0b394Smrg# This file is free software; the Free Software Foundation 6889ef0b394Smrg# gives unlimited permission to copy and/or distribute it, 6899ef0b394Smrg# with or without modifications, as long as this notice is preserved. 690698f425bSmrg 6919ef0b394Smrg# serial 6 692698f425bSmrg 6939ef0b394Smrg# AM_MISSING_PROG(NAME, PROGRAM) 694698f425bSmrg# ------------------------------ 6959ef0b394SmrgAC_DEFUN([AM_MISSING_PROG], 6969ef0b394Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 6979ef0b394Smrg$1=${$1-"${am_missing_run}$2"} 6989ef0b394SmrgAC_SUBST($1)]) 699698f425bSmrg 700698f425bSmrg 7019ef0b394Smrg# AM_MISSING_HAS_RUN 7029ef0b394Smrg# ------------------ 7039ef0b394Smrg# Define MISSING if not defined so far and test if it supports --run. 7049ef0b394Smrg# If it does, set am_missing_run to use it, otherwise, to nothing. 7059ef0b394SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 7069ef0b394Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 7079ef0b394SmrgAC_REQUIRE_AUX_FILE([missing])dnl 7089ef0b394Smrgif test x"${MISSING+set}" != xset; then 7099ef0b394Smrg case $am_aux_dir in 7109ef0b394Smrg *\ * | *\ *) 7119ef0b394Smrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 7129ef0b394Smrg *) 7139ef0b394Smrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 7149ef0b394Smrg esac 7159ef0b394Smrgfi 7169ef0b394Smrg# Use eval to expand $SHELL 7179ef0b394Smrgif eval "$MISSING --run true"; then 7189ef0b394Smrg am_missing_run="$MISSING --run " 7199ef0b394Smrgelse 7209ef0b394Smrg am_missing_run= 7219ef0b394Smrg AC_MSG_WARN([`missing' script is too old or missing]) 7229ef0b394Smrgfi 7239ef0b394Smrg]) 724698f425bSmrg 7259ef0b394Smrg# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 7269ef0b394Smrg# 7279ef0b394Smrg# This file is free software; the Free Software Foundation 7289ef0b394Smrg# gives unlimited permission to copy and/or distribute it, 7299ef0b394Smrg# with or without modifications, as long as this notice is preserved. 730698f425bSmrg 7319ef0b394Smrg# AM_PROG_MKDIR_P 7329ef0b394Smrg# --------------- 7339ef0b394Smrg# Check for `mkdir -p'. 7349ef0b394SmrgAC_DEFUN([AM_PROG_MKDIR_P], 7359ef0b394Smrg[AC_PREREQ([2.60])dnl 7369ef0b394SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 7379ef0b394Smrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 7389ef0b394Smrgdnl while keeping a definition of mkdir_p for backward compatibility. 7399ef0b394Smrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 7409ef0b394Smrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 7419ef0b394Smrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 7429ef0b394Smrgdnl adjustment using top_builddir (which is defined more often than 7439ef0b394Smrgdnl MKDIR_P). 7449ef0b394SmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 7459ef0b394Smrgcase $mkdir_p in 7469ef0b394Smrg [[\\/$]]* | ?:[[\\/]]*) ;; 7479ef0b394Smrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 748698f425bSmrgesac 749698f425bSmrg]) 750698f425bSmrg 7519ef0b394Smrg# Helper functions for option handling. -*- Autoconf -*- 752698f425bSmrg 7539ef0b394Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. 7549ef0b394Smrg# 7559ef0b394Smrg# This file is free software; the Free Software Foundation 7569ef0b394Smrg# gives unlimited permission to copy and/or distribute it, 7579ef0b394Smrg# with or without modifications, as long as this notice is preserved. 758698f425bSmrg 7599ef0b394Smrg# serial 4 760698f425bSmrg 7619ef0b394Smrg# _AM_MANGLE_OPTION(NAME) 7629ef0b394Smrg# ----------------------- 7639ef0b394SmrgAC_DEFUN([_AM_MANGLE_OPTION], 7649ef0b394Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 765698f425bSmrg 7669ef0b394Smrg# _AM_SET_OPTION(NAME) 7679ef0b394Smrg# ------------------------------ 7689ef0b394Smrg# Set option NAME. Presently that only means defining a flag for this option. 7699ef0b394SmrgAC_DEFUN([_AM_SET_OPTION], 7709ef0b394Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 771698f425bSmrg 7729ef0b394Smrg# _AM_SET_OPTIONS(OPTIONS) 7739ef0b394Smrg# ---------------------------------- 7749ef0b394Smrg# OPTIONS is a space-separated list of Automake options. 7759ef0b394SmrgAC_DEFUN([_AM_SET_OPTIONS], 7769ef0b394Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 777698f425bSmrg 7789ef0b394Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 7799ef0b394Smrg# ------------------------------------------- 7809ef0b394Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 7819ef0b394SmrgAC_DEFUN([_AM_IF_OPTION], 7829ef0b394Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 783698f425bSmrg 7849ef0b394Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 785698f425bSmrg 7869ef0b394Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 7879ef0b394Smrg# Free Software Foundation, Inc. 7889ef0b394Smrg# 7899ef0b394Smrg# This file is free software; the Free Software Foundation 7909ef0b394Smrg# gives unlimited permission to copy and/or distribute it, 7919ef0b394Smrg# with or without modifications, as long as this notice is preserved. 792698f425bSmrg 7939ef0b394Smrg# serial 5 794698f425bSmrg 7959ef0b394Smrg# AM_SANITY_CHECK 7969ef0b394Smrg# --------------- 7979ef0b394SmrgAC_DEFUN([AM_SANITY_CHECK], 7989ef0b394Smrg[AC_MSG_CHECKING([whether build environment is sane]) 7999ef0b394Smrg# Just in case 8009ef0b394Smrgsleep 1 8019ef0b394Smrgecho timestamp > conftest.file 8029ef0b394Smrg# Reject unsafe characters in $srcdir or the absolute working directory 8039ef0b394Smrg# name. Accept space and tab only in the latter. 8049ef0b394Smrgam_lf=' 8059ef0b394Smrg' 8069ef0b394Smrgcase `pwd` in 8079ef0b394Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 8089ef0b394Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 8099ef0b394Smrgesac 8109ef0b394Smrgcase $srcdir in 8119ef0b394Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 8129ef0b394Smrg AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 8139ef0b394Smrgesac 814698f425bSmrg 8159ef0b394Smrg# Do `set' in a subshell so we don't clobber the current shell's 8169ef0b394Smrg# arguments. Must try -L first in case configure is actually a 8179ef0b394Smrg# symlink; some systems play weird games with the mod time of symlinks 8189ef0b394Smrg# (eg FreeBSD returns the mod time of the symlink's containing 8199ef0b394Smrg# directory). 8209ef0b394Smrgif ( 8219ef0b394Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 8229ef0b394Smrg if test "$[*]" = "X"; then 8239ef0b394Smrg # -L didn't work. 8249ef0b394Smrg set X `ls -t "$srcdir/configure" conftest.file` 8259ef0b394Smrg fi 8269ef0b394Smrg rm -f conftest.file 8279ef0b394Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 8289ef0b394Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 829698f425bSmrg 8309ef0b394Smrg # If neither matched, then we have a broken ls. This can happen 8319ef0b394Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 8329ef0b394Smrg # broken ls alias from the environment. This has actually 8339ef0b394Smrg # happened. Such a system could not be considered "sane". 8349ef0b394Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 8359ef0b394Smrgalias in your environment]) 8369ef0b394Smrg fi 837698f425bSmrg 8389ef0b394Smrg test "$[2]" = conftest.file 8399ef0b394Smrg ) 8409ef0b394Smrgthen 8419ef0b394Smrg # Ok. 8429ef0b394Smrg : 8439ef0b394Smrgelse 8449ef0b394Smrg AC_MSG_ERROR([newly created file is older than distributed files! 8459ef0b394SmrgCheck your system clock]) 846698f425bSmrgfi 8479ef0b394SmrgAC_MSG_RESULT(yes)]) 848698f425bSmrg 8499ef0b394Smrg# Copyright (C) 2009 Free Software Foundation, Inc. 8509ef0b394Smrg# 8519ef0b394Smrg# This file is free software; the Free Software Foundation 8529ef0b394Smrg# gives unlimited permission to copy and/or distribute it, 8539ef0b394Smrg# with or without modifications, as long as this notice is preserved. 854698f425bSmrg 8559ef0b394Smrg# serial 1 856698f425bSmrg 8579ef0b394Smrg# AM_SILENT_RULES([DEFAULT]) 8589ef0b394Smrg# -------------------------- 8599ef0b394Smrg# Enable less verbose build rules; with the default set to DEFAULT 8609ef0b394Smrg# (`yes' being less verbose, `no' or empty being verbose). 8619ef0b394SmrgAC_DEFUN([AM_SILENT_RULES], 8629ef0b394Smrg[AC_ARG_ENABLE([silent-rules], 8639ef0b394Smrg[ --enable-silent-rules less verbose build output (undo: `make V=1') 8649ef0b394Smrg --disable-silent-rules verbose build output (undo: `make V=0')]) 8659ef0b394Smrgcase $enable_silent_rules in 8669ef0b394Smrgyes) AM_DEFAULT_VERBOSITY=0;; 8679ef0b394Smrgno) AM_DEFAULT_VERBOSITY=1;; 8689ef0b394Smrg*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 8699ef0b394Smrgesac 8709ef0b394SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 8719ef0b394SmrgAM_BACKSLASH='\' 8729ef0b394SmrgAC_SUBST([AM_BACKSLASH])dnl 8739ef0b394Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 8749ef0b394Smrg]) 875698f425bSmrg 8769ef0b394Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 877698f425bSmrg# 8789ef0b394Smrg# This file is free software; the Free Software Foundation 8799ef0b394Smrg# gives unlimited permission to copy and/or distribute it, 8809ef0b394Smrg# with or without modifications, as long as this notice is preserved. 881698f425bSmrg 8829ef0b394Smrg# AM_PROG_INSTALL_STRIP 8839ef0b394Smrg# --------------------- 8849ef0b394Smrg# One issue with vendor `install' (even GNU) is that you can't 8859ef0b394Smrg# specify the program used to strip binaries. This is especially 8869ef0b394Smrg# annoying in cross-compiling environments, where the build's strip 8879ef0b394Smrg# is unlikely to handle the host's binaries. 8889ef0b394Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 8899ef0b394Smrg# always use install-sh in `make install-strip', and initialize 8909ef0b394Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 8919ef0b394SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 8929ef0b394Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 8939ef0b394Smrg# Installed binaries are usually stripped using `strip' when the user 8949ef0b394Smrg# run `make install-strip'. However `strip' might not be the right 8959ef0b394Smrg# tool to use in cross-compilation environments, therefore Automake 8969ef0b394Smrg# will honor the `STRIP' environment variable to overrule this program. 8979ef0b394Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 8989ef0b394Smrgif test "$cross_compiling" != no; then 8999ef0b394Smrg AC_CHECK_TOOL([STRIP], [strip], :) 900698f425bSmrgfi 9019ef0b394SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 9029ef0b394SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 903698f425bSmrg 9049ef0b394Smrg# Copyright (C) 2006, 2008 Free Software Foundation, Inc. 9059ef0b394Smrg# 9069ef0b394Smrg# This file is free software; the Free Software Foundation 9079ef0b394Smrg# gives unlimited permission to copy and/or distribute it, 9089ef0b394Smrg# with or without modifications, as long as this notice is preserved. 909698f425bSmrg 9109ef0b394Smrg# serial 2 911698f425bSmrg 9129ef0b394Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 9139ef0b394Smrg# --------------------------- 9149ef0b394Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 9159ef0b394Smrg# This macro is traced by Automake. 9169ef0b394SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 917698f425bSmrg 9189ef0b394Smrg# AM_SUBST_NOTMAKE(VARIABLE) 9199ef0b394Smrg# --------------------------- 9209ef0b394Smrg# Public sister of _AM_SUBST_NOTMAKE. 9219ef0b394SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 922698f425bSmrg 9239ef0b394Smrg# Check how to create a tarball. -*- Autoconf -*- 924698f425bSmrg 9259ef0b394Smrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 9269ef0b394Smrg# 9279ef0b394Smrg# This file is free software; the Free Software Foundation 9289ef0b394Smrg# gives unlimited permission to copy and/or distribute it, 9299ef0b394Smrg# with or without modifications, as long as this notice is preserved. 930698f425bSmrg 9319ef0b394Smrg# serial 2 932698f425bSmrg 9339ef0b394Smrg# _AM_PROG_TAR(FORMAT) 9349ef0b394Smrg# -------------------- 9359ef0b394Smrg# Check how to create a tarball in format FORMAT. 9369ef0b394Smrg# FORMAT should be one of `v7', `ustar', or `pax'. 9379ef0b394Smrg# 9389ef0b394Smrg# Substitute a variable $(am__tar) that is a command 9399ef0b394Smrg# writing to stdout a FORMAT-tarball containing the directory 9409ef0b394Smrg# $tardir. 9419ef0b394Smrg# tardir=directory && $(am__tar) > result.tar 9429ef0b394Smrg# 9439ef0b394Smrg# Substitute a variable $(am__untar) that extract such 9449ef0b394Smrg# a tarball read from stdin. 9459ef0b394Smrg# $(am__untar) < result.tar 9469ef0b394SmrgAC_DEFUN([_AM_PROG_TAR], 9479ef0b394Smrg[# Always define AMTAR for backward compatibility. 9489ef0b394SmrgAM_MISSING_PROG([AMTAR], [tar]) 9499ef0b394Smrgm4_if([$1], [v7], 9509ef0b394Smrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 9519ef0b394Smrg [m4_case([$1], [ustar],, [pax],, 9529ef0b394Smrg [m4_fatal([Unknown tar format])]) 9539ef0b394SmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 9549ef0b394Smrg# Loop over all known methods to create a tar archive until one works. 9559ef0b394Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 9569ef0b394Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 9579ef0b394Smrg# Do not fold the above two line into one, because Tru64 sh and 9589ef0b394Smrg# Solaris sh will not grok spaces in the rhs of `-'. 9599ef0b394Smrgfor _am_tool in $_am_tools 9609ef0b394Smrgdo 9619ef0b394Smrg case $_am_tool in 9629ef0b394Smrg gnutar) 9639ef0b394Smrg for _am_tar in tar gnutar gtar; 9649ef0b394Smrg do 9659ef0b394Smrg AM_RUN_LOG([$_am_tar --version]) && break 9669ef0b394Smrg done 9679ef0b394Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 9689ef0b394Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 9699ef0b394Smrg am__untar="$_am_tar -xf -" 9709ef0b394Smrg ;; 9719ef0b394Smrg plaintar) 9729ef0b394Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 9739ef0b394Smrg # ustar tarball either. 9749ef0b394Smrg (tar --version) >/dev/null 2>&1 && continue 9759ef0b394Smrg am__tar='tar chf - "$$tardir"' 9769ef0b394Smrg am__tar_='tar chf - "$tardir"' 9779ef0b394Smrg am__untar='tar xf -' 9789ef0b394Smrg ;; 9799ef0b394Smrg pax) 9809ef0b394Smrg am__tar='pax -L -x $1 -w "$$tardir"' 9819ef0b394Smrg am__tar_='pax -L -x $1 -w "$tardir"' 9829ef0b394Smrg am__untar='pax -r' 9839ef0b394Smrg ;; 9849ef0b394Smrg cpio) 9859ef0b394Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 9869ef0b394Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 9879ef0b394Smrg am__untar='cpio -i -H $1 -d' 9889ef0b394Smrg ;; 9899ef0b394Smrg none) 9909ef0b394Smrg am__tar=false 9919ef0b394Smrg am__tar_=false 9929ef0b394Smrg am__untar=false 9939ef0b394Smrg ;; 9949ef0b394Smrg esac 995698f425bSmrg 9969ef0b394Smrg # If the value was cached, stop now. We just wanted to have am__tar 9979ef0b394Smrg # and am__untar set. 9989ef0b394Smrg test -n "${am_cv_prog_tar_$1}" && break 999698f425bSmrg 10009ef0b394Smrg # tar/untar a dummy directory, and stop if the command works 10019ef0b394Smrg rm -rf conftest.dir 10029ef0b394Smrg mkdir conftest.dir 10039ef0b394Smrg echo GrepMe > conftest.dir/file 10049ef0b394Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 10059ef0b394Smrg rm -rf conftest.dir 10069ef0b394Smrg if test -s conftest.tar; then 10079ef0b394Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 10089ef0b394Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 10099ef0b394Smrg fi 10109ef0b394Smrgdone 10119ef0b394Smrgrm -rf conftest.dir 1012698f425bSmrg 10139ef0b394SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 10149ef0b394SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 10159ef0b394SmrgAC_SUBST([am__tar]) 10169ef0b394SmrgAC_SUBST([am__untar]) 10179ef0b394Smrg]) # _AM_PROG_TAR 1018698f425bSmrg 10199ef0b394Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 10209ef0b394Smrg# 10219ef0b394Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 10229ef0b394Smrg# 10239ef0b394Smrg# This program is free software; you can redistribute it and/or modify 10249ef0b394Smrg# it under the terms of the GNU General Public License as published by 10259ef0b394Smrg# the Free Software Foundation; either version 2 of the License, or 10269ef0b394Smrg# (at your option) any later version. 10279ef0b394Smrg# 10289ef0b394Smrg# This program is distributed in the hope that it will be useful, but 10299ef0b394Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 10309ef0b394Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 10319ef0b394Smrg# General Public License for more details. 10329ef0b394Smrg# 10339ef0b394Smrg# You should have received a copy of the GNU General Public License 10349ef0b394Smrg# along with this program; if not, write to the Free Software 10359ef0b394Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 10369ef0b394Smrg# 10379ef0b394Smrg# As a special exception to the GNU General Public License, if you 10389ef0b394Smrg# distribute this file as part of a program that contains a 10399ef0b394Smrg# configuration script generated by Autoconf, you may include it under 10409ef0b394Smrg# the same distribution terms that you use for the rest of that program. 1041698f425bSmrg 10429ef0b394Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 10439ef0b394Smrg# ---------------------------------- 10449ef0b394SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 10459ef0b394Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 10469ef0b394Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 10479ef0b394SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 10489ef0b394Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 10499ef0b394Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 10509ef0b394Smrgfi 10519ef0b394Smrgif test -n "$PKG_CONFIG"; then 10529ef0b394Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 10539ef0b394Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 10549ef0b394Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 10559ef0b394Smrg AC_MSG_RESULT([yes]) 10569ef0b394Smrg else 10579ef0b394Smrg AC_MSG_RESULT([no]) 10589ef0b394Smrg PKG_CONFIG="" 10599ef0b394Smrg fi 10609ef0b394Smrg 10619ef0b394Smrgfi[]dnl 10629ef0b394Smrg])# PKG_PROG_PKG_CONFIG 1063698f425bSmrg 10649ef0b394Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 10659ef0b394Smrg# 10669ef0b394Smrg# Check to see whether a particular set of modules exists. Similar 10679ef0b394Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 10689ef0b394Smrg# 10699ef0b394Smrg# 10709ef0b394Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 10719ef0b394Smrg# this or PKG_CHECK_MODULES is called, or make sure to call 10729ef0b394Smrg# PKG_CHECK_EXISTS manually 10739ef0b394Smrg# -------------------------------------------------------------- 10749ef0b394SmrgAC_DEFUN([PKG_CHECK_EXISTS], 10759ef0b394Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 10769ef0b394Smrgif test -n "$PKG_CONFIG" && \ 10779ef0b394Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 10789ef0b394Smrg m4_ifval([$2], [$2], [:]) 10799ef0b394Smrgm4_ifvaln([$3], [else 10809ef0b394Smrg $3])dnl 10819ef0b394Smrgfi]) 1082698f425bSmrg 1083698f425bSmrg 10849ef0b394Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 10859ef0b394Smrg# --------------------------------------------- 10869ef0b394Smrgm4_define([_PKG_CONFIG], 10879ef0b394Smrg[if test -n "$$1"; then 10889ef0b394Smrg pkg_cv_[]$1="$$1" 10899ef0b394Smrg elif test -n "$PKG_CONFIG"; then 10909ef0b394Smrg PKG_CHECK_EXISTS([$3], 10919ef0b394Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 10929ef0b394Smrg [pkg_failed=yes]) 10939ef0b394Smrg else 10949ef0b394Smrg pkg_failed=untried 10959ef0b394Smrgfi[]dnl 10969ef0b394Smrg])# _PKG_CONFIG 1097698f425bSmrg 10989ef0b394Smrg# _PKG_SHORT_ERRORS_SUPPORTED 10999ef0b394Smrg# ----------------------------- 11009ef0b394SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 11019ef0b394Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 11029ef0b394Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 11039ef0b394Smrg _pkg_short_errors_supported=yes 11049ef0b394Smrgelse 11059ef0b394Smrg _pkg_short_errors_supported=no 11069ef0b394Smrgfi[]dnl 11079ef0b394Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 1108698f425bSmrg 1109698f425bSmrg 11109ef0b394Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 11119ef0b394Smrg# [ACTION-IF-NOT-FOUND]) 11129ef0b394Smrg# 11139ef0b394Smrg# 11149ef0b394Smrg# Note that if there is a possibility the first call to 11159ef0b394Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 11169ef0b394Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 11179ef0b394Smrg# 11189ef0b394Smrg# 11199ef0b394Smrg# -------------------------------------------------------------- 11209ef0b394SmrgAC_DEFUN([PKG_CHECK_MODULES], 11219ef0b394Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 11229ef0b394SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 11239ef0b394SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 1124698f425bSmrg 11259ef0b394Smrgpkg_failed=no 11269ef0b394SmrgAC_MSG_CHECKING([for $1]) 1127698f425bSmrg 11289ef0b394Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 11299ef0b394Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 1130266e564dSmrg 11319ef0b394Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 11329ef0b394Smrgand $1[]_LIBS to avoid the need to call pkg-config. 11339ef0b394SmrgSee the pkg-config man page for more details.]) 1134698f425bSmrg 11359ef0b394Smrgif test $pkg_failed = yes; then 11369ef0b394Smrg _PKG_SHORT_ERRORS_SUPPORTED 11379ef0b394Smrg if test $_pkg_short_errors_supported = yes; then 11389ef0b394Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 11399ef0b394Smrg else 11409ef0b394Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 11419ef0b394Smrg fi 11429ef0b394Smrg # Put the nasty error message in config.log where it belongs 11439ef0b394Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 1144266e564dSmrg 11459ef0b394Smrg ifelse([$4], , [AC_MSG_ERROR(dnl 11469ef0b394Smrg[Package requirements ($2) were not met: 1147266e564dSmrg 11489ef0b394Smrg$$1_PKG_ERRORS 1149266e564dSmrg 11509ef0b394SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 11519ef0b394Smrginstalled software in a non-standard prefix. 1152266e564dSmrg 11539ef0b394Smrg_PKG_TEXT 11549ef0b394Smrg])], 11559ef0b394Smrg [AC_MSG_RESULT([no]) 11569ef0b394Smrg $4]) 11579ef0b394Smrgelif test $pkg_failed = untried; then 11589ef0b394Smrg ifelse([$4], , [AC_MSG_FAILURE(dnl 11599ef0b394Smrg[The pkg-config script could not be found or is too old. Make sure it 11609ef0b394Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 11619ef0b394Smrgpath to pkg-config. 1162266e564dSmrg 11639ef0b394Smrg_PKG_TEXT 1164266e564dSmrg 11659ef0b394SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 11669ef0b394Smrg [$4]) 11679ef0b394Smrgelse 11689ef0b394Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 11699ef0b394Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 11709ef0b394Smrg AC_MSG_RESULT([yes]) 11719ef0b394Smrg ifelse([$3], , :, [$3]) 11729ef0b394Smrgfi[]dnl 11739ef0b394Smrg])# PKG_CHECK_MODULES 1174266e564dSmrg 11759ef0b394Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 11769ef0b394Smrg# 11779ef0b394Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 11789ef0b394Smrg# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, 11799ef0b394Smrg# Inc. 11809ef0b394Smrg# Written by Gordon Matzigkeit, 1996 11819ef0b394Smrg# 11829ef0b394Smrg# This file is free software; the Free Software Foundation gives 11839ef0b394Smrg# unlimited permission to copy and/or distribute it, with or without 11849ef0b394Smrg# modifications, as long as this notice is preserved. 1185c5629e66Smrg 11869ef0b394Smrgm4_define([_LT_COPYING], [dnl 11879ef0b394Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 11889ef0b394Smrg# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, 11899ef0b394Smrg# Inc. 11909ef0b394Smrg# Written by Gordon Matzigkeit, 1996 11919ef0b394Smrg# 11929ef0b394Smrg# This file is part of GNU Libtool. 11939ef0b394Smrg# 11949ef0b394Smrg# GNU Libtool is free software; you can redistribute it and/or 11959ef0b394Smrg# modify it under the terms of the GNU General Public License as 11969ef0b394Smrg# published by the Free Software Foundation; either version 2 of 11979ef0b394Smrg# the License, or (at your option) any later version. 11989ef0b394Smrg# 11999ef0b394Smrg# As a special exception to the GNU General Public License, 12009ef0b394Smrg# if you distribute this file as part of a program or library that 12019ef0b394Smrg# is built using GNU Libtool, you may include this file under the 12029ef0b394Smrg# same distribution terms that you use for the rest of that program. 12039ef0b394Smrg# 12049ef0b394Smrg# GNU Libtool is distributed in the hope that it will be useful, 12059ef0b394Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 12069ef0b394Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12079ef0b394Smrg# GNU General Public License for more details. 12089ef0b394Smrg# 12099ef0b394Smrg# You should have received a copy of the GNU General Public License 12109ef0b394Smrg# along with GNU Libtool; see the file COPYING. If not, a copy 12119ef0b394Smrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 12129ef0b394Smrg# obtained by writing to the Free Software Foundation, Inc., 12139ef0b394Smrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 1214698f425bSmrg]) 1215698f425bSmrg 12169ef0b394Smrg# serial 57 LT_INIT 1217266e564dSmrg 1218266e564dSmrg 12199ef0b394Smrg# LT_PREREQ(VERSION) 12209ef0b394Smrg# ------------------ 12219ef0b394Smrg# Complain and exit if this libtool version is less that VERSION. 12229ef0b394Smrgm4_defun([LT_PREREQ], 12239ef0b394Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 12249ef0b394Smrg [m4_default([$3], 12259ef0b394Smrg [m4_fatal([Libtool version $1 or higher is required], 12269ef0b394Smrg 63)])], 12279ef0b394Smrg [$2])]) 1228266e564dSmrg 1229266e564dSmrg 12309ef0b394Smrg# _LT_CHECK_BUILDDIR 12319ef0b394Smrg# ------------------ 12329ef0b394Smrg# Complain if the absolute build directory name contains unusual characters 12339ef0b394Smrgm4_defun([_LT_CHECK_BUILDDIR], 12349ef0b394Smrg[case `pwd` in 12359ef0b394Smrg *\ * | *\ *) 12369ef0b394Smrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 1237c5629e66Smrgesac 12389ef0b394Smrg]) 1239c5629e66Smrg 1240266e564dSmrg 12419ef0b394Smrg# LT_INIT([OPTIONS]) 12429ef0b394Smrg# ------------------ 12439ef0b394SmrgAC_DEFUN([LT_INIT], 12449ef0b394Smrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 12459ef0b394SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 12469ef0b394SmrgAC_BEFORE([$0], [LT_LANG])dnl 12479ef0b394SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 12489ef0b394SmrgAC_BEFORE([$0], [LTDL_INIT])dnl 12499ef0b394Smrgm4_require([_LT_CHECK_BUILDDIR])dnl 1250266e564dSmrg 12519ef0b394Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 12529ef0b394Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 12539ef0b394Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 12549ef0b394Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 12559ef0b394Smrgdnl unless we require an AC_DEFUNed macro: 12569ef0b394SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 12579ef0b394SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 12589ef0b394SmrgAC_REQUIRE([LTVERSION_VERSION])dnl 12599ef0b394SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 12609ef0b394Smrgm4_require([_LT_PROG_LTMAIN])dnl 1261266e564dSmrg 12629ef0b394Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 1263266e564dSmrg 12649ef0b394Smrgdnl Parse OPTIONS 12659ef0b394Smrg_LT_SET_OPTIONS([$0], [$1]) 1266266e564dSmrg 12679ef0b394Smrg# This can be used to rebuild libtool when needed 12689ef0b394SmrgLIBTOOL_DEPS="$ltmain" 1269266e564dSmrg 12709ef0b394Smrg# Always use our own libtool. 12719ef0b394SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 12729ef0b394SmrgAC_SUBST(LIBTOOL)dnl 1273266e564dSmrg 12749ef0b394Smrg_LT_SETUP 1275266e564dSmrg 12769ef0b394Smrg# Only expand once: 12779ef0b394Smrgm4_define([LT_INIT]) 12789ef0b394Smrg])# LT_INIT 12799ef0b394Smrg 12809ef0b394Smrg# Old names: 12819ef0b394SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 12829ef0b394SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 12839ef0b394Smrgdnl aclocal-1.4 backwards compatibility: 12849ef0b394Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 12859ef0b394Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 1286266e564dSmrg 1287266e564dSmrg 12889ef0b394Smrg# _LT_CC_BASENAME(CC) 12899ef0b394Smrg# ------------------- 12909ef0b394Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 12919ef0b394Smrgm4_defun([_LT_CC_BASENAME], 12929ef0b394Smrg[for cc_temp in $1""; do 12939ef0b394Smrg case $cc_temp in 12949ef0b394Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 12959ef0b394Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 12969ef0b394Smrg \-*) ;; 12979ef0b394Smrg *) break;; 12989ef0b394Smrg esac 12999ef0b394Smrgdone 13009ef0b394Smrgcc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 1301698f425bSmrg]) 1302266e564dSmrg 1303266e564dSmrg 13049ef0b394Smrg# _LT_FILEUTILS_DEFAULTS 13059ef0b394Smrg# ---------------------- 13069ef0b394Smrg# It is okay to use these file commands and assume they have been set 13079ef0b394Smrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 13089ef0b394Smrgm4_defun([_LT_FILEUTILS_DEFAULTS], 13099ef0b394Smrg[: ${CP="cp -f"} 13109ef0b394Smrg: ${MV="mv -f"} 13119ef0b394Smrg: ${RM="rm -f"} 13129ef0b394Smrg])# _LT_FILEUTILS_DEFAULTS 1313266e564dSmrg 1314266e564dSmrg 13159ef0b394Smrg# _LT_SETUP 13169ef0b394Smrg# --------- 13179ef0b394Smrgm4_defun([_LT_SETUP], 13189ef0b394Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 13199ef0b394SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 13209ef0b394SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 13219ef0b394SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 1322266e564dSmrg 13239ef0b394Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl 13249ef0b394Smrg_LT_DECL([], [host], [0])dnl 13259ef0b394Smrg_LT_DECL([], [host_os], [0])dnl 13269ef0b394Smrgdnl 13279ef0b394Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl 13289ef0b394Smrg_LT_DECL([], [build], [0])dnl 13299ef0b394Smrg_LT_DECL([], [build_os], [0])dnl 13309ef0b394Smrgdnl 13319ef0b394SmrgAC_REQUIRE([AC_PROG_CC])dnl 13329ef0b394SmrgAC_REQUIRE([LT_PATH_LD])dnl 13339ef0b394SmrgAC_REQUIRE([LT_PATH_NM])dnl 13349ef0b394Smrgdnl 13359ef0b394SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 13369ef0b394Smrgtest -z "$LN_S" && LN_S="ln -s" 13379ef0b394Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 13389ef0b394Smrgdnl 13399ef0b394SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 13409ef0b394Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 13419ef0b394Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 13429ef0b394Smrgdnl 13439ef0b394Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 13449ef0b394Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 13459ef0b394Smrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 13469ef0b394Smrgm4_require([_LT_CMD_RELOAD])dnl 13479ef0b394Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 13489ef0b394Smrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 13499ef0b394Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 13509ef0b394Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 13519ef0b394Smrgm4_require([_LT_WITH_SYSROOT])dnl 13529ef0b394Smrg 13539ef0b394Smrg_LT_CONFIG_LIBTOOL_INIT([ 13549ef0b394Smrg# See if we are running on zsh, and set the options which allow our 13559ef0b394Smrg# commands through without removal of \ escapes INIT. 13569ef0b394Smrgif test -n "\${ZSH_VERSION+set}" ; then 13579ef0b394Smrg setopt NO_GLOB_SUBST 13589ef0b394Smrgfi 13599ef0b394Smrg]) 13609ef0b394Smrgif test -n "${ZSH_VERSION+set}" ; then 13619ef0b394Smrg setopt NO_GLOB_SUBST 13629ef0b394Smrgfi 13639ef0b394Smrg 13649ef0b394Smrg_LT_CHECK_OBJDIR 13659ef0b394Smrg 13669ef0b394Smrgm4_require([_LT_TAG_COMPILER])dnl 13679ef0b394Smrg 13689ef0b394Smrgcase $host_os in 13699ef0b394Smrgaix3*) 13709ef0b394Smrg # AIX sometimes has problems with the GCC collect2 program. For some 13719ef0b394Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 13729ef0b394Smrg # vanish in a puff of smoke. 13739ef0b394Smrg if test "X${COLLECT_NAMES+set}" != Xset; then 13749ef0b394Smrg COLLECT_NAMES= 13759ef0b394Smrg export COLLECT_NAMES 1376c5629e66Smrg fi 1377c5629e66Smrg ;; 13789ef0b394Smrgesac 13799ef0b394Smrg 13809ef0b394Smrg# Global variables: 13819ef0b394Smrgofile=libtool 13829ef0b394Smrgcan_build_shared=yes 13839ef0b394Smrg 13849ef0b394Smrg# All known linkers require a `.a' archive for static linking (except MSVC, 13859ef0b394Smrg# which needs '.lib'). 13869ef0b394Smrglibext=a 13879ef0b394Smrg 13889ef0b394Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 13899ef0b394Smrg 13909ef0b394Smrgold_CC="$CC" 13919ef0b394Smrgold_CFLAGS="$CFLAGS" 13929ef0b394Smrg 13939ef0b394Smrg# Set sane defaults for various variables 13949ef0b394Smrgtest -z "$CC" && CC=cc 13959ef0b394Smrgtest -z "$LTCC" && LTCC=$CC 13969ef0b394Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 13979ef0b394Smrgtest -z "$LD" && LD=ld 13989ef0b394Smrgtest -z "$ac_objext" && ac_objext=o 13999ef0b394Smrg 14009ef0b394Smrg_LT_CC_BASENAME([$compiler]) 14019ef0b394Smrg 14029ef0b394Smrg# Only perform the check for file, if the check method requires it 14039ef0b394Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 14049ef0b394Smrgcase $deplibs_check_method in 14059ef0b394Smrgfile_magic*) 14069ef0b394Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 14079ef0b394Smrg _LT_PATH_MAGIC 1408c5629e66Smrg fi 1409c5629e66Smrg ;; 1410c5629e66Smrgesac 1411266e564dSmrg 14129ef0b394Smrg# Use C for the default configuration in the libtool script 14139ef0b394SmrgLT_SUPPORTED_TAG([CC]) 14149ef0b394Smrg_LT_LANG_C_CONFIG 14159ef0b394Smrg_LT_LANG_DEFAULT_CONFIG 14169ef0b394Smrg_LT_CONFIG_COMMANDS 14179ef0b394Smrg])# _LT_SETUP 1418698f425bSmrg 1419698f425bSmrg 14209ef0b394Smrg# _LT_PREPARE_SED_QUOTE_VARS 14219ef0b394Smrg# -------------------------- 14229ef0b394Smrg# Define a few sed substitution that help us do robust quoting. 14239ef0b394Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 14249ef0b394Smrg[# Backslashify metacharacters that are still active within 14259ef0b394Smrg# double-quoted strings. 14269ef0b394Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 1427698f425bSmrg 14289ef0b394Smrg# Same as above, but do not quote variable references. 14299ef0b394Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 1430698f425bSmrg 14319ef0b394Smrg# Sed substitution to delay expansion of an escaped shell variable in a 14329ef0b394Smrg# double_quote_subst'ed string. 14339ef0b394Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 1434698f425bSmrg 14359ef0b394Smrg# Sed substitution to delay expansion of an escaped single quote. 14369ef0b394Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 1437266e564dSmrg 14389ef0b394Smrg# Sed substitution to avoid accidental globbing in evaled expressions 14399ef0b394Smrgno_glob_subst='s/\*/\\\*/g' 14409ef0b394Smrg]) 1441266e564dSmrg 14429ef0b394Smrg# _LT_PROG_LTMAIN 14439ef0b394Smrg# --------------- 14449ef0b394Smrg# Note that this code is called both from `configure', and `config.status' 14459ef0b394Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 14469ef0b394Smrg# `config.status' has no value for ac_aux_dir unless we are using Automake, 14479ef0b394Smrg# so we pass a copy along to make sure it has a sensible value anyway. 14489ef0b394Smrgm4_defun([_LT_PROG_LTMAIN], 14499ef0b394Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 14509ef0b394Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 14519ef0b394Smrgltmain="$ac_aux_dir/ltmain.sh" 14529ef0b394Smrg])# _LT_PROG_LTMAIN 1453266e564dSmrg 1454266e564dSmrg 1455c5629e66Smrg 14569ef0b394Smrg# So that we can recreate a full libtool script including additional 14579ef0b394Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 14589ef0b394Smrg# in macros and then make a single call at the end using the `libtool' 14599ef0b394Smrg# label. 1460c5629e66Smrg 1461c5629e66Smrg 14629ef0b394Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 14639ef0b394Smrg# ---------------------------------------- 14649ef0b394Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 14659ef0b394Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 14669ef0b394Smrg[m4_ifval([$1], 14679ef0b394Smrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 14689ef0b394Smrg [$1 14699ef0b394Smrg])])]) 1470698f425bSmrg 14719ef0b394Smrg# Initialize. 14729ef0b394Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 1473c5629e66Smrg 1474c5629e66Smrg 14759ef0b394Smrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 14769ef0b394Smrg# ------------------------------ 14779ef0b394Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 14789ef0b394Smrgm4_define([_LT_CONFIG_LIBTOOL], 14799ef0b394Smrg[m4_ifval([$1], 14809ef0b394Smrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 14819ef0b394Smrg [$1 14829ef0b394Smrg])])]) 1483c5629e66Smrg 14849ef0b394Smrg# Initialize. 14859ef0b394Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 1486c5629e66Smrg 1487c5629e66Smrg 14889ef0b394Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 14899ef0b394Smrg# ----------------------------------------------------- 14909ef0b394Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 14919ef0b394Smrg[_LT_CONFIG_LIBTOOL([$1]) 14929ef0b394Smrg_LT_CONFIG_LIBTOOL_INIT([$2]) 14939ef0b394Smrg]) 1494c5629e66Smrg 1495c5629e66Smrg 14969ef0b394Smrg# _LT_FORMAT_COMMENT([COMMENT]) 14979ef0b394Smrg# ----------------------------- 14989ef0b394Smrg# Add leading comment marks to the start of each line, and a trailing 14999ef0b394Smrg# full-stop to the whole comment if one is not present already. 15009ef0b394Smrgm4_define([_LT_FORMAT_COMMENT], 15019ef0b394Smrg[m4_ifval([$1], [ 15029ef0b394Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 15039ef0b394Smrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 15049ef0b394Smrg)]) 1505266e564dSmrg 1506266e564dSmrg 1507698f425bSmrg 1508266e564dSmrg 1509266e564dSmrg 15109ef0b394Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 15119ef0b394Smrg# ------------------------------------------------------------------- 15129ef0b394Smrg# CONFIGNAME is the name given to the value in the libtool script. 15139ef0b394Smrg# VARNAME is the (base) name used in the configure script. 15149ef0b394Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 15159ef0b394Smrg# VARNAME. Any other value will be used directly. 15169ef0b394Smrgm4_define([_LT_DECL], 15179ef0b394Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 15189ef0b394Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 15199ef0b394Smrg [m4_ifval([$1], [$1], [$2])]) 15209ef0b394Smrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 15219ef0b394Smrg m4_ifval([$4], 15229ef0b394Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 15239ef0b394Smrg lt_dict_add_subkey([lt_decl_dict], [$2], 15249ef0b394Smrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 15259ef0b394Smrg]) 1526266e564dSmrg 1527266e564dSmrg 15289ef0b394Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 15299ef0b394Smrg# -------------------------------------------------------- 15309ef0b394Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 1531266e564dSmrg 1532266e564dSmrg 15339ef0b394Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 15349ef0b394Smrg# ------------------------------------------------ 15359ef0b394Smrgm4_define([lt_decl_tag_varnames], 15369ef0b394Smrg[_lt_decl_filter([tagged?], [yes], $@)]) 1537266e564dSmrg 1538266e564dSmrg 15399ef0b394Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 15409ef0b394Smrg# --------------------------------------------------------- 15419ef0b394Smrgm4_define([_lt_decl_filter], 15429ef0b394Smrg[m4_case([$#], 15439ef0b394Smrg [0], [m4_fatal([$0: too few arguments: $#])], 15449ef0b394Smrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 15459ef0b394Smrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 15469ef0b394Smrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 15479ef0b394Smrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 15489ef0b394Smrg]) 1549266e564dSmrg 1550266e564dSmrg 15519ef0b394Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 15529ef0b394Smrg# -------------------------------------------------- 15539ef0b394Smrgm4_define([lt_decl_quote_varnames], 15549ef0b394Smrg[_lt_decl_filter([value], [1], $@)]) 1555266e564dSmrg 1556266e564dSmrg 15579ef0b394Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 15589ef0b394Smrg# --------------------------------------------------- 15599ef0b394Smrgm4_define([lt_decl_dquote_varnames], 15609ef0b394Smrg[_lt_decl_filter([value], [2], $@)]) 1561266e564dSmrg 1562266e564dSmrg 15639ef0b394Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 15649ef0b394Smrg# --------------------------------------------------- 15659ef0b394Smrgm4_define([lt_decl_varnames_tagged], 15669ef0b394Smrg[m4_assert([$# <= 2])dnl 15679ef0b394Smrg_$0(m4_quote(m4_default([$1], [[, ]])), 15689ef0b394Smrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 15699ef0b394Smrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 15709ef0b394Smrgm4_define([_lt_decl_varnames_tagged], 15719ef0b394Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 1572266e564dSmrg 1573266e564dSmrg 15749ef0b394Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 15759ef0b394Smrg# ------------------------------------------------ 15769ef0b394Smrgm4_define([lt_decl_all_varnames], 15779ef0b394Smrg[_$0(m4_quote(m4_default([$1], [[, ]])), 15789ef0b394Smrg m4_if([$2], [], 15799ef0b394Smrg m4_quote(lt_decl_varnames), 15809ef0b394Smrg m4_quote(m4_shift($@))))[]dnl 15819ef0b394Smrg]) 15829ef0b394Smrgm4_define([_lt_decl_all_varnames], 15839ef0b394Smrg[lt_join($@, lt_decl_varnames_tagged([$1], 15849ef0b394Smrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 15859ef0b394Smrg]) 1586266e564dSmrg 1587266e564dSmrg 15889ef0b394Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 15899ef0b394Smrg# ------------------------------------ 15909ef0b394Smrg# Quote a variable value, and forward it to `config.status' so that its 15919ef0b394Smrg# declaration there will have the same value as in `configure'. VARNAME 15929ef0b394Smrg# must have a single quote delimited value for this to work. 15939ef0b394Smrgm4_define([_LT_CONFIG_STATUS_DECLARE], 15949ef0b394Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 1595266e564dSmrg 1596266e564dSmrg 15979ef0b394Smrg# _LT_CONFIG_STATUS_DECLARATIONS 15989ef0b394Smrg# ------------------------------ 15999ef0b394Smrg# We delimit libtool config variables with single quotes, so when 16009ef0b394Smrg# we write them to config.status, we have to be sure to quote all 16019ef0b394Smrg# embedded single quotes properly. In configure, this macro expands 16029ef0b394Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 16039ef0b394Smrg# 16049ef0b394Smrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 16059ef0b394Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 16069ef0b394Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 16079ef0b394Smrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 1608266e564dSmrg 1609266e564dSmrg 16109ef0b394Smrg# _LT_LIBTOOL_TAGS 16119ef0b394Smrg# ---------------- 16129ef0b394Smrg# Output comment and list of tags supported by the script 16139ef0b394Smrgm4_defun([_LT_LIBTOOL_TAGS], 16149ef0b394Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 16159ef0b394Smrgavailable_tags="_LT_TAGS"dnl 16169ef0b394Smrg]) 1617266e564dSmrg 1618266e564dSmrg 16199ef0b394Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 16209ef0b394Smrg# ----------------------------------- 16219ef0b394Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and 16229ef0b394Smrg# expand to a commented shell variable setting: 16239ef0b394Smrg# 16249ef0b394Smrg# # Some comment about what VAR is for. 16259ef0b394Smrg# visible_name=$lt_internal_name 16269ef0b394Smrgm4_define([_LT_LIBTOOL_DECLARE], 16279ef0b394Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 16289ef0b394Smrg [description])))[]dnl 16299ef0b394Smrgm4_pushdef([_libtool_name], 16309ef0b394Smrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 16319ef0b394Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 16329ef0b394Smrg [0], [_libtool_name=[$]$1], 16339ef0b394Smrg [1], [_libtool_name=$lt_[]$1], 16349ef0b394Smrg [2], [_libtool_name=$lt_[]$1], 16359ef0b394Smrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 16369ef0b394Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 16379ef0b394Smrg]) 1638266e564dSmrg 1639266e564dSmrg 16409ef0b394Smrg# _LT_LIBTOOL_CONFIG_VARS 16419ef0b394Smrg# ----------------------- 16429ef0b394Smrg# Produce commented declarations of non-tagged libtool config variables 16439ef0b394Smrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 16449ef0b394Smrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 16459ef0b394Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 16469ef0b394Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 16479ef0b394Smrg[m4_foreach([_lt_var], 16489ef0b394Smrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 16499ef0b394Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 1650698f425bSmrg 1651266e564dSmrg 16529ef0b394Smrg# _LT_LIBTOOL_TAG_VARS(TAG) 16539ef0b394Smrg# ------------------------- 16549ef0b394Smrgm4_define([_LT_LIBTOOL_TAG_VARS], 16559ef0b394Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 16569ef0b394Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 1657266e564dSmrg 1658266e564dSmrg 16599ef0b394Smrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 16609ef0b394Smrg# ------------------------------ 16619ef0b394Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 1662266e564dSmrg 1663266e564dSmrg 16649ef0b394Smrg# _LT_CONFIG_COMMANDS 16659ef0b394Smrg# ------------------- 16669ef0b394Smrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 16679ef0b394Smrg# variables for single and double quote escaping we saved from calls 16689ef0b394Smrg# to _LT_DECL, we can put quote escaped variables declarations 16699ef0b394Smrg# into `config.status', and then the shell code to quote escape them in 16709ef0b394Smrg# for loops in `config.status'. Finally, any additional code accumulated 16719ef0b394Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 16729ef0b394Smrgm4_defun([_LT_CONFIG_COMMANDS], 16739ef0b394Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 16749ef0b394Smrg dnl If the libtool generation code has been placed in $CONFIG_LT, 16759ef0b394Smrg dnl instead of duplicating it all over again into config.status, 16769ef0b394Smrg dnl then we will have config.status run $CONFIG_LT later, so it 16779ef0b394Smrg dnl needs to know what name is stored there: 16789ef0b394Smrg [AC_CONFIG_COMMANDS([libtool], 16799ef0b394Smrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 16809ef0b394Smrg dnl If the libtool generation code is destined for config.status, 16819ef0b394Smrg dnl expand the accumulated commands and init code now: 16829ef0b394Smrg [AC_CONFIG_COMMANDS([libtool], 16839ef0b394Smrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 16849ef0b394Smrg])#_LT_CONFIG_COMMANDS 1685c5629e66Smrg 1686266e564dSmrg 16879ef0b394Smrg# Initialize. 16889ef0b394Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 16899ef0b394Smrg[ 1690266e564dSmrg 16919ef0b394Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 16929ef0b394Smrg# if CDPATH is set. 16939ef0b394Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 1694266e564dSmrg 16959ef0b394Smrgsed_quote_subst='$sed_quote_subst' 16969ef0b394Smrgdouble_quote_subst='$double_quote_subst' 16979ef0b394Smrgdelay_variable_subst='$delay_variable_subst' 16989ef0b394Smrg_LT_CONFIG_STATUS_DECLARATIONS 16999ef0b394SmrgLTCC='$LTCC' 17009ef0b394SmrgLTCFLAGS='$LTCFLAGS' 17019ef0b394Smrgcompiler='$compiler_DEFAULT' 1702266e564dSmrg 17039ef0b394Smrg# A function that is used when there is no print builtin or printf. 17049ef0b394Smrgfunc_fallback_echo () 17059ef0b394Smrg{ 17069ef0b394Smrg eval 'cat <<_LTECHO_EOF 17079ef0b394Smrg\$[]1 17089ef0b394Smrg_LTECHO_EOF' 17099ef0b394Smrg} 1710266e564dSmrg 17119ef0b394Smrg# Quote evaled strings. 17129ef0b394Smrgfor var in lt_decl_all_varnames([[ \ 17139ef0b394Smrg]], lt_decl_quote_varnames); do 17149ef0b394Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 17159ef0b394Smrg *[[\\\\\\\`\\"\\\$]]*) 17169ef0b394Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 17179ef0b394Smrg ;; 17189ef0b394Smrg *) 17199ef0b394Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 17209ef0b394Smrg ;; 17219ef0b394Smrg esac 17229ef0b394Smrgdone 1723266e564dSmrg 17249ef0b394Smrg# Double-quote double-evaled strings. 17259ef0b394Smrgfor var in lt_decl_all_varnames([[ \ 17269ef0b394Smrg]], lt_decl_dquote_varnames); do 17279ef0b394Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 17289ef0b394Smrg *[[\\\\\\\`\\"\\\$]]*) 17299ef0b394Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 17309ef0b394Smrg ;; 17319ef0b394Smrg *) 17329ef0b394Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 17339ef0b394Smrg ;; 17349ef0b394Smrg esac 17359ef0b394Smrgdone 1736266e564dSmrg 17379ef0b394Smrg_LT_OUTPUT_LIBTOOL_INIT 17389ef0b394Smrg]) 1739266e564dSmrg 17409ef0b394Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 17419ef0b394Smrg# ------------------------------------ 17429ef0b394Smrg# Generate a child script FILE with all initialization necessary to 17439ef0b394Smrg# reuse the environment learned by the parent script, and make the 17449ef0b394Smrg# file executable. If COMMENT is supplied, it is inserted after the 17459ef0b394Smrg# `#!' sequence but before initialization text begins. After this 17469ef0b394Smrg# macro, additional text can be appended to FILE to form the body of 17479ef0b394Smrg# the child script. The macro ends with non-zero status if the 17489ef0b394Smrg# file could not be fully written (such as if the disk is full). 17499ef0b394Smrgm4_ifdef([AS_INIT_GENERATED], 17509ef0b394Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 17519ef0b394Smrg[m4_defun([_LT_GENERATED_FILE_INIT], 17529ef0b394Smrg[m4_require([AS_PREPARE])]dnl 17539ef0b394Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 17549ef0b394Smrg[lt_write_fail=0 17559ef0b394Smrgcat >$1 <<_ASEOF || lt_write_fail=1 17569ef0b394Smrg#! $SHELL 17579ef0b394Smrg# Generated by $as_me. 17589ef0b394Smrg$2 17599ef0b394SmrgSHELL=\${CONFIG_SHELL-$SHELL} 17609ef0b394Smrgexport SHELL 17619ef0b394Smrg_ASEOF 17629ef0b394Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1 17639ef0b394SmrgAS_SHELL_SANITIZE 17649ef0b394Smrg_AS_PREPARE 17659ef0b394Smrgexec AS_MESSAGE_FD>&1 17669ef0b394Smrg_ASEOF 17679ef0b394Smrgtest $lt_write_fail = 0 && chmod +x $1[]dnl 17689ef0b394Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 1769266e564dSmrg 17709ef0b394Smrg# LT_OUTPUT 17719ef0b394Smrg# --------- 17729ef0b394Smrg# This macro allows early generation of the libtool script (before 17739ef0b394Smrg# AC_OUTPUT is called), incase it is used in configure for compilation 17749ef0b394Smrg# tests. 17759ef0b394SmrgAC_DEFUN([LT_OUTPUT], 17769ef0b394Smrg[: ${CONFIG_LT=./config.lt} 17779ef0b394SmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 17789ef0b394Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 17799ef0b394Smrg[# Run this file to recreate a libtool stub with the current configuration.]) 1780266e564dSmrg 17819ef0b394Smrgcat >>"$CONFIG_LT" <<\_LTEOF 17829ef0b394Smrglt_cl_silent=false 17839ef0b394Smrgexec AS_MESSAGE_LOG_FD>>config.log 17849ef0b394Smrg{ 17859ef0b394Smrg echo 17869ef0b394Smrg AS_BOX([Running $as_me.]) 17879ef0b394Smrg} >&AS_MESSAGE_LOG_FD 1788266e564dSmrg 17899ef0b394Smrglt_cl_help="\ 17909ef0b394Smrg\`$as_me' creates a local libtool stub from the current configuration, 17919ef0b394Smrgfor use in further configure time tests before the real libtool is 17929ef0b394Smrggenerated. 1793266e564dSmrg 17949ef0b394SmrgUsage: $[0] [[OPTIONS]] 1795266e564dSmrg 17969ef0b394Smrg -h, --help print this help, then exit 17979ef0b394Smrg -V, --version print version number, then exit 17989ef0b394Smrg -q, --quiet do not print progress messages 17999ef0b394Smrg -d, --debug don't remove temporary files 1800266e564dSmrg 18019ef0b394SmrgReport bugs to <bug-libtool@gnu.org>." 1802266e564dSmrg 18039ef0b394Smrglt_cl_version="\ 18049ef0b394Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 18059ef0b394Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 18069ef0b394Smrgconfigured by $[0], generated by m4_PACKAGE_STRING. 1807266e564dSmrg 18089ef0b394SmrgCopyright (C) 2010 Free Software Foundation, Inc. 18099ef0b394SmrgThis config.lt script is free software; the Free Software Foundation 18109ef0b394Smrggives unlimited permision to copy, distribute and modify it." 1811266e564dSmrg 18129ef0b394Smrgwhile test $[#] != 0 18139ef0b394Smrgdo 18149ef0b394Smrg case $[1] in 18159ef0b394Smrg --version | --v* | -V ) 18169ef0b394Smrg echo "$lt_cl_version"; exit 0 ;; 18179ef0b394Smrg --help | --h* | -h ) 18189ef0b394Smrg echo "$lt_cl_help"; exit 0 ;; 18199ef0b394Smrg --debug | --d* | -d ) 18209ef0b394Smrg debug=: ;; 18219ef0b394Smrg --quiet | --q* | --silent | --s* | -q ) 18229ef0b394Smrg lt_cl_silent=: ;; 1823266e564dSmrg 18249ef0b394Smrg -*) AC_MSG_ERROR([unrecognized option: $[1] 18259ef0b394SmrgTry \`$[0] --help' for more information.]) ;; 1826266e564dSmrg 18279ef0b394Smrg *) AC_MSG_ERROR([unrecognized argument: $[1] 18289ef0b394SmrgTry \`$[0] --help' for more information.]) ;; 1829c5629e66Smrg esac 18309ef0b394Smrg shift 18319ef0b394Smrgdone 1832266e564dSmrg 18339ef0b394Smrgif $lt_cl_silent; then 18349ef0b394Smrg exec AS_MESSAGE_FD>/dev/null 18359ef0b394Smrgfi 18369ef0b394Smrg_LTEOF 1837266e564dSmrg 18389ef0b394Smrgcat >>"$CONFIG_LT" <<_LTEOF 18399ef0b394Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 18409ef0b394Smrg_LTEOF 1841266e564dSmrg 18429ef0b394Smrgcat >>"$CONFIG_LT" <<\_LTEOF 18439ef0b394SmrgAC_MSG_NOTICE([creating $ofile]) 18449ef0b394Smrg_LT_OUTPUT_LIBTOOL_COMMANDS 18459ef0b394SmrgAS_EXIT(0) 18469ef0b394Smrg_LTEOF 18479ef0b394Smrgchmod +x "$CONFIG_LT" 1848266e564dSmrg 18499ef0b394Smrg# configure is writing to config.log, but config.lt does its own redirection, 18509ef0b394Smrg# appending to config.log, which fails on DOS, as config.log is still kept 18519ef0b394Smrg# open by configure. Here we exec the FD to /dev/null, effectively closing 18529ef0b394Smrg# config.log, so it can be properly (re)opened and appended to by config.lt. 18539ef0b394Smrglt_cl_success=: 18549ef0b394Smrgtest "$silent" = yes && 18559ef0b394Smrg lt_config_lt_args="$lt_config_lt_args --quiet" 18569ef0b394Smrgexec AS_MESSAGE_LOG_FD>/dev/null 18579ef0b394Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 18589ef0b394Smrgexec AS_MESSAGE_LOG_FD>>config.log 18599ef0b394Smrg$lt_cl_success || AS_EXIT(1) 18609ef0b394Smrg])# LT_OUTPUT 1861266e564dSmrg 1862266e564dSmrg 18639ef0b394Smrg# _LT_CONFIG(TAG) 18649ef0b394Smrg# --------------- 18659ef0b394Smrg# If TAG is the built-in tag, create an initial libtool script with a 18669ef0b394Smrg# default configuration from the untagged config vars. Otherwise add code 18679ef0b394Smrg# to config.status for appending the configuration named by TAG from the 18689ef0b394Smrg# matching tagged config vars. 18699ef0b394Smrgm4_defun([_LT_CONFIG], 18709ef0b394Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 18719ef0b394Smrg_LT_CONFIG_SAVE_COMMANDS([ 18729ef0b394Smrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 18739ef0b394Smrg m4_if(_LT_TAG, [C], [ 18749ef0b394Smrg # See if we are running on zsh, and set the options which allow our 18759ef0b394Smrg # commands through without removal of \ escapes. 18769ef0b394Smrg if test -n "${ZSH_VERSION+set}" ; then 18779ef0b394Smrg setopt NO_GLOB_SUBST 1878c5629e66Smrg fi 1879266e564dSmrg 18809ef0b394Smrg cfgfile="${ofile}T" 18819ef0b394Smrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 18829ef0b394Smrg $RM "$cfgfile" 18839ef0b394Smrg 18849ef0b394Smrg cat <<_LT_EOF >> "$cfgfile" 18859ef0b394Smrg#! $SHELL 18869ef0b394Smrg 18879ef0b394Smrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 18889ef0b394Smrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 18899ef0b394Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 18909ef0b394Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 18919ef0b394Smrg# 18929ef0b394Smrg_LT_COPYING 18939ef0b394Smrg_LT_LIBTOOL_TAGS 18949ef0b394Smrg 18959ef0b394Smrg# ### BEGIN LIBTOOL CONFIG 18969ef0b394Smrg_LT_LIBTOOL_CONFIG_VARS 18979ef0b394Smrg_LT_LIBTOOL_TAG_VARS 18989ef0b394Smrg# ### END LIBTOOL CONFIG 18999ef0b394Smrg 19009ef0b394Smrg_LT_EOF 1901266e564dSmrg 1902c5629e66Smrg case $host_os in 19039ef0b394Smrg aix3*) 19049ef0b394Smrg cat <<\_LT_EOF >> "$cfgfile" 19059ef0b394Smrg# AIX sometimes has problems with the GCC collect2 program. For some 19069ef0b394Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 19079ef0b394Smrg# vanish in a puff of smoke. 19089ef0b394Smrgif test "X${COLLECT_NAMES+set}" != Xset; then 19099ef0b394Smrg COLLECT_NAMES= 19109ef0b394Smrg export COLLECT_NAMES 19119ef0b394Smrgfi 19129ef0b394Smrg_LT_EOF 1913c5629e66Smrg ;; 1914c5629e66Smrg esac 1915266e564dSmrg 19169ef0b394Smrg _LT_PROG_LTMAIN 1917266e564dSmrg 19189ef0b394Smrg # We use sed instead of cat because bash on DJGPP gets confused if 19199ef0b394Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 19209ef0b394Smrg # text mode, it properly converts lines to CR/LF. This bash problem 19219ef0b394Smrg # is reportedly fixed, but why not run on old versions too? 19229ef0b394Smrg sed '$q' "$ltmain" >> "$cfgfile" \ 19239ef0b394Smrg || (rm -f "$cfgfile"; exit 1) 1924698f425bSmrg 19259ef0b394Smrg _LT_PROG_REPLACE_SHELLFNS 1926266e564dSmrg 19279ef0b394Smrg mv -f "$cfgfile" "$ofile" || 19289ef0b394Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 19299ef0b394Smrg chmod +x "$ofile" 19309ef0b394Smrg], 19319ef0b394Smrg[cat <<_LT_EOF >> "$ofile" 1932266e564dSmrg 19339ef0b394Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 19349ef0b394Smrgdnl in a comment (ie after a #). 19359ef0b394Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1 19369ef0b394Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 19379ef0b394Smrg# ### END LIBTOOL TAG CONFIG: $1 19389ef0b394Smrg_LT_EOF 19399ef0b394Smrg])dnl /m4_if 19409ef0b394Smrg], 19419ef0b394Smrg[m4_if([$1], [], [ 19429ef0b394Smrg PACKAGE='$PACKAGE' 19439ef0b394Smrg VERSION='$VERSION' 19449ef0b394Smrg TIMESTAMP='$TIMESTAMP' 19459ef0b394Smrg RM='$RM' 19469ef0b394Smrg ofile='$ofile'], []) 19479ef0b394Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS 19489ef0b394Smrg])# _LT_CONFIG 1949266e564dSmrg 1950266e564dSmrg 19519ef0b394Smrg# LT_SUPPORTED_TAG(TAG) 19529ef0b394Smrg# --------------------- 19539ef0b394Smrg# Trace this macro to discover what tags are supported by the libtool 19549ef0b394Smrg# --tag option, using: 19559ef0b394Smrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 19569ef0b394SmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 1957266e564dSmrg 1958266e564dSmrg 19599ef0b394Smrg# C support is built-in for now 19609ef0b394Smrgm4_define([_LT_LANG_C_enabled], []) 19619ef0b394Smrgm4_define([_LT_TAGS], []) 1962266e564dSmrg 1963266e564dSmrg 19649ef0b394Smrg# LT_LANG(LANG) 19659ef0b394Smrg# ------------- 19669ef0b394Smrg# Enable libtool support for the given language if not already enabled. 19679ef0b394SmrgAC_DEFUN([LT_LANG], 19689ef0b394Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 19699ef0b394Smrgm4_case([$1], 19709ef0b394Smrg [C], [_LT_LANG(C)], 19719ef0b394Smrg [C++], [_LT_LANG(CXX)], 19729ef0b394Smrg [Java], [_LT_LANG(GCJ)], 19739ef0b394Smrg [Fortran 77], [_LT_LANG(F77)], 19749ef0b394Smrg [Fortran], [_LT_LANG(FC)], 19759ef0b394Smrg [Windows Resource], [_LT_LANG(RC)], 19769ef0b394Smrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 19779ef0b394Smrg [_LT_LANG($1)], 19789ef0b394Smrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 19799ef0b394Smrg])# LT_LANG 1980266e564dSmrg 1981266e564dSmrg 19829ef0b394Smrg# _LT_LANG(LANGNAME) 19839ef0b394Smrg# ------------------ 19849ef0b394Smrgm4_defun([_LT_LANG], 19859ef0b394Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 19869ef0b394Smrg [LT_SUPPORTED_TAG([$1])dnl 19879ef0b394Smrg m4_append([_LT_TAGS], [$1 ])dnl 19889ef0b394Smrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 19899ef0b394Smrg _LT_LANG_$1_CONFIG($1)])dnl 19909ef0b394Smrg])# _LT_LANG 1991266e564dSmrg 1992266e564dSmrg 19939ef0b394Smrg# _LT_LANG_DEFAULT_CONFIG 19949ef0b394Smrg# ----------------------- 19959ef0b394Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 19969ef0b394Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 19979ef0b394Smrg [LT_LANG(CXX)], 19989ef0b394Smrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 1999266e564dSmrg 20009ef0b394SmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 20019ef0b394Smrg [LT_LANG(F77)], 20029ef0b394Smrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 2003266e564dSmrg 20049ef0b394SmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 20059ef0b394Smrg [LT_LANG(FC)], 20069ef0b394Smrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 2007266e564dSmrg 20089ef0b394Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 20099ef0b394Smrgdnl pulling things in needlessly. 20109ef0b394SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 20119ef0b394Smrg [LT_LANG(GCJ)], 20129ef0b394Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 20139ef0b394Smrg [LT_LANG(GCJ)], 20149ef0b394Smrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 20159ef0b394Smrg [LT_LANG(GCJ)], 20169ef0b394Smrg [m4_ifdef([AC_PROG_GCJ], 20179ef0b394Smrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 20189ef0b394Smrg m4_ifdef([A][M_PROG_GCJ], 20199ef0b394Smrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 20209ef0b394Smrg m4_ifdef([LT_PROG_GCJ], 20219ef0b394Smrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 2022266e564dSmrg 20239ef0b394SmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 20249ef0b394Smrg [LT_LANG(RC)], 20259ef0b394Smrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 20269ef0b394Smrg])# _LT_LANG_DEFAULT_CONFIG 2027266e564dSmrg 20289ef0b394Smrg# Obsolete macros: 20299ef0b394SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 20309ef0b394SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 20319ef0b394SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 20329ef0b394SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 20339ef0b394SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 20349ef0b394Smrgdnl aclocal-1.4 backwards compatibility: 20359ef0b394Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 20369ef0b394Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 20379ef0b394Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 20389ef0b394Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 20399ef0b394Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 2040266e564dSmrg 2041698f425bSmrg 20429ef0b394Smrg# _LT_TAG_COMPILER 20439ef0b394Smrg# ---------------- 20449ef0b394Smrgm4_defun([_LT_TAG_COMPILER], 20459ef0b394Smrg[AC_REQUIRE([AC_PROG_CC])dnl 2046698f425bSmrg 20479ef0b394Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 20489ef0b394Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 20499ef0b394Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 20509ef0b394Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 2051266e564dSmrg 20529ef0b394Smrg# If no C compiler was specified, use CC. 20539ef0b394SmrgLTCC=${LTCC-"$CC"} 2054266e564dSmrg 20559ef0b394Smrg# If no C compiler flags were specified, use CFLAGS. 20569ef0b394SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 2057266e564dSmrg 20589ef0b394Smrg# Allow CC to be a program name with arguments. 20599ef0b394Smrgcompiler=$CC 20609ef0b394Smrg])# _LT_TAG_COMPILER 2061266e564dSmrg 2062698f425bSmrg 20639ef0b394Smrg# _LT_COMPILER_BOILERPLATE 20649ef0b394Smrg# ------------------------ 20659ef0b394Smrg# Check for compiler boilerplate output or warnings with 20669ef0b394Smrg# the simple compiler test code. 20679ef0b394Smrgm4_defun([_LT_COMPILER_BOILERPLATE], 20689ef0b394Smrg[m4_require([_LT_DECL_SED])dnl 20699ef0b394Smrgac_outfile=conftest.$ac_objext 20709ef0b394Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 20719ef0b394Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 20729ef0b394Smrg_lt_compiler_boilerplate=`cat conftest.err` 20739ef0b394Smrg$RM conftest* 20749ef0b394Smrg])# _LT_COMPILER_BOILERPLATE 2075266e564dSmrg 2076266e564dSmrg 20779ef0b394Smrg# _LT_LINKER_BOILERPLATE 20789ef0b394Smrg# ---------------------- 20799ef0b394Smrg# Check for linker boilerplate output or warnings with 20809ef0b394Smrg# the simple link test code. 20819ef0b394Smrgm4_defun([_LT_LINKER_BOILERPLATE], 20829ef0b394Smrg[m4_require([_LT_DECL_SED])dnl 20839ef0b394Smrgac_outfile=conftest.$ac_objext 20849ef0b394Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 20859ef0b394Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 20869ef0b394Smrg_lt_linker_boilerplate=`cat conftest.err` 20879ef0b394Smrg$RM -r conftest* 20889ef0b394Smrg])# _LT_LINKER_BOILERPLATE 2089698f425bSmrg 20909ef0b394Smrg# _LT_REQUIRED_DARWIN_CHECKS 20919ef0b394Smrg# ------------------------- 20929ef0b394Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 20939ef0b394Smrg case $host_os in 20949ef0b394Smrg rhapsody* | darwin*) 20959ef0b394Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 20969ef0b394Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 20979ef0b394Smrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 20989ef0b394Smrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 20999ef0b394Smrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 21009ef0b394Smrg _LT_DECL([], [DSYMUTIL], [1], 21019ef0b394Smrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 21029ef0b394Smrg _LT_DECL([], [NMEDIT], [1], 21039ef0b394Smrg [Tool to change global to local symbols on Mac OS X]) 21049ef0b394Smrg _LT_DECL([], [LIPO], [1], 21059ef0b394Smrg [Tool to manipulate fat objects and archives on Mac OS X]) 21069ef0b394Smrg _LT_DECL([], [OTOOL], [1], 21079ef0b394Smrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 21089ef0b394Smrg _LT_DECL([], [OTOOL64], [1], 21099ef0b394Smrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 2110698f425bSmrg 21119ef0b394Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 21129ef0b394Smrg [lt_cv_apple_cc_single_mod=no 21139ef0b394Smrg if test -z "${LT_MULTI_MODULE}"; then 21149ef0b394Smrg # By default we will add the -single_module flag. You can override 21159ef0b394Smrg # by either setting the environment variable LT_MULTI_MODULE 21169ef0b394Smrg # non-empty at configure time, or by adding -multi_module to the 21179ef0b394Smrg # link flags. 21189ef0b394Smrg rm -rf libconftest.dylib* 21199ef0b394Smrg echo "int foo(void){return 1;}" > conftest.c 21209ef0b394Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 21219ef0b394Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 21229ef0b394Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 21239ef0b394Smrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 21249ef0b394Smrg _lt_result=$? 21259ef0b394Smrg if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then 21269ef0b394Smrg lt_cv_apple_cc_single_mod=yes 21279ef0b394Smrg else 21289ef0b394Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 21299ef0b394Smrg fi 21309ef0b394Smrg rm -rf libconftest.dylib* 21319ef0b394Smrg rm -f conftest.* 21329ef0b394Smrg fi]) 21339ef0b394Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 21349ef0b394Smrg [lt_cv_ld_exported_symbols_list], 21359ef0b394Smrg [lt_cv_ld_exported_symbols_list=no 21369ef0b394Smrg save_LDFLAGS=$LDFLAGS 21379ef0b394Smrg echo "_main" > conftest.sym 21389ef0b394Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 21399ef0b394Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 21409ef0b394Smrg [lt_cv_ld_exported_symbols_list=yes], 21419ef0b394Smrg [lt_cv_ld_exported_symbols_list=no]) 21429ef0b394Smrg LDFLAGS="$save_LDFLAGS" 21439ef0b394Smrg ]) 21449ef0b394Smrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 21459ef0b394Smrg [lt_cv_ld_force_load=no 21469ef0b394Smrg cat > conftest.c << _LT_EOF 21479ef0b394Smrgint forced_loaded() { return 2;} 21489ef0b394Smrg_LT_EOF 21499ef0b394Smrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 21509ef0b394Smrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 21519ef0b394Smrg echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 21529ef0b394Smrg $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 21539ef0b394Smrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 21549ef0b394Smrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 21559ef0b394Smrg cat > conftest.c << _LT_EOF 21569ef0b394Smrgint main() { return 0;} 21579ef0b394Smrg_LT_EOF 21589ef0b394Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 21599ef0b394Smrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 21609ef0b394Smrg _lt_result=$? 21619ef0b394Smrg if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then 21629ef0b394Smrg lt_cv_ld_force_load=yes 21639ef0b394Smrg else 21649ef0b394Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 21659ef0b394Smrg fi 21669ef0b394Smrg rm -f conftest.err libconftest.a conftest conftest.c 21679ef0b394Smrg rm -rf conftest.dSYM 21689ef0b394Smrg ]) 21699ef0b394Smrg case $host_os in 21709ef0b394Smrg rhapsody* | darwin1.[[012]]) 21719ef0b394Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 21729ef0b394Smrg darwin1.*) 21739ef0b394Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 21749ef0b394Smrg darwin*) # darwin 5.x on 21759ef0b394Smrg # if running on 10.5 or later, the deployment target defaults 21769ef0b394Smrg # to the OS version, if on x86, and 10.4, the deployment 21779ef0b394Smrg # target defaults to 10.4. Don't you love it? 21789ef0b394Smrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 21799ef0b394Smrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 21809ef0b394Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 21819ef0b394Smrg 10.[[012]]*) 21829ef0b394Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 21839ef0b394Smrg 10.*) 21849ef0b394Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 21859ef0b394Smrg esac 2186266e564dSmrg ;; 21879ef0b394Smrg esac 21889ef0b394Smrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 21899ef0b394Smrg _lt_dar_single_mod='$single_module' 21909ef0b394Smrg fi 21919ef0b394Smrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 21929ef0b394Smrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 21939ef0b394Smrg else 21949ef0b394Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 21959ef0b394Smrg fi 21969ef0b394Smrg if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then 21979ef0b394Smrg _lt_dsymutil='~$DSYMUTIL $lib || :' 21989ef0b394Smrg else 21999ef0b394Smrg _lt_dsymutil= 22009ef0b394Smrg fi 2201266e564dSmrg ;; 2202c5629e66Smrg esac 22039ef0b394Smrg]) 22049ef0b394Smrg 22059ef0b394Smrg 22069ef0b394Smrg# _LT_DARWIN_LINKER_FEATURES 22079ef0b394Smrg# -------------------------- 22089ef0b394Smrg# Checks for linker and compiler features on darwin 22099ef0b394Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 22109ef0b394Smrg[ 22119ef0b394Smrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 22129ef0b394Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 22139ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=no 22149ef0b394Smrg _LT_TAGVAR(hardcode_automatic, $1)=yes 22159ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 22169ef0b394Smrg if test "$lt_cv_ld_force_load" = "yes"; then 22179ef0b394Smrg _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\"`' 22189ef0b394Smrg else 22199ef0b394Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 22209ef0b394Smrg fi 22219ef0b394Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 22229ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 22239ef0b394Smrg case $cc_basename in 22249ef0b394Smrg ifort*) _lt_dar_can_shared=yes ;; 22259ef0b394Smrg *) _lt_dar_can_shared=$GCC ;; 22269ef0b394Smrg esac 22279ef0b394Smrg if test "$_lt_dar_can_shared" = "yes"; then 22289ef0b394Smrg output_verbose_link_cmd=func_echo_all 22299ef0b394Smrg _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}" 22309ef0b394Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 22319ef0b394Smrg _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}" 22329ef0b394Smrg _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}" 22339ef0b394Smrg m4_if([$1], [CXX], 22349ef0b394Smrg[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 22359ef0b394Smrg _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}" 22369ef0b394Smrg _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}" 2237266e564dSmrg fi 22389ef0b394Smrg],[]) 22399ef0b394Smrg else 22409ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 22419ef0b394Smrg fi 22429ef0b394Smrg]) 22439ef0b394Smrg 22449ef0b394Smrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 22459ef0b394Smrg# ---------------------------------- 22469ef0b394Smrg# Links a minimal program and checks the executable 22479ef0b394Smrg# for the system default hardcoded library path. In most cases, 22489ef0b394Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 22499ef0b394Smrg# the location of the communication and MPI libs are included too. 22509ef0b394Smrg# If we don't find anything, use the default library path according 22519ef0b394Smrg# to the aix ld manual. 22529ef0b394Smrg# Store the results from the different compilers for each TAGNAME. 22539ef0b394Smrg# Allow to override them for all tags through lt_cv_aix_libpath. 22549ef0b394Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 22559ef0b394Smrg[m4_require([_LT_DECL_SED])dnl 22569ef0b394Smrgif test "${lt_cv_aix_libpath+set}" = set; then 22579ef0b394Smrg aix_libpath=$lt_cv_aix_libpath 2258c5629e66Smrgelse 22599ef0b394Smrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 22609ef0b394Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 22619ef0b394Smrg lt_aix_libpath_sed='[ 22629ef0b394Smrg /Import File Strings/,/^$/ { 22639ef0b394Smrg /^0/ { 22649ef0b394Smrg s/^0 *\([^ ]*\) *$/\1/ 22659ef0b394Smrg p 22669ef0b394Smrg } 22679ef0b394Smrg }]' 22689ef0b394Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 22699ef0b394Smrg # Check for a 64-bit object if we didn't find anything. 22709ef0b394Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 22719ef0b394Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 22729ef0b394Smrg fi],[]) 22739ef0b394Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 22749ef0b394Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" 22759ef0b394Smrg fi 22769ef0b394Smrg ]) 22779ef0b394Smrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 2278266e564dSmrgfi 22799ef0b394Smrg])# _LT_SYS_MODULE_PATH_AIX 2280266e564dSmrg 2281266e564dSmrg 22829ef0b394Smrg# _LT_SHELL_INIT(ARG) 22839ef0b394Smrg# ------------------- 22849ef0b394Smrgm4_define([_LT_SHELL_INIT], 22859ef0b394Smrg[m4_divert_text([M4SH-INIT], [$1 22869ef0b394Smrg])])# _LT_SHELL_INIT 2287698f425bSmrg 2288698f425bSmrg 2289266e564dSmrg 22909ef0b394Smrg# _LT_PROG_ECHO_BACKSLASH 22919ef0b394Smrg# ----------------------- 22929ef0b394Smrg# Find how we can fake an echo command that does not interpret backslash. 22939ef0b394Smrg# In particular, with Autoconf 2.60 or later we add some code to the start 22949ef0b394Smrg# of the generated configure script which will find a shell with a builtin 22959ef0b394Smrg# printf (which we can use as an echo command). 22969ef0b394Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 22979ef0b394Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 22989ef0b394SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 22999ef0b394SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 23009ef0b394Smrg 23019ef0b394SmrgAC_MSG_CHECKING([how to print strings]) 23029ef0b394Smrg# Test print first, because it will be a builtin if present. 23039ef0b394Smrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 23049ef0b394Smrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 23059ef0b394Smrg ECHO='print -r --' 23069ef0b394Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 23079ef0b394Smrg ECHO='printf %s\n' 23089ef0b394Smrgelse 23099ef0b394Smrg # Use this function as a fallback that always works. 23109ef0b394Smrg func_fallback_echo () 23119ef0b394Smrg { 23129ef0b394Smrg eval 'cat <<_LTECHO_EOF 23139ef0b394Smrg$[]1 23149ef0b394Smrg_LTECHO_EOF' 23159ef0b394Smrg } 23169ef0b394Smrg ECHO='func_fallback_echo' 23179ef0b394Smrgfi 2318266e564dSmrg 23199ef0b394Smrg# func_echo_all arg... 23209ef0b394Smrg# Invoke $ECHO with all args, space-separated. 23219ef0b394Smrgfunc_echo_all () 23229ef0b394Smrg{ 23239ef0b394Smrg $ECHO "$*" 23249ef0b394Smrg} 23259ef0b394Smrg 23269ef0b394Smrgcase "$ECHO" in 23279ef0b394Smrg printf*) AC_MSG_RESULT([printf]) ;; 23289ef0b394Smrg print*) AC_MSG_RESULT([print -r]) ;; 23299ef0b394Smrg *) AC_MSG_RESULT([cat]) ;; 2330c5629e66Smrgesac 2331266e564dSmrg 23329ef0b394Smrgm4_ifdef([_AS_DETECT_SUGGESTED], 23339ef0b394Smrg[_AS_DETECT_SUGGESTED([ 23349ef0b394Smrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 23359ef0b394Smrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 23369ef0b394Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 23379ef0b394Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 23389ef0b394Smrg PATH=/empty FPATH=/empty; export PATH FPATH 23399ef0b394Smrg test "X`printf %s $ECHO`" = "X$ECHO" \ 23409ef0b394Smrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 2341266e564dSmrg 23429ef0b394Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 23439ef0b394Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 23449ef0b394Smrg])# _LT_PROG_ECHO_BACKSLASH 2345266e564dSmrg 2346266e564dSmrg 23479ef0b394Smrg# _LT_WITH_SYSROOT 23489ef0b394Smrg# ---------------- 23499ef0b394SmrgAC_DEFUN([_LT_WITH_SYSROOT], 23509ef0b394Smrg[AC_MSG_CHECKING([for sysroot]) 23519ef0b394SmrgAC_ARG_WITH([sysroot], 23529ef0b394Smrg[ --with-sysroot[=DIR] Search for dependent libraries within DIR 23539ef0b394Smrg (or the compiler's sysroot if not specified).], 23549ef0b394Smrg[], [with_sysroot=no]) 23559ef0b394Smrg 23569ef0b394Smrgdnl lt_sysroot will always be passed unquoted. We quote it here 23579ef0b394Smrgdnl in case the user passed a directory name. 23589ef0b394Smrglt_sysroot= 23599ef0b394Smrgcase ${with_sysroot} in #( 23609ef0b394Smrg yes) 23619ef0b394Smrg if test "$GCC" = yes; then 23629ef0b394Smrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 23639ef0b394Smrg fi 23649ef0b394Smrg ;; #( 23659ef0b394Smrg /*) 23669ef0b394Smrg lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 23679ef0b394Smrg ;; #( 23689ef0b394Smrg no|'') 23699ef0b394Smrg ;; #( 23709ef0b394Smrg *) 23719ef0b394Smrg AC_MSG_RESULT([${with_sysroot}]) 23729ef0b394Smrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 23739ef0b394Smrg ;; 23749ef0b394Smrgesac 2375266e564dSmrg 23769ef0b394Smrg AC_MSG_RESULT([${lt_sysroot:-no}]) 23779ef0b394Smrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 23789ef0b394Smrg[dependent libraries, and in which our libraries should be installed.])]) 2379266e564dSmrg 23809ef0b394Smrg# _LT_ENABLE_LOCK 23819ef0b394Smrg# --------------- 23829ef0b394Smrgm4_defun([_LT_ENABLE_LOCK], 23839ef0b394Smrg[AC_ARG_ENABLE([libtool-lock], 23849ef0b394Smrg [AS_HELP_STRING([--disable-libtool-lock], 23859ef0b394Smrg [avoid locking (might break parallel builds)])]) 23869ef0b394Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 2387266e564dSmrg 23889ef0b394Smrg# Some flags need to be propagated to the compiler or linker for good 23899ef0b394Smrg# libtool support. 23909ef0b394Smrgcase $host in 23919ef0b394Smrgia64-*-hpux*) 23929ef0b394Smrg # Find out which ABI we are using. 23939ef0b394Smrg echo 'int i;' > conftest.$ac_ext 23949ef0b394Smrg if AC_TRY_EVAL(ac_compile); then 23959ef0b394Smrg case `/usr/bin/file conftest.$ac_objext` in 23969ef0b394Smrg *ELF-32*) 23979ef0b394Smrg HPUX_IA64_MODE="32" 23989ef0b394Smrg ;; 23999ef0b394Smrg *ELF-64*) 24009ef0b394Smrg HPUX_IA64_MODE="64" 24019ef0b394Smrg ;; 24029ef0b394Smrg esac 2403c5629e66Smrg fi 24049ef0b394Smrg rm -rf conftest* 2405c5629e66Smrg ;; 24069ef0b394Smrg*-*-irix6*) 24079ef0b394Smrg # Find out which ABI we are using. 24089ef0b394Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 24099ef0b394Smrg if AC_TRY_EVAL(ac_compile); then 24109ef0b394Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 24119ef0b394Smrg case `/usr/bin/file conftest.$ac_objext` in 24129ef0b394Smrg *32-bit*) 24139ef0b394Smrg LD="${LD-ld} -melf32bsmip" 24149ef0b394Smrg ;; 24159ef0b394Smrg *N32*) 24169ef0b394Smrg LD="${LD-ld} -melf32bmipn32" 24179ef0b394Smrg ;; 24189ef0b394Smrg *64-bit*) 24199ef0b394Smrg LD="${LD-ld} -melf64bmip" 24209ef0b394Smrg ;; 24219ef0b394Smrg esac 24229ef0b394Smrg else 24239ef0b394Smrg case `/usr/bin/file conftest.$ac_objext` in 24249ef0b394Smrg *32-bit*) 24259ef0b394Smrg LD="${LD-ld} -32" 24269ef0b394Smrg ;; 24279ef0b394Smrg *N32*) 24289ef0b394Smrg LD="${LD-ld} -n32" 24299ef0b394Smrg ;; 24309ef0b394Smrg *64-bit*) 24319ef0b394Smrg LD="${LD-ld} -64" 24329ef0b394Smrg ;; 24339ef0b394Smrg esac 24349ef0b394Smrg fi 24359ef0b394Smrg fi 24369ef0b394Smrg rm -rf conftest* 2437698f425bSmrg ;; 2438698f425bSmrg 24399ef0b394Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 24409ef0b394Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 24419ef0b394Smrg # Find out which ABI we are using. 24429ef0b394Smrg echo 'int i;' > conftest.$ac_ext 24439ef0b394Smrg if AC_TRY_EVAL(ac_compile); then 24449ef0b394Smrg case `/usr/bin/file conftest.o` in 24459ef0b394Smrg *32-bit*) 24469ef0b394Smrg case $host in 24479ef0b394Smrg x86_64-*kfreebsd*-gnu) 24489ef0b394Smrg LD="${LD-ld} -m elf_i386_fbsd" 24499ef0b394Smrg ;; 24509ef0b394Smrg x86_64-*linux*) 24519ef0b394Smrg LD="${LD-ld} -m elf_i386" 24529ef0b394Smrg ;; 24539ef0b394Smrg ppc64-*linux*|powerpc64-*linux*) 24549ef0b394Smrg LD="${LD-ld} -m elf32ppclinux" 24559ef0b394Smrg ;; 24569ef0b394Smrg s390x-*linux*) 24579ef0b394Smrg LD="${LD-ld} -m elf_s390" 24589ef0b394Smrg ;; 24599ef0b394Smrg sparc64-*linux*) 24609ef0b394Smrg LD="${LD-ld} -m elf32_sparc" 24619ef0b394Smrg ;; 24629ef0b394Smrg esac 24639ef0b394Smrg ;; 24649ef0b394Smrg *64-bit*) 24659ef0b394Smrg case $host in 24669ef0b394Smrg x86_64-*kfreebsd*-gnu) 24679ef0b394Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 24689ef0b394Smrg ;; 24699ef0b394Smrg x86_64-*linux*) 24709ef0b394Smrg LD="${LD-ld} -m elf_x86_64" 24719ef0b394Smrg ;; 24729ef0b394Smrg ppc*-*linux*|powerpc*-*linux*) 24739ef0b394Smrg LD="${LD-ld} -m elf64ppc" 24749ef0b394Smrg ;; 24759ef0b394Smrg s390*-*linux*|s390*-*tpf*) 24769ef0b394Smrg LD="${LD-ld} -m elf64_s390" 24779ef0b394Smrg ;; 24789ef0b394Smrg sparc*-*linux*) 24799ef0b394Smrg LD="${LD-ld} -m elf64_sparc" 24809ef0b394Smrg ;; 24819ef0b394Smrg esac 24829ef0b394Smrg ;; 24839ef0b394Smrg esac 24849ef0b394Smrg fi 24859ef0b394Smrg rm -rf conftest* 2486c5629e66Smrg ;; 2487c5629e66Smrg 24889ef0b394Smrg*-*-sco3.2v5*) 24899ef0b394Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 24909ef0b394Smrg SAVE_CFLAGS="$CFLAGS" 24919ef0b394Smrg CFLAGS="$CFLAGS -belf" 24929ef0b394Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 24939ef0b394Smrg [AC_LANG_PUSH(C) 24949ef0b394Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 24959ef0b394Smrg AC_LANG_POP]) 24969ef0b394Smrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 24979ef0b394Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 24989ef0b394Smrg CFLAGS="$SAVE_CFLAGS" 24999ef0b394Smrg fi 25009ef0b394Smrg ;; 25019ef0b394Smrgsparc*-*solaris*) 25029ef0b394Smrg # Find out which ABI we are using. 25039ef0b394Smrg echo 'int i;' > conftest.$ac_ext 25049ef0b394Smrg if AC_TRY_EVAL(ac_compile); then 25059ef0b394Smrg case `/usr/bin/file conftest.o` in 25069ef0b394Smrg *64-bit*) 25079ef0b394Smrg case $lt_cv_prog_gnu_ld in 25089ef0b394Smrg yes*) LD="${LD-ld} -m elf64_sparc" ;; 25099ef0b394Smrg *) 25109ef0b394Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 25119ef0b394Smrg LD="${LD-ld} -64" 25129ef0b394Smrg fi 25139ef0b394Smrg ;; 25149ef0b394Smrg esac 2515c5629e66Smrg ;; 2516266e564dSmrg esac 2517266e564dSmrg fi 25189ef0b394Smrg rm -rf conftest* 2519c5629e66Smrg ;; 25209ef0b394Smrgesac 2521266e564dSmrg 25229ef0b394Smrgneed_locks="$enable_libtool_lock" 25239ef0b394Smrg])# _LT_ENABLE_LOCK 2524266e564dSmrg 2525c5629e66Smrg 25269ef0b394Smrg# _LT_PROG_AR 25279ef0b394Smrg# ----------- 25289ef0b394Smrgm4_defun([_LT_PROG_AR], 25299ef0b394Smrg[AC_CHECK_TOOLS(AR, [ar], false) 25309ef0b394Smrg: ${AR=ar} 25319ef0b394Smrg: ${AR_FLAGS=cru} 25329ef0b394Smrg_LT_DECL([], [AR], [1], [The archiver]) 25339ef0b394Smrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 25349ef0b394Smrg 25359ef0b394SmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 25369ef0b394Smrg [lt_cv_ar_at_file=no 25379ef0b394Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 25389ef0b394Smrg [echo conftest.$ac_objext > conftest.lst 25399ef0b394Smrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 25409ef0b394Smrg AC_TRY_EVAL([lt_ar_try]) 25419ef0b394Smrg if test "$ac_status" -eq 0; then 25429ef0b394Smrg # Ensure the archiver fails upon bogus file names. 25439ef0b394Smrg rm -f conftest.$ac_objext libconftest.a 25449ef0b394Smrg AC_TRY_EVAL([lt_ar_try]) 25459ef0b394Smrg if test "$ac_status" -ne 0; then 25469ef0b394Smrg lt_cv_ar_at_file=@ 25479ef0b394Smrg fi 25489ef0b394Smrg fi 25499ef0b394Smrg rm -f conftest.* libconftest.a 25509ef0b394Smrg ]) 25519ef0b394Smrg ]) 2552c5629e66Smrg 25539ef0b394Smrgif test "x$lt_cv_ar_at_file" = xno; then 25549ef0b394Smrg archiver_list_spec= 25559ef0b394Smrgelse 25569ef0b394Smrg archiver_list_spec=$lt_cv_ar_at_file 25579ef0b394Smrgfi 25589ef0b394Smrg_LT_DECL([], [archiver_list_spec], [1], 25599ef0b394Smrg [How to feed a file listing to the archiver]) 25609ef0b394Smrg])# _LT_PROG_AR 2561c5629e66Smrg 2562266e564dSmrg 25639ef0b394Smrg# _LT_CMD_OLD_ARCHIVE 25649ef0b394Smrg# ------------------- 25659ef0b394Smrgm4_defun([_LT_CMD_OLD_ARCHIVE], 25669ef0b394Smrg[_LT_PROG_AR 2567266e564dSmrg 25689ef0b394SmrgAC_CHECK_TOOL(STRIP, strip, :) 25699ef0b394Smrgtest -z "$STRIP" && STRIP=: 25709ef0b394Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 2571266e564dSmrg 25729ef0b394SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 25739ef0b394Smrgtest -z "$RANLIB" && RANLIB=: 25749ef0b394Smrg_LT_DECL([], [RANLIB], [1], 25759ef0b394Smrg [Commands used to install an old-style archive]) 2576266e564dSmrg 25779ef0b394Smrg# Determine commands to create old-style static archives. 25789ef0b394Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 25799ef0b394Smrgold_postinstall_cmds='chmod 644 $oldlib' 25809ef0b394Smrgold_postuninstall_cmds= 2581266e564dSmrg 25829ef0b394Smrgif test -n "$RANLIB"; then 25839ef0b394Smrg case $host_os in 25849ef0b394Smrg openbsd*) 25859ef0b394Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 25869ef0b394Smrg ;; 25879ef0b394Smrg *) 25889ef0b394Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 25899ef0b394Smrg ;; 25909ef0b394Smrg esac 25919ef0b394Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 25929ef0b394Smrgfi 2593266e564dSmrg 25949ef0b394Smrgcase $host_os in 25959ef0b394Smrg darwin*) 25969ef0b394Smrg lock_old_archive_extraction=yes ;; 25979ef0b394Smrg *) 25989ef0b394Smrg lock_old_archive_extraction=no ;; 2599c5629e66Smrgesac 26009ef0b394Smrg_LT_DECL([], [old_postinstall_cmds], [2]) 26019ef0b394Smrg_LT_DECL([], [old_postuninstall_cmds], [2]) 26029ef0b394Smrg_LT_TAGDECL([], [old_archive_cmds], [2], 26039ef0b394Smrg [Commands used to build an old-style archive]) 26049ef0b394Smrg_LT_DECL([], [lock_old_archive_extraction], [0], 26059ef0b394Smrg [Whether to use a lock for old archive extraction]) 26069ef0b394Smrg])# _LT_CMD_OLD_ARCHIVE 2607266e564dSmrg 2608266e564dSmrg 26099ef0b394Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 26109ef0b394Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 26119ef0b394Smrg# ---------------------------------------------------------------- 26129ef0b394Smrg# Check whether the given compiler option works 26139ef0b394SmrgAC_DEFUN([_LT_COMPILER_OPTION], 26149ef0b394Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 26159ef0b394Smrgm4_require([_LT_DECL_SED])dnl 26169ef0b394SmrgAC_CACHE_CHECK([$1], [$2], 26179ef0b394Smrg [$2=no 26189ef0b394Smrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 26199ef0b394Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 26209ef0b394Smrg lt_compiler_flag="$3" 26219ef0b394Smrg # Insert the option either (1) after the last *FLAGS variable, or 26229ef0b394Smrg # (2) before a word containing "conftest.", or (3) at the end. 26239ef0b394Smrg # Note that $ac_compile itself does not contain backslashes and begins 26249ef0b394Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 26259ef0b394Smrg # The option is referenced via a variable to avoid confusing sed. 26269ef0b394Smrg lt_compile=`echo "$ac_compile" | $SED \ 26279ef0b394Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 26289ef0b394Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 26299ef0b394Smrg -e 's:$: $lt_compiler_flag:'` 26309ef0b394Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 26319ef0b394Smrg (eval "$lt_compile" 2>conftest.err) 26329ef0b394Smrg ac_status=$? 26339ef0b394Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 26349ef0b394Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 26359ef0b394Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 26369ef0b394Smrg # The compiler can only warn and ignore the option if not recognized 26379ef0b394Smrg # So say no if there are warnings other than the usual output. 26389ef0b394Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 26399ef0b394Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 26409ef0b394Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 26419ef0b394Smrg $2=yes 26429ef0b394Smrg fi 26439ef0b394Smrg fi 26449ef0b394Smrg $RM conftest* 26459ef0b394Smrg]) 2646698f425bSmrg 26479ef0b394Smrgif test x"[$]$2" = xyes; then 26489ef0b394Smrg m4_if([$5], , :, [$5]) 2649698f425bSmrgelse 26509ef0b394Smrg m4_if([$6], , :, [$6]) 2651698f425bSmrgfi 26529ef0b394Smrg])# _LT_COMPILER_OPTION 2653266e564dSmrg 26549ef0b394Smrg# Old name: 26559ef0b394SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 2656698f425bSmrgdnl aclocal-1.4 backwards compatibility: 26579ef0b394Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 2658266e564dSmrg 2659698f425bSmrg 26609ef0b394Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 26619ef0b394Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 26629ef0b394Smrg# ---------------------------------------------------- 26639ef0b394Smrg# Check whether the given linker option works 26649ef0b394SmrgAC_DEFUN([_LT_LINKER_OPTION], 26659ef0b394Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 26669ef0b394Smrgm4_require([_LT_DECL_SED])dnl 26679ef0b394SmrgAC_CACHE_CHECK([$1], [$2], 26689ef0b394Smrg [$2=no 26699ef0b394Smrg save_LDFLAGS="$LDFLAGS" 26709ef0b394Smrg LDFLAGS="$LDFLAGS $3" 26719ef0b394Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 26729ef0b394Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 26739ef0b394Smrg # The linker can only warn and ignore the option if not recognized 26749ef0b394Smrg # So say no if there are warnings 26759ef0b394Smrg if test -s conftest.err; then 26769ef0b394Smrg # Append any errors to the config.log. 26779ef0b394Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 26789ef0b394Smrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 26799ef0b394Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 26809ef0b394Smrg if diff conftest.exp conftest.er2 >/dev/null; then 26819ef0b394Smrg $2=yes 26829ef0b394Smrg fi 26839ef0b394Smrg else 26849ef0b394Smrg $2=yes 26859ef0b394Smrg fi 26869ef0b394Smrg fi 26879ef0b394Smrg $RM -r conftest* 26889ef0b394Smrg LDFLAGS="$save_LDFLAGS" 26899ef0b394Smrg]) 26909ef0b394Smrg 26919ef0b394Smrgif test x"[$]$2" = xyes; then 26929ef0b394Smrg m4_if([$4], , :, [$4]) 26939ef0b394Smrgelse 26949ef0b394Smrg m4_if([$5], , :, [$5]) 26959ef0b394Smrgfi 26969ef0b394Smrg])# _LT_LINKER_OPTION 2697266e564dSmrg 2698698f425bSmrg# Old name: 26999ef0b394SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 2700698f425bSmrgdnl aclocal-1.4 backwards compatibility: 27019ef0b394Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 2702266e564dSmrg 2703c5629e66Smrg 27049ef0b394Smrg# LT_CMD_MAX_LEN 27059ef0b394Smrg#--------------- 27069ef0b394SmrgAC_DEFUN([LT_CMD_MAX_LEN], 27079ef0b394Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 27089ef0b394Smrg# find the maximum length of command line arguments 27099ef0b394SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 27109ef0b394SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 27119ef0b394Smrg i=0 27129ef0b394Smrg teststring="ABCD" 2713266e564dSmrg 27149ef0b394Smrg case $build_os in 27159ef0b394Smrg msdosdjgpp*) 27169ef0b394Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 27179ef0b394Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 27189ef0b394Smrg # during glob expansion). Even if it were fixed, the result of this 27199ef0b394Smrg # check would be larger than it should be. 27209ef0b394Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 27219ef0b394Smrg ;; 2722266e564dSmrg 27239ef0b394Smrg gnu*) 27249ef0b394Smrg # Under GNU Hurd, this test is not required because there is 27259ef0b394Smrg # no limit to the length of command line arguments. 27269ef0b394Smrg # Libtool will interpret -1 as no limit whatsoever 27279ef0b394Smrg lt_cv_sys_max_cmd_len=-1; 27289ef0b394Smrg ;; 2729266e564dSmrg 27309ef0b394Smrg cygwin* | mingw* | cegcc*) 27319ef0b394Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 27329ef0b394Smrg # about 5 minutes as the teststring grows exponentially. 27339ef0b394Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 27349ef0b394Smrg # you end up with a "frozen" computer, even though with patience 27359ef0b394Smrg # the test eventually succeeds (with a max line length of 256k). 27369ef0b394Smrg # Instead, let's just punt: use the minimum linelength reported by 27379ef0b394Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 27389ef0b394Smrg lt_cv_sys_max_cmd_len=8192; 27399ef0b394Smrg ;; 2740266e564dSmrg 27419ef0b394Smrg mint*) 27429ef0b394Smrg # On MiNT this can take a long time and run out of memory. 27439ef0b394Smrg lt_cv_sys_max_cmd_len=8192; 27449ef0b394Smrg ;; 2745266e564dSmrg 27469ef0b394Smrg amigaos*) 27479ef0b394Smrg # On AmigaOS with pdksh, this test takes hours, literally. 27489ef0b394Smrg # So we just punt and use a minimum line length of 8192. 27499ef0b394Smrg lt_cv_sys_max_cmd_len=8192; 27509ef0b394Smrg ;; 2751266e564dSmrg 27529ef0b394Smrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 27539ef0b394Smrg # This has been around since 386BSD, at least. Likely further. 27549ef0b394Smrg if test -x /sbin/sysctl; then 27559ef0b394Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 27569ef0b394Smrg elif test -x /usr/sbin/sysctl; then 27579ef0b394Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 27589ef0b394Smrg else 27599ef0b394Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 27609ef0b394Smrg fi 27619ef0b394Smrg # And add a safety zone 27629ef0b394Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 27639ef0b394Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 27649ef0b394Smrg ;; 2765266e564dSmrg 27669ef0b394Smrg interix*) 27679ef0b394Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 27689ef0b394Smrg lt_cv_sys_max_cmd_len=196608 27699ef0b394Smrg ;; 2770266e564dSmrg 27719ef0b394Smrg osf*) 27729ef0b394Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 27739ef0b394Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 27749ef0b394Smrg # nice to cause kernel panics so lets avoid the loop below. 27759ef0b394Smrg # First set a reasonable default. 27769ef0b394Smrg lt_cv_sys_max_cmd_len=16384 27779ef0b394Smrg # 27789ef0b394Smrg if test -x /sbin/sysconfig; then 27799ef0b394Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 27809ef0b394Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 27819ef0b394Smrg esac 27829ef0b394Smrg fi 27839ef0b394Smrg ;; 27849ef0b394Smrg sco3.2v5*) 27859ef0b394Smrg lt_cv_sys_max_cmd_len=102400 27869ef0b394Smrg ;; 27879ef0b394Smrg sysv5* | sco5v6* | sysv4.2uw2*) 27889ef0b394Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 27899ef0b394Smrg if test -n "$kargmax"; then 27909ef0b394Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 27919ef0b394Smrg else 27929ef0b394Smrg lt_cv_sys_max_cmd_len=32768 27939ef0b394Smrg fi 27949ef0b394Smrg ;; 27959ef0b394Smrg *) 27969ef0b394Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 27979ef0b394Smrg if test -n "$lt_cv_sys_max_cmd_len"; then 27989ef0b394Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 27999ef0b394Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 28009ef0b394Smrg else 28019ef0b394Smrg # Make teststring a little bigger before we do anything with it. 28029ef0b394Smrg # a 1K string should be a reasonable start. 28039ef0b394Smrg for i in 1 2 3 4 5 6 7 8 ; do 28049ef0b394Smrg teststring=$teststring$teststring 28059ef0b394Smrg done 28069ef0b394Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 28079ef0b394Smrg # If test is not a shell built-in, we'll probably end up computing a 28089ef0b394Smrg # maximum length that is only half of the actual maximum length, but 28099ef0b394Smrg # we can't tell. 28109ef0b394Smrg while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ 28119ef0b394Smrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 28129ef0b394Smrg test $i != 17 # 1/2 MB should be enough 28139ef0b394Smrg do 28149ef0b394Smrg i=`expr $i + 1` 28159ef0b394Smrg teststring=$teststring$teststring 28169ef0b394Smrg done 28179ef0b394Smrg # Only check the string length outside the loop. 28189ef0b394Smrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 28199ef0b394Smrg teststring= 28209ef0b394Smrg # Add a significant safety factor because C++ compilers can tack on 28219ef0b394Smrg # massive amounts of additional arguments before passing them to the 28229ef0b394Smrg # linker. It appears as though 1/2 is a usable value. 28239ef0b394Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 28249ef0b394Smrg fi 28259ef0b394Smrg ;; 28269ef0b394Smrg esac 28279ef0b394Smrg]) 28289ef0b394Smrgif test -n $lt_cv_sys_max_cmd_len ; then 28299ef0b394Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 28309ef0b394Smrgelse 28319ef0b394Smrg AC_MSG_RESULT(none) 28329ef0b394Smrgfi 28339ef0b394Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 28349ef0b394Smrg_LT_DECL([], [max_cmd_len], [0], 28359ef0b394Smrg [What is the maximum length of a command?]) 28369ef0b394Smrg])# LT_CMD_MAX_LEN 2837266e564dSmrg 28389ef0b394Smrg# Old name: 28399ef0b394SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 28409ef0b394Smrgdnl aclocal-1.4 backwards compatibility: 28419ef0b394Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 2842266e564dSmrg 2843266e564dSmrg 28449ef0b394Smrg# _LT_HEADER_DLFCN 28459ef0b394Smrg# ---------------- 28469ef0b394Smrgm4_defun([_LT_HEADER_DLFCN], 28479ef0b394Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 28489ef0b394Smrg])# _LT_HEADER_DLFCN 2849266e564dSmrg 2850266e564dSmrg 28519ef0b394Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 28529ef0b394Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 28539ef0b394Smrg# ---------------------------------------------------------------- 28549ef0b394Smrgm4_defun([_LT_TRY_DLOPEN_SELF], 28559ef0b394Smrg[m4_require([_LT_HEADER_DLFCN])dnl 28569ef0b394Smrgif test "$cross_compiling" = yes; then : 28579ef0b394Smrg [$4] 28589ef0b394Smrgelse 28599ef0b394Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 28609ef0b394Smrg lt_status=$lt_dlunknown 28619ef0b394Smrg cat > conftest.$ac_ext <<_LT_EOF 28629ef0b394Smrg[#line $LINENO "configure" 28639ef0b394Smrg#include "confdefs.h" 2864266e564dSmrg 28659ef0b394Smrg#if HAVE_DLFCN_H 28669ef0b394Smrg#include <dlfcn.h> 28679ef0b394Smrg#endif 2868266e564dSmrg 28699ef0b394Smrg#include <stdio.h> 2870266e564dSmrg 28719ef0b394Smrg#ifdef RTLD_GLOBAL 28729ef0b394Smrg# define LT_DLGLOBAL RTLD_GLOBAL 28739ef0b394Smrg#else 28749ef0b394Smrg# ifdef DL_GLOBAL 28759ef0b394Smrg# define LT_DLGLOBAL DL_GLOBAL 28769ef0b394Smrg# else 28779ef0b394Smrg# define LT_DLGLOBAL 0 28789ef0b394Smrg# endif 2879698f425bSmrg#endif 2880266e564dSmrg 28819ef0b394Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 28829ef0b394Smrg find out it does not work in some platform. */ 28839ef0b394Smrg#ifndef LT_DLLAZY_OR_NOW 28849ef0b394Smrg# ifdef RTLD_LAZY 28859ef0b394Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 28869ef0b394Smrg# else 28879ef0b394Smrg# ifdef DL_LAZY 28889ef0b394Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 28899ef0b394Smrg# else 28909ef0b394Smrg# ifdef RTLD_NOW 28919ef0b394Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 28929ef0b394Smrg# else 28939ef0b394Smrg# ifdef DL_NOW 28949ef0b394Smrg# define LT_DLLAZY_OR_NOW DL_NOW 28959ef0b394Smrg# else 28969ef0b394Smrg# define LT_DLLAZY_OR_NOW 0 28979ef0b394Smrg# endif 28989ef0b394Smrg# endif 28999ef0b394Smrg# endif 29009ef0b394Smrg# endif 2901698f425bSmrg#endif 2902266e564dSmrg 29039ef0b394Smrg/* When -fvisbility=hidden is used, assume the code has been annotated 29049ef0b394Smrg correspondingly for the symbols needed. */ 29059ef0b394Smrg#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 29069ef0b394Smrgint fnord () __attribute__((visibility("default"))); 29079ef0b394Smrg#endif 2908266e564dSmrg 29099ef0b394Smrgint fnord () { return 42; } 29109ef0b394Smrgint main () 2911698f425bSmrg{ 29129ef0b394Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 29139ef0b394Smrg int status = $lt_dlunknown; 2914c5629e66Smrg 29159ef0b394Smrg if (self) 29169ef0b394Smrg { 29179ef0b394Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 2918698f425bSmrg else 29199ef0b394Smrg { 29209ef0b394Smrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 29219ef0b394Smrg else puts (dlerror ()); 29229ef0b394Smrg } 29239ef0b394Smrg /* dlclose (self); */ 29249ef0b394Smrg } 2925c5629e66Smrg else 29269ef0b394Smrg puts (dlerror ()); 2927266e564dSmrg 29289ef0b394Smrg return status; 29299ef0b394Smrg}] 29309ef0b394Smrg_LT_EOF 29319ef0b394Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 29329ef0b394Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 29339ef0b394Smrg lt_status=$? 29349ef0b394Smrg case x$lt_status in 29359ef0b394Smrg x$lt_dlno_uscore) $1 ;; 29369ef0b394Smrg x$lt_dlneed_uscore) $2 ;; 29379ef0b394Smrg x$lt_dlunknown|x*) $3 ;; 29389ef0b394Smrg esac 29399ef0b394Smrg else : 29409ef0b394Smrg # compilation failed 29419ef0b394Smrg $3 2942698f425bSmrg fi 2943698f425bSmrgfi 29449ef0b394Smrgrm -fr conftest* 29459ef0b394Smrg])# _LT_TRY_DLOPEN_SELF 29469ef0b394Smrg 29479ef0b394Smrg 29489ef0b394Smrg# LT_SYS_DLOPEN_SELF 29499ef0b394Smrg# ------------------ 29509ef0b394SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 29519ef0b394Smrg[m4_require([_LT_HEADER_DLFCN])dnl 29529ef0b394Smrgif test "x$enable_dlopen" != xyes; then 29539ef0b394Smrg enable_dlopen=unknown 29549ef0b394Smrg enable_dlopen_self=unknown 29559ef0b394Smrg enable_dlopen_self_static=unknown 2956c5629e66Smrgelse 29579ef0b394Smrg lt_cv_dlopen=no 29589ef0b394Smrg lt_cv_dlopen_libs= 2959c5629e66Smrg 29609ef0b394Smrg case $host_os in 29619ef0b394Smrg beos*) 29629ef0b394Smrg lt_cv_dlopen="load_add_on" 29639ef0b394Smrg lt_cv_dlopen_libs= 29649ef0b394Smrg lt_cv_dlopen_self=yes 29659ef0b394Smrg ;; 2966266e564dSmrg 29679ef0b394Smrg mingw* | pw32* | cegcc*) 29689ef0b394Smrg lt_cv_dlopen="LoadLibrary" 29699ef0b394Smrg lt_cv_dlopen_libs= 29709ef0b394Smrg ;; 2971266e564dSmrg 29729ef0b394Smrg cygwin*) 29739ef0b394Smrg lt_cv_dlopen="dlopen" 29749ef0b394Smrg lt_cv_dlopen_libs= 29759ef0b394Smrg ;; 2976266e564dSmrg 29779ef0b394Smrg darwin*) 29789ef0b394Smrg # if libdl is installed we need to link against it 29799ef0b394Smrg AC_CHECK_LIB([dl], [dlopen], 29809ef0b394Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 29819ef0b394Smrg lt_cv_dlopen="dyld" 29829ef0b394Smrg lt_cv_dlopen_libs= 29839ef0b394Smrg lt_cv_dlopen_self=yes 29849ef0b394Smrg ]) 29859ef0b394Smrg ;; 2986266e564dSmrg 29879ef0b394Smrg *) 29889ef0b394Smrg AC_CHECK_FUNC([shl_load], 29899ef0b394Smrg [lt_cv_dlopen="shl_load"], 29909ef0b394Smrg [AC_CHECK_LIB([dld], [shl_load], 29919ef0b394Smrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 29929ef0b394Smrg [AC_CHECK_FUNC([dlopen], 29939ef0b394Smrg [lt_cv_dlopen="dlopen"], 29949ef0b394Smrg [AC_CHECK_LIB([dl], [dlopen], 29959ef0b394Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 29969ef0b394Smrg [AC_CHECK_LIB([svld], [dlopen], 29979ef0b394Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 29989ef0b394Smrg [AC_CHECK_LIB([dld], [dld_link], 29999ef0b394Smrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 30009ef0b394Smrg ]) 30019ef0b394Smrg ]) 30029ef0b394Smrg ]) 30039ef0b394Smrg ]) 30049ef0b394Smrg ]) 30059ef0b394Smrg ;; 30069ef0b394Smrg esac 3007266e564dSmrg 30089ef0b394Smrg if test "x$lt_cv_dlopen" != xno; then 30099ef0b394Smrg enable_dlopen=yes 30109ef0b394Smrg else 30119ef0b394Smrg enable_dlopen=no 30129ef0b394Smrg fi 3013266e564dSmrg 30149ef0b394Smrg case $lt_cv_dlopen in 30159ef0b394Smrg dlopen) 30169ef0b394Smrg save_CPPFLAGS="$CPPFLAGS" 30179ef0b394Smrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 30189ef0b394Smrg 30199ef0b394Smrg save_LDFLAGS="$LDFLAGS" 30209ef0b394Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 30219ef0b394Smrg 30229ef0b394Smrg save_LIBS="$LIBS" 30239ef0b394Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 30249ef0b394Smrg 30259ef0b394Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 30269ef0b394Smrg lt_cv_dlopen_self, [dnl 30279ef0b394Smrg _LT_TRY_DLOPEN_SELF( 30289ef0b394Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 30299ef0b394Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 30309ef0b394Smrg ]) 30319ef0b394Smrg 30329ef0b394Smrg if test "x$lt_cv_dlopen_self" = xyes; then 30339ef0b394Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 30349ef0b394Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 30359ef0b394Smrg lt_cv_dlopen_self_static, [dnl 30369ef0b394Smrg _LT_TRY_DLOPEN_SELF( 30379ef0b394Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 30389ef0b394Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 30399ef0b394Smrg ]) 30409ef0b394Smrg fi 30419ef0b394Smrg 30429ef0b394Smrg CPPFLAGS="$save_CPPFLAGS" 30439ef0b394Smrg LDFLAGS="$save_LDFLAGS" 30449ef0b394Smrg LIBS="$save_LIBS" 30459ef0b394Smrg ;; 30469ef0b394Smrg esac 30479ef0b394Smrg 30489ef0b394Smrg case $lt_cv_dlopen_self in 30499ef0b394Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 30509ef0b394Smrg *) enable_dlopen_self=unknown ;; 30519ef0b394Smrg esac 30529ef0b394Smrg 30539ef0b394Smrg case $lt_cv_dlopen_self_static in 30549ef0b394Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 30559ef0b394Smrg *) enable_dlopen_self_static=unknown ;; 30569ef0b394Smrg esac 30579ef0b394Smrgfi 30589ef0b394Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 30599ef0b394Smrg [Whether dlopen is supported]) 30609ef0b394Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 30619ef0b394Smrg [Whether dlopen of programs is supported]) 30629ef0b394Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 30639ef0b394Smrg [Whether dlopen of statically linked programs is supported]) 30649ef0b394Smrg])# LT_SYS_DLOPEN_SELF 30659ef0b394Smrg 30669ef0b394Smrg# Old name: 30679ef0b394SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 30689ef0b394Smrgdnl aclocal-1.4 backwards compatibility: 30699ef0b394Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 30709ef0b394Smrg 30719ef0b394Smrg 30729ef0b394Smrg# _LT_COMPILER_C_O([TAGNAME]) 30739ef0b394Smrg# --------------------------- 30749ef0b394Smrg# Check to see if options -c and -o are simultaneously supported by compiler. 30759ef0b394Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 30769ef0b394Smrgm4_defun([_LT_COMPILER_C_O], 30779ef0b394Smrg[m4_require([_LT_DECL_SED])dnl 30789ef0b394Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 30799ef0b394Smrgm4_require([_LT_TAG_COMPILER])dnl 30809ef0b394SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 30819ef0b394Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 30829ef0b394Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 30839ef0b394Smrg $RM -r conftest 2>/dev/null 30849ef0b394Smrg mkdir conftest 30859ef0b394Smrg cd conftest 30869ef0b394Smrg mkdir out 30879ef0b394Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 30889ef0b394Smrg 30899ef0b394Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 30909ef0b394Smrg # Insert the option either (1) after the last *FLAGS variable, or 30919ef0b394Smrg # (2) before a word containing "conftest.", or (3) at the end. 30929ef0b394Smrg # Note that $ac_compile itself does not contain backslashes and begins 30939ef0b394Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 30949ef0b394Smrg lt_compile=`echo "$ac_compile" | $SED \ 30959ef0b394Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 30969ef0b394Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 30979ef0b394Smrg -e 's:$: $lt_compiler_flag:'` 30989ef0b394Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 30999ef0b394Smrg (eval "$lt_compile" 2>out/conftest.err) 31009ef0b394Smrg ac_status=$? 31019ef0b394Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 31029ef0b394Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 31039ef0b394Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 31049ef0b394Smrg then 31059ef0b394Smrg # The compiler can only warn and ignore the option if not recognized 31069ef0b394Smrg # So say no if there are warnings 31079ef0b394Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 31089ef0b394Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 31099ef0b394Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 31109ef0b394Smrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 31119ef0b394Smrg fi 31129ef0b394Smrg fi 31139ef0b394Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 31149ef0b394Smrg $RM conftest* 31159ef0b394Smrg # SGI C++ compiler will create directory out/ii_files/ for 31169ef0b394Smrg # template instantiation 31179ef0b394Smrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 31189ef0b394Smrg $RM out/* && rmdir out 31199ef0b394Smrg cd .. 31209ef0b394Smrg $RM -r conftest 31219ef0b394Smrg $RM conftest* 31229ef0b394Smrg]) 31239ef0b394Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 31249ef0b394Smrg [Does compiler simultaneously support -c and -o options?]) 31259ef0b394Smrg])# _LT_COMPILER_C_O 31269ef0b394Smrg 31279ef0b394Smrg 31289ef0b394Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 31299ef0b394Smrg# ---------------------------------- 31309ef0b394Smrg# Check to see if we can do hard links to lock some files if needed 31319ef0b394Smrgm4_defun([_LT_COMPILER_FILE_LOCKS], 31329ef0b394Smrg[m4_require([_LT_ENABLE_LOCK])dnl 31339ef0b394Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 31349ef0b394Smrg_LT_COMPILER_C_O([$1]) 31359ef0b394Smrg 31369ef0b394Smrghard_links="nottested" 31379ef0b394Smrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 31389ef0b394Smrg # do not overwrite the value of need_locks provided by the user 31399ef0b394Smrg AC_MSG_CHECKING([if we can lock with hard links]) 31409ef0b394Smrg hard_links=yes 31419ef0b394Smrg $RM conftest* 31429ef0b394Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 31439ef0b394Smrg touch conftest.a 31449ef0b394Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 31459ef0b394Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 31469ef0b394Smrg AC_MSG_RESULT([$hard_links]) 31479ef0b394Smrg if test "$hard_links" = no; then 31489ef0b394Smrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 31499ef0b394Smrg need_locks=warn 31509ef0b394Smrg fi 31519ef0b394Smrgelse 31529ef0b394Smrg need_locks=no 31539ef0b394Smrgfi 31549ef0b394Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 31559ef0b394Smrg])# _LT_COMPILER_FILE_LOCKS 31569ef0b394Smrg 31579ef0b394Smrg 31589ef0b394Smrg# _LT_CHECK_OBJDIR 31599ef0b394Smrg# ---------------- 31609ef0b394Smrgm4_defun([_LT_CHECK_OBJDIR], 31619ef0b394Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 31629ef0b394Smrg[rm -f .libs 2>/dev/null 31639ef0b394Smrgmkdir .libs 2>/dev/null 31649ef0b394Smrgif test -d .libs; then 31659ef0b394Smrg lt_cv_objdir=.libs 31669ef0b394Smrgelse 31679ef0b394Smrg # MS-DOS does not allow filenames that begin with a dot. 31689ef0b394Smrg lt_cv_objdir=_libs 31699ef0b394Smrgfi 31709ef0b394Smrgrmdir .libs 2>/dev/null]) 31719ef0b394Smrgobjdir=$lt_cv_objdir 31729ef0b394Smrg_LT_DECL([], [objdir], [0], 31739ef0b394Smrg [The name of the directory that contains temporary libtool files])dnl 31749ef0b394Smrgm4_pattern_allow([LT_OBJDIR])dnl 31759ef0b394SmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 31769ef0b394Smrg [Define to the sub-directory in which libtool stores uninstalled libraries.]) 31779ef0b394Smrg])# _LT_CHECK_OBJDIR 31789ef0b394Smrg 31799ef0b394Smrg 31809ef0b394Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 31819ef0b394Smrg# -------------------------------------- 31829ef0b394Smrg# Check hardcoding attributes. 31839ef0b394Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 31849ef0b394Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 31859ef0b394Smrg_LT_TAGVAR(hardcode_action, $1)= 31869ef0b394Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 31879ef0b394Smrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 31889ef0b394Smrg test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 31899ef0b394Smrg 31909ef0b394Smrg # We can hardcode non-existent directories. 31919ef0b394Smrg if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 31929ef0b394Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 31939ef0b394Smrg # have to relink, otherwise we might link with an installed library 31949ef0b394Smrg # when we should be linking with a yet-to-be-installed one 31959ef0b394Smrg ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 31969ef0b394Smrg test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 31979ef0b394Smrg # Linking always hardcodes the temporary library directory. 31989ef0b394Smrg _LT_TAGVAR(hardcode_action, $1)=relink 31999ef0b394Smrg else 32009ef0b394Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 32019ef0b394Smrg _LT_TAGVAR(hardcode_action, $1)=immediate 32029ef0b394Smrg fi 32039ef0b394Smrgelse 32049ef0b394Smrg # We cannot hardcode anything, or else we can only hardcode existing 32059ef0b394Smrg # directories. 32069ef0b394Smrg _LT_TAGVAR(hardcode_action, $1)=unsupported 32079ef0b394Smrgfi 32089ef0b394SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 32099ef0b394Smrg 32109ef0b394Smrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 32119ef0b394Smrg test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 32129ef0b394Smrg # Fast installation is not supported 32139ef0b394Smrg enable_fast_install=no 32149ef0b394Smrgelif test "$shlibpath_overrides_runpath" = yes || 32159ef0b394Smrg test "$enable_shared" = no; then 32169ef0b394Smrg # Fast installation is not necessary 32179ef0b394Smrg enable_fast_install=needless 32189ef0b394Smrgfi 32199ef0b394Smrg_LT_TAGDECL([], [hardcode_action], [0], 32209ef0b394Smrg [How to hardcode a shared library path into an executable]) 32219ef0b394Smrg])# _LT_LINKER_HARDCODE_LIBPATH 32229ef0b394Smrg 32239ef0b394Smrg 32249ef0b394Smrg# _LT_CMD_STRIPLIB 32259ef0b394Smrg# ---------------- 32269ef0b394Smrgm4_defun([_LT_CMD_STRIPLIB], 32279ef0b394Smrg[m4_require([_LT_DECL_EGREP]) 32289ef0b394Smrgstriplib= 32299ef0b394Smrgold_striplib= 32309ef0b394SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 32319ef0b394Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 32329ef0b394Smrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 32339ef0b394Smrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 32349ef0b394Smrg AC_MSG_RESULT([yes]) 32359ef0b394Smrgelse 32369ef0b394Smrg# FIXME - insert some real tests, host_os isn't really good enough 32379ef0b394Smrg case $host_os in 32389ef0b394Smrg darwin*) 32399ef0b394Smrg if test -n "$STRIP" ; then 32409ef0b394Smrg striplib="$STRIP -x" 32419ef0b394Smrg old_striplib="$STRIP -S" 32429ef0b394Smrg AC_MSG_RESULT([yes]) 32439ef0b394Smrg else 32449ef0b394Smrg AC_MSG_RESULT([no]) 32459ef0b394Smrg fi 32469ef0b394Smrg ;; 32479ef0b394Smrg *) 32489ef0b394Smrg AC_MSG_RESULT([no]) 32499ef0b394Smrg ;; 32509ef0b394Smrg esac 32519ef0b394Smrgfi 32529ef0b394Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 32539ef0b394Smrg_LT_DECL([], [striplib], [1]) 32549ef0b394Smrg])# _LT_CMD_STRIPLIB 32559ef0b394Smrg 32569ef0b394Smrg 32579ef0b394Smrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 32589ef0b394Smrg# ----------------------------- 32599ef0b394Smrg# PORTME Fill in your ld.so characteristics 32609ef0b394Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 32619ef0b394Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 32629ef0b394Smrgm4_require([_LT_DECL_EGREP])dnl 32639ef0b394Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 32649ef0b394Smrgm4_require([_LT_DECL_OBJDUMP])dnl 32659ef0b394Smrgm4_require([_LT_DECL_SED])dnl 32669ef0b394Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 32679ef0b394SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 32689ef0b394Smrgm4_if([$1], 32699ef0b394Smrg [], [ 32709ef0b394Smrgif test "$GCC" = yes; then 32719ef0b394Smrg case $host_os in 32729ef0b394Smrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 32739ef0b394Smrg *) lt_awk_arg="/^libraries:/" ;; 32749ef0b394Smrg esac 32759ef0b394Smrg case $host_os in 32769ef0b394Smrg mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 32779ef0b394Smrg *) lt_sed_strip_eq="s,=/,/,g" ;; 32789ef0b394Smrg esac 32799ef0b394Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 32809ef0b394Smrg case $lt_search_path_spec in 32819ef0b394Smrg *\;*) 32829ef0b394Smrg # if the path contains ";" then we assume it to be the separator 32839ef0b394Smrg # otherwise default to the standard path separator (i.e. ":") - it is 32849ef0b394Smrg # assumed that no part of a normal pathname contains ";" but that should 32859ef0b394Smrg # okay in the real world where ";" in dirpaths is itself problematic. 32869ef0b394Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 32879ef0b394Smrg ;; 32889ef0b394Smrg *) 32899ef0b394Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 32909ef0b394Smrg ;; 32919ef0b394Smrg esac 32929ef0b394Smrg # Ok, now we have the path, separated by spaces, we can step through it 32939ef0b394Smrg # and add multilib dir if necessary. 32949ef0b394Smrg lt_tmp_lt_search_path_spec= 32959ef0b394Smrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 32969ef0b394Smrg for lt_sys_path in $lt_search_path_spec; do 32979ef0b394Smrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 32989ef0b394Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 32999ef0b394Smrg else 33009ef0b394Smrg test -d "$lt_sys_path" && \ 33019ef0b394Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 33029ef0b394Smrg fi 33039ef0b394Smrg done 33049ef0b394Smrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 33059ef0b394SmrgBEGIN {RS=" "; FS="/|\n";} { 33069ef0b394Smrg lt_foo=""; 33079ef0b394Smrg lt_count=0; 33089ef0b394Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 33099ef0b394Smrg if ($lt_i != "" && $lt_i != ".") { 33109ef0b394Smrg if ($lt_i == "..") { 33119ef0b394Smrg lt_count++; 33129ef0b394Smrg } else { 33139ef0b394Smrg if (lt_count == 0) { 33149ef0b394Smrg lt_foo="/" $lt_i lt_foo; 33159ef0b394Smrg } else { 33169ef0b394Smrg lt_count--; 33179ef0b394Smrg } 33189ef0b394Smrg } 33199ef0b394Smrg } 33209ef0b394Smrg } 33219ef0b394Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 33229ef0b394Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 33239ef0b394Smrg}'` 33249ef0b394Smrg # AWK program above erroneously prepends '/' to C:/dos/paths 33259ef0b394Smrg # for these hosts. 33269ef0b394Smrg case $host_os in 33279ef0b394Smrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 33289ef0b394Smrg $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 33299ef0b394Smrg esac 33309ef0b394Smrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 33319ef0b394Smrgelse 33329ef0b394Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 33339ef0b394Smrgfi]) 33349ef0b394Smrglibrary_names_spec= 33359ef0b394Smrglibname_spec='lib$name' 33369ef0b394Smrgsoname_spec= 33379ef0b394Smrgshrext_cmds=".so" 33389ef0b394Smrgpostinstall_cmds= 33399ef0b394Smrgpostuninstall_cmds= 33409ef0b394Smrgfinish_cmds= 33419ef0b394Smrgfinish_eval= 33429ef0b394Smrgshlibpath_var= 33439ef0b394Smrgshlibpath_overrides_runpath=unknown 33449ef0b394Smrgversion_type=none 33459ef0b394Smrgdynamic_linker="$host_os ld.so" 33469ef0b394Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 33479ef0b394Smrgneed_lib_prefix=unknown 33489ef0b394Smrghardcode_into_libs=no 33499ef0b394Smrg 33509ef0b394Smrg# when you set need_version to no, make sure it does not cause -set_version 33519ef0b394Smrg# flags to be left without arguments 33529ef0b394Smrgneed_version=unknown 33539ef0b394Smrg 33549ef0b394Smrgcase $host_os in 33559ef0b394Smrgaix3*) 33569ef0b394Smrg version_type=linux 33579ef0b394Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 33589ef0b394Smrg shlibpath_var=LIBPATH 33599ef0b394Smrg 33609ef0b394Smrg # AIX 3 has no versioning support, so we append a major version to the name. 33619ef0b394Smrg soname_spec='${libname}${release}${shared_ext}$major' 33629ef0b394Smrg ;; 33639ef0b394Smrg 33649ef0b394Smrgaix[[4-9]]*) 33659ef0b394Smrg version_type=linux 33669ef0b394Smrg need_lib_prefix=no 33679ef0b394Smrg need_version=no 33689ef0b394Smrg hardcode_into_libs=yes 33699ef0b394Smrg if test "$host_cpu" = ia64; then 33709ef0b394Smrg # AIX 5 supports IA64 33719ef0b394Smrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 33729ef0b394Smrg shlibpath_var=LD_LIBRARY_PATH 33739ef0b394Smrg else 33749ef0b394Smrg # With GCC up to 2.95.x, collect2 would create an import file 33759ef0b394Smrg # for dependence libraries. The import file would start with 33769ef0b394Smrg # the line `#! .'. This would cause the generated library to 33779ef0b394Smrg # depend on `.', always an invalid library. This was fixed in 33789ef0b394Smrg # development snapshots of GCC prior to 3.0. 33799ef0b394Smrg case $host_os in 33809ef0b394Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 33819ef0b394Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 33829ef0b394Smrg echo ' yes ' 33839ef0b394Smrg echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 33849ef0b394Smrg : 33859ef0b394Smrg else 33869ef0b394Smrg can_build_shared=no 33879ef0b394Smrg fi 3388698f425bSmrg ;; 33899ef0b394Smrg esac 33909ef0b394Smrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 33919ef0b394Smrg # soname into executable. Probably we can add versioning support to 33929ef0b394Smrg # collect2, so additional links can be useful in future. 33939ef0b394Smrg if test "$aix_use_runtimelinking" = yes; then 33949ef0b394Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 33959ef0b394Smrg # instead of lib<name>.a to let people know that these are not 33969ef0b394Smrg # typical AIX shared libraries. 33979ef0b394Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 33989ef0b394Smrg else 33999ef0b394Smrg # We preserve .a as extension for shared libraries through AIX4.2 34009ef0b394Smrg # and later when we are not doing run time linking. 34019ef0b394Smrg library_names_spec='${libname}${release}.a $libname.a' 34029ef0b394Smrg soname_spec='${libname}${release}${shared_ext}$major' 34039ef0b394Smrg fi 34049ef0b394Smrg shlibpath_var=LIBPATH 34059ef0b394Smrg fi 34069ef0b394Smrg ;; 34079ef0b394Smrg 34089ef0b394Smrgamigaos*) 34099ef0b394Smrg case $host_cpu in 34109ef0b394Smrg powerpc) 34119ef0b394Smrg # Since July 2007 AmigaOS4 officially supports .so libraries. 34129ef0b394Smrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 34139ef0b394Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 34149ef0b394Smrg ;; 34159ef0b394Smrg m68k) 34169ef0b394Smrg library_names_spec='$libname.ixlibrary $libname.a' 34179ef0b394Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 34189ef0b394Smrg 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' 34199ef0b394Smrg ;; 34209ef0b394Smrg esac 34219ef0b394Smrg ;; 34229ef0b394Smrg 34239ef0b394Smrgbeos*) 34249ef0b394Smrg library_names_spec='${libname}${shared_ext}' 34259ef0b394Smrg dynamic_linker="$host_os ld.so" 34269ef0b394Smrg shlibpath_var=LIBRARY_PATH 34279ef0b394Smrg ;; 34289ef0b394Smrg 34299ef0b394Smrgbsdi[[45]]*) 34309ef0b394Smrg version_type=linux 34319ef0b394Smrg need_version=no 34329ef0b394Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 34339ef0b394Smrg soname_spec='${libname}${release}${shared_ext}$major' 34349ef0b394Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 34359ef0b394Smrg shlibpath_var=LD_LIBRARY_PATH 34369ef0b394Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 34379ef0b394Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 34389ef0b394Smrg # the default ld.so.conf also contains /usr/contrib/lib and 34399ef0b394Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 34409ef0b394Smrg # libtool to hard-code these into programs 34419ef0b394Smrg ;; 34429ef0b394Smrg 34439ef0b394Smrgcygwin* | mingw* | pw32* | cegcc*) 34449ef0b394Smrg version_type=windows 34459ef0b394Smrg shrext_cmds=".dll" 34469ef0b394Smrg need_version=no 34479ef0b394Smrg need_lib_prefix=no 34489ef0b394Smrg 34499ef0b394Smrg case $GCC,$cc_basename in 34509ef0b394Smrg yes,*) 34519ef0b394Smrg # gcc 34529ef0b394Smrg library_names_spec='$libname.dll.a' 34539ef0b394Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 34549ef0b394Smrg postinstall_cmds='base_file=`basename \${file}`~ 34559ef0b394Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 34569ef0b394Smrg dldir=$destdir/`dirname \$dlpath`~ 34579ef0b394Smrg test -d \$dldir || mkdir -p \$dldir~ 34589ef0b394Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 34599ef0b394Smrg chmod a+x \$dldir/$dlname~ 34609ef0b394Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 34619ef0b394Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 34629ef0b394Smrg fi' 34639ef0b394Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 34649ef0b394Smrg dlpath=$dir/\$dldll~ 34659ef0b394Smrg $RM \$dlpath' 34669ef0b394Smrg shlibpath_overrides_runpath=yes 34679ef0b394Smrg 34689ef0b394Smrg case $host_os in 34699ef0b394Smrg cygwin*) 34709ef0b394Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 34719ef0b394Smrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 34729ef0b394Smrgm4_if([$1], [],[ 34739ef0b394Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 34749ef0b394Smrg ;; 34759ef0b394Smrg mingw* | cegcc*) 34769ef0b394Smrg # MinGW DLLs use traditional 'lib' prefix 34779ef0b394Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 34789ef0b394Smrg ;; 34799ef0b394Smrg pw32*) 34809ef0b394Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 34819ef0b394Smrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 34829ef0b394Smrg ;; 34839ef0b394Smrg esac 34849ef0b394Smrg dynamic_linker='Win32 ld.exe' 34859ef0b394Smrg ;; 34869ef0b394Smrg 34879ef0b394Smrg *,cl*) 34889ef0b394Smrg # Native MSVC 34899ef0b394Smrg libname_spec='$name' 34909ef0b394Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 34919ef0b394Smrg library_names_spec='${libname}.dll.lib' 34929ef0b394Smrg 34939ef0b394Smrg case $build_os in 34949ef0b394Smrg mingw*) 34959ef0b394Smrg sys_lib_search_path_spec= 34969ef0b394Smrg lt_save_ifs=$IFS 34979ef0b394Smrg IFS=';' 34989ef0b394Smrg for lt_path in $LIB 34999ef0b394Smrg do 35009ef0b394Smrg IFS=$lt_save_ifs 35019ef0b394Smrg # Let DOS variable expansion print the short 8.3 style file name. 35029ef0b394Smrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 35039ef0b394Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 35049ef0b394Smrg done 35059ef0b394Smrg IFS=$lt_save_ifs 35069ef0b394Smrg # Convert to MSYS style. 35079ef0b394Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 35089ef0b394Smrg ;; 35099ef0b394Smrg cygwin*) 35109ef0b394Smrg # Convert to unix form, then to dos form, then back to unix form 35119ef0b394Smrg # but this time dos style (no spaces!) so that the unix form looks 35129ef0b394Smrg # like /cygdrive/c/PROGRA~1:/cygdr... 35139ef0b394Smrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 35149ef0b394Smrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 35159ef0b394Smrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 35169ef0b394Smrg ;; 35179ef0b394Smrg *) 35189ef0b394Smrg sys_lib_search_path_spec="$LIB" 35199ef0b394Smrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 35209ef0b394Smrg # It is most probably a Windows format PATH. 35219ef0b394Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 35229ef0b394Smrg else 35239ef0b394Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 35249ef0b394Smrg fi 35259ef0b394Smrg # FIXME: find the short name or the path components, as spaces are 35269ef0b394Smrg # common. (e.g. "Program Files" -> "PROGRA~1") 35279ef0b394Smrg ;; 35289ef0b394Smrg esac 35299ef0b394Smrg 35309ef0b394Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 35319ef0b394Smrg postinstall_cmds='base_file=`basename \${file}`~ 35329ef0b394Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 35339ef0b394Smrg dldir=$destdir/`dirname \$dlpath`~ 35349ef0b394Smrg test -d \$dldir || mkdir -p \$dldir~ 35359ef0b394Smrg $install_prog $dir/$dlname \$dldir/$dlname' 35369ef0b394Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 35379ef0b394Smrg dlpath=$dir/\$dldll~ 35389ef0b394Smrg $RM \$dlpath' 35399ef0b394Smrg shlibpath_overrides_runpath=yes 35409ef0b394Smrg dynamic_linker='Win32 link.exe' 35419ef0b394Smrg ;; 35429ef0b394Smrg 35439ef0b394Smrg *) 35449ef0b394Smrg # Assume MSVC wrapper 35459ef0b394Smrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 35469ef0b394Smrg dynamic_linker='Win32 ld.exe' 35479ef0b394Smrg ;; 35489ef0b394Smrg esac 35499ef0b394Smrg # FIXME: first we should search . and the directory the executable is in 35509ef0b394Smrg shlibpath_var=PATH 35519ef0b394Smrg ;; 35529ef0b394Smrg 35539ef0b394Smrgdarwin* | rhapsody*) 35549ef0b394Smrg dynamic_linker="$host_os dyld" 35559ef0b394Smrg version_type=darwin 35569ef0b394Smrg need_lib_prefix=no 35579ef0b394Smrg need_version=no 35589ef0b394Smrg library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 35599ef0b394Smrg soname_spec='${libname}${release}${major}$shared_ext' 35609ef0b394Smrg shlibpath_overrides_runpath=yes 35619ef0b394Smrg shlibpath_var=DYLD_LIBRARY_PATH 35629ef0b394Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 35639ef0b394Smrgm4_if([$1], [],[ 35649ef0b394Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 35659ef0b394Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 35669ef0b394Smrg ;; 35679ef0b394Smrg 35689ef0b394Smrgdgux*) 35699ef0b394Smrg version_type=linux 35709ef0b394Smrg need_lib_prefix=no 35719ef0b394Smrg need_version=no 35729ef0b394Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 35739ef0b394Smrg soname_spec='${libname}${release}${shared_ext}$major' 35749ef0b394Smrg shlibpath_var=LD_LIBRARY_PATH 35759ef0b394Smrg ;; 35769ef0b394Smrg 35779ef0b394Smrgfreebsd1*) 35789ef0b394Smrg dynamic_linker=no 35799ef0b394Smrg ;; 35809ef0b394Smrg 35819ef0b394Smrgfreebsd* | dragonfly*) 35829ef0b394Smrg # DragonFly does not have aout. When/if they implement a new 35839ef0b394Smrg # versioning mechanism, adjust this. 35849ef0b394Smrg if test -x /usr/bin/objformat; then 35859ef0b394Smrg objformat=`/usr/bin/objformat` 35869ef0b394Smrg else 35879ef0b394Smrg case $host_os in 35889ef0b394Smrg freebsd[[123]]*) objformat=aout ;; 35899ef0b394Smrg *) objformat=elf ;; 35909ef0b394Smrg esac 35919ef0b394Smrg fi 35929ef0b394Smrg version_type=freebsd-$objformat 35939ef0b394Smrg case $version_type in 35949ef0b394Smrg freebsd-elf*) 35959ef0b394Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 35969ef0b394Smrg need_version=no 35979ef0b394Smrg need_lib_prefix=no 35989ef0b394Smrg ;; 35999ef0b394Smrg freebsd-*) 36009ef0b394Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 36019ef0b394Smrg need_version=yes 3602698f425bSmrg ;; 36039ef0b394Smrg esac 36049ef0b394Smrg shlibpath_var=LD_LIBRARY_PATH 36059ef0b394Smrg case $host_os in 36069ef0b394Smrg freebsd2*) 36079ef0b394Smrg shlibpath_overrides_runpath=yes 36089ef0b394Smrg ;; 36099ef0b394Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 36109ef0b394Smrg shlibpath_overrides_runpath=yes 36119ef0b394Smrg hardcode_into_libs=yes 36129ef0b394Smrg ;; 36139ef0b394Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 36149ef0b394Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 36159ef0b394Smrg shlibpath_overrides_runpath=no 36169ef0b394Smrg hardcode_into_libs=yes 36179ef0b394Smrg ;; 36189ef0b394Smrg *) # from 4.6 on, and DragonFly 36199ef0b394Smrg shlibpath_overrides_runpath=yes 36209ef0b394Smrg hardcode_into_libs=yes 36219ef0b394Smrg ;; 36229ef0b394Smrg esac 36239ef0b394Smrg ;; 36249ef0b394Smrg 36259ef0b394Smrggnu*) 36269ef0b394Smrg version_type=linux 36279ef0b394Smrg need_lib_prefix=no 36289ef0b394Smrg need_version=no 36299ef0b394Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 36309ef0b394Smrg soname_spec='${libname}${release}${shared_ext}$major' 36319ef0b394Smrg shlibpath_var=LD_LIBRARY_PATH 36329ef0b394Smrg hardcode_into_libs=yes 36339ef0b394Smrg ;; 36349ef0b394Smrg 36359ef0b394Smrghaiku*) 36369ef0b394Smrg version_type=linux 36379ef0b394Smrg need_lib_prefix=no 36389ef0b394Smrg need_version=no 36399ef0b394Smrg dynamic_linker="$host_os runtime_loader" 36409ef0b394Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 36419ef0b394Smrg soname_spec='${libname}${release}${shared_ext}$major' 36429ef0b394Smrg shlibpath_var=LIBRARY_PATH 36439ef0b394Smrg shlibpath_overrides_runpath=yes 36449ef0b394Smrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 36459ef0b394Smrg hardcode_into_libs=yes 36469ef0b394Smrg ;; 36479ef0b394Smrg 36489ef0b394Smrghpux9* | hpux10* | hpux11*) 36499ef0b394Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 36509ef0b394Smrg # link against other versions. 36519ef0b394Smrg version_type=sunos 36529ef0b394Smrg need_lib_prefix=no 36539ef0b394Smrg need_version=no 36549ef0b394Smrg case $host_cpu in 36559ef0b394Smrg ia64*) 36569ef0b394Smrg shrext_cmds='.so' 36579ef0b394Smrg hardcode_into_libs=yes 36589ef0b394Smrg dynamic_linker="$host_os dld.so" 36599ef0b394Smrg shlibpath_var=LD_LIBRARY_PATH 36609ef0b394Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 36619ef0b394Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 36629ef0b394Smrg soname_spec='${libname}${release}${shared_ext}$major' 36639ef0b394Smrg if test "X$HPUX_IA64_MODE" = X32; then 36649ef0b394Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 36659ef0b394Smrg else 36669ef0b394Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 36679ef0b394Smrg fi 36689ef0b394Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 36699ef0b394Smrg ;; 36709ef0b394Smrg hppa*64*) 36719ef0b394Smrg shrext_cmds='.sl' 36729ef0b394Smrg hardcode_into_libs=yes 36739ef0b394Smrg dynamic_linker="$host_os dld.sl" 36749ef0b394Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 36759ef0b394Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 36769ef0b394Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 36779ef0b394Smrg soname_spec='${libname}${release}${shared_ext}$major' 36789ef0b394Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 36799ef0b394Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 36809ef0b394Smrg ;; 36819ef0b394Smrg *) 36829ef0b394Smrg shrext_cmds='.sl' 36839ef0b394Smrg dynamic_linker="$host_os dld.sl" 36849ef0b394Smrg shlibpath_var=SHLIB_PATH 36859ef0b394Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 36869ef0b394Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 36879ef0b394Smrg soname_spec='${libname}${release}${shared_ext}$major' 36889ef0b394Smrg ;; 36899ef0b394Smrg esac 36909ef0b394Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 36919ef0b394Smrg postinstall_cmds='chmod 555 $lib' 36929ef0b394Smrg # or fails outright, so override atomically: 36939ef0b394Smrg install_override_mode=555 36949ef0b394Smrg ;; 36959ef0b394Smrg 36969ef0b394Smrginterix[[3-9]]*) 36979ef0b394Smrg version_type=linux 36989ef0b394Smrg need_lib_prefix=no 36999ef0b394Smrg need_version=no 37009ef0b394Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 37019ef0b394Smrg soname_spec='${libname}${release}${shared_ext}$major' 37029ef0b394Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 37039ef0b394Smrg shlibpath_var=LD_LIBRARY_PATH 37049ef0b394Smrg shlibpath_overrides_runpath=no 37059ef0b394Smrg hardcode_into_libs=yes 37069ef0b394Smrg ;; 37079ef0b394Smrg 37089ef0b394Smrgirix5* | irix6* | nonstopux*) 37099ef0b394Smrg case $host_os in 37109ef0b394Smrg nonstopux*) version_type=nonstopux ;; 3711698f425bSmrg *) 37129ef0b394Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 37139ef0b394Smrg version_type=linux 3714698f425bSmrg else 37159ef0b394Smrg version_type=irix 37169ef0b394Smrg fi ;; 37179ef0b394Smrg esac 37189ef0b394Smrg need_lib_prefix=no 37199ef0b394Smrg need_version=no 37209ef0b394Smrg soname_spec='${libname}${release}${shared_ext}$major' 37219ef0b394Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 37229ef0b394Smrg case $host_os in 37239ef0b394Smrg irix5* | nonstopux*) 37249ef0b394Smrg libsuff= shlibsuff= 37259ef0b394Smrg ;; 37269ef0b394Smrg *) 37279ef0b394Smrg case $LD in # libtool.m4 will add one of these switches to LD 37289ef0b394Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 37299ef0b394Smrg libsuff= shlibsuff= libmagic=32-bit;; 37309ef0b394Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 37319ef0b394Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 37329ef0b394Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 37339ef0b394Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 37349ef0b394Smrg *) libsuff= shlibsuff= libmagic=never-match;; 37359ef0b394Smrg esac 37369ef0b394Smrg ;; 37379ef0b394Smrg esac 37389ef0b394Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 37399ef0b394Smrg shlibpath_overrides_runpath=no 37409ef0b394Smrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 37419ef0b394Smrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 37429ef0b394Smrg hardcode_into_libs=yes 37439ef0b394Smrg ;; 37449ef0b394Smrg 37459ef0b394Smrg# No shared lib support for Linux oldld, aout, or coff. 37469ef0b394Smrglinux*oldld* | linux*aout* | linux*coff*) 37479ef0b394Smrg dynamic_linker=no 37489ef0b394Smrg ;; 37499ef0b394Smrg 37509ef0b394Smrg# This must be Linux ELF. 37519ef0b394Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 37529ef0b394Smrg version_type=linux 37539ef0b394Smrg need_lib_prefix=no 37549ef0b394Smrg need_version=no 37559ef0b394Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 37569ef0b394Smrg soname_spec='${libname}${release}${shared_ext}$major' 37579ef0b394Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 37589ef0b394Smrg shlibpath_var=LD_LIBRARY_PATH 37599ef0b394Smrg shlibpath_overrides_runpath=no 37609ef0b394Smrg 37619ef0b394Smrg # Some binutils ld are patched to set DT_RUNPATH 37629ef0b394Smrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 37639ef0b394Smrg [lt_cv_shlibpath_overrides_runpath=no 37649ef0b394Smrg save_LDFLAGS=$LDFLAGS 37659ef0b394Smrg save_libdir=$libdir 37669ef0b394Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 37679ef0b394Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 37689ef0b394Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 37699ef0b394Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 37709ef0b394Smrg [lt_cv_shlibpath_overrides_runpath=yes])]) 37719ef0b394Smrg LDFLAGS=$save_LDFLAGS 37729ef0b394Smrg libdir=$save_libdir 37739ef0b394Smrg ]) 37749ef0b394Smrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 37759ef0b394Smrg 37769ef0b394Smrg # This implies no fast_install, which is unacceptable. 37779ef0b394Smrg # Some rework will be needed to allow for fast_install 37789ef0b394Smrg # before this can be enabled. 37799ef0b394Smrg hardcode_into_libs=yes 37809ef0b394Smrg 37819ef0b394Smrg # Append ld.so.conf contents to the search path 37829ef0b394Smrg if test -f /etc/ld.so.conf; then 37839ef0b394Smrg 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' ' '` 37849ef0b394Smrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 37859ef0b394Smrg fi 37869ef0b394Smrg 37879ef0b394Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 37889ef0b394Smrg # powerpc, because MkLinux only supported shared libraries with the 37899ef0b394Smrg # GNU dynamic linker. Since this was broken with cross compilers, 37909ef0b394Smrg # most powerpc-linux boxes support dynamic linking these days and 37919ef0b394Smrg # people can always --disable-shared, the test was removed, and we 37929ef0b394Smrg # assume the GNU/Linux dynamic linker is in use. 37939ef0b394Smrg dynamic_linker='GNU/Linux ld.so' 37949ef0b394Smrg ;; 37959ef0b394Smrg 37969ef0b394Smrgnetbsd*) 37979ef0b394Smrg version_type=sunos 37989ef0b394Smrg need_lib_prefix=no 37999ef0b394Smrg need_version=no 38009ef0b394Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 38019ef0b394Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 38029ef0b394Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 38039ef0b394Smrg dynamic_linker='NetBSD (a.out) ld.so' 38049ef0b394Smrg else 38059ef0b394Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 38069ef0b394Smrg soname_spec='${libname}${release}${shared_ext}$major' 38079ef0b394Smrg dynamic_linker='NetBSD ld.elf_so' 38089ef0b394Smrg fi 38099ef0b394Smrg shlibpath_var=LD_LIBRARY_PATH 38109ef0b394Smrg shlibpath_overrides_runpath=yes 38119ef0b394Smrg hardcode_into_libs=yes 38129ef0b394Smrg ;; 38139ef0b394Smrg 38149ef0b394Smrgnewsos6) 38159ef0b394Smrg version_type=linux 38169ef0b394Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 38179ef0b394Smrg shlibpath_var=LD_LIBRARY_PATH 38189ef0b394Smrg shlibpath_overrides_runpath=yes 38199ef0b394Smrg ;; 38209ef0b394Smrg 38219ef0b394Smrg*nto* | *qnx*) 38229ef0b394Smrg version_type=qnx 38239ef0b394Smrg need_lib_prefix=no 38249ef0b394Smrg need_version=no 38259ef0b394Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 38269ef0b394Smrg soname_spec='${libname}${release}${shared_ext}$major' 38279ef0b394Smrg shlibpath_var=LD_LIBRARY_PATH 38289ef0b394Smrg shlibpath_overrides_runpath=no 38299ef0b394Smrg hardcode_into_libs=yes 38309ef0b394Smrg dynamic_linker='ldqnx.so' 38319ef0b394Smrg ;; 38329ef0b394Smrg 38339ef0b394Smrgopenbsd*) 38349ef0b394Smrg version_type=sunos 38359ef0b394Smrg sys_lib_dlsearch_path_spec="/usr/lib" 38369ef0b394Smrg need_lib_prefix=no 38379ef0b394Smrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 38389ef0b394Smrg case $host_os in 38399ef0b394Smrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 38409ef0b394Smrg *) need_version=no ;; 38419ef0b394Smrg esac 38429ef0b394Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 38439ef0b394Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 38449ef0b394Smrg shlibpath_var=LD_LIBRARY_PATH 38459ef0b394Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 38469ef0b394Smrg case $host_os in 38479ef0b394Smrg openbsd2.[[89]] | openbsd2.[[89]].*) 38489ef0b394Smrg shlibpath_overrides_runpath=no 3849c5629e66Smrg ;; 3850c5629e66Smrg *) 38519ef0b394Smrg shlibpath_overrides_runpath=yes 3852698f425bSmrg ;; 38539ef0b394Smrg esac 38549ef0b394Smrg else 38559ef0b394Smrg shlibpath_overrides_runpath=yes 3856698f425bSmrg fi 38579ef0b394Smrg ;; 3858266e564dSmrg 38599ef0b394Smrgos2*) 38609ef0b394Smrg libname_spec='$name' 38619ef0b394Smrg shrext_cmds=".dll" 38629ef0b394Smrg need_lib_prefix=no 38639ef0b394Smrg library_names_spec='$libname${shared_ext} $libname.a' 38649ef0b394Smrg dynamic_linker='OS/2 ld.exe' 38659ef0b394Smrg shlibpath_var=LIBPATH 38669ef0b394Smrg ;; 3867266e564dSmrg 38689ef0b394Smrgosf3* | osf4* | osf5*) 38699ef0b394Smrg version_type=osf 38709ef0b394Smrg need_lib_prefix=no 38719ef0b394Smrg need_version=no 38729ef0b394Smrg soname_spec='${libname}${release}${shared_ext}$major' 38739ef0b394Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 38749ef0b394Smrg shlibpath_var=LD_LIBRARY_PATH 38759ef0b394Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 38769ef0b394Smrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 38779ef0b394Smrg ;; 38789ef0b394Smrg 38799ef0b394Smrgrdos*) 38809ef0b394Smrg dynamic_linker=no 38819ef0b394Smrg ;; 38829ef0b394Smrg 38839ef0b394Smrgsolaris*) 38849ef0b394Smrg version_type=linux 38859ef0b394Smrg need_lib_prefix=no 38869ef0b394Smrg need_version=no 38879ef0b394Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 38889ef0b394Smrg soname_spec='${libname}${release}${shared_ext}$major' 38899ef0b394Smrg shlibpath_var=LD_LIBRARY_PATH 38909ef0b394Smrg shlibpath_overrides_runpath=yes 38919ef0b394Smrg hardcode_into_libs=yes 38929ef0b394Smrg # ldd complains unless libraries are executable 38939ef0b394Smrg postinstall_cmds='chmod +x $lib' 38949ef0b394Smrg ;; 38959ef0b394Smrg 38969ef0b394Smrgsunos4*) 38979ef0b394Smrg version_type=sunos 38989ef0b394Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 38999ef0b394Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 39009ef0b394Smrg shlibpath_var=LD_LIBRARY_PATH 39019ef0b394Smrg shlibpath_overrides_runpath=yes 39029ef0b394Smrg if test "$with_gnu_ld" = yes; then 39039ef0b394Smrg need_lib_prefix=no 39049ef0b394Smrg fi 39059ef0b394Smrg need_version=yes 39069ef0b394Smrg ;; 39079ef0b394Smrg 39089ef0b394Smrgsysv4 | sysv4.3*) 39099ef0b394Smrg version_type=linux 39109ef0b394Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 39119ef0b394Smrg soname_spec='${libname}${release}${shared_ext}$major' 39129ef0b394Smrg shlibpath_var=LD_LIBRARY_PATH 39139ef0b394Smrg case $host_vendor in 39149ef0b394Smrg sni) 39159ef0b394Smrg shlibpath_overrides_runpath=no 39169ef0b394Smrg need_lib_prefix=no 39179ef0b394Smrg runpath_var=LD_RUN_PATH 39189ef0b394Smrg ;; 39199ef0b394Smrg siemens) 39209ef0b394Smrg need_lib_prefix=no 39219ef0b394Smrg ;; 39229ef0b394Smrg motorola) 39239ef0b394Smrg need_lib_prefix=no 39249ef0b394Smrg need_version=no 39259ef0b394Smrg shlibpath_overrides_runpath=no 39269ef0b394Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 3927698f425bSmrg ;; 39289ef0b394Smrg esac 39299ef0b394Smrg ;; 39309ef0b394Smrg 39319ef0b394Smrgsysv4*MP*) 39329ef0b394Smrg if test -d /usr/nec ;then 39339ef0b394Smrg version_type=linux 39349ef0b394Smrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 39359ef0b394Smrg soname_spec='$libname${shared_ext}.$major' 39369ef0b394Smrg shlibpath_var=LD_LIBRARY_PATH 39379ef0b394Smrg fi 39389ef0b394Smrg ;; 39399ef0b394Smrg 39409ef0b394Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 39419ef0b394Smrg version_type=freebsd-elf 39429ef0b394Smrg need_lib_prefix=no 39439ef0b394Smrg need_version=no 39449ef0b394Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 39459ef0b394Smrg soname_spec='${libname}${release}${shared_ext}$major' 39469ef0b394Smrg shlibpath_var=LD_LIBRARY_PATH 39479ef0b394Smrg shlibpath_overrides_runpath=yes 39489ef0b394Smrg hardcode_into_libs=yes 39499ef0b394Smrg if test "$with_gnu_ld" = yes; then 39509ef0b394Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 39519ef0b394Smrg else 39529ef0b394Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 39539ef0b394Smrg case $host_os in 39549ef0b394Smrg sco3.2v5*) 39559ef0b394Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 39569ef0b394Smrg ;; 39579ef0b394Smrg esac 39589ef0b394Smrg fi 39599ef0b394Smrg sys_lib_dlsearch_path_spec='/usr/lib' 39609ef0b394Smrg ;; 39619ef0b394Smrg 39629ef0b394Smrgtpf*) 39639ef0b394Smrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 39649ef0b394Smrg version_type=linux 39659ef0b394Smrg need_lib_prefix=no 39669ef0b394Smrg need_version=no 39679ef0b394Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 39689ef0b394Smrg shlibpath_var=LD_LIBRARY_PATH 39699ef0b394Smrg shlibpath_overrides_runpath=no 39709ef0b394Smrg hardcode_into_libs=yes 39719ef0b394Smrg ;; 3972266e564dSmrg 39739ef0b394Smrguts4*) 39749ef0b394Smrg version_type=linux 39759ef0b394Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 39769ef0b394Smrg soname_spec='${libname}${release}${shared_ext}$major' 39779ef0b394Smrg shlibpath_var=LD_LIBRARY_PATH 39789ef0b394Smrg ;; 3979698f425bSmrg 39809ef0b394Smrg*) 39819ef0b394Smrg dynamic_linker=no 39829ef0b394Smrg ;; 39839ef0b394Smrgesac 39849ef0b394SmrgAC_MSG_RESULT([$dynamic_linker]) 39859ef0b394Smrgtest "$dynamic_linker" = no && can_build_shared=no 3986698f425bSmrg 39879ef0b394Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 39889ef0b394Smrgif test "$GCC" = yes; then 39899ef0b394Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 39909ef0b394Smrgfi 3991698f425bSmrg 39929ef0b394Smrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 39939ef0b394Smrg sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 39949ef0b394Smrgfi 39959ef0b394Smrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 39969ef0b394Smrg sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 39979ef0b394Smrgfi 3998698f425bSmrg 39999ef0b394Smrg_LT_DECL([], [variables_saved_for_relink], [1], 40009ef0b394Smrg [Variables whose values should be saved in libtool wrapper scripts and 40019ef0b394Smrg restored at link time]) 40029ef0b394Smrg_LT_DECL([], [need_lib_prefix], [0], 40039ef0b394Smrg [Do we need the "lib" prefix for modules?]) 40049ef0b394Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 40059ef0b394Smrg_LT_DECL([], [version_type], [0], [Library versioning type]) 40069ef0b394Smrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 40079ef0b394Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 40089ef0b394Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 40099ef0b394Smrg [Is shlibpath searched before the hard-coded library search path?]) 40109ef0b394Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 40119ef0b394Smrg_LT_DECL([], [library_names_spec], [1], 40129ef0b394Smrg [[List of archive names. First name is the real one, the rest are links. 40139ef0b394Smrg The last name is the one that the linker finds with -lNAME]]) 40149ef0b394Smrg_LT_DECL([], [soname_spec], [1], 40159ef0b394Smrg [[The coded name of the library, if different from the real name]]) 40169ef0b394Smrg_LT_DECL([], [install_override_mode], [1], 40179ef0b394Smrg [Permission mode override for installation of shared libraries]) 40189ef0b394Smrg_LT_DECL([], [postinstall_cmds], [2], 40199ef0b394Smrg [Command to use after installation of a shared archive]) 40209ef0b394Smrg_LT_DECL([], [postuninstall_cmds], [2], 40219ef0b394Smrg [Command to use after uninstallation of a shared archive]) 40229ef0b394Smrg_LT_DECL([], [finish_cmds], [2], 40239ef0b394Smrg [Commands used to finish a libtool library installation in a directory]) 40249ef0b394Smrg_LT_DECL([], [finish_eval], [1], 40259ef0b394Smrg [[As "finish_cmds", except a single script fragment to be evaled but 40269ef0b394Smrg not shown]]) 40279ef0b394Smrg_LT_DECL([], [hardcode_into_libs], [0], 40289ef0b394Smrg [Whether we should hardcode library paths into libraries]) 40299ef0b394Smrg_LT_DECL([], [sys_lib_search_path_spec], [2], 40309ef0b394Smrg [Compile-time system search path for libraries]) 40319ef0b394Smrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 40329ef0b394Smrg [Run-time system search path for libraries]) 40339ef0b394Smrg])# _LT_SYS_DYNAMIC_LINKER 4034698f425bSmrg 4035698f425bSmrg 40369ef0b394Smrg# _LT_PATH_TOOL_PREFIX(TOOL) 40379ef0b394Smrg# -------------------------- 40389ef0b394Smrg# find a file program which can recognize shared library 40399ef0b394SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 40409ef0b394Smrg[m4_require([_LT_DECL_EGREP])dnl 40419ef0b394SmrgAC_MSG_CHECKING([for $1]) 40429ef0b394SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 40439ef0b394Smrg[case $MAGIC_CMD in 40449ef0b394Smrg[[\\/*] | ?:[\\/]*]) 40459ef0b394Smrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 40469ef0b394Smrg ;; 40479ef0b394Smrg*) 40489ef0b394Smrg lt_save_MAGIC_CMD="$MAGIC_CMD" 40499ef0b394Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 40509ef0b394Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 40519ef0b394Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 40529ef0b394Smrgdnl not every word. This closes a longstanding sh security hole. 40539ef0b394Smrg ac_dummy="m4_if([$2], , $PATH, [$2])" 40549ef0b394Smrg for ac_dir in $ac_dummy; do 40559ef0b394Smrg IFS="$lt_save_ifs" 40569ef0b394Smrg test -z "$ac_dir" && ac_dir=. 40579ef0b394Smrg if test -f $ac_dir/$1; then 40589ef0b394Smrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 40599ef0b394Smrg if test -n "$file_magic_test_file"; then 40609ef0b394Smrg case $deplibs_check_method in 40619ef0b394Smrg "file_magic "*) 40629ef0b394Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 40639ef0b394Smrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 40649ef0b394Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 40659ef0b394Smrg $EGREP "$file_magic_regex" > /dev/null; then 40669ef0b394Smrg : 40679ef0b394Smrg else 40689ef0b394Smrg cat <<_LT_EOF 1>&2 4069698f425bSmrg 40709ef0b394Smrg*** Warning: the command libtool uses to detect shared libraries, 40719ef0b394Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 40729ef0b394Smrg*** The result is that libtool may fail to recognize shared libraries 40739ef0b394Smrg*** as such. This will affect the creation of libtool libraries that 40749ef0b394Smrg*** depend on shared libraries, but programs linked with such libtool 40759ef0b394Smrg*** libraries will work regardless of this problem. Nevertheless, you 40769ef0b394Smrg*** may want to report the problem to your system manager and/or to 40779ef0b394Smrg*** bug-libtool@gnu.org 40789ef0b394Smrg 40799ef0b394Smrg_LT_EOF 40809ef0b394Smrg fi ;; 40819ef0b394Smrg esac 4082698f425bSmrg fi 40839ef0b394Smrg break 40849ef0b394Smrg fi 40859ef0b394Smrg done 40869ef0b394Smrg IFS="$lt_save_ifs" 40879ef0b394Smrg MAGIC_CMD="$lt_save_MAGIC_CMD" 40889ef0b394Smrg ;; 40899ef0b394Smrgesac]) 40909ef0b394SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 40919ef0b394Smrgif test -n "$MAGIC_CMD"; then 40929ef0b394Smrg AC_MSG_RESULT($MAGIC_CMD) 40939ef0b394Smrgelse 40949ef0b394Smrg AC_MSG_RESULT(no) 40959ef0b394Smrgfi 40969ef0b394Smrg_LT_DECL([], [MAGIC_CMD], [0], 40979ef0b394Smrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 40989ef0b394Smrg])# _LT_PATH_TOOL_PREFIX 4099698f425bSmrg 41009ef0b394Smrg# Old name: 41019ef0b394SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 41029ef0b394Smrgdnl aclocal-1.4 backwards compatibility: 41039ef0b394Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 41049ef0b394Smrg 41059ef0b394Smrg 41069ef0b394Smrg# _LT_PATH_MAGIC 41079ef0b394Smrg# -------------- 41089ef0b394Smrg# find a file program which can recognize a shared library 41099ef0b394Smrgm4_defun([_LT_PATH_MAGIC], 41109ef0b394Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 41119ef0b394Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 41129ef0b394Smrg if test -n "$ac_tool_prefix"; then 41139ef0b394Smrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 4114698f425bSmrg else 41159ef0b394Smrg MAGIC_CMD=: 41169ef0b394Smrg fi 41179ef0b394Smrgfi 41189ef0b394Smrg])# _LT_PATH_MAGIC 4119698f425bSmrg 4120698f425bSmrg 41219ef0b394Smrg# LT_PATH_LD 41229ef0b394Smrg# ---------- 41239ef0b394Smrg# find the pathname to the GNU or non-GNU linker 41249ef0b394SmrgAC_DEFUN([LT_PATH_LD], 41259ef0b394Smrg[AC_REQUIRE([AC_PROG_CC])dnl 41269ef0b394SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 41279ef0b394SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 41289ef0b394Smrgm4_require([_LT_DECL_SED])dnl 41299ef0b394Smrgm4_require([_LT_DECL_EGREP])dnl 41309ef0b394Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 41319ef0b394Smrg 41329ef0b394SmrgAC_ARG_WITH([gnu-ld], 41339ef0b394Smrg [AS_HELP_STRING([--with-gnu-ld], 41349ef0b394Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 41359ef0b394Smrg [test "$withval" = no || with_gnu_ld=yes], 41369ef0b394Smrg [with_gnu_ld=no])dnl 41379ef0b394Smrg 41389ef0b394Smrgac_prog=ld 41399ef0b394Smrgif test "$GCC" = yes; then 41409ef0b394Smrg # Check if gcc -print-prog-name=ld gives a path. 41419ef0b394Smrg AC_MSG_CHECKING([for ld used by $CC]) 41429ef0b394Smrg case $host in 41439ef0b394Smrg *-*-mingw*) 41449ef0b394Smrg # gcc leaves a trailing carriage return which upsets mingw 41459ef0b394Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 41469ef0b394Smrg *) 41479ef0b394Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 41489ef0b394Smrg esac 41499ef0b394Smrg case $ac_prog in 41509ef0b394Smrg # Accept absolute paths. 41519ef0b394Smrg [[\\/]]* | ?:[[\\/]]*) 41529ef0b394Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 41539ef0b394Smrg # Canonicalize the pathname of ld 41549ef0b394Smrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 41559ef0b394Smrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 41569ef0b394Smrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 41579ef0b394Smrg done 41589ef0b394Smrg test -z "$LD" && LD="$ac_prog" 41599ef0b394Smrg ;; 41609ef0b394Smrg "") 41619ef0b394Smrg # If it fails, then pretend we aren't using GCC. 41629ef0b394Smrg ac_prog=ld 41639ef0b394Smrg ;; 41649ef0b394Smrg *) 41659ef0b394Smrg # If it is relative, then search for the first ld in PATH. 41669ef0b394Smrg with_gnu_ld=unknown 41679ef0b394Smrg ;; 41689ef0b394Smrg esac 41699ef0b394Smrgelif test "$with_gnu_ld" = yes; then 41709ef0b394Smrg AC_MSG_CHECKING([for GNU ld]) 41719ef0b394Smrgelse 41729ef0b394Smrg AC_MSG_CHECKING([for non-GNU ld]) 41739ef0b394Smrgfi 41749ef0b394SmrgAC_CACHE_VAL(lt_cv_path_LD, 41759ef0b394Smrg[if test -z "$LD"; then 41769ef0b394Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 41779ef0b394Smrg for ac_dir in $PATH; do 41789ef0b394Smrg IFS="$lt_save_ifs" 41799ef0b394Smrg test -z "$ac_dir" && ac_dir=. 41809ef0b394Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 41819ef0b394Smrg lt_cv_path_LD="$ac_dir/$ac_prog" 41829ef0b394Smrg # Check to see if the program is GNU ld. I'd rather use --version, 41839ef0b394Smrg # but apparently some variants of GNU ld only accept -v. 41849ef0b394Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 41859ef0b394Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 41869ef0b394Smrg *GNU* | *'with BFD'*) 41879ef0b394Smrg test "$with_gnu_ld" != no && break 4188c5629e66Smrg ;; 4189c5629e66Smrg *) 41909ef0b394Smrg test "$with_gnu_ld" != yes && break 4191c5629e66Smrg ;; 4192698f425bSmrg esac 41939ef0b394Smrg fi 41949ef0b394Smrg done 41959ef0b394Smrg IFS="$lt_save_ifs" 41969ef0b394Smrgelse 41979ef0b394Smrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 41989ef0b394Smrgfi]) 41999ef0b394SmrgLD="$lt_cv_path_LD" 42009ef0b394Smrgif test -n "$LD"; then 42019ef0b394Smrg AC_MSG_RESULT($LD) 42029ef0b394Smrgelse 42039ef0b394Smrg AC_MSG_RESULT(no) 42049ef0b394Smrgfi 42059ef0b394Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 42069ef0b394Smrg_LT_PATH_LD_GNU 42079ef0b394SmrgAC_SUBST([LD]) 4208698f425bSmrg 42099ef0b394Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 42109ef0b394Smrg])# LT_PATH_LD 4211698f425bSmrg 42129ef0b394Smrg# Old names: 42139ef0b394SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 42149ef0b394SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 42159ef0b394Smrgdnl aclocal-1.4 backwards compatibility: 42169ef0b394Smrgdnl AC_DEFUN([AM_PROG_LD], []) 42179ef0b394Smrgdnl AC_DEFUN([AC_PROG_LD], []) 4218266e564dSmrg 4219266e564dSmrg 42209ef0b394Smrg# _LT_PATH_LD_GNU 42219ef0b394Smrg#- -------------- 42229ef0b394Smrgm4_defun([_LT_PATH_LD_GNU], 42239ef0b394Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 42249ef0b394Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 42259ef0b394Smrgcase `$LD -v 2>&1 </dev/null` in 42269ef0b394Smrg*GNU* | *'with BFD'*) 42279ef0b394Smrg lt_cv_prog_gnu_ld=yes 42289ef0b394Smrg ;; 42299ef0b394Smrg*) 42309ef0b394Smrg lt_cv_prog_gnu_ld=no 42319ef0b394Smrg ;; 42329ef0b394Smrgesac]) 42339ef0b394Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 42349ef0b394Smrg])# _LT_PATH_LD_GNU 4235266e564dSmrg 4236c5629e66Smrg 42379ef0b394Smrg# _LT_CMD_RELOAD 42389ef0b394Smrg# -------------- 42399ef0b394Smrg# find reload flag for linker 42409ef0b394Smrg# -- PORTME Some linkers may need a different reload flag. 42419ef0b394Smrgm4_defun([_LT_CMD_RELOAD], 42429ef0b394Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 42439ef0b394Smrg lt_cv_ld_reload_flag, 42449ef0b394Smrg [lt_cv_ld_reload_flag='-r']) 42459ef0b394Smrgreload_flag=$lt_cv_ld_reload_flag 42469ef0b394Smrgcase $reload_flag in 42479ef0b394Smrg"" | " "*) ;; 42489ef0b394Smrg*) reload_flag=" $reload_flag" ;; 42499ef0b394Smrgesac 42509ef0b394Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 42519ef0b394Smrgcase $host_os in 42529ef0b394Smrg cygwin* | mingw* | pw32* | cegcc*) 42539ef0b394Smrg if test "$GCC" != yes; then 42549ef0b394Smrg reload_cmds=false 42559ef0b394Smrg fi 42569ef0b394Smrg ;; 42579ef0b394Smrg darwin*) 42589ef0b394Smrg if test "$GCC" = yes; then 42599ef0b394Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 42609ef0b394Smrg else 42619ef0b394Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 42629ef0b394Smrg fi 42639ef0b394Smrg ;; 42649ef0b394Smrgesac 42659ef0b394Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 42669ef0b394Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl 42679ef0b394Smrg])# _LT_CMD_RELOAD 4268c5629e66Smrg 4269c5629e66Smrg 42709ef0b394Smrg# _LT_CHECK_MAGIC_METHOD 42719ef0b394Smrg# ---------------------- 42729ef0b394Smrg# how to check for library dependencies 42739ef0b394Smrg# -- PORTME fill in with the dynamic library characteristics 42749ef0b394Smrgm4_defun([_LT_CHECK_MAGIC_METHOD], 42759ef0b394Smrg[m4_require([_LT_DECL_EGREP]) 42769ef0b394Smrgm4_require([_LT_DECL_OBJDUMP]) 42779ef0b394SmrgAC_CACHE_CHECK([how to recognize dependent libraries], 42789ef0b394Smrglt_cv_deplibs_check_method, 42799ef0b394Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 42809ef0b394Smrglt_cv_file_magic_test_file= 42819ef0b394Smrglt_cv_deplibs_check_method='unknown' 42829ef0b394Smrg# Need to set the preceding variable on all platforms that support 42839ef0b394Smrg# interlibrary dependencies. 42849ef0b394Smrg# 'none' -- dependencies not supported. 42859ef0b394Smrg# `unknown' -- same as none, but documents that we really don't know. 42869ef0b394Smrg# 'pass_all' -- all dependencies passed with no checks. 42879ef0b394Smrg# 'test_compile' -- check by making test program. 42889ef0b394Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 42899ef0b394Smrg# which responds to the $file_magic_cmd with a given extended regex. 42909ef0b394Smrg# If you have `file' or equivalent on your system and you're not sure 42919ef0b394Smrg# whether `pass_all' will *always* work, you probably want this one. 4292c5629e66Smrg 42939ef0b394Smrgcase $host_os in 42949ef0b394Smrgaix[[4-9]]*) 42959ef0b394Smrg lt_cv_deplibs_check_method=pass_all 42969ef0b394Smrg ;; 4297c5629e66Smrg 42989ef0b394Smrgbeos*) 42999ef0b394Smrg lt_cv_deplibs_check_method=pass_all 43009ef0b394Smrg ;; 4301c5629e66Smrg 43029ef0b394Smrgbsdi[[45]]*) 43039ef0b394Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 43049ef0b394Smrg lt_cv_file_magic_cmd='/usr/bin/file -L' 43059ef0b394Smrg lt_cv_file_magic_test_file=/shlib/libc.so 43069ef0b394Smrg ;; 4307c5629e66Smrg 43089ef0b394Smrgcygwin*) 43099ef0b394Smrg # func_win32_libid is a shell function defined in ltmain.sh 43109ef0b394Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 43119ef0b394Smrg lt_cv_file_magic_cmd='func_win32_libid' 43129ef0b394Smrg ;; 43139ef0b394Smrg 43149ef0b394Smrgmingw* | pw32*) 43159ef0b394Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 43169ef0b394Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 43179ef0b394Smrg # unless we find 'file', for example because we are cross-compiling. 43189ef0b394Smrg # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 43199ef0b394Smrg if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 43209ef0b394Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 43219ef0b394Smrg lt_cv_file_magic_cmd='func_win32_libid' 43229ef0b394Smrg else 43239ef0b394Smrg # Keep this pattern in sync with the one in func_win32_libid. 43249ef0b394Smrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 43259ef0b394Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 43269ef0b394Smrg fi 43279ef0b394Smrg ;; 4328c5629e66Smrg 43299ef0b394Smrgcegcc*) 43309ef0b394Smrg # use the weaker test based on 'objdump'. See mingw*. 43319ef0b394Smrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 43329ef0b394Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 43339ef0b394Smrg ;; 4334c5629e66Smrg 43359ef0b394Smrgdarwin* | rhapsody*) 43369ef0b394Smrg lt_cv_deplibs_check_method=pass_all 43379ef0b394Smrg ;; 43389ef0b394Smrg 43399ef0b394Smrgfreebsd* | dragonfly*) 43409ef0b394Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 43419ef0b394Smrg case $host_cpu in 43429ef0b394Smrg i*86 ) 43439ef0b394Smrg # Not sure whether the presence of OpenBSD here was a mistake. 43449ef0b394Smrg # Let's accept both of them until this is cleared up. 43459ef0b394Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 43469ef0b394Smrg lt_cv_file_magic_cmd=/usr/bin/file 43479ef0b394Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 4348698f425bSmrg ;; 4349c5629e66Smrg esac 43509ef0b394Smrg else 43519ef0b394Smrg lt_cv_deplibs_check_method=pass_all 4352698f425bSmrg fi 43539ef0b394Smrg ;; 43549ef0b394Smrg 43559ef0b394Smrggnu*) 43569ef0b394Smrg lt_cv_deplibs_check_method=pass_all 43579ef0b394Smrg ;; 43589ef0b394Smrg 43599ef0b394Smrghaiku*) 43609ef0b394Smrg lt_cv_deplibs_check_method=pass_all 43619ef0b394Smrg ;; 43629ef0b394Smrg 43639ef0b394Smrghpux10.20* | hpux11*) 43649ef0b394Smrg lt_cv_file_magic_cmd=/usr/bin/file 43659ef0b394Smrg case $host_cpu in 43669ef0b394Smrg ia64*) 43679ef0b394Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 43689ef0b394Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 43699ef0b394Smrg ;; 43709ef0b394Smrg hppa*64*) 43719ef0b394Smrg [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]'] 43729ef0b394Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 4373698f425bSmrg ;; 4374698f425bSmrg *) 43759ef0b394Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 43769ef0b394Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 4377698f425bSmrg ;; 43789ef0b394Smrg esac 43799ef0b394Smrg ;; 4380c5629e66Smrg 43819ef0b394Smrginterix[[3-9]]*) 43829ef0b394Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 43839ef0b394Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 43849ef0b394Smrg ;; 4385c5629e66Smrg 43869ef0b394Smrgirix5* | irix6* | nonstopux*) 43879ef0b394Smrg case $LD in 43889ef0b394Smrg *-32|*"-32 ") libmagic=32-bit;; 43899ef0b394Smrg *-n32|*"-n32 ") libmagic=N32;; 43909ef0b394Smrg *-64|*"-64 ") libmagic=64-bit;; 43919ef0b394Smrg *) libmagic=never-match;; 43929ef0b394Smrg esac 43939ef0b394Smrg lt_cv_deplibs_check_method=pass_all 4394c5629e66Smrg ;; 43959ef0b394Smrg 43969ef0b394Smrg# This must be Linux ELF. 43979ef0b394Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 43989ef0b394Smrg lt_cv_deplibs_check_method=pass_all 4399698f425bSmrg ;; 44009ef0b394Smrg 44019ef0b394Smrgnetbsd*) 44029ef0b394Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 44039ef0b394Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 44049ef0b394Smrg else 44059ef0b394Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 44069ef0b394Smrg fi 4407698f425bSmrg ;; 4408c5629e66Smrg 44099ef0b394Smrgnewos6*) 44109ef0b394Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 44119ef0b394Smrg lt_cv_file_magic_cmd=/usr/bin/file 44129ef0b394Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 44139ef0b394Smrg ;; 4414c5629e66Smrg 44159ef0b394Smrg*nto* | *qnx*) 44169ef0b394Smrg lt_cv_deplibs_check_method=pass_all 44179ef0b394Smrg ;; 4418266e564dSmrg 44199ef0b394Smrgopenbsd*) 44209ef0b394Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 44219ef0b394Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 44229ef0b394Smrg else 44239ef0b394Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 44249ef0b394Smrg fi 44259ef0b394Smrg ;; 4426266e564dSmrg 44279ef0b394Smrgosf3* | osf4* | osf5*) 44289ef0b394Smrg lt_cv_deplibs_check_method=pass_all 44299ef0b394Smrg ;; 4430266e564dSmrg 44319ef0b394Smrgrdos*) 44329ef0b394Smrg lt_cv_deplibs_check_method=pass_all 44339ef0b394Smrg ;; 4434266e564dSmrg 44359ef0b394Smrgsolaris*) 44369ef0b394Smrg lt_cv_deplibs_check_method=pass_all 44379ef0b394Smrg ;; 4438266e564dSmrg 44399ef0b394Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 44409ef0b394Smrg lt_cv_deplibs_check_method=pass_all 44419ef0b394Smrg ;; 4442266e564dSmrg 44439ef0b394Smrgsysv4 | sysv4.3*) 44449ef0b394Smrg case $host_vendor in 44459ef0b394Smrg motorola) 44469ef0b394Smrg 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]]' 44479ef0b394Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 44489ef0b394Smrg ;; 44499ef0b394Smrg ncr) 44509ef0b394Smrg lt_cv_deplibs_check_method=pass_all 44519ef0b394Smrg ;; 44529ef0b394Smrg sequent) 44539ef0b394Smrg lt_cv_file_magic_cmd='/bin/file' 44549ef0b394Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 44559ef0b394Smrg ;; 44569ef0b394Smrg sni) 44579ef0b394Smrg lt_cv_file_magic_cmd='/bin/file' 44589ef0b394Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 44599ef0b394Smrg lt_cv_file_magic_test_file=/lib/libc.so 44609ef0b394Smrg ;; 44619ef0b394Smrg siemens) 44629ef0b394Smrg lt_cv_deplibs_check_method=pass_all 44639ef0b394Smrg ;; 44649ef0b394Smrg pc) 44659ef0b394Smrg lt_cv_deplibs_check_method=pass_all 44669ef0b394Smrg ;; 44679ef0b394Smrg esac 44689ef0b394Smrg ;; 4469266e564dSmrg 44709ef0b394Smrgtpf*) 44719ef0b394Smrg lt_cv_deplibs_check_method=pass_all 44729ef0b394Smrg ;; 44739ef0b394Smrgesac 44749ef0b394Smrg]) 4475698f425bSmrg 44769ef0b394Smrgfile_magic_glob= 44779ef0b394Smrgwant_nocaseglob=no 44789ef0b394Smrgif test "$build" = "$host"; then 44799ef0b394Smrg case $host_os in 44809ef0b394Smrg mingw* | pw32*) 44819ef0b394Smrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 44829ef0b394Smrg want_nocaseglob=yes 44839ef0b394Smrg else 44849ef0b394Smrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 44859ef0b394Smrg fi 44869ef0b394Smrg ;; 44879ef0b394Smrg esac 44889ef0b394Smrgfi 4489266e564dSmrg 44909ef0b394Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 44919ef0b394Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 44929ef0b394Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 4493266e564dSmrg 44949ef0b394Smrg_LT_DECL([], [deplibs_check_method], [1], 44959ef0b394Smrg [Method to check whether dependent libraries are shared objects]) 44969ef0b394Smrg_LT_DECL([], [file_magic_cmd], [1], 44979ef0b394Smrg [Command to use when deplibs_check_method = "file_magic"]) 44989ef0b394Smrg_LT_DECL([], [file_magic_glob], [1], 44999ef0b394Smrg [How to find potential files when deplibs_check_method = "file_magic"]) 45009ef0b394Smrg_LT_DECL([], [want_nocaseglob], [1], 45019ef0b394Smrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 45029ef0b394Smrg])# _LT_CHECK_MAGIC_METHOD 4503266e564dSmrg 4504266e564dSmrg 45059ef0b394Smrg# LT_PATH_NM 45069ef0b394Smrg# ---------- 45079ef0b394Smrg# find the pathname to a BSD- or MS-compatible name lister 45089ef0b394SmrgAC_DEFUN([LT_PATH_NM], 45099ef0b394Smrg[AC_REQUIRE([AC_PROG_CC])dnl 45109ef0b394SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 45119ef0b394Smrg[if test -n "$NM"; then 45129ef0b394Smrg # Let the user override the test. 45139ef0b394Smrg lt_cv_path_NM="$NM" 45149ef0b394Smrgelse 45159ef0b394Smrg lt_nm_to_check="${ac_tool_prefix}nm" 45169ef0b394Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 45179ef0b394Smrg lt_nm_to_check="$lt_nm_to_check nm" 45189ef0b394Smrg fi 45199ef0b394Smrg for lt_tmp_nm in $lt_nm_to_check; do 45209ef0b394Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 45219ef0b394Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 45229ef0b394Smrg IFS="$lt_save_ifs" 45239ef0b394Smrg test -z "$ac_dir" && ac_dir=. 45249ef0b394Smrg tmp_nm="$ac_dir/$lt_tmp_nm" 45259ef0b394Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 45269ef0b394Smrg # Check to see if the nm accepts a BSD-compat flag. 45279ef0b394Smrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 45289ef0b394Smrg # nm: unknown option "B" ignored 45299ef0b394Smrg # Tru64's nm complains that /dev/null is an invalid object file 45309ef0b394Smrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 45319ef0b394Smrg */dev/null* | *'Invalid file or object type'*) 45329ef0b394Smrg lt_cv_path_NM="$tmp_nm -B" 45339ef0b394Smrg break 45349ef0b394Smrg ;; 45359ef0b394Smrg *) 45369ef0b394Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 45379ef0b394Smrg */dev/null*) 45389ef0b394Smrg lt_cv_path_NM="$tmp_nm -p" 45399ef0b394Smrg break 45409ef0b394Smrg ;; 45419ef0b394Smrg *) 45429ef0b394Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 45439ef0b394Smrg continue # so that we can try to find one that supports BSD flags 45449ef0b394Smrg ;; 45459ef0b394Smrg esac 4546698f425bSmrg ;; 4547698f425bSmrg esac 4548698f425bSmrg fi 45499ef0b394Smrg done 45509ef0b394Smrg IFS="$lt_save_ifs" 45519ef0b394Smrg done 45529ef0b394Smrg : ${lt_cv_path_NM=no} 45539ef0b394Smrgfi]) 45549ef0b394Smrgif test "$lt_cv_path_NM" != "no"; then 45559ef0b394Smrg NM="$lt_cv_path_NM" 45569ef0b394Smrgelse 45579ef0b394Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 45589ef0b394Smrg if test -n "$DUMPBIN"; then : 45599ef0b394Smrg # Let the user override the test. 45609ef0b394Smrg else 45619ef0b394Smrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 45629ef0b394Smrg case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 45639ef0b394Smrg *COFF*) 45649ef0b394Smrg DUMPBIN="$DUMPBIN -symbols" 4565698f425bSmrg ;; 45669ef0b394Smrg *) 45679ef0b394Smrg DUMPBIN=: 4568698f425bSmrg ;; 45699ef0b394Smrg esac 45709ef0b394Smrg fi 45719ef0b394Smrg AC_SUBST([DUMPBIN]) 45729ef0b394Smrg if test "$DUMPBIN" != ":"; then 45739ef0b394Smrg NM="$DUMPBIN" 45749ef0b394Smrg fi 45759ef0b394Smrgfi 45769ef0b394Smrgtest -z "$NM" && NM=nm 45779ef0b394SmrgAC_SUBST([NM]) 45789ef0b394Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 4579266e564dSmrg 45809ef0b394SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 45819ef0b394Smrg [lt_cv_nm_interface="BSD nm" 45829ef0b394Smrg echo "int some_variable = 0;" > conftest.$ac_ext 45839ef0b394Smrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 45849ef0b394Smrg (eval "$ac_compile" 2>conftest.err) 45859ef0b394Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 45869ef0b394Smrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 45879ef0b394Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 45889ef0b394Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 45899ef0b394Smrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 45909ef0b394Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 45919ef0b394Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 45929ef0b394Smrg lt_cv_nm_interface="MS dumpbin" 45939ef0b394Smrg fi 45949ef0b394Smrg rm -f conftest*]) 45959ef0b394Smrg])# LT_PATH_NM 4596266e564dSmrg 45979ef0b394Smrg# Old names: 45989ef0b394SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 45999ef0b394SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 46009ef0b394Smrgdnl aclocal-1.4 backwards compatibility: 46019ef0b394Smrgdnl AC_DEFUN([AM_PROG_NM], []) 46029ef0b394Smrgdnl AC_DEFUN([AC_PROG_NM], []) 4603266e564dSmrg 46049ef0b394Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 46059ef0b394Smrg# -------------------------------- 46069ef0b394Smrg# how to determine the name of the shared library 46079ef0b394Smrg# associated with a specific link library. 46089ef0b394Smrg# -- PORTME fill in with the dynamic library characteristics 46099ef0b394Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 46109ef0b394Smrg[m4_require([_LT_DECL_EGREP]) 46119ef0b394Smrgm4_require([_LT_DECL_OBJDUMP]) 46129ef0b394Smrgm4_require([_LT_DECL_DLLTOOL]) 46139ef0b394SmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 46149ef0b394Smrglt_cv_sharedlib_from_linklib_cmd, 46159ef0b394Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 4616266e564dSmrg 46179ef0b394Smrgcase $host_os in 46189ef0b394Smrgcygwin* | mingw* | pw32* | cegcc*) 46199ef0b394Smrg # two different shell functions defined in ltmain.sh 46209ef0b394Smrg # decide which to use based on capabilities of $DLLTOOL 46219ef0b394Smrg case `$DLLTOOL --help 2>&1` in 46229ef0b394Smrg *--identify-strict*) 46239ef0b394Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 46249ef0b394Smrg ;; 46259ef0b394Smrg *) 46269ef0b394Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 46279ef0b394Smrg ;; 46289ef0b394Smrg esac 46299ef0b394Smrg ;; 46309ef0b394Smrg*) 46319ef0b394Smrg # fallback: assume linklib IS sharedlib 46329ef0b394Smrg lt_cv_sharedlib_from_linklib_cmd="$ECHO" 46339ef0b394Smrg ;; 46349ef0b394Smrgesac 46359ef0b394Smrg]) 46369ef0b394Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 46379ef0b394Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 4638266e564dSmrg 46399ef0b394Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 46409ef0b394Smrg [Command to associate shared and link libraries]) 46419ef0b394Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 4642266e564dSmrg 4643266e564dSmrg 46449ef0b394Smrg# _LT_PATH_MANIFEST_TOOL 46459ef0b394Smrg# ---------------------- 46469ef0b394Smrg# locate the manifest tool 46479ef0b394Smrgm4_defun([_LT_PATH_MANIFEST_TOOL], 46489ef0b394Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 46499ef0b394Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 46509ef0b394SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 46519ef0b394Smrg [lt_cv_path_mainfest_tool=no 46529ef0b394Smrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 46539ef0b394Smrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 46549ef0b394Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 46559ef0b394Smrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 46569ef0b394Smrg lt_cv_path_mainfest_tool=yes 46579ef0b394Smrg fi 46589ef0b394Smrg rm -f conftest*]) 46599ef0b394Smrgif test "x$lt_cv_path_mainfest_tool" != xyes; then 46609ef0b394Smrg MANIFEST_TOOL=: 46619ef0b394Smrgfi 46629ef0b394Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 46639ef0b394Smrg])# _LT_PATH_MANIFEST_TOOL 4664266e564dSmrg 4665266e564dSmrg 46669ef0b394Smrg# LT_LIB_M 46679ef0b394Smrg# -------- 46689ef0b394Smrg# check for math library 46699ef0b394SmrgAC_DEFUN([LT_LIB_M], 46709ef0b394Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 46719ef0b394SmrgLIBM= 46729ef0b394Smrgcase $host in 46739ef0b394Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 46749ef0b394Smrg # These system don't have libm, or don't need it 46759ef0b394Smrg ;; 46769ef0b394Smrg*-ncr-sysv4.3*) 46779ef0b394Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 46789ef0b394Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 46799ef0b394Smrg ;; 46809ef0b394Smrg*) 46819ef0b394Smrg AC_CHECK_LIB(m, cos, LIBM="-lm") 46829ef0b394Smrg ;; 46839ef0b394Smrgesac 46849ef0b394SmrgAC_SUBST([LIBM]) 46859ef0b394Smrg])# LT_LIB_M 4686266e564dSmrg 46879ef0b394Smrg# Old name: 46889ef0b394SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 46899ef0b394Smrgdnl aclocal-1.4 backwards compatibility: 46909ef0b394Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 4691698f425bSmrg 4692266e564dSmrg 46939ef0b394Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 46949ef0b394Smrg# ------------------------------- 46959ef0b394Smrgm4_defun([_LT_COMPILER_NO_RTTI], 46969ef0b394Smrg[m4_require([_LT_TAG_COMPILER])dnl 4697266e564dSmrg 46989ef0b394Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 4699266e564dSmrg 47009ef0b394Smrgif test "$GCC" = yes; then 47019ef0b394Smrg case $cc_basename in 47029ef0b394Smrg nvcc*) 47039ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 47049ef0b394Smrg *) 47059ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 47069ef0b394Smrg esac 4707266e564dSmrg 47089ef0b394Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 47099ef0b394Smrg lt_cv_prog_compiler_rtti_exceptions, 47109ef0b394Smrg [-fno-rtti -fno-exceptions], [], 47119ef0b394Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 47129ef0b394Smrgfi 47139ef0b394Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 47149ef0b394Smrg [Compiler flag to turn off builtin functions]) 47159ef0b394Smrg])# _LT_COMPILER_NO_RTTI 4716266e564dSmrg 4717266e564dSmrg 47189ef0b394Smrg# _LT_CMD_GLOBAL_SYMBOLS 47199ef0b394Smrg# ---------------------- 47209ef0b394Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 47219ef0b394Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 47229ef0b394SmrgAC_REQUIRE([AC_PROG_CC])dnl 47239ef0b394SmrgAC_REQUIRE([AC_PROG_AWK])dnl 47249ef0b394SmrgAC_REQUIRE([LT_PATH_NM])dnl 47259ef0b394SmrgAC_REQUIRE([LT_PATH_LD])dnl 47269ef0b394Smrgm4_require([_LT_DECL_SED])dnl 47279ef0b394Smrgm4_require([_LT_DECL_EGREP])dnl 47289ef0b394Smrgm4_require([_LT_TAG_COMPILER])dnl 4729c5629e66Smrg 47309ef0b394Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 47319ef0b394SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 47329ef0b394SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 47339ef0b394Smrg[ 47349ef0b394Smrg# These are sane defaults that work on at least a few old systems. 47359ef0b394Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 4736c5629e66Smrg 47379ef0b394Smrg# Character class describing NM global symbol codes. 47389ef0b394Smrgsymcode='[[BCDEGRST]]' 4739c5629e66Smrg 47409ef0b394Smrg# Regexp to match symbols that can be accessed directly from C. 47419ef0b394Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 4742c5629e66Smrg 47439ef0b394Smrg# Define system-specific variables. 47449ef0b394Smrgcase $host_os in 47459ef0b394Smrgaix*) 47469ef0b394Smrg symcode='[[BCDT]]' 47479ef0b394Smrg ;; 47489ef0b394Smrgcygwin* | mingw* | pw32* | cegcc*) 47499ef0b394Smrg symcode='[[ABCDGISTW]]' 47509ef0b394Smrg ;; 47519ef0b394Smrghpux*) 47529ef0b394Smrg if test "$host_cpu" = ia64; then 47539ef0b394Smrg symcode='[[ABCDEGRST]]' 47549ef0b394Smrg fi 47559ef0b394Smrg ;; 47569ef0b394Smrgirix* | nonstopux*) 47579ef0b394Smrg symcode='[[BCDEGRST]]' 47589ef0b394Smrg ;; 47599ef0b394Smrgosf*) 47609ef0b394Smrg symcode='[[BCDEGQRST]]' 47619ef0b394Smrg ;; 47629ef0b394Smrgsolaris*) 47639ef0b394Smrg symcode='[[BDRT]]' 47649ef0b394Smrg ;; 47659ef0b394Smrgsco3.2v5*) 47669ef0b394Smrg symcode='[[DT]]' 47679ef0b394Smrg ;; 47689ef0b394Smrgsysv4.2uw2*) 47699ef0b394Smrg symcode='[[DT]]' 47709ef0b394Smrg ;; 47719ef0b394Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 47729ef0b394Smrg symcode='[[ABDT]]' 47739ef0b394Smrg ;; 47749ef0b394Smrgsysv4) 47759ef0b394Smrg symcode='[[DFNSTU]]' 47769ef0b394Smrg ;; 47779ef0b394Smrgesac 4778c5629e66Smrg 47799ef0b394Smrg# If we're using GNU nm, then use its standard symbol codes. 47809ef0b394Smrgcase `$NM -V 2>&1` in 47819ef0b394Smrg*GNU* | *'with BFD'*) 47829ef0b394Smrg symcode='[[ABCDGIRSTW]]' ;; 47839ef0b394Smrgesac 4784c5629e66Smrg 47859ef0b394Smrg# Transform an extracted symbol line into a proper C declaration. 47869ef0b394Smrg# Some systems (esp. on ia64) link data and code symbols differently, 47879ef0b394Smrg# so use this general approach. 47889ef0b394Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 4789c5629e66Smrg 47909ef0b394Smrg# Transform an extracted symbol line into symbol name and symbol address 47919ef0b394Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 47929ef0b394Smrglt_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'" 4793c5629e66Smrg 47949ef0b394Smrg# Handle CRLF in mingw tool chain 47959ef0b394Smrgopt_cr= 47969ef0b394Smrgcase $build_os in 47979ef0b394Smrgmingw*) 47989ef0b394Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 47999ef0b394Smrg ;; 48009ef0b394Smrgesac 4801c5629e66Smrg 48029ef0b394Smrg# Try without a prefix underscore, then with it. 48039ef0b394Smrgfor ac_symprfx in "" "_"; do 4804c5629e66Smrg 48059ef0b394Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 48069ef0b394Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 4807c5629e66Smrg 48089ef0b394Smrg # Write the raw and C identifiers. 48099ef0b394Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 48109ef0b394Smrg # Fake it for dumpbin and say T for any non-static function 48119ef0b394Smrg # and D for any global variable. 48129ef0b394Smrg # Also find C++ and __fastcall symbols from MSVC++, 48139ef0b394Smrg # which start with @ or ?. 48149ef0b394Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 48159ef0b394Smrg" {last_section=section; section=\$ 3};"\ 48169ef0b394Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 48179ef0b394Smrg" \$ 0!~/External *\|/{next};"\ 48189ef0b394Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 48199ef0b394Smrg" {if(hide[section]) next};"\ 48209ef0b394Smrg" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 48219ef0b394Smrg" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 48229ef0b394Smrg" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 48239ef0b394Smrg" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 48249ef0b394Smrg" ' prfx=^$ac_symprfx]" 48259ef0b394Smrg else 48269ef0b394Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 48279ef0b394Smrg fi 48289ef0b394Smrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 4829698f425bSmrg 48309ef0b394Smrg # Check to see that the pipe works correctly. 48319ef0b394Smrg pipe_works=no 4832698f425bSmrg 48339ef0b394Smrg rm -f conftest* 48349ef0b394Smrg cat > conftest.$ac_ext <<_LT_EOF 48359ef0b394Smrg#ifdef __cplusplus 48369ef0b394Smrgextern "C" { 48379ef0b394Smrg#endif 48389ef0b394Smrgchar nm_test_var; 48399ef0b394Smrgvoid nm_test_func(void); 48409ef0b394Smrgvoid nm_test_func(void){} 48419ef0b394Smrg#ifdef __cplusplus 48429ef0b394Smrg} 48439ef0b394Smrg#endif 48449ef0b394Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 48459ef0b394Smrg_LT_EOF 48469ef0b394Smrg 48479ef0b394Smrg if AC_TRY_EVAL(ac_compile); then 48489ef0b394Smrg # Now try to grab the symbols. 48499ef0b394Smrg nlist=conftest.nm 48509ef0b394Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 48519ef0b394Smrg # Try sorting and uniquifying the output. 48529ef0b394Smrg if sort "$nlist" | uniq > "$nlist"T; then 48539ef0b394Smrg mv -f "$nlist"T "$nlist" 4854698f425bSmrg else 48559ef0b394Smrg rm -f "$nlist"T 4856698f425bSmrg fi 4857c5629e66Smrg 48589ef0b394Smrg # Make sure that we snagged all the symbols we need. 48599ef0b394Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 48609ef0b394Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 48619ef0b394Smrg cat <<_LT_EOF > conftest.$ac_ext 48629ef0b394Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 48639ef0b394Smrg#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) 48649ef0b394Smrg/* DATA imports from DLLs on WIN32 con't be const, because runtime 48659ef0b394Smrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 48669ef0b394Smrg# define LT@&t@_DLSYM_CONST 48679ef0b394Smrg#elif defined(__osf__) 48689ef0b394Smrg/* This system does not cope well with relocations in const data. */ 48699ef0b394Smrg# define LT@&t@_DLSYM_CONST 48709ef0b394Smrg#else 48719ef0b394Smrg# define LT@&t@_DLSYM_CONST const 48729ef0b394Smrg#endif 48739ef0b394Smrg 48749ef0b394Smrg#ifdef __cplusplus 48759ef0b394Smrgextern "C" { 48769ef0b394Smrg#endif 48779ef0b394Smrg 48789ef0b394Smrg_LT_EOF 48799ef0b394Smrg # Now generate the symbol file. 48809ef0b394Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 4881266e564dSmrg 48829ef0b394Smrg cat <<_LT_EOF >> conftest.$ac_ext 4883266e564dSmrg 48849ef0b394Smrg/* The mapping between symbol names and symbols. */ 48859ef0b394SmrgLT@&t@_DLSYM_CONST struct { 48869ef0b394Smrg const char *name; 48879ef0b394Smrg void *address; 48889ef0b394Smrg} 48899ef0b394Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 48909ef0b394Smrg{ 48919ef0b394Smrg { "@PROGRAM@", (void *) 0 }, 48929ef0b394Smrg_LT_EOF 48939ef0b394Smrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 48949ef0b394Smrg cat <<\_LT_EOF >> conftest.$ac_ext 48959ef0b394Smrg {0, (void *) 0} 48969ef0b394Smrg}; 4897266e564dSmrg 48989ef0b394Smrg/* This works around a problem in FreeBSD linker */ 48999ef0b394Smrg#ifdef FREEBSD_WORKAROUND 49009ef0b394Smrgstatic const void *lt_preloaded_setup() { 49019ef0b394Smrg return lt__PROGRAM__LTX_preloaded_symbols; 49029ef0b394Smrg} 49039ef0b394Smrg#endif 49049ef0b394Smrg 49059ef0b394Smrg#ifdef __cplusplus 49069ef0b394Smrg} 49079ef0b394Smrg#endif 49089ef0b394Smrg_LT_EOF 49099ef0b394Smrg # Now try linking the two files. 49109ef0b394Smrg mv conftest.$ac_objext conftstm.$ac_objext 49119ef0b394Smrg lt_globsym_save_LIBS=$LIBS 49129ef0b394Smrg lt_globsym_save_CFLAGS=$CFLAGS 49139ef0b394Smrg LIBS="conftstm.$ac_objext" 49149ef0b394Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 49159ef0b394Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 49169ef0b394Smrg pipe_works=yes 49179ef0b394Smrg fi 49189ef0b394Smrg LIBS=$lt_globsym_save_LIBS 49199ef0b394Smrg CFLAGS=$lt_globsym_save_CFLAGS 4920698f425bSmrg else 49219ef0b394Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 4922698f425bSmrg fi 4923698f425bSmrg else 49249ef0b394Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 4925698f425bSmrg fi 49269ef0b394Smrg else 49279ef0b394Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 49289ef0b394Smrg fi 49299ef0b394Smrg else 49309ef0b394Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 49319ef0b394Smrg cat conftest.$ac_ext >&5 49329ef0b394Smrg fi 49339ef0b394Smrg rm -rf conftest* conftst* 4934266e564dSmrg 49359ef0b394Smrg # Do not use the global_symbol_pipe unless it works. 49369ef0b394Smrg if test "$pipe_works" = yes; then 49379ef0b394Smrg break 49389ef0b394Smrg else 49399ef0b394Smrg lt_cv_sys_global_symbol_pipe= 49409ef0b394Smrg fi 49419ef0b394Smrgdone 49429ef0b394Smrg]) 49439ef0b394Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 49449ef0b394Smrg lt_cv_sys_global_symbol_to_cdecl= 49459ef0b394Smrgfi 49469ef0b394Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 49479ef0b394Smrg AC_MSG_RESULT(failed) 49489ef0b394Smrgelse 49499ef0b394Smrg AC_MSG_RESULT(ok) 49509ef0b394Smrgfi 4951266e564dSmrg 49529ef0b394Smrg# Response file support. 49539ef0b394Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 49549ef0b394Smrg nm_file_list_spec='@' 49559ef0b394Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 49569ef0b394Smrg nm_file_list_spec='@' 49579ef0b394Smrgfi 4958266e564dSmrg 49599ef0b394Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 49609ef0b394Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 49619ef0b394Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 49629ef0b394Smrg [Transform the output of nm in a proper C declaration]) 49639ef0b394Smrg_LT_DECL([global_symbol_to_c_name_address], 49649ef0b394Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 49659ef0b394Smrg [Transform the output of nm in a C name address pair]) 49669ef0b394Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 49679ef0b394Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 49689ef0b394Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 49699ef0b394Smrg_LT_DECL([], [nm_file_list_spec], [1], 49709ef0b394Smrg [Specify filename containing input files for $NM]) 49719ef0b394Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 4972266e564dSmrg 4973266e564dSmrg 49749ef0b394Smrg# _LT_COMPILER_PIC([TAGNAME]) 49759ef0b394Smrg# --------------------------- 49769ef0b394Smrgm4_defun([_LT_COMPILER_PIC], 49779ef0b394Smrg[m4_require([_LT_TAG_COMPILER])dnl 49789ef0b394Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 49799ef0b394Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 49809ef0b394Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 4981266e564dSmrg 49829ef0b394Smrgm4_if([$1], [CXX], [ 49839ef0b394Smrg # C++ specific cases for pic, static, wl, etc. 49849ef0b394Smrg if test "$GXX" = yes; then 49859ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 49869ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 49879ef0b394Smrg 49889ef0b394Smrg case $host_os in 49899ef0b394Smrg aix*) 49909ef0b394Smrg # All AIX code is PIC. 49919ef0b394Smrg if test "$host_cpu" = ia64; then 49929ef0b394Smrg # AIX 5 now supports IA64 processor 49939ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4994698f425bSmrg fi 4995698f425bSmrg ;; 4996266e564dSmrg 49979ef0b394Smrg amigaos*) 49989ef0b394Smrg case $host_cpu in 49999ef0b394Smrg powerpc) 50009ef0b394Smrg # see comment about AmigaOS4 .so support 50019ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 50029ef0b394Smrg ;; 50039ef0b394Smrg m68k) 50049ef0b394Smrg # FIXME: we need at least 68020 code to build shared libraries, but 50059ef0b394Smrg # adding the `-m68020' flag to GCC prevents building anything better, 50069ef0b394Smrg # like `-m68040'. 50079ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 5008698f425bSmrg ;; 5009698f425bSmrg esac 5010698f425bSmrg ;; 50119ef0b394Smrg 50129ef0b394Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 50139ef0b394Smrg # PIC is the default for these OSes. 50149ef0b394Smrg ;; 50159ef0b394Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 50169ef0b394Smrg # This hack is so that the source file can tell whether it is being 50179ef0b394Smrg # built for inclusion in a dll (and should export symbols for example). 50189ef0b394Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 50199ef0b394Smrg # (--disable-auto-import) libraries 50209ef0b394Smrg m4_if([$1], [GCJ], [], 50219ef0b394Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 50229ef0b394Smrg ;; 50239ef0b394Smrg darwin* | rhapsody*) 50249ef0b394Smrg # PIC is the default on this platform 50259ef0b394Smrg # Common symbols not allowed in MH_DYLIB files 50269ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 50279ef0b394Smrg ;; 50289ef0b394Smrg *djgpp*) 50299ef0b394Smrg # DJGPP does not support shared libraries at all 50309ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 50319ef0b394Smrg ;; 50329ef0b394Smrg haiku*) 50339ef0b394Smrg # PIC is the default for Haiku. 50349ef0b394Smrg # The "-static" flag exists, but is broken. 50359ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 50369ef0b394Smrg ;; 50379ef0b394Smrg interix[[3-9]]*) 50389ef0b394Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 50399ef0b394Smrg # Instead, we relocate shared libraries at runtime. 5040698f425bSmrg ;; 5041698f425bSmrg sysv4*MP*) 5042698f425bSmrg if test -d /usr/nec; then 50439ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 5044698f425bSmrg fi 5045698f425bSmrg ;; 50469ef0b394Smrg hpux*) 50479ef0b394Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 50489ef0b394Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 50499ef0b394Smrg # sets the default TLS model and affects inlining. 50509ef0b394Smrg case $host_cpu in 50519ef0b394Smrg hppa*64*) 50529ef0b394Smrg ;; 50539ef0b394Smrg *) 50549ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 50559ef0b394Smrg ;; 50569ef0b394Smrg esac 5057698f425bSmrg ;; 50589ef0b394Smrg *qnx* | *nto*) 50599ef0b394Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 50609ef0b394Smrg # it will coredump. 50619ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 5062698f425bSmrg ;; 5063698f425bSmrg *) 50649ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 5065698f425bSmrg ;; 5066698f425bSmrg esac 50679ef0b394Smrg else 50689ef0b394Smrg case $host_os in 50699ef0b394Smrg aix[[4-9]]*) 50709ef0b394Smrg # All AIX code is PIC. 50719ef0b394Smrg if test "$host_cpu" = ia64; then 50729ef0b394Smrg # AIX 5 now supports IA64 processor 50739ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 50749ef0b394Smrg else 50759ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 50769ef0b394Smrg fi 50779ef0b394Smrg ;; 50789ef0b394Smrg chorus*) 50799ef0b394Smrg case $cc_basename in 50809ef0b394Smrg cxch68*) 50819ef0b394Smrg # Green Hills C++ Compiler 50829ef0b394Smrg # _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" 50839ef0b394Smrg ;; 50849ef0b394Smrg esac 50859ef0b394Smrg ;; 50869ef0b394Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 50879ef0b394Smrg # This hack is so that the source file can tell whether it is being 50889ef0b394Smrg # built for inclusion in a dll (and should export symbols for example). 50899ef0b394Smrg m4_if([$1], [GCJ], [], 50909ef0b394Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 50919ef0b394Smrg ;; 50929ef0b394Smrg dgux*) 50939ef0b394Smrg case $cc_basename in 50949ef0b394Smrg ec++*) 50959ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 50969ef0b394Smrg ;; 50979ef0b394Smrg ghcx*) 50989ef0b394Smrg # Green Hills C++ Compiler 50999ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 51009ef0b394Smrg ;; 51019ef0b394Smrg *) 51029ef0b394Smrg ;; 51039ef0b394Smrg esac 51049ef0b394Smrg ;; 51059ef0b394Smrg freebsd* | dragonfly*) 51069ef0b394Smrg # FreeBSD uses GNU C++ 51079ef0b394Smrg ;; 51089ef0b394Smrg hpux9* | hpux10* | hpux11*) 51099ef0b394Smrg case $cc_basename in 51109ef0b394Smrg CC*) 51119ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51129ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 51139ef0b394Smrg if test "$host_cpu" != ia64; then 51149ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 51159ef0b394Smrg fi 51169ef0b394Smrg ;; 51179ef0b394Smrg aCC*) 51189ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51199ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 51209ef0b394Smrg case $host_cpu in 51219ef0b394Smrg hppa*64*|ia64*) 51229ef0b394Smrg # +Z the default 51239ef0b394Smrg ;; 51249ef0b394Smrg *) 51259ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 51269ef0b394Smrg ;; 51279ef0b394Smrg esac 51289ef0b394Smrg ;; 51299ef0b394Smrg *) 51309ef0b394Smrg ;; 51319ef0b394Smrg esac 51329ef0b394Smrg ;; 51339ef0b394Smrg interix*) 51349ef0b394Smrg # This is c89, which is MS Visual C++ (no shared libs) 51359ef0b394Smrg # Anyone wants to do a port? 51369ef0b394Smrg ;; 51379ef0b394Smrg irix5* | irix6* | nonstopux*) 51389ef0b394Smrg case $cc_basename in 51399ef0b394Smrg CC*) 51409ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51419ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 51429ef0b394Smrg # CC pic flag -KPIC is the default. 51439ef0b394Smrg ;; 51449ef0b394Smrg *) 51459ef0b394Smrg ;; 51469ef0b394Smrg esac 51479ef0b394Smrg ;; 51489ef0b394Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 51499ef0b394Smrg case $cc_basename in 51509ef0b394Smrg KCC*) 51519ef0b394Smrg # KAI C++ Compiler 51529ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 51539ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 51549ef0b394Smrg ;; 51559ef0b394Smrg ecpc* ) 51569ef0b394Smrg # old Intel C++ for x86_64 which still supported -KPIC. 51579ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51589ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 51599ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 51609ef0b394Smrg ;; 51619ef0b394Smrg icpc* ) 51629ef0b394Smrg # Intel C++, used to be incompatible with GCC. 51639ef0b394Smrg # ICC 10 doesn't accept -KPIC any more. 51649ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51659ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 51669ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 51679ef0b394Smrg ;; 51689ef0b394Smrg pgCC* | pgcpp*) 51699ef0b394Smrg # Portland Group C++ compiler 51709ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51719ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 51729ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 51739ef0b394Smrg ;; 51749ef0b394Smrg cxx*) 51759ef0b394Smrg # Compaq C++ 51769ef0b394Smrg # Make sure the PIC flag is empty. It appears that all Alpha 51779ef0b394Smrg # Linux and Compaq Tru64 Unix objects are PIC. 51789ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 51799ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 51809ef0b394Smrg ;; 51819ef0b394Smrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 51829ef0b394Smrg # IBM XL 8.0, 9.0 on PPC and BlueGene 51839ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 51849ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 51859ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 51869ef0b394Smrg ;; 51879ef0b394Smrg *) 51889ef0b394Smrg case `$CC -V 2>&1 | sed 5q` in 51899ef0b394Smrg *Sun\ C*) 51909ef0b394Smrg # Sun C++ 5.9 51919ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 51929ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 51939ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 51949ef0b394Smrg ;; 51959ef0b394Smrg esac 51969ef0b394Smrg ;; 51979ef0b394Smrg esac 51989ef0b394Smrg ;; 51999ef0b394Smrg lynxos*) 52009ef0b394Smrg ;; 52019ef0b394Smrg m88k*) 52029ef0b394Smrg ;; 52039ef0b394Smrg mvs*) 52049ef0b394Smrg case $cc_basename in 52059ef0b394Smrg cxx*) 52069ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 52079ef0b394Smrg ;; 52089ef0b394Smrg *) 52099ef0b394Smrg ;; 52109ef0b394Smrg esac 52119ef0b394Smrg ;; 52129ef0b394Smrg netbsd*) 52139ef0b394Smrg ;; 52149ef0b394Smrg *qnx* | *nto*) 52159ef0b394Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 52169ef0b394Smrg # it will coredump. 52179ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 52189ef0b394Smrg ;; 52199ef0b394Smrg osf3* | osf4* | osf5*) 52209ef0b394Smrg case $cc_basename in 52219ef0b394Smrg KCC*) 52229ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 52239ef0b394Smrg ;; 52249ef0b394Smrg RCC*) 52259ef0b394Smrg # Rational C++ 2.4.1 52269ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 52279ef0b394Smrg ;; 52289ef0b394Smrg cxx*) 52299ef0b394Smrg # Digital/Compaq C++ 52309ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 52319ef0b394Smrg # Make sure the PIC flag is empty. It appears that all Alpha 52329ef0b394Smrg # Linux and Compaq Tru64 Unix objects are PIC. 52339ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 52349ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 52359ef0b394Smrg ;; 52369ef0b394Smrg *) 52379ef0b394Smrg ;; 52389ef0b394Smrg esac 5239698f425bSmrg ;; 52409ef0b394Smrg psos*) 52419ef0b394Smrg ;; 52429ef0b394Smrg solaris*) 52439ef0b394Smrg case $cc_basename in 52449ef0b394Smrg CC* | sunCC*) 52459ef0b394Smrg # Sun C++ 4.2, 5.x and Centerline C++ 52469ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 52479ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 52489ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 52499ef0b394Smrg ;; 52509ef0b394Smrg gcx*) 52519ef0b394Smrg # Green Hills C++ Compiler 52529ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 52539ef0b394Smrg ;; 52549ef0b394Smrg *) 52559ef0b394Smrg ;; 52569ef0b394Smrg esac 52579ef0b394Smrg ;; 52589ef0b394Smrg sunos4*) 52599ef0b394Smrg case $cc_basename in 52609ef0b394Smrg CC*) 52619ef0b394Smrg # Sun C++ 4.x 52629ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 52639ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 52649ef0b394Smrg ;; 52659ef0b394Smrg lcc*) 52669ef0b394Smrg # Lucid 52679ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 52689ef0b394Smrg ;; 52699ef0b394Smrg *) 52709ef0b394Smrg ;; 52719ef0b394Smrg esac 52729ef0b394Smrg ;; 52739ef0b394Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 52749ef0b394Smrg case $cc_basename in 52759ef0b394Smrg CC*) 52769ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 52779ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 52789ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 52799ef0b394Smrg ;; 52809ef0b394Smrg esac 52819ef0b394Smrg ;; 52829ef0b394Smrg tandem*) 52839ef0b394Smrg case $cc_basename in 52849ef0b394Smrg NCC*) 52859ef0b394Smrg # NonStop-UX NCC 3.20 52869ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 52879ef0b394Smrg ;; 52889ef0b394Smrg *) 52899ef0b394Smrg ;; 52909ef0b394Smrg esac 52919ef0b394Smrg ;; 52929ef0b394Smrg vxworks*) 52939ef0b394Smrg ;; 52949ef0b394Smrg *) 52959ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 52969ef0b394Smrg ;; 52979ef0b394Smrg esac 52989ef0b394Smrg fi 52999ef0b394Smrg], 5300698f425bSmrg[ 53019ef0b394Smrg if test "$GCC" = yes; then 53029ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 53039ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 5304266e564dSmrg 53059ef0b394Smrg case $host_os in 53069ef0b394Smrg aix*) 53079ef0b394Smrg # All AIX code is PIC. 53089ef0b394Smrg if test "$host_cpu" = ia64; then 53099ef0b394Smrg # AIX 5 now supports IA64 processor 53109ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 53119ef0b394Smrg fi 53129ef0b394Smrg ;; 5313698f425bSmrg 53149ef0b394Smrg amigaos*) 53159ef0b394Smrg case $host_cpu in 53169ef0b394Smrg powerpc) 53179ef0b394Smrg # see comment about AmigaOS4 .so support 53189ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 53199ef0b394Smrg ;; 53209ef0b394Smrg m68k) 53219ef0b394Smrg # FIXME: we need at least 68020 code to build shared libraries, but 53229ef0b394Smrg # adding the `-m68020' flag to GCC prevents building anything better, 53239ef0b394Smrg # like `-m68040'. 53249ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 53259ef0b394Smrg ;; 53269ef0b394Smrg esac 53279ef0b394Smrg ;; 5328698f425bSmrg 53299ef0b394Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 53309ef0b394Smrg # PIC is the default for these OSes. 53319ef0b394Smrg ;; 5332698f425bSmrg 53339ef0b394Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 53349ef0b394Smrg # This hack is so that the source file can tell whether it is being 53359ef0b394Smrg # built for inclusion in a dll (and should export symbols for example). 53369ef0b394Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 53379ef0b394Smrg # (--disable-auto-import) libraries 53389ef0b394Smrg m4_if([$1], [GCJ], [], 53399ef0b394Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 53409ef0b394Smrg ;; 5341698f425bSmrg 53429ef0b394Smrg darwin* | rhapsody*) 53439ef0b394Smrg # PIC is the default on this platform 53449ef0b394Smrg # Common symbols not allowed in MH_DYLIB files 53459ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 53469ef0b394Smrg ;; 5347698f425bSmrg 53489ef0b394Smrg haiku*) 53499ef0b394Smrg # PIC is the default for Haiku. 53509ef0b394Smrg # The "-static" flag exists, but is broken. 53519ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 53529ef0b394Smrg ;; 5353266e564dSmrg 53549ef0b394Smrg hpux*) 53559ef0b394Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 53569ef0b394Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 53579ef0b394Smrg # sets the default TLS model and affects inlining. 53589ef0b394Smrg case $host_cpu in 53599ef0b394Smrg hppa*64*) 53609ef0b394Smrg # +Z the default 53619ef0b394Smrg ;; 53629ef0b394Smrg *) 53639ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 53649ef0b394Smrg ;; 53659ef0b394Smrg esac 53669ef0b394Smrg ;; 5367266e564dSmrg 53689ef0b394Smrg interix[[3-9]]*) 53699ef0b394Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 53709ef0b394Smrg # Instead, we relocate shared libraries at runtime. 53719ef0b394Smrg ;; 5372266e564dSmrg 53739ef0b394Smrg msdosdjgpp*) 53749ef0b394Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 53759ef0b394Smrg # on systems that don't support them. 53769ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 53779ef0b394Smrg enable_shared=no 53789ef0b394Smrg ;; 5379266e564dSmrg 53809ef0b394Smrg *nto* | *qnx*) 53819ef0b394Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 53829ef0b394Smrg # it will coredump. 53839ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 53849ef0b394Smrg ;; 5385266e564dSmrg 53869ef0b394Smrg sysv4*MP*) 53879ef0b394Smrg if test -d /usr/nec; then 53889ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 53899ef0b394Smrg fi 53909ef0b394Smrg ;; 5391266e564dSmrg 53929ef0b394Smrg *) 53939ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 53949ef0b394Smrg ;; 53959ef0b394Smrg esac 5396266e564dSmrg 53979ef0b394Smrg case $cc_basename in 53989ef0b394Smrg nvcc*) # Cuda Compiler Driver 2.2 53999ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 54009ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC' 54019ef0b394Smrg ;; 54029ef0b394Smrg esac 54039ef0b394Smrg else 54049ef0b394Smrg # PORTME Check for flag to pass linker flags through the system compiler. 54059ef0b394Smrg case $host_os in 54069ef0b394Smrg aix*) 54079ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54089ef0b394Smrg if test "$host_cpu" = ia64; then 54099ef0b394Smrg # AIX 5 now supports IA64 processor 54109ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 5411698f425bSmrg else 54129ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 5413698f425bSmrg fi 54149ef0b394Smrg ;; 5415266e564dSmrg 54169ef0b394Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 54179ef0b394Smrg # This hack is so that the source file can tell whether it is being 54189ef0b394Smrg # built for inclusion in a dll (and should export symbols for example). 54199ef0b394Smrg m4_if([$1], [GCJ], [], 54209ef0b394Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 54219ef0b394Smrg ;; 5422266e564dSmrg 54239ef0b394Smrg hpux9* | hpux10* | hpux11*) 54249ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54259ef0b394Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 54269ef0b394Smrg # not for PA HP-UX. 54279ef0b394Smrg case $host_cpu in 54289ef0b394Smrg hppa*64*|ia64*) 54299ef0b394Smrg # +Z the default 54309ef0b394Smrg ;; 54319ef0b394Smrg *) 54329ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 54339ef0b394Smrg ;; 54349ef0b394Smrg esac 54359ef0b394Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 54369ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 54379ef0b394Smrg ;; 5438698f425bSmrg 54399ef0b394Smrg irix5* | irix6* | nonstopux*) 54409ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54419ef0b394Smrg # PIC (with -KPIC) is the default. 54429ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 54439ef0b394Smrg ;; 5444266e564dSmrg 54459ef0b394Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 54469ef0b394Smrg case $cc_basename in 54479ef0b394Smrg # old Intel for x86_64 which still supported -KPIC. 54489ef0b394Smrg ecc*) 54499ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54509ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 54519ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 54529ef0b394Smrg ;; 54539ef0b394Smrg # icc used to be incompatible with GCC. 54549ef0b394Smrg # ICC 10 doesn't accept -KPIC any more. 54559ef0b394Smrg icc* | ifort*) 54569ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54579ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 54589ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 54599ef0b394Smrg ;; 54609ef0b394Smrg # Lahey Fortran 8.1. 54619ef0b394Smrg lf95*) 54629ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54639ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 54649ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 54659ef0b394Smrg ;; 54669ef0b394Smrg nagfor*) 54679ef0b394Smrg # NAG Fortran compiler 54689ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 54699ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 54709ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54719ef0b394Smrg ;; 54729ef0b394Smrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 54739ef0b394Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 54749ef0b394Smrg # which looks to be a dead project) 54759ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54769ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 54779ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54789ef0b394Smrg ;; 54799ef0b394Smrg ccc*) 54809ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54819ef0b394Smrg # All Alpha code is PIC. 54829ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 54839ef0b394Smrg ;; 54849ef0b394Smrg xl* | bgxl* | bgf* | mpixl*) 54859ef0b394Smrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 54869ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 54879ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 54889ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 54899ef0b394Smrg ;; 54909ef0b394Smrg *) 54919ef0b394Smrg case `$CC -V 2>&1 | sed 5q` in 54929ef0b394Smrg *Sun\ F* | *Sun*Fortran*) 54939ef0b394Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 54949ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 54959ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 54969ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 54979ef0b394Smrg ;; 54989ef0b394Smrg *Sun\ C*) 54999ef0b394Smrg # Sun C 5.9 55009ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 55019ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55029ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 55039ef0b394Smrg ;; 55049ef0b394Smrg esac 55059ef0b394Smrg ;; 55069ef0b394Smrg esac 55079ef0b394Smrg ;; 5508266e564dSmrg 55099ef0b394Smrg newsos6) 55109ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 55119ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55129ef0b394Smrg ;; 5513698f425bSmrg 55149ef0b394Smrg *nto* | *qnx*) 55159ef0b394Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 55169ef0b394Smrg # it will coredump. 55179ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 55189ef0b394Smrg ;; 5519698f425bSmrg 55209ef0b394Smrg osf3* | osf4* | osf5*) 55219ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 55229ef0b394Smrg # All OSF/1 code is PIC. 55239ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 55249ef0b394Smrg ;; 5525266e564dSmrg 55269ef0b394Smrg rdos*) 55279ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 55289ef0b394Smrg ;; 5529698f425bSmrg 55309ef0b394Smrg solaris*) 55319ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 55329ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55339ef0b394Smrg case $cc_basename in 55349ef0b394Smrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 55359ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 55369ef0b394Smrg *) 55379ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 55389ef0b394Smrg esac 55399ef0b394Smrg ;; 5540266e564dSmrg 55419ef0b394Smrg sunos4*) 55429ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 55439ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 55449ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55459ef0b394Smrg ;; 5546266e564dSmrg 55479ef0b394Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 55489ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 55499ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 55509ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55519ef0b394Smrg ;; 5552266e564dSmrg 55539ef0b394Smrg sysv4*MP*) 55549ef0b394Smrg if test -d /usr/nec ;then 55559ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 55569ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55579ef0b394Smrg fi 55589ef0b394Smrg ;; 5559266e564dSmrg 55609ef0b394Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 55619ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 55629ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 55639ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55649ef0b394Smrg ;; 5565698f425bSmrg 55669ef0b394Smrg unicos*) 55679ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 55689ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 55699ef0b394Smrg ;; 5570266e564dSmrg 55719ef0b394Smrg uts4*) 55729ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 55739ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 55749ef0b394Smrg ;; 5575266e564dSmrg 55769ef0b394Smrg *) 55779ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 55789ef0b394Smrg ;; 55799ef0b394Smrg esac 55809ef0b394Smrg fi 55819ef0b394Smrg]) 55829ef0b394Smrgcase $host_os in 55839ef0b394Smrg # For platforms which do not support PIC, -DPIC is meaningless: 55849ef0b394Smrg *djgpp*) 55859ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 55869ef0b394Smrg ;; 55879ef0b394Smrg *) 55889ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 55899ef0b394Smrg ;; 55909ef0b394Smrgesac 5591266e564dSmrg 55929ef0b394SmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 55939ef0b394Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 55949ef0b394Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 55959ef0b394Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 5596266e564dSmrg 55979ef0b394Smrg# 55989ef0b394Smrg# Check to make sure the PIC flag actually works. 55999ef0b394Smrg# 56009ef0b394Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 56019ef0b394Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 56029ef0b394Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 56039ef0b394Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 56049ef0b394Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 56059ef0b394Smrg "" | " "*) ;; 56069ef0b394Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 56079ef0b394Smrg esac], 56089ef0b394Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 56099ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 56109ef0b394Smrgfi 56119ef0b394Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 56129ef0b394Smrg [Additional compiler flags for building library objects]) 5613698f425bSmrg 56149ef0b394Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 56159ef0b394Smrg [How to pass a linker flag through the compiler]) 56169ef0b394Smrg# 56179ef0b394Smrg# Check to make sure the static flag actually works. 56189ef0b394Smrg# 56199ef0b394Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 56209ef0b394Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 56219ef0b394Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 56229ef0b394Smrg $lt_tmp_static_flag, 56239ef0b394Smrg [], 56249ef0b394Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 56259ef0b394Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 56269ef0b394Smrg [Compiler flag to prevent dynamic linking]) 56279ef0b394Smrg])# _LT_COMPILER_PIC 5628266e564dSmrg 5629698f425bSmrg 56309ef0b394Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 56319ef0b394Smrg# ---------------------------- 56329ef0b394Smrg# See if the linker supports building shared libraries. 56339ef0b394Smrgm4_defun([_LT_LINKER_SHLIBS], 56349ef0b394Smrg[AC_REQUIRE([LT_PATH_LD])dnl 56359ef0b394SmrgAC_REQUIRE([LT_PATH_NM])dnl 56369ef0b394Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 56379ef0b394Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 56389ef0b394Smrgm4_require([_LT_DECL_EGREP])dnl 56399ef0b394Smrgm4_require([_LT_DECL_SED])dnl 56409ef0b394Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 56419ef0b394Smrgm4_require([_LT_TAG_COMPILER])dnl 56429ef0b394SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 56439ef0b394Smrgm4_if([$1], [CXX], [ 56449ef0b394Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 56459ef0b394Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 56469ef0b394Smrg case $host_os in 56479ef0b394Smrg aix[[4-9]]*) 56489ef0b394Smrg # If we're using GNU nm, then we don't want the "-C" option. 56499ef0b394Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 56509ef0b394Smrg # Also, AIX nm treats weak defined symbols like other global defined 56519ef0b394Smrg # symbols, whereas GNU nm marks them as "W". 56529ef0b394Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 56539ef0b394Smrg _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' 56549ef0b394Smrg else 56559ef0b394Smrg _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' 56569ef0b394Smrg fi 56579ef0b394Smrg ;; 56589ef0b394Smrg pw32*) 56599ef0b394Smrg _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 56609ef0b394Smrg ;; 56619ef0b394Smrg cygwin* | mingw* | cegcc*) 56629ef0b394Smrg case $cc_basename in 56639ef0b394Smrg cl*) ;; 56649ef0b394Smrg *) 56659ef0b394Smrg _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' 56669ef0b394Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 56679ef0b394Smrg ;; 56689ef0b394Smrg esac 56699ef0b394Smrg ;; 56709ef0b394Smrg *) 56719ef0b394Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 56729ef0b394Smrg ;; 56739ef0b394Smrg esac 56749ef0b394Smrg], [ 56759ef0b394Smrg runpath_var= 56769ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 56779ef0b394Smrg _LT_TAGVAR(always_export_symbols, $1)=no 56789ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)= 56799ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 56809ef0b394Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 56819ef0b394Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 56829ef0b394Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 56839ef0b394Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 56849ef0b394Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 56859ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=no 56869ef0b394Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 56879ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 56889ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 56899ef0b394Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 56909ef0b394Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 56919ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 56929ef0b394Smrg _LT_TAGVAR(inherit_rpath, $1)=no 56939ef0b394Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 56949ef0b394Smrg _LT_TAGVAR(module_cmds, $1)= 56959ef0b394Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 56969ef0b394Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 56979ef0b394Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 56989ef0b394Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 56999ef0b394Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 57009ef0b394Smrg # include_expsyms should be a list of space-separated symbols to be *always* 57019ef0b394Smrg # included in the symbol list 57029ef0b394Smrg _LT_TAGVAR(include_expsyms, $1)= 57039ef0b394Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 57049ef0b394Smrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 57059ef0b394Smrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 57069ef0b394Smrg # as well as any symbol that contains `d'. 57079ef0b394Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 57089ef0b394Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 57099ef0b394Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 57109ef0b394Smrg # the symbol is explicitly referenced. Since portable code cannot 57119ef0b394Smrg # rely on this symbol name, it's probably fine to never include it in 57129ef0b394Smrg # preloaded symbol tables. 57139ef0b394Smrg # Exclude shared library initialization/finalization symbols. 57149ef0b394Smrgdnl Note also adjust exclude_expsyms for C++ above. 57159ef0b394Smrg extract_expsyms_cmds= 5716698f425bSmrg 57179ef0b394Smrg case $host_os in 57189ef0b394Smrg cygwin* | mingw* | pw32* | cegcc*) 57199ef0b394Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 57209ef0b394Smrg # When not using gcc, we currently assume that we are using 57219ef0b394Smrg # Microsoft Visual C++. 57229ef0b394Smrg if test "$GCC" != yes; then 57239ef0b394Smrg with_gnu_ld=no 57249ef0b394Smrg fi 57259ef0b394Smrg ;; 57269ef0b394Smrg interix*) 57279ef0b394Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 57289ef0b394Smrg with_gnu_ld=yes 57299ef0b394Smrg ;; 57309ef0b394Smrg openbsd*) 57319ef0b394Smrg with_gnu_ld=no 57329ef0b394Smrg ;; 57339ef0b394Smrg esac 5734266e564dSmrg 57359ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 5736698f425bSmrg 57379ef0b394Smrg # On some targets, GNU ld is compatible enough with the native linker 57389ef0b394Smrg # that we're better off using the native interface for both. 57399ef0b394Smrg lt_use_gnu_ld_interface=no 57409ef0b394Smrg if test "$with_gnu_ld" = yes; then 57419ef0b394Smrg case $host_os in 57429ef0b394Smrg aix*) 57439ef0b394Smrg # The AIX port of GNU ld has always aspired to compatibility 57449ef0b394Smrg # with the native linker. However, as the warning in the GNU ld 57459ef0b394Smrg # block says, versions before 2.19.5* couldn't really create working 57469ef0b394Smrg # shared libraries, regardless of the interface used. 57479ef0b394Smrg case `$LD -v 2>&1` in 57489ef0b394Smrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 57499ef0b394Smrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 57509ef0b394Smrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 57519ef0b394Smrg *) 57529ef0b394Smrg lt_use_gnu_ld_interface=yes 5753698f425bSmrg ;; 57549ef0b394Smrg esac 57559ef0b394Smrg ;; 57569ef0b394Smrg *) 57579ef0b394Smrg lt_use_gnu_ld_interface=yes 57589ef0b394Smrg ;; 57599ef0b394Smrg esac 57609ef0b394Smrg fi 5761266e564dSmrg 57629ef0b394Smrg if test "$lt_use_gnu_ld_interface" = yes; then 57639ef0b394Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 57649ef0b394Smrg wlarc='${wl}' 5765698f425bSmrg 57669ef0b394Smrg # Set some defaults for GNU ld with shared library support. These 57679ef0b394Smrg # are reset later if shared libraries are not supported. Putting them 57689ef0b394Smrg # here allows them to be overridden if necessary. 57699ef0b394Smrg runpath_var=LD_RUN_PATH 57709ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 57719ef0b394Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 57729ef0b394Smrg # ancient GNU ld didn't support --whole-archive et. al. 57739ef0b394Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 57749ef0b394Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 57759ef0b394Smrg else 57769ef0b394Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 57779ef0b394Smrg fi 57789ef0b394Smrg supports_anon_versioning=no 57799ef0b394Smrg case `$LD -v 2>&1` in 57809ef0b394Smrg *GNU\ gold*) supports_anon_versioning=yes ;; 57819ef0b394Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 57829ef0b394Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 57839ef0b394Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 57849ef0b394Smrg *\ 2.11.*) ;; # other 2.11 versions 57859ef0b394Smrg *) supports_anon_versioning=yes ;; 57869ef0b394Smrg esac 5787698f425bSmrg 57889ef0b394Smrg # See if GNU ld supports shared libraries. 57899ef0b394Smrg case $host_os in 57909ef0b394Smrg aix[[3-9]]*) 57919ef0b394Smrg # On AIX/PPC, the GNU linker is very broken 57929ef0b394Smrg if test "$host_cpu" != ia64; then 57939ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 57949ef0b394Smrg cat <<_LT_EOF 1>&2 5795698f425bSmrg 57969ef0b394Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported 57979ef0b394Smrg*** to be unable to reliably create shared libraries on AIX. 57989ef0b394Smrg*** Therefore, libtool is disabling shared libraries support. If you 57999ef0b394Smrg*** really care for shared libraries, you may want to install binutils 58009ef0b394Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 58019ef0b394Smrg*** You will then need to restart the configuration process. 5802266e564dSmrg 58039ef0b394Smrg_LT_EOF 58049ef0b394Smrg fi 58059ef0b394Smrg ;; 5806266e564dSmrg 58079ef0b394Smrg amigaos*) 58089ef0b394Smrg case $host_cpu in 58099ef0b394Smrg powerpc) 58109ef0b394Smrg # see comment about AmigaOS4 .so support 58119ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 58129ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 58139ef0b394Smrg ;; 58149ef0b394Smrg m68k) 58159ef0b394Smrg _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)' 58169ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 58179ef0b394Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 58189ef0b394Smrg ;; 58199ef0b394Smrg esac 58209ef0b394Smrg ;; 5821266e564dSmrg 58229ef0b394Smrg beos*) 58239ef0b394Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 58249ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 58259ef0b394Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 58269ef0b394Smrg # support --undefined. This deserves some investigation. FIXME 58279ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 58289ef0b394Smrg else 58299ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 58309ef0b394Smrg fi 58319ef0b394Smrg ;; 5832698f425bSmrg 58339ef0b394Smrg cygwin* | mingw* | pw32* | cegcc*) 58349ef0b394Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 58359ef0b394Smrg # as there is no search path for DLLs. 58369ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 58379ef0b394Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 58389ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 58399ef0b394Smrg _LT_TAGVAR(always_export_symbols, $1)=no 58409ef0b394Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 58419ef0b394Smrg _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' 58429ef0b394Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 58439ef0b394Smrg 58449ef0b394Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 58459ef0b394Smrg _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' 58469ef0b394Smrg # If the export-symbols file already is a .def file (1st line 58479ef0b394Smrg # is EXPORTS), use it as is; otherwise, prepend... 58489ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 58499ef0b394Smrg cp $export_symbols $output_objdir/$soname.def; 58509ef0b394Smrg else 58519ef0b394Smrg echo EXPORTS > $output_objdir/$soname.def; 58529ef0b394Smrg cat $export_symbols >> $output_objdir/$soname.def; 58539ef0b394Smrg fi~ 58549ef0b394Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 58559ef0b394Smrg else 58569ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 58579ef0b394Smrg fi 58589ef0b394Smrg ;; 58599ef0b394Smrg 58609ef0b394Smrg haiku*) 58619ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 58629ef0b394Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 58639ef0b394Smrg ;; 58649ef0b394Smrg 58659ef0b394Smrg interix[[3-9]]*) 58669ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=no 58679ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 58689ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 58699ef0b394Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 58709ef0b394Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 58719ef0b394Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 58729ef0b394Smrg # default) and relocated if they conflict, which is a slow very memory 58739ef0b394Smrg # consuming and fragmenting process. To avoid this, we pick a random, 58749ef0b394Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 58759ef0b394Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 58769ef0b394Smrg _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' 58779ef0b394Smrg _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' 58789ef0b394Smrg ;; 5879698f425bSmrg 58809ef0b394Smrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 58819ef0b394Smrg tmp_diet=no 58829ef0b394Smrg if test "$host_os" = linux-dietlibc; then 58839ef0b394Smrg case $cc_basename in 58849ef0b394Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 5885698f425bSmrg esac 58869ef0b394Smrg fi 58879ef0b394Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 58889ef0b394Smrg && test "$tmp_diet" = no 58899ef0b394Smrg then 58909ef0b394Smrg tmp_addflag=' $pic_flag' 58919ef0b394Smrg tmp_sharedflag='-shared' 58929ef0b394Smrg case $cc_basename,$host_cpu in 58939ef0b394Smrg pgcc*) # Portland Group C compiler 58949ef0b394Smrg _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' 58959ef0b394Smrg tmp_addflag=' $pic_flag' 58969ef0b394Smrg ;; 58979ef0b394Smrg pgf77* | pgf90* | pgf95* | pgfortran*) 58989ef0b394Smrg # Portland Group f77 and f90 compilers 58999ef0b394Smrg _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' 59009ef0b394Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 59019ef0b394Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 59029ef0b394Smrg tmp_addflag=' -i_dynamic' ;; 59039ef0b394Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 59049ef0b394Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 59059ef0b394Smrg ifc* | ifort*) # Intel Fortran compiler 59069ef0b394Smrg tmp_addflag=' -nofor_main' ;; 59079ef0b394Smrg lf95*) # Lahey Fortran 8.1 59089ef0b394Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 59099ef0b394Smrg tmp_sharedflag='--shared' ;; 59109ef0b394Smrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 59119ef0b394Smrg tmp_sharedflag='-qmkshrobj' 59129ef0b394Smrg tmp_addflag= ;; 59139ef0b394Smrg nvcc*) # Cuda Compiler Driver 2.2 59149ef0b394Smrg _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' 59159ef0b394Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 59169ef0b394Smrg ;; 59179ef0b394Smrg esac 59189ef0b394Smrg case `$CC -V 2>&1 | sed 5q` in 59199ef0b394Smrg *Sun\ C*) # Sun C 5.9 59209ef0b394Smrg _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' 59219ef0b394Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 59229ef0b394Smrg tmp_sharedflag='-G' ;; 59239ef0b394Smrg *Sun\ F*) # Sun Fortran 8.3 59249ef0b394Smrg tmp_sharedflag='-G' ;; 59259ef0b394Smrg esac 59269ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5927266e564dSmrg 59289ef0b394Smrg if test "x$supports_anon_versioning" = xyes; then 59299ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 59309ef0b394Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 59319ef0b394Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 59329ef0b394Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 59339ef0b394Smrg fi 5934266e564dSmrg 59359ef0b394Smrg case $cc_basename in 59369ef0b394Smrg xlf* | bgf* | bgxlf* | mpixlf*) 59379ef0b394Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 59389ef0b394Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 59399ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 59409ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 59419ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 59429ef0b394Smrg if test "x$supports_anon_versioning" = xyes; then 59439ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 59449ef0b394Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 59459ef0b394Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 59469ef0b394Smrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 59479ef0b394Smrg fi 59489ef0b394Smrg ;; 59499ef0b394Smrg esac 59509ef0b394Smrg else 5951698f425bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 59529ef0b394Smrg fi 59539ef0b394Smrg ;; 5954266e564dSmrg 59559ef0b394Smrg netbsd*) 59569ef0b394Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 59579ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 59589ef0b394Smrg wlarc= 59599ef0b394Smrg else 59609ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 59619ef0b394Smrg _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' 59629ef0b394Smrg fi 59639ef0b394Smrg ;; 5964266e564dSmrg 59659ef0b394Smrg solaris*) 59669ef0b394Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 59679ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 59689ef0b394Smrg cat <<_LT_EOF 1>&2 5969266e564dSmrg 59709ef0b394Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 59719ef0b394Smrg*** create shared libraries on Solaris systems. Therefore, libtool 59729ef0b394Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 59739ef0b394Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 59749ef0b394Smrg*** your PATH or compiler configuration so that the native linker is 59759ef0b394Smrg*** used, and then restart. 5976266e564dSmrg 59779ef0b394Smrg_LT_EOF 59789ef0b394Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 59799ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 59809ef0b394Smrg _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' 59819ef0b394Smrg else 5982698f425bSmrg _LT_TAGVAR(ld_shlibs, $1)=no 59839ef0b394Smrg fi 59849ef0b394Smrg ;; 5985266e564dSmrg 59869ef0b394Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 59879ef0b394Smrg case `$LD -v 2>&1` in 59889ef0b394Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 59899ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 59909ef0b394Smrg cat <<_LT_EOF 1>&2 59919ef0b394Smrg 59929ef0b394Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 59939ef0b394Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 59949ef0b394Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 59959ef0b394Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 59969ef0b394Smrg*** your PATH or compiler configuration so that the native linker is 59979ef0b394Smrg*** used, and then restart. 59989ef0b394Smrg 59999ef0b394Smrg_LT_EOF 60009ef0b394Smrg ;; 60019ef0b394Smrg *) 60029ef0b394Smrg # For security reasons, it is highly recommended that you always 60039ef0b394Smrg # use absolute paths for naming shared libraries, and exclude the 60049ef0b394Smrg # DT_RUNPATH tag from executables and libraries. But doing so 60059ef0b394Smrg # requires that you compile everything twice, which is a pain. 60069ef0b394Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 60079ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 60089ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 60099ef0b394Smrg _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' 60109ef0b394Smrg else 60119ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6012698f425bSmrg fi 6013698f425bSmrg ;; 60149ef0b394Smrg esac 60159ef0b394Smrg ;; 6016266e564dSmrg 60179ef0b394Smrg sunos4*) 60189ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 60199ef0b394Smrg wlarc= 60209ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 60219ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60229ef0b394Smrg ;; 6023698f425bSmrg 60249ef0b394Smrg *) 60259ef0b394Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 60269ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 60279ef0b394Smrg _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' 60289ef0b394Smrg else 60299ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 60309ef0b394Smrg fi 60319ef0b394Smrg ;; 60329ef0b394Smrg esac 6033698f425bSmrg 60349ef0b394Smrg if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 60359ef0b394Smrg runpath_var= 60369ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 60379ef0b394Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 60389ef0b394Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 60399ef0b394Smrg fi 60409ef0b394Smrg else 60419ef0b394Smrg # PORTME fill in a description of your system's linker (not GNU ld) 60429ef0b394Smrg case $host_os in 60439ef0b394Smrg aix3*) 60449ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 60459ef0b394Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 60469ef0b394Smrg _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' 60479ef0b394Smrg # Note: this linker hardcodes the directories in LIBPATH if there 60489ef0b394Smrg # are no directories specified by -L. 60499ef0b394Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 60509ef0b394Smrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 60519ef0b394Smrg # Neither direct hardcoding nor static linking is supported with a 60529ef0b394Smrg # broken collect2. 60539ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 60549ef0b394Smrg fi 60559ef0b394Smrg ;; 6056698f425bSmrg 60579ef0b394Smrg aix[[4-9]]*) 60589ef0b394Smrg if test "$host_cpu" = ia64; then 60599ef0b394Smrg # On IA64, the linker does run time linking by default, so we don't 60609ef0b394Smrg # have to do anything special. 60619ef0b394Smrg aix_use_runtimelinking=no 60629ef0b394Smrg exp_sym_flag='-Bexport' 60639ef0b394Smrg no_entry_flag="" 60649ef0b394Smrg else 60659ef0b394Smrg # If we're using GNU nm, then we don't want the "-C" option. 60669ef0b394Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 60679ef0b394Smrg # Also, AIX nm treats weak defined symbols like other global 60689ef0b394Smrg # defined symbols, whereas GNU nm marks them as "W". 60699ef0b394Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 60709ef0b394Smrg _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' 60719ef0b394Smrg else 60729ef0b394Smrg _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' 60739ef0b394Smrg fi 60749ef0b394Smrg aix_use_runtimelinking=no 6075266e564dSmrg 60769ef0b394Smrg # Test if we are trying to use run time linking or normal 60779ef0b394Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 60789ef0b394Smrg # need to do runtime linking. 60799ef0b394Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 60809ef0b394Smrg for ld_flag in $LDFLAGS; do 60819ef0b394Smrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 60829ef0b394Smrg aix_use_runtimelinking=yes 60839ef0b394Smrg break 60849ef0b394Smrg fi 60859ef0b394Smrg done 60869ef0b394Smrg ;; 60879ef0b394Smrg esac 6088266e564dSmrg 60899ef0b394Smrg exp_sym_flag='-bexport' 60909ef0b394Smrg no_entry_flag='-bnoentry' 60919ef0b394Smrg fi 6092698f425bSmrg 60939ef0b394Smrg # When large executables or shared objects are built, AIX ld can 60949ef0b394Smrg # have problems creating the table of contents. If linking a library 60959ef0b394Smrg # or program results in "error TOC overflow" add -mminimal-toc to 60969ef0b394Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 60979ef0b394Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 6098698f425bSmrg 60999ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='' 61009ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 61019ef0b394Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 61029ef0b394Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 61039ef0b394Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 61049ef0b394Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 6105698f425bSmrg 61069ef0b394Smrg if test "$GCC" = yes; then 61079ef0b394Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 61089ef0b394Smrg # We only want to do this on AIX 4.2 and lower, the check 61099ef0b394Smrg # below for broken collect2 doesn't work under 4.3+ 61109ef0b394Smrg collect2name=`${CC} -print-prog-name=collect2` 61119ef0b394Smrg if test -f "$collect2name" && 61129ef0b394Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 61139ef0b394Smrg then 61149ef0b394Smrg # We have reworked collect2 61159ef0b394Smrg : 61169ef0b394Smrg else 61179ef0b394Smrg # We have old collect2 61189ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 61199ef0b394Smrg # It fails to find uninstalled libraries when the uninstalled 61209ef0b394Smrg # path is not listed in the libpath. Setting hardcode_minus_L 61219ef0b394Smrg # to unsupported forces relinking 61229ef0b394Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 61239ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 61249ef0b394Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 61259ef0b394Smrg fi 61269ef0b394Smrg ;; 61279ef0b394Smrg esac 61289ef0b394Smrg shared_flag='-shared' 61299ef0b394Smrg if test "$aix_use_runtimelinking" = yes; then 61309ef0b394Smrg shared_flag="$shared_flag "'${wl}-G' 61319ef0b394Smrg fi 61329ef0b394Smrg else 61339ef0b394Smrg # not using gcc 61349ef0b394Smrg if test "$host_cpu" = ia64; then 61359ef0b394Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 61369ef0b394Smrg # chokes on -Wl,-G. The following line is correct: 61379ef0b394Smrg shared_flag='-G' 61389ef0b394Smrg else 61399ef0b394Smrg if test "$aix_use_runtimelinking" = yes; then 61409ef0b394Smrg shared_flag='${wl}-G' 61419ef0b394Smrg else 61429ef0b394Smrg shared_flag='${wl}-bM:SRE' 61439ef0b394Smrg fi 61449ef0b394Smrg fi 61459ef0b394Smrg fi 6146266e564dSmrg 61479ef0b394Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 61489ef0b394Smrg # It seems that -bexpall does not export symbols beginning with 61499ef0b394Smrg # underscore (_), so it is better to generate a list of symbols to export. 61509ef0b394Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 61519ef0b394Smrg if test "$aix_use_runtimelinking" = yes; then 61529ef0b394Smrg # Warning - without using the other runtime loading flags (-brtl), 61539ef0b394Smrg # -berok will link without error, but may produce a broken library. 61549ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 61559ef0b394Smrg # Determine the default libpath from the value encoded in an 61569ef0b394Smrg # empty executable. 61579ef0b394Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 61589ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 61599ef0b394Smrg _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" 61609ef0b394Smrg else 61619ef0b394Smrg if test "$host_cpu" = ia64; then 61629ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 61639ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 61649ef0b394Smrg _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" 61659ef0b394Smrg else 61669ef0b394Smrg # Determine the default libpath from the value encoded in an 61679ef0b394Smrg # empty executable. 61689ef0b394Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 61699ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 61709ef0b394Smrg # Warning - without using the other run time loading flags, 61719ef0b394Smrg # -berok will link without error, but may produce a broken library. 61729ef0b394Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 61739ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 61749ef0b394Smrg if test "$with_gnu_ld" = yes; then 61759ef0b394Smrg # We only use this code for GNU lds that support --whole-archive. 61769ef0b394Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 61779ef0b394Smrg else 61789ef0b394Smrg # Exported symbols can be pulled into shared objects from archives 61799ef0b394Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 61809ef0b394Smrg fi 61819ef0b394Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 61829ef0b394Smrg # This is similar to how AIX traditionally builds its shared libraries. 61839ef0b394Smrg _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' 61849ef0b394Smrg fi 61859ef0b394Smrg fi 61869ef0b394Smrg ;; 6187266e564dSmrg 61889ef0b394Smrg amigaos*) 61899ef0b394Smrg case $host_cpu in 61909ef0b394Smrg powerpc) 61919ef0b394Smrg # see comment about AmigaOS4 .so support 61929ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 61939ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 61949ef0b394Smrg ;; 61959ef0b394Smrg m68k) 61969ef0b394Smrg _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)' 61979ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 61989ef0b394Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6199698f425bSmrg ;; 62009ef0b394Smrg esac 62019ef0b394Smrg ;; 6202266e564dSmrg 62039ef0b394Smrg bsdi[[45]]*) 62049ef0b394Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 62059ef0b394Smrg ;; 6206698f425bSmrg 62079ef0b394Smrg cygwin* | mingw* | pw32* | cegcc*) 62089ef0b394Smrg # When not using gcc, we currently assume that we are using 62099ef0b394Smrg # Microsoft Visual C++. 62109ef0b394Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 62119ef0b394Smrg # no search path for DLLs. 62129ef0b394Smrg case $cc_basename in 62139ef0b394Smrg cl*) 62149ef0b394Smrg # Native MSVC 62159ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 62169ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 62179ef0b394Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 62189ef0b394Smrg _LT_TAGVAR(file_list_spec, $1)='@' 62199ef0b394Smrg # Tell ltmain to make .lib files, not .a files. 62209ef0b394Smrg libext=lib 62219ef0b394Smrg # Tell ltmain to make .dll files, not .so files. 62229ef0b394Smrg shrext_cmds=".dll" 62239ef0b394Smrg # FIXME: Setting linknames here is a bad hack. 62249ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 62259ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 62269ef0b394Smrg sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 62279ef0b394Smrg else 62289ef0b394Smrg sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 62299ef0b394Smrg fi~ 62309ef0b394Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 62319ef0b394Smrg linknames=' 62329ef0b394Smrg # The linker will not automatically build a static lib if we build a DLL. 62339ef0b394Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 62349ef0b394Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 62359ef0b394Smrg _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' 62369ef0b394Smrg # Don't use ranlib 62379ef0b394Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 62389ef0b394Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 62399ef0b394Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 62409ef0b394Smrg case $lt_outputfile in 62419ef0b394Smrg *.exe|*.EXE) ;; 62429ef0b394Smrg *) 62439ef0b394Smrg lt_outputfile="$lt_outputfile.exe" 62449ef0b394Smrg lt_tool_outputfile="$lt_tool_outputfile.exe" 62459ef0b394Smrg ;; 62469ef0b394Smrg esac~ 62479ef0b394Smrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 62489ef0b394Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 62499ef0b394Smrg $RM "$lt_outputfile.manifest"; 62509ef0b394Smrg fi' 62519ef0b394Smrg ;; 62529ef0b394Smrg *) 62539ef0b394Smrg # Assume MSVC wrapper 62549ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 62559ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 62569ef0b394Smrg # Tell ltmain to make .lib files, not .a files. 62579ef0b394Smrg libext=lib 62589ef0b394Smrg # Tell ltmain to make .dll files, not .so files. 62599ef0b394Smrg shrext_cmds=".dll" 62609ef0b394Smrg # FIXME: Setting linknames here is a bad hack. 62619ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 62629ef0b394Smrg # The linker will automatically build a .lib file if we build a DLL. 62639ef0b394Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 62649ef0b394Smrg # FIXME: Should let the user specify the lib program. 62659ef0b394Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 62669ef0b394Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 62679ef0b394Smrg ;; 62689ef0b394Smrg esac 62699ef0b394Smrg ;; 6270266e564dSmrg 62719ef0b394Smrg darwin* | rhapsody*) 62729ef0b394Smrg _LT_DARWIN_LINKER_FEATURES($1) 62739ef0b394Smrg ;; 6274266e564dSmrg 62759ef0b394Smrg dgux*) 62769ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 62779ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 62789ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 62799ef0b394Smrg ;; 6280266e564dSmrg 62819ef0b394Smrg freebsd1*) 62829ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 62839ef0b394Smrg ;; 62849ef0b394Smrg 62859ef0b394Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 62869ef0b394Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 62879ef0b394Smrg # does not break anything, and helps significantly (at the cost of a little 62889ef0b394Smrg # extra space). 62899ef0b394Smrg freebsd2.2*) 62909ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 62919ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 62929ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 62939ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 62949ef0b394Smrg ;; 62959ef0b394Smrg 62969ef0b394Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 62979ef0b394Smrg freebsd2*) 62989ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 62999ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 63009ef0b394Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 63019ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 63029ef0b394Smrg ;; 6303698f425bSmrg 63049ef0b394Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 63059ef0b394Smrg freebsd* | dragonfly*) 63069ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 63079ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 63089ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 63099ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 63109ef0b394Smrg ;; 6311698f425bSmrg 63129ef0b394Smrg hpux9*) 63139ef0b394Smrg if test "$GCC" = yes; then 63149ef0b394Smrg _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' 63159ef0b394Smrg else 63169ef0b394Smrg _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' 63179ef0b394Smrg fi 63189ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 63199ef0b394Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 63209ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6321698f425bSmrg 63229ef0b394Smrg # hardcode_minus_L: Not really in the search PATH, 63239ef0b394Smrg # but as the default location of the library. 63249ef0b394Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 63259ef0b394Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 63269ef0b394Smrg ;; 6327266e564dSmrg 63289ef0b394Smrg hpux10*) 63299ef0b394Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 63309ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 63319ef0b394Smrg else 63329ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 63339ef0b394Smrg fi 63349ef0b394Smrg if test "$with_gnu_ld" = no; then 63359ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 63369ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 63379ef0b394Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 63389ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 63399ef0b394Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 63409ef0b394Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 63419ef0b394Smrg # hardcode_minus_L: Not really in the search PATH, 63429ef0b394Smrg # but as the default location of the library. 63439ef0b394Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 63449ef0b394Smrg fi 63459ef0b394Smrg ;; 6346266e564dSmrg 63479ef0b394Smrg hpux11*) 63489ef0b394Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 63499ef0b394Smrg case $host_cpu in 63509ef0b394Smrg hppa*64*) 63519ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 63529ef0b394Smrg ;; 63539ef0b394Smrg ia64*) 63549ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 6355698f425bSmrg ;; 6356698f425bSmrg *) 63579ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 6358698f425bSmrg ;; 63599ef0b394Smrg esac 63609ef0b394Smrg else 63619ef0b394Smrg case $host_cpu in 63629ef0b394Smrg hppa*64*) 63639ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 63649ef0b394Smrg ;; 63659ef0b394Smrg ia64*) 63669ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 63679ef0b394Smrg ;; 63689ef0b394Smrg *) 63699ef0b394Smrg m4_if($1, [], [ 63709ef0b394Smrg # Older versions of the 11.00 compiler do not understand -b yet 63719ef0b394Smrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 63729ef0b394Smrg _LT_LINKER_OPTION([if $CC understands -b], 63739ef0b394Smrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 63749ef0b394Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 63759ef0b394Smrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 63769ef0b394Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 63779ef0b394Smrg ;; 63789ef0b394Smrg esac 63799ef0b394Smrg fi 63809ef0b394Smrg if test "$with_gnu_ld" = no; then 63819ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 63829ef0b394Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6383266e564dSmrg 63849ef0b394Smrg case $host_cpu in 63859ef0b394Smrg hppa*64*|ia64*) 63869ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=no 63879ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 63889ef0b394Smrg ;; 63899ef0b394Smrg *) 63909ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 63919ef0b394Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 63929ef0b394Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6393266e564dSmrg 63949ef0b394Smrg # hardcode_minus_L: Not really in the search PATH, 63959ef0b394Smrg # but as the default location of the library. 63969ef0b394Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 63979ef0b394Smrg ;; 6398698f425bSmrg esac 63999ef0b394Smrg fi 6400698f425bSmrg ;; 6401266e564dSmrg 64029ef0b394Smrg irix5* | irix6* | nonstopux*) 64039ef0b394Smrg if test "$GCC" = yes; then 64049ef0b394Smrg _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' 64059ef0b394Smrg # Try to use the -exported_symbol ld option, if it does not 64069ef0b394Smrg # work, assume that -exports_file does not work either and 64079ef0b394Smrg # implicitly export all symbols. 64089ef0b394Smrg # This should be the same for all languages, so no per-tag cache variable. 64099ef0b394Smrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 64109ef0b394Smrg [lt_cv_irix_exported_symbol], 64119ef0b394Smrg [save_LDFLAGS="$LDFLAGS" 64129ef0b394Smrg LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 64139ef0b394Smrg AC_LINK_IFELSE( 64149ef0b394Smrg [AC_LANG_SOURCE( 64159ef0b394Smrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 64169ef0b394Smrg [C++], [[int foo (void) { return 0; }]], 64179ef0b394Smrg [Fortran 77], [[ 64189ef0b394Smrg subroutine foo 64199ef0b394Smrg end]], 64209ef0b394Smrg [Fortran], [[ 64219ef0b394Smrg subroutine foo 64229ef0b394Smrg end]])])], 64239ef0b394Smrg [lt_cv_irix_exported_symbol=yes], 64249ef0b394Smrg [lt_cv_irix_exported_symbol=no]) 64259ef0b394Smrg LDFLAGS="$save_LDFLAGS"]) 64269ef0b394Smrg if test "$lt_cv_irix_exported_symbol" = yes; then 64279ef0b394Smrg _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' 64289ef0b394Smrg fi 64299ef0b394Smrg else 64309ef0b394Smrg _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' 64319ef0b394Smrg _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' 64329ef0b394Smrg fi 64339ef0b394Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 64349ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 64359ef0b394Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 64369ef0b394Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 64379ef0b394Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 64389ef0b394Smrg ;; 6439266e564dSmrg 64409ef0b394Smrg netbsd*) 64419ef0b394Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 64429ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 64439ef0b394Smrg else 64449ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 64459ef0b394Smrg fi 64469ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 64479ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 64489ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 64499ef0b394Smrg ;; 6450266e564dSmrg 64519ef0b394Smrg newsos6) 64529ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 64539ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 64549ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 64559ef0b394Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 64569ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 64579ef0b394Smrg ;; 6458698f425bSmrg 64599ef0b394Smrg *nto* | *qnx*) 64609ef0b394Smrg ;; 6461698f425bSmrg 64629ef0b394Smrg openbsd*) 64639ef0b394Smrg if test -f /usr/libexec/ld.so; then 64649ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 64659ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 64669ef0b394Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 64679ef0b394Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 64689ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 64699ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 64709ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 64719ef0b394Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 64729ef0b394Smrg else 64739ef0b394Smrg case $host_os in 64749ef0b394Smrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 64759ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 64769ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 64779ef0b394Smrg ;; 64789ef0b394Smrg *) 64799ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 64809ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 64819ef0b394Smrg ;; 64829ef0b394Smrg esac 64839ef0b394Smrg fi 64849ef0b394Smrg else 64859ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 64869ef0b394Smrg fi 64879ef0b394Smrg ;; 6488698f425bSmrg 64899ef0b394Smrg os2*) 64909ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 64919ef0b394Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 64929ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 64939ef0b394Smrg _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' 64949ef0b394Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 64959ef0b394Smrg ;; 6496698f425bSmrg 64979ef0b394Smrg osf3*) 64989ef0b394Smrg if test "$GCC" = yes; then 64999ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 65009ef0b394Smrg _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' 65019ef0b394Smrg else 65029ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 65039ef0b394Smrg _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' 65049ef0b394Smrg fi 65059ef0b394Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 65069ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 65079ef0b394Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 65089ef0b394Smrg ;; 6509266e564dSmrg 65109ef0b394Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 65119ef0b394Smrg if test "$GCC" = yes; then 65129ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 65139ef0b394Smrg _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' 65149ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 65159ef0b394Smrg else 65169ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 65179ef0b394Smrg _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' 65189ef0b394Smrg _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~ 65199ef0b394Smrg $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' 6520266e564dSmrg 65219ef0b394Smrg # Both c and cxx compiler support -rpath directly 65229ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 65239ef0b394Smrg fi 65249ef0b394Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 65259ef0b394Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 65269ef0b394Smrg ;; 6527266e564dSmrg 65289ef0b394Smrg solaris*) 65299ef0b394Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 65309ef0b394Smrg if test "$GCC" = yes; then 65319ef0b394Smrg wlarc='${wl}' 65329ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 65339ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 65349ef0b394Smrg $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' 65359ef0b394Smrg else 65369ef0b394Smrg case `$CC -V 2>&1` in 65379ef0b394Smrg *"Compilers 5.0"*) 65389ef0b394Smrg wlarc='' 65399ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 65409ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 65419ef0b394Smrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 65429ef0b394Smrg ;; 65439ef0b394Smrg *) 65449ef0b394Smrg wlarc='${wl}' 65459ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 65469ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 65479ef0b394Smrg $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 65489ef0b394Smrg ;; 65499ef0b394Smrg esac 65509ef0b394Smrg fi 65519ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 65529ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 65539ef0b394Smrg case $host_os in 65549ef0b394Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 65559ef0b394Smrg *) 65569ef0b394Smrg # The compiler driver will combine and reorder linker options, 65579ef0b394Smrg # but understands `-z linker_flag'. GCC discards it without `$wl', 65589ef0b394Smrg # but is careful enough not to reorder. 65599ef0b394Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 65609ef0b394Smrg if test "$GCC" = yes; then 65619ef0b394Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 65629ef0b394Smrg else 65639ef0b394Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 65649ef0b394Smrg fi 65659ef0b394Smrg ;; 65669ef0b394Smrg esac 65679ef0b394Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 65689ef0b394Smrg ;; 6569266e564dSmrg 65709ef0b394Smrg sunos4*) 65719ef0b394Smrg if test "x$host_vendor" = xsequent; then 65729ef0b394Smrg # Use $CC to link under sequent, because it throws in some extra .o 65739ef0b394Smrg # files that make .init and .fini sections work. 65749ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 65759ef0b394Smrg else 65769ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 65779ef0b394Smrg fi 65789ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 65799ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 65809ef0b394Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 65819ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 65829ef0b394Smrg ;; 6583266e564dSmrg 65849ef0b394Smrg sysv4) 65859ef0b394Smrg case $host_vendor in 65869ef0b394Smrg sni) 65879ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 65889ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 65899ef0b394Smrg ;; 65909ef0b394Smrg siemens) 65919ef0b394Smrg ## LD is ld it makes a PLAMLIB 65929ef0b394Smrg ## CC just makes a GrossModule. 65939ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 65949ef0b394Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 65959ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=no 65969ef0b394Smrg ;; 65979ef0b394Smrg motorola) 65989ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 65999ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 66009ef0b394Smrg ;; 66019ef0b394Smrg esac 66029ef0b394Smrg runpath_var='LD_RUN_PATH' 66039ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 66049ef0b394Smrg ;; 6605266e564dSmrg 66069ef0b394Smrg sysv4.3*) 66079ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 66089ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 66099ef0b394Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 66109ef0b394Smrg ;; 6611266e564dSmrg 66129ef0b394Smrg sysv4*MP*) 66139ef0b394Smrg if test -d /usr/nec; then 66149ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 66159ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 66169ef0b394Smrg runpath_var=LD_RUN_PATH 66179ef0b394Smrg hardcode_runpath_var=yes 66189ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 66199ef0b394Smrg fi 66209ef0b394Smrg ;; 6621266e564dSmrg 66229ef0b394Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 66239ef0b394Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 66249ef0b394Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 66259ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 66269ef0b394Smrg runpath_var='LD_RUN_PATH' 6627266e564dSmrg 66289ef0b394Smrg if test "$GCC" = yes; then 66299ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 66309ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 66319ef0b394Smrg else 66329ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 66339ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 66349ef0b394Smrg fi 66359ef0b394Smrg ;; 6636266e564dSmrg 66379ef0b394Smrg sysv5* | sco3.2v5* | sco5v6*) 66389ef0b394Smrg # Note: We can NOT use -z defs as we might desire, because we do not 66399ef0b394Smrg # link with -lc, and that would cause any symbols used from libc to 66409ef0b394Smrg # always be unresolved, which means just about no library would 66419ef0b394Smrg # ever link correctly. If we're not using GNU ld we use -z text 66429ef0b394Smrg # though, which does catch some bad symbols but isn't as heavy-handed 66439ef0b394Smrg # as -z defs. 66449ef0b394Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 66459ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 66469ef0b394Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 66479ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 66489ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 66499ef0b394Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 66509ef0b394Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 66519ef0b394Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 66529ef0b394Smrg runpath_var='LD_RUN_PATH' 6653266e564dSmrg 66549ef0b394Smrg if test "$GCC" = yes; then 66559ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 66569ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 66579ef0b394Smrg else 66589ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 66599ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 66609ef0b394Smrg fi 66619ef0b394Smrg ;; 66629ef0b394Smrg 66639ef0b394Smrg uts4*) 66649ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 66659ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 66669ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 66679ef0b394Smrg ;; 6668266e564dSmrg 66699ef0b394Smrg *) 66709ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 66719ef0b394Smrg ;; 6672698f425bSmrg esac 6673266e564dSmrg 66749ef0b394Smrg if test x$host_vendor = xsni; then 66759ef0b394Smrg case $host in 66769ef0b394Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 66779ef0b394Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 66789ef0b394Smrg ;; 66799ef0b394Smrg esac 66809ef0b394Smrg fi 66819ef0b394Smrg fi 66829ef0b394Smrg]) 66839ef0b394SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 66849ef0b394Smrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 6685266e564dSmrg 66869ef0b394Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 6687266e564dSmrg 66889ef0b394Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 66899ef0b394Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 66909ef0b394Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 66919ef0b394Smrg [The commands to extract the exported symbol list from a shared archive]) 6692266e564dSmrg 66939ef0b394Smrg# 66949ef0b394Smrg# Do we need to explicitly link libc? 66959ef0b394Smrg# 66969ef0b394Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 66979ef0b394Smrgx|xyes) 66989ef0b394Smrg # Assume -lc should be added 66999ef0b394Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6700266e564dSmrg 67019ef0b394Smrg if test "$enable_shared" = yes && test "$GCC" = yes; then 67029ef0b394Smrg case $_LT_TAGVAR(archive_cmds, $1) in 67039ef0b394Smrg *'~'*) 67049ef0b394Smrg # FIXME: we may have to deal with multi-command sequences. 6705698f425bSmrg ;; 67069ef0b394Smrg '$CC '*) 67079ef0b394Smrg # Test whether the compiler implicitly links with -lc since on some 67089ef0b394Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 67099ef0b394Smrg # to ld, don't add -lc before -lgcc. 67109ef0b394Smrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 67119ef0b394Smrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 67129ef0b394Smrg [$RM conftest* 67139ef0b394Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 67149ef0b394Smrg 67159ef0b394Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 67169ef0b394Smrg soname=conftest 67179ef0b394Smrg lib=conftest 67189ef0b394Smrg libobjs=conftest.$ac_objext 67199ef0b394Smrg deplibs= 67209ef0b394Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 67219ef0b394Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 67229ef0b394Smrg compiler_flags=-v 67239ef0b394Smrg linker_flags=-v 67249ef0b394Smrg verstring= 67259ef0b394Smrg output_objdir=. 67269ef0b394Smrg libname=conftest 67279ef0b394Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 67289ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 67299ef0b394Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 67309ef0b394Smrg then 67319ef0b394Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 67329ef0b394Smrg else 67339ef0b394Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 67349ef0b394Smrg fi 67359ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 67369ef0b394Smrg else 67379ef0b394Smrg cat conftest.err 1>&5 67389ef0b394Smrg fi 67399ef0b394Smrg $RM conftest* 67409ef0b394Smrg ]) 67419ef0b394Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 6742698f425bSmrg ;; 6743698f425bSmrg esac 67449ef0b394Smrg fi 6745698f425bSmrg ;; 6746698f425bSmrgesac 6747266e564dSmrg 67489ef0b394Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 67499ef0b394Smrg [Whether or not to add -lc for building shared libraries]) 67509ef0b394Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 67519ef0b394Smrg [enable_shared_with_static_runtimes], [0], 67529ef0b394Smrg [Whether or not to disallow shared libs when runtime libs are static]) 67539ef0b394Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 67549ef0b394Smrg [Compiler flag to allow reflexive dlopens]) 67559ef0b394Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 67569ef0b394Smrg [Compiler flag to generate shared objects directly from archives]) 67579ef0b394Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 67589ef0b394Smrg [Whether the compiler copes with passing no objects directly]) 67599ef0b394Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 67609ef0b394Smrg [Create an old-style archive from a shared archive]) 67619ef0b394Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 67629ef0b394Smrg [Create a temporary old-style archive to link instead of a shared archive]) 67639ef0b394Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 67649ef0b394Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 67659ef0b394Smrg_LT_TAGDECL([], [module_cmds], [2], 67669ef0b394Smrg [Commands used to build a loadable module if different from building 67679ef0b394Smrg a shared archive.]) 67689ef0b394Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 67699ef0b394Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 67709ef0b394Smrg [Whether we are building with GNU ld or not]) 67719ef0b394Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 67729ef0b394Smrg [Flag that allows shared libraries with undefined symbols to be built]) 67739ef0b394Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 67749ef0b394Smrg [Flag that enforces no undefined symbols]) 67759ef0b394Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 67769ef0b394Smrg [Flag to hardcode $libdir into a binary during linking. 67779ef0b394Smrg This must work even if $libdir does not exist]) 67789ef0b394Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], 67799ef0b394Smrg [[If ld is used when linking, flag to hardcode $libdir into a binary 67809ef0b394Smrg during linking. This must work even if $libdir does not exist]]) 67819ef0b394Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 67829ef0b394Smrg [Whether we need a single "-rpath" flag with a separated argument]) 67839ef0b394Smrg_LT_TAGDECL([], [hardcode_direct], [0], 67849ef0b394Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 67859ef0b394Smrg DIR into the resulting binary]) 67869ef0b394Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 67879ef0b394Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 67889ef0b394Smrg DIR into the resulting binary and the resulting library dependency is 67899ef0b394Smrg "absolute", i.e impossible to change by setting ${shlibpath_var} if the 67909ef0b394Smrg library is relocated]) 67919ef0b394Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 67929ef0b394Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 67939ef0b394Smrg into the resulting binary]) 67949ef0b394Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 67959ef0b394Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 67969ef0b394Smrg into the resulting binary]) 67979ef0b394Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 67989ef0b394Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 67999ef0b394Smrg into the library and all subsequent libraries and executables linked 68009ef0b394Smrg against it]) 68019ef0b394Smrg_LT_TAGDECL([], [inherit_rpath], [0], 68029ef0b394Smrg [Set to yes if linker adds runtime paths of dependent libraries 68039ef0b394Smrg to runtime path list]) 68049ef0b394Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 68059ef0b394Smrg [Whether libtool must link a program against all its dependency libraries]) 68069ef0b394Smrg_LT_TAGDECL([], [always_export_symbols], [0], 68079ef0b394Smrg [Set to "yes" if exported symbols are required]) 68089ef0b394Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 68099ef0b394Smrg [The commands to list exported symbols]) 68109ef0b394Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 68119ef0b394Smrg [Symbols that should not be listed in the preloaded symbols]) 68129ef0b394Smrg_LT_TAGDECL([], [include_expsyms], [1], 68139ef0b394Smrg [Symbols that must always be exported]) 68149ef0b394Smrg_LT_TAGDECL([], [prelink_cmds], [2], 68159ef0b394Smrg [Commands necessary for linking programs (against libraries) with templates]) 68169ef0b394Smrg_LT_TAGDECL([], [postlink_cmds], [2], 68179ef0b394Smrg [Commands necessary for finishing linking programs]) 68189ef0b394Smrg_LT_TAGDECL([], [file_list_spec], [1], 68199ef0b394Smrg [Specify filename containing input files]) 68209ef0b394Smrgdnl FIXME: Not yet implemented 68219ef0b394Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 68229ef0b394Smrgdnl [Compiler flag to generate thread safe objects]) 68239ef0b394Smrg])# _LT_LINKER_SHLIBS 68249ef0b394Smrg 68259ef0b394Smrg 68269ef0b394Smrg# _LT_LANG_C_CONFIG([TAG]) 68279ef0b394Smrg# ------------------------ 68289ef0b394Smrg# Ensure that the configuration variables for a C compiler are suitably 68299ef0b394Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 68309ef0b394Smrg# the compiler configuration to `libtool'. 68319ef0b394Smrgm4_defun([_LT_LANG_C_CONFIG], 68329ef0b394Smrg[m4_require([_LT_DECL_EGREP])dnl 68339ef0b394Smrglt_save_CC="$CC" 68349ef0b394SmrgAC_LANG_PUSH(C) 68359ef0b394Smrg 68369ef0b394Smrg# Source file extension for C test sources. 68379ef0b394Smrgac_ext=c 68389ef0b394Smrg 68399ef0b394Smrg# Object file extension for compiled C test sources. 68409ef0b394Smrgobjext=o 68419ef0b394Smrg_LT_TAGVAR(objext, $1)=$objext 68429ef0b394Smrg 68439ef0b394Smrg# Code to be used in simple compile tests 68449ef0b394Smrglt_simple_compile_test_code="int some_variable = 0;" 68459ef0b394Smrg 68469ef0b394Smrg# Code to be used in simple link tests 68479ef0b394Smrglt_simple_link_test_code='int main(){return(0);}' 68489ef0b394Smrg 68499ef0b394Smrg_LT_TAG_COMPILER 68509ef0b394Smrg# Save the default compiler, since it gets overwritten when the other 68519ef0b394Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 68529ef0b394Smrgcompiler_DEFAULT=$CC 68539ef0b394Smrg 68549ef0b394Smrg# save warnings/boilerplate of simple test code 68559ef0b394Smrg_LT_COMPILER_BOILERPLATE 68569ef0b394Smrg_LT_LINKER_BOILERPLATE 68579ef0b394Smrg 68589ef0b394Smrgif test -n "$compiler"; then 68599ef0b394Smrg _LT_COMPILER_NO_RTTI($1) 68609ef0b394Smrg _LT_COMPILER_PIC($1) 68619ef0b394Smrg _LT_COMPILER_C_O($1) 68629ef0b394Smrg _LT_COMPILER_FILE_LOCKS($1) 68639ef0b394Smrg _LT_LINKER_SHLIBS($1) 68649ef0b394Smrg _LT_SYS_DYNAMIC_LINKER($1) 68659ef0b394Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 68669ef0b394Smrg LT_SYS_DLOPEN_SELF 68679ef0b394Smrg _LT_CMD_STRIPLIB 68689ef0b394Smrg 68699ef0b394Smrg # Report which library types will actually be built 68709ef0b394Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 68719ef0b394Smrg AC_MSG_RESULT([$can_build_shared]) 68729ef0b394Smrg 68739ef0b394Smrg AC_MSG_CHECKING([whether to build shared libraries]) 68749ef0b394Smrg test "$can_build_shared" = "no" && enable_shared=no 6875698f425bSmrg 68769ef0b394Smrg # On AIX, shared libraries and static libraries use the same namespace, and 68779ef0b394Smrg # are all built from PIC. 68789ef0b394Smrg case $host_os in 68799ef0b394Smrg aix3*) 68809ef0b394Smrg test "$enable_shared" = yes && enable_static=no 68819ef0b394Smrg if test -n "$RANLIB"; then 68829ef0b394Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 68839ef0b394Smrg postinstall_cmds='$RANLIB $lib' 68849ef0b394Smrg fi 68859ef0b394Smrg ;; 6886698f425bSmrg 68879ef0b394Smrg aix[[4-9]]*) 68889ef0b394Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 68899ef0b394Smrg test "$enable_shared" = yes && enable_static=no 68909ef0b394Smrg fi 68919ef0b394Smrg ;; 68929ef0b394Smrg esac 68939ef0b394Smrg AC_MSG_RESULT([$enable_shared]) 6894266e564dSmrg 68959ef0b394Smrg AC_MSG_CHECKING([whether to build static libraries]) 68969ef0b394Smrg # Make sure either enable_shared or enable_static is yes. 68979ef0b394Smrg test "$enable_shared" = yes || enable_static=yes 68989ef0b394Smrg AC_MSG_RESULT([$enable_static]) 68999ef0b394Smrg 69009ef0b394Smrg _LT_CONFIG($1) 69019ef0b394Smrgfi 69029ef0b394SmrgAC_LANG_POP 69039ef0b394SmrgCC="$lt_save_CC" 69049ef0b394Smrg])# _LT_LANG_C_CONFIG 6905266e564dSmrg 6906266e564dSmrg 69079ef0b394Smrg# _LT_LANG_CXX_CONFIG([TAG]) 6908698f425bSmrg# -------------------------- 69099ef0b394Smrg# Ensure that the configuration variables for a C++ compiler are suitably 69109ef0b394Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 69119ef0b394Smrg# the compiler configuration to `libtool'. 69129ef0b394Smrgm4_defun([_LT_LANG_CXX_CONFIG], 69139ef0b394Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 69149ef0b394Smrgm4_require([_LT_DECL_EGREP])dnl 69159ef0b394Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 69169ef0b394Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 69179ef0b394Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 69189ef0b394Smrg (test "X$CXX" != "Xg++"))) ; then 69199ef0b394Smrg AC_PROG_CXXCPP 69209ef0b394Smrgelse 69219ef0b394Smrg _lt_caught_CXX_error=yes 69229ef0b394Smrgfi 6923266e564dSmrg 69249ef0b394SmrgAC_LANG_PUSH(C++) 6925698f425bSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6926698f425bSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 6927698f425bSmrg_LT_TAGVAR(always_export_symbols, $1)=no 6928698f425bSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 69299ef0b394Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 6930698f425bSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 6931698f425bSmrg_LT_TAGVAR(hardcode_direct, $1)=no 6932698f425bSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 6933698f425bSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6934698f425bSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 6935698f425bSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 6936698f425bSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 69379ef0b394Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 6938698f425bSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 6939698f425bSmrg_LT_TAGVAR(inherit_rpath, $1)=no 6940698f425bSmrg_LT_TAGVAR(module_cmds, $1)= 6941698f425bSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 6942698f425bSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 6943698f425bSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 69449ef0b394Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 69459ef0b394Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 6946698f425bSmrg_LT_TAGVAR(no_undefined_flag, $1)= 6947698f425bSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 6948698f425bSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6949266e564dSmrg 69509ef0b394Smrg# Source file extension for C++ test sources. 69519ef0b394Smrgac_ext=cpp 6952266e564dSmrg 69539ef0b394Smrg# Object file extension for compiled C++ test sources. 6954698f425bSmrgobjext=o 6955698f425bSmrg_LT_TAGVAR(objext, $1)=$objext 6956698f425bSmrg 6957698f425bSmrg# No sense in running all these tests if we already determined that 69589ef0b394Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 6959698f425bSmrg# are currently assumed to apply to all compilers on this platform, 6960698f425bSmrg# and will be corrupted by setting them based on a non-working compiler. 69619ef0b394Smrgif test "$_lt_caught_CXX_error" != yes; then 6962698f425bSmrg # Code to be used in simple compile tests 69639ef0b394Smrg lt_simple_compile_test_code="int some_variable = 0;" 6964266e564dSmrg 6965698f425bSmrg # Code to be used in simple link tests 69669ef0b394Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 6967266e564dSmrg 6968698f425bSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 6969698f425bSmrg _LT_TAG_COMPILER 6970266e564dSmrg 6971698f425bSmrg # save warnings/boilerplate of simple test code 6972698f425bSmrg _LT_COMPILER_BOILERPLATE 6973698f425bSmrg _LT_LINKER_BOILERPLATE 6974266e564dSmrg 6975698f425bSmrg # Allow CC to be a program name with arguments. 69769ef0b394Smrg lt_save_CC=$CC 69779ef0b394Smrg lt_save_CFLAGS=$CFLAGS 69789ef0b394Smrg lt_save_LD=$LD 6979698f425bSmrg lt_save_GCC=$GCC 69809ef0b394Smrg GCC=$GXX 69819ef0b394Smrg lt_save_with_gnu_ld=$with_gnu_ld 69829ef0b394Smrg lt_save_path_LD=$lt_cv_path_LD 69839ef0b394Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 69849ef0b394Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 69859ef0b394Smrg else 69869ef0b394Smrg $as_unset lt_cv_prog_gnu_ld 69879ef0b394Smrg fi 69889ef0b394Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 69899ef0b394Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 69909ef0b394Smrg else 69919ef0b394Smrg $as_unset lt_cv_path_LD 69929ef0b394Smrg fi 69939ef0b394Smrg test -z "${LDCXX+set}" || LD=$LDCXX 69949ef0b394Smrg CC=${CXX-"c++"} 69959ef0b394Smrg CFLAGS=$CXXFLAGS 6996698f425bSmrg compiler=$CC 6997698f425bSmrg _LT_TAGVAR(compiler, $1)=$CC 6998698f425bSmrg _LT_CC_BASENAME([$compiler]) 6999698f425bSmrg 70009ef0b394Smrg if test -n "$compiler"; then 70019ef0b394Smrg # We don't want -fno-exception when compiling C++ code, so set the 70029ef0b394Smrg # no_builtin_flag separately 70039ef0b394Smrg if test "$GXX" = yes; then 70049ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 70059ef0b394Smrg else 70069ef0b394Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 70079ef0b394Smrg fi 7008266e564dSmrg 70099ef0b394Smrg if test "$GXX" = yes; then 70109ef0b394Smrg # Set up default GNU C++ configuration 7011266e564dSmrg 70129ef0b394Smrg LT_PATH_LD 7013266e564dSmrg 70149ef0b394Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 70159ef0b394Smrg # archiving commands below assume that GNU ld is being used. 70169ef0b394Smrg if test "$with_gnu_ld" = yes; then 70179ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 70189ef0b394Smrg _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' 7019266e564dSmrg 70209ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 70219ef0b394Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7022266e564dSmrg 70239ef0b394Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 70249ef0b394Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 70259ef0b394Smrg # investigate it a little bit more. (MM) 70269ef0b394Smrg wlarc='${wl}' 7027698f425bSmrg 70289ef0b394Smrg # ancient GNU ld didn't support --whole-archive et. al. 70299ef0b394Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 70309ef0b394Smrg $GREP 'no-whole-archive' > /dev/null; then 70319ef0b394Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 70329ef0b394Smrg else 70339ef0b394Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 70349ef0b394Smrg fi 70359ef0b394Smrg else 70369ef0b394Smrg with_gnu_ld=no 70379ef0b394Smrg wlarc= 7038698f425bSmrg 70399ef0b394Smrg # A generic and very simple default shared library creation 70409ef0b394Smrg # command for GNU C++ for the case where it uses the native 70419ef0b394Smrg # linker, instead of GNU ld. If possible, this setting should 70429ef0b394Smrg # overridden to take advantage of the native linker features on 70439ef0b394Smrg # the platform it is being used on. 70449ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 70459ef0b394Smrg fi 7046698f425bSmrg 70479ef0b394Smrg # Commands to make compiler produce verbose output that lists 70489ef0b394Smrg # what "hidden" libraries, object files and flags are used when 70499ef0b394Smrg # linking a shared library. 70509ef0b394Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7051698f425bSmrg 70529ef0b394Smrg else 70539ef0b394Smrg GXX=no 70549ef0b394Smrg with_gnu_ld=no 70559ef0b394Smrg wlarc= 70569ef0b394Smrg fi 7057266e564dSmrg 70589ef0b394Smrg # PORTME: fill in a description of your system's C++ link characteristics 70599ef0b394Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 70609ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 70619ef0b394Smrg case $host_os in 70629ef0b394Smrg aix3*) 70639ef0b394Smrg # FIXME: insert proper C++ library support 70649ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 70659ef0b394Smrg ;; 70669ef0b394Smrg aix[[4-9]]*) 70679ef0b394Smrg if test "$host_cpu" = ia64; then 70689ef0b394Smrg # On IA64, the linker does run time linking by default, so we don't 70699ef0b394Smrg # have to do anything special. 70709ef0b394Smrg aix_use_runtimelinking=no 70719ef0b394Smrg exp_sym_flag='-Bexport' 70729ef0b394Smrg no_entry_flag="" 70739ef0b394Smrg else 70749ef0b394Smrg aix_use_runtimelinking=no 7075266e564dSmrg 70769ef0b394Smrg # Test if we are trying to use run time linking or normal 70779ef0b394Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 70789ef0b394Smrg # need to do runtime linking. 70799ef0b394Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 70809ef0b394Smrg for ld_flag in $LDFLAGS; do 70819ef0b394Smrg case $ld_flag in 70829ef0b394Smrg *-brtl*) 70839ef0b394Smrg aix_use_runtimelinking=yes 70849ef0b394Smrg break 70859ef0b394Smrg ;; 70869ef0b394Smrg esac 70879ef0b394Smrg done 70889ef0b394Smrg ;; 70899ef0b394Smrg esac 7090266e564dSmrg 70919ef0b394Smrg exp_sym_flag='-bexport' 70929ef0b394Smrg no_entry_flag='-bnoentry' 70939ef0b394Smrg fi 7094266e564dSmrg 70959ef0b394Smrg # When large executables or shared objects are built, AIX ld can 70969ef0b394Smrg # have problems creating the table of contents. If linking a library 70979ef0b394Smrg # or program results in "error TOC overflow" add -mminimal-toc to 70989ef0b394Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 70999ef0b394Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 7100698f425bSmrg 71019ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='' 71029ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 71039ef0b394Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 71049ef0b394Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 71059ef0b394Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 71069ef0b394Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 7107698f425bSmrg 71089ef0b394Smrg if test "$GXX" = yes; then 71099ef0b394Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 71109ef0b394Smrg # We only want to do this on AIX 4.2 and lower, the check 71119ef0b394Smrg # below for broken collect2 doesn't work under 4.3+ 71129ef0b394Smrg collect2name=`${CC} -print-prog-name=collect2` 71139ef0b394Smrg if test -f "$collect2name" && 71149ef0b394Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 71159ef0b394Smrg then 71169ef0b394Smrg # We have reworked collect2 71179ef0b394Smrg : 71189ef0b394Smrg else 71199ef0b394Smrg # We have old collect2 71209ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 71219ef0b394Smrg # It fails to find uninstalled libraries when the uninstalled 71229ef0b394Smrg # path is not listed in the libpath. Setting hardcode_minus_L 71239ef0b394Smrg # to unsupported forces relinking 71249ef0b394Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 71259ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 71269ef0b394Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 71279ef0b394Smrg fi 71289ef0b394Smrg esac 71299ef0b394Smrg shared_flag='-shared' 71309ef0b394Smrg if test "$aix_use_runtimelinking" = yes; then 71319ef0b394Smrg shared_flag="$shared_flag "'${wl}-G' 71329ef0b394Smrg fi 71339ef0b394Smrg else 71349ef0b394Smrg # not using gcc 71359ef0b394Smrg if test "$host_cpu" = ia64; then 71369ef0b394Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 71379ef0b394Smrg # chokes on -Wl,-G. The following line is correct: 71389ef0b394Smrg shared_flag='-G' 71399ef0b394Smrg else 71409ef0b394Smrg if test "$aix_use_runtimelinking" = yes; then 71419ef0b394Smrg shared_flag='${wl}-G' 71429ef0b394Smrg else 71439ef0b394Smrg shared_flag='${wl}-bM:SRE' 71449ef0b394Smrg fi 71459ef0b394Smrg fi 71469ef0b394Smrg fi 7147266e564dSmrg 71489ef0b394Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 71499ef0b394Smrg # It seems that -bexpall does not export symbols beginning with 71509ef0b394Smrg # underscore (_), so it is better to generate a list of symbols to 71519ef0b394Smrg # export. 71529ef0b394Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 71539ef0b394Smrg if test "$aix_use_runtimelinking" = yes; then 71549ef0b394Smrg # Warning - without using the other runtime loading flags (-brtl), 71559ef0b394Smrg # -berok will link without error, but may produce a broken library. 71569ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 71579ef0b394Smrg # Determine the default libpath from the value encoded in an empty 71589ef0b394Smrg # executable. 71599ef0b394Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 71609ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 7161698f425bSmrg 71629ef0b394Smrg _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" 71639ef0b394Smrg else 71649ef0b394Smrg if test "$host_cpu" = ia64; then 71659ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 71669ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 71679ef0b394Smrg _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" 71689ef0b394Smrg else 71699ef0b394Smrg # Determine the default libpath from the value encoded in an 71709ef0b394Smrg # empty executable. 71719ef0b394Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 71729ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 71739ef0b394Smrg # Warning - without using the other run time loading flags, 71749ef0b394Smrg # -berok will link without error, but may produce a broken library. 71759ef0b394Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 71769ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 71779ef0b394Smrg if test "$with_gnu_ld" = yes; then 71789ef0b394Smrg # We only use this code for GNU lds that support --whole-archive. 71799ef0b394Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 71809ef0b394Smrg else 71819ef0b394Smrg # Exported symbols can be pulled into shared objects from archives 71829ef0b394Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 71839ef0b394Smrg fi 71849ef0b394Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 71859ef0b394Smrg # This is similar to how AIX traditionally builds its shared 71869ef0b394Smrg # libraries. 71879ef0b394Smrg _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' 71889ef0b394Smrg fi 7189698f425bSmrg fi 7190698f425bSmrg ;; 7191698f425bSmrg 71929ef0b394Smrg beos*) 71939ef0b394Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 71949ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 71959ef0b394Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 71969ef0b394Smrg # support --undefined. This deserves some investigation. FIXME 71979ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 71989ef0b394Smrg else 71999ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 72009ef0b394Smrg fi 72019ef0b394Smrg ;; 7202698f425bSmrg 72039ef0b394Smrg chorus*) 72049ef0b394Smrg case $cc_basename in 72059ef0b394Smrg *) 72069ef0b394Smrg # FIXME: insert proper C++ library support 72079ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 72089ef0b394Smrg ;; 72099ef0b394Smrg esac 72109ef0b394Smrg ;; 7211698f425bSmrg 72129ef0b394Smrg cygwin* | mingw* | pw32* | cegcc*) 72139ef0b394Smrg case $GXX,$cc_basename in 72149ef0b394Smrg ,cl* | no,cl*) 72159ef0b394Smrg # Native MSVC 72169ef0b394Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 72179ef0b394Smrg # no search path for DLLs. 72189ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 72199ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 72209ef0b394Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 72219ef0b394Smrg _LT_TAGVAR(file_list_spec, $1)='@' 72229ef0b394Smrg # Tell ltmain to make .lib files, not .a files. 72239ef0b394Smrg libext=lib 72249ef0b394Smrg # Tell ltmain to make .dll files, not .so files. 72259ef0b394Smrg shrext_cmds=".dll" 72269ef0b394Smrg # FIXME: Setting linknames here is a bad hack. 72279ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 72289ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 72299ef0b394Smrg $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 72309ef0b394Smrg else 72319ef0b394Smrg $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 72329ef0b394Smrg fi~ 72339ef0b394Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 72349ef0b394Smrg linknames=' 72359ef0b394Smrg # The linker will not automatically build a static lib if we build a DLL. 72369ef0b394Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 72379ef0b394Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 72389ef0b394Smrg # Don't use ranlib 72399ef0b394Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 72409ef0b394Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 72419ef0b394Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 72429ef0b394Smrg case $lt_outputfile in 72439ef0b394Smrg *.exe|*.EXE) ;; 72449ef0b394Smrg *) 72459ef0b394Smrg lt_outputfile="$lt_outputfile.exe" 72469ef0b394Smrg lt_tool_outputfile="$lt_tool_outputfile.exe" 72479ef0b394Smrg ;; 72489ef0b394Smrg esac~ 72499ef0b394Smrg func_to_tool_file "$lt_outputfile"~ 72509ef0b394Smrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 72519ef0b394Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 72529ef0b394Smrg $RM "$lt_outputfile.manifest"; 72539ef0b394Smrg fi' 72549ef0b394Smrg ;; 72559ef0b394Smrg *) 72569ef0b394Smrg # g++ 72579ef0b394Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 72589ef0b394Smrg # as there is no search path for DLLs. 72599ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 72609ef0b394Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 72619ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 72629ef0b394Smrg _LT_TAGVAR(always_export_symbols, $1)=no 72639ef0b394Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 72649ef0b394Smrg 72659ef0b394Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 72669ef0b394Smrg _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' 72679ef0b394Smrg # If the export-symbols file already is a .def file (1st line 72689ef0b394Smrg # is EXPORTS), use it as is; otherwise, prepend... 72699ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 72709ef0b394Smrg cp $export_symbols $output_objdir/$soname.def; 72719ef0b394Smrg else 72729ef0b394Smrg echo EXPORTS > $output_objdir/$soname.def; 72739ef0b394Smrg cat $export_symbols >> $output_objdir/$soname.def; 72749ef0b394Smrg fi~ 72759ef0b394Smrg $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' 72769ef0b394Smrg else 72779ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 72789ef0b394Smrg fi 72799ef0b394Smrg ;; 72809ef0b394Smrg esac 72819ef0b394Smrg ;; 72829ef0b394Smrg darwin* | rhapsody*) 72839ef0b394Smrg _LT_DARWIN_LINKER_FEATURES($1) 72849ef0b394Smrg ;; 7285266e564dSmrg 72869ef0b394Smrg dgux*) 72879ef0b394Smrg case $cc_basename in 72889ef0b394Smrg ec++*) 72899ef0b394Smrg # FIXME: insert proper C++ library support 72909ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 72919ef0b394Smrg ;; 72929ef0b394Smrg ghcx*) 72939ef0b394Smrg # Green Hills C++ Compiler 72949ef0b394Smrg # FIXME: insert proper C++ library support 72959ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 72969ef0b394Smrg ;; 72979ef0b394Smrg *) 72989ef0b394Smrg # FIXME: insert proper C++ library support 72999ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 73009ef0b394Smrg ;; 73019ef0b394Smrg esac 73029ef0b394Smrg ;; 7303266e564dSmrg 73049ef0b394Smrg freebsd[[12]]*) 73059ef0b394Smrg # C++ shared libraries reported to be fairly broken before 73069ef0b394Smrg # switch to ELF 73079ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 73089ef0b394Smrg ;; 7309266e564dSmrg 73109ef0b394Smrg freebsd-elf*) 73119ef0b394Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 73129ef0b394Smrg ;; 7313266e564dSmrg 73149ef0b394Smrg freebsd* | dragonfly*) 73159ef0b394Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 73169ef0b394Smrg # conventions 73179ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 73189ef0b394Smrg ;; 7319266e564dSmrg 73209ef0b394Smrg gnu*) 73219ef0b394Smrg ;; 7322266e564dSmrg 73239ef0b394Smrg haiku*) 73249ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 73259ef0b394Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 73269ef0b394Smrg ;; 7327266e564dSmrg 73289ef0b394Smrg hpux9*) 73299ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 73309ef0b394Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 73319ef0b394Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 73329ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 73339ef0b394Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 73349ef0b394Smrg # but as the default 73359ef0b394Smrg # location of the library. 7336266e564dSmrg 73379ef0b394Smrg case $cc_basename in 73389ef0b394Smrg CC*) 73399ef0b394Smrg # FIXME: insert proper C++ library support 73409ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 73419ef0b394Smrg ;; 73429ef0b394Smrg aCC*) 73439ef0b394Smrg _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' 73449ef0b394Smrg # Commands to make compiler produce verbose output that lists 73459ef0b394Smrg # what "hidden" libraries, object files and flags are used when 73469ef0b394Smrg # linking a shared library. 73479ef0b394Smrg # 73489ef0b394Smrg # There doesn't appear to be a way to prevent this compiler from 73499ef0b394Smrg # explicitly linking system object files so we need to strip them 73509ef0b394Smrg # from the output so that they don't get included in the library 73519ef0b394Smrg # dependencies. 73529ef0b394Smrg 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"' 73539ef0b394Smrg ;; 73549ef0b394Smrg *) 73559ef0b394Smrg if test "$GXX" = yes; then 73569ef0b394Smrg _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' 73579ef0b394Smrg else 73589ef0b394Smrg # FIXME: insert proper C++ library support 73599ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 73609ef0b394Smrg fi 73619ef0b394Smrg ;; 73629ef0b394Smrg esac 73639ef0b394Smrg ;; 7364266e564dSmrg 73659ef0b394Smrg hpux10*|hpux11*) 73669ef0b394Smrg if test $with_gnu_ld = no; then 73679ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 73689ef0b394Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7369266e564dSmrg 73709ef0b394Smrg case $host_cpu in 73719ef0b394Smrg hppa*64*|ia64*) 73729ef0b394Smrg ;; 73739ef0b394Smrg *) 73749ef0b394Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 73759ef0b394Smrg ;; 73769ef0b394Smrg esac 73779ef0b394Smrg fi 73789ef0b394Smrg case $host_cpu in 73799ef0b394Smrg hppa*64*|ia64*) 73809ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=no 73819ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 73829ef0b394Smrg ;; 73839ef0b394Smrg *) 73849ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 73859ef0b394Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 73869ef0b394Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 73879ef0b394Smrg # but as the default 73889ef0b394Smrg # location of the library. 73899ef0b394Smrg ;; 73909ef0b394Smrg esac 7391266e564dSmrg 73929ef0b394Smrg case $cc_basename in 73939ef0b394Smrg CC*) 73949ef0b394Smrg # FIXME: insert proper C++ library support 73959ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 73969ef0b394Smrg ;; 73979ef0b394Smrg aCC*) 73989ef0b394Smrg case $host_cpu in 73999ef0b394Smrg hppa*64*) 74009ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 74019ef0b394Smrg ;; 74029ef0b394Smrg ia64*) 74039ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 74049ef0b394Smrg ;; 74059ef0b394Smrg *) 74069ef0b394Smrg _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' 74079ef0b394Smrg ;; 74089ef0b394Smrg esac 74099ef0b394Smrg # Commands to make compiler produce verbose output that lists 74109ef0b394Smrg # what "hidden" libraries, object files and flags are used when 74119ef0b394Smrg # linking a shared library. 74129ef0b394Smrg # 74139ef0b394Smrg # There doesn't appear to be a way to prevent this compiler from 74149ef0b394Smrg # explicitly linking system object files so we need to strip them 74159ef0b394Smrg # from the output so that they don't get included in the library 74169ef0b394Smrg # dependencies. 74179ef0b394Smrg 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"' 74189ef0b394Smrg ;; 74199ef0b394Smrg *) 74209ef0b394Smrg if test "$GXX" = yes; then 74219ef0b394Smrg if test $with_gnu_ld = no; then 74229ef0b394Smrg case $host_cpu in 74239ef0b394Smrg hppa*64*) 74249ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 74259ef0b394Smrg ;; 74269ef0b394Smrg ia64*) 74279ef0b394Smrg _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' 74289ef0b394Smrg ;; 74299ef0b394Smrg *) 74309ef0b394Smrg _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' 74319ef0b394Smrg ;; 74329ef0b394Smrg esac 74339ef0b394Smrg fi 74349ef0b394Smrg else 74359ef0b394Smrg # FIXME: insert proper C++ library support 74369ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 74379ef0b394Smrg fi 74389ef0b394Smrg ;; 74399ef0b394Smrg esac 74409ef0b394Smrg ;; 7441c5629e66Smrg 74429ef0b394Smrg interix[[3-9]]*) 74439ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=no 74449ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 74459ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 74469ef0b394Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 74479ef0b394Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 74489ef0b394Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 74499ef0b394Smrg # default) and relocated if they conflict, which is a slow very memory 74509ef0b394Smrg # consuming and fragmenting process. To avoid this, we pick a random, 74519ef0b394Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 74529ef0b394Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 74539ef0b394Smrg _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' 74549ef0b394Smrg _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' 74559ef0b394Smrg ;; 74569ef0b394Smrg irix5* | irix6*) 74579ef0b394Smrg case $cc_basename in 74589ef0b394Smrg CC*) 74599ef0b394Smrg # SGI C++ 74609ef0b394Smrg _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' 7461266e564dSmrg 74629ef0b394Smrg # Archives containing C++ object files must be created using 74639ef0b394Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 74649ef0b394Smrg # necessary to make sure instantiated templates are included 74659ef0b394Smrg # in the archive. 74669ef0b394Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 74679ef0b394Smrg ;; 74689ef0b394Smrg *) 74699ef0b394Smrg if test "$GXX" = yes; then 74709ef0b394Smrg if test "$with_gnu_ld" = no; then 74719ef0b394Smrg _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' 74729ef0b394Smrg else 74739ef0b394Smrg _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' 74749ef0b394Smrg fi 74759ef0b394Smrg fi 74769ef0b394Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 74779ef0b394Smrg ;; 74789ef0b394Smrg esac 74799ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 74809ef0b394Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 74819ef0b394Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 74829ef0b394Smrg ;; 7483266e564dSmrg 74849ef0b394Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 74859ef0b394Smrg case $cc_basename in 74869ef0b394Smrg KCC*) 74879ef0b394Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 7488266e564dSmrg 74899ef0b394Smrg # KCC will only create a shared library if the output file 74909ef0b394Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 74919ef0b394Smrg # to its proper name (with version) after linking. 74929ef0b394Smrg _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' 74939ef0b394Smrg _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' 74949ef0b394Smrg # Commands to make compiler produce verbose output that lists 74959ef0b394Smrg # what "hidden" libraries, object files and flags are used when 74969ef0b394Smrg # linking a shared library. 74979ef0b394Smrg # 74989ef0b394Smrg # There doesn't appear to be a way to prevent this compiler from 74999ef0b394Smrg # explicitly linking system object files so we need to strip them 75009ef0b394Smrg # from the output so that they don't get included in the library 75019ef0b394Smrg # dependencies. 75029ef0b394Smrg 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"' 7503266e564dSmrg 75049ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 75059ef0b394Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 7506266e564dSmrg 75079ef0b394Smrg # Archives containing C++ object files must be created using 75089ef0b394Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 75099ef0b394Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 75109ef0b394Smrg ;; 75119ef0b394Smrg icpc* | ecpc* ) 75129ef0b394Smrg # Intel C++ 75139ef0b394Smrg with_gnu_ld=yes 75149ef0b394Smrg # version 8.0 and above of icpc choke on multiply defined symbols 75159ef0b394Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 75169ef0b394Smrg # earlier do not add the objects themselves. 75179ef0b394Smrg case `$CC -V 2>&1` in 75189ef0b394Smrg *"Version 7."*) 75199ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 75209ef0b394Smrg _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' 75219ef0b394Smrg ;; 75229ef0b394Smrg *) # Version 8.0 or newer 75239ef0b394Smrg tmp_idyn= 75249ef0b394Smrg case $host_cpu in 75259ef0b394Smrg ia64*) tmp_idyn=' -i_dynamic';; 75269ef0b394Smrg esac 75279ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 75289ef0b394Smrg _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' 75299ef0b394Smrg ;; 75309ef0b394Smrg esac 75319ef0b394Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 75329ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 75339ef0b394Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 75349ef0b394Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 75359ef0b394Smrg ;; 75369ef0b394Smrg pgCC* | pgcpp*) 75379ef0b394Smrg # Portland Group C++ compiler 75389ef0b394Smrg case `$CC -V` in 75399ef0b394Smrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 75409ef0b394Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 75419ef0b394Smrg rm -rf $tpldir~ 75429ef0b394Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 75439ef0b394Smrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 75449ef0b394Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 75459ef0b394Smrg rm -rf $tpldir~ 75469ef0b394Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 75479ef0b394Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 75489ef0b394Smrg $RANLIB $oldlib' 75499ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 75509ef0b394Smrg rm -rf $tpldir~ 75519ef0b394Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 75529ef0b394Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 75539ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 75549ef0b394Smrg rm -rf $tpldir~ 75559ef0b394Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 75569ef0b394Smrg $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' 75579ef0b394Smrg ;; 75589ef0b394Smrg *) # Version 6 and above use weak symbols 75599ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 75609ef0b394Smrg _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' 75619ef0b394Smrg ;; 75629ef0b394Smrg esac 7563266e564dSmrg 75649ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 75659ef0b394Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 75669ef0b394Smrg _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' 75679ef0b394Smrg ;; 75689ef0b394Smrg cxx*) 75699ef0b394Smrg # Compaq C++ 75709ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 75719ef0b394Smrg _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' 7572266e564dSmrg 75739ef0b394Smrg runpath_var=LD_RUN_PATH 75749ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 75759ef0b394Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7576266e564dSmrg 75779ef0b394Smrg # Commands to make compiler produce verbose output that lists 75789ef0b394Smrg # what "hidden" libraries, object files and flags are used when 75799ef0b394Smrg # linking a shared library. 75809ef0b394Smrg # 75819ef0b394Smrg # There doesn't appear to be a way to prevent this compiler from 75829ef0b394Smrg # explicitly linking system object files so we need to strip them 75839ef0b394Smrg # from the output so that they don't get included in the library 75849ef0b394Smrg # dependencies. 75859ef0b394Smrg 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' 75869ef0b394Smrg ;; 75879ef0b394Smrg xl* | mpixl* | bgxl*) 75889ef0b394Smrg # IBM XL 8.0 on PPC, with GNU ld 75899ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 75909ef0b394Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 75919ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 75929ef0b394Smrg if test "x$supports_anon_versioning" = xyes; then 75939ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 75949ef0b394Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 75959ef0b394Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 75969ef0b394Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 75979ef0b394Smrg fi 75989ef0b394Smrg ;; 75999ef0b394Smrg *) 76009ef0b394Smrg case `$CC -V 2>&1 | sed 5q` in 76019ef0b394Smrg *Sun\ C*) 76029ef0b394Smrg # Sun C++ 5.9 76039ef0b394Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 76049ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 76059ef0b394Smrg _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' 76069ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 76079ef0b394Smrg _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' 76089ef0b394Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 7609266e564dSmrg 76109ef0b394Smrg # Not sure whether something based on 76119ef0b394Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 76129ef0b394Smrg # would be better. 76139ef0b394Smrg output_verbose_link_cmd='func_echo_all' 7614266e564dSmrg 76159ef0b394Smrg # Archives containing C++ object files must be created using 76169ef0b394Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 76179ef0b394Smrg # necessary to make sure instantiated templates are included 76189ef0b394Smrg # in the archive. 76199ef0b394Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 76209ef0b394Smrg ;; 76219ef0b394Smrg esac 76229ef0b394Smrg ;; 76239ef0b394Smrg esac 76249ef0b394Smrg ;; 7625266e564dSmrg 76269ef0b394Smrg lynxos*) 76279ef0b394Smrg # FIXME: insert proper C++ library support 76289ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 76299ef0b394Smrg ;; 7630266e564dSmrg 76319ef0b394Smrg m88k*) 76329ef0b394Smrg # FIXME: insert proper C++ library support 76339ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 76349ef0b394Smrg ;; 7635266e564dSmrg 76369ef0b394Smrg mvs*) 76379ef0b394Smrg case $cc_basename in 76389ef0b394Smrg cxx*) 76399ef0b394Smrg # FIXME: insert proper C++ library support 76409ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 76419ef0b394Smrg ;; 76429ef0b394Smrg *) 76439ef0b394Smrg # FIXME: insert proper C++ library support 76449ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 76459ef0b394Smrg ;; 76469ef0b394Smrg esac 76479ef0b394Smrg ;; 7648266e564dSmrg 76499ef0b394Smrg netbsd*) 76509ef0b394Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 76519ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 76529ef0b394Smrg wlarc= 76539ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 76549ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 76559ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 76569ef0b394Smrg fi 76579ef0b394Smrg # Workaround some broken pre-1.5 toolchains 76589ef0b394Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 76599ef0b394Smrg ;; 7660266e564dSmrg 76619ef0b394Smrg *nto* | *qnx*) 76629ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 76639ef0b394Smrg ;; 7664266e564dSmrg 76659ef0b394Smrg openbsd2*) 76669ef0b394Smrg # C++ shared libraries are fairly broken 76679ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 76689ef0b394Smrg ;; 7669266e564dSmrg 76709ef0b394Smrg openbsd*) 76719ef0b394Smrg if test -f /usr/libexec/ld.so; then 76729ef0b394Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 76739ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 76749ef0b394Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 76759ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 76769ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 76779ef0b394Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 76789ef0b394Smrg _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' 76799ef0b394Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 76809ef0b394Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 76819ef0b394Smrg fi 76829ef0b394Smrg output_verbose_link_cmd=func_echo_all 76839ef0b394Smrg else 76849ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 76859ef0b394Smrg fi 76869ef0b394Smrg ;; 7687266e564dSmrg 76889ef0b394Smrg osf3* | osf4* | osf5*) 76899ef0b394Smrg case $cc_basename in 76909ef0b394Smrg KCC*) 76919ef0b394Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 7692266e564dSmrg 76939ef0b394Smrg # KCC will only create a shared library if the output file 76949ef0b394Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 76959ef0b394Smrg # to its proper name (with version) after linking. 76969ef0b394Smrg _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' 7697266e564dSmrg 76989ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 76999ef0b394Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7700266e564dSmrg 77019ef0b394Smrg # Archives containing C++ object files must be created using 77029ef0b394Smrg # the KAI C++ compiler. 77039ef0b394Smrg case $host in 77049ef0b394Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 77059ef0b394Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 77069ef0b394Smrg esac 77079ef0b394Smrg ;; 77089ef0b394Smrg RCC*) 77099ef0b394Smrg # Rational C++ 2.4.1 77109ef0b394Smrg # FIXME: insert proper C++ library support 77119ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 77129ef0b394Smrg ;; 77139ef0b394Smrg cxx*) 77149ef0b394Smrg case $host in 77159ef0b394Smrg osf3*) 77169ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 77179ef0b394Smrg _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' 77189ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 77199ef0b394Smrg ;; 77209ef0b394Smrg *) 77219ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 77229ef0b394Smrg _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' 77239ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 77249ef0b394Smrg echo "-hidden">> $lib.exp~ 77259ef0b394Smrg $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~ 77269ef0b394Smrg $RM $lib.exp' 77279ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 77289ef0b394Smrg ;; 77299ef0b394Smrg esac 7730266e564dSmrg 77319ef0b394Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7732266e564dSmrg 77339ef0b394Smrg # Commands to make compiler produce verbose output that lists 77349ef0b394Smrg # what "hidden" libraries, object files and flags are used when 77359ef0b394Smrg # linking a shared library. 77369ef0b394Smrg # 77379ef0b394Smrg # There doesn't appear to be a way to prevent this compiler from 77389ef0b394Smrg # explicitly linking system object files so we need to strip them 77399ef0b394Smrg # from the output so that they don't get included in the library 77409ef0b394Smrg # dependencies. 77419ef0b394Smrg 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"' 77429ef0b394Smrg ;; 77439ef0b394Smrg *) 77449ef0b394Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 77459ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 77469ef0b394Smrg case $host in 77479ef0b394Smrg osf3*) 77489ef0b394Smrg _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' 77499ef0b394Smrg ;; 77509ef0b394Smrg *) 77519ef0b394Smrg _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' 77529ef0b394Smrg ;; 77539ef0b394Smrg esac 7754266e564dSmrg 77559ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 77569ef0b394Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7757266e564dSmrg 77589ef0b394Smrg # Commands to make compiler produce verbose output that lists 77599ef0b394Smrg # what "hidden" libraries, object files and flags are used when 77609ef0b394Smrg # linking a shared library. 77619ef0b394Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7762266e564dSmrg 77639ef0b394Smrg else 77649ef0b394Smrg # FIXME: insert proper C++ library support 77659ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 77669ef0b394Smrg fi 77679ef0b394Smrg ;; 77689ef0b394Smrg esac 77699ef0b394Smrg ;; 7770266e564dSmrg 77719ef0b394Smrg psos*) 77729ef0b394Smrg # FIXME: insert proper C++ library support 77739ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 77749ef0b394Smrg ;; 7775266e564dSmrg 77769ef0b394Smrg sunos4*) 77779ef0b394Smrg case $cc_basename in 77789ef0b394Smrg CC*) 77799ef0b394Smrg # Sun C++ 4.x 77809ef0b394Smrg # FIXME: insert proper C++ library support 77819ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 77829ef0b394Smrg ;; 77839ef0b394Smrg lcc*) 77849ef0b394Smrg # Lucid 77859ef0b394Smrg # FIXME: insert proper C++ library support 77869ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 77879ef0b394Smrg ;; 77889ef0b394Smrg *) 77899ef0b394Smrg # FIXME: insert proper C++ library support 77909ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 77919ef0b394Smrg ;; 77929ef0b394Smrg esac 77939ef0b394Smrg ;; 7794266e564dSmrg 77959ef0b394Smrg solaris*) 77969ef0b394Smrg case $cc_basename in 77979ef0b394Smrg CC* | sunCC*) 77989ef0b394Smrg # Sun C++ 4.2, 5.x and Centerline C++ 77999ef0b394Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 78009ef0b394Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 78019ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 78029ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 78039ef0b394Smrg $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' 7804266e564dSmrg 78059ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 78069ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 78079ef0b394Smrg case $host_os in 78089ef0b394Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 78099ef0b394Smrg *) 78109ef0b394Smrg # The compiler driver will combine and reorder linker options, 78119ef0b394Smrg # but understands `-z linker_flag'. 78129ef0b394Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 78139ef0b394Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 78149ef0b394Smrg ;; 78159ef0b394Smrg esac 78169ef0b394Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7817266e564dSmrg 78189ef0b394Smrg output_verbose_link_cmd='func_echo_all' 7819266e564dSmrg 78209ef0b394Smrg # Archives containing C++ object files must be created using 78219ef0b394Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 78229ef0b394Smrg # necessary to make sure instantiated templates are included 78239ef0b394Smrg # in the archive. 78249ef0b394Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 78259ef0b394Smrg ;; 78269ef0b394Smrg gcx*) 78279ef0b394Smrg # Green Hills C++ Compiler 78289ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 7829698f425bSmrg 78309ef0b394Smrg # The C++ compiler must be used to create the archive. 78319ef0b394Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 78329ef0b394Smrg ;; 78339ef0b394Smrg *) 78349ef0b394Smrg # GNU C++ compiler with Solaris linker 78359ef0b394Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 78369ef0b394Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 78379ef0b394Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 78389ef0b394Smrg _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' 78399ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 78409ef0b394Smrg $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 7841698f425bSmrg 78429ef0b394Smrg # Commands to make compiler produce verbose output that lists 78439ef0b394Smrg # what "hidden" libraries, object files and flags are used when 78449ef0b394Smrg # linking a shared library. 78459ef0b394Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 78469ef0b394Smrg else 78479ef0b394Smrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 78489ef0b394Smrg # platform. 78499ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 78509ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 78519ef0b394Smrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 7852698f425bSmrg 78539ef0b394Smrg # Commands to make compiler produce verbose output that lists 78549ef0b394Smrg # what "hidden" libraries, object files and flags are used when 78559ef0b394Smrg # linking a shared library. 78569ef0b394Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 78579ef0b394Smrg fi 7858266e564dSmrg 78599ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 78609ef0b394Smrg case $host_os in 78619ef0b394Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 78629ef0b394Smrg *) 78639ef0b394Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 78649ef0b394Smrg ;; 78659ef0b394Smrg esac 78669ef0b394Smrg fi 78679ef0b394Smrg ;; 78689ef0b394Smrg esac 78699ef0b394Smrg ;; 7870266e564dSmrg 78719ef0b394Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 78729ef0b394Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 78739ef0b394Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 78749ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 78759ef0b394Smrg runpath_var='LD_RUN_PATH' 7876266e564dSmrg 78779ef0b394Smrg case $cc_basename in 78789ef0b394Smrg CC*) 78799ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 78809ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 78819ef0b394Smrg ;; 78829ef0b394Smrg *) 78839ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 78849ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 78859ef0b394Smrg ;; 78869ef0b394Smrg esac 78879ef0b394Smrg ;; 7888266e564dSmrg 78899ef0b394Smrg sysv5* | sco3.2v5* | sco5v6*) 78909ef0b394Smrg # Note: We can NOT use -z defs as we might desire, because we do not 78919ef0b394Smrg # link with -lc, and that would cause any symbols used from libc to 78929ef0b394Smrg # always be unresolved, which means just about no library would 78939ef0b394Smrg # ever link correctly. If we're not using GNU ld we use -z text 78949ef0b394Smrg # though, which does catch some bad symbols but isn't as heavy-handed 78959ef0b394Smrg # as -z defs. 78969ef0b394Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 78979ef0b394Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 78989ef0b394Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 78999ef0b394Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 79009ef0b394Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 79019ef0b394Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 79029ef0b394Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 79039ef0b394Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 79049ef0b394Smrg runpath_var='LD_RUN_PATH' 7905266e564dSmrg 79069ef0b394Smrg case $cc_basename in 79079ef0b394Smrg CC*) 79089ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 79099ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 79109ef0b394Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 79119ef0b394Smrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 79129ef0b394Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 79139ef0b394Smrg '"$_LT_TAGVAR(reload_cmds, $1)" 79149ef0b394Smrg ;; 79159ef0b394Smrg *) 79169ef0b394Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 79179ef0b394Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 79189ef0b394Smrg ;; 79199ef0b394Smrg esac 79209ef0b394Smrg ;; 79219ef0b394Smrg 79229ef0b394Smrg tandem*) 79239ef0b394Smrg case $cc_basename in 79249ef0b394Smrg NCC*) 79259ef0b394Smrg # NonStop-UX NCC 3.20 79269ef0b394Smrg # FIXME: insert proper C++ library support 79279ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 79289ef0b394Smrg ;; 79299ef0b394Smrg *) 79309ef0b394Smrg # FIXME: insert proper C++ library support 79319ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 79329ef0b394Smrg ;; 79339ef0b394Smrg esac 79349ef0b394Smrg ;; 7935c5629e66Smrg 79369ef0b394Smrg vxworks*) 79379ef0b394Smrg # FIXME: insert proper C++ library support 79389ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 79399ef0b394Smrg ;; 7940266e564dSmrg 79419ef0b394Smrg *) 79429ef0b394Smrg # FIXME: insert proper C++ library support 79439ef0b394Smrg _LT_TAGVAR(ld_shlibs, $1)=no 79449ef0b394Smrg ;; 79459ef0b394Smrg esac 7946266e564dSmrg 79479ef0b394Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 79489ef0b394Smrg test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 7949266e564dSmrg 79509ef0b394Smrg _LT_TAGVAR(GCC, $1)="$GXX" 79519ef0b394Smrg _LT_TAGVAR(LD, $1)="$LD" 7952266e564dSmrg 79539ef0b394Smrg ## CAVEAT EMPTOR: 79549ef0b394Smrg ## There is no encapsulation within the following macros, do not change 79559ef0b394Smrg ## the running order or otherwise move them around unless you know exactly 79569ef0b394Smrg ## what you are doing... 79579ef0b394Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 79589ef0b394Smrg _LT_COMPILER_PIC($1) 79599ef0b394Smrg _LT_COMPILER_C_O($1) 79609ef0b394Smrg _LT_COMPILER_FILE_LOCKS($1) 79619ef0b394Smrg _LT_LINKER_SHLIBS($1) 79629ef0b394Smrg _LT_SYS_DYNAMIC_LINKER($1) 79639ef0b394Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 7964266e564dSmrg 79659ef0b394Smrg _LT_CONFIG($1) 79669ef0b394Smrg fi # test -n "$compiler" 7967266e564dSmrg 79689ef0b394Smrg CC=$lt_save_CC 79699ef0b394Smrg CFLAGS=$lt_save_CFLAGS 79709ef0b394Smrg LDCXX=$LD 79719ef0b394Smrg LD=$lt_save_LD 79729ef0b394Smrg GCC=$lt_save_GCC 79739ef0b394Smrg with_gnu_ld=$lt_save_with_gnu_ld 79749ef0b394Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 79759ef0b394Smrg lt_cv_path_LD=$lt_save_path_LD 79769ef0b394Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 79779ef0b394Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 79789ef0b394Smrgfi # test "$_lt_caught_CXX_error" != yes 7979266e564dSmrg 79809ef0b394SmrgAC_LANG_POP 79819ef0b394Smrg])# _LT_LANG_CXX_CONFIG 7982266e564dSmrg 7983698f425bSmrg 79849ef0b394Smrg# _LT_FUNC_STRIPNAME_CNF 79859ef0b394Smrg# ---------------------- 79869ef0b394Smrg# func_stripname_cnf prefix suffix name 7987698f425bSmrg# strip PREFIX and SUFFIX off of NAME. 7988698f425bSmrg# PREFIX and SUFFIX must not contain globbing or regex special 7989698f425bSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading 7990698f425bSmrg# dot (in which case that matches only a dot). 79919ef0b394Smrg# 79929ef0b394Smrg# This function is identical to the (non-XSI) version of func_stripname, 79939ef0b394Smrg# except this one can be used by m4 code that may be executed by configure, 79949ef0b394Smrg# rather than the libtool script. 79959ef0b394Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 79969ef0b394SmrgAC_REQUIRE([_LT_DECL_SED]) 79979ef0b394SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 79989ef0b394Smrgfunc_stripname_cnf () 7999698f425bSmrg{ 8000698f425bSmrg case ${2} in 80019ef0b394Smrg .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 80029ef0b394Smrg *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 8003698f425bSmrg esac 80049ef0b394Smrg} # func_stripname_cnf 80059ef0b394Smrg])# _LT_FUNC_STRIPNAME_CNF 8006266e564dSmrg 80079ef0b394Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 80089ef0b394Smrg# --------------------------------- 80099ef0b394Smrg# Figure out "hidden" library dependencies from verbose 80109ef0b394Smrg# compiler output when linking a shared library. 80119ef0b394Smrg# Parse the compiler output and extract the necessary 80129ef0b394Smrg# objects, libraries and library flags. 80139ef0b394Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 80149ef0b394Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 80159ef0b394SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 80169ef0b394Smrg# Dependencies to place before and after the object being linked: 80179ef0b394Smrg_LT_TAGVAR(predep_objects, $1)= 80189ef0b394Smrg_LT_TAGVAR(postdep_objects, $1)= 80199ef0b394Smrg_LT_TAGVAR(predeps, $1)= 80209ef0b394Smrg_LT_TAGVAR(postdeps, $1)= 80219ef0b394Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 8022266e564dSmrg 80239ef0b394Smrgdnl we can't use the lt_simple_compile_test_code here, 80249ef0b394Smrgdnl because it contains code intended for an executable, 80259ef0b394Smrgdnl not a library. It's possible we should let each 80269ef0b394Smrgdnl tag define a new lt_????_link_test_code variable, 80279ef0b394Smrgdnl but it's only used here... 80289ef0b394Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 80299ef0b394Smrgint a; 80309ef0b394Smrgvoid foo (void) { a = 0; } 8031698f425bSmrg_LT_EOF 80329ef0b394Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 80339ef0b394Smrgclass Foo 8034698f425bSmrg{ 80359ef0b394Smrgpublic: 80369ef0b394Smrg Foo (void) { a = 0; } 80379ef0b394Smrgprivate: 80389ef0b394Smrg int a; 80399ef0b394Smrg}; 8040698f425bSmrg_LT_EOF 80419ef0b394Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 80429ef0b394Smrg subroutine foo 80439ef0b394Smrg implicit none 80449ef0b394Smrg integer*4 a 80459ef0b394Smrg a=0 80469ef0b394Smrg return 80479ef0b394Smrg end 80489ef0b394Smrg_LT_EOF 80499ef0b394Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 80509ef0b394Smrg subroutine foo 80519ef0b394Smrg implicit none 80529ef0b394Smrg integer a 80539ef0b394Smrg a=0 80549ef0b394Smrg return 80559ef0b394Smrg end 80569ef0b394Smrg_LT_EOF 80579ef0b394Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 80589ef0b394Smrgpublic class foo { 80599ef0b394Smrg private int a; 80609ef0b394Smrg public void bar (void) { 80619ef0b394Smrg a = 0; 80629ef0b394Smrg } 80639ef0b394Smrg}; 8064698f425bSmrg_LT_EOF 8065698f425bSmrg]) 8066266e564dSmrg 80679ef0b394Smrg_lt_libdeps_save_CFLAGS=$CFLAGS 80689ef0b394Smrgcase "$CC $CFLAGS " in #( 80699ef0b394Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 80709ef0b394Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 80719ef0b394Smrgesac 8072c5629e66Smrg 80739ef0b394Smrgdnl Parse the compiler output and extract the necessary 80749ef0b394Smrgdnl objects, libraries and library flags. 80759ef0b394Smrgif AC_TRY_EVAL(ac_compile); then 80769ef0b394Smrg # Parse the compiler output and extract the necessary 80779ef0b394Smrg # objects, libraries and library flags. 8078c5629e66Smrg 80799ef0b394Smrg # Sentinel used to keep track of whether or not we are before 80809ef0b394Smrg # the conftest object file. 80819ef0b394Smrg pre_test_object_deps_done=no 8082c5629e66Smrg 80839ef0b394Smrg for p in `eval "$output_verbose_link_cmd"`; do 80849ef0b394Smrg case ${prev}${p} in 8085c5629e66Smrg 80869ef0b394Smrg -L* | -R* | -l*) 80879ef0b394Smrg # Some compilers place space between "-{L,R}" and the path. 80889ef0b394Smrg # Remove the space. 80899ef0b394Smrg if test $p = "-L" || 80909ef0b394Smrg test $p = "-R"; then 80919ef0b394Smrg prev=$p 80929ef0b394Smrg continue 80939ef0b394Smrg fi 8094698f425bSmrg 80959ef0b394Smrg # Expand the sysroot to ease extracting the directories later. 80969ef0b394Smrg if test -z "$prev"; then 80979ef0b394Smrg case $p in 80989ef0b394Smrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 80999ef0b394Smrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 81009ef0b394Smrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 81019ef0b394Smrg esac 81029ef0b394Smrg fi 81039ef0b394Smrg case $p in 81049ef0b394Smrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 81059ef0b394Smrg esac 81069ef0b394Smrg if test "$pre_test_object_deps_done" = no; then 81079ef0b394Smrg case ${prev} in 81089ef0b394Smrg -L | -R) 81099ef0b394Smrg # Internal compiler library paths should come after those 81109ef0b394Smrg # provided the user. The postdeps already come after the 81119ef0b394Smrg # user supplied libs so there is no need to process them. 81129ef0b394Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 81139ef0b394Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 81149ef0b394Smrg else 81159ef0b394Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 81169ef0b394Smrg fi 81179ef0b394Smrg ;; 81189ef0b394Smrg # The "-l" case would never come before the object being 81199ef0b394Smrg # linked, so don't bother handling this case. 81209ef0b394Smrg esac 81219ef0b394Smrg else 81229ef0b394Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 81239ef0b394Smrg _LT_TAGVAR(postdeps, $1)="${prev}${p}" 81249ef0b394Smrg else 81259ef0b394Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 81269ef0b394Smrg fi 81279ef0b394Smrg fi 81289ef0b394Smrg prev= 81299ef0b394Smrg ;; 8130698f425bSmrg 81319ef0b394Smrg *.lto.$objext) ;; # Ignore GCC LTO objects 81329ef0b394Smrg *.$objext) 81339ef0b394Smrg # This assumes that the test object file only shows up 81349ef0b394Smrg # once in the compiler output. 81359ef0b394Smrg if test "$p" = "conftest.$objext"; then 81369ef0b394Smrg pre_test_object_deps_done=yes 81379ef0b394Smrg continue 81389ef0b394Smrg fi 8139c5629e66Smrg 81409ef0b394Smrg if test "$pre_test_object_deps_done" = no; then 81419ef0b394Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 81429ef0b394Smrg _LT_TAGVAR(predep_objects, $1)="$p" 81439ef0b394Smrg else 81449ef0b394Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 81459ef0b394Smrg fi 81469ef0b394Smrg else 81479ef0b394Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 81489ef0b394Smrg _LT_TAGVAR(postdep_objects, $1)="$p" 81499ef0b394Smrg else 81509ef0b394Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 81519ef0b394Smrg fi 81529ef0b394Smrg fi 81539ef0b394Smrg ;; 8154c5629e66Smrg 81559ef0b394Smrg *) ;; # Ignore the rest. 8156698f425bSmrg 81579ef0b394Smrg esac 81589ef0b394Smrg done 8159c5629e66Smrg 81609ef0b394Smrg # Clean up. 81619ef0b394Smrg rm -f a.out a.exe 81629ef0b394Smrgelse 81639ef0b394Smrg echo "libtool.m4: error: problem compiling $1 test program" 81649ef0b394Smrgfi 8165c5629e66Smrg 81669ef0b394Smrg$RM -f confest.$objext 81679ef0b394SmrgCFLAGS=$_lt_libdeps_save_CFLAGS 8168c5629e66Smrg 81699ef0b394Smrg# PORTME: override above test on systems where it is broken 81709ef0b394Smrgm4_if([$1], [CXX], 81719ef0b394Smrg[case $host_os in 81729ef0b394Smrginterix[[3-9]]*) 81739ef0b394Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 81749ef0b394Smrg # hack all around it, let's just trust "g++" to DTRT. 81759ef0b394Smrg _LT_TAGVAR(predep_objects,$1)= 81769ef0b394Smrg _LT_TAGVAR(postdep_objects,$1)= 81779ef0b394Smrg _LT_TAGVAR(postdeps,$1)= 81789ef0b394Smrg ;; 8179c5629e66Smrg 81809ef0b394Smrglinux*) 81819ef0b394Smrg case `$CC -V 2>&1 | sed 5q` in 81829ef0b394Smrg *Sun\ C*) 81839ef0b394Smrg # Sun C++ 5.9 8184c5629e66Smrg 81859ef0b394Smrg # The more standards-conforming stlport4 library is 81869ef0b394Smrg # incompatible with the Cstd library. Avoid specifying 81879ef0b394Smrg # it if it's in CXXFLAGS. Ignore libCrun as 81889ef0b394Smrg # -library=stlport4 depends on it. 81899ef0b394Smrg case " $CXX $CXXFLAGS " in 81909ef0b394Smrg *" -library=stlport4 "*) 81919ef0b394Smrg solaris_use_stlport4=yes 81929ef0b394Smrg ;; 81939ef0b394Smrg esac 8194c5629e66Smrg 81959ef0b394Smrg if test "$solaris_use_stlport4" != yes; then 81969ef0b394Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 81979ef0b394Smrg fi 81989ef0b394Smrg ;; 81999ef0b394Smrg esac 82009ef0b394Smrg ;; 8201c5629e66Smrg 82029ef0b394Smrgsolaris*) 82039ef0b394Smrg case $cc_basename in 82049ef0b394Smrg CC* | sunCC*) 82059ef0b394Smrg # The more standards-conforming stlport4 library is 82069ef0b394Smrg # incompatible with the Cstd library. Avoid specifying 82079ef0b394Smrg # it if it's in CXXFLAGS. Ignore libCrun as 82089ef0b394Smrg # -library=stlport4 depends on it. 82099ef0b394Smrg case " $CXX $CXXFLAGS " in 82109ef0b394Smrg *" -library=stlport4 "*) 82119ef0b394Smrg solaris_use_stlport4=yes 82129ef0b394Smrg ;; 82139ef0b394Smrg esac 8214c5629e66Smrg 82159ef0b394Smrg # Adding this requires a known-good setup of shared libraries for 82169ef0b394Smrg # Sun compiler versions before 5.6, else PIC objects from an old 82179ef0b394Smrg # archive will be linked into the output, leading to subtle bugs. 82189ef0b394Smrg if test "$solaris_use_stlport4" != yes; then 82199ef0b394Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 82209ef0b394Smrg fi 82219ef0b394Smrg ;; 82229ef0b394Smrg esac 82239ef0b394Smrg ;; 82249ef0b394Smrgesac 8225698f425bSmrg]) 8226c5629e66Smrg 82279ef0b394Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 82289ef0b394Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 82299ef0b394Smrgesac 82309ef0b394Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 82319ef0b394Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 82329ef0b394Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 82339ef0b394Smrgfi 82349ef0b394Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 82359ef0b394Smrg [The directories searched by this compiler when creating a shared library]) 82369ef0b394Smrg_LT_TAGDECL([], [predep_objects], [1], 82379ef0b394Smrg [Dependencies to place before and after the objects being linked to 82389ef0b394Smrg create a shared library]) 82399ef0b394Smrg_LT_TAGDECL([], [postdep_objects], [1]) 82409ef0b394Smrg_LT_TAGDECL([], [predeps], [1]) 82419ef0b394Smrg_LT_TAGDECL([], [postdeps], [1]) 82429ef0b394Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 82439ef0b394Smrg [The library search path used internally by the compiler when linking 82449ef0b394Smrg a shared library]) 82459ef0b394Smrg])# _LT_SYS_HIDDEN_LIBDEPS 8246c5629e66Smrg 8247c5629e66Smrg 82489ef0b394Smrg# _LT_LANG_F77_CONFIG([TAG]) 82499ef0b394Smrg# -------------------------- 82509ef0b394Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 82519ef0b394Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 82529ef0b394Smrg# to write the compiler configuration to `libtool'. 82539ef0b394Smrgm4_defun([_LT_LANG_F77_CONFIG], 82549ef0b394Smrg[AC_LANG_PUSH(Fortran 77) 82559ef0b394Smrgif test -z "$F77" || test "X$F77" = "Xno"; then 82569ef0b394Smrg _lt_disable_F77=yes 82579ef0b394Smrgfi 8258698f425bSmrg 82599ef0b394Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 82609ef0b394Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 82619ef0b394Smrg_LT_TAGVAR(always_export_symbols, $1)=no 82629ef0b394Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 82639ef0b394Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 82649ef0b394Smrg_LT_TAGVAR(hardcode_direct, $1)=no 82659ef0b394Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 82669ef0b394Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 82679ef0b394Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 82689ef0b394Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 82699ef0b394Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 82709ef0b394Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 82719ef0b394Smrg_LT_TAGVAR(inherit_rpath, $1)=no 82729ef0b394Smrg_LT_TAGVAR(module_cmds, $1)= 82739ef0b394Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 82749ef0b394Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 82759ef0b394Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 82769ef0b394Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 82779ef0b394Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 82789ef0b394Smrg_LT_TAGVAR(no_undefined_flag, $1)= 82799ef0b394Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 82809ef0b394Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 8281698f425bSmrg 82829ef0b394Smrg# Source file extension for f77 test sources. 82839ef0b394Smrgac_ext=f 8284698f425bSmrg 82859ef0b394Smrg# Object file extension for compiled f77 test sources. 82869ef0b394Smrgobjext=o 82879ef0b394Smrg_LT_TAGVAR(objext, $1)=$objext 8288698f425bSmrg 82899ef0b394Smrg# No sense in running all these tests if we already determined that 82909ef0b394Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 82919ef0b394Smrg# are currently assumed to apply to all compilers on this platform, 82929ef0b394Smrg# and will be corrupted by setting them based on a non-working compiler. 82939ef0b394Smrgif test "$_lt_disable_F77" != yes; then 82949ef0b394Smrg # Code to be used in simple compile tests 82959ef0b394Smrg lt_simple_compile_test_code="\ 82969ef0b394Smrg subroutine t 82979ef0b394Smrg return 82989ef0b394Smrg end 82999ef0b394Smrg" 8300698f425bSmrg 83019ef0b394Smrg # Code to be used in simple link tests 83029ef0b394Smrg lt_simple_link_test_code="\ 83039ef0b394Smrg program t 83049ef0b394Smrg end 83059ef0b394Smrg" 8306698f425bSmrg 83079ef0b394Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 83089ef0b394Smrg _LT_TAG_COMPILER 8309c5629e66Smrg 83109ef0b394Smrg # save warnings/boilerplate of simple test code 83119ef0b394Smrg _LT_COMPILER_BOILERPLATE 83129ef0b394Smrg _LT_LINKER_BOILERPLATE 8313c5629e66Smrg 83149ef0b394Smrg # Allow CC to be a program name with arguments. 83159ef0b394Smrg lt_save_CC="$CC" 83169ef0b394Smrg lt_save_GCC=$GCC 83179ef0b394Smrg lt_save_CFLAGS=$CFLAGS 83189ef0b394Smrg CC=${F77-"f77"} 83199ef0b394Smrg CFLAGS=$FFLAGS 83209ef0b394Smrg compiler=$CC 83219ef0b394Smrg _LT_TAGVAR(compiler, $1)=$CC 83229ef0b394Smrg _LT_CC_BASENAME([$compiler]) 83239ef0b394Smrg GCC=$G77 83249ef0b394Smrg if test -n "$compiler"; then 83259ef0b394Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 83269ef0b394Smrg AC_MSG_RESULT([$can_build_shared]) 83279ef0b394Smrg 83289ef0b394Smrg AC_MSG_CHECKING([whether to build shared libraries]) 83299ef0b394Smrg test "$can_build_shared" = "no" && enable_shared=no 83309ef0b394Smrg 83319ef0b394Smrg # On AIX, shared libraries and static libraries use the same namespace, and 83329ef0b394Smrg # are all built from PIC. 83339ef0b394Smrg case $host_os in 83349ef0b394Smrg aix3*) 83359ef0b394Smrg test "$enable_shared" = yes && enable_static=no 83369ef0b394Smrg if test -n "$RANLIB"; then 83379ef0b394Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 83389ef0b394Smrg postinstall_cmds='$RANLIB $lib' 83399ef0b394Smrg fi 83409ef0b394Smrg ;; 83419ef0b394Smrg aix[[4-9]]*) 83429ef0b394Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 83439ef0b394Smrg test "$enable_shared" = yes && enable_static=no 8344698f425bSmrg fi 83459ef0b394Smrg ;; 83469ef0b394Smrg esac 83479ef0b394Smrg AC_MSG_RESULT([$enable_shared]) 83489ef0b394Smrg 83499ef0b394Smrg AC_MSG_CHECKING([whether to build static libraries]) 83509ef0b394Smrg # Make sure either enable_shared or enable_static is yes. 83519ef0b394Smrg test "$enable_shared" = yes || enable_static=yes 83529ef0b394Smrg AC_MSG_RESULT([$enable_static]) 8353698f425bSmrg 83549ef0b394Smrg _LT_TAGVAR(GCC, $1)="$G77" 83559ef0b394Smrg _LT_TAGVAR(LD, $1)="$LD" 8356698f425bSmrg 83579ef0b394Smrg ## CAVEAT EMPTOR: 83589ef0b394Smrg ## There is no encapsulation within the following macros, do not change 83599ef0b394Smrg ## the running order or otherwise move them around unless you know exactly 83609ef0b394Smrg ## what you are doing... 83619ef0b394Smrg _LT_COMPILER_PIC($1) 83629ef0b394Smrg _LT_COMPILER_C_O($1) 83639ef0b394Smrg _LT_COMPILER_FILE_LOCKS($1) 83649ef0b394Smrg _LT_LINKER_SHLIBS($1) 83659ef0b394Smrg _LT_SYS_DYNAMIC_LINKER($1) 83669ef0b394Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 8367698f425bSmrg 83689ef0b394Smrg _LT_CONFIG($1) 83699ef0b394Smrg fi # test -n "$compiler" 8370c5629e66Smrg 83719ef0b394Smrg GCC=$lt_save_GCC 83729ef0b394Smrg CC="$lt_save_CC" 83739ef0b394Smrg CFLAGS="$lt_save_CFLAGS" 83749ef0b394Smrgfi # test "$_lt_disable_F77" != yes 8375c5629e66Smrg 83769ef0b394SmrgAC_LANG_POP 83779ef0b394Smrg])# _LT_LANG_F77_CONFIG 8378698f425bSmrg 8379698f425bSmrg 83809ef0b394Smrg# _LT_LANG_FC_CONFIG([TAG]) 83819ef0b394Smrg# ------------------------- 83829ef0b394Smrg# Ensure that the configuration variables for a Fortran compiler are 83839ef0b394Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 83849ef0b394Smrg# to write the compiler configuration to `libtool'. 83859ef0b394Smrgm4_defun([_LT_LANG_FC_CONFIG], 83869ef0b394Smrg[AC_LANG_PUSH(Fortran) 8387698f425bSmrg 83889ef0b394Smrgif test -z "$FC" || test "X$FC" = "Xno"; then 83899ef0b394Smrg _lt_disable_FC=yes 83909ef0b394Smrgfi 8391698f425bSmrg 83929ef0b394Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 83939ef0b394Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 83949ef0b394Smrg_LT_TAGVAR(always_export_symbols, $1)=no 83959ef0b394Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 83969ef0b394Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 83979ef0b394Smrg_LT_TAGVAR(hardcode_direct, $1)=no 83989ef0b394Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 83999ef0b394Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 84009ef0b394Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 84019ef0b394Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 84029ef0b394Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 84039ef0b394Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 84049ef0b394Smrg_LT_TAGVAR(inherit_rpath, $1)=no 84059ef0b394Smrg_LT_TAGVAR(module_cmds, $1)= 84069ef0b394Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 84079ef0b394Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 84089ef0b394Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 84099ef0b394Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 84109ef0b394Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 84119ef0b394Smrg_LT_TAGVAR(no_undefined_flag, $1)= 84129ef0b394Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 84139ef0b394Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 8414c5629e66Smrg 84159ef0b394Smrg# Source file extension for fc test sources. 84169ef0b394Smrgac_ext=${ac_fc_srcext-f} 8417698f425bSmrg 84189ef0b394Smrg# Object file extension for compiled fc test sources. 84199ef0b394Smrgobjext=o 84209ef0b394Smrg_LT_TAGVAR(objext, $1)=$objext 8421698f425bSmrg 84229ef0b394Smrg# No sense in running all these tests if we already determined that 84239ef0b394Smrg# the FC compiler isn't working. Some variables (like enable_shared) 84249ef0b394Smrg# are currently assumed to apply to all compilers on this platform, 84259ef0b394Smrg# and will be corrupted by setting them based on a non-working compiler. 84269ef0b394Smrgif test "$_lt_disable_FC" != yes; then 84279ef0b394Smrg # Code to be used in simple compile tests 84289ef0b394Smrg lt_simple_compile_test_code="\ 84299ef0b394Smrg subroutine t 84309ef0b394Smrg return 84319ef0b394Smrg end 84329ef0b394Smrg" 8433698f425bSmrg 84349ef0b394Smrg # Code to be used in simple link tests 84359ef0b394Smrg lt_simple_link_test_code="\ 84369ef0b394Smrg program t 84379ef0b394Smrg end 84389ef0b394Smrg" 8439698f425bSmrg 84409ef0b394Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 84419ef0b394Smrg _LT_TAG_COMPILER 8442698f425bSmrg 84439ef0b394Smrg # save warnings/boilerplate of simple test code 84449ef0b394Smrg _LT_COMPILER_BOILERPLATE 84459ef0b394Smrg _LT_LINKER_BOILERPLATE 8446698f425bSmrg 84479ef0b394Smrg # Allow CC to be a program name with arguments. 84489ef0b394Smrg lt_save_CC="$CC" 84499ef0b394Smrg lt_save_GCC=$GCC 84509ef0b394Smrg lt_save_CFLAGS=$CFLAGS 84519ef0b394Smrg CC=${FC-"f95"} 84529ef0b394Smrg CFLAGS=$FCFLAGS 84539ef0b394Smrg compiler=$CC 84549ef0b394Smrg GCC=$ac_cv_fc_compiler_gnu 8455698f425bSmrg 84569ef0b394Smrg _LT_TAGVAR(compiler, $1)=$CC 84579ef0b394Smrg _LT_CC_BASENAME([$compiler]) 8458698f425bSmrg 84599ef0b394Smrg if test -n "$compiler"; then 84609ef0b394Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 84619ef0b394Smrg AC_MSG_RESULT([$can_build_shared]) 84629ef0b394Smrg 84639ef0b394Smrg AC_MSG_CHECKING([whether to build shared libraries]) 84649ef0b394Smrg test "$can_build_shared" = "no" && enable_shared=no 84659ef0b394Smrg 84669ef0b394Smrg # On AIX, shared libraries and static libraries use the same namespace, and 84679ef0b394Smrg # are all built from PIC. 84689ef0b394Smrg case $host_os in 84699ef0b394Smrg aix3*) 84709ef0b394Smrg test "$enable_shared" = yes && enable_static=no 84719ef0b394Smrg if test -n "$RANLIB"; then 84729ef0b394Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 84739ef0b394Smrg postinstall_cmds='$RANLIB $lib' 84749ef0b394Smrg fi 84759ef0b394Smrg ;; 84769ef0b394Smrg aix[[4-9]]*) 84779ef0b394Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 84789ef0b394Smrg test "$enable_shared" = yes && enable_static=no 8479698f425bSmrg fi 84809ef0b394Smrg ;; 84819ef0b394Smrg esac 84829ef0b394Smrg AC_MSG_RESULT([$enable_shared]) 8483c5629e66Smrg 84849ef0b394Smrg AC_MSG_CHECKING([whether to build static libraries]) 84859ef0b394Smrg # Make sure either enable_shared or enable_static is yes. 84869ef0b394Smrg test "$enable_shared" = yes || enable_static=yes 84879ef0b394Smrg AC_MSG_RESULT([$enable_static]) 8488c5629e66Smrg 84899ef0b394Smrg _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 84909ef0b394Smrg _LT_TAGVAR(LD, $1)="$LD" 8491698f425bSmrg 84929ef0b394Smrg ## CAVEAT EMPTOR: 84939ef0b394Smrg ## There is no encapsulation within the following macros, do not change 84949ef0b394Smrg ## the running order or otherwise move them around unless you know exactly 84959ef0b394Smrg ## what you are doing... 84969ef0b394Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 84979ef0b394Smrg _LT_COMPILER_PIC($1) 84989ef0b394Smrg _LT_COMPILER_C_O($1) 84999ef0b394Smrg _LT_COMPILER_FILE_LOCKS($1) 85009ef0b394Smrg _LT_LINKER_SHLIBS($1) 85019ef0b394Smrg _LT_SYS_DYNAMIC_LINKER($1) 85029ef0b394Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 8503698f425bSmrg 85049ef0b394Smrg _LT_CONFIG($1) 85059ef0b394Smrg fi # test -n "$compiler" 8506698f425bSmrg 85079ef0b394Smrg GCC=$lt_save_GCC 85089ef0b394Smrg CC=$lt_save_CC 85099ef0b394Smrg CFLAGS=$lt_save_CFLAGS 85109ef0b394Smrgfi # test "$_lt_disable_FC" != yes 8511698f425bSmrg 85129ef0b394SmrgAC_LANG_POP 85139ef0b394Smrg])# _LT_LANG_FC_CONFIG 8514698f425bSmrg 8515698f425bSmrg 85169ef0b394Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 85179ef0b394Smrg# -------------------------- 85189ef0b394Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 85199ef0b394Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 85209ef0b394Smrg# to write the compiler configuration to `libtool'. 85219ef0b394Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 85229ef0b394Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 85239ef0b394SmrgAC_LANG_SAVE 85249ef0b394Smrg 85259ef0b394Smrg# Source file extension for Java test sources. 85269ef0b394Smrgac_ext=java 8527698f425bSmrg 85289ef0b394Smrg# Object file extension for compiled Java test sources. 85299ef0b394Smrgobjext=o 85309ef0b394Smrg_LT_TAGVAR(objext, $1)=$objext 8531698f425bSmrg 85329ef0b394Smrg# Code to be used in simple compile tests 85339ef0b394Smrglt_simple_compile_test_code="class foo {}" 8534698f425bSmrg 85359ef0b394Smrg# Code to be used in simple link tests 85369ef0b394Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 8537698f425bSmrg 85389ef0b394Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 85399ef0b394Smrg_LT_TAG_COMPILER 8540698f425bSmrg 85419ef0b394Smrg# save warnings/boilerplate of simple test code 85429ef0b394Smrg_LT_COMPILER_BOILERPLATE 85439ef0b394Smrg_LT_LINKER_BOILERPLATE 8544698f425bSmrg 85459ef0b394Smrg# Allow CC to be a program name with arguments. 85469ef0b394Smrglt_save_CC=$CC 85479ef0b394Smrglt_save_CFLAGS=$CFLAGS 85489ef0b394Smrglt_save_GCC=$GCC 85499ef0b394SmrgGCC=yes 85509ef0b394SmrgCC=${GCJ-"gcj"} 85519ef0b394SmrgCFLAGS=$GCJFLAGS 85529ef0b394Smrgcompiler=$CC 85539ef0b394Smrg_LT_TAGVAR(compiler, $1)=$CC 85549ef0b394Smrg_LT_TAGVAR(LD, $1)="$LD" 85559ef0b394Smrg_LT_CC_BASENAME([$compiler]) 8556698f425bSmrg 85579ef0b394Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 85589ef0b394Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8559698f425bSmrg 85609ef0b394Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 85619ef0b394Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 85629ef0b394Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8563698f425bSmrg 85649ef0b394Smrgif test -n "$compiler"; then 85659ef0b394Smrg _LT_COMPILER_NO_RTTI($1) 85669ef0b394Smrg _LT_COMPILER_PIC($1) 85679ef0b394Smrg _LT_COMPILER_C_O($1) 85689ef0b394Smrg _LT_COMPILER_FILE_LOCKS($1) 85699ef0b394Smrg _LT_LINKER_SHLIBS($1) 85709ef0b394Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 8571698f425bSmrg 85729ef0b394Smrg _LT_CONFIG($1) 85739ef0b394Smrgfi 8574698f425bSmrg 85759ef0b394SmrgAC_LANG_RESTORE 8576698f425bSmrg 85779ef0b394SmrgGCC=$lt_save_GCC 85789ef0b394SmrgCC=$lt_save_CC 85799ef0b394SmrgCFLAGS=$lt_save_CFLAGS 85809ef0b394Smrg])# _LT_LANG_GCJ_CONFIG 8581698f425bSmrg 8582698f425bSmrg 85839ef0b394Smrg# _LT_LANG_RC_CONFIG([TAG]) 85849ef0b394Smrg# ------------------------- 85859ef0b394Smrg# Ensure that the configuration variables for the Windows resource compiler 85869ef0b394Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 85879ef0b394Smrg# to write the compiler configuration to `libtool'. 85889ef0b394Smrgm4_defun([_LT_LANG_RC_CONFIG], 85899ef0b394Smrg[AC_REQUIRE([LT_PROG_RC])dnl 85909ef0b394SmrgAC_LANG_SAVE 8591698f425bSmrg 85929ef0b394Smrg# Source file extension for RC test sources. 85939ef0b394Smrgac_ext=rc 8594698f425bSmrg 85959ef0b394Smrg# Object file extension for compiled RC test sources. 85969ef0b394Smrgobjext=o 85979ef0b394Smrg_LT_TAGVAR(objext, $1)=$objext 8598698f425bSmrg 85999ef0b394Smrg# Code to be used in simple compile tests 86009ef0b394Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 8601698f425bSmrg 86029ef0b394Smrg# Code to be used in simple link tests 86039ef0b394Smrglt_simple_link_test_code="$lt_simple_compile_test_code" 8604698f425bSmrg 86059ef0b394Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 86069ef0b394Smrg_LT_TAG_COMPILER 8607698f425bSmrg 86089ef0b394Smrg# save warnings/boilerplate of simple test code 86099ef0b394Smrg_LT_COMPILER_BOILERPLATE 86109ef0b394Smrg_LT_LINKER_BOILERPLATE 8611698f425bSmrg 86129ef0b394Smrg# Allow CC to be a program name with arguments. 86139ef0b394Smrglt_save_CC="$CC" 86149ef0b394Smrglt_save_CFLAGS=$CFLAGS 86159ef0b394Smrglt_save_GCC=$GCC 86169ef0b394SmrgGCC= 86179ef0b394SmrgCC=${RC-"windres"} 86189ef0b394SmrgCFLAGS= 86199ef0b394Smrgcompiler=$CC 86209ef0b394Smrg_LT_TAGVAR(compiler, $1)=$CC 86219ef0b394Smrg_LT_CC_BASENAME([$compiler]) 86229ef0b394Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 8623698f425bSmrg 86249ef0b394Smrgif test -n "$compiler"; then 86259ef0b394Smrg : 86269ef0b394Smrg _LT_CONFIG($1) 86279ef0b394Smrgfi 8628698f425bSmrg 86299ef0b394SmrgGCC=$lt_save_GCC 86309ef0b394SmrgAC_LANG_RESTORE 86319ef0b394SmrgCC=$lt_save_CC 86329ef0b394SmrgCFLAGS=$lt_save_CFLAGS 86339ef0b394Smrg])# _LT_LANG_RC_CONFIG 8634c5629e66Smrg 8635c5629e66Smrg 86369ef0b394Smrg# LT_PROG_GCJ 86379ef0b394Smrg# ----------- 86389ef0b394SmrgAC_DEFUN([LT_PROG_GCJ], 86399ef0b394Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 86409ef0b394Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 86419ef0b394Smrg [AC_CHECK_TOOL(GCJ, gcj,) 86429ef0b394Smrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 86439ef0b394Smrg AC_SUBST(GCJFLAGS)])])[]dnl 86449ef0b394Smrg]) 8645c5629e66Smrg 86469ef0b394Smrg# Old name: 86479ef0b394SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 86489ef0b394Smrgdnl aclocal-1.4 backwards compatibility: 86499ef0b394Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 8650c5629e66Smrg 8651c5629e66Smrg 86529ef0b394Smrg# LT_PROG_RC 86539ef0b394Smrg# ---------- 86549ef0b394SmrgAC_DEFUN([LT_PROG_RC], 86559ef0b394Smrg[AC_CHECK_TOOL(RC, windres,) 86569ef0b394Smrg]) 8657c5629e66Smrg 86589ef0b394Smrg# Old name: 86599ef0b394SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 86609ef0b394Smrgdnl aclocal-1.4 backwards compatibility: 86619ef0b394Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 8662c5629e66Smrg 8663698f425bSmrg 86649ef0b394Smrg# _LT_DECL_EGREP 86659ef0b394Smrg# -------------- 86669ef0b394Smrg# If we don't have a new enough Autoconf to choose the best grep 86679ef0b394Smrg# available, choose the one first in the user's PATH. 86689ef0b394Smrgm4_defun([_LT_DECL_EGREP], 86699ef0b394Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 86709ef0b394SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 86719ef0b394Smrgtest -z "$GREP" && GREP=grep 86729ef0b394Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 86739ef0b394Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 86749ef0b394Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 86759ef0b394Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 86769ef0b394SmrgAC_SUBST([GREP]) 8677c5629e66Smrg]) 8678c5629e66Smrg 8679c5629e66Smrg 86809ef0b394Smrg# _LT_DECL_OBJDUMP 86819ef0b394Smrg# -------------- 86829ef0b394Smrg# If we don't have a new enough Autoconf to choose the best objdump 86839ef0b394Smrg# available, choose the one first in the user's PATH. 86849ef0b394Smrgm4_defun([_LT_DECL_OBJDUMP], 86859ef0b394Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 86869ef0b394Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 86879ef0b394Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 86889ef0b394SmrgAC_SUBST([OBJDUMP]) 86899ef0b394Smrg]) 86909ef0b394Smrg 86919ef0b394Smrg# _LT_DECL_DLLTOOL 86929ef0b394Smrg# ---------------- 86939ef0b394Smrg# Ensure DLLTOOL variable is set. 86949ef0b394Smrgm4_defun([_LT_DECL_DLLTOOL], 86959ef0b394Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 86969ef0b394Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 86979ef0b394Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 86989ef0b394SmrgAC_SUBST([DLLTOOL]) 86999ef0b394Smrg]) 8700c5629e66Smrg 87019ef0b394Smrg# _LT_DECL_SED 87029ef0b394Smrg# ------------ 87039ef0b394Smrg# Check for a fully-functional sed program, that truncates 87049ef0b394Smrg# as few characters as possible. Prefer GNU sed if found. 87059ef0b394Smrgm4_defun([_LT_DECL_SED], 87069ef0b394Smrg[AC_PROG_SED 87079ef0b394Smrgtest -z "$SED" && SED=sed 87089ef0b394SmrgXsed="$SED -e 1s/^X//" 87099ef0b394Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 87109ef0b394Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 87119ef0b394Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 87129ef0b394Smrg])# _LT_DECL_SED 8713c5629e66Smrg 87149ef0b394Smrgm4_ifndef([AC_PROG_SED], [ 87159ef0b394Smrg# NOTE: This macro has been submitted for inclusion into # 87169ef0b394Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 87179ef0b394Smrg# a released version of Autoconf we should remove this # 87189ef0b394Smrg# macro and use it instead. # 8719c5629e66Smrg 87209ef0b394Smrgm4_defun([AC_PROG_SED], 87219ef0b394Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 87229ef0b394SmrgAC_CACHE_VAL(lt_cv_path_SED, 87239ef0b394Smrg[# Loop through the user's path and test for sed and gsed. 87249ef0b394Smrg# Then use that list of sed's as ones to test for truncation. 87259ef0b394Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 87269ef0b394Smrgfor as_dir in $PATH 87279ef0b394Smrgdo 87289ef0b394Smrg IFS=$as_save_IFS 87299ef0b394Smrg test -z "$as_dir" && as_dir=. 87309ef0b394Smrg for lt_ac_prog in sed gsed; do 87319ef0b394Smrg for ac_exec_ext in '' $ac_executable_extensions; do 87329ef0b394Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 87339ef0b394Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 87349ef0b394Smrg fi 87359ef0b394Smrg done 87369ef0b394Smrg done 87379ef0b394Smrgdone 87389ef0b394SmrgIFS=$as_save_IFS 87399ef0b394Smrglt_ac_max=0 87409ef0b394Smrglt_ac_count=0 87419ef0b394Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 87429ef0b394Smrg# along with /bin/sed that truncates output. 87439ef0b394Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 87449ef0b394Smrg test ! -f $lt_ac_sed && continue 87459ef0b394Smrg cat /dev/null > conftest.in 87469ef0b394Smrg lt_ac_count=0 87479ef0b394Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 87489ef0b394Smrg # Check for GNU sed and select it if it is found. 87499ef0b394Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 87509ef0b394Smrg lt_cv_path_SED=$lt_ac_sed 87519ef0b394Smrg break 87529ef0b394Smrg fi 87539ef0b394Smrg while true; do 87549ef0b394Smrg cat conftest.in conftest.in >conftest.tmp 87559ef0b394Smrg mv conftest.tmp conftest.in 87569ef0b394Smrg cp conftest.in conftest.nl 87579ef0b394Smrg echo >>conftest.nl 87589ef0b394Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 87599ef0b394Smrg cmp -s conftest.out conftest.nl || break 87609ef0b394Smrg # 10000 chars as input seems more than enough 87619ef0b394Smrg test $lt_ac_count -gt 10 && break 87629ef0b394Smrg lt_ac_count=`expr $lt_ac_count + 1` 87639ef0b394Smrg if test $lt_ac_count -gt $lt_ac_max; then 87649ef0b394Smrg lt_ac_max=$lt_ac_count 87659ef0b394Smrg lt_cv_path_SED=$lt_ac_sed 87669ef0b394Smrg fi 87679ef0b394Smrg done 87689ef0b394Smrgdone 8769c5629e66Smrg]) 87709ef0b394SmrgSED=$lt_cv_path_SED 87719ef0b394SmrgAC_SUBST([SED]) 87729ef0b394SmrgAC_MSG_RESULT([$SED]) 87739ef0b394Smrg])#AC_PROG_SED 87749ef0b394Smrg])#m4_ifndef 8775c5629e66Smrg 87769ef0b394Smrg# Old name: 87779ef0b394SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 87789ef0b394Smrgdnl aclocal-1.4 backwards compatibility: 87799ef0b394Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 8780698f425bSmrg 8781698f425bSmrg 87829ef0b394Smrg# _LT_CHECK_SHELL_FEATURES 87839ef0b394Smrg# ------------------------ 87849ef0b394Smrg# Find out whether the shell is Bourne or XSI compatible, 87859ef0b394Smrg# or has some other useful features. 87869ef0b394Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 87879ef0b394Smrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 87889ef0b394Smrg# Try some XSI features 87899ef0b394Smrgxsi_shell=no 87909ef0b394Smrg( _lt_dummy="a/b/c" 87919ef0b394Smrg test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ 87929ef0b394Smrg = c,a/b,b/c, \ 87939ef0b394Smrg && eval 'test $(( 1 + 1 )) -eq 2 \ 87949ef0b394Smrg && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 87959ef0b394Smrg && xsi_shell=yes 87969ef0b394SmrgAC_MSG_RESULT([$xsi_shell]) 87979ef0b394Smrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 8798698f425bSmrg 87999ef0b394SmrgAC_MSG_CHECKING([whether the shell understands "+="]) 88009ef0b394Smrglt_shell_append=no 88019ef0b394Smrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 88029ef0b394Smrg >/dev/null 2>&1 \ 88039ef0b394Smrg && lt_shell_append=yes 88049ef0b394SmrgAC_MSG_RESULT([$lt_shell_append]) 88059ef0b394Smrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 8806c5629e66Smrg 88079ef0b394Smrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 88089ef0b394Smrg lt_unset=unset 88099ef0b394Smrgelse 88109ef0b394Smrg lt_unset=false 8811c5629e66Smrgfi 88129ef0b394Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 88139ef0b394Smrg 88149ef0b394Smrg# test EBCDIC or ASCII 88159ef0b394Smrgcase `echo X|tr X '\101'` in 88169ef0b394Smrg A) # ASCII based system 88179ef0b394Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 88189ef0b394Smrg lt_SP2NL='tr \040 \012' 88199ef0b394Smrg lt_NL2SP='tr \015\012 \040\040' 88209ef0b394Smrg ;; 88219ef0b394Smrg *) # EBCDIC based system 88229ef0b394Smrg lt_SP2NL='tr \100 \n' 88239ef0b394Smrg lt_NL2SP='tr \r\n \100\100' 88249ef0b394Smrg ;; 88259ef0b394Smrgesac 88269ef0b394Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 88279ef0b394Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 88289ef0b394Smrg])# _LT_CHECK_SHELL_FEATURES 8829c5629e66Smrg 8830c5629e66Smrg 88319ef0b394Smrg# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) 88329ef0b394Smrg# ------------------------------------------------------ 88339ef0b394Smrg# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and 88349ef0b394Smrg# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. 88359ef0b394Smrgm4_defun([_LT_PROG_FUNCTION_REPLACE], 88369ef0b394Smrg[dnl { 88379ef0b394Smrgsed -e '/^$1 ()$/,/^} # $1 /c\ 88389ef0b394Smrg$1 ()\ 88399ef0b394Smrg{\ 88409ef0b394Smrgm4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) 88419ef0b394Smrg} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ 88429ef0b394Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 88439ef0b394Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 88449ef0b394Smrgtest 0 -eq $? || _lt_function_replace_fail=: 88459ef0b394Smrg]) 8846c5629e66Smrg 8847c5629e66Smrg 88489ef0b394Smrg# _LT_PROG_REPLACE_SHELLFNS 88499ef0b394Smrg# ------------------------- 88509ef0b394Smrg# Replace existing portable implementations of several shell functions with 88519ef0b394Smrg# equivalent extended shell implementations where those features are available.. 88529ef0b394Smrgm4_defun([_LT_PROG_REPLACE_SHELLFNS], 88539ef0b394Smrg[if test x"$xsi_shell" = xyes; then 88549ef0b394Smrg _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl 88559ef0b394Smrg case ${1} in 88569ef0b394Smrg */*) func_dirname_result="${1%/*}${2}" ;; 88579ef0b394Smrg * ) func_dirname_result="${3}" ;; 88589ef0b394Smrg esac]) 88599ef0b394Smrg 88609ef0b394Smrg _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl 88619ef0b394Smrg func_basename_result="${1##*/}"]) 88629ef0b394Smrg 88639ef0b394Smrg _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl 88649ef0b394Smrg case ${1} in 88659ef0b394Smrg */*) func_dirname_result="${1%/*}${2}" ;; 88669ef0b394Smrg * ) func_dirname_result="${3}" ;; 88679ef0b394Smrg esac 88689ef0b394Smrg func_basename_result="${1##*/}"]) 88699ef0b394Smrg 88709ef0b394Smrg _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl 88719ef0b394Smrg # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 88729ef0b394Smrg # positional parameters, so assign one to ordinary parameter first. 88739ef0b394Smrg func_stripname_result=${3} 88749ef0b394Smrg func_stripname_result=${func_stripname_result#"${1}"} 88759ef0b394Smrg func_stripname_result=${func_stripname_result%"${2}"}]) 88769ef0b394Smrg 88779ef0b394Smrg _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl 88789ef0b394Smrg func_split_long_opt_name=${1%%=*} 88799ef0b394Smrg func_split_long_opt_arg=${1#*=}]) 88809ef0b394Smrg 88819ef0b394Smrg _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl 88829ef0b394Smrg func_split_short_opt_arg=${1#??} 88839ef0b394Smrg func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) 88849ef0b394Smrg 88859ef0b394Smrg _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl 88869ef0b394Smrg case ${1} in 88879ef0b394Smrg *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 88889ef0b394Smrg *) func_lo2o_result=${1} ;; 88899ef0b394Smrg esac]) 88909ef0b394Smrg 88919ef0b394Smrg _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) 88929ef0b394Smrg 88939ef0b394Smrg _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) 88949ef0b394Smrg 88959ef0b394Smrg _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) 88969ef0b394Smrgfi 88979ef0b394Smrg 88989ef0b394Smrgif test x"$lt_shell_append" = xyes; then 88999ef0b394Smrg _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) 89009ef0b394Smrg 89019ef0b394Smrg _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl 89029ef0b394Smrg func_quote_for_eval "${2}" 89039ef0b394Smrgdnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ 89049ef0b394Smrg eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) 89059ef0b394Smrg 89069ef0b394Smrg # Save a `func_append' function call where possible by direct use of '+=' 89079ef0b394Smrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ 89089ef0b394Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 89099ef0b394Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 89109ef0b394Smrg test 0 -eq $? || _lt_function_replace_fail=: 8911c5629e66Smrgelse 89129ef0b394Smrg # Save a `func_append' function call even when '+=' is not available 89139ef0b394Smrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ 89149ef0b394Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 89159ef0b394Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 89169ef0b394Smrg test 0 -eq $? || _lt_function_replace_fail=: 89179ef0b394Smrgfi 8918c5629e66Smrg 89199ef0b394Smrgif test x"$_lt_function_replace_fail" = x":"; then 89209ef0b394Smrg AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) 89219ef0b394Smrgfi 89229ef0b394Smrg]) 8923c5629e66Smrg 89249ef0b394Smrg# _LT_PATH_CONVERSION_FUNCTIONS 89259ef0b394Smrg# ----------------------------- 89269ef0b394Smrg# Determine which file name conversion functions should be used by 89279ef0b394Smrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 89289ef0b394Smrg# for certain cross-compile configurations and native mingw. 89299ef0b394Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 89309ef0b394Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 89319ef0b394SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 89329ef0b394SmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 89339ef0b394SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 89349ef0b394Smrg[case $host in 89359ef0b394Smrg *-*-mingw* ) 89369ef0b394Smrg case $build in 89379ef0b394Smrg *-*-mingw* ) # actually msys 89389ef0b394Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 89399ef0b394Smrg ;; 89409ef0b394Smrg *-*-cygwin* ) 89419ef0b394Smrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 89429ef0b394Smrg ;; 89439ef0b394Smrg * ) # otherwise, assume *nix 89449ef0b394Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 89459ef0b394Smrg ;; 89469ef0b394Smrg esac 89479ef0b394Smrg ;; 89489ef0b394Smrg *-*-cygwin* ) 89499ef0b394Smrg case $build in 89509ef0b394Smrg *-*-mingw* ) # actually msys 89519ef0b394Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 89529ef0b394Smrg ;; 89539ef0b394Smrg *-*-cygwin* ) 89549ef0b394Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 89559ef0b394Smrg ;; 89569ef0b394Smrg * ) # otherwise, assume *nix 89579ef0b394Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 89589ef0b394Smrg ;; 89599ef0b394Smrg esac 89609ef0b394Smrg ;; 89619ef0b394Smrg * ) # unhandled hosts (and "normal" native builds) 89629ef0b394Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 89639ef0b394Smrg ;; 89649ef0b394Smrgesac 89659ef0b394Smrg]) 89669ef0b394Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd 89679ef0b394SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 89689ef0b394Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 89699ef0b394Smrg [0], [convert $build file names to $host format])dnl 89709ef0b394Smrg 89719ef0b394SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 89729ef0b394SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 89739ef0b394Smrg[#assume ordinary cross tools, or native build. 89749ef0b394Smrglt_cv_to_tool_file_cmd=func_convert_file_noop 89759ef0b394Smrgcase $host in 89769ef0b394Smrg *-*-mingw* ) 89779ef0b394Smrg case $build in 89789ef0b394Smrg *-*-mingw* ) # actually msys 89799ef0b394Smrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 89809ef0b394Smrg ;; 89819ef0b394Smrg esac 89829ef0b394Smrg ;; 89839ef0b394Smrgesac 89849ef0b394Smrg]) 89859ef0b394Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 89869ef0b394SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 89879ef0b394Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 89889ef0b394Smrg [0], [convert $build files to toolchain format])dnl 89899ef0b394Smrg])# _LT_PATH_CONVERSION_FUNCTIONS 89909ef0b394Smrg 89919ef0b394Smrg# Helper functions for option handling. -*- Autoconf -*- 8992c5629e66Smrg# 89939ef0b394Smrg# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, 89949ef0b394Smrg# Inc. 89959ef0b394Smrg# Written by Gary V. Vaughan, 2004 8996c5629e66Smrg# 89979ef0b394Smrg# This file is free software; the Free Software Foundation gives 89989ef0b394Smrg# unlimited permission to copy and/or distribute it, with or without 89999ef0b394Smrg# modifications, as long as this notice is preserved. 9000c5629e66Smrg 90019ef0b394Smrg# serial 7 ltoptions.m4 9002c5629e66Smrg 90039ef0b394Smrg# This is to help aclocal find these macros, as it can't see m4_define. 90049ef0b394SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 9005c5629e66Smrg 9006c5629e66Smrg 90079ef0b394Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 90089ef0b394Smrg# ------------------------------------------ 90099ef0b394Smrgm4_define([_LT_MANGLE_OPTION], 90109ef0b394Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 9011c5629e66Smrg 9012c5629e66Smrg 90139ef0b394Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 90149ef0b394Smrg# --------------------------------------- 90159ef0b394Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 90169ef0b394Smrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 90179ef0b394Smrg# saved as a flag. 90189ef0b394Smrgm4_define([_LT_SET_OPTION], 90199ef0b394Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 90209ef0b394Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 90219ef0b394Smrg _LT_MANGLE_DEFUN([$1], [$2]), 90229ef0b394Smrg [m4_warning([Unknown $1 option `$2'])])[]dnl 90239ef0b394Smrg]) 9024c5629e66Smrg 9025c5629e66Smrg 90269ef0b394Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 90279ef0b394Smrg# ------------------------------------------------------------ 90289ef0b394Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 90299ef0b394Smrgm4_define([_LT_IF_OPTION], 90309ef0b394Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 9031c5629e66Smrg 9032c5629e66Smrg 90339ef0b394Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 90349ef0b394Smrg# ------------------------------------------------------- 90359ef0b394Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 90369ef0b394Smrg# are set. 90379ef0b394Smrgm4_define([_LT_UNLESS_OPTIONS], 90389ef0b394Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 90399ef0b394Smrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 90409ef0b394Smrg [m4_define([$0_found])])])[]dnl 90419ef0b394Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 90429ef0b394Smrg])[]dnl 90439ef0b394Smrg]) 9044c5629e66Smrg 9045266e564dSmrg 90469ef0b394Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 90479ef0b394Smrg# ---------------------------------------- 90489ef0b394Smrg# OPTION-LIST is a space-separated list of Libtool options associated 90499ef0b394Smrg# with MACRO-NAME. If any OPTION has a matching handler declared with 90509ef0b394Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 90519ef0b394Smrg# the unknown option and exit. 90529ef0b394Smrgm4_defun([_LT_SET_OPTIONS], 90539ef0b394Smrg[# Set options 90549ef0b394Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 90559ef0b394Smrg [_LT_SET_OPTION([$1], _LT_Option)]) 90569ef0b394Smrg 90579ef0b394Smrgm4_if([$1],[LT_INIT],[ 90589ef0b394Smrg dnl 90599ef0b394Smrg dnl Simply set some default values (i.e off) if boolean options were not 90609ef0b394Smrg dnl specified: 90619ef0b394Smrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 90629ef0b394Smrg ]) 90639ef0b394Smrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 90649ef0b394Smrg ]) 90659ef0b394Smrg dnl 90669ef0b394Smrg dnl If no reference was made to various pairs of opposing options, then 90679ef0b394Smrg dnl we run the default mode handler for the pair. For example, if neither 90689ef0b394Smrg dnl `shared' nor `disable-shared' was passed, we enable building of shared 90699ef0b394Smrg dnl archives by default: 90709ef0b394Smrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 90719ef0b394Smrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 90729ef0b394Smrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 90739ef0b394Smrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 90749ef0b394Smrg [_LT_ENABLE_FAST_INSTALL]) 90759ef0b394Smrg ]) 90769ef0b394Smrg])# _LT_SET_OPTIONS 90779ef0b394Smrg 90789ef0b394Smrg 90799ef0b394Smrg 90809ef0b394Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 90819ef0b394Smrg# ----------------------------------------- 90829ef0b394Smrgm4_define([_LT_MANGLE_DEFUN], 90839ef0b394Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 9084c5629e66Smrg 9085266e564dSmrg 90869ef0b394Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 90879ef0b394Smrg# ----------------------------------------------- 90889ef0b394Smrgm4_define([LT_OPTION_DEFINE], 90899ef0b394Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 90909ef0b394Smrg])# LT_OPTION_DEFINE 9091266e564dSmrg 9092266e564dSmrg 90939ef0b394Smrg# dlopen 90949ef0b394Smrg# ------ 90959ef0b394SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 90969ef0b394Smrg]) 9097266e564dSmrg 90989ef0b394SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 90999ef0b394Smrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 91009ef0b394SmrgAC_DIAGNOSE([obsolete], 91019ef0b394Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 91029ef0b394Smrgput the `dlopen' option into LT_INIT's first parameter.]) 91039ef0b394Smrg]) 9104266e564dSmrg 91059ef0b394Smrgdnl aclocal-1.4 backwards compatibility: 91069ef0b394Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 9107266e564dSmrg 9108266e564dSmrg 91099ef0b394Smrg# win32-dll 91109ef0b394Smrg# --------- 91119ef0b394Smrg# Declare package support for building win32 dll's. 91129ef0b394SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 91139ef0b394Smrg[enable_win32_dll=yes 9114266e564dSmrg 91159ef0b394Smrgcase $host in 91169ef0b394Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 91179ef0b394Smrg AC_CHECK_TOOL(AS, as, false) 91189ef0b394Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 91199ef0b394Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 91209ef0b394Smrg ;; 91219ef0b394Smrgesac 9122266e564dSmrg 91239ef0b394Smrgtest -z "$AS" && AS=as 91249ef0b394Smrg_LT_DECL([], [AS], [1], [Assembler program])dnl 9125266e564dSmrg 91269ef0b394Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 91279ef0b394Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 9128c5629e66Smrg 91299ef0b394Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 91309ef0b394Smrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 91319ef0b394Smrg])# win32-dll 9132c5629e66Smrg 91339ef0b394SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 91349ef0b394Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 91359ef0b394Smrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 91369ef0b394SmrgAC_DIAGNOSE([obsolete], 91379ef0b394Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 91389ef0b394Smrgput the `win32-dll' option into LT_INIT's first parameter.]) 91399ef0b394Smrg]) 9140c5629e66Smrg 91419ef0b394Smrgdnl aclocal-1.4 backwards compatibility: 91429ef0b394Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 9143d17cd367Smrg 9144d17cd367Smrg 91459ef0b394Smrg# _LT_ENABLE_SHARED([DEFAULT]) 91469ef0b394Smrg# ---------------------------- 91479ef0b394Smrg# implement the --enable-shared flag, and supports the `shared' and 91489ef0b394Smrg# `disable-shared' LT_INIT options. 91499ef0b394Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 91509ef0b394Smrgm4_define([_LT_ENABLE_SHARED], 91519ef0b394Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 91529ef0b394SmrgAC_ARG_ENABLE([shared], 91539ef0b394Smrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 91549ef0b394Smrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 91559ef0b394Smrg [p=${PACKAGE-default} 91569ef0b394Smrg case $enableval in 91579ef0b394Smrg yes) enable_shared=yes ;; 91589ef0b394Smrg no) enable_shared=no ;; 91599ef0b394Smrg *) 91609ef0b394Smrg enable_shared=no 91619ef0b394Smrg # Look at the argument we got. We use all the common list separators. 91629ef0b394Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 91639ef0b394Smrg for pkg in $enableval; do 91649ef0b394Smrg IFS="$lt_save_ifs" 91659ef0b394Smrg if test "X$pkg" = "X$p"; then 91669ef0b394Smrg enable_shared=yes 91679ef0b394Smrg fi 91689ef0b394Smrg done 91699ef0b394Smrg IFS="$lt_save_ifs" 91709ef0b394Smrg ;; 91719ef0b394Smrg esac], 91729ef0b394Smrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 9173d17cd367Smrg 91749ef0b394Smrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 91759ef0b394Smrg [Whether or not to build shared libraries]) 91769ef0b394Smrg])# _LT_ENABLE_SHARED 9177266e564dSmrg 91789ef0b394SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 91799ef0b394SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 9180266e564dSmrg 91819ef0b394Smrg# Old names: 91829ef0b394SmrgAC_DEFUN([AC_ENABLE_SHARED], 91839ef0b394Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 91849ef0b394Smrg]) 91859ef0b394Smrg 91869ef0b394SmrgAC_DEFUN([AC_DISABLE_SHARED], 91879ef0b394Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 91889ef0b394Smrg]) 9189266e564dSmrg 91909ef0b394SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 91919ef0b394SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 9192266e564dSmrg 91939ef0b394Smrgdnl aclocal-1.4 backwards compatibility: 91949ef0b394Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 91959ef0b394Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 9196d17cd367Smrg 9197266e564dSmrg 9198266e564dSmrg 91999ef0b394Smrg# _LT_ENABLE_STATIC([DEFAULT]) 92009ef0b394Smrg# ---------------------------- 92019ef0b394Smrg# implement the --enable-static flag, and support the `static' and 92029ef0b394Smrg# `disable-static' LT_INIT options. 92039ef0b394Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 92049ef0b394Smrgm4_define([_LT_ENABLE_STATIC], 92059ef0b394Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 92069ef0b394SmrgAC_ARG_ENABLE([static], 92079ef0b394Smrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 92089ef0b394Smrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 92099ef0b394Smrg [p=${PACKAGE-default} 92109ef0b394Smrg case $enableval in 92119ef0b394Smrg yes) enable_static=yes ;; 92129ef0b394Smrg no) enable_static=no ;; 92139ef0b394Smrg *) 92149ef0b394Smrg enable_static=no 92159ef0b394Smrg # Look at the argument we got. We use all the common list separators. 92169ef0b394Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 92179ef0b394Smrg for pkg in $enableval; do 92189ef0b394Smrg IFS="$lt_save_ifs" 92199ef0b394Smrg if test "X$pkg" = "X$p"; then 92209ef0b394Smrg enable_static=yes 92219ef0b394Smrg fi 92229ef0b394Smrg done 92239ef0b394Smrg IFS="$lt_save_ifs" 92249ef0b394Smrg ;; 92259ef0b394Smrg esac], 92269ef0b394Smrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 9227266e564dSmrg 92289ef0b394Smrg _LT_DECL([build_old_libs], [enable_static], [0], 92299ef0b394Smrg [Whether or not to build static libraries]) 92309ef0b394Smrg])# _LT_ENABLE_STATIC 9231266e564dSmrg 92329ef0b394SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 92339ef0b394SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 9234266e564dSmrg 92359ef0b394Smrg# Old names: 92369ef0b394SmrgAC_DEFUN([AC_ENABLE_STATIC], 92379ef0b394Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 92389ef0b394Smrg]) 9239c5629e66Smrg 92409ef0b394SmrgAC_DEFUN([AC_DISABLE_STATIC], 92419ef0b394Smrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 92429ef0b394Smrg]) 9243266e564dSmrg 92449ef0b394SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 92459ef0b394SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 9246266e564dSmrg 92479ef0b394Smrgdnl aclocal-1.4 backwards compatibility: 92489ef0b394Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 92499ef0b394Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 9250266e564dSmrg 9251266e564dSmrg 9252266e564dSmrg 92539ef0b394Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 92549ef0b394Smrg# ---------------------------------- 92559ef0b394Smrg# implement the --enable-fast-install flag, and support the `fast-install' 92569ef0b394Smrg# and `disable-fast-install' LT_INIT options. 92579ef0b394Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 92589ef0b394Smrgm4_define([_LT_ENABLE_FAST_INSTALL], 92599ef0b394Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 92609ef0b394SmrgAC_ARG_ENABLE([fast-install], 92619ef0b394Smrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 92629ef0b394Smrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 92639ef0b394Smrg [p=${PACKAGE-default} 92649ef0b394Smrg case $enableval in 92659ef0b394Smrg yes) enable_fast_install=yes ;; 92669ef0b394Smrg no) enable_fast_install=no ;; 92679ef0b394Smrg *) 92689ef0b394Smrg enable_fast_install=no 92699ef0b394Smrg # Look at the argument we got. We use all the common list separators. 92709ef0b394Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 92719ef0b394Smrg for pkg in $enableval; do 92729ef0b394Smrg IFS="$lt_save_ifs" 92739ef0b394Smrg if test "X$pkg" = "X$p"; then 92749ef0b394Smrg enable_fast_install=yes 92759ef0b394Smrg fi 92769ef0b394Smrg done 92779ef0b394Smrg IFS="$lt_save_ifs" 92789ef0b394Smrg ;; 92799ef0b394Smrg esac], 92809ef0b394Smrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 9281266e564dSmrg 92829ef0b394Smrg_LT_DECL([fast_install], [enable_fast_install], [0], 92839ef0b394Smrg [Whether or not to optimize for fast installation])dnl 92849ef0b394Smrg])# _LT_ENABLE_FAST_INSTALL 9285266e564dSmrg 92869ef0b394SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 92879ef0b394SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 9288266e564dSmrg 92899ef0b394Smrg# Old names: 92909ef0b394SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 92919ef0b394Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 92929ef0b394SmrgAC_DIAGNOSE([obsolete], 92939ef0b394Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 92949ef0b394Smrgthe `fast-install' option into LT_INIT's first parameter.]) 92959ef0b394Smrg]) 9296266e564dSmrg 92979ef0b394SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 92989ef0b394Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 92999ef0b394SmrgAC_DIAGNOSE([obsolete], 93009ef0b394Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 93019ef0b394Smrgthe `disable-fast-install' option into LT_INIT's first parameter.]) 93029ef0b394Smrg]) 9303c5629e66Smrg 93049ef0b394Smrgdnl aclocal-1.4 backwards compatibility: 93059ef0b394Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 93069ef0b394Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 9307266e564dSmrg 9308266e564dSmrg 93099ef0b394Smrg# _LT_WITH_PIC([MODE]) 93109ef0b394Smrg# -------------------- 93119ef0b394Smrg# implement the --with-pic flag, and support the `pic-only' and `no-pic' 93129ef0b394Smrg# LT_INIT options. 93139ef0b394Smrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 93149ef0b394Smrgm4_define([_LT_WITH_PIC], 93159ef0b394Smrg[AC_ARG_WITH([pic], 93169ef0b394Smrg [AS_HELP_STRING([--with-pic], 93179ef0b394Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 93189ef0b394Smrg [pic_mode="$withval"], 93199ef0b394Smrg [pic_mode=default]) 9320d17cd367Smrg 93219ef0b394Smrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 93229ef0b394Smrg 93239ef0b394Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 93249ef0b394Smrg])# _LT_WITH_PIC 93259ef0b394Smrg 93269ef0b394SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 93279ef0b394SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 93289ef0b394Smrg 93299ef0b394Smrg# Old name: 93309ef0b394SmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 93319ef0b394Smrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 93329ef0b394SmrgAC_DIAGNOSE([obsolete], 93339ef0b394Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 93349ef0b394Smrgput the `pic-only' option into LT_INIT's first parameter.]) 93359ef0b394Smrg]) 93369ef0b394Smrg 93379ef0b394Smrgdnl aclocal-1.4 backwards compatibility: 93389ef0b394Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 9339266e564dSmrg 9340266e564dSmrg 93419ef0b394Smrgm4_define([_LTDL_MODE], []) 93429ef0b394SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 93439ef0b394Smrg [m4_define([_LTDL_MODE], [nonrecursive])]) 93449ef0b394SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 93459ef0b394Smrg [m4_define([_LTDL_MODE], [recursive])]) 93469ef0b394SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 93479ef0b394Smrg [m4_define([_LTDL_MODE], [subproject])]) 9348d17cd367Smrg 93499ef0b394Smrgm4_define([_LTDL_TYPE], []) 93509ef0b394SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 93519ef0b394Smrg [m4_define([_LTDL_TYPE], [installable])]) 93529ef0b394SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 93539ef0b394Smrg [m4_define([_LTDL_TYPE], [convenience])]) 93549ef0b394Smrg 93559ef0b394Smrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 9356d17cd367Smrg# 93579ef0b394Smrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 93589ef0b394Smrg# Written by Gary V. Vaughan, 2004 9359d17cd367Smrg# 93609ef0b394Smrg# This file is free software; the Free Software Foundation gives 93619ef0b394Smrg# unlimited permission to copy and/or distribute it, with or without 93629ef0b394Smrg# modifications, as long as this notice is preserved. 9363d17cd367Smrg 93649ef0b394Smrg# serial 6 ltsugar.m4 9365c5629e66Smrg 93669ef0b394Smrg# This is to help aclocal find these macros, as it can't see m4_define. 93679ef0b394SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 9368d17cd367Smrg 9369698f425bSmrg 93709ef0b394Smrg# lt_join(SEP, ARG1, [ARG2...]) 93719ef0b394Smrg# ----------------------------- 93729ef0b394Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 93739ef0b394Smrg# associated separator. 93749ef0b394Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 93759ef0b394Smrg# versions in m4sugar had bugs. 93769ef0b394Smrgm4_define([lt_join], 93779ef0b394Smrg[m4_if([$#], [1], [], 93789ef0b394Smrg [$#], [2], [[$2]], 93799ef0b394Smrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 93809ef0b394Smrgm4_define([_lt_join], 93819ef0b394Smrg[m4_if([$#$2], [2], [], 93829ef0b394Smrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 93839ef0b394Smrg 93849ef0b394Smrg 93859ef0b394Smrg# lt_car(LIST) 93869ef0b394Smrg# lt_cdr(LIST) 93879ef0b394Smrg# ------------ 93889ef0b394Smrg# Manipulate m4 lists. 93899ef0b394Smrg# These macros are necessary as long as will still need to support 93909ef0b394Smrg# Autoconf-2.59 which quotes differently. 93919ef0b394Smrgm4_define([lt_car], [[$1]]) 93929ef0b394Smrgm4_define([lt_cdr], 93939ef0b394Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 93949ef0b394Smrg [$#], 1, [], 93959ef0b394Smrg [m4_dquote(m4_shift($@))])]) 93969ef0b394Smrgm4_define([lt_unquote], $1) 93979ef0b394Smrg 93989ef0b394Smrg 93999ef0b394Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 94009ef0b394Smrg# ------------------------------------------ 94019ef0b394Smrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 94029ef0b394Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 94039ef0b394Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 94049ef0b394Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 94059ef0b394Smrg# than defined and empty). 9406d17cd367Smrg# 94079ef0b394Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 94089ef0b394Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 94099ef0b394Smrgm4_define([lt_append], 94109ef0b394Smrg[m4_define([$1], 94119ef0b394Smrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 94129ef0b394Smrg 94139ef0b394Smrg 94149ef0b394Smrg 94159ef0b394Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 94169ef0b394Smrg# ---------------------------------------------------------- 94179ef0b394Smrg# Produce a SEP delimited list of all paired combinations of elements of 94189ef0b394Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 94199ef0b394Smrg# has the form PREFIXmINFIXSUFFIXn. 94209ef0b394Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 94219ef0b394Smrgm4_define([lt_combine], 94229ef0b394Smrg[m4_if(m4_eval([$# > 3]), [1], 94239ef0b394Smrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 94249ef0b394Smrg[[m4_foreach([_Lt_prefix], [$2], 94259ef0b394Smrg [m4_foreach([_Lt_suffix], 94269ef0b394Smrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 94279ef0b394Smrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 9428d17cd367Smrg 9429266e564dSmrg 94309ef0b394Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 94319ef0b394Smrg# ----------------------------------------------------------------------- 94329ef0b394Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 94339ef0b394Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 94349ef0b394Smrgm4_define([lt_if_append_uniq], 94359ef0b394Smrg[m4_ifdef([$1], 94369ef0b394Smrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 94379ef0b394Smrg [lt_append([$1], [$2], [$3])$4], 94389ef0b394Smrg [$5])], 94399ef0b394Smrg [lt_append([$1], [$2], [$3])$4])]) 9440266e564dSmrg 9441266e564dSmrg 94429ef0b394Smrg# lt_dict_add(DICT, KEY, VALUE) 94439ef0b394Smrg# ----------------------------- 94449ef0b394Smrgm4_define([lt_dict_add], 94459ef0b394Smrg[m4_define([$1($2)], [$3])]) 9446266e564dSmrg 9447d17cd367Smrg 94489ef0b394Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 94499ef0b394Smrg# -------------------------------------------- 94509ef0b394Smrgm4_define([lt_dict_add_subkey], 94519ef0b394Smrg[m4_define([$1($2:$3)], [$4])]) 9452266e564dSmrg 9453d17cd367Smrg 94549ef0b394Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 94559ef0b394Smrg# ---------------------------------- 94569ef0b394Smrgm4_define([lt_dict_fetch], 94579ef0b394Smrg[m4_ifval([$3], 94589ef0b394Smrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 94599ef0b394Smrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 9460266e564dSmrg 94619ef0b394Smrg 94629ef0b394Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 94639ef0b394Smrg# ----------------------------------------------------------------- 94649ef0b394Smrgm4_define([lt_if_dict_fetch], 94659ef0b394Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 94669ef0b394Smrg [$5], 94679ef0b394Smrg [$6])]) 94689ef0b394Smrg 94699ef0b394Smrg 94709ef0b394Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 94719ef0b394Smrg# -------------------------------------------------------------- 94729ef0b394Smrgm4_define([lt_dict_filter], 94739ef0b394Smrg[m4_if([$5], [], [], 94749ef0b394Smrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 94759ef0b394Smrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 94769ef0b394Smrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 94779ef0b394Smrg]) 94789ef0b394Smrg 94799ef0b394Smrg# ltversion.m4 -- version numbers -*- Autoconf -*- 9480d17cd367Smrg# 94819ef0b394Smrg# Copyright (C) 2004 Free Software Foundation, Inc. 94829ef0b394Smrg# Written by Scott James Remnant, 2004 9483d17cd367Smrg# 94849ef0b394Smrg# This file is free software; the Free Software Foundation gives 94859ef0b394Smrg# unlimited permission to copy and/or distribute it, with or without 94869ef0b394Smrg# modifications, as long as this notice is preserved. 9487d17cd367Smrg 94889ef0b394Smrg# @configure_input@ 94899ef0b394Smrg 94909ef0b394Smrg# serial 3293 ltversion.m4 94919ef0b394Smrg# This file is part of GNU Libtool 94929ef0b394Smrg 94939ef0b394Smrgm4_define([LT_PACKAGE_VERSION], [2.4]) 94949ef0b394Smrgm4_define([LT_PACKAGE_REVISION], [1.3293]) 94959ef0b394Smrg 94969ef0b394SmrgAC_DEFUN([LTVERSION_VERSION], 94979ef0b394Smrg[macro_version='2.4' 94989ef0b394Smrgmacro_revision='1.3293' 94999ef0b394Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 95009ef0b394Smrg_LT_DECL(, macro_revision, 0) 95019ef0b394Smrg]) 95029ef0b394Smrg 95039ef0b394Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 9504d17cd367Smrg# 95059ef0b394Smrg# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. 95069ef0b394Smrg# Written by Scott James Remnant, 2004. 9507d17cd367Smrg# 95089ef0b394Smrg# This file is free software; the Free Software Foundation gives 95099ef0b394Smrg# unlimited permission to copy and/or distribute it, with or without 95109ef0b394Smrg# modifications, as long as this notice is preserved. 9511d17cd367Smrg 95129ef0b394Smrg# serial 5 lt~obsolete.m4 95139ef0b394Smrg 95149ef0b394Smrg# These exist entirely to fool aclocal when bootstrapping libtool. 9515d17cd367Smrg# 95169ef0b394Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 95179ef0b394Smrg# which have later been changed to m4_define as they aren't part of the 95189ef0b394Smrg# exported API, or moved to Autoconf or Automake where they belong. 9519d17cd367Smrg# 95209ef0b394Smrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 95219ef0b394Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 95229ef0b394Smrg# using a macro with the same name in our local m4/libtool.m4 it'll 95239ef0b394Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 95249ef0b394Smrg# and doesn't know about Autoconf macros at all.) 9525d17cd367Smrg# 95269ef0b394Smrg# So we provide this file, which has a silly filename so it's always 95279ef0b394Smrg# included after everything else. This provides aclocal with the 95289ef0b394Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 95299ef0b394Smrg# because those macros already exist, or will be overwritten later. 95309ef0b394Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 9531d17cd367Smrg# 95329ef0b394Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 95339ef0b394Smrg# Yes, that means every name once taken will need to remain here until 95349ef0b394Smrg# we give up compatibility with versions before 1.7, at which point 95359ef0b394Smrg# we need to keep only those names which we still refer to. 9536266e564dSmrg 95379ef0b394Smrg# This is to help aclocal find these macros, as it can't see m4_define. 95389ef0b394SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 9539d17cd367Smrg 95409ef0b394Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 95419ef0b394Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 95429ef0b394Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 95439ef0b394Smrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 95449ef0b394Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 95459ef0b394Smrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 95469ef0b394Smrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 95479ef0b394Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 95489ef0b394Smrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 95499ef0b394Smrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 95509ef0b394Smrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 95519ef0b394Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 95529ef0b394Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 95539ef0b394Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 95549ef0b394Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 95559ef0b394Smrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 95569ef0b394Smrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 95579ef0b394Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 95589ef0b394Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 95599ef0b394Smrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 95609ef0b394Smrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 95619ef0b394Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 95629ef0b394Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 95639ef0b394Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 95649ef0b394Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 95659ef0b394Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 95669ef0b394Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 95679ef0b394Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 95689ef0b394Smrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 95699ef0b394Smrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 95709ef0b394Smrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 95719ef0b394Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 95729ef0b394Smrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 95739ef0b394Smrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 95749ef0b394Smrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 95759ef0b394Smrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 95769ef0b394Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 95779ef0b394Smrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 95789ef0b394Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 95799ef0b394Smrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 95809ef0b394Smrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 95819ef0b394Smrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 95829ef0b394Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 95839ef0b394Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 95849ef0b394Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 95859ef0b394Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 95869ef0b394Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 95879ef0b394Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 95889ef0b394Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 95899ef0b394Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 95909ef0b394Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 95919ef0b394Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 95929ef0b394Smrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 95939ef0b394Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 95949ef0b394Smrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 95959ef0b394Smrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 95969ef0b394Smrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 95979ef0b394Smrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 95989ef0b394Smrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 95999ef0b394Smrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 96009ef0b394Smrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 9601266e564dSmrg 96029ef0b394Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 96039ef0b394Smrgdnl 96049ef0b394Smrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 96059ef0b394Smrgdnl 96069ef0b394Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 96079ef0b394Smrgdnl copy of this software and associated documentation files (the "Software"), 96089ef0b394Smrgdnl to deal in the Software without restriction, including without limitation 96099ef0b394Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 96109ef0b394Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 96119ef0b394Smrgdnl Software is furnished to do so, subject to the following conditions: 96129ef0b394Smrgdnl 96139ef0b394Smrgdnl The above copyright notice and this permission notice (including the next 96149ef0b394Smrgdnl paragraph) shall be included in all copies or substantial portions of the 96159ef0b394Smrgdnl Software. 96169ef0b394Smrgdnl 96179ef0b394Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 96189ef0b394Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 96199ef0b394Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 96209ef0b394Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 96219ef0b394Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 96229ef0b394Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 96239ef0b394Smrgdnl DEALINGS IN THE SOFTWARE. 9624d17cd367Smrg 96259ef0b394Smrg# XORG_MACROS_VERSION(required-version) 96269ef0b394Smrg# ------------------------------------- 9627d17cd367Smrg# Minimum version: 1.1.0 9628698f425bSmrg# 96299ef0b394Smrg# If you're using a macro added in Version 1.1 or newer, include this in 96309ef0b394Smrg# your configure.ac with the minimum required version, such as: 96319ef0b394Smrg# XORG_MACROS_VERSION(1.1) 9632d17cd367Smrg# 96339ef0b394Smrg# To ensure that this macro is defined, also add: 96349ef0b394Smrg# m4_ifndef([XORG_MACROS_VERSION], 96359ef0b394Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 9636d17cd367Smrg# 9637d17cd367Smrg# 96389ef0b394Smrg# See the "minimum version" comment for each macro you use to see what 96399ef0b394Smrg# version you require. 96409ef0b394Smrgm4_defun([XORG_MACROS_VERSION],[ 96419ef0b394Smrgm4_define([vers_have], [1.16.1]) 96429ef0b394Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 96439ef0b394Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 96449ef0b394Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 96459ef0b394Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 96469ef0b394Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 96479ef0b394Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 96489ef0b394Smrgm4_undefine([vers_have]) 96499ef0b394Smrgm4_undefine([maj_have]) 96509ef0b394Smrgm4_undefine([maj_needed]) 96519ef0b394Smrg]) # XORG_MACROS_VERSION 9652d17cd367Smrg 96539ef0b394Smrg# XORG_PROG_RAWCPP() 96549ef0b394Smrg# ------------------ 96559ef0b394Smrg# Minimum version: 1.0.0 96569ef0b394Smrg# 96579ef0b394Smrg# Find cpp program and necessary flags for use in pre-processing text files 96589ef0b394Smrg# such as man pages and config files 96599ef0b394SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 96609ef0b394SmrgAC_REQUIRE([AC_PROG_CPP]) 96619ef0b394SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 96629ef0b394Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 9663266e564dSmrg 96649ef0b394Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 96659ef0b394Smrg# which is not the best choice for supporting other OS'es, but covers most 96669ef0b394Smrg# of the ones we need for now. 96679ef0b394SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 96689ef0b394SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 96699ef0b394Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 96709ef0b394Smrg AC_MSG_RESULT([no]) 9671d17cd367Smrgelse 96729ef0b394Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 96739ef0b394Smrg RAWCPPFLAGS=-undef 96749ef0b394Smrg AC_MSG_RESULT([yes]) 96759ef0b394Smrg # under Cygwin unix is still defined even with -undef 96769ef0b394Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 96779ef0b394Smrg RAWCPPFLAGS="-undef -ansi" 96789ef0b394Smrg AC_MSG_RESULT([yes, with -ansi]) 96799ef0b394Smrg else 96809ef0b394Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 96819ef0b394Smrg fi 9682d17cd367Smrgfi 96839ef0b394Smrgrm -f conftest.$ac_ext 9684266e564dSmrg 96859ef0b394SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 96869ef0b394SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 96879ef0b394Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 96889ef0b394Smrg AC_MSG_RESULT([no]) 96899ef0b394Smrgelse 96909ef0b394Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 96919ef0b394Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 96929ef0b394Smrg AC_MSG_RESULT([yes]) 96939ef0b394Smrg else 96949ef0b394Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 96959ef0b394Smrg fi 9696d17cd367Smrgfi 96979ef0b394Smrgrm -f conftest.$ac_ext 96989ef0b394SmrgAC_SUBST(RAWCPPFLAGS) 96999ef0b394Smrg]) # XORG_PROG_RAWCPP 9700266e564dSmrg 97019ef0b394Smrg# XORG_MANPAGE_SECTIONS() 97029ef0b394Smrg# ----------------------- 97039ef0b394Smrg# Minimum version: 1.0.0 9704d17cd367Smrg# 97059ef0b394Smrg# Determine which sections man pages go in for the different man page types 97069ef0b394Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 97079ef0b394Smrg# Not sure if there's any better way than just hardcoding by OS name. 97089ef0b394Smrg# Override default settings by setting environment variables 97099ef0b394Smrg# Added MAN_SUBSTS in version 1.8 97109ef0b394Smrg# Added AC_PROG_SED in version 1.8 9711266e564dSmrg 97129ef0b394SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 97139ef0b394SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 97149ef0b394SmrgAC_REQUIRE([AC_PROG_SED]) 9715266e564dSmrg 97169ef0b394Smrgif test x$APP_MAN_SUFFIX = x ; then 97179ef0b394Smrg APP_MAN_SUFFIX=1 97189ef0b394Smrgfi 97199ef0b394Smrgif test x$APP_MAN_DIR = x ; then 97209ef0b394Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 9721d17cd367Smrgfi 9722266e564dSmrg 97239ef0b394Smrgif test x$LIB_MAN_SUFFIX = x ; then 97249ef0b394Smrg LIB_MAN_SUFFIX=3 97259ef0b394Smrgfi 97269ef0b394Smrgif test x$LIB_MAN_DIR = x ; then 97279ef0b394Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 97289ef0b394Smrgfi 9729266e564dSmrg 97309ef0b394Smrgif test x$FILE_MAN_SUFFIX = x ; then 97319ef0b394Smrg case $host_os in 97329ef0b394Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 97339ef0b394Smrg *) FILE_MAN_SUFFIX=5 ;; 97349ef0b394Smrg esac 97359ef0b394Smrgfi 97369ef0b394Smrgif test x$FILE_MAN_DIR = x ; then 97379ef0b394Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 97389ef0b394Smrgfi 9739d17cd367Smrg 97409ef0b394Smrgif test x$MISC_MAN_SUFFIX = x ; then 97419ef0b394Smrg case $host_os in 97429ef0b394Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 97439ef0b394Smrg *) MISC_MAN_SUFFIX=7 ;; 9744d17cd367Smrg esac 9745698f425bSmrgfi 97469ef0b394Smrgif test x$MISC_MAN_DIR = x ; then 97479ef0b394Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 97489ef0b394Smrgfi 9749266e564dSmrg 97509ef0b394Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 97519ef0b394Smrg case $host_os in 97529ef0b394Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 97539ef0b394Smrg *) DRIVER_MAN_SUFFIX=4 ;; 97549ef0b394Smrg esac 97559ef0b394Smrgfi 97569ef0b394Smrgif test x$DRIVER_MAN_DIR = x ; then 97579ef0b394Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 97589ef0b394Smrgfi 9759d17cd367Smrg 97609ef0b394Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 97619ef0b394Smrg case $host_os in 97629ef0b394Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 97639ef0b394Smrg *) ADMIN_MAN_SUFFIX=8 ;; 97649ef0b394Smrg esac 97659ef0b394Smrgfi 97669ef0b394Smrgif test x$ADMIN_MAN_DIR = x ; then 97679ef0b394Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 9768d17cd367Smrgfi 9769266e564dSmrg 9770d17cd367Smrg 97719ef0b394SmrgAC_SUBST([APP_MAN_SUFFIX]) 97729ef0b394SmrgAC_SUBST([LIB_MAN_SUFFIX]) 97739ef0b394SmrgAC_SUBST([FILE_MAN_SUFFIX]) 97749ef0b394SmrgAC_SUBST([MISC_MAN_SUFFIX]) 97759ef0b394SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 97769ef0b394SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 97779ef0b394SmrgAC_SUBST([APP_MAN_DIR]) 97789ef0b394SmrgAC_SUBST([LIB_MAN_DIR]) 97799ef0b394SmrgAC_SUBST([FILE_MAN_DIR]) 97809ef0b394SmrgAC_SUBST([MISC_MAN_DIR]) 97819ef0b394SmrgAC_SUBST([DRIVER_MAN_DIR]) 97829ef0b394SmrgAC_SUBST([ADMIN_MAN_DIR]) 97839ef0b394Smrg 97849ef0b394SmrgXORG_MAN_PAGE="X Version 11" 97859ef0b394SmrgAC_SUBST([XORG_MAN_PAGE]) 97869ef0b394SmrgMAN_SUBSTS="\ 97879ef0b394Smrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 97889ef0b394Smrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 97899ef0b394Smrg -e 's|__xservername__|Xorg|g' \ 97909ef0b394Smrg -e 's|__xconfigfile__|xorg.conf|g' \ 97919ef0b394Smrg -e 's|__projectroot__|\$(prefix)|g' \ 97929ef0b394Smrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 97939ef0b394Smrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 97949ef0b394Smrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 97959ef0b394Smrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 97969ef0b394Smrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 97979ef0b394Smrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 97989ef0b394Smrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 97999ef0b394SmrgAC_SUBST([MAN_SUBSTS]) 98009ef0b394Smrg 98019ef0b394Smrg]) # XORG_MANPAGE_SECTIONS 98029ef0b394Smrg 98039ef0b394Smrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 98049ef0b394Smrg# ------------------------ 98059ef0b394Smrg# Minimum version: 1.7.0 9806d17cd367Smrg# 98079ef0b394Smrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 98089ef0b394Smrg# provided by xorg-sgml-doctools, if installed. 98099ef0b394SmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 98109ef0b394SmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 98119ef0b394SmrgXORG_SGML_PATH= 98129ef0b394SmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 98139ef0b394Smrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 98149ef0b394Smrg [m4_ifval([$1],[:], 98159ef0b394Smrg [if test x"$cross_compiling" != x"yes" ; then 98169ef0b394Smrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 98179ef0b394Smrg [XORG_SGML_PATH=$prefix/share/sgml]) 98189ef0b394Smrg fi]) 98199ef0b394Smrg ]) 98209ef0b394Smrg 98219ef0b394Smrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 98229ef0b394Smrg# the path and the name of the doc stylesheet 98239ef0b394Smrgif test "x$XORG_SGML_PATH" != "x" ; then 98249ef0b394Smrg AC_MSG_RESULT([$XORG_SGML_PATH]) 98259ef0b394Smrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 98269ef0b394Smrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 98279ef0b394Smrgelse 98289ef0b394Smrg AC_MSG_RESULT([no]) 98299ef0b394Smrgfi 9830266e564dSmrg 98319ef0b394SmrgAC_SUBST(XORG_SGML_PATH) 98329ef0b394SmrgAC_SUBST(STYLESHEET_SRCDIR) 98339ef0b394SmrgAC_SUBST(XSL_STYLESHEET) 98349ef0b394SmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 98359ef0b394Smrg]) # XORG_CHECK_SGML_DOCTOOLS 9836698f425bSmrg 98379ef0b394Smrg# XORG_CHECK_LINUXDOC 98389ef0b394Smrg# ------------------- 98399ef0b394Smrg# Minimum version: 1.0.0 9840c5629e66Smrg# 98419ef0b394Smrg# Defines the variable MAKE_TEXT if the necessary tools and 98429ef0b394Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 98439ef0b394Smrg# Whether or not the necessary tools and files are found can be checked 98449ef0b394Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 98459ef0b394SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 98469ef0b394SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 98479ef0b394SmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 9848266e564dSmrg 98499ef0b394SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 9850d17cd367Smrg 98519ef0b394SmrgAC_MSG_CHECKING([whether to build documentation]) 9852d17cd367Smrg 98539ef0b394Smrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 98549ef0b394Smrg BUILDDOC=yes 98559ef0b394Smrgelse 98569ef0b394Smrg BUILDDOC=no 98579ef0b394Smrgfi 9858d17cd367Smrg 98599ef0b394SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 9860d17cd367Smrg 98619ef0b394SmrgAC_MSG_RESULT([$BUILDDOC]) 9862d17cd367Smrg 98639ef0b394SmrgAC_MSG_CHECKING([whether to build pdf documentation]) 9864d17cd367Smrg 98659ef0b394Smrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 98669ef0b394Smrg BUILDPDFDOC=yes 98679ef0b394Smrgelse 98689ef0b394Smrg BUILDPDFDOC=no 98699ef0b394Smrgfi 9870d17cd367Smrg 98719ef0b394SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 9872d17cd367Smrg 98739ef0b394SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 98749ef0b394Smrg 98759ef0b394SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 98769ef0b394SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 98779ef0b394SmrgMAKE_PDF="$PS2PDF" 98789ef0b394SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 98799ef0b394Smrg 98809ef0b394SmrgAC_SUBST(MAKE_TEXT) 98819ef0b394SmrgAC_SUBST(MAKE_PS) 98829ef0b394SmrgAC_SUBST(MAKE_PDF) 98839ef0b394SmrgAC_SUBST(MAKE_HTML) 98849ef0b394Smrg]) # XORG_CHECK_LINUXDOC 98859ef0b394Smrg 98869ef0b394Smrg# XORG_CHECK_DOCBOOK 98879ef0b394Smrg# ------------------- 98889ef0b394Smrg# Minimum version: 1.0.0 98899ef0b394Smrg# 98909ef0b394Smrg# Checks for the ability to build output formats from SGML DocBook source. 98919ef0b394Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 98929ef0b394Smrg# indicates whether the necessary tools and files are found and, if set, 98939ef0b394Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 98949ef0b394SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 98959ef0b394SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 98969ef0b394Smrg 98979ef0b394SmrgBUILDTXTDOC=no 98989ef0b394SmrgBUILDPDFDOC=no 98999ef0b394SmrgBUILDPSDOC=no 99009ef0b394SmrgBUILDHTMLDOC=no 99019ef0b394Smrg 99029ef0b394SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 99039ef0b394SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 99049ef0b394SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 99059ef0b394SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 99069ef0b394Smrg 99079ef0b394SmrgAC_MSG_CHECKING([whether to build text documentation]) 99089ef0b394Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 99099ef0b394Smrg test x$BUILD_TXTDOC != xno; then 99109ef0b394Smrg BUILDTXTDOC=yes 99119ef0b394Smrgfi 99129ef0b394SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 99139ef0b394SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 99149ef0b394Smrg 99159ef0b394SmrgAC_MSG_CHECKING([whether to build PDF documentation]) 99169ef0b394Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 99179ef0b394Smrg test x$BUILD_PDFDOC != xno; then 99189ef0b394Smrg BUILDPDFDOC=yes 99199ef0b394Smrgfi 99209ef0b394SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 99219ef0b394SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 99229ef0b394Smrg 99239ef0b394SmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 99249ef0b394Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 99259ef0b394Smrg test x$BUILD_PSDOC != xno; then 99269ef0b394Smrg BUILDPSDOC=yes 99279ef0b394Smrgfi 99289ef0b394SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 99299ef0b394SmrgAC_MSG_RESULT([$BUILDPSDOC]) 99309ef0b394Smrg 99319ef0b394SmrgAC_MSG_CHECKING([whether to build HTML documentation]) 99329ef0b394Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 99339ef0b394Smrg test x$BUILD_HTMLDOC != xno; then 99349ef0b394Smrg BUILDHTMLDOC=yes 99359ef0b394Smrgfi 99369ef0b394SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 99379ef0b394SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 9938d17cd367Smrg 99399ef0b394SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 99409ef0b394SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 99419ef0b394SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 99429ef0b394SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 9943d17cd367Smrg 99449ef0b394SmrgAC_SUBST(MAKE_TEXT) 99459ef0b394SmrgAC_SUBST(MAKE_PS) 99469ef0b394SmrgAC_SUBST(MAKE_PDF) 99479ef0b394SmrgAC_SUBST(MAKE_HTML) 99489ef0b394Smrg]) # XORG_CHECK_DOCBOOK 9949d17cd367Smrg 99509ef0b394Smrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 99519ef0b394Smrg# ---------------- 99529ef0b394Smrg# Minimum version: 1.5.0 99539ef0b394Smrg# Minimum version for optional DEFAULT argument: 1.11.0 99549ef0b394Smrg# 99559ef0b394Smrg# Documentation tools are not always available on all platforms and sometimes 99569ef0b394Smrg# not at the appropriate level. This macro enables a module to test for the 99579ef0b394Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 99589ef0b394Smrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 99599ef0b394Smrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 99609ef0b394Smrg# --with-xmlto assumes 'auto'. 99619ef0b394Smrg# 99629ef0b394Smrg# Interface to module: 99639ef0b394Smrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 99649ef0b394Smrg# XMLTO: returns the path of the xmlto program found 99659ef0b394Smrg# returns the path set by the user in the environment 99669ef0b394Smrg# --with-xmlto: 'yes' user instructs the module to use xmlto 99679ef0b394Smrg# 'no' user instructs the module not to use xmlto 99689ef0b394Smrg# 99699ef0b394Smrg# Added in version 1.10.0 99709ef0b394Smrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 99719ef0b394Smrg# xmlto for text output requires either lynx, links, or w3m browsers 99729ef0b394Smrg# 99739ef0b394Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 99749ef0b394Smrg# 99759ef0b394SmrgAC_DEFUN([XORG_WITH_XMLTO],[ 99769ef0b394SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 99779ef0b394Smrgm4_define([_defopt], m4_default([$2], [auto])) 99789ef0b394SmrgAC_ARG_WITH(xmlto, 99799ef0b394Smrg AS_HELP_STRING([--with-xmlto], 99809ef0b394Smrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 99819ef0b394Smrg [use_xmlto=$withval], [use_xmlto=]_defopt) 99829ef0b394Smrgm4_undefine([_defopt]) 9983d17cd367Smrg 99849ef0b394Smrgif test "x$use_xmlto" = x"auto"; then 99859ef0b394Smrg AC_PATH_PROG([XMLTO], [xmlto]) 99869ef0b394Smrg if test "x$XMLTO" = "x"; then 99879ef0b394Smrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 99889ef0b394Smrg have_xmlto=no 99899ef0b394Smrg else 99909ef0b394Smrg have_xmlto=yes 99919ef0b394Smrg fi 99929ef0b394Smrgelif test "x$use_xmlto" = x"yes" ; then 99939ef0b394Smrg AC_PATH_PROG([XMLTO], [xmlto]) 99949ef0b394Smrg if test "x$XMLTO" = "x"; then 99959ef0b394Smrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 99969ef0b394Smrg fi 99979ef0b394Smrg have_xmlto=yes 99989ef0b394Smrgelif test "x$use_xmlto" = x"no" ; then 99999ef0b394Smrg if test "x$XMLTO" != "x"; then 100009ef0b394Smrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 100019ef0b394Smrg fi 100029ef0b394Smrg have_xmlto=no 100039ef0b394Smrgelse 100049ef0b394Smrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 100059ef0b394Smrgfi 10006d17cd367Smrg 100079ef0b394Smrg# Test for a minimum version of xmlto, if provided. 100089ef0b394Smrgm4_ifval([$1], 100099ef0b394Smrg[if test "$have_xmlto" = yes; then 100109ef0b394Smrg # scrape the xmlto version 100119ef0b394Smrg AC_MSG_CHECKING([the xmlto version]) 100129ef0b394Smrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 100139ef0b394Smrg AC_MSG_RESULT([$xmlto_version]) 100149ef0b394Smrg AS_VERSION_COMPARE([$xmlto_version], [$1], 100159ef0b394Smrg [if test "x$use_xmlto" = xauto; then 100169ef0b394Smrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 100179ef0b394Smrg have_xmlto=no 100189ef0b394Smrg else 100199ef0b394Smrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 100209ef0b394Smrg fi]) 100219ef0b394Smrgfi]) 10022d17cd367Smrg 100239ef0b394Smrg# Test for the ability of xmlto to generate a text target 100249ef0b394Smrghave_xmlto_text=no 100259ef0b394Smrgcat > conftest.xml << "EOF" 100269ef0b394SmrgEOF 100279ef0b394SmrgAS_IF([test "$have_xmlto" = yes], 100289ef0b394Smrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 100299ef0b394Smrg [have_xmlto_text=yes], 100309ef0b394Smrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 100319ef0b394Smrgrm -f conftest.xml 100329ef0b394SmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 100339ef0b394SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 100349ef0b394Smrg]) # XORG_WITH_XMLTO 10035d17cd367Smrg 100369ef0b394Smrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 100379ef0b394Smrg# -------------------------------------------- 100389ef0b394Smrg# Minimum version: 1.12.0 100399ef0b394Smrg# Minimum version for optional DEFAULT argument: 1.12.0 10040c5629e66Smrg# 100419ef0b394Smrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 100429ef0b394Smrg# XML-based language used for the transformation of XML documents. 100439ef0b394Smrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 100449ef0b394Smrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 100459ef0b394Smrg# The XSLT processor is often used as a standalone tool for transformations. 100469ef0b394Smrg# It should not be assumed that this tool is used only to work with documnetation. 100479ef0b394Smrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 100489ef0b394Smrg# 100499ef0b394Smrg# Interface to module: 100509ef0b394Smrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 100519ef0b394Smrg# XSLTPROC: returns the path of the xsltproc program found 100529ef0b394Smrg# returns the path set by the user in the environment 100539ef0b394Smrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 100549ef0b394Smrg# 'no' user instructs the module not to use xsltproc 100559ef0b394Smrg# have_xsltproc: returns yes if xsltproc found in PATH or no 100569ef0b394Smrg# 100579ef0b394Smrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 100589ef0b394Smrg# 100599ef0b394SmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 100609ef0b394SmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 100619ef0b394Smrg# Preserves the interface, should it be implemented later 100629ef0b394Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 100639ef0b394Smrgm4_define([_defopt], m4_default([$2], [auto])) 100649ef0b394SmrgAC_ARG_WITH(xsltproc, 100659ef0b394Smrg AS_HELP_STRING([--with-xsltproc], 100669ef0b394Smrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 100679ef0b394Smrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 100689ef0b394Smrgm4_undefine([_defopt]) 100699ef0b394Smrg 100709ef0b394Smrgif test "x$use_xsltproc" = x"auto"; then 100719ef0b394Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 100729ef0b394Smrg if test "x$XSLTPROC" = "x"; then 100739ef0b394Smrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 100749ef0b394Smrg have_xsltproc=no 100759ef0b394Smrg else 100769ef0b394Smrg have_xsltproc=yes 100779ef0b394Smrg fi 100789ef0b394Smrgelif test "x$use_xsltproc" = x"yes" ; then 100799ef0b394Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 100809ef0b394Smrg if test "x$XSLTPROC" = "x"; then 100819ef0b394Smrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 100829ef0b394Smrg fi 100839ef0b394Smrg have_xsltproc=yes 100849ef0b394Smrgelif test "x$use_xsltproc" = x"no" ; then 100859ef0b394Smrg if test "x$XSLTPROC" != "x"; then 100869ef0b394Smrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 100879ef0b394Smrg fi 100889ef0b394Smrg have_xsltproc=no 100899ef0b394Smrgelse 100909ef0b394Smrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 100919ef0b394Smrgfi 10092d17cd367Smrg 100939ef0b394SmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 100949ef0b394Smrg]) # XORG_WITH_XSLTPROC 100959ef0b394Smrg 100969ef0b394Smrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 100979ef0b394Smrg# ---------------------------------------- 100989ef0b394Smrg# Minimum version: 1.15.0 10099d17cd367Smrg# 101009ef0b394Smrg# PERL (Practical Extraction and Report Language) is a language optimized for 101019ef0b394Smrg# scanning arbitrary text files, extracting information from those text files, 101029ef0b394Smrg# and printing reports based on that information. 10103d17cd367Smrg# 101049ef0b394Smrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 10105d17cd367Smrg# 101069ef0b394Smrg# Interface to module: 101079ef0b394Smrg# HAVE_PERL: used in makefiles to conditionally scan text files 101089ef0b394Smrg# PERL: returns the path of the perl program found 101099ef0b394Smrg# returns the path set by the user in the environment 101109ef0b394Smrg# --with-perl: 'yes' user instructs the module to use perl 101119ef0b394Smrg# 'no' user instructs the module not to use perl 101129ef0b394Smrg# have_perl: returns yes if perl found in PATH or no 101139ef0b394Smrg# 101149ef0b394Smrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 101159ef0b394Smrg# 101169ef0b394SmrgAC_DEFUN([XORG_WITH_PERL],[ 101179ef0b394SmrgAC_ARG_VAR([PERL], [Path to perl command]) 101189ef0b394Smrg# Preserves the interface, should it be implemented later 101199ef0b394Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 101209ef0b394Smrgm4_define([_defopt], m4_default([$2], [auto])) 101219ef0b394SmrgAC_ARG_WITH(perl, 101229ef0b394Smrg AS_HELP_STRING([--with-perl], 101239ef0b394Smrg [Use perl for extracting information from files (default: ]_defopt[)]), 101249ef0b394Smrg [use_perl=$withval], [use_perl=]_defopt) 101259ef0b394Smrgm4_undefine([_defopt]) 101269ef0b394Smrg 101279ef0b394Smrgif test "x$use_perl" = x"auto"; then 101289ef0b394Smrg AC_PATH_PROG([PERL], [perl]) 101299ef0b394Smrg if test "x$PERL" = "x"; then 101309ef0b394Smrg AC_MSG_WARN([perl not found - cannot extract information and report]) 101319ef0b394Smrg have_perl=no 101329ef0b394Smrg else 101339ef0b394Smrg have_perl=yes 101349ef0b394Smrg fi 101359ef0b394Smrgelif test "x$use_perl" = x"yes" ; then 101369ef0b394Smrg AC_PATH_PROG([PERL], [perl]) 101379ef0b394Smrg if test "x$PERL" = "x"; then 101389ef0b394Smrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 101399ef0b394Smrg fi 101409ef0b394Smrg have_perl=yes 101419ef0b394Smrgelif test "x$use_perl" = x"no" ; then 101429ef0b394Smrg if test "x$PERL" != "x"; then 101439ef0b394Smrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 101449ef0b394Smrg fi 101459ef0b394Smrg have_perl=no 101469ef0b394Smrgelse 101479ef0b394Smrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 101489ef0b394Smrgfi 101499ef0b394Smrg 101509ef0b394SmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 101519ef0b394Smrg]) # XORG_WITH_PERL 101529ef0b394Smrg 101539ef0b394Smrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 101549ef0b394Smrg# ---------------- 101559ef0b394Smrg# Minimum version: 1.5.0 101569ef0b394Smrg# Minimum version for optional DEFAULT argument: 1.11.0 10157d17cd367Smrg# 101589ef0b394Smrg# Documentation tools are not always available on all platforms and sometimes 101599ef0b394Smrg# not at the appropriate level. This macro enables a module to test for the 101609ef0b394Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 101619ef0b394Smrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 101629ef0b394Smrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 101639ef0b394Smrg# --with-asciidoc assumes 'auto'. 10164d17cd367Smrg# 101659ef0b394Smrg# Interface to module: 101669ef0b394Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 101679ef0b394Smrg# ASCIIDOC: returns the path of the asciidoc program found 101689ef0b394Smrg# returns the path set by the user in the environment 101699ef0b394Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 101709ef0b394Smrg# 'no' user instructs the module not to use asciidoc 101719ef0b394Smrg# 101729ef0b394Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 101739ef0b394Smrg# 101749ef0b394SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 101759ef0b394SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 101769ef0b394Smrgm4_define([_defopt], m4_default([$2], [auto])) 101779ef0b394SmrgAC_ARG_WITH(asciidoc, 101789ef0b394Smrg AS_HELP_STRING([--with-asciidoc], 101799ef0b394Smrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 101809ef0b394Smrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 101819ef0b394Smrgm4_undefine([_defopt]) 10182d17cd367Smrg 101839ef0b394Smrgif test "x$use_asciidoc" = x"auto"; then 101849ef0b394Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 101859ef0b394Smrg if test "x$ASCIIDOC" = "x"; then 101869ef0b394Smrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 101879ef0b394Smrg have_asciidoc=no 101889ef0b394Smrg else 101899ef0b394Smrg have_asciidoc=yes 101909ef0b394Smrg fi 101919ef0b394Smrgelif test "x$use_asciidoc" = x"yes" ; then 101929ef0b394Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 101939ef0b394Smrg if test "x$ASCIIDOC" = "x"; then 101949ef0b394Smrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 101959ef0b394Smrg fi 101969ef0b394Smrg have_asciidoc=yes 101979ef0b394Smrgelif test "x$use_asciidoc" = x"no" ; then 101989ef0b394Smrg if test "x$ASCIIDOC" != "x"; then 101999ef0b394Smrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 102009ef0b394Smrg fi 102019ef0b394Smrg have_asciidoc=no 102029ef0b394Smrgelse 102039ef0b394Smrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 102049ef0b394Smrgfi 102059ef0b394Smrgm4_ifval([$1], 102069ef0b394Smrg[if test "$have_asciidoc" = yes; then 102079ef0b394Smrg # scrape the asciidoc version 102089ef0b394Smrg AC_MSG_CHECKING([the asciidoc version]) 102099ef0b394Smrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 102109ef0b394Smrg AC_MSG_RESULT([$asciidoc_version]) 102119ef0b394Smrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 102129ef0b394Smrg [if test "x$use_asciidoc" = xauto; then 102139ef0b394Smrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 102149ef0b394Smrg have_asciidoc=no 102159ef0b394Smrg else 102169ef0b394Smrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 102179ef0b394Smrg fi]) 102189ef0b394Smrgfi]) 102199ef0b394SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 102209ef0b394Smrg]) # XORG_WITH_ASCIIDOC 10221d17cd367Smrg 102229ef0b394Smrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 102239ef0b394Smrg# -------------------------------- 102249ef0b394Smrg# Minimum version: 1.5.0 102259ef0b394Smrg# Minimum version for optional DEFAULT argument: 1.11.0 102269ef0b394Smrg# 102279ef0b394Smrg# Documentation tools are not always available on all platforms and sometimes 102289ef0b394Smrg# not at the appropriate level. This macro enables a module to test for the 102299ef0b394Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 102309ef0b394Smrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 102319ef0b394Smrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 102329ef0b394Smrg# --with-doxygen assumes 'auto'. 102339ef0b394Smrg# 102349ef0b394Smrg# Interface to module: 102359ef0b394Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 102369ef0b394Smrg# DOXYGEN: returns the path of the doxygen program found 102379ef0b394Smrg# returns the path set by the user in the environment 102389ef0b394Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen 102399ef0b394Smrg# 'no' user instructs the module not to use doxygen 102409ef0b394Smrg# 102419ef0b394Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 10242d17cd367Smrg# 102439ef0b394SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 102449ef0b394SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 102459ef0b394Smrgm4_define([_defopt], m4_default([$2], [auto])) 102469ef0b394SmrgAC_ARG_WITH(doxygen, 102479ef0b394Smrg AS_HELP_STRING([--with-doxygen], 102489ef0b394Smrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 102499ef0b394Smrg [use_doxygen=$withval], [use_doxygen=]_defopt) 102509ef0b394Smrgm4_undefine([_defopt]) 10251d17cd367Smrg 102529ef0b394Smrgif test "x$use_doxygen" = x"auto"; then 102539ef0b394Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 102549ef0b394Smrg if test "x$DOXYGEN" = "x"; then 102559ef0b394Smrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 102569ef0b394Smrg have_doxygen=no 102579ef0b394Smrg else 102589ef0b394Smrg have_doxygen=yes 102599ef0b394Smrg fi 102609ef0b394Smrgelif test "x$use_doxygen" = x"yes" ; then 102619ef0b394Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 102629ef0b394Smrg if test "x$DOXYGEN" = "x"; then 102639ef0b394Smrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 102649ef0b394Smrg fi 102659ef0b394Smrg have_doxygen=yes 102669ef0b394Smrgelif test "x$use_doxygen" = x"no" ; then 102679ef0b394Smrg if test "x$DOXYGEN" != "x"; then 102689ef0b394Smrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 102699ef0b394Smrg fi 102709ef0b394Smrg have_doxygen=no 10271d17cd367Smrgelse 102729ef0b394Smrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 10273d17cd367Smrgfi 102749ef0b394Smrgm4_ifval([$1], 102759ef0b394Smrg[if test "$have_doxygen" = yes; then 102769ef0b394Smrg # scrape the doxygen version 102779ef0b394Smrg AC_MSG_CHECKING([the doxygen version]) 102789ef0b394Smrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 102799ef0b394Smrg AC_MSG_RESULT([$doxygen_version]) 102809ef0b394Smrg AS_VERSION_COMPARE([$doxygen_version], [$1], 102819ef0b394Smrg [if test "x$use_doxygen" = xauto; then 102829ef0b394Smrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 102839ef0b394Smrg have_doxygen=no 102849ef0b394Smrg else 102859ef0b394Smrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 102869ef0b394Smrg fi]) 102879ef0b394Smrgfi]) 102889ef0b394SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 102899ef0b394Smrg]) # XORG_WITH_DOXYGEN 10290d17cd367Smrg 102919ef0b394Smrg# XORG_WITH_GROFF([DEFAULT]) 102929ef0b394Smrg# ---------------- 102939ef0b394Smrg# Minimum version: 1.6.0 102949ef0b394Smrg# Minimum version for optional DEFAULT argument: 1.11.0 10295d17cd367Smrg# 102969ef0b394Smrg# Documentation tools are not always available on all platforms and sometimes 102979ef0b394Smrg# not at the appropriate level. This macro enables a module to test for the 102989ef0b394Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 102999ef0b394Smrg# the --with-groff option, it allows maximum flexibilty in making decisions 103009ef0b394Smrg# as whether or not to use the groff package. When DEFAULT is not specified, 103019ef0b394Smrg# --with-groff assumes 'auto'. 10302d17cd367Smrg# 103039ef0b394Smrg# Interface to module: 103049ef0b394Smrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 103059ef0b394Smrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 103069ef0b394Smrg# HAVE_GROFF_MS: the -ms macros package 103079ef0b394Smrg# GROFF: returns the path of the groff program found 103089ef0b394Smrg# returns the path set by the user in the environment 103099ef0b394Smrg# --with-groff: 'yes' user instructs the module to use groff 103109ef0b394Smrg# 'no' user instructs the module not to use groff 103119ef0b394Smrg# 103129ef0b394Smrg# Added in version 1.9.0: 103139ef0b394Smrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 103149ef0b394Smrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 103159ef0b394Smrg# psselect from the psutils package. 103169ef0b394Smrg# the ghostcript package. Refer to the grohtml man pages 103179ef0b394Smrg# 103189ef0b394Smrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 103199ef0b394Smrg# 103209ef0b394Smrg# OS and distros often splits groff in a basic and full package, the former 103219ef0b394Smrg# having the groff program and the later having devices, fonts and macros 103229ef0b394Smrg# Checking for the groff executable is not enough. 103239ef0b394Smrg# 103249ef0b394Smrg# If macros are missing, we cannot assume that groff is useless, so we don't 103259ef0b394Smrg# unset HAVE_GROFF or GROFF env variables. 103269ef0b394Smrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 103279ef0b394Smrg# 103289ef0b394SmrgAC_DEFUN([XORG_WITH_GROFF],[ 103299ef0b394SmrgAC_ARG_VAR([GROFF], [Path to groff command]) 103309ef0b394Smrgm4_define([_defopt], m4_default([$1], [auto])) 103319ef0b394SmrgAC_ARG_WITH(groff, 103329ef0b394Smrg AS_HELP_STRING([--with-groff], 103339ef0b394Smrg [Use groff to regenerate documentation (default: ]_defopt[)]), 103349ef0b394Smrg [use_groff=$withval], [use_groff=]_defopt) 103359ef0b394Smrgm4_undefine([_defopt]) 10336266e564dSmrg 103379ef0b394Smrgif test "x$use_groff" = x"auto"; then 103389ef0b394Smrg AC_PATH_PROG([GROFF], [groff]) 103399ef0b394Smrg if test "x$GROFF" = "x"; then 103409ef0b394Smrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 103419ef0b394Smrg have_groff=no 103429ef0b394Smrg else 103439ef0b394Smrg have_groff=yes 103449ef0b394Smrg fi 103459ef0b394Smrgelif test "x$use_groff" = x"yes" ; then 103469ef0b394Smrg AC_PATH_PROG([GROFF], [groff]) 103479ef0b394Smrg if test "x$GROFF" = "x"; then 103489ef0b394Smrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 103499ef0b394Smrg fi 103509ef0b394Smrg have_groff=yes 103519ef0b394Smrgelif test "x$use_groff" = x"no" ; then 103529ef0b394Smrg if test "x$GROFF" != "x"; then 103539ef0b394Smrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 103549ef0b394Smrg fi 103559ef0b394Smrg have_groff=no 10356d17cd367Smrgelse 103579ef0b394Smrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 10358d17cd367Smrgfi 10359c5629e66Smrg 103609ef0b394Smrg# We have groff, test for the presence of the macro packages 103619ef0b394Smrgif test "x$have_groff" = x"yes"; then 103629ef0b394Smrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 103639ef0b394Smrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 103649ef0b394Smrg groff_ms_works=yes 103659ef0b394Smrg else 103669ef0b394Smrg groff_ms_works=no 103679ef0b394Smrg fi 103689ef0b394Smrg AC_MSG_RESULT([$groff_ms_works]) 103699ef0b394Smrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 103709ef0b394Smrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 103719ef0b394Smrg groff_mm_works=yes 103729ef0b394Smrg else 103739ef0b394Smrg groff_mm_works=no 103749ef0b394Smrg fi 103759ef0b394Smrg AC_MSG_RESULT([$groff_mm_works]) 103769ef0b394Smrgfi 10377266e564dSmrg 103789ef0b394Smrg# We have groff, test for HTML dependencies, one command per package 103799ef0b394Smrgif test "x$have_groff" = x"yes"; then 103809ef0b394Smrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 103819ef0b394Smrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 103829ef0b394Smrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 103839ef0b394Smrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 103849ef0b394Smrg have_groff_html=yes 103859ef0b394Smrg else 103869ef0b394Smrg have_groff_html=no 103879ef0b394Smrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 103889ef0b394Smrg fi 103899ef0b394Smrgfi 10390698f425bSmrg 103919ef0b394Smrg# Set Automake conditionals for Makefiles 103929ef0b394SmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 103939ef0b394SmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 103949ef0b394SmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 103959ef0b394SmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 103969ef0b394Smrg]) # XORG_WITH_GROFF 10397d17cd367Smrg 103989ef0b394Smrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 103999ef0b394Smrg# --------------------------------------- 104009ef0b394Smrg# Minimum version: 1.6.0 104019ef0b394Smrg# Minimum version for optional DEFAULT argument: 1.11.0 104029ef0b394Smrg# Minimum version for optional MIN-VERSION argument: 1.15.0 104039ef0b394Smrg# 104049ef0b394Smrg# Documentation tools are not always available on all platforms and sometimes 104059ef0b394Smrg# not at the appropriate level. This macro enables a module to test for the 104069ef0b394Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 104079ef0b394Smrg# the --with-fop option, it allows maximum flexibilty in making decisions 104089ef0b394Smrg# as whether or not to use the fop package. When DEFAULT is not specified, 104099ef0b394Smrg# --with-fop assumes 'auto'. 104109ef0b394Smrg# 104119ef0b394Smrg# Interface to module: 104129ef0b394Smrg# HAVE_FOP: used in makefiles to conditionally generate documentation 104139ef0b394Smrg# FOP: returns the path of the fop program found 104149ef0b394Smrg# returns the path set by the user in the environment 104159ef0b394Smrg# --with-fop: 'yes' user instructs the module to use fop 104169ef0b394Smrg# 'no' user instructs the module not to use fop 104179ef0b394Smrg# 104189ef0b394Smrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 104199ef0b394Smrg# 104209ef0b394SmrgAC_DEFUN([XORG_WITH_FOP],[ 104219ef0b394SmrgAC_ARG_VAR([FOP], [Path to fop command]) 104229ef0b394Smrgm4_define([_defopt], m4_default([$2], [auto])) 104239ef0b394SmrgAC_ARG_WITH(fop, 104249ef0b394Smrg AS_HELP_STRING([--with-fop], 104259ef0b394Smrg [Use fop to regenerate documentation (default: ]_defopt[)]), 104269ef0b394Smrg [use_fop=$withval], [use_fop=]_defopt) 104279ef0b394Smrgm4_undefine([_defopt]) 104289ef0b394Smrg 104299ef0b394Smrgif test "x$use_fop" = x"auto"; then 104309ef0b394Smrg AC_PATH_PROG([FOP], [fop]) 104319ef0b394Smrg if test "x$FOP" = "x"; then 104329ef0b394Smrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 104339ef0b394Smrg have_fop=no 104349ef0b394Smrg else 104359ef0b394Smrg have_fop=yes 104369ef0b394Smrg fi 104379ef0b394Smrgelif test "x$use_fop" = x"yes" ; then 104389ef0b394Smrg AC_PATH_PROG([FOP], [fop]) 104399ef0b394Smrg if test "x$FOP" = "x"; then 104409ef0b394Smrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 104419ef0b394Smrg fi 104429ef0b394Smrg have_fop=yes 104439ef0b394Smrgelif test "x$use_fop" = x"no" ; then 104449ef0b394Smrg if test "x$FOP" != "x"; then 104459ef0b394Smrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 104469ef0b394Smrg fi 104479ef0b394Smrg have_fop=no 104489ef0b394Smrgelse 104499ef0b394Smrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 10450d17cd367Smrgfi 10451d17cd367Smrg 104529ef0b394Smrg# Test for a minimum version of fop, if provided. 104539ef0b394Smrgm4_ifval([$1], 104549ef0b394Smrg[if test "$have_fop" = yes; then 104559ef0b394Smrg # scrape the fop version 104569ef0b394Smrg AC_MSG_CHECKING([for fop minimum version]) 104579ef0b394Smrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 104589ef0b394Smrg AC_MSG_RESULT([$fop_version]) 104599ef0b394Smrg AS_VERSION_COMPARE([$fop_version], [$1], 104609ef0b394Smrg [if test "x$use_fop" = xauto; then 104619ef0b394Smrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 104629ef0b394Smrg have_fop=no 104639ef0b394Smrg else 104649ef0b394Smrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 104659ef0b394Smrg fi]) 104669ef0b394Smrgfi]) 104679ef0b394SmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 104689ef0b394Smrg]) # XORG_WITH_FOP 10469d17cd367Smrg 104709ef0b394Smrg# XORG_WITH_PS2PDF([DEFAULT]) 104719ef0b394Smrg# ---------------- 104729ef0b394Smrg# Minimum version: 1.6.0 104739ef0b394Smrg# Minimum version for optional DEFAULT argument: 1.11.0 10474698f425bSmrg# 104759ef0b394Smrg# Documentation tools are not always available on all platforms and sometimes 104769ef0b394Smrg# not at the appropriate level. This macro enables a module to test for the 104779ef0b394Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 104789ef0b394Smrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 104799ef0b394Smrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 104809ef0b394Smrg# --with-ps2pdf assumes 'auto'. 104819ef0b394Smrg# 104829ef0b394Smrg# Interface to module: 104839ef0b394Smrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 104849ef0b394Smrg# PS2PDF: returns the path of the ps2pdf program found 104859ef0b394Smrg# returns the path set by the user in the environment 104869ef0b394Smrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 104879ef0b394Smrg# 'no' user instructs the module not to use ps2pdf 104889ef0b394Smrg# 104899ef0b394Smrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 104909ef0b394Smrg# 104919ef0b394SmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 104929ef0b394SmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 104939ef0b394Smrgm4_define([_defopt], m4_default([$1], [auto])) 104949ef0b394SmrgAC_ARG_WITH(ps2pdf, 104959ef0b394Smrg AS_HELP_STRING([--with-ps2pdf], 104969ef0b394Smrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 104979ef0b394Smrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 104989ef0b394Smrgm4_undefine([_defopt]) 10499d17cd367Smrg 105009ef0b394Smrgif test "x$use_ps2pdf" = x"auto"; then 105019ef0b394Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 105029ef0b394Smrg if test "x$PS2PDF" = "x"; then 105039ef0b394Smrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 105049ef0b394Smrg have_ps2pdf=no 105059ef0b394Smrg else 105069ef0b394Smrg have_ps2pdf=yes 105079ef0b394Smrg fi 105089ef0b394Smrgelif test "x$use_ps2pdf" = x"yes" ; then 105099ef0b394Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 105109ef0b394Smrg if test "x$PS2PDF" = "x"; then 105119ef0b394Smrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 105129ef0b394Smrg fi 105139ef0b394Smrg have_ps2pdf=yes 105149ef0b394Smrgelif test "x$use_ps2pdf" = x"no" ; then 105159ef0b394Smrg if test "x$PS2PDF" != "x"; then 105169ef0b394Smrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 105179ef0b394Smrg fi 105189ef0b394Smrg have_ps2pdf=no 105199ef0b394Smrgelse 105209ef0b394Smrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 105219ef0b394Smrgfi 105229ef0b394SmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 105239ef0b394Smrg]) # XORG_WITH_PS2PDF 10524d17cd367Smrg 105259ef0b394Smrg# XORG_ENABLE_DOCS (enable_docs=yes) 105269ef0b394Smrg# ---------------- 105279ef0b394Smrg# Minimum version: 1.6.0 105289ef0b394Smrg# 105299ef0b394Smrg# Documentation tools are not always available on all platforms and sometimes 105309ef0b394Smrg# not at the appropriate level. This macro enables a builder to skip all 105319ef0b394Smrg# documentation targets except traditional man pages. 105329ef0b394Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 105339ef0b394Smrg# maximum flexibilty in controlling documentation building. 105349ef0b394Smrg# Refer to: 105359ef0b394Smrg# XORG_WITH_XMLTO --with-xmlto 105369ef0b394Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 105379ef0b394Smrg# XORG_WITH_DOXYGEN --with-doxygen 105389ef0b394Smrg# XORG_WITH_FOP --with-fop 105399ef0b394Smrg# XORG_WITH_GROFF --with-groff 105409ef0b394Smrg# XORG_WITH_PS2PDF --with-ps2pdf 105419ef0b394Smrg# 105429ef0b394Smrg# Interface to module: 105439ef0b394Smrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 105449ef0b394Smrg# --enable-docs: 'yes' user instructs the module to generate docs 105459ef0b394Smrg# 'no' user instructs the module not to generate docs 105469ef0b394Smrg# parm1: specify the default value, yes or no. 105479ef0b394Smrg# 105489ef0b394SmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 105499ef0b394Smrgm4_define([docs_default], m4_default([$1], [yes])) 105509ef0b394SmrgAC_ARG_ENABLE(docs, 105519ef0b394Smrg AS_HELP_STRING([--enable-docs], 105529ef0b394Smrg [Enable building the documentation (default: ]docs_default[)]), 105539ef0b394Smrg [build_docs=$enableval], [build_docs=]docs_default) 105549ef0b394Smrgm4_undefine([docs_default]) 105559ef0b394SmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 105569ef0b394SmrgAC_MSG_CHECKING([whether to build documentation]) 105579ef0b394SmrgAC_MSG_RESULT([$build_docs]) 105589ef0b394Smrg]) # XORG_ENABLE_DOCS 10559d17cd367Smrg 105609ef0b394Smrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 105619ef0b394Smrg# ---------------- 105629ef0b394Smrg# Minimum version: 1.6.0 10563698f425bSmrg# 105649ef0b394Smrg# This macro enables a builder to skip all developer documentation. 105659ef0b394Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 105669ef0b394Smrg# maximum flexibilty in controlling documentation building. 105679ef0b394Smrg# Refer to: 105689ef0b394Smrg# XORG_WITH_XMLTO --with-xmlto 105699ef0b394Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 105709ef0b394Smrg# XORG_WITH_DOXYGEN --with-doxygen 105719ef0b394Smrg# XORG_WITH_FOP --with-fop 105729ef0b394Smrg# XORG_WITH_GROFF --with-groff 105739ef0b394Smrg# XORG_WITH_PS2PDF --with-ps2pdf 10574698f425bSmrg# 105759ef0b394Smrg# Interface to module: 105769ef0b394Smrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 105779ef0b394Smrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 105789ef0b394Smrg# 'no' user instructs the module not to generate developer docs 105799ef0b394Smrg# parm1: specify the default value, yes or no. 10580698f425bSmrg# 105819ef0b394SmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 105829ef0b394Smrgm4_define([devel_default], m4_default([$1], [yes])) 105839ef0b394SmrgAC_ARG_ENABLE(devel-docs, 105849ef0b394Smrg AS_HELP_STRING([--enable-devel-docs], 105859ef0b394Smrg [Enable building the developer documentation (default: ]devel_default[)]), 105869ef0b394Smrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 105879ef0b394Smrgm4_undefine([devel_default]) 105889ef0b394SmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 105899ef0b394SmrgAC_MSG_CHECKING([whether to build developer documentation]) 105909ef0b394SmrgAC_MSG_RESULT([$build_devel_docs]) 105919ef0b394Smrg]) # XORG_ENABLE_DEVEL_DOCS 10592698f425bSmrg 105939ef0b394Smrg# XORG_ENABLE_SPECS (enable_specs=yes) 105949ef0b394Smrg# ---------------- 105959ef0b394Smrg# Minimum version: 1.6.0 105969ef0b394Smrg# 105979ef0b394Smrg# This macro enables a builder to skip all functional specification targets. 105989ef0b394Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 105999ef0b394Smrg# maximum flexibilty in controlling documentation building. 106009ef0b394Smrg# Refer to: 106019ef0b394Smrg# XORG_WITH_XMLTO --with-xmlto 106029ef0b394Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 106039ef0b394Smrg# XORG_WITH_DOXYGEN --with-doxygen 106049ef0b394Smrg# XORG_WITH_FOP --with-fop 106059ef0b394Smrg# XORG_WITH_GROFF --with-groff 106069ef0b394Smrg# XORG_WITH_PS2PDF --with-ps2pdf 106079ef0b394Smrg# 106089ef0b394Smrg# Interface to module: 106099ef0b394Smrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 106109ef0b394Smrg# --enable-specs: 'yes' user instructs the module to generate specs 106119ef0b394Smrg# 'no' user instructs the module not to generate specs 106129ef0b394Smrg# parm1: specify the default value, yes or no. 106139ef0b394Smrg# 106149ef0b394SmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 106159ef0b394Smrgm4_define([spec_default], m4_default([$1], [yes])) 106169ef0b394SmrgAC_ARG_ENABLE(specs, 106179ef0b394Smrg AS_HELP_STRING([--enable-specs], 106189ef0b394Smrg [Enable building the specs (default: ]spec_default[)]), 106199ef0b394Smrg [build_specs=$enableval], [build_specs=]spec_default) 106209ef0b394Smrgm4_undefine([spec_default]) 106219ef0b394SmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 106229ef0b394SmrgAC_MSG_CHECKING([whether to build functional specifications]) 106239ef0b394SmrgAC_MSG_RESULT([$build_specs]) 106249ef0b394Smrg]) # XORG_ENABLE_SPECS 10625698f425bSmrg 106269ef0b394Smrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 106279ef0b394Smrg# ---------------------------------------------- 106289ef0b394Smrg# Minimum version: 1.13.0 106299ef0b394Smrg# 106309ef0b394Smrg# This macro enables a builder to enable/disable unit testing 106319ef0b394Smrg# It makes no assumption about the test cases implementation 106329ef0b394Smrg# Test cases may or may not use Automake "Support for test suites" 106339ef0b394Smrg# They may or may not use the software utility library GLib 106349ef0b394Smrg# 106359ef0b394Smrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 106369ef0b394Smrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 106379ef0b394Smrg# The variable enable_unit_tests is used by other macros in this file. 106389ef0b394Smrg# 106399ef0b394Smrg# Interface to module: 106409ef0b394Smrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 106419ef0b394Smrg# enable_unit_tests: used in configure.ac for additional configuration 106429ef0b394Smrg# --enable-unit-tests: 'yes' user instructs the module to build tests 106439ef0b394Smrg# 'no' user instructs the module not to build tests 106449ef0b394Smrg# parm1: specify the default value, yes or no. 106459ef0b394Smrg# 106469ef0b394SmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 106479ef0b394SmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 106489ef0b394SmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 106499ef0b394SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 106509ef0b394Smrgm4_define([_defopt], m4_default([$1], [auto])) 106519ef0b394SmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 106529ef0b394Smrg [Enable building unit test cases (default: ]_defopt[)]), 106539ef0b394Smrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 106549ef0b394Smrgm4_undefine([_defopt]) 106559ef0b394SmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 106569ef0b394SmrgAC_MSG_CHECKING([whether to build unit test cases]) 106579ef0b394SmrgAC_MSG_RESULT([$enable_unit_tests]) 106589ef0b394Smrg]) # XORG_ENABLE_UNIT_TESTS 106599ef0b394Smrg 106609ef0b394Smrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 106619ef0b394Smrg# ---------------------------------------- 106629ef0b394Smrg# Minimum version: 1.13.0 106639ef0b394Smrg# 106649ef0b394Smrg# GLib is a library which provides advanced data structures and functions. 106659ef0b394Smrg# This macro enables a module to test for the presence of Glib. 106669ef0b394Smrg# 106679ef0b394Smrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 106689ef0b394Smrg# Otherwise the value of $enable_unit_tests is blank. 106699ef0b394Smrg# 106709ef0b394Smrg# Interface to module: 106719ef0b394Smrg# HAVE_GLIB: used in makefiles to conditionally build targets 106729ef0b394Smrg# with_glib: used in configure.ac to know if GLib has been found 106739ef0b394Smrg# --with-glib: 'yes' user instructs the module to use glib 106749ef0b394Smrg# 'no' user instructs the module not to use glib 106759ef0b394Smrg# 106769ef0b394SmrgAC_DEFUN([XORG_WITH_GLIB],[ 106779ef0b394SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 106789ef0b394Smrgm4_define([_defopt], m4_default([$2], [auto])) 106799ef0b394SmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 106809ef0b394Smrg [Use GLib library for unit testing (default: ]_defopt[)]), 106819ef0b394Smrg [with_glib=$withval], [with_glib=]_defopt) 106829ef0b394Smrgm4_undefine([_defopt]) 106839ef0b394Smrg 106849ef0b394Smrghave_glib=no 106859ef0b394Smrg# Do not probe GLib if user explicitly disabled unit testing 106869ef0b394Smrgif test "x$enable_unit_tests" != x"no"; then 106879ef0b394Smrg # Do not probe GLib if user explicitly disabled it 106889ef0b394Smrg if test "x$with_glib" != x"no"; then 106899ef0b394Smrg m4_ifval( 106909ef0b394Smrg [$1], 106919ef0b394Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 106929ef0b394Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 106939ef0b394Smrg ) 10694d17cd367Smrg fi 10695698f425bSmrgfi 10696698f425bSmrg 106979ef0b394Smrg# Not having GLib when unit testing has been explicitly requested is an error 106989ef0b394Smrgif test "x$enable_unit_tests" = x"yes"; then 106999ef0b394Smrg if test "x$have_glib" = x"no"; then 107009ef0b394Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 10701d17cd367Smrg fi 10702698f425bSmrgfi 10703d17cd367Smrg 107049ef0b394Smrg# Having unit testing disabled when GLib has been explicitly requested is an error 107059ef0b394Smrgif test "x$enable_unit_tests" = x"no"; then 107069ef0b394Smrg if test "x$with_glib" = x"yes"; then 107079ef0b394Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 107089ef0b394Smrg fi 107099ef0b394Smrgfi 10710d17cd367Smrg 107119ef0b394Smrg# Not having GLib when it has been explicitly requested is an error 107129ef0b394Smrgif test "x$with_glib" = x"yes"; then 107139ef0b394Smrg if test "x$have_glib" = x"no"; then 107149ef0b394Smrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 107159ef0b394Smrg fi 107169ef0b394Smrgfi 10717d17cd367Smrg 107189ef0b394SmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 107199ef0b394Smrg]) # XORG_WITH_GLIB 10720d17cd367Smrg 107219ef0b394Smrg# XORG_LD_WRAP([required|optional]) 107229ef0b394Smrg# --------------------------------- 107239ef0b394Smrg# Minimum version: 1.13.0 107249ef0b394Smrg# 107259ef0b394Smrg# Check if linker supports -wrap, passed via compiler flags 107269ef0b394Smrg# 107279ef0b394Smrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 107289ef0b394Smrg# Otherwise the value of $enable_unit_tests is blank. 107299ef0b394Smrg# 107309ef0b394Smrg# Argument added in 1.16.0 - default is "required", to match existing behavior 107319ef0b394Smrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 107329ef0b394Smrg# available, an argument of "optional" allows use when some unit tests require 107339ef0b394Smrg# ld -wrap and others do not. 107349ef0b394Smrg# 107359ef0b394SmrgAC_DEFUN([XORG_LD_WRAP],[ 107369ef0b394SmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 107379ef0b394Smrg [AC_LANG_PROGRAM([#include <stdlib.h> 107389ef0b394Smrg void __wrap_exit(int status) { return; }], 107399ef0b394Smrg [exit(0);])]) 107409ef0b394Smrg# Not having ld wrap when unit testing has been explicitly requested is an error 107419ef0b394Smrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 107429ef0b394Smrg if test "x$have_ld_wrap" = x"no"; then 107439ef0b394Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 107449ef0b394Smrg fi 107459ef0b394Smrgfi 107469ef0b394SmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 10747d17cd367Smrg# 107489ef0b394Smrg]) # XORG_LD_WRAP 10749d17cd367Smrg 107509ef0b394Smrg# XORG_CHECK_LINKER_FLAGS 107519ef0b394Smrg# ----------------------- 107529ef0b394Smrg# SYNOPSIS 107539ef0b394Smrg# 107549ef0b394Smrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 107559ef0b394Smrg# 107569ef0b394Smrg# DESCRIPTION 107579ef0b394Smrg# 107589ef0b394Smrg# Check whether the given linker FLAGS work with the current language's 107599ef0b394Smrg# linker, or whether they give an error. 107609ef0b394Smrg# 107619ef0b394Smrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 107629ef0b394Smrg# success/failure. 107639ef0b394Smrg# 107649ef0b394Smrg# PROGRAM-SOURCE is the program source to link with, if needed 107659ef0b394Smrg# 107669ef0b394Smrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 107679ef0b394Smrg# 107689ef0b394Smrg# LICENSE 107699ef0b394Smrg# 107709ef0b394Smrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 107719ef0b394Smrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 107729ef0b394Smrg# Copyright (c) 2009 Matteo Frigo 107739ef0b394Smrg# 107749ef0b394Smrg# This program is free software: you can redistribute it and/or modify it 107759ef0b394Smrg# under the terms of the GNU General Public License as published by the 107769ef0b394Smrg# Free Software Foundation, either version 3 of the License, or (at your 107779ef0b394Smrg# option) any later version. 107789ef0b394Smrg# 107799ef0b394Smrg# This program is distributed in the hope that it will be useful, but 107809ef0b394Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 107819ef0b394Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 107829ef0b394Smrg# Public License for more details. 107839ef0b394Smrg# 107849ef0b394Smrg# You should have received a copy of the GNU General Public License along 107859ef0b394Smrg# with this program. If not, see <http://www.gnu.org/licenses/>. 107869ef0b394Smrg# 107879ef0b394Smrg# As a special exception, the respective Autoconf Macro's copyright owner 107889ef0b394Smrg# gives unlimited permission to copy, distribute and modify the configure 107899ef0b394Smrg# scripts that are the output of Autoconf when processing the Macro. You 107909ef0b394Smrg# need not follow the terms of the GNU General Public License when using 107919ef0b394Smrg# or distributing such scripts, even though portions of the text of the 107929ef0b394Smrg# Macro appear in them. The GNU General Public License (GPL) does govern 107939ef0b394Smrg# all other use of the material that constitutes the Autoconf Macro. 107949ef0b394Smrg# 107959ef0b394Smrg# This special exception to the GPL applies to versions of the Autoconf 107969ef0b394Smrg# Macro released by the Autoconf Archive. When you make and distribute a 107979ef0b394Smrg# modified version of the Autoconf Macro, you may extend this special 107989ef0b394Smrg# exception to the GPL to apply to your modified version as well.# 107999ef0b394SmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 108009ef0b394Smrg[AC_MSG_CHECKING([whether the linker accepts $1]) 108019ef0b394Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 108029ef0b394SmrgAS_LITERAL_IF([$1], 108039ef0b394Smrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 108049ef0b394Smrg ax_save_FLAGS=$LDFLAGS 108059ef0b394Smrg LDFLAGS="$1" 108069ef0b394Smrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 108079ef0b394Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 108089ef0b394Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 108099ef0b394Smrg LDFLAGS=$ax_save_FLAGS])], 108109ef0b394Smrg [ax_save_FLAGS=$LDFLAGS 108119ef0b394Smrg LDFLAGS="$1" 108129ef0b394Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 108139ef0b394Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 108149ef0b394Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 108159ef0b394Smrg LDFLAGS=$ax_save_FLAGS]) 108169ef0b394Smrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 108179ef0b394SmrgAC_MSG_RESULT($xorg_check_linker_flags) 108189ef0b394Smrgif test "x$xorg_check_linker_flags" = xyes; then 108199ef0b394Smrg m4_default([$2], :) 108209ef0b394Smrgelse 108219ef0b394Smrg m4_default([$3], :) 10822698f425bSmrgfi 108239ef0b394Smrg]) # XORG_CHECK_LINKER_FLAGS 10824698f425bSmrg 108259ef0b394Smrg# XORG_MEMORY_CHECK_FLAGS 108269ef0b394Smrg# ----------------------- 108279ef0b394Smrg# Minimum version: 1.16.0 10828698f425bSmrg# 108299ef0b394Smrg# This macro attempts to find appropriate memory checking functionality 108309ef0b394Smrg# for various platforms which unit testing code may use to catch various 108319ef0b394Smrg# forms of memory allocation and access errors in testing. 108329ef0b394Smrg# 108339ef0b394Smrg# Interface to module: 108349ef0b394Smrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 108359ef0b394Smrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 108369ef0b394Smrg# 108379ef0b394Smrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 108389ef0b394Smrg# 108399ef0b394SmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 10840d17cd367Smrg 108419ef0b394SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 108429ef0b394SmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 108439ef0b394Smrg [Environment variables to enable memory checking in tests]) 108449ef0b394Smrg 108459ef0b394Smrg# Check for different types of support on different platforms 108469ef0b394Smrgcase $host_os in 108479ef0b394Smrg solaris*) 108489ef0b394Smrg AC_CHECK_LIB([umem], [umem_alloc], 108499ef0b394Smrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 108509ef0b394Smrg ;; 108519ef0b394Smrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 108529ef0b394Smrg # both directly and inverted, so should not be 0 or 255. 108539ef0b394Smrg malloc_debug_env='MALLOC_PERTURB_=15' 108549ef0b394Smrg ;; 108559ef0b394Smrg darwin*) 108569ef0b394Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 108579ef0b394Smrg ;; 108589ef0b394Smrg *bsd*) 108599ef0b394Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 108609ef0b394Smrg ;; 108619ef0b394Smrgesac 10862698f425bSmrg 108639ef0b394Smrg# User supplied flags override default flags 108649ef0b394Smrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 108659ef0b394Smrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 10866698f425bSmrgfi 10867698f425bSmrg 108689ef0b394SmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 108699ef0b394Smrg]) # XORG_WITH_LINT 10870698f425bSmrg 108719ef0b394Smrg# XORG_CHECK_MALLOC_ZERO 108729ef0b394Smrg# ---------------------- 108739ef0b394Smrg# Minimum version: 1.0.0 10874d17cd367Smrg# 108759ef0b394Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 108769ef0b394Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 108779ef0b394Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 108789ef0b394SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 108799ef0b394SmrgAC_ARG_ENABLE(malloc0returnsnull, 108809ef0b394Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 108819ef0b394Smrg [malloc(0) returns NULL (default: auto)]), 108829ef0b394Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 108839ef0b394Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 10884698f425bSmrg 108859ef0b394SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 108869ef0b394Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 108879ef0b394Smrg AC_RUN_IFELSE([AC_LANG_PROGRAM([ 108889ef0b394Smrg#include <stdlib.h> 108899ef0b394Smrg],[ 108909ef0b394Smrg char *m0, *r0, *c0, *p; 108919ef0b394Smrg m0 = malloc(0); 108929ef0b394Smrg p = malloc(10); 108939ef0b394Smrg r0 = realloc(p,0); 108949ef0b394Smrg c0 = calloc(0,10); 108959ef0b394Smrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 108969ef0b394Smrg])], 108979ef0b394Smrg [MALLOC_ZERO_RETURNS_NULL=yes], 108989ef0b394Smrg [MALLOC_ZERO_RETURNS_NULL=no], 108999ef0b394Smrg [MALLOC_ZERO_RETURNS_NULL=yes]) 109009ef0b394Smrgfi 109019ef0b394SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 10902698f425bSmrg 109039ef0b394Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 109049ef0b394Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 109059ef0b394Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 109069ef0b394Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 109079ef0b394Smrgelse 109089ef0b394Smrg MALLOC_ZERO_CFLAGS="" 109099ef0b394Smrg XMALLOC_ZERO_CFLAGS="" 109109ef0b394Smrg XTMALLOC_ZERO_CFLAGS="" 109119ef0b394Smrgfi 10912698f425bSmrg 109139ef0b394SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 109149ef0b394SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 109159ef0b394SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 109169ef0b394Smrg]) # XORG_CHECK_MALLOC_ZERO 10917698f425bSmrg 109189ef0b394Smrg# XORG_WITH_LINT() 109199ef0b394Smrg# ---------------- 109209ef0b394Smrg# Minimum version: 1.1.0 10921d17cd367Smrg# 109229ef0b394Smrg# This macro enables the use of a tool that flags some suspicious and 109239ef0b394Smrg# non-portable constructs (likely to be bugs) in C language source code. 109249ef0b394Smrg# It will attempt to locate the tool and use appropriate options. 109259ef0b394Smrg# There are various lint type tools on different platforms. 109269ef0b394Smrg# 109279ef0b394Smrg# Interface to module: 109289ef0b394Smrg# LINT: returns the path to the tool found on the platform 109299ef0b394Smrg# or the value set to LINT on the configure cmd line 109309ef0b394Smrg# also an Automake conditional 109319ef0b394Smrg# LINT_FLAGS: an Automake variable with appropriate flags 109329ef0b394Smrg# 109339ef0b394Smrg# --with-lint: 'yes' user instructs the module to use lint 109349ef0b394Smrg# 'no' user instructs the module not to use lint (default) 109359ef0b394Smrg# 109369ef0b394Smrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 109379ef0b394Smrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 109389ef0b394Smrg# 109399ef0b394SmrgAC_DEFUN([XORG_WITH_LINT],[ 10940d17cd367Smrg 109419ef0b394SmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 109429ef0b394SmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 109439ef0b394SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 109449ef0b394Smrg [Use a lint-style source code checker (default: disabled)])], 109459ef0b394Smrg [use_lint=$withval], [use_lint=no]) 10946d17cd367Smrg 109479ef0b394Smrg# Obtain platform specific info like program name and options 109489ef0b394Smrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 109499ef0b394Smrgcase $host_os in 109509ef0b394Smrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 109519ef0b394Smrg lint_name=splint 109529ef0b394Smrg lint_options="-badflag" 109539ef0b394Smrg ;; 109549ef0b394Smrg *freebsd* | *netbsd*) 109559ef0b394Smrg lint_name=lint 109569ef0b394Smrg lint_options="-u -b" 109579ef0b394Smrg ;; 109589ef0b394Smrg *solaris*) 109599ef0b394Smrg lint_name=lint 109609ef0b394Smrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 109619ef0b394Smrg ;; 10962d17cd367Smrgesac 109639ef0b394Smrg 109649ef0b394Smrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 109659ef0b394Smrgif test "x$use_lint" = x"yes" ; then 109669ef0b394Smrg AC_PATH_PROG([LINT], [$lint_name]) 109679ef0b394Smrg if test "x$LINT" = "x"; then 109689ef0b394Smrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 109699ef0b394Smrg fi 109709ef0b394Smrgelif test "x$use_lint" = x"no" ; then 109719ef0b394Smrg if test "x$LINT" != "x"; then 109729ef0b394Smrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 109739ef0b394Smrg fi 109749ef0b394Smrgelse 109759ef0b394Smrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 10976698f425bSmrgfi 10977698f425bSmrg 109789ef0b394Smrg# User supplied flags override default flags 109799ef0b394Smrgif test "x$LINT_FLAGS" != "x"; then 109809ef0b394Smrg lint_options=$LINT_FLAGS 109819ef0b394Smrgfi 10982698f425bSmrg 109839ef0b394SmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 109849ef0b394SmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 10985698f425bSmrg 109869ef0b394Smrg]) # XORG_WITH_LINT 10987698f425bSmrg 109889ef0b394Smrg# XORG_LINT_LIBRARY(LIBNAME) 109899ef0b394Smrg# -------------------------- 109909ef0b394Smrg# Minimum version: 1.1.0 109919ef0b394Smrg# 109929ef0b394Smrg# Sets up flags for building lint libraries for checking programs that call 109939ef0b394Smrg# functions in the library. 109949ef0b394Smrg# 109959ef0b394Smrg# Interface to module: 109969ef0b394Smrg# LINTLIB - Automake variable with the name of lint library file to make 109979ef0b394Smrg# MAKE_LINT_LIB - Automake conditional 109989ef0b394Smrg# 109999ef0b394Smrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 110009ef0b394Smrg# - 'no' user instructs the module not to create a lint library (default) 11001698f425bSmrg 110029ef0b394SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 110039ef0b394SmrgAC_REQUIRE([XORG_WITH_LINT]) 110049ef0b394SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 110059ef0b394Smrg [Create lint library (default: disabled)])], 110069ef0b394Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 11007d17cd367Smrg 110089ef0b394Smrgif test "x$make_lint_lib" = x"yes" ; then 110099ef0b394Smrg LINTLIB=llib-l$1.ln 110109ef0b394Smrg if test "x$LINT" = "x"; then 110119ef0b394Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 110129ef0b394Smrg fi 110139ef0b394Smrgelif test "x$make_lint_lib" != x"no" ; then 110149ef0b394Smrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 11015d17cd367Smrgfi 11016698f425bSmrg 110179ef0b394SmrgAC_SUBST(LINTLIB) 110189ef0b394SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 110199ef0b394Smrg 110209ef0b394Smrg]) # XORG_LINT_LIBRARY 110219ef0b394Smrg 110229ef0b394Smrg# XORG_COMPILER_BRAND 110239ef0b394Smrg# ------------------- 110249ef0b394Smrg# Minimum version: 1.14.0 11025d17cd367Smrg# 110269ef0b394Smrg# Checks for various brands of compilers and sets flags as appropriate: 110279ef0b394Smrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 110289ef0b394Smrg# clang compiler - sets CLANGCC to "yes" 110299ef0b394Smrg# Intel compiler - sets INTELCC to "yes" 110309ef0b394Smrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 110319ef0b394Smrg# 110329ef0b394SmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 110339ef0b394SmrgAC_REQUIRE([AC_PROG_CC_C99]) 110349ef0b394SmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 110359ef0b394SmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 110369ef0b394SmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 110379ef0b394Smrg]) # XORG_COMPILER_BRAND 11038698f425bSmrg 110399ef0b394Smrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 11040d17cd367Smrg# --------------- 110419ef0b394Smrg# Minimum version: 1.16.0 11042d17cd367Smrg# 110439ef0b394Smrg# Test if the compiler works when passed the given flag as a command line argument. 110449ef0b394Smrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 110459ef0b394Smrg# next flag in the list until there are no more options. 110469ef0b394Smrg# 110479ef0b394Smrg# Note that this does not guarantee that the compiler supports the flag as some 110489ef0b394Smrg# compilers will simply ignore arguments that they do not understand, but we do 110499ef0b394Smrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 110509ef0b394Smrg# -Werror=unused-command-line-argument 110519ef0b394Smrg# 110529ef0b394SmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 110539ef0b394SmrgAC_REQUIRE([AC_PROG_CC_C99]) 110549ef0b394Smrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 110559ef0b394Smrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 110569ef0b394Smrg 110579ef0b394Smrgxorg_testset_save_CFLAGS="$CFLAGS" 110589ef0b394Smrg 110599ef0b394Smrgif test "x$xorg_testset_unknown_warning_option" = "x" ; then 110609ef0b394Smrg CFLAGS="$CFLAGS -Werror=unknown-warning-option" 110619ef0b394Smrg AC_CACHE_CHECK([if $CC supports -Werror=unknown-warning-option], 110629ef0b394Smrg xorg_cv_cc_flag_unknown_warning_option, 110639ef0b394Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 110649ef0b394Smrg [xorg_cv_cc_flag_unknown_warning_option=yes], 110659ef0b394Smrg [xorg_cv_cc_flag_unknown_warning_option=no])) 110669ef0b394Smrg xorg_testset_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option 110679ef0b394Smrg CFLAGS="$xorg_testset_save_CFLAGS" 110689ef0b394Smrgfi 11069698f425bSmrg 110709ef0b394Smrgif test "x$xorg_testset_unused_command_line_argument" = "x" ; then 110719ef0b394Smrg if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then 110729ef0b394Smrg CFLAGS="$CFLAGS -Werror=unknown-warning-option" 110739ef0b394Smrg fi 110749ef0b394Smrg CFLAGS="$CFLAGS -Werror=unused-command-line-argument" 110759ef0b394Smrg AC_CACHE_CHECK([if $CC supports -Werror=unused-command-line-argument], 110769ef0b394Smrg xorg_cv_cc_flag_unused_command_line_argument, 110779ef0b394Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 110789ef0b394Smrg [xorg_cv_cc_flag_unused_command_line_argument=yes], 110799ef0b394Smrg [xorg_cv_cc_flag_unused_command_line_argument=no])) 110809ef0b394Smrg xorg_testset_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument 110819ef0b394Smrg CFLAGS="$xorg_testset_save_CFLAGS" 110829ef0b394Smrgfi 11083d17cd367Smrg 110849ef0b394Smrgfound="no" 110859ef0b394Smrgm4_foreach([flag], m4_cdr($@), [ 110869ef0b394Smrg if test $found = "no" ; then 110879ef0b394Smrg if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then 110889ef0b394Smrg CFLAGS="$CFLAGS -Werror=unknown-warning-option" 110899ef0b394Smrg fi 110909ef0b394Smrg 110919ef0b394Smrg if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then 110929ef0b394Smrg CFLAGS="$CFLAGS -Werror=unused-command-line-argument" 110939ef0b394Smrg fi 110949ef0b394Smrg 110959ef0b394Smrg CFLAGS="$CFLAGS ]flag[" 110969ef0b394Smrg 110979ef0b394Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 110989ef0b394Smrg AC_MSG_CHECKING([if $CC supports ]flag[]) 110999ef0b394Smrg cacheid=`AS_ECHO([xorg_cv_cc_flag_]flag[])` 111009ef0b394Smrg AC_CACHE_VAL(AS_TR_SH($cacheid), 111019ef0b394Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 111029ef0b394Smrg [eval AS_TR_SH($cacheid)=yes], 111039ef0b394Smrg [eval AS_TR_SH($cacheid)=no])]) 111049ef0b394Smrg 111059ef0b394Smrg CFLAGS="$xorg_testset_save_CFLAGS" 111069ef0b394Smrg 111079ef0b394Smrg eval supported=$AS_TR_SH($cacheid) 111089ef0b394Smrg AC_MSG_RESULT([$supported]) 111099ef0b394Smrg if test "$supported" = "yes" ; then 111109ef0b394Smrg $1="$$1 ]flag[" 111119ef0b394Smrg found="yes" 111129ef0b394Smrg fi 111139ef0b394Smrg fi 111149ef0b394Smrg]) 111159ef0b394Smrg]) # XORG_TESTSET_CFLAG 11116d17cd367Smrg 111179ef0b394Smrg# XORG_COMPILER_FLAGS 111189ef0b394Smrg# --------------- 111199ef0b394Smrg# Minimum version: 1.16.0 111209ef0b394Smrg# 111219ef0b394Smrg# Defines BASE_CFLAGS to contain a set of command line arguments supported 111229ef0b394Smrg# by the selected compiler which do NOT alter the generated code. These 111239ef0b394Smrg# arguments will cause the compiler to print various warnings during 111249ef0b394Smrg# compilation AND turn a conservative set of warnings into errors. 111259ef0b394Smrg# 111269ef0b394Smrg# The set of flags supported by BASE_CFLAGS will grow in future 111279ef0b394Smrg# versions of util-macros as options are added to new compilers. 111289ef0b394Smrg# 111299ef0b394SmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 111309ef0b394SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 11131698f425bSmrg 111329ef0b394SmrgAC_ARG_ENABLE(selective-werror, 111339ef0b394Smrg AS_HELP_STRING([--disable-selective-werror], 111349ef0b394Smrg [Turn off selective compiler errors. (default: enabled)]), 111359ef0b394Smrg [SELECTIVE_WERROR=$enableval], 111369ef0b394Smrg [SELECTIVE_WERROR=yes]) 11137698f425bSmrg 111389ef0b394Smrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 111399ef0b394Smrgif test "x$SUNCC" = "xyes"; then 111409ef0b394Smrg BASE_CFLAGS="-v" 111419ef0b394Smrgelse 111429ef0b394Smrg BASE_CFLAGS="" 111439ef0b394Smrgfi 11144698f425bSmrg 111459ef0b394Smrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 111469ef0b394SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wall]) 111479ef0b394SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wpointer-arith]) 111489ef0b394SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wstrict-prototypes]) 111499ef0b394SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wmissing-prototypes]) 111509ef0b394SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wmissing-declarations]) 111519ef0b394SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wnested-externs]) 111529ef0b394SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wbad-function-cast]) 111539ef0b394SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wformat=2], [-Wformat]) 111549ef0b394SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wold-style-definition]) 111559ef0b394SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wdeclaration-after-statement]) 111569ef0b394Smrg 111579ef0b394Smrg# This chunk adds additional warnings that could catch undesired effects. 111589ef0b394SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wunused]) 111599ef0b394SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wuninitialized]) 111609ef0b394SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wshadow]) 111619ef0b394SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wcast-qual]) 111629ef0b394SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wmissing-noreturn]) 111639ef0b394SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wmissing-format-attribute]) 111649ef0b394SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wredundant-decls]) 111659ef0b394Smrg 111669ef0b394Smrg# These are currently disabled because they are noisy. They will be enabled 111679ef0b394Smrg# in the future once the codebase is sufficiently modernized to silence 111689ef0b394Smrg# them. For now, I don't want them to drown out the other warnings. 111699ef0b394Smrg# XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wlogical-op]) 111709ef0b394Smrg# XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wparentheses]) 111719ef0b394Smrg# XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wcast-align]) 111729ef0b394Smrg 111739ef0b394Smrg# Turn some warnings into errors, so we don't accidently get successful builds 111749ef0b394Smrg# when there are problems that should be fixed. 111759ef0b394Smrg 111769ef0b394Smrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 111779ef0b394SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 111789ef0b394SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=nonnull]) 111799ef0b394SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=init-self]) 111809ef0b394SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=main]) 111819ef0b394SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=missing-braces]) 111829ef0b394SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=sequence-point]) 111839ef0b394SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 111849ef0b394SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=trigraphs]) 111859ef0b394SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=array-bounds]) 111869ef0b394SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=write-strings]) 111879ef0b394SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=address]) 111889ef0b394SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 111899ef0b394SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 111909ef0b394Smrgelse 111919ef0b394SmrgAC_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]) 111929ef0b394SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wimplicit]) 111939ef0b394SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wnonnull]) 111949ef0b394SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Winit-self]) 111959ef0b394SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wmain]) 111969ef0b394SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wmissing-braces]) 111979ef0b394SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wsequence-point]) 111989ef0b394SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wreturn-type]) 111999ef0b394SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wtrigraphs]) 112009ef0b394SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Warray-bounds]) 112019ef0b394SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wwrite-strings]) 112029ef0b394SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Waddress]) 112039ef0b394SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wint-to-pointer-cast]) 112049ef0b394SmrgXORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wpointer-to-int-cast]) 112059ef0b394Smrgfi 11206698f425bSmrg 112079ef0b394SmrgAC_SUBST([BASE_CFLAGS]) 112089ef0b394Smrg]) # XORG_COMPILER_FLAGS 112099ef0b394Smrg 112109ef0b394Smrg# XORG_CWARNFLAGS 112119ef0b394Smrg# --------------- 112129ef0b394Smrg# Minimum version: 1.2.0 112139ef0b394Smrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 11214698f425bSmrg# 112159ef0b394Smrg# Defines CWARNFLAGS to enable C compiler warnings. 112169ef0b394Smrg# 112179ef0b394Smrg# This function is deprecated because it defines -fno-strict-aliasing 112189ef0b394Smrg# which alters the code generated by the compiler. If -fno-strict-aliasing 112199ef0b394Smrg# is needed, then it should be added explicitly in the module when 112209ef0b394Smrg# it is updated to use BASE_CFLAGS. 112219ef0b394Smrg# 112229ef0b394SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 112239ef0b394SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 112249ef0b394SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 112259ef0b394SmrgCWARNFLAGS="$BASE_CFLAGS" 112269ef0b394Smrgif test "x$GCC" = xyes ; then 112279ef0b394Smrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 112289ef0b394Smrgfi 112299ef0b394SmrgAC_SUBST(CWARNFLAGS) 112309ef0b394Smrg]) # XORG_CWARNFLAGS 11231698f425bSmrg 112329ef0b394Smrg# XORG_STRICT_OPTION 112339ef0b394Smrg# ----------------------- 112349ef0b394Smrg# Minimum version: 1.3.0 112359ef0b394Smrg# 112369ef0b394Smrg# Add configure option to enable strict compilation flags, such as treating 112379ef0b394Smrg# warnings as fatal errors. 112389ef0b394Smrg# If --enable-strict-compilation is passed to configure, adds strict flags to 112399ef0b394Smrg# $BASE_CFLAGS and the deprecated $CWARNFLAGS. 112409ef0b394Smrg# 112419ef0b394Smrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 112429ef0b394Smrg# when strict compilation is unconditionally desired. 112439ef0b394SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 112449ef0b394SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 112459ef0b394SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 11246698f425bSmrg 112479ef0b394SmrgAC_ARG_ENABLE(strict-compilation, 112489ef0b394Smrg AS_HELP_STRING([--enable-strict-compilation], 112499ef0b394Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 112509ef0b394Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 11251698f425bSmrg 112529ef0b394SmrgSTRICT_CFLAGS="" 112539ef0b394SmrgXORG_TESTSET_CFLAG([STRICT_CFLAGS], [-pedantic]) 112549ef0b394SmrgXORG_TESTSET_CFLAG([STRICT_CFLAGS], [-Werror], [-errwarn]) 11255698f425bSmrg 112569ef0b394Smrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 112579ef0b394Smrg# activate it with -Werror, so we add it here explicitly. 112589ef0b394SmrgXORG_TESTSET_CFLAG([STRICT_CFLAGS], [-Werror=attributes]) 11259698f425bSmrg 112609ef0b394Smrgif test "x$STRICT_COMPILE" = "xyes"; then 112619ef0b394Smrg BASE_CFLAGS="$BASE_CFLAGS $STRICT_CFLAGS" 112629ef0b394Smrg CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS" 11263698f425bSmrgfi 112649ef0b394SmrgAC_SUBST([STRICT_CFLAGS]) 112659ef0b394SmrgAC_SUBST([BASE_CFLAGS]) 112669ef0b394SmrgAC_SUBST([CWARNFLAGS]) 112679ef0b394Smrg]) # XORG_STRICT_OPTION 11268698f425bSmrg 112699ef0b394Smrg# XORG_DEFAULT_OPTIONS 112709ef0b394Smrg# -------------------- 112719ef0b394Smrg# Minimum version: 1.3.0 11272698f425bSmrg# 112739ef0b394Smrg# Defines default options for X.Org modules. 112749ef0b394Smrg# 112759ef0b394SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 112769ef0b394SmrgAC_REQUIRE([AC_PROG_INSTALL]) 112779ef0b394SmrgXORG_COMPILER_FLAGS 112789ef0b394SmrgXORG_CWARNFLAGS 112799ef0b394SmrgXORG_STRICT_OPTION 112809ef0b394SmrgXORG_RELEASE_VERSION 112819ef0b394SmrgXORG_CHANGELOG 112829ef0b394SmrgXORG_INSTALL 112839ef0b394SmrgXORG_MANPAGE_SECTIONS 112849ef0b394Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 112859ef0b394Smrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 112869ef0b394Smrg]) # XORG_DEFAULT_OPTIONS 11287698f425bSmrg 112889ef0b394Smrg# XORG_INSTALL() 112899ef0b394Smrg# ---------------- 112909ef0b394Smrg# Minimum version: 1.4.0 112919ef0b394Smrg# 112929ef0b394Smrg# Defines the variable INSTALL_CMD as the command to copy 112939ef0b394Smrg# INSTALL from $prefix/share/util-macros. 112949ef0b394Smrg# 112959ef0b394SmrgAC_DEFUN([XORG_INSTALL], [ 112969ef0b394SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 112979ef0b394Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 112989ef0b394SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 112999ef0b394Smrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 113009ef0b394Smrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 113019ef0b394Smrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 113029ef0b394SmrgAC_SUBST([INSTALL_CMD]) 113039ef0b394Smrg]) # XORG_INSTALL 113049ef0b394Smrgdnl Copyright 2005 Red Hat, Inc 113059ef0b394Smrgdnl 113069ef0b394Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 113079ef0b394Smrgdnl documentation for any purpose is hereby granted without fee, provided that 113089ef0b394Smrgdnl the above copyright notice appear in all copies and that both that 113099ef0b394Smrgdnl copyright notice and this permission notice appear in supporting 113109ef0b394Smrgdnl documentation. 113119ef0b394Smrgdnl 113129ef0b394Smrgdnl The above copyright notice and this permission notice shall be included 113139ef0b394Smrgdnl in all copies or substantial portions of the Software. 113149ef0b394Smrgdnl 113159ef0b394Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 113169ef0b394Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 113179ef0b394Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 113189ef0b394Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 113199ef0b394Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 113209ef0b394Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 113219ef0b394Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 113229ef0b394Smrgdnl 113239ef0b394Smrgdnl Except as contained in this notice, the name of the copyright holders shall 113249ef0b394Smrgdnl not be used in advertising or otherwise to promote the sale, use or 113259ef0b394Smrgdnl other dealings in this Software without prior written authorization 113269ef0b394Smrgdnl from the copyright holders. 113279ef0b394Smrgdnl 11328698f425bSmrg 113299ef0b394Smrg# XORG_RELEASE_VERSION 113309ef0b394Smrg# -------------------- 113319ef0b394Smrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 113329ef0b394Smrg 113339ef0b394SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 113349ef0b394Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 113359ef0b394Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 113369ef0b394Smrg [Major version of this package]) 113379ef0b394Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 113389ef0b394Smrg if test "x$PVM" = "x"; then 113399ef0b394Smrg PVM="0" 113409ef0b394Smrg fi 113419ef0b394Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 113429ef0b394Smrg [$PVM], 113439ef0b394Smrg [Minor version of this package]) 113449ef0b394Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 113459ef0b394Smrg if test "x$PVP" = "x"; then 113469ef0b394Smrg PVP="0" 113479ef0b394Smrg fi 113489ef0b394Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 113499ef0b394Smrg [$PVP], 113509ef0b394Smrg [Patch version of this package]) 11351d17cd367Smrg]) 11352698f425bSmrg 113539ef0b394Smrg# XORG_CHANGELOG() 113549ef0b394Smrg# ---------------- 113559ef0b394Smrg# Minimum version: 1.2.0 11356698f425bSmrg# 113579ef0b394Smrg# Defines the variable CHANGELOG_CMD as the command to generate 113589ef0b394Smrg# ChangeLog from git. 113599ef0b394Smrg# 113609ef0b394Smrg# 113619ef0b394SmrgAC_DEFUN([XORG_CHANGELOG], [ 113629ef0b394SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 113639ef0b394Smrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 113649ef0b394Smrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 113659ef0b394Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 113669ef0b394SmrgAC_SUBST([CHANGELOG_CMD]) 113679ef0b394Smrg]) # XORG_CHANGELOG 11368698f425bSmrg 113699ef0b394Smrgdnl 113709ef0b394Smrgdnl Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. 113719ef0b394Smrgdnl 113729ef0b394Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 113739ef0b394Smrgdnl copy of this software and associated documentation files (the "Software"), 113749ef0b394Smrgdnl to deal in the Software without restriction, including without limitation 113759ef0b394Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 113769ef0b394Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 113779ef0b394Smrgdnl Software is furnished to do so, subject to the following conditions: 113789ef0b394Smrgdnl 113799ef0b394Smrgdnl The above copyright notice and this permission notice (including the next 113809ef0b394Smrgdnl paragraph) shall be included in all copies or substantial portions of the 113819ef0b394Smrgdnl Software. 113829ef0b394Smrgdnl 113839ef0b394Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 113849ef0b394Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 113859ef0b394Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 113869ef0b394Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 113879ef0b394Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 113889ef0b394Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 113899ef0b394Smrgdnl DEALINGS IN THE SOFTWARE. 113909ef0b394Smrgdnl 11391698f425bSmrg 113929ef0b394Smrg# XTRANS_TCP_FLAGS() 113939ef0b394Smrg# ------------------ 113949ef0b394Smrg# Find needed libraries for TCP sockets, and check for IPv6 support 113959ef0b394SmrgAC_DEFUN([XTRANS_TCP_FLAGS],[ 113969ef0b394Smrg # SVR4 hides these in libraries other than libc 113979ef0b394Smrg AC_SEARCH_LIBS(socket, [socket]) 113989ef0b394Smrg AC_SEARCH_LIBS(gethostbyname, [nsl]) 113999ef0b394Smrg if test "$ac_cv_search_socket$ac_cv_search_gethostbyname" = "nono"; then 114009ef0b394Smrg AC_HAVE_LIBRARY([ws2_32]) 114019ef0b394Smrg fi 11402698f425bSmrg 114039ef0b394Smrg # Needs to come after above checks for libsocket & libnsl for SVR4 systems 114049ef0b394Smrg AC_ARG_ENABLE(ipv6, 114059ef0b394Smrg AC_HELP_STRING([--enable-ipv6],[Enable IPv6 support]), 114069ef0b394Smrg [IPV6CONN=$enableval], 114079ef0b394Smrg [AC_CHECK_FUNC(getaddrinfo,[IPV6CONN=yes],[IPV6CONN=no])]) 114089ef0b394Smrg AC_MSG_CHECKING([if IPv6 support should be built]) 114099ef0b394Smrg if test "$IPV6CONN" = "yes"; then 114109ef0b394Smrg AC_DEFINE(IPv6,1,[Support IPv6 for TCP connections]) 114119ef0b394Smrg fi 114129ef0b394Smrg AC_MSG_RESULT($IPV6CONN) 11413698f425bSmrg 114149ef0b394Smrg # 4.3BSD-Reno added a new member to struct sockaddr_in 114159ef0b394Smrg AC_CHECK_MEMBER([struct sockaddr_in.sin_len], 114169ef0b394Smrg AC_DEFINE([BSD44SOCKETS],1, 114179ef0b394Smrg [Define to 1 if `struct sockaddr_in' has a `sin_len' member]), [], [ 114189ef0b394Smrg#include <sys/types.h> 114199ef0b394Smrg#include <sys/socket.h> 114209ef0b394Smrg#include <netinet/in.h> 114219ef0b394Smrg ]) 11422698f425bSmrg 114239ef0b394Smrg # POSIX.1g changed the type of pointer passed to getsockname/getpeername/etc. 114249ef0b394Smrg AC_CHECK_TYPES([socklen_t], [], [], [ 114259ef0b394SmrgAC_INCLUDES_DEFAULT 114269ef0b394Smrg#include <sys/socket.h>]) 11427698f425bSmrg 114289ef0b394Smrg]) # XTRANS_TCP_FLAGS 11429698f425bSmrg 114309ef0b394Smrg# XTRANS_CONNECTION_FLAGS() 114319ef0b394Smrg# ------------------------- 114329ef0b394Smrg# Standard checks for which Xtrans transports to use by the Xorg packages 114339ef0b394Smrg# that use Xtrans functions 114349ef0b394SmrgAC_DEFUN([XTRANS_CONNECTION_FLAGS],[ 114359ef0b394Smrg AC_REQUIRE([AC_CANONICAL_HOST]) 114369ef0b394Smrg AC_REQUIRE([AC_TYPE_SIGNAL]) 114379ef0b394Smrg [case $host_os in 114389ef0b394Smrg mingw*) unixdef="no" ;; 114399ef0b394Smrg *) unixdef="yes" ;; 114409ef0b394Smrg esac] 114419ef0b394Smrg AC_ARG_ENABLE(unix-transport, 114429ef0b394Smrg AC_HELP_STRING([--enable-unix-transport],[Enable UNIX domain socket transport]), 114439ef0b394Smrg [UNIXCONN=$enableval], [UNIXCONN=$unixdef]) 114449ef0b394Smrg AC_MSG_CHECKING([if Xtrans should support UNIX socket connections]) 114459ef0b394Smrg if test "$UNIXCONN" = "yes"; then 114469ef0b394Smrg AC_DEFINE(UNIXCONN,1,[Support UNIX socket connections]) 114479ef0b394Smrg fi 114489ef0b394Smrg AC_MSG_RESULT($UNIXCONN) 114499ef0b394Smrg AC_ARG_ENABLE(tcp-transport, 114509ef0b394Smrg AC_HELP_STRING([--enable-tcp-transport],[Enable TCP socket transport]), 114519ef0b394Smrg [TCPCONN=$enableval], [TCPCONN=yes]) 114529ef0b394Smrg AC_MSG_CHECKING([if Xtrans should support TCP socket connections]) 114539ef0b394Smrg AC_MSG_RESULT($TCPCONN) 114549ef0b394Smrg if test "$TCPCONN" = "yes"; then 114559ef0b394Smrg AC_DEFINE(TCPCONN,1,[Support TCP socket connections]) 114569ef0b394Smrg XTRANS_TCP_FLAGS 114579ef0b394Smrg fi 114589ef0b394Smrg [case $host_os in 114599ef0b394Smrg solaris*|sco*|sysv4*) localdef="yes" ;; 114609ef0b394Smrg *) localdef="no" ;; 114619ef0b394Smrg esac] 114629ef0b394Smrg AC_ARG_ENABLE(local-transport, 114639ef0b394Smrg AC_HELP_STRING([--enable-local-transport],[Enable os-specific local transport]), 114649ef0b394Smrg [LOCALCONN=$enableval], [LOCALCONN=$localdef]) 114659ef0b394Smrg AC_MSG_CHECKING([if Xtrans should support os-specific local connections]) 114669ef0b394Smrg AC_MSG_RESULT($LOCALCONN) 114679ef0b394Smrg if test "$LOCALCONN" = "yes"; then 114689ef0b394Smrg AC_DEFINE(LOCALCONN,1,[Support os-specific local connections]) 114699ef0b394Smrg fi 11470698f425bSmrg 114719ef0b394Smrg]) # XTRANS_CONNECTION_FLAGS 11472698f425bSmrg 11473698f425bSmrg 114749ef0b394Smrg# XTRANS_SECURE_RPC_FLAGS() 114759ef0b394Smrg# ------------------------- 114769ef0b394Smrg# Check for Secure RPC functions - must come after XTRANS_TCP_FLAGS 114779ef0b394Smrg# so that any necessary networking libraries are already found 114789ef0b394SmrgAC_DEFUN([XTRANS_SECURE_RPC_FLAGS], 114799ef0b394Smrg[AC_REQUIRE([XTRANS_TCP_FLAGS]) 114809ef0b394Smrg AC_ARG_ENABLE(secure-rpc, 114819ef0b394Smrg AC_HELP_STRING([--enable-secure-rpc],[Enable Secure RPC]), 114829ef0b394Smrg [SECURE_RPC=$enableval], [SECURE_RPC="try"]) 11483698f425bSmrg 114849ef0b394Smrg if test "x$SECURE_RPC" = "xyes" -o "x$SECURE_RPC" = "xtry" ; then 114859ef0b394Smrg FOUND_SECURE_RPC="no" 114869ef0b394Smrg AC_CHECK_FUNCS([authdes_seccreate authdes_create], 114879ef0b394Smrg [FOUND_SECURE_RPC="yes"]) 114889ef0b394Smrg if test "x$FOUND_SECURE_RPC" = "xno" ; then 114899ef0b394Smrg if test "x$SECURE_RPC" = "xyes" ; then 114909ef0b394Smrg AC_MSG_ERROR([Secure RPC requested, but required functions not found]) 114919ef0b394Smrg fi 114929ef0b394Smrg SECURE_RPC="no" 114939ef0b394Smrg else 114949ef0b394Smrg dnl FreeBSD keeps getsecretkey in librpcsvc 114959ef0b394Smrg AC_SEARCH_LIBS(getsecretkey, [rpcsvc]) 114969ef0b394Smrg SECURE_RPC="yes" 114979ef0b394Smrg fi 114989ef0b394Smrg fi 114999ef0b394Smrg AC_MSG_CHECKING([if Secure RPC authentication ("SUN-DES-1") should be supported]) 115009ef0b394Smrg if test "x$SECURE_RPC" = "xyes" ; then 115019ef0b394Smrg AC_DEFINE(SECURE_RPC, 1, [Support Secure RPC ("SUN-DES-1") authentication for X11 clients]) 115029ef0b394Smrg fi 115039ef0b394Smrg AC_MSG_RESULT($SECURE_RPC) 115049ef0b394Smrg]) # XTRANS_SECURE_RPC_FLAGS 11505698f425bSmrg 11506698f425bSmrg 11507