aclocal.m4 revision e120bd27
1e120bd27Smrg# generated automatically by aclocal 1.11.1 -*- Autoconf -*- 26c321187Smrg 36c321187Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 493493779Smrg# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 56c321187Smrg# This file is free software; the Free Software Foundation 66c321187Smrg# gives unlimited permission to copy and/or distribute it, 76c321187Smrg# with or without modifications, as long as this notice is preserved. 86c321187Smrg 96c321187Smrg# This program is distributed in the hope that it will be useful, 106c321187Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 116c321187Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 126c321187Smrg# PARTICULAR PURPOSE. 136c321187Smrg 1493493779Smrgm4_ifndef([AC_AUTOCONF_VERSION], 1593493779Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 16e120bd27Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, 17e120bd27Smrg[m4_warning([this file was generated for autoconf 2.68. 1893493779SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 1993493779SmrgIf you have problems, you may need to regenerate the build system entirely. 2093493779SmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])]) 216c321187Smrg 2293493779Smrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 236c321187Smrg# 246c321187Smrg# This file is free software; the Free Software Foundation 256c321187Smrg# gives unlimited permission to copy and/or distribute it, 266c321187Smrg# with or without modifications, as long as this notice is preserved. 276c321187Smrg 286c321187Smrg# AM_AUTOMAKE_VERSION(VERSION) 296c321187Smrg# ---------------------------- 306c321187Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 316c321187Smrg# generated from the m4 files accompanying Automake X.Y. 326c321187Smrg# (This private macro should not be called outside this file.) 336c321187SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 3493493779Smrg[am__api_version='1.11' 356c321187Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 366c321187Smrgdnl require some minimum version. Point them to the right macro. 37e120bd27Smrgm4_if([$1], [1.11.1], [], 386c321187Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 396c321187Smrg]) 406c321187Smrg 416c321187Smrg# _AM_AUTOCONF_VERSION(VERSION) 426c321187Smrg# ----------------------------- 436c321187Smrg# aclocal traces this macro to find the Autoconf version. 446c321187Smrg# This is a private macro too. Using m4_define simplifies 456c321187Smrg# the logic in aclocal, which can simply ignore this definition. 466c321187Smrgm4_define([_AM_AUTOCONF_VERSION], []) 476c321187Smrg 486c321187Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 496c321187Smrg# ------------------------------- 506c321187Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 5193493779Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 526c321187SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 53e120bd27Smrg[AM_AUTOMAKE_VERSION([1.11.1])dnl 5493493779Smrgm4_ifndef([AC_AUTOCONF_VERSION], 5593493779Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 5693493779Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 576c321187Smrg 586c321187Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 596c321187Smrg 606c321187Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 616c321187Smrg# 626c321187Smrg# This file is free software; the Free Software Foundation 636c321187Smrg# gives unlimited permission to copy and/or distribute it, 646c321187Smrg# with or without modifications, as long as this notice is preserved. 656c321187Smrg 666c321187Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 676c321187Smrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 686c321187Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 696c321187Smrg# 706c321187Smrg# Of course, Automake must honor this variable whenever it calls a 716c321187Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 726c321187Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 736c321187Smrg# depending on how configure is run. This is pretty annoying, since 746c321187Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 756c321187Smrg# source directory, any form will work fine, but in subdirectories a 766c321187Smrg# relative path needs to be adjusted first. 776c321187Smrg# 786c321187Smrg# $ac_aux_dir/missing 796c321187Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 806c321187Smrg# $top_srcdir/$ac_aux_dir/missing 816c321187Smrg# fails if $ac_aux_dir is absolute, 826c321187Smrg# fails when called from a subdirectory in a VPATH build with 836c321187Smrg# a relative $ac_aux_dir 846c321187Smrg# 856c321187Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 866c321187Smrg# are both prefixed by $srcdir. In an in-source build this is usually 876c321187Smrg# harmless because $srcdir is `.', but things will broke when you 886c321187Smrg# start a VPATH build or use an absolute $srcdir. 896c321187Smrg# 906c321187Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 916c321187Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 926c321187Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 936c321187Smrg# and then we would define $MISSING as 946c321187Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 956c321187Smrg# This will work as long as MISSING is not called from configure, because 966c321187Smrg# unfortunately $(top_srcdir) has no meaning in configure. 976c321187Smrg# However there are other variables, like CC, which are often used in 986c321187Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 996c321187Smrg# 1006c321187Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 1016c321187Smrg# absolute PATH. The drawback is that using absolute paths prevent a 1026c321187Smrg# configured tree to be moved without reconfiguration. 1036c321187Smrg 1046c321187SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 1056c321187Smrg[dnl Rely on autoconf to set up CDPATH properly. 1066c321187SmrgAC_PREREQ([2.50])dnl 1076c321187Smrg# expand $ac_aux_dir to an absolute path 1086c321187Smrgam_aux_dir=`cd $ac_aux_dir && pwd` 1096c321187Smrg]) 1106c321187Smrg 1116c321187Smrg# AM_CONDITIONAL -*- Autoconf -*- 1126c321187Smrg 11393493779Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 1146c321187Smrg# Free Software Foundation, Inc. 1156c321187Smrg# 1166c321187Smrg# This file is free software; the Free Software Foundation 1176c321187Smrg# gives unlimited permission to copy and/or distribute it, 1186c321187Smrg# with or without modifications, as long as this notice is preserved. 1196c321187Smrg 12093493779Smrg# serial 9 1216c321187Smrg 1226c321187Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 1236c321187Smrg# ------------------------------------- 1246c321187Smrg# Define a conditional. 1256c321187SmrgAC_DEFUN([AM_CONDITIONAL], 1266c321187Smrg[AC_PREREQ(2.52)dnl 1276c321187Smrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 1286c321187Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 1296c321187SmrgAC_SUBST([$1_TRUE])dnl 1306c321187SmrgAC_SUBST([$1_FALSE])dnl 1316c321187Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 1326c321187Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 13393493779Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 1346c321187Smrgif $2; then 1356c321187Smrg $1_TRUE= 1366c321187Smrg $1_FALSE='#' 1376c321187Smrgelse 1386c321187Smrg $1_TRUE='#' 1396c321187Smrg $1_FALSE= 1406c321187Smrgfi 1416c321187SmrgAC_CONFIG_COMMANDS_PRE( 1426c321187Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 1436c321187Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 1446c321187SmrgUsually this means the macro was only invoked conditionally.]]) 1456c321187Smrgfi])]) 1466c321187Smrg 14793493779Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 1486c321187Smrg# Free Software Foundation, Inc. 1496c321187Smrg# 1506c321187Smrg# This file is free software; the Free Software Foundation 1516c321187Smrg# gives unlimited permission to copy and/or distribute it, 1526c321187Smrg# with or without modifications, as long as this notice is preserved. 1536c321187Smrg 15493493779Smrg# serial 10 1556c321187Smrg 1566c321187Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 1576c321187Smrg# written in clear, in which case automake, when reading aclocal.m4, 1586c321187Smrg# will think it sees a *use*, and therefore will trigger all it's 1596c321187Smrg# C support machinery. Also note that it means that autoscan, seeing 1606c321187Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 1616c321187Smrg 1626c321187Smrg 1636c321187Smrg# _AM_DEPENDENCIES(NAME) 1646c321187Smrg# ---------------------- 1656c321187Smrg# See how the compiler implements dependency checking. 1666c321187Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 1676c321187Smrg# We try a few techniques and use that to set a single cache variable. 1686c321187Smrg# 1696c321187Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 1706c321187Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 1716c321187Smrg# dependency, and given that the user is not expected to run this macro, 1726c321187Smrg# just rely on AC_PROG_CC. 1736c321187SmrgAC_DEFUN([_AM_DEPENDENCIES], 1746c321187Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 1756c321187SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 1766c321187SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 1776c321187SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 1786c321187Smrg 1796c321187Smrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 1806c321187Smrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 1816c321187Smrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 1826c321187Smrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 1836c321187Smrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 1846c321187Smrg [depcc="$$1" am_compiler_list=]) 1856c321187Smrg 1866c321187SmrgAC_CACHE_CHECK([dependency style of $depcc], 1876c321187Smrg [am_cv_$1_dependencies_compiler_type], 1886c321187Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 1896c321187Smrg # We make a subdir and do the tests there. Otherwise we can end up 1906c321187Smrg # making bogus files that we don't know about and never remove. For 1916c321187Smrg # instance it was reported that on HP-UX the gcc test will end up 1926c321187Smrg # making a dummy file named `D' -- because `-MD' means `put the output 1936c321187Smrg # in D'. 1946c321187Smrg mkdir conftest.dir 1956c321187Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 1966c321187Smrg # using a relative directory. 1976c321187Smrg cp "$am_depcomp" conftest.dir 1986c321187Smrg cd conftest.dir 1996c321187Smrg # We will build objects and dependencies in a subdirectory because 2006c321187Smrg # it helps to detect inapplicable dependency modes. For instance 2016c321187Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 2026c321187Smrg # side effect of compilation, but ICC will put the dependencies in 2036c321187Smrg # the current directory while Tru64 will put them in the object 2046c321187Smrg # directory. 2056c321187Smrg mkdir sub 2066c321187Smrg 2076c321187Smrg am_cv_$1_dependencies_compiler_type=none 2086c321187Smrg if test "$am_compiler_list" = ""; then 2096c321187Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 2106c321187Smrg fi 21193493779Smrg am__universal=false 21293493779Smrg m4_case([$1], [CC], 21393493779Smrg [case " $depcc " in #( 21493493779Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 21593493779Smrg esac], 21693493779Smrg [CXX], 21793493779Smrg [case " $depcc " in #( 21893493779Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 21993493779Smrg esac]) 22093493779Smrg 2216c321187Smrg for depmode in $am_compiler_list; do 2226c321187Smrg # Setup a source with many dependencies, because some compilers 2236c321187Smrg # like to wrap large dependency lists on column 80 (with \), and 2246c321187Smrg # we should not choose a depcomp mode which is confused by this. 2256c321187Smrg # 2266c321187Smrg # We need to recreate these files for each test, as the compiler may 2276c321187Smrg # overwrite some of them when testing with obscure command lines. 2286c321187Smrg # This happens at least with the AIX C compiler. 2296c321187Smrg : > sub/conftest.c 2306c321187Smrg for i in 1 2 3 4 5 6; do 2316c321187Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 2326c321187Smrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 2336c321187Smrg # Solaris 8's {/usr,}/bin/sh. 2346c321187Smrg touch sub/conftst$i.h 2356c321187Smrg done 2366c321187Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 2376c321187Smrg 23893493779Smrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 23993493779Smrg # mode. It turns out that the SunPro C++ compiler does not properly 24093493779Smrg # handle `-M -o', and we need to detect this. Also, some Intel 24193493779Smrg # versions had trouble with output in subdirs 24293493779Smrg am__obj=sub/conftest.${OBJEXT-o} 24393493779Smrg am__minus_obj="-o $am__obj" 2446c321187Smrg case $depmode in 24593493779Smrg gcc) 24693493779Smrg # This depmode causes a compiler race in universal mode. 24793493779Smrg test "$am__universal" = false || continue 24893493779Smrg ;; 2496c321187Smrg nosideeffect) 2506c321187Smrg # after this tag, mechanisms are not by side-effect, so they'll 2516c321187Smrg # only be used when explicitly requested 2526c321187Smrg if test "x$enable_dependency_tracking" = xyes; then 2536c321187Smrg continue 2546c321187Smrg else 2556c321187Smrg break 2566c321187Smrg fi 2576c321187Smrg ;; 25893493779Smrg msvisualcpp | msvcmsys) 25993493779Smrg # This compiler won't grok `-c -o', but also, the minuso test has 26093493779Smrg # not run yet. These depmodes are late enough in the game, and 26193493779Smrg # so weak that their functioning should not be impacted. 26293493779Smrg am__obj=conftest.${OBJEXT-o} 26393493779Smrg am__minus_obj= 26493493779Smrg ;; 2656c321187Smrg none) break ;; 2666c321187Smrg esac 2676c321187Smrg if depmode=$depmode \ 26893493779Smrg source=sub/conftest.c object=$am__obj \ 2696c321187Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 27093493779Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 2716c321187Smrg >/dev/null 2>conftest.err && 2726c321187Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 2736c321187Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 27493493779Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 2756c321187Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 2766c321187Smrg # icc doesn't choke on unknown options, it will just issue warnings 2776c321187Smrg # or remarks (even with -Werror). So we grep stderr for any message 2786c321187Smrg # that says an option was ignored or not supported. 2796c321187Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 2806c321187Smrg # icc: Command line warning: ignoring option '-M'; no argument required 2816c321187Smrg # The diagnosis changed in icc 8.0: 2826c321187Smrg # icc: Command line remark: option '-MP' not supported 2836c321187Smrg if (grep 'ignoring option' conftest.err || 2846c321187Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 2856c321187Smrg am_cv_$1_dependencies_compiler_type=$depmode 2866c321187Smrg break 2876c321187Smrg fi 2886c321187Smrg fi 2896c321187Smrg done 2906c321187Smrg 2916c321187Smrg cd .. 2926c321187Smrg rm -rf conftest.dir 2936c321187Smrgelse 2946c321187Smrg am_cv_$1_dependencies_compiler_type=none 2956c321187Smrgfi 2966c321187Smrg]) 2976c321187SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 2986c321187SmrgAM_CONDITIONAL([am__fastdep$1], [ 2996c321187Smrg test "x$enable_dependency_tracking" != xno \ 3006c321187Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 3016c321187Smrg]) 3026c321187Smrg 3036c321187Smrg 3046c321187Smrg# AM_SET_DEPDIR 3056c321187Smrg# ------------- 3066c321187Smrg# Choose a directory name for dependency files. 3076c321187Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 3086c321187SmrgAC_DEFUN([AM_SET_DEPDIR], 3096c321187Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 3106c321187SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 3116c321187Smrg]) 3126c321187Smrg 3136c321187Smrg 3146c321187Smrg# AM_DEP_TRACK 3156c321187Smrg# ------------ 3166c321187SmrgAC_DEFUN([AM_DEP_TRACK], 3176c321187Smrg[AC_ARG_ENABLE(dependency-tracking, 3186c321187Smrg[ --disable-dependency-tracking speeds up one-time build 3196c321187Smrg --enable-dependency-tracking do not reject slow dependency extractors]) 3206c321187Smrgif test "x$enable_dependency_tracking" != xno; then 3216c321187Smrg am_depcomp="$ac_aux_dir/depcomp" 3226c321187Smrg AMDEPBACKSLASH='\' 3236c321187Smrgfi 3246c321187SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 3256c321187SmrgAC_SUBST([AMDEPBACKSLASH])dnl 3266c321187Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 3276c321187Smrg]) 3286c321187Smrg 3296c321187Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 3306c321187Smrg 33193493779Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 3326c321187Smrg# Free Software Foundation, Inc. 3336c321187Smrg# 3346c321187Smrg# This file is free software; the Free Software Foundation 3356c321187Smrg# gives unlimited permission to copy and/or distribute it, 3366c321187Smrg# with or without modifications, as long as this notice is preserved. 3376c321187Smrg 33893493779Smrg#serial 5 3396c321187Smrg 3406c321187Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 3416c321187Smrg# ------------------------------ 3426c321187SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 34393493779Smrg[{ 34493493779Smrg # Autoconf 2.62 quotes --file arguments for eval, but not when files 34593493779Smrg # are listed without --file. Let's play safe and only enable the eval 34693493779Smrg # if we detect the quoting. 34793493779Smrg case $CONFIG_FILES in 34893493779Smrg *\'*) eval set x "$CONFIG_FILES" ;; 34993493779Smrg *) set x $CONFIG_FILES ;; 35093493779Smrg esac 35193493779Smrg shift 35293493779Smrg for mf 35393493779Smrg do 35493493779Smrg # Strip MF so we end up with the name of the file. 35593493779Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 35693493779Smrg # Check whether this is an Automake generated Makefile or not. 35793493779Smrg # We used to match only the files named `Makefile.in', but 35893493779Smrg # some people rename them; so instead we look at the file content. 35993493779Smrg # Grep'ing the first line is not enough: some people post-process 36093493779Smrg # each Makefile.in and add a new line on top of each file to say so. 36193493779Smrg # Grep'ing the whole file is not good either: AIX grep has a line 36293493779Smrg # limit of 2048, but all sed's we know have understand at least 4000. 36393493779Smrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 36493493779Smrg dirpart=`AS_DIRNAME("$mf")` 36593493779Smrg else 36693493779Smrg continue 36793493779Smrg fi 36893493779Smrg # Extract the definition of DEPDIR, am__include, and am__quote 36993493779Smrg # from the Makefile without running `make'. 37093493779Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 37193493779Smrg test -z "$DEPDIR" && continue 37293493779Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 37393493779Smrg test -z "am__include" && continue 37493493779Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 37593493779Smrg # When using ansi2knr, U may be empty or an underscore; expand it 37693493779Smrg U=`sed -n 's/^U = //p' < "$mf"` 37793493779Smrg # Find all dependency output files, they are included files with 37893493779Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 37993493779Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 38093493779Smrg # expansion. 38193493779Smrg for file in `sed -n " 38293493779Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 38393493779Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 38493493779Smrg # Make sure the directory exists. 38593493779Smrg test -f "$dirpart/$file" && continue 38693493779Smrg fdir=`AS_DIRNAME(["$file"])` 38793493779Smrg AS_MKDIR_P([$dirpart/$fdir]) 38893493779Smrg # echo "creating $dirpart/$file" 38993493779Smrg echo '# dummy' > "$dirpart/$file" 39093493779Smrg done 3916c321187Smrg done 39293493779Smrg} 3936c321187Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 3946c321187Smrg 3956c321187Smrg 3966c321187Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 3976c321187Smrg# ----------------------------- 3986c321187Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 3996c321187Smrg# 4006c321187Smrg# This code is only required when automatic dependency tracking 4016c321187Smrg# is enabled. FIXME. This creates each `.P' file that we will 4026c321187Smrg# need in order to bootstrap the dependency handling code. 4036c321187SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 4046c321187Smrg[AC_CONFIG_COMMANDS([depfiles], 4056c321187Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 4066c321187Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 4076c321187Smrg]) 4086c321187Smrg 4096c321187Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 4106c321187Smrg# Free Software Foundation, Inc. 4116c321187Smrg# 4126c321187Smrg# This file is free software; the Free Software Foundation 4136c321187Smrg# gives unlimited permission to copy and/or distribute it, 4146c321187Smrg# with or without modifications, as long as this notice is preserved. 4156c321187Smrg 4166c321187Smrg# serial 8 4176c321187Smrg 4186c321187Smrg# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 4196c321187SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 4206c321187Smrg 4216c321187Smrg# Do all the work for Automake. -*- Autoconf -*- 4226c321187Smrg 4236c321187Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 42493493779Smrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 4256c321187Smrg# 4266c321187Smrg# This file is free software; the Free Software Foundation 4276c321187Smrg# gives unlimited permission to copy and/or distribute it, 4286c321187Smrg# with or without modifications, as long as this notice is preserved. 4296c321187Smrg 43093493779Smrg# serial 16 4316c321187Smrg 4326c321187Smrg# This macro actually does too much. Some checks are only needed if 4336c321187Smrg# your package does certain things. But this isn't really a big deal. 4346c321187Smrg 4356c321187Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 4366c321187Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 4376c321187Smrg# ----------------------------------------------- 4386c321187Smrg# The call with PACKAGE and VERSION arguments is the old style 4396c321187Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 4406c321187Smrg# and VERSION should now be passed to AC_INIT and removed from 4416c321187Smrg# the call to AM_INIT_AUTOMAKE. 4426c321187Smrg# We support both call styles for the transition. After 4436c321187Smrg# the next Automake release, Autoconf can make the AC_INIT 4446c321187Smrg# arguments mandatory, and then we can depend on a new Autoconf 4456c321187Smrg# release and drop the old call support. 4466c321187SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 44793493779Smrg[AC_PREREQ([2.62])dnl 4486c321187Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 4496c321187Smrgdnl the ones we care about. 4506c321187Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 4516c321187SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 4526c321187SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 4536c321187Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 4546c321187Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 4556c321187Smrg # is not polluted with repeated "-I." 4566c321187Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 4576c321187Smrg # test to see if srcdir already configured 4586c321187Smrg if test -f $srcdir/config.status; then 4596c321187Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 4606c321187Smrg fi 4616c321187Smrgfi 4626c321187Smrg 4636c321187Smrg# test whether we have cygpath 4646c321187Smrgif test -z "$CYGPATH_W"; then 4656c321187Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 4666c321187Smrg CYGPATH_W='cygpath -w' 4676c321187Smrg else 4686c321187Smrg CYGPATH_W=echo 4696c321187Smrg fi 4706c321187Smrgfi 4716c321187SmrgAC_SUBST([CYGPATH_W]) 4726c321187Smrg 4736c321187Smrg# Define the identity of the package. 4746c321187Smrgdnl Distinguish between old-style and new-style calls. 4756c321187Smrgm4_ifval([$2], 4766c321187Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 4776c321187Smrg AC_SUBST([PACKAGE], [$1])dnl 4786c321187Smrg AC_SUBST([VERSION], [$2])], 4796c321187Smrg[_AM_SET_OPTIONS([$1])dnl 4806c321187Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 4816c321187Smrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 4826c321187Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 4836c321187Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 4846c321187Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 4856c321187Smrg 4866c321187Smrg_AM_IF_OPTION([no-define],, 4876c321187Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 4886c321187Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 4896c321187Smrg 4906c321187Smrg# Some tools Automake needs. 4916c321187SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 4926c321187SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 4936c321187SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 4946c321187SmrgAM_MISSING_PROG(AUTOCONF, autoconf) 4956c321187SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 4966c321187SmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 4976c321187SmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 49893493779SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 49993493779SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 5006c321187SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 5016c321187Smrg# We need awk for the "check" target. The system "awk" is bad on 5026c321187Smrg# some platforms. 5036c321187SmrgAC_REQUIRE([AC_PROG_AWK])dnl 5046c321187SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 5056c321187SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 5066c321187Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 50793493779Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 50893493779Smrg [_AM_PROG_TAR([v7])])]) 5096c321187Smrg_AM_IF_OPTION([no-dependencies],, 5106c321187Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 51193493779Smrg [_AM_DEPENDENCIES(CC)], 51293493779Smrg [define([AC_PROG_CC], 51393493779Smrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 5146c321187SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 51593493779Smrg [_AM_DEPENDENCIES(CXX)], 51693493779Smrg [define([AC_PROG_CXX], 51793493779Smrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 5186c321187SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 51993493779Smrg [_AM_DEPENDENCIES(OBJC)], 52093493779Smrg [define([AC_PROG_OBJC], 52193493779Smrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 5226c321187Smrg]) 52393493779Smrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 52493493779Smrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the 52593493779Smrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 52693493779Smrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 52793493779SmrgAC_CONFIG_COMMANDS_PRE(dnl 52893493779Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 52993493779Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 5306c321187Smrg]) 5316c321187Smrg 53293493779Smrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 53393493779Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 53493493779Smrgdnl mangled by Autoconf and run in a shell conditional statement. 53593493779Smrgm4_define([_AC_COMPILER_EXEEXT], 53693493779Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 53793493779Smrg 5386c321187Smrg 5396c321187Smrg# When config.status generates a header, we must update the stamp-h file. 5406c321187Smrg# This file resides in the same directory as the config header 5416c321187Smrg# that is generated. The stamp files are numbered to have different names. 5426c321187Smrg 5436c321187Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 5446c321187Smrg# loop where config.status creates the headers, so we can generate 5456c321187Smrg# our stamp files there. 5466c321187SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 5476c321187Smrg[# Compute $1's index in $config_headers. 54893493779Smrg_am_arg=$1 5496c321187Smrg_am_stamp_count=1 5506c321187Smrgfor _am_header in $config_headers :; do 5516c321187Smrg case $_am_header in 55293493779Smrg $_am_arg | $_am_arg:* ) 5536c321187Smrg break ;; 5546c321187Smrg * ) 5556c321187Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 5566c321187Smrg esac 5576c321187Smrgdone 55893493779Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 5596c321187Smrg 56093493779Smrg# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. 5616c321187Smrg# 5626c321187Smrg# This file is free software; the Free Software Foundation 5636c321187Smrg# gives unlimited permission to copy and/or distribute it, 5646c321187Smrg# with or without modifications, as long as this notice is preserved. 5656c321187Smrg 5666c321187Smrg# AM_PROG_INSTALL_SH 5676c321187Smrg# ------------------ 5686c321187Smrg# Define $install_sh. 5696c321187SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 5706c321187Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 57193493779Smrgif test x"${install_sh}" != xset; then 57293493779Smrg case $am_aux_dir in 57393493779Smrg *\ * | *\ *) 57493493779Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 57593493779Smrg *) 57693493779Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 57793493779Smrg esac 57893493779Smrgfi 5796c321187SmrgAC_SUBST(install_sh)]) 5806c321187Smrg 5816c321187Smrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 5826c321187Smrg# 5836c321187Smrg# This file is free software; the Free Software Foundation 5846c321187Smrg# gives unlimited permission to copy and/or distribute it, 5856c321187Smrg# with or without modifications, as long as this notice is preserved. 5866c321187Smrg 5876c321187Smrg# serial 2 5886c321187Smrg 5896c321187Smrg# Check whether the underlying file-system supports filenames 5906c321187Smrg# with a leading dot. For instance MS-DOS doesn't. 5916c321187SmrgAC_DEFUN([AM_SET_LEADING_DOT], 5926c321187Smrg[rm -rf .tst 2>/dev/null 5936c321187Smrgmkdir .tst 2>/dev/null 5946c321187Smrgif test -d .tst; then 5956c321187Smrg am__leading_dot=. 5966c321187Smrgelse 5976c321187Smrg am__leading_dot=_ 5986c321187Smrgfi 5996c321187Smrgrmdir .tst 2>/dev/null 6006c321187SmrgAC_SUBST([am__leading_dot])]) 6016c321187Smrg 6026c321187Smrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 6036c321187Smrg# From Jim Meyering 6046c321187Smrg 60593493779Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 6066c321187Smrg# Free Software Foundation, Inc. 6076c321187Smrg# 6086c321187Smrg# This file is free software; the Free Software Foundation 6096c321187Smrg# gives unlimited permission to copy and/or distribute it, 6106c321187Smrg# with or without modifications, as long as this notice is preserved. 6116c321187Smrg 61293493779Smrg# serial 5 6136c321187Smrg 61493493779Smrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 61593493779Smrg# ---------------------------------- 61693493779Smrg# Control maintainer-specific portions of Makefiles. 61793493779Smrg# Default is to disable them, unless `enable' is passed literally. 61893493779Smrg# For symmetry, `disable' may be passed as well. Anyway, the user 61993493779Smrg# can override the default with the --enable/--disable switch. 6206c321187SmrgAC_DEFUN([AM_MAINTAINER_MODE], 62193493779Smrg[m4_case(m4_default([$1], [disable]), 62293493779Smrg [enable], [m4_define([am_maintainer_other], [disable])], 62393493779Smrg [disable], [m4_define([am_maintainer_other], [enable])], 62493493779Smrg [m4_define([am_maintainer_other], [enable]) 62593493779Smrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 62693493779SmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) 62793493779Smrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 62893493779Smrg AC_ARG_ENABLE([maintainer-mode], 62993493779Smrg[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful 6306c321187Smrg (and sometimes confusing) to the casual installer], 63193493779Smrg [USE_MAINTAINER_MODE=$enableval], 63293493779Smrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 6336c321187Smrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 63493493779Smrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 6356c321187Smrg MAINT=$MAINTAINER_MODE_TRUE 63693493779Smrg AC_SUBST([MAINT])dnl 6376c321187Smrg] 6386c321187Smrg) 6396c321187Smrg 6406c321187SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 6416c321187Smrg 6426c321187Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 6436c321187Smrg 64493493779Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 6456c321187Smrg# 6466c321187Smrg# This file is free software; the Free Software Foundation 6476c321187Smrg# gives unlimited permission to copy and/or distribute it, 6486c321187Smrg# with or without modifications, as long as this notice is preserved. 6496c321187Smrg 65093493779Smrg# serial 4 6516c321187Smrg 6526c321187Smrg# AM_MAKE_INCLUDE() 6536c321187Smrg# ----------------- 6546c321187Smrg# Check to see how make treats includes. 6556c321187SmrgAC_DEFUN([AM_MAKE_INCLUDE], 6566c321187Smrg[am_make=${MAKE-make} 6576c321187Smrgcat > confinc << 'END' 6586c321187Smrgam__doit: 65993493779Smrg @echo this is the am__doit target 6606c321187Smrg.PHONY: am__doit 6616c321187SmrgEND 6626c321187Smrg# If we don't find an include directive, just comment out the code. 6636c321187SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 6646c321187Smrgam__include="#" 6656c321187Smrgam__quote= 6666c321187Smrg_am_result=none 6676c321187Smrg# First try GNU make style include. 6686c321187Smrgecho "include confinc" > confmf 66993493779Smrg# Ignore all kinds of additional output from `make'. 67093493779Smrgcase `$am_make -s -f confmf 2> /dev/null` in #( 67193493779Smrg*the\ am__doit\ target*) 67293493779Smrg am__include=include 67393493779Smrg am__quote= 67493493779Smrg _am_result=GNU 67593493779Smrg ;; 67693493779Smrgesac 6776c321187Smrg# Now try BSD make style include. 6786c321187Smrgif test "$am__include" = "#"; then 6796c321187Smrg echo '.include "confinc"' > confmf 68093493779Smrg case `$am_make -s -f confmf 2> /dev/null` in #( 68193493779Smrg *the\ am__doit\ target*) 68293493779Smrg am__include=.include 68393493779Smrg am__quote="\"" 68493493779Smrg _am_result=BSD 68593493779Smrg ;; 68693493779Smrg esac 6876c321187Smrgfi 6886c321187SmrgAC_SUBST([am__include]) 6896c321187SmrgAC_SUBST([am__quote]) 6906c321187SmrgAC_MSG_RESULT([$_am_result]) 6916c321187Smrgrm -f confinc confmf 6926c321187Smrg]) 6936c321187Smrg 6946c321187Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 6956c321187Smrg 69693493779Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 6976c321187Smrg# Free Software Foundation, Inc. 6986c321187Smrg# 6996c321187Smrg# This file is free software; the Free Software Foundation 7006c321187Smrg# gives unlimited permission to copy and/or distribute it, 7016c321187Smrg# with or without modifications, as long as this notice is preserved. 7026c321187Smrg 70393493779Smrg# serial 6 7046c321187Smrg 7056c321187Smrg# AM_MISSING_PROG(NAME, PROGRAM) 7066c321187Smrg# ------------------------------ 7076c321187SmrgAC_DEFUN([AM_MISSING_PROG], 7086c321187Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 7096c321187Smrg$1=${$1-"${am_missing_run}$2"} 7106c321187SmrgAC_SUBST($1)]) 7116c321187Smrg 7126c321187Smrg 7136c321187Smrg# AM_MISSING_HAS_RUN 7146c321187Smrg# ------------------ 7156c321187Smrg# Define MISSING if not defined so far and test if it supports --run. 7166c321187Smrg# If it does, set am_missing_run to use it, otherwise, to nothing. 7176c321187SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 7186c321187Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 7196c321187SmrgAC_REQUIRE_AUX_FILE([missing])dnl 72093493779Smrgif test x"${MISSING+set}" != xset; then 72193493779Smrg case $am_aux_dir in 72293493779Smrg *\ * | *\ *) 72393493779Smrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 72493493779Smrg *) 72593493779Smrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 72693493779Smrg esac 72793493779Smrgfi 7286c321187Smrg# Use eval to expand $SHELL 7296c321187Smrgif eval "$MISSING --run true"; then 7306c321187Smrg am_missing_run="$MISSING --run " 7316c321187Smrgelse 7326c321187Smrg am_missing_run= 7336c321187Smrg AC_MSG_WARN([`missing' script is too old or missing]) 7346c321187Smrgfi 7356c321187Smrg]) 7366c321187Smrg 7376c321187Smrg# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 7386c321187Smrg# 7396c321187Smrg# This file is free software; the Free Software Foundation 7406c321187Smrg# gives unlimited permission to copy and/or distribute it, 7416c321187Smrg# with or without modifications, as long as this notice is preserved. 7426c321187Smrg 7436c321187Smrg# AM_PROG_MKDIR_P 7446c321187Smrg# --------------- 7456c321187Smrg# Check for `mkdir -p'. 7466c321187SmrgAC_DEFUN([AM_PROG_MKDIR_P], 7476c321187Smrg[AC_PREREQ([2.60])dnl 7486c321187SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 7496c321187Smrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 7506c321187Smrgdnl while keeping a definition of mkdir_p for backward compatibility. 7516c321187Smrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 7526c321187Smrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 7536c321187Smrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 7546c321187Smrgdnl adjustment using top_builddir (which is defined more often than 7556c321187Smrgdnl MKDIR_P). 7566c321187SmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 7576c321187Smrgcase $mkdir_p in 7586c321187Smrg [[\\/$]]* | ?:[[\\/]]*) ;; 7596c321187Smrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 7606c321187Smrgesac 7616c321187Smrg]) 7626c321187Smrg 7636c321187Smrg# Helper functions for option handling. -*- Autoconf -*- 7646c321187Smrg 76593493779Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. 7666c321187Smrg# 7676c321187Smrg# This file is free software; the Free Software Foundation 7686c321187Smrg# gives unlimited permission to copy and/or distribute it, 7696c321187Smrg# with or without modifications, as long as this notice is preserved. 7706c321187Smrg 77193493779Smrg# serial 4 7726c321187Smrg 7736c321187Smrg# _AM_MANGLE_OPTION(NAME) 7746c321187Smrg# ----------------------- 7756c321187SmrgAC_DEFUN([_AM_MANGLE_OPTION], 7766c321187Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 7776c321187Smrg 7786c321187Smrg# _AM_SET_OPTION(NAME) 7796c321187Smrg# ------------------------------ 7806c321187Smrg# Set option NAME. Presently that only means defining a flag for this option. 7816c321187SmrgAC_DEFUN([_AM_SET_OPTION], 7826c321187Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 7836c321187Smrg 7846c321187Smrg# _AM_SET_OPTIONS(OPTIONS) 7856c321187Smrg# ---------------------------------- 7866c321187Smrg# OPTIONS is a space-separated list of Automake options. 7876c321187SmrgAC_DEFUN([_AM_SET_OPTIONS], 78893493779Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 7896c321187Smrg 7906c321187Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 7916c321187Smrg# ------------------------------------------- 7926c321187Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 7936c321187SmrgAC_DEFUN([_AM_IF_OPTION], 7946c321187Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 7956c321187Smrg 7966c321187Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 7976c321187Smrg 79893493779Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 7996c321187Smrg# Free Software Foundation, Inc. 8006c321187Smrg# 8016c321187Smrg# This file is free software; the Free Software Foundation 8026c321187Smrg# gives unlimited permission to copy and/or distribute it, 8036c321187Smrg# with or without modifications, as long as this notice is preserved. 8046c321187Smrg 80593493779Smrg# serial 5 8066c321187Smrg 8076c321187Smrg# AM_SANITY_CHECK 8086c321187Smrg# --------------- 8096c321187SmrgAC_DEFUN([AM_SANITY_CHECK], 8106c321187Smrg[AC_MSG_CHECKING([whether build environment is sane]) 8116c321187Smrg# Just in case 8126c321187Smrgsleep 1 8136c321187Smrgecho timestamp > conftest.file 81493493779Smrg# Reject unsafe characters in $srcdir or the absolute working directory 81593493779Smrg# name. Accept space and tab only in the latter. 81693493779Smrgam_lf=' 81793493779Smrg' 81893493779Smrgcase `pwd` in 81993493779Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 82093493779Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 82193493779Smrgesac 82293493779Smrgcase $srcdir in 82393493779Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 82493493779Smrg AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 82593493779Smrgesac 82693493779Smrg 8276c321187Smrg# Do `set' in a subshell so we don't clobber the current shell's 8286c321187Smrg# arguments. Must try -L first in case configure is actually a 8296c321187Smrg# symlink; some systems play weird games with the mod time of symlinks 8306c321187Smrg# (eg FreeBSD returns the mod time of the symlink's containing 8316c321187Smrg# directory). 8326c321187Smrgif ( 83393493779Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 8346c321187Smrg if test "$[*]" = "X"; then 8356c321187Smrg # -L didn't work. 83693493779Smrg set X `ls -t "$srcdir/configure" conftest.file` 8376c321187Smrg fi 8386c321187Smrg rm -f conftest.file 8396c321187Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 8406c321187Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 8416c321187Smrg 8426c321187Smrg # If neither matched, then we have a broken ls. This can happen 8436c321187Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 8446c321187Smrg # broken ls alias from the environment. This has actually 8456c321187Smrg # happened. Such a system could not be considered "sane". 8466c321187Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 8476c321187Smrgalias in your environment]) 8486c321187Smrg fi 8496c321187Smrg 8506c321187Smrg test "$[2]" = conftest.file 8516c321187Smrg ) 8526c321187Smrgthen 8536c321187Smrg # Ok. 8546c321187Smrg : 8556c321187Smrgelse 8566c321187Smrg AC_MSG_ERROR([newly created file is older than distributed files! 8576c321187SmrgCheck your system clock]) 8586c321187Smrgfi 8596c321187SmrgAC_MSG_RESULT(yes)]) 8606c321187Smrg 86193493779Smrg# Copyright (C) 2009 Free Software Foundation, Inc. 86293493779Smrg# 86393493779Smrg# This file is free software; the Free Software Foundation 86493493779Smrg# gives unlimited permission to copy and/or distribute it, 86593493779Smrg# with or without modifications, as long as this notice is preserved. 86693493779Smrg 86793493779Smrg# serial 1 86893493779Smrg 86993493779Smrg# AM_SILENT_RULES([DEFAULT]) 87093493779Smrg# -------------------------- 87193493779Smrg# Enable less verbose build rules; with the default set to DEFAULT 87293493779Smrg# (`yes' being less verbose, `no' or empty being verbose). 87393493779SmrgAC_DEFUN([AM_SILENT_RULES], 87493493779Smrg[AC_ARG_ENABLE([silent-rules], 87593493779Smrg[ --enable-silent-rules less verbose build output (undo: `make V=1') 87693493779Smrg --disable-silent-rules verbose build output (undo: `make V=0')]) 87793493779Smrgcase $enable_silent_rules in 87893493779Smrgyes) AM_DEFAULT_VERBOSITY=0;; 87993493779Smrgno) AM_DEFAULT_VERBOSITY=1;; 88093493779Smrg*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 88193493779Smrgesac 88293493779SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 88393493779SmrgAM_BACKSLASH='\' 88493493779SmrgAC_SUBST([AM_BACKSLASH])dnl 88593493779Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 88693493779Smrg]) 88793493779Smrg 8886c321187Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 8896c321187Smrg# 8906c321187Smrg# This file is free software; the Free Software Foundation 8916c321187Smrg# gives unlimited permission to copy and/or distribute it, 8926c321187Smrg# with or without modifications, as long as this notice is preserved. 8936c321187Smrg 8946c321187Smrg# AM_PROG_INSTALL_STRIP 8956c321187Smrg# --------------------- 8966c321187Smrg# One issue with vendor `install' (even GNU) is that you can't 8976c321187Smrg# specify the program used to strip binaries. This is especially 8986c321187Smrg# annoying in cross-compiling environments, where the build's strip 8996c321187Smrg# is unlikely to handle the host's binaries. 9006c321187Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 9016c321187Smrg# always use install-sh in `make install-strip', and initialize 9026c321187Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 9036c321187SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 9046c321187Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 9056c321187Smrg# Installed binaries are usually stripped using `strip' when the user 9066c321187Smrg# run `make install-strip'. However `strip' might not be the right 9076c321187Smrg# tool to use in cross-compilation environments, therefore Automake 9086c321187Smrg# will honor the `STRIP' environment variable to overrule this program. 9096c321187Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 9106c321187Smrgif test "$cross_compiling" != no; then 9116c321187Smrg AC_CHECK_TOOL([STRIP], [strip], :) 9126c321187Smrgfi 9136c321187SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 9146c321187SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 9156c321187Smrg 91693493779Smrg# Copyright (C) 2006, 2008 Free Software Foundation, Inc. 9176c321187Smrg# 9186c321187Smrg# This file is free software; the Free Software Foundation 9196c321187Smrg# gives unlimited permission to copy and/or distribute it, 9206c321187Smrg# with or without modifications, as long as this notice is preserved. 9216c321187Smrg 92293493779Smrg# serial 2 92393493779Smrg 9246c321187Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 9256c321187Smrg# --------------------------- 92693493779Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 9276c321187Smrg# This macro is traced by Automake. 9286c321187SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 9296c321187Smrg 93093493779Smrg# AM_SUBST_NOTMAKE(VARIABLE) 93193493779Smrg# --------------------------- 93293493779Smrg# Public sister of _AM_SUBST_NOTMAKE. 93393493779SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 93493493779Smrg 9356c321187Smrg# Check how to create a tarball. -*- Autoconf -*- 9366c321187Smrg 9376c321187Smrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 9386c321187Smrg# 9396c321187Smrg# This file is free software; the Free Software Foundation 9406c321187Smrg# gives unlimited permission to copy and/or distribute it, 9416c321187Smrg# with or without modifications, as long as this notice is preserved. 9426c321187Smrg 9436c321187Smrg# serial 2 9446c321187Smrg 9456c321187Smrg# _AM_PROG_TAR(FORMAT) 9466c321187Smrg# -------------------- 9476c321187Smrg# Check how to create a tarball in format FORMAT. 9486c321187Smrg# FORMAT should be one of `v7', `ustar', or `pax'. 9496c321187Smrg# 9506c321187Smrg# Substitute a variable $(am__tar) that is a command 9516c321187Smrg# writing to stdout a FORMAT-tarball containing the directory 9526c321187Smrg# $tardir. 9536c321187Smrg# tardir=directory && $(am__tar) > result.tar 9546c321187Smrg# 9556c321187Smrg# Substitute a variable $(am__untar) that extract such 9566c321187Smrg# a tarball read from stdin. 9576c321187Smrg# $(am__untar) < result.tar 9586c321187SmrgAC_DEFUN([_AM_PROG_TAR], 9596c321187Smrg[# Always define AMTAR for backward compatibility. 9606c321187SmrgAM_MISSING_PROG([AMTAR], [tar]) 9616c321187Smrgm4_if([$1], [v7], 9626c321187Smrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 9636c321187Smrg [m4_case([$1], [ustar],, [pax],, 9646c321187Smrg [m4_fatal([Unknown tar format])]) 9656c321187SmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 9666c321187Smrg# Loop over all known methods to create a tar archive until one works. 9676c321187Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 9686c321187Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 9696c321187Smrg# Do not fold the above two line into one, because Tru64 sh and 9706c321187Smrg# Solaris sh will not grok spaces in the rhs of `-'. 9716c321187Smrgfor _am_tool in $_am_tools 9726c321187Smrgdo 9736c321187Smrg case $_am_tool in 9746c321187Smrg gnutar) 9756c321187Smrg for _am_tar in tar gnutar gtar; 9766c321187Smrg do 9776c321187Smrg AM_RUN_LOG([$_am_tar --version]) && break 9786c321187Smrg done 9796c321187Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 9806c321187Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 9816c321187Smrg am__untar="$_am_tar -xf -" 9826c321187Smrg ;; 9836c321187Smrg plaintar) 9846c321187Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 9856c321187Smrg # ustar tarball either. 9866c321187Smrg (tar --version) >/dev/null 2>&1 && continue 9876c321187Smrg am__tar='tar chf - "$$tardir"' 9886c321187Smrg am__tar_='tar chf - "$tardir"' 9896c321187Smrg am__untar='tar xf -' 9906c321187Smrg ;; 9916c321187Smrg pax) 9926c321187Smrg am__tar='pax -L -x $1 -w "$$tardir"' 9936c321187Smrg am__tar_='pax -L -x $1 -w "$tardir"' 9946c321187Smrg am__untar='pax -r' 9956c321187Smrg ;; 9966c321187Smrg cpio) 9976c321187Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 9986c321187Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 9996c321187Smrg am__untar='cpio -i -H $1 -d' 10006c321187Smrg ;; 10016c321187Smrg none) 10026c321187Smrg am__tar=false 10036c321187Smrg am__tar_=false 10046c321187Smrg am__untar=false 10056c321187Smrg ;; 10066c321187Smrg esac 10076c321187Smrg 10086c321187Smrg # If the value was cached, stop now. We just wanted to have am__tar 10096c321187Smrg # and am__untar set. 10106c321187Smrg test -n "${am_cv_prog_tar_$1}" && break 10116c321187Smrg 10126c321187Smrg # tar/untar a dummy directory, and stop if the command works 10136c321187Smrg rm -rf conftest.dir 10146c321187Smrg mkdir conftest.dir 10156c321187Smrg echo GrepMe > conftest.dir/file 10166c321187Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 10176c321187Smrg rm -rf conftest.dir 10186c321187Smrg if test -s conftest.tar; then 10196c321187Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 10206c321187Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 10216c321187Smrg fi 10226c321187Smrgdone 10236c321187Smrgrm -rf conftest.dir 10246c321187Smrg 10256c321187SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 10266c321187SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 10276c321187SmrgAC_SUBST([am__tar]) 10286c321187SmrgAC_SUBST([am__untar]) 10296c321187Smrg]) # _AM_PROG_TAR 10306c321187Smrg 103193493779Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 10326c321187Smrgdnl 1033e120bd27Smrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 10346c321187Smrgdnl 10356c321187Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 1036e120bd27Smrgdnl copy of this software and associated documentation files (the "Software"), 1037e120bd27Smrgdnl to deal in the Software without restriction, including without limitation 1038e120bd27Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 1039e120bd27Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 1040e120bd27Smrgdnl Software is furnished to do so, subject to the following conditions: 10416c321187Smrgdnl 1042e120bd27Smrgdnl The above copyright notice and this permission notice (including the next 1043e120bd27Smrgdnl paragraph) shall be included in all copies or substantial portions of the 1044e120bd27Smrgdnl Software. 10456c321187Smrgdnl 1046e120bd27Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1047e120bd27Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1048e120bd27Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 1049e120bd27Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 1050e120bd27Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 1051e120bd27Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 1052e120bd27Smrgdnl DEALINGS IN THE SOFTWARE. 10536c321187Smrg 10546c321187Smrg# XORG_MACROS_VERSION(required-version) 10556c321187Smrg# ------------------------------------- 10566c321187Smrg# Minimum version: 1.1.0 10576c321187Smrg# 10586c321187Smrg# If you're using a macro added in Version 1.1 or newer, include this in 10596c321187Smrg# your configure.ac with the minimum required version, such as: 10606c321187Smrg# XORG_MACROS_VERSION(1.1) 10616c321187Smrg# 106293493779Smrg# To ensure that this macro is defined, also add: 106393493779Smrg# m4_ifndef([XORG_MACROS_VERSION], 106493493779Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 10656c321187Smrg# 10666c321187Smrg# 10676c321187Smrg# See the "minimum version" comment for each macro you use to see what 10686c321187Smrg# version you require. 106993493779Smrgm4_defun([XORG_MACROS_VERSION],[ 1070e120bd27Smrgm4_define([vers_have], [1.10.1]) 107193493779Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 107293493779Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 107393493779Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 107493493779Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 107593493779Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 107693493779Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 107793493779Smrgm4_undefine([vers_have]) 107893493779Smrgm4_undefine([maj_have]) 107993493779Smrgm4_undefine([maj_needed]) 10806c321187Smrg]) # XORG_MACROS_VERSION 10816c321187Smrg 10826c321187Smrg# XORG_PROG_RAWCPP() 10836c321187Smrg# ------------------ 10846c321187Smrg# Minimum version: 1.0.0 10856c321187Smrg# 10866c321187Smrg# Find cpp program and necessary flags for use in pre-processing text files 10876c321187Smrg# such as man pages and config files 10886c321187SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 10896c321187SmrgAC_REQUIRE([AC_PROG_CPP]) 10906c321187SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 10916c321187Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 10926c321187Smrg 10936c321187Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 10946c321187Smrg# which is not the best choice for supporting other OS'es, but covers most 10956c321187Smrg# of the ones we need for now. 10966c321187SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 10976c321187SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 10986c321187Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 10996c321187Smrg AC_MSG_RESULT([no]) 11006c321187Smrgelse 11016c321187Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 11026c321187Smrg RAWCPPFLAGS=-undef 11036c321187Smrg AC_MSG_RESULT([yes]) 110493493779Smrg # under Cygwin unix is still defined even with -undef 110593493779Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 110693493779Smrg RAWCPPFLAGS="-undef -ansi" 110793493779Smrg AC_MSG_RESULT([yes, with -ansi]) 11086c321187Smrg else 11096c321187Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 11106c321187Smrg fi 11116c321187Smrgfi 11126c321187Smrgrm -f conftest.$ac_ext 11136c321187Smrg 11146c321187SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 11156c321187SmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 11166c321187Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 11176c321187Smrg AC_MSG_RESULT([no]) 11186c321187Smrgelse 11196c321187Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 11206c321187Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 11216c321187Smrg AC_MSG_RESULT([yes]) 11226c321187Smrg else 11236c321187Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 11246c321187Smrg fi 11256c321187Smrgfi 11266c321187Smrgrm -f conftest.$ac_ext 11276c321187SmrgAC_SUBST(RAWCPPFLAGS) 11286c321187Smrg]) # XORG_PROG_RAWCPP 11296c321187Smrg 11306c321187Smrg# XORG_MANPAGE_SECTIONS() 11316c321187Smrg# ----------------------- 11326c321187Smrg# Minimum version: 1.0.0 11336c321187Smrg# 11346c321187Smrg# Determine which sections man pages go in for the different man page types 11356c321187Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 11366c321187Smrg# Not sure if there's any better way than just hardcoding by OS name. 11376c321187Smrg# Override default settings by setting environment variables 1138e120bd27Smrg# Added MAN_SUBSTS in version 1.8 1139e120bd27Smrg# Added AC_PROG_SED in version 1.8 11406c321187Smrg 11416c321187SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 11426c321187SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 1143e120bd27SmrgAC_REQUIRE([AC_PROG_SED]) 11446c321187Smrg 11456c321187Smrgif test x$APP_MAN_SUFFIX = x ; then 11466c321187Smrg APP_MAN_SUFFIX=1 11476c321187Smrgfi 11486c321187Smrgif test x$APP_MAN_DIR = x ; then 11496c321187Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 11506c321187Smrgfi 11516c321187Smrg 11526c321187Smrgif test x$LIB_MAN_SUFFIX = x ; then 11536c321187Smrg LIB_MAN_SUFFIX=3 11546c321187Smrgfi 11556c321187Smrgif test x$LIB_MAN_DIR = x ; then 11566c321187Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 11576c321187Smrgfi 11586c321187Smrg 11596c321187Smrgif test x$FILE_MAN_SUFFIX = x ; then 11606c321187Smrg case $host_os in 11616c321187Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 11626c321187Smrg *) FILE_MAN_SUFFIX=5 ;; 11636c321187Smrg esac 11646c321187Smrgfi 11656c321187Smrgif test x$FILE_MAN_DIR = x ; then 11666c321187Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 11676c321187Smrgfi 11686c321187Smrg 11696c321187Smrgif test x$MISC_MAN_SUFFIX = x ; then 11706c321187Smrg case $host_os in 11716c321187Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 11726c321187Smrg *) MISC_MAN_SUFFIX=7 ;; 11736c321187Smrg esac 11746c321187Smrgfi 11756c321187Smrgif test x$MISC_MAN_DIR = x ; then 11766c321187Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 11776c321187Smrgfi 11786c321187Smrg 11796c321187Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 11806c321187Smrg case $host_os in 11816c321187Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 11826c321187Smrg *) DRIVER_MAN_SUFFIX=4 ;; 11836c321187Smrg esac 11846c321187Smrgfi 11856c321187Smrgif test x$DRIVER_MAN_DIR = x ; then 11866c321187Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 11876c321187Smrgfi 11886c321187Smrg 11896c321187Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 11906c321187Smrg case $host_os in 11916c321187Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 11926c321187Smrg *) ADMIN_MAN_SUFFIX=8 ;; 11936c321187Smrg esac 11946c321187Smrgfi 11956c321187Smrgif test x$ADMIN_MAN_DIR = x ; then 11966c321187Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 11976c321187Smrgfi 11986c321187Smrg 11996c321187Smrg 12006c321187SmrgAC_SUBST([APP_MAN_SUFFIX]) 12016c321187SmrgAC_SUBST([LIB_MAN_SUFFIX]) 12026c321187SmrgAC_SUBST([FILE_MAN_SUFFIX]) 12036c321187SmrgAC_SUBST([MISC_MAN_SUFFIX]) 12046c321187SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 12056c321187SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 12066c321187SmrgAC_SUBST([APP_MAN_DIR]) 12076c321187SmrgAC_SUBST([LIB_MAN_DIR]) 12086c321187SmrgAC_SUBST([FILE_MAN_DIR]) 12096c321187SmrgAC_SUBST([MISC_MAN_DIR]) 12106c321187SmrgAC_SUBST([DRIVER_MAN_DIR]) 12116c321187SmrgAC_SUBST([ADMIN_MAN_DIR]) 1212e120bd27Smrg 1213e120bd27SmrgXORG_MAN_PAGE="X Version 11" 1214e120bd27SmrgAC_SUBST([XORG_MAN_PAGE]) 1215e120bd27SmrgMAN_SUBSTS="\ 1216e120bd27Smrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 1217e120bd27Smrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 1218e120bd27Smrg -e 's|__xservername__|Xorg|g' \ 1219e120bd27Smrg -e 's|__xconfigfile__|xorg.conf|g' \ 1220e120bd27Smrg -e 's|__projectroot__|\$(prefix)|g' \ 1221e120bd27Smrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 1222e120bd27Smrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 1223e120bd27Smrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 1224e120bd27Smrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 1225e120bd27Smrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 1226e120bd27Smrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 1227e120bd27Smrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 1228e120bd27SmrgAC_SUBST([MAN_SUBSTS]) 1229e120bd27Smrg 12306c321187Smrg]) # XORG_MANPAGE_SECTIONS 12316c321187Smrg 1232e120bd27Smrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 1233e120bd27Smrg# ------------------------ 1234e120bd27Smrg# Minimum version: 1.7.0 1235e120bd27Smrg# 1236e120bd27Smrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 1237e120bd27Smrg# provided by xorg-sgml-doctools, if installed. 1238e120bd27SmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 1239e120bd27SmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 1240e120bd27SmrgXORG_SGML_PATH= 1241e120bd27SmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 1242e120bd27Smrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 1243e120bd27Smrg [m4_ifval([$1],[:], 1244e120bd27Smrg [if test x"$cross_compiling" != x"yes" ; then 1245e120bd27Smrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 1246e120bd27Smrg [XORG_SGML_PATH=$prefix/share/sgml]) 1247e120bd27Smrg fi]) 1248e120bd27Smrg ]) 1249e120bd27Smrg 1250e120bd27Smrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 1251e120bd27Smrg# the path and the name of the doc stylesheet 1252e120bd27Smrgif test "x$XORG_SGML_PATH" != "x" ; then 1253e120bd27Smrg AC_MSG_RESULT([$XORG_SGML_PATH]) 1254e120bd27Smrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 1255e120bd27Smrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 1256e120bd27Smrgelse 1257e120bd27Smrg AC_MSG_RESULT([no]) 1258e120bd27Smrgfi 1259e120bd27Smrg 1260e120bd27SmrgAC_SUBST(XORG_SGML_PATH) 1261e120bd27SmrgAC_SUBST(STYLESHEET_SRCDIR) 1262e120bd27SmrgAC_SUBST(XSL_STYLESHEET) 1263e120bd27SmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 1264e120bd27Smrg]) # XORG_CHECK_SGML_DOCTOOLS 1265e120bd27Smrg 12666c321187Smrg# XORG_CHECK_LINUXDOC 12676c321187Smrg# ------------------- 12686c321187Smrg# Minimum version: 1.0.0 12696c321187Smrg# 12706c321187Smrg# Defines the variable MAKE_TEXT if the necessary tools and 12716c321187Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 12726c321187Smrg# Whether or not the necessary tools and files are found can be checked 12736c321187Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 12746c321187SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 1275e120bd27SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 1276e120bd27SmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 12776c321187Smrg 12786c321187SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 12796c321187Smrg 1280e120bd27SmrgAC_MSG_CHECKING([whether to build documentation]) 12816c321187Smrg 1282e120bd27Smrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 12836c321187Smrg BUILDDOC=yes 12846c321187Smrgelse 12856c321187Smrg BUILDDOC=no 12866c321187Smrgfi 12876c321187Smrg 12886c321187SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 12896c321187Smrg 12906c321187SmrgAC_MSG_RESULT([$BUILDDOC]) 12916c321187Smrg 1292e120bd27SmrgAC_MSG_CHECKING([whether to build pdf documentation]) 12936c321187Smrg 1294e120bd27Smrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 12956c321187Smrg BUILDPDFDOC=yes 12966c321187Smrgelse 12976c321187Smrg BUILDPDFDOC=no 12986c321187Smrgfi 12996c321187Smrg 13006c321187SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 13016c321187Smrg 13026c321187SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 13036c321187Smrg 1304e120bd27SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 13056c321187SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 13066c321187SmrgMAKE_PDF="$PS2PDF" 13076c321187SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 13086c321187Smrg 13096c321187SmrgAC_SUBST(MAKE_TEXT) 13106c321187SmrgAC_SUBST(MAKE_PS) 13116c321187SmrgAC_SUBST(MAKE_PDF) 13126c321187SmrgAC_SUBST(MAKE_HTML) 13136c321187Smrg]) # XORG_CHECK_LINUXDOC 13146c321187Smrg 13156c321187Smrg# XORG_CHECK_DOCBOOK 13166c321187Smrg# ------------------- 13176c321187Smrg# Minimum version: 1.0.0 13186c321187Smrg# 13196c321187Smrg# Checks for the ability to build output formats from SGML DocBook source. 13206c321187Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 13216c321187Smrg# indicates whether the necessary tools and files are found and, if set, 13226c321187Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 13236c321187SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 1324e120bd27SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 1325e120bd27Smrg 13266c321187SmrgBUILDTXTDOC=no 13276c321187SmrgBUILDPDFDOC=no 13286c321187SmrgBUILDPSDOC=no 13296c321187SmrgBUILDHTMLDOC=no 13306c321187Smrg 13316c321187SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 13326c321187SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 13336c321187SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 13346c321187SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 13356c321187Smrg 1336e120bd27SmrgAC_MSG_CHECKING([whether to build text documentation]) 1337e120bd27Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 13386c321187Smrg test x$BUILD_TXTDOC != xno; then 13396c321187Smrg BUILDTXTDOC=yes 13406c321187Smrgfi 13416c321187SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 13426c321187SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 13436c321187Smrg 1344e120bd27SmrgAC_MSG_CHECKING([whether to build PDF documentation]) 1345e120bd27Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 13466c321187Smrg test x$BUILD_PDFDOC != xno; then 13476c321187Smrg BUILDPDFDOC=yes 13486c321187Smrgfi 13496c321187SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 13506c321187SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 13516c321187Smrg 1352e120bd27SmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 1353e120bd27Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 13546c321187Smrg test x$BUILD_PSDOC != xno; then 13556c321187Smrg BUILDPSDOC=yes 13566c321187Smrgfi 13576c321187SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 13586c321187SmrgAC_MSG_RESULT([$BUILDPSDOC]) 13596c321187Smrg 1360e120bd27SmrgAC_MSG_CHECKING([whether to build HTML documentation]) 1361e120bd27Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 13626c321187Smrg test x$BUILD_HTMLDOC != xno; then 13636c321187Smrg BUILDHTMLDOC=yes 13646c321187Smrgfi 13656c321187SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 13666c321187SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 13676c321187Smrg 13686c321187SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 13696c321187SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 13706c321187SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 13716c321187SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 13726c321187Smrg 13736c321187SmrgAC_SUBST(MAKE_TEXT) 13746c321187SmrgAC_SUBST(MAKE_PS) 13756c321187SmrgAC_SUBST(MAKE_PDF) 13766c321187SmrgAC_SUBST(MAKE_HTML) 13776c321187Smrg]) # XORG_CHECK_DOCBOOK 13786c321187Smrg 1379e120bd27Smrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 1380e120bd27Smrg# ---------------- 1381e120bd27Smrg# Minimum version: 1.5.0 1382e120bd27Smrg# 1383e120bd27Smrg# Documentation tools are not always available on all platforms and sometimes 1384e120bd27Smrg# not at the appropriate level. This macro enables a module to test for the 1385e120bd27Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1386e120bd27Smrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 1387e120bd27Smrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 1388e120bd27Smrg# --with-xmlto assumes 'auto'. 1389e120bd27Smrg# 1390e120bd27Smrg# Interface to module: 1391e120bd27Smrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 1392e120bd27Smrg# XMLTO: returns the path of the xmlto program found 1393e120bd27Smrg# returns the path set by the user in the environment 1394e120bd27Smrg# --with-xmlto: 'yes' user instructs the module to use xmlto 1395e120bd27Smrg# 'no' user instructs the module not to use xmlto 1396e120bd27Smrg# 1397e120bd27Smrg# Added in version 1.10.0 1398e120bd27Smrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 1399e120bd27Smrg# xmlto for text output requires either lynx, links, or w3m browsers 1400e120bd27Smrg# 1401e120bd27Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 1402e120bd27Smrg# 1403e120bd27SmrgAC_DEFUN([XORG_WITH_XMLTO],[ 1404e120bd27SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 1405e120bd27Smrgm4_define([_defopt], m4_default([$2], [auto])) 1406e120bd27SmrgAC_ARG_WITH(xmlto, 1407e120bd27Smrg AS_HELP_STRING([--with-xmlto], 1408e120bd27Smrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 1409e120bd27Smrg [use_xmlto=$withval], [use_xmlto=]_defopt) 1410e120bd27Smrgm4_undefine([_defopt]) 1411e120bd27Smrg 1412e120bd27Smrgif test "x$use_xmlto" = x"auto"; then 1413e120bd27Smrg AC_PATH_PROG([XMLTO], [xmlto]) 1414e120bd27Smrg if test "x$XMLTO" = "x"; then 1415e120bd27Smrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 1416e120bd27Smrg have_xmlto=no 1417e120bd27Smrg else 1418e120bd27Smrg have_xmlto=yes 1419e120bd27Smrg fi 1420e120bd27Smrgelif test "x$use_xmlto" = x"yes" ; then 1421e120bd27Smrg AC_PATH_PROG([XMLTO], [xmlto]) 1422e120bd27Smrg if test "x$XMLTO" = "x"; then 1423e120bd27Smrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 1424e120bd27Smrg fi 1425e120bd27Smrg have_xmlto=yes 1426e120bd27Smrgelif test "x$use_xmlto" = x"no" ; then 1427e120bd27Smrg if test "x$XMLTO" != "x"; then 1428e120bd27Smrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 1429e120bd27Smrg fi 1430e120bd27Smrg have_xmlto=no 1431e120bd27Smrgelse 1432e120bd27Smrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 1433e120bd27Smrgfi 1434e120bd27Smrg 1435e120bd27Smrg# Test for a minimum version of xmlto, if provided. 1436e120bd27Smrgm4_ifval([$1], 1437e120bd27Smrg[if test "$have_xmlto" = yes; then 1438e120bd27Smrg # scrape the xmlto version 1439e120bd27Smrg AC_MSG_CHECKING([the xmlto version]) 1440e120bd27Smrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 1441e120bd27Smrg AC_MSG_RESULT([$xmlto_version]) 1442e120bd27Smrg AS_VERSION_COMPARE([$xmlto_version], [$1], 1443e120bd27Smrg [if test "x$use_xmlto" = xauto; then 1444e120bd27Smrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 1445e120bd27Smrg have_xmlto=no 1446e120bd27Smrg else 1447e120bd27Smrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 1448e120bd27Smrg fi]) 1449e120bd27Smrgfi]) 1450e120bd27Smrg 1451e120bd27Smrg# Test for the ability of xmlto to generate a text target 1452e120bd27Smrghave_xmlto_text=no 1453e120bd27Smrgcat > conftest.xml << "EOF" 1454e120bd27SmrgEOF 1455e120bd27SmrgAS_IF([test "$have_xmlto" = yes], 1456e120bd27Smrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 1457e120bd27Smrg [have_xmlto_text=yes], 1458e120bd27Smrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 1459e120bd27Smrgrm -f conftest.xml 1460e120bd27SmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 1461e120bd27SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 1462e120bd27Smrg]) # XORG_WITH_XMLTO 1463e120bd27Smrg 1464e120bd27Smrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 1465e120bd27Smrg# ---------------- 1466e120bd27Smrg# Minimum version: 1.5.0 1467e120bd27Smrg# 1468e120bd27Smrg# Documentation tools are not always available on all platforms and sometimes 1469e120bd27Smrg# not at the appropriate level. This macro enables a module to test for the 1470e120bd27Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1471e120bd27Smrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 1472e120bd27Smrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 1473e120bd27Smrg# --with-asciidoc assumes 'auto'. 1474e120bd27Smrg# 1475e120bd27Smrg# Interface to module: 1476e120bd27Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 1477e120bd27Smrg# ASCIIDOC: returns the path of the asciidoc program found 1478e120bd27Smrg# returns the path set by the user in the environment 1479e120bd27Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 1480e120bd27Smrg# 'no' user instructs the module not to use asciidoc 1481e120bd27Smrg# 1482e120bd27Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 1483e120bd27Smrg# 1484e120bd27SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 1485e120bd27SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 1486e120bd27Smrgm4_define([_defopt], m4_default([$2], [auto])) 1487e120bd27SmrgAC_ARG_WITH(asciidoc, 1488e120bd27Smrg AS_HELP_STRING([--with-asciidoc], 1489e120bd27Smrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 1490e120bd27Smrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 1491e120bd27Smrgm4_undefine([_defopt]) 1492e120bd27Smrg 1493e120bd27Smrgif test "x$use_asciidoc" = x"auto"; then 1494e120bd27Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 1495e120bd27Smrg if test "x$ASCIIDOC" = "x"; then 1496e120bd27Smrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 1497e120bd27Smrg have_asciidoc=no 1498e120bd27Smrg else 1499e120bd27Smrg have_asciidoc=yes 1500e120bd27Smrg fi 1501e120bd27Smrgelif test "x$use_asciidoc" = x"yes" ; then 1502e120bd27Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 1503e120bd27Smrg if test "x$ASCIIDOC" = "x"; then 1504e120bd27Smrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 1505e120bd27Smrg fi 1506e120bd27Smrg have_asciidoc=yes 1507e120bd27Smrgelif test "x$use_asciidoc" = x"no" ; then 1508e120bd27Smrg if test "x$ASCIIDOC" != "x"; then 1509e120bd27Smrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 1510e120bd27Smrg fi 1511e120bd27Smrg have_asciidoc=no 1512e120bd27Smrgelse 1513e120bd27Smrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 1514e120bd27Smrgfi 1515e120bd27Smrgm4_ifval([$1], 1516e120bd27Smrg[if test "$have_asciidoc" = yes; then 1517e120bd27Smrg # scrape the asciidoc version 1518e120bd27Smrg AC_MSG_CHECKING([the asciidoc version]) 1519e120bd27Smrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 1520e120bd27Smrg AC_MSG_RESULT([$asciidoc_version]) 1521e120bd27Smrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 1522e120bd27Smrg [if test "x$use_asciidoc" = xauto; then 1523e120bd27Smrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 1524e120bd27Smrg have_asciidoc=no 1525e120bd27Smrg else 1526e120bd27Smrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 1527e120bd27Smrg fi]) 1528e120bd27Smrgfi]) 1529e120bd27SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 1530e120bd27Smrg]) # XORG_WITH_ASCIIDOC 1531e120bd27Smrg 1532e120bd27Smrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 1533e120bd27Smrg# -------------------------------- 1534e120bd27Smrg# Minimum version: 1.5.0 1535e120bd27Smrg# 1536e120bd27Smrg# Documentation tools are not always available on all platforms and sometimes 1537e120bd27Smrg# not at the appropriate level. This macro enables a module to test for the 1538e120bd27Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1539e120bd27Smrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 1540e120bd27Smrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 1541e120bd27Smrg# --with-doxygen assumes 'auto'. 1542e120bd27Smrg# 1543e120bd27Smrg# Interface to module: 1544e120bd27Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 1545e120bd27Smrg# DOXYGEN: returns the path of the doxygen program found 1546e120bd27Smrg# returns the path set by the user in the environment 1547e120bd27Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen 1548e120bd27Smrg# 'no' user instructs the module not to use doxygen 1549e120bd27Smrg# 1550e120bd27Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 1551e120bd27Smrg# 1552e120bd27SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 1553e120bd27SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 1554e120bd27Smrgm4_define([_defopt], m4_default([$2], [auto])) 1555e120bd27SmrgAC_ARG_WITH(doxygen, 1556e120bd27Smrg AS_HELP_STRING([--with-doxygen], 1557e120bd27Smrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 1558e120bd27Smrg [use_doxygen=$withval], [use_doxygen=]_defopt) 1559e120bd27Smrgm4_undefine([_defopt]) 1560e120bd27Smrg 1561e120bd27Smrgif test "x$use_doxygen" = x"auto"; then 1562e120bd27Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 1563e120bd27Smrg if test "x$DOXYGEN" = "x"; then 1564e120bd27Smrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 1565e120bd27Smrg have_doxygen=no 1566e120bd27Smrg else 1567e120bd27Smrg have_doxygen=yes 1568e120bd27Smrg fi 1569e120bd27Smrgelif test "x$use_doxygen" = x"yes" ; then 1570e120bd27Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 1571e120bd27Smrg if test "x$DOXYGEN" = "x"; then 1572e120bd27Smrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 1573e120bd27Smrg fi 1574e120bd27Smrg have_doxygen=yes 1575e120bd27Smrgelif test "x$use_doxygen" = x"no" ; then 1576e120bd27Smrg if test "x$DOXYGEN" != "x"; then 1577e120bd27Smrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 1578e120bd27Smrg fi 1579e120bd27Smrg have_doxygen=no 1580e120bd27Smrgelse 1581e120bd27Smrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 1582e120bd27Smrgfi 1583e120bd27Smrgm4_ifval([$1], 1584e120bd27Smrg[if test "$have_doxygen" = yes; then 1585e120bd27Smrg # scrape the doxygen version 1586e120bd27Smrg AC_MSG_CHECKING([the doxygen version]) 1587e120bd27Smrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 1588e120bd27Smrg AC_MSG_RESULT([$doxygen_version]) 1589e120bd27Smrg AS_VERSION_COMPARE([$doxygen_version], [$1], 1590e120bd27Smrg [if test "x$use_doxygen" = xauto; then 1591e120bd27Smrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 1592e120bd27Smrg have_doxygen=no 1593e120bd27Smrg else 1594e120bd27Smrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 1595e120bd27Smrg fi]) 1596e120bd27Smrgfi]) 1597e120bd27SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 1598e120bd27Smrg]) # XORG_WITH_DOXYGEN 1599e120bd27Smrg 1600e120bd27Smrg# XORG_WITH_GROFF([DEFAULT]) 1601e120bd27Smrg# ---------------- 1602e120bd27Smrg# Minimum version: 1.6.0 1603e120bd27Smrg# 1604e120bd27Smrg# Documentation tools are not always available on all platforms and sometimes 1605e120bd27Smrg# not at the appropriate level. This macro enables a module to test for the 1606e120bd27Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1607e120bd27Smrg# the --with-groff option, it allows maximum flexibilty in making decisions 1608e120bd27Smrg# as whether or not to use the groff package. When DEFAULT is not specified, 1609e120bd27Smrg# --with-groff assumes 'auto'. 1610e120bd27Smrg# 1611e120bd27Smrg# Interface to module: 1612e120bd27Smrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 1613e120bd27Smrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 1614e120bd27Smrg# HAVE_GROFF_MS: the -ms macros package 1615e120bd27Smrg# GROFF: returns the path of the groff program found 1616e120bd27Smrg# returns the path set by the user in the environment 1617e120bd27Smrg# --with-groff: 'yes' user instructs the module to use groff 1618e120bd27Smrg# 'no' user instructs the module not to use groff 1619e120bd27Smrg# 1620e120bd27Smrg# Added in version 1.9.0: 1621e120bd27Smrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 1622e120bd27Smrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 1623e120bd27Smrg# psselect from the psutils package. 1624e120bd27Smrg# the ghostcript package. Refer to the grohtml man pages 1625e120bd27Smrg# 1626e120bd27Smrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 1627e120bd27Smrg# 1628e120bd27Smrg# OS and distros often splits groff in a basic and full package, the former 1629e120bd27Smrg# having the groff program and the later having devices, fonts and macros 1630e120bd27Smrg# Checking for the groff executable is not enough. 1631e120bd27Smrg# 1632e120bd27Smrg# If macros are missing, we cannot assume that groff is useless, so we don't 1633e120bd27Smrg# unset HAVE_GROFF or GROFF env variables. 1634e120bd27Smrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 1635e120bd27Smrg# 1636e120bd27SmrgAC_DEFUN([XORG_WITH_GROFF],[ 1637e120bd27SmrgAC_ARG_VAR([GROFF], [Path to groff command]) 1638e120bd27Smrgm4_define([_defopt], m4_default([$1], [auto])) 1639e120bd27SmrgAC_ARG_WITH(groff, 1640e120bd27Smrg AS_HELP_STRING([--with-groff], 1641e120bd27Smrg [Use groff to regenerate documentation (default: ]_defopt[)]), 1642e120bd27Smrg [use_groff=$withval], [use_groff=]_defopt) 1643e120bd27Smrgm4_undefine([_defopt]) 1644e120bd27Smrg 1645e120bd27Smrgif test "x$use_groff" = x"auto"; then 1646e120bd27Smrg AC_PATH_PROG([GROFF], [groff]) 1647e120bd27Smrg if test "x$GROFF" = "x"; then 1648e120bd27Smrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 1649e120bd27Smrg have_groff=no 1650e120bd27Smrg else 1651e120bd27Smrg have_groff=yes 1652e120bd27Smrg fi 1653e120bd27Smrgelif test "x$use_groff" = x"yes" ; then 1654e120bd27Smrg AC_PATH_PROG([GROFF], [groff]) 1655e120bd27Smrg if test "x$GROFF" = "x"; then 1656e120bd27Smrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 1657e120bd27Smrg fi 1658e120bd27Smrg have_groff=yes 1659e120bd27Smrgelif test "x$use_groff" = x"no" ; then 1660e120bd27Smrg if test "x$GROFF" != "x"; then 1661e120bd27Smrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 1662e120bd27Smrg fi 1663e120bd27Smrg have_groff=no 1664e120bd27Smrgelse 1665e120bd27Smrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 1666e120bd27Smrgfi 1667e120bd27Smrg 1668e120bd27Smrg# We have groff, test for the presence of the macro packages 1669e120bd27Smrgif test "x$have_groff" = x"yes"; then 1670e120bd27Smrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 1671e120bd27Smrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 1672e120bd27Smrg groff_ms_works=yes 1673e120bd27Smrg else 1674e120bd27Smrg groff_ms_works=no 1675e120bd27Smrg fi 1676e120bd27Smrg AC_MSG_RESULT([$groff_ms_works]) 1677e120bd27Smrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 1678e120bd27Smrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 1679e120bd27Smrg groff_mm_works=yes 1680e120bd27Smrg else 1681e120bd27Smrg groff_mm_works=no 1682e120bd27Smrg fi 1683e120bd27Smrg AC_MSG_RESULT([$groff_mm_works]) 1684e120bd27Smrgfi 1685e120bd27Smrg 1686e120bd27Smrg# We have groff, test for HTML dependencies, one command per package 1687e120bd27Smrgif test "x$have_groff" = x"yes"; then 1688e120bd27Smrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 1689e120bd27Smrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 1690e120bd27Smrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 1691e120bd27Smrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 1692e120bd27Smrg have_groff_html=yes 1693e120bd27Smrg else 1694e120bd27Smrg have_groff_html=no 1695e120bd27Smrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 1696e120bd27Smrg fi 1697e120bd27Smrgfi 1698e120bd27Smrg 1699e120bd27Smrg# Set Automake conditionals for Makefiles 1700e120bd27SmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 1701e120bd27SmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 1702e120bd27SmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 1703e120bd27SmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 1704e120bd27Smrg]) # XORG_WITH_GROFF 1705e120bd27Smrg 1706e120bd27Smrg# XORG_WITH_FOP([DEFAULT]) 1707e120bd27Smrg# ---------------- 1708e120bd27Smrg# Minimum version: 1.6.0 1709e120bd27Smrg# 1710e120bd27Smrg# Documentation tools are not always available on all platforms and sometimes 1711e120bd27Smrg# not at the appropriate level. This macro enables a module to test for the 1712e120bd27Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1713e120bd27Smrg# the --with-fop option, it allows maximum flexibilty in making decisions 1714e120bd27Smrg# as whether or not to use the fop package. When DEFAULT is not specified, 1715e120bd27Smrg# --with-fop assumes 'auto'. 1716e120bd27Smrg# 1717e120bd27Smrg# Interface to module: 1718e120bd27Smrg# HAVE_FOP: used in makefiles to conditionally generate documentation 1719e120bd27Smrg# FOP: returns the path of the fop program found 1720e120bd27Smrg# returns the path set by the user in the environment 1721e120bd27Smrg# --with-fop: 'yes' user instructs the module to use fop 1722e120bd27Smrg# 'no' user instructs the module not to use fop 1723e120bd27Smrg# 1724e120bd27Smrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 1725e120bd27Smrg# 1726e120bd27SmrgAC_DEFUN([XORG_WITH_FOP],[ 1727e120bd27SmrgAC_ARG_VAR([FOP], [Path to fop command]) 1728e120bd27Smrgm4_define([_defopt], m4_default([$1], [auto])) 1729e120bd27SmrgAC_ARG_WITH(fop, 1730e120bd27Smrg AS_HELP_STRING([--with-fop], 1731e120bd27Smrg [Use fop to regenerate documentation (default: ]_defopt[)]), 1732e120bd27Smrg [use_fop=$withval], [use_fop=]_defopt) 1733e120bd27Smrgm4_undefine([_defopt]) 1734e120bd27Smrg 1735e120bd27Smrgif test "x$use_fop" = x"auto"; then 1736e120bd27Smrg AC_PATH_PROG([FOP], [fop]) 1737e120bd27Smrg if test "x$FOP" = "x"; then 1738e120bd27Smrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 1739e120bd27Smrg have_fop=no 1740e120bd27Smrg else 1741e120bd27Smrg have_fop=yes 1742e120bd27Smrg fi 1743e120bd27Smrgelif test "x$use_fop" = x"yes" ; then 1744e120bd27Smrg AC_PATH_PROG([FOP], [fop]) 1745e120bd27Smrg if test "x$FOP" = "x"; then 1746e120bd27Smrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 1747e120bd27Smrg fi 1748e120bd27Smrg have_fop=yes 1749e120bd27Smrgelif test "x$use_fop" = x"no" ; then 1750e120bd27Smrg if test "x$FOP" != "x"; then 1751e120bd27Smrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 1752e120bd27Smrg fi 1753e120bd27Smrg have_fop=no 1754e120bd27Smrgelse 1755e120bd27Smrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 1756e120bd27Smrgfi 1757e120bd27SmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 1758e120bd27Smrg]) # XORG_WITH_FOP 1759e120bd27Smrg 1760e120bd27Smrg# XORG_WITH_PS2PDF([DEFAULT]) 1761e120bd27Smrg# ---------------- 1762e120bd27Smrg# Minimum version: 1.6.0 1763e120bd27Smrg# 1764e120bd27Smrg# Documentation tools are not always available on all platforms and sometimes 1765e120bd27Smrg# not at the appropriate level. This macro enables a module to test for the 1766e120bd27Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1767e120bd27Smrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 1768e120bd27Smrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 1769e120bd27Smrg# --with-ps2pdf assumes 'auto'. 1770e120bd27Smrg# 1771e120bd27Smrg# Interface to module: 1772e120bd27Smrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 1773e120bd27Smrg# PS2PDF: returns the path of the ps2pdf program found 1774e120bd27Smrg# returns the path set by the user in the environment 1775e120bd27Smrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 1776e120bd27Smrg# 'no' user instructs the module not to use ps2pdf 1777e120bd27Smrg# 1778e120bd27Smrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 1779e120bd27Smrg# 1780e120bd27SmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 1781e120bd27SmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 1782e120bd27Smrgm4_define([_defopt], m4_default([$1], [auto])) 1783e120bd27SmrgAC_ARG_WITH(ps2pdf, 1784e120bd27Smrg AS_HELP_STRING([--with-ps2pdf], 1785e120bd27Smrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 1786e120bd27Smrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 1787e120bd27Smrgm4_undefine([_defopt]) 1788e120bd27Smrg 1789e120bd27Smrgif test "x$use_ps2pdf" = x"auto"; then 1790e120bd27Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 1791e120bd27Smrg if test "x$PS2PDF" = "x"; then 1792e120bd27Smrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 1793e120bd27Smrg have_ps2pdf=no 1794e120bd27Smrg else 1795e120bd27Smrg have_ps2pdf=yes 1796e120bd27Smrg fi 1797e120bd27Smrgelif test "x$use_ps2pdf" = x"yes" ; then 1798e120bd27Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 1799e120bd27Smrg if test "x$PS2PDF" = "x"; then 1800e120bd27Smrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 1801e120bd27Smrg fi 1802e120bd27Smrg have_ps2pdf=yes 1803e120bd27Smrgelif test "x$use_ps2pdf" = x"no" ; then 1804e120bd27Smrg if test "x$PS2PDF" != "x"; then 1805e120bd27Smrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 1806e120bd27Smrg fi 1807e120bd27Smrg have_ps2pdf=no 1808e120bd27Smrgelse 1809e120bd27Smrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 1810e120bd27Smrgfi 1811e120bd27SmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 1812e120bd27Smrg]) # XORG_WITH_PS2PDF 1813e120bd27Smrg 1814e120bd27Smrg# XORG_ENABLE_DOCS (enable_docs=yes) 1815e120bd27Smrg# ---------------- 1816e120bd27Smrg# Minimum version: 1.6.0 1817e120bd27Smrg# 1818e120bd27Smrg# Documentation tools are not always available on all platforms and sometimes 1819e120bd27Smrg# not at the appropriate level. This macro enables a builder to skip all 1820e120bd27Smrg# documentation targets except traditional man pages. 1821e120bd27Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 1822e120bd27Smrg# maximum flexibilty in controlling documentation building. 1823e120bd27Smrg# Refer to: 1824e120bd27Smrg# XORG_WITH_XMLTO --with-xmlto 1825e120bd27Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 1826e120bd27Smrg# XORG_WITH_DOXYGEN --with-doxygen 1827e120bd27Smrg# XORG_WITH_FOP --with-fop 1828e120bd27Smrg# XORG_WITH_GROFF --with-groff 1829e120bd27Smrg# XORG_WITH_PS2PDF --with-ps2pdf 1830e120bd27Smrg# 1831e120bd27Smrg# Interface to module: 1832e120bd27Smrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 1833e120bd27Smrg# --enable-docs: 'yes' user instructs the module to generate docs 1834e120bd27Smrg# 'no' user instructs the module not to generate docs 1835e120bd27Smrg# parm1: specify the default value, yes or no. 1836e120bd27Smrg# 1837e120bd27SmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 1838e120bd27Smrgm4_define([default], m4_default([$1], [yes])) 1839e120bd27SmrgAC_ARG_ENABLE(docs, 1840e120bd27Smrg AS_HELP_STRING([--enable-docs], 1841e120bd27Smrg [Enable building the documentation (default: ]default[)]), 1842e120bd27Smrg [build_docs=$enableval], [build_docs=]default) 1843e120bd27Smrgm4_undefine([default]) 1844e120bd27SmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 1845e120bd27SmrgAC_MSG_CHECKING([whether to build documentation]) 1846e120bd27SmrgAC_MSG_RESULT([$build_docs]) 1847e120bd27Smrg]) # XORG_ENABLE_DOCS 1848e120bd27Smrg 1849e120bd27Smrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 1850e120bd27Smrg# ---------------- 1851e120bd27Smrg# Minimum version: 1.6.0 1852e120bd27Smrg# 1853e120bd27Smrg# This macro enables a builder to skip all developer documentation. 1854e120bd27Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 1855e120bd27Smrg# maximum flexibilty in controlling documentation building. 1856e120bd27Smrg# Refer to: 1857e120bd27Smrg# XORG_WITH_XMLTO --with-xmlto 1858e120bd27Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 1859e120bd27Smrg# XORG_WITH_DOXYGEN --with-doxygen 1860e120bd27Smrg# XORG_WITH_FOP --with-fop 1861e120bd27Smrg# XORG_WITH_GROFF --with-groff 1862e120bd27Smrg# XORG_WITH_PS2PDF --with-ps2pdf 1863e120bd27Smrg# 1864e120bd27Smrg# Interface to module: 1865e120bd27Smrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 1866e120bd27Smrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 1867e120bd27Smrg# 'no' user instructs the module not to generate developer docs 1868e120bd27Smrg# parm1: specify the default value, yes or no. 1869e120bd27Smrg# 1870e120bd27SmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 1871e120bd27Smrgm4_define([devel_default], m4_default([$1], [yes])) 1872e120bd27SmrgAC_ARG_ENABLE(devel-docs, 1873e120bd27Smrg AS_HELP_STRING([--enable-devel-docs], 1874e120bd27Smrg [Enable building the developer documentation (default: ]devel_default[)]), 1875e120bd27Smrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 1876e120bd27Smrgm4_undefine([devel_default]) 1877e120bd27SmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 1878e120bd27SmrgAC_MSG_CHECKING([whether to build developer documentation]) 1879e120bd27SmrgAC_MSG_RESULT([$build_devel_docs]) 1880e120bd27Smrg]) # XORG_ENABLE_DEVEL_DOCS 1881e120bd27Smrg 1882e120bd27Smrg# XORG_ENABLE_SPECS (enable_specs=yes) 1883e120bd27Smrg# ---------------- 1884e120bd27Smrg# Minimum version: 1.6.0 1885e120bd27Smrg# 1886e120bd27Smrg# This macro enables a builder to skip all functional specification targets. 1887e120bd27Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 1888e120bd27Smrg# maximum flexibilty in controlling documentation building. 1889e120bd27Smrg# Refer to: 1890e120bd27Smrg# XORG_WITH_XMLTO --with-xmlto 1891e120bd27Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 1892e120bd27Smrg# XORG_WITH_DOXYGEN --with-doxygen 1893e120bd27Smrg# XORG_WITH_FOP --with-fop 1894e120bd27Smrg# XORG_WITH_GROFF --with-groff 1895e120bd27Smrg# XORG_WITH_PS2PDF --with-ps2pdf 1896e120bd27Smrg# 1897e120bd27Smrg# Interface to module: 1898e120bd27Smrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 1899e120bd27Smrg# --enable-specs: 'yes' user instructs the module to generate specs 1900e120bd27Smrg# 'no' user instructs the module not to generate specs 1901e120bd27Smrg# parm1: specify the default value, yes or no. 1902e120bd27Smrg# 1903e120bd27SmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 1904e120bd27Smrgm4_define([spec_default], m4_default([$1], [yes])) 1905e120bd27SmrgAC_ARG_ENABLE(specs, 1906e120bd27Smrg AS_HELP_STRING([--enable-specs], 1907e120bd27Smrg [Enable building the specs (default: ]spec_default[)]), 1908e120bd27Smrg [build_specs=$enableval], [build_specs=]spec_default) 1909e120bd27Smrgm4_undefine([spec_default]) 1910e120bd27SmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 1911e120bd27SmrgAC_MSG_CHECKING([whether to build functional specifications]) 1912e120bd27SmrgAC_MSG_RESULT([$build_specs]) 1913e120bd27Smrg]) # XORG_ENABLE_SPECS 1914e120bd27Smrg 19156c321187Smrg# XORG_CHECK_MALLOC_ZERO 19166c321187Smrg# ---------------------- 19176c321187Smrg# Minimum version: 1.0.0 19186c321187Smrg# 19196c321187Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 19206c321187Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 19216c321187Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 19226c321187SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 19236c321187SmrgAC_ARG_ENABLE(malloc0returnsnull, 192493493779Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 19256c321187Smrg [malloc(0) returns NULL (default: auto)]), 19266c321187Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 19276c321187Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 19286c321187Smrg 19296c321187SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 19306c321187Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 19316c321187Smrg AC_RUN_IFELSE([ 19326c321187Smrgchar *malloc(); 19336c321187Smrgchar *realloc(); 19346c321187Smrgchar *calloc(); 19356c321187Smrgmain() { 19366c321187Smrg char *m0, *r0, *c0, *p; 19376c321187Smrg m0 = malloc(0); 19386c321187Smrg p = malloc(10); 19396c321187Smrg r0 = realloc(p,0); 19406c321187Smrg c0 = calloc(0); 19416c321187Smrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 19426c321187Smrg}], 19436c321187Smrg [MALLOC_ZERO_RETURNS_NULL=yes], 1944e120bd27Smrg [MALLOC_ZERO_RETURNS_NULL=no], 1945e120bd27Smrg [MALLOC_ZERO_RETURNS_NULL=yes]) 19466c321187Smrgfi 19476c321187SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 19486c321187Smrg 19496c321187Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 19506c321187Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 19516c321187Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 19526c321187Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 19536c321187Smrgelse 19546c321187Smrg MALLOC_ZERO_CFLAGS="" 19556c321187Smrg XMALLOC_ZERO_CFLAGS="" 19566c321187Smrg XTMALLOC_ZERO_CFLAGS="" 19576c321187Smrgfi 19586c321187Smrg 19596c321187SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 19606c321187SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 19616c321187SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 19626c321187Smrg]) # XORG_CHECK_MALLOC_ZERO 19636c321187Smrg 19646c321187Smrg# XORG_WITH_LINT() 19656c321187Smrg# ---------------- 19666c321187Smrg# Minimum version: 1.1.0 19676c321187Smrg# 1968e120bd27Smrg# This macro enables the use of a tool that flags some suspicious and 1969e120bd27Smrg# non-portable constructs (likely to be bugs) in C language source code. 1970e120bd27Smrg# It will attempt to locate the tool and use appropriate options. 1971e120bd27Smrg# There are various lint type tools on different platforms. 1972e120bd27Smrg# 1973e120bd27Smrg# Interface to module: 1974e120bd27Smrg# LINT: returns the path to the tool found on the platform 1975e120bd27Smrg# or the value set to LINT on the configure cmd line 1976e120bd27Smrg# also an Automake conditional 1977e120bd27Smrg# LINT_FLAGS: an Automake variable with appropriate flags 1978e120bd27Smrg# 1979e120bd27Smrg# --with-lint: 'yes' user instructs the module to use lint 1980e120bd27Smrg# 'no' user instructs the module not to use lint (default) 1981e120bd27Smrg# 1982e120bd27Smrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 1983e120bd27Smrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 19846c321187Smrg# 19856c321187SmrgAC_DEFUN([XORG_WITH_LINT],[ 19866c321187Smrg 1987e120bd27SmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 1988e120bd27SmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 198993493779SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 19906c321187Smrg [Use a lint-style source code checker (default: disabled)])], 19916c321187Smrg [use_lint=$withval], [use_lint=no]) 1992e120bd27Smrg 1993e120bd27Smrg# Obtain platform specific info like program name and options 1994e120bd27Smrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 1995e120bd27Smrgcase $host_os in 1996e120bd27Smrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 1997e120bd27Smrg lint_name=splint 1998e120bd27Smrg lint_options="-badflag" 1999e120bd27Smrg ;; 2000e120bd27Smrg *freebsd* | *netbsd*) 2001e120bd27Smrg lint_name=lint 2002e120bd27Smrg lint_options="-u -b" 2003e120bd27Smrg ;; 2004e120bd27Smrg *solaris*) 2005e120bd27Smrg lint_name=lint 2006e120bd27Smrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 2007e120bd27Smrg ;; 2008e120bd27Smrgesac 2009e120bd27Smrg 2010e120bd27Smrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 2011e120bd27Smrgif test "x$use_lint" = x"yes" ; then 2012e120bd27Smrg AC_PATH_PROG([LINT], [$lint_name]) 2013e120bd27Smrg if test "x$LINT" = "x"; then 2014e120bd27Smrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 2015e120bd27Smrg fi 2016e120bd27Smrgelif test "x$use_lint" = x"no" ; then 2017e120bd27Smrg if test "x$LINT" != "x"; then 2018e120bd27Smrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 2019e120bd27Smrg fi 20206c321187Smrgelse 2021e120bd27Smrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 20226c321187Smrgfi 2023e120bd27Smrg 2024e120bd27Smrg# User supplied flags override default flags 2025e120bd27Smrgif test "x$LINT_FLAGS" != "x"; then 2026e120bd27Smrg lint_options=$LINT_FLAGS 20276c321187Smrgfi 20286c321187Smrg 2029e120bd27SmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 2030e120bd27SmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 20316c321187Smrg 20326c321187Smrg]) # XORG_WITH_LINT 20336c321187Smrg 20346c321187Smrg# XORG_LINT_LIBRARY(LIBNAME) 20356c321187Smrg# -------------------------- 20366c321187Smrg# Minimum version: 1.1.0 20376c321187Smrg# 20386c321187Smrg# Sets up flags for building lint libraries for checking programs that call 20396c321187Smrg# functions in the library. 20406c321187Smrg# 2041e120bd27Smrg# Interface to module: 2042e120bd27Smrg# LINTLIB - Automake variable with the name of lint library file to make 2043e120bd27Smrg# MAKE_LINT_LIB - Automake conditional 2044e120bd27Smrg# 2045e120bd27Smrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 2046e120bd27Smrg# - 'no' user instructs the module not to create a lint library (default) 20476c321187Smrg 20486c321187SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 20496c321187SmrgAC_REQUIRE([XORG_WITH_LINT]) 205093493779SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 20516c321187Smrg [Create lint library (default: disabled)])], 20526c321187Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 2053e120bd27Smrg 2054e120bd27Smrgif test "x$make_lint_lib" = x"yes" ; then 2055e120bd27Smrg LINTLIB=llib-l$1.ln 2056e120bd27Smrg if test "x$LINT" = "x"; then 2057e120bd27Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 2058e120bd27Smrg fi 2059e120bd27Smrgelif test "x$make_lint_lib" != x"no" ; then 2060e120bd27Smrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 20616c321187Smrgfi 2062e120bd27Smrg 20636c321187SmrgAC_SUBST(LINTLIB) 20646c321187SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 20656c321187Smrg 20666c321187Smrg]) # XORG_LINT_LIBRARY 20676c321187Smrg 206893493779Smrg# XORG_CWARNFLAGS 206993493779Smrg# --------------- 207093493779Smrg# Minimum version: 1.2.0 207193493779Smrg# 207293493779Smrg# Defines CWARNFLAGS to enable C compiler warnings. 207393493779Smrg# 207493493779SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 2075e120bd27SmrgAC_REQUIRE([AC_PROG_CC_C99]) 207693493779Smrgif test "x$GCC" = xyes ; then 207793493779Smrg CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ 207893493779Smrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ 2079e120bd27Smrg-Wbad-function-cast -Wformat=2" 208093493779Smrg case `$CC -dumpversion` in 208193493779Smrg 3.4.* | 4.*) 208293493779Smrg CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement" 208393493779Smrg ;; 208493493779Smrg esac 208593493779Smrgelse 208693493779Smrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 208793493779Smrg if test "x$SUNCC" = "xyes"; then 208893493779Smrg CWARNFLAGS="-v" 208993493779Smrg fi 209093493779Smrgfi 209193493779SmrgAC_SUBST(CWARNFLAGS) 209293493779Smrg]) # XORG_CWARNFLAGS 209393493779Smrg 209493493779Smrg# XORG_STRICT_OPTION 209593493779Smrg# ----------------------- 209693493779Smrg# Minimum version: 1.3.0 209793493779Smrg# 209893493779Smrg# Add configure option to enable strict compilation 209993493779SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 2100e120bd27Smrg# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89 210193493779SmrgAC_REQUIRE([AC_PROG_CC_C99]) 210293493779SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 210393493779Smrg 210493493779SmrgAC_ARG_ENABLE(strict-compilation, 210593493779Smrg AS_HELP_STRING([--enable-strict-compilation], 210693493779Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 210793493779Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 210893493779Smrgif test "x$STRICT_COMPILE" = "xyes"; then 210993493779Smrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 211093493779Smrg AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 211193493779Smrg if test "x$GCC" = xyes ; then 211293493779Smrg STRICT_CFLAGS="-pedantic -Werror" 211393493779Smrg elif test "x$SUNCC" = "xyes"; then 211493493779Smrg STRICT_CFLAGS="-errwarn" 211593493779Smrg elif test "x$INTELCC" = "xyes"; then 211693493779Smrg STRICT_CFLAGS="-Werror" 211793493779Smrg fi 211893493779Smrgfi 211993493779SmrgCWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS" 212093493779SmrgAC_SUBST([CWARNFLAGS]) 212193493779Smrg]) # XORG_STRICT_OPTION 212293493779Smrg 212393493779Smrg# XORG_DEFAULT_OPTIONS 212493493779Smrg# -------------------- 212593493779Smrg# Minimum version: 1.3.0 212693493779Smrg# 212793493779Smrg# Defines default options for X.Org modules. 212893493779Smrg# 212993493779SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 2130e120bd27SmrgAC_REQUIRE([AC_PROG_INSTALL]) 213193493779SmrgXORG_CWARNFLAGS 213293493779SmrgXORG_STRICT_OPTION 213393493779SmrgXORG_RELEASE_VERSION 213493493779SmrgXORG_CHANGELOG 2135e120bd27SmrgXORG_INSTALL 213693493779SmrgXORG_MANPAGE_SECTIONS 2137e120bd27Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 2138e120bd27Smrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 213993493779Smrg]) # XORG_DEFAULT_OPTIONS 2140e120bd27Smrg 2141e120bd27Smrg# XORG_INSTALL() 2142e120bd27Smrg# ---------------- 2143e120bd27Smrg# Minimum version: 1.4.0 2144e120bd27Smrg# 2145e120bd27Smrg# Defines the variable INSTALL_CMD as the command to copy 2146e120bd27Smrg# INSTALL from $prefix/share/util-macros. 2147e120bd27Smrg# 2148e120bd27SmrgAC_DEFUN([XORG_INSTALL], [ 2149e120bd27SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 2150e120bd27Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 2151e120bd27SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 2152e120bd27Smrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 2153e120bd27Smrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 2154e120bd27Smrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 2155e120bd27SmrgAC_SUBST([INSTALL_CMD]) 2156e120bd27Smrg]) # XORG_INSTALL 21576c321187Smrgdnl Copyright 2005 Red Hat, Inc 21586c321187Smrgdnl 21596c321187Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 21606c321187Smrgdnl documentation for any purpose is hereby granted without fee, provided that 21616c321187Smrgdnl the above copyright notice appear in all copies and that both that 21626c321187Smrgdnl copyright notice and this permission notice appear in supporting 21636c321187Smrgdnl documentation. 21646c321187Smrgdnl 21656c321187Smrgdnl The above copyright notice and this permission notice shall be included 21666c321187Smrgdnl in all copies or substantial portions of the Software. 21676c321187Smrgdnl 21686c321187Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 21696c321187Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21706c321187Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 21716c321187Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 21726c321187Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21736c321187Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 21746c321187Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 21756c321187Smrgdnl 21766c321187Smrgdnl Except as contained in this notice, the name of the copyright holders shall 21776c321187Smrgdnl not be used in advertising or otherwise to promote the sale, use or 21786c321187Smrgdnl other dealings in this Software without prior written authorization 21796c321187Smrgdnl from the copyright holders. 21806c321187Smrgdnl 21816c321187Smrg 21826c321187Smrg# XORG_RELEASE_VERSION 21836c321187Smrg# -------------------- 2184e120bd27Smrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 21856c321187Smrg 21866c321187SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 21876c321187Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 21886c321187Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 21896c321187Smrg [Major version of this package]) 219093493779Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 21916c321187Smrg if test "x$PVM" = "x"; then 21926c321187Smrg PVM="0" 21936c321187Smrg fi 21946c321187Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 21956c321187Smrg [$PVM], 21966c321187Smrg [Minor version of this package]) 219793493779Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 21986c321187Smrg if test "x$PVP" = "x"; then 21996c321187Smrg PVP="0" 22006c321187Smrg fi 22016c321187Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 22026c321187Smrg [$PVP], 22036c321187Smrg [Patch version of this package]) 22046c321187Smrg]) 22056c321187Smrg 220693493779Smrg# XORG_CHANGELOG() 220793493779Smrg# ---------------- 220893493779Smrg# Minimum version: 1.2.0 220993493779Smrg# 221093493779Smrg# Defines the variable CHANGELOG_CMD as the command to generate 221193493779Smrg# ChangeLog from git. 221293493779Smrg# 221393493779Smrg# 221493493779SmrgAC_DEFUN([XORG_CHANGELOG], [ 2215e120bd27SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 2216e120bd27Smrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 2217e120bd27Smrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 221893493779Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 221993493779SmrgAC_SUBST([CHANGELOG_CMD]) 222093493779Smrg]) # XORG_CHANGELOG 222193493779Smrg 22226c321187Smrgdnl $XdotOrg: lib/xtrans/xtrans.m4,v 1.6 2005/07/26 18:59:11 alanc Exp $ 22236c321187Smrgdnl 22246c321187Smrgdnl Copyright 2005 Sun Microsystems, Inc. All rights reserved. 2225e120bd27Smrgdnl 2226e120bd27Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 2227e120bd27Smrgdnl copy of this software and associated documentation files (the "Software"), 2228e120bd27Smrgdnl to deal in the Software without restriction, including without limitation 2229e120bd27Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 2230e120bd27Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 2231e120bd27Smrgdnl Software is furnished to do so, subject to the following conditions: 2232e120bd27Smrgdnl 2233e120bd27Smrgdnl The above copyright notice and this permission notice (including the next 2234e120bd27Smrgdnl paragraph) shall be included in all copies or substantial portions of the 2235e120bd27Smrgdnl Software. 2236e120bd27Smrgdnl 2237e120bd27Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 2238e120bd27Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 2239e120bd27Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 2240e120bd27Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 2241e120bd27Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 2242e120bd27Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 2243e120bd27Smrgdnl DEALINGS IN THE SOFTWARE. 22446c321187Smrgdnl 22456c321187Smrg 22466c321187Smrg# XTRANS_TCP_FLAGS() 22476c321187Smrg# ------------------ 22486c321187Smrg# Find needed libraries for TCP sockets, and check for IPv6 support 22496c321187SmrgAC_DEFUN([XTRANS_TCP_FLAGS],[ 22506c321187Smrg # SVR4 hides these in libraries other than libc 22516c321187Smrg AC_SEARCH_LIBS(socket, [socket]) 22526c321187Smrg AC_SEARCH_LIBS(gethostbyname, [nsl]) 2253e120bd27Smrg if test "$ac_cv_search_socket$ac_cv_search_gethostbyname" = "nono"; then 2254e120bd27Smrg AC_HAVE_LIBRARY([ws2_32]) 2255e120bd27Smrg fi 22566c321187Smrg 22576c321187Smrg # Needs to come after above checks for libsocket & libnsl for SVR4 systems 22586c321187Smrg AC_ARG_ENABLE(ipv6, 225993493779Smrg AC_HELP_STRING([--enable-ipv6],[Enable IPv6 support]), 22606c321187Smrg [IPV6CONN=$enableval], 22616c321187Smrg [AC_CHECK_FUNC(getaddrinfo,[IPV6CONN=yes],[IPV6CONN=no])]) 22626c321187Smrg AC_MSG_CHECKING([if IPv6 support should be built]) 22636c321187Smrg if test "$IPV6CONN" = "yes"; then 22646c321187Smrg AC_DEFINE(IPv6,1,[Support IPv6 for TCP connections]) 22656c321187Smrg fi 22666c321187Smrg AC_MSG_RESULT($IPV6CONN) 22676c321187Smrg 22686c321187Smrg # 4.3BSD-Reno added a new member to struct sockaddr_in 22696c321187Smrg AC_CHECK_MEMBER([struct sockaddr_in.sin_len], 22706c321187Smrg AC_DEFINE([BSD44SOCKETS],1, 22716c321187Smrg [Define to 1 if `struct sockaddr_in' has a `sin_len' member]), [], [ 22726c321187Smrg#include <sys/types.h> 22736c321187Smrg#include <sys/socket.h> 22746c321187Smrg#include <netinet/in.h> 22756c321187Smrg ]) 227693493779Smrg 227793493779Smrg # POSIX.1g changed the type of pointer passed to getsockname/getpeername/etc. 227893493779Smrg AC_CHECK_TYPES([socklen_t], [], [], [ 227993493779SmrgAC_INCLUDES_DEFAULT 228093493779Smrg#include <sys/socket.h>]) 228193493779Smrg 22826c321187Smrg]) # XTRANS_TCP_FLAGS 22836c321187Smrg 22846c321187Smrg# XTRANS_CONNECTION_FLAGS() 22856c321187Smrg# ------------------------- 22866c321187Smrg# Standard checks for which Xtrans transports to use by the Xorg packages 22876c321187Smrg# that use Xtrans functions 22886c321187SmrgAC_DEFUN([XTRANS_CONNECTION_FLAGS],[ 22896c321187Smrg AC_REQUIRE([AC_CANONICAL_HOST]) 22906c321187Smrg AC_REQUIRE([AC_TYPE_SIGNAL]) 229193493779Smrg [case $host_os in 229293493779Smrg mingw*) unixdef="no" ;; 229393493779Smrg *) unixdef="yes" ;; 229493493779Smrg esac] 22956c321187Smrg AC_ARG_ENABLE(unix-transport, 22966c321187Smrg AC_HELP_STRING([--enable-unix-transport],[Enable UNIX domain socket transport]), 229793493779Smrg [UNIXCONN=$enableval], [UNIXCONN=$unixdef]) 22986c321187Smrg AC_MSG_CHECKING([if Xtrans should support UNIX socket connections]) 22996c321187Smrg if test "$UNIXCONN" = "yes"; then 23006c321187Smrg AC_DEFINE(UNIXCONN,1,[Support UNIX socket connections]) 23016c321187Smrg fi 23026c321187Smrg AC_MSG_RESULT($UNIXCONN) 230393493779Smrg AC_ARG_ENABLE(tcp-transport, 230493493779Smrg AC_HELP_STRING([--enable-tcp-transport],[Enable TCP socket transport]), 230593493779Smrg [TCPCONN=$enableval], [TCPCONN=yes]) 23066c321187Smrg AC_MSG_CHECKING([if Xtrans should support TCP socket connections]) 23076c321187Smrg AC_MSG_RESULT($TCPCONN) 23086c321187Smrg if test "$TCPCONN" = "yes"; then 23096c321187Smrg AC_DEFINE(TCPCONN,1,[Support TCP socket connections]) 23106c321187Smrg XTRANS_TCP_FLAGS 23116c321187Smrg fi 23126c321187Smrg [case $host_os in 23136c321187Smrg solaris*|sco*|sysv4*) localdef="yes" ;; 23146c321187Smrg *) localdef="no" ;; 23156c321187Smrg esac] 23166c321187Smrg AC_ARG_ENABLE(local-transport, 23176c321187Smrg AC_HELP_STRING([--enable-local-transport],[Enable os-specific local transport]), 23186c321187Smrg [LOCALCONN=$enableval], [LOCALCONN=$localdef]) 23196c321187Smrg AC_MSG_CHECKING([if Xtrans should support os-specific local connections]) 23206c321187Smrg AC_MSG_RESULT($LOCALCONN) 23216c321187Smrg if test "$LOCALCONN" = "yes"; then 23226c321187Smrg AC_DEFINE(LOCALCONN,1,[Support os-specific local connections]) 23236c321187Smrg fi 23246c321187Smrg 23256c321187Smrg]) # XTRANS_CONNECTION_FLAGS 23266c321187Smrg 23276c321187Smrg 23286c321187Smrg# XTRANS_SECURE_RPC_FLAGS() 23296c321187Smrg# ------------------------- 23306c321187Smrg# Check for Secure RPC functions - must come after XTRANS_TCP_FLAGS 23316c321187Smrg# so that any necessary networking libraries are already found 23326c321187SmrgAC_DEFUN([XTRANS_SECURE_RPC_FLAGS], 23336c321187Smrg[AC_REQUIRE([XTRANS_TCP_FLAGS]) 23346c321187Smrg AC_ARG_ENABLE(secure-rpc, 23356c321187Smrg AC_HELP_STRING([--enable-secure-rpc],[Enable Secure RPC]), 23366c321187Smrg [SECURE_RPC=$enableval], [SECURE_RPC="try"]) 23376c321187Smrg 23386c321187Smrg if test "x$SECURE_RPC" = "xyes" -o "x$SECURE_RPC" = "xtry" ; then 23396c321187Smrg FOUND_SECURE_RPC="no" 23406c321187Smrg AC_CHECK_FUNCS([authdes_seccreate authdes_create], 23416c321187Smrg [FOUND_SECURE_RPC="yes"]) 23426c321187Smrg if test "x$FOUND_SECURE_RPC" = "xno" ; then 23436c321187Smrg if test "x$SECURE_RPC" = "xyes" ; then 23446c321187Smrg AC_MSG_ERROR([Secure RPC requested, but required functions not found]) 23456c321187Smrg fi 23466c321187Smrg SECURE_RPC="no" 23476c321187Smrg else 23486c321187Smrg dnl FreeBSD keeps getsecretkey in librpcsvc 23496c321187Smrg AC_SEARCH_LIBS(getsecretkey, [rpcsvc]) 23506c321187Smrg SECURE_RPC="yes" 23516c321187Smrg fi 23526c321187Smrg fi 23536c321187Smrg AC_MSG_CHECKING([if Secure RPC authentication ("SUN-DES-1") should be supported]) 23546c321187Smrg if test "x$SECURE_RPC" = "xyes" ; then 23556c321187Smrg AC_DEFINE(SECURE_RPC, 1, [Support Secure RPC ("SUN-DES-1") authentication for X11 clients]) 23566c321187Smrg fi 23576c321187Smrg AC_MSG_RESULT($SECURE_RPC) 23586c321187Smrg]) # XTRANS_SECURE_RPC_FLAGS 23596c321187Smrg 23606c321187Smrg 2361e120bd27Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 2362e120bd27Smrg# 2363e120bd27Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 2364e120bd27Smrg# 2365e120bd27Smrg# This program is free software; you can redistribute it and/or modify 2366e120bd27Smrg# it under the terms of the GNU General Public License as published by 2367e120bd27Smrg# the Free Software Foundation; either version 2 of the License, or 2368e120bd27Smrg# (at your option) any later version. 2369e120bd27Smrg# 2370e120bd27Smrg# This program is distributed in the hope that it will be useful, but 2371e120bd27Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 2372e120bd27Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2373e120bd27Smrg# General Public License for more details. 2374e120bd27Smrg# 2375e120bd27Smrg# You should have received a copy of the GNU General Public License 2376e120bd27Smrg# along with this program; if not, write to the Free Software 2377e120bd27Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 2378e120bd27Smrg# 2379e120bd27Smrg# As a special exception to the GNU General Public License, if you 2380e120bd27Smrg# distribute this file as part of a program that contains a 2381e120bd27Smrg# configuration script generated by Autoconf, you may include it under 2382e120bd27Smrg# the same distribution terms that you use for the rest of that program. 23836c321187Smrg 2384e120bd27Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 2385e120bd27Smrg# ---------------------------------- 2386e120bd27SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 2387e120bd27Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 2388e120bd27Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 2389e120bd27SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 2390e120bd27Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 2391e120bd27Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 2392e120bd27Smrgfi 2393e120bd27Smrgif test -n "$PKG_CONFIG"; then 2394e120bd27Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 2395e120bd27Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 2396e120bd27Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 2397e120bd27Smrg AC_MSG_RESULT([yes]) 2398e120bd27Smrg else 2399e120bd27Smrg AC_MSG_RESULT([no]) 2400e120bd27Smrg PKG_CONFIG="" 2401e120bd27Smrg fi 2402e120bd27Smrg 2403e120bd27Smrgfi[]dnl 2404e120bd27Smrg])# PKG_PROG_PKG_CONFIG 24056c321187Smrg 2406e120bd27Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 2407e120bd27Smrg# 2408e120bd27Smrg# Check to see whether a particular set of modules exists. Similar 2409e120bd27Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 2410e120bd27Smrg# 2411e120bd27Smrg# 2412e120bd27Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 2413e120bd27Smrg# this or PKG_CHECK_MODULES is called, or make sure to call 2414e120bd27Smrg# PKG_CHECK_EXISTS manually 2415e120bd27Smrg# -------------------------------------------------------------- 2416e120bd27SmrgAC_DEFUN([PKG_CHECK_EXISTS], 2417e120bd27Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 2418e120bd27Smrgif test -n "$PKG_CONFIG" && \ 2419e120bd27Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 2420e120bd27Smrg m4_ifval([$2], [$2], [:]) 2421e120bd27Smrgm4_ifvaln([$3], [else 2422e120bd27Smrg $3])dnl 2423e120bd27Smrgfi]) 24246c321187Smrg 24256c321187Smrg 2426e120bd27Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 2427e120bd27Smrg# --------------------------------------------- 2428e120bd27Smrgm4_define([_PKG_CONFIG], 2429e120bd27Smrg[if test -n "$$1"; then 2430e120bd27Smrg pkg_cv_[]$1="$$1" 2431e120bd27Smrg elif test -n "$PKG_CONFIG"; then 2432e120bd27Smrg PKG_CHECK_EXISTS([$3], 2433e120bd27Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 2434e120bd27Smrg [pkg_failed=yes]) 2435e120bd27Smrg else 2436e120bd27Smrg pkg_failed=untried 2437e120bd27Smrgfi[]dnl 2438e120bd27Smrg])# _PKG_CONFIG 24396c321187Smrg 2440e120bd27Smrg# _PKG_SHORT_ERRORS_SUPPORTED 2441e120bd27Smrg# ----------------------------- 2442e120bd27SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 2443e120bd27Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 2444e120bd27Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 2445e120bd27Smrg _pkg_short_errors_supported=yes 2446e120bd27Smrgelse 2447e120bd27Smrg _pkg_short_errors_supported=no 2448e120bd27Smrgfi[]dnl 2449e120bd27Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 2450e120bd27Smrg 2451e120bd27Smrg 2452e120bd27Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 2453e120bd27Smrg# [ACTION-IF-NOT-FOUND]) 2454e120bd27Smrg# 2455e120bd27Smrg# 2456e120bd27Smrg# Note that if there is a possibility the first call to 2457e120bd27Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 2458e120bd27Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 2459e120bd27Smrg# 2460e120bd27Smrg# 2461e120bd27Smrg# -------------------------------------------------------------- 2462e120bd27SmrgAC_DEFUN([PKG_CHECK_MODULES], 2463e120bd27Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 2464e120bd27SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 2465e120bd27SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 2466e120bd27Smrg 2467e120bd27Smrgpkg_failed=no 2468e120bd27SmrgAC_MSG_CHECKING([for $1]) 2469e120bd27Smrg 2470e120bd27Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 2471e120bd27Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 2472e120bd27Smrg 2473e120bd27Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 2474e120bd27Smrgand $1[]_LIBS to avoid the need to call pkg-config. 2475e120bd27SmrgSee the pkg-config man page for more details.]) 2476e120bd27Smrg 2477e120bd27Smrgif test $pkg_failed = yes; then 2478e120bd27Smrg _PKG_SHORT_ERRORS_SUPPORTED 2479e120bd27Smrg if test $_pkg_short_errors_supported = yes; then 2480e120bd27Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 2481e120bd27Smrg else 2482e120bd27Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 2483e120bd27Smrg fi 2484e120bd27Smrg # Put the nasty error message in config.log where it belongs 2485e120bd27Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 2486e120bd27Smrg 2487e120bd27Smrg ifelse([$4], , [AC_MSG_ERROR(dnl 2488e120bd27Smrg[Package requirements ($2) were not met: 2489e120bd27Smrg 2490e120bd27Smrg$$1_PKG_ERRORS 2491e120bd27Smrg 2492e120bd27SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 2493e120bd27Smrginstalled software in a non-standard prefix. 2494e120bd27Smrg 2495e120bd27Smrg_PKG_TEXT 2496e120bd27Smrg])], 2497e120bd27Smrg [AC_MSG_RESULT([no]) 2498e120bd27Smrg $4]) 2499e120bd27Smrgelif test $pkg_failed = untried; then 2500e120bd27Smrg ifelse([$4], , [AC_MSG_FAILURE(dnl 2501e120bd27Smrg[The pkg-config script could not be found or is too old. Make sure it 2502e120bd27Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 2503e120bd27Smrgpath to pkg-config. 2504e120bd27Smrg 2505e120bd27Smrg_PKG_TEXT 2506e120bd27Smrg 2507e120bd27SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 2508e120bd27Smrg [$4]) 2509e120bd27Smrgelse 2510e120bd27Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 2511e120bd27Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 2512e120bd27Smrg AC_MSG_RESULT([yes]) 2513e120bd27Smrg ifelse([$3], , :, [$3]) 2514e120bd27Smrgfi[]dnl 2515e120bd27Smrg])# PKG_CHECK_MODULES 2516e120bd27Smrg 2517e120bd27Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 2518e120bd27Smrg# 2519e120bd27Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2520e120bd27Smrg# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, 2521e120bd27Smrg# Inc. 2522e120bd27Smrg# Written by Gordon Matzigkeit, 1996 2523e120bd27Smrg# 2524e120bd27Smrg# This file is free software; the Free Software Foundation gives 2525e120bd27Smrg# unlimited permission to copy and/or distribute it, with or without 2526e120bd27Smrg# modifications, as long as this notice is preserved. 2527e120bd27Smrg 2528e120bd27Smrgm4_define([_LT_COPYING], [dnl 2529e120bd27Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2530e120bd27Smrg# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, 2531e120bd27Smrg# Inc. 2532e120bd27Smrg# Written by Gordon Matzigkeit, 1996 2533e120bd27Smrg# 2534e120bd27Smrg# This file is part of GNU Libtool. 2535e120bd27Smrg# 2536e120bd27Smrg# GNU Libtool is free software; you can redistribute it and/or 2537e120bd27Smrg# modify it under the terms of the GNU General Public License as 2538e120bd27Smrg# published by the Free Software Foundation; either version 2 of 2539e120bd27Smrg# the License, or (at your option) any later version. 2540e120bd27Smrg# 2541e120bd27Smrg# As a special exception to the GNU General Public License, 2542e120bd27Smrg# if you distribute this file as part of a program or library that 2543e120bd27Smrg# is built using GNU Libtool, you may include this file under the 2544e120bd27Smrg# same distribution terms that you use for the rest of that program. 2545e120bd27Smrg# 2546e120bd27Smrg# GNU Libtool is distributed in the hope that it will be useful, 2547e120bd27Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 2548e120bd27Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 2549e120bd27Smrg# GNU General Public License for more details. 2550e120bd27Smrg# 2551e120bd27Smrg# You should have received a copy of the GNU General Public License 2552e120bd27Smrg# along with GNU Libtool; see the file COPYING. If not, a copy 2553e120bd27Smrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 2554e120bd27Smrg# obtained by writing to the Free Software Foundation, Inc., 2555e120bd27Smrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 2556e120bd27Smrg]) 2557e120bd27Smrg 2558e120bd27Smrg# serial 57 LT_INIT 2559e120bd27Smrg 2560e120bd27Smrg 2561e120bd27Smrg# LT_PREREQ(VERSION) 2562e120bd27Smrg# ------------------ 2563e120bd27Smrg# Complain and exit if this libtool version is less that VERSION. 2564e120bd27Smrgm4_defun([LT_PREREQ], 2565e120bd27Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 2566e120bd27Smrg [m4_default([$3], 2567e120bd27Smrg [m4_fatal([Libtool version $1 or higher is required], 2568e120bd27Smrg 63)])], 2569e120bd27Smrg [$2])]) 2570e120bd27Smrg 2571e120bd27Smrg 2572e120bd27Smrg# _LT_CHECK_BUILDDIR 2573e120bd27Smrg# ------------------ 2574e120bd27Smrg# Complain if the absolute build directory name contains unusual characters 2575e120bd27Smrgm4_defun([_LT_CHECK_BUILDDIR], 2576e120bd27Smrg[case `pwd` in 2577e120bd27Smrg *\ * | *\ *) 2578e120bd27Smrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 2579e120bd27Smrgesac 2580e120bd27Smrg]) 2581e120bd27Smrg 2582e120bd27Smrg 2583e120bd27Smrg# LT_INIT([OPTIONS]) 2584e120bd27Smrg# ------------------ 2585e120bd27SmrgAC_DEFUN([LT_INIT], 2586e120bd27Smrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 2587e120bd27SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 2588e120bd27SmrgAC_BEFORE([$0], [LT_LANG])dnl 2589e120bd27SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 2590e120bd27SmrgAC_BEFORE([$0], [LTDL_INIT])dnl 2591e120bd27Smrgm4_require([_LT_CHECK_BUILDDIR])dnl 2592e120bd27Smrg 2593e120bd27Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 2594e120bd27Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 2595e120bd27Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 2596e120bd27Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 2597e120bd27Smrgdnl unless we require an AC_DEFUNed macro: 2598e120bd27SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 2599e120bd27SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 2600e120bd27SmrgAC_REQUIRE([LTVERSION_VERSION])dnl 2601e120bd27SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 2602e120bd27Smrgm4_require([_LT_PROG_LTMAIN])dnl 2603e120bd27Smrg 2604e120bd27Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 2605e120bd27Smrg 2606e120bd27Smrgdnl Parse OPTIONS 2607e120bd27Smrg_LT_SET_OPTIONS([$0], [$1]) 2608e120bd27Smrg 2609e120bd27Smrg# This can be used to rebuild libtool when needed 2610e120bd27SmrgLIBTOOL_DEPS="$ltmain" 2611e120bd27Smrg 2612e120bd27Smrg# Always use our own libtool. 2613e120bd27SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 2614e120bd27SmrgAC_SUBST(LIBTOOL)dnl 2615e120bd27Smrg 2616e120bd27Smrg_LT_SETUP 2617e120bd27Smrg 2618e120bd27Smrg# Only expand once: 2619e120bd27Smrgm4_define([LT_INIT]) 2620e120bd27Smrg])# LT_INIT 2621e120bd27Smrg 2622e120bd27Smrg# Old names: 2623e120bd27SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 2624e120bd27SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 2625e120bd27Smrgdnl aclocal-1.4 backwards compatibility: 2626e120bd27Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 2627e120bd27Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 2628e120bd27Smrg 2629e120bd27Smrg 2630e120bd27Smrg# _LT_CC_BASENAME(CC) 2631e120bd27Smrg# ------------------- 2632e120bd27Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 2633e120bd27Smrgm4_defun([_LT_CC_BASENAME], 2634e120bd27Smrg[for cc_temp in $1""; do 2635e120bd27Smrg case $cc_temp in 2636e120bd27Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 2637e120bd27Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 2638e120bd27Smrg \-*) ;; 2639e120bd27Smrg *) break;; 2640e120bd27Smrg esac 2641e120bd27Smrgdone 2642e120bd27Smrgcc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 2643e120bd27Smrg]) 2644e120bd27Smrg 2645e120bd27Smrg 2646e120bd27Smrg# _LT_FILEUTILS_DEFAULTS 2647e120bd27Smrg# ---------------------- 2648e120bd27Smrg# It is okay to use these file commands and assume they have been set 2649e120bd27Smrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 2650e120bd27Smrgm4_defun([_LT_FILEUTILS_DEFAULTS], 2651e120bd27Smrg[: ${CP="cp -f"} 2652e120bd27Smrg: ${MV="mv -f"} 2653e120bd27Smrg: ${RM="rm -f"} 2654e120bd27Smrg])# _LT_FILEUTILS_DEFAULTS 2655e120bd27Smrg 2656e120bd27Smrg 2657e120bd27Smrg# _LT_SETUP 2658e120bd27Smrg# --------- 2659e120bd27Smrgm4_defun([_LT_SETUP], 2660e120bd27Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 26616c321187SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 2662e120bd27SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 2663e120bd27SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 26646c321187Smrg 2665e120bd27Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl 2666e120bd27Smrg_LT_DECL([], [host], [0])dnl 2667e120bd27Smrg_LT_DECL([], [host_os], [0])dnl 2668e120bd27Smrgdnl 2669e120bd27Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl 2670e120bd27Smrg_LT_DECL([], [build], [0])dnl 2671e120bd27Smrg_LT_DECL([], [build_os], [0])dnl 2672e120bd27Smrgdnl 2673e120bd27SmrgAC_REQUIRE([AC_PROG_CC])dnl 2674e120bd27SmrgAC_REQUIRE([LT_PATH_LD])dnl 2675e120bd27SmrgAC_REQUIRE([LT_PATH_NM])dnl 2676e120bd27Smrgdnl 26776c321187SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 2678e120bd27Smrgtest -z "$LN_S" && LN_S="ln -s" 2679e120bd27Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 26806c321187Smrgdnl 2681e120bd27SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 2682e120bd27Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 2683e120bd27Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 2684e120bd27Smrgdnl 2685e120bd27Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2686e120bd27Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 2687e120bd27Smrgm4_require([_LT_CMD_RELOAD])dnl 2688e120bd27Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 2689e120bd27Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 2690e120bd27Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 2691e120bd27Smrg 2692e120bd27Smrg_LT_CONFIG_LIBTOOL_INIT([ 2693e120bd27Smrg# See if we are running on zsh, and set the options which allow our 2694e120bd27Smrg# commands through without removal of \ escapes INIT. 2695e120bd27Smrgif test -n "\${ZSH_VERSION+set}" ; then 2696e120bd27Smrg setopt NO_GLOB_SUBST 2697e120bd27Smrgfi 2698e120bd27Smrg]) 2699e120bd27Smrgif test -n "${ZSH_VERSION+set}" ; then 2700e120bd27Smrg setopt NO_GLOB_SUBST 2701e120bd27Smrgfi 27026c321187Smrg 2703e120bd27Smrg_LT_CHECK_OBJDIR 2704e120bd27Smrg 2705e120bd27Smrgm4_require([_LT_TAG_COMPILER])dnl 27066c321187Smrg 27076c321187Smrgcase $host_os in 27086c321187Smrgaix3*) 27096c321187Smrg # AIX sometimes has problems with the GCC collect2 program. For some 27106c321187Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 27116c321187Smrg # vanish in a puff of smoke. 27126c321187Smrg if test "X${COLLECT_NAMES+set}" != Xset; then 27136c321187Smrg COLLECT_NAMES= 27146c321187Smrg export COLLECT_NAMES 27156c321187Smrg fi 27166c321187Smrg ;; 27176c321187Smrgesac 27186c321187Smrg 27196c321187Smrg# Global variables: 2720e120bd27Smrgofile=libtool 27216c321187Smrgcan_build_shared=yes 27226c321187Smrg 27236c321187Smrg# All known linkers require a `.a' archive for static linking (except MSVC, 27246c321187Smrg# which needs '.lib'). 27256c321187Smrglibext=a 27266c321187Smrg 2727e120bd27Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 27286c321187Smrg 27296c321187Smrgold_CC="$CC" 27306c321187Smrgold_CFLAGS="$CFLAGS" 27316c321187Smrg 27326c321187Smrg# Set sane defaults for various variables 27336c321187Smrgtest -z "$CC" && CC=cc 27346c321187Smrgtest -z "$LTCC" && LTCC=$CC 27356c321187Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 27366c321187Smrgtest -z "$LD" && LD=ld 27376c321187Smrgtest -z "$ac_objext" && ac_objext=o 27386c321187Smrg 27396c321187Smrg_LT_CC_BASENAME([$compiler]) 27406c321187Smrg 27416c321187Smrg# Only perform the check for file, if the check method requires it 2742e120bd27Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 27436c321187Smrgcase $deplibs_check_method in 27446c321187Smrgfile_magic*) 27456c321187Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 2746e120bd27Smrg _LT_PATH_MAGIC 27476c321187Smrg fi 27486c321187Smrg ;; 27496c321187Smrgesac 27506c321187Smrg 2751e120bd27Smrg# Use C for the default configuration in the libtool script 2752e120bd27SmrgLT_SUPPORTED_TAG([CC]) 2753e120bd27Smrg_LT_LANG_C_CONFIG 2754e120bd27Smrg_LT_LANG_DEFAULT_CONFIG 2755e120bd27Smrg_LT_CONFIG_COMMANDS 2756e120bd27Smrg])# _LT_SETUP 275793493779Smrg 27586c321187Smrg 2759e120bd27Smrg# _LT_PREPARE_SED_QUOTE_VARS 2760e120bd27Smrg# -------------------------- 2761e120bd27Smrg# Define a few sed substitution that help us do robust quoting. 2762e120bd27Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 2763e120bd27Smrg[# Backslashify metacharacters that are still active within 2764e120bd27Smrg# double-quoted strings. 2765e120bd27Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 27666c321187Smrg 2767e120bd27Smrg# Same as above, but do not quote variable references. 2768e120bd27Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 27696c321187Smrg 2770e120bd27Smrg# Sed substitution to delay expansion of an escaped shell variable in a 2771e120bd27Smrg# double_quote_subst'ed string. 2772e120bd27Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 27736c321187Smrg 2774e120bd27Smrg# Sed substitution to delay expansion of an escaped single quote. 2775e120bd27Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 27766c321187Smrg 2777e120bd27Smrg# Sed substitution to avoid accidental globbing in evaled expressions 2778e120bd27Smrgno_glob_subst='s/\*/\\\*/g' 2779e120bd27Smrg]) 27806c321187Smrg 2781e120bd27Smrg# _LT_PROG_LTMAIN 2782e120bd27Smrg# --------------- 2783e120bd27Smrg# Note that this code is called both from `configure', and `config.status' 2784e120bd27Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 2785e120bd27Smrg# `config.status' has no value for ac_aux_dir unless we are using Automake, 2786e120bd27Smrg# so we pass a copy along to make sure it has a sensible value anyway. 2787e120bd27Smrgm4_defun([_LT_PROG_LTMAIN], 2788e120bd27Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 2789e120bd27Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 2790e120bd27Smrgltmain="$ac_aux_dir/ltmain.sh" 2791e120bd27Smrg])# _LT_PROG_LTMAIN 27926c321187Smrg 27936c321187Smrg 27946c321187Smrg 2795e120bd27Smrg# So that we can recreate a full libtool script including additional 2796e120bd27Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 2797e120bd27Smrg# in macros and then make a single call at the end using the `libtool' 2798e120bd27Smrg# label. 27996c321187Smrg 28006c321187Smrg 2801e120bd27Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 2802e120bd27Smrg# ---------------------------------------- 2803e120bd27Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 2804e120bd27Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 2805e120bd27Smrg[m4_ifval([$1], 2806e120bd27Smrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 2807e120bd27Smrg [$1 2808e120bd27Smrg])])]) 28096c321187Smrg 2810e120bd27Smrg# Initialize. 2811e120bd27Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 28126c321187Smrg 28136c321187Smrg 2814e120bd27Smrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 2815e120bd27Smrg# ------------------------------ 2816e120bd27Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 2817e120bd27Smrgm4_define([_LT_CONFIG_LIBTOOL], 2818e120bd27Smrg[m4_ifval([$1], 2819e120bd27Smrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 2820e120bd27Smrg [$1 2821e120bd27Smrg])])]) 2822e120bd27Smrg 2823e120bd27Smrg# Initialize. 2824e120bd27Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 2825e120bd27Smrg 2826e120bd27Smrg 2827e120bd27Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 2828e120bd27Smrg# ----------------------------------------------------- 2829e120bd27Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 2830e120bd27Smrg[_LT_CONFIG_LIBTOOL([$1]) 2831e120bd27Smrg_LT_CONFIG_LIBTOOL_INIT([$2]) 2832e120bd27Smrg]) 28336c321187Smrg 2834e120bd27Smrg 2835e120bd27Smrg# _LT_FORMAT_COMMENT([COMMENT]) 2836e120bd27Smrg# ----------------------------- 2837e120bd27Smrg# Add leading comment marks to the start of each line, and a trailing 2838e120bd27Smrg# full-stop to the whole comment if one is not present already. 2839e120bd27Smrgm4_define([_LT_FORMAT_COMMENT], 2840e120bd27Smrg[m4_ifval([$1], [ 2841e120bd27Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 2842e120bd27Smrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 2843e120bd27Smrg)]) 2844e120bd27Smrg 2845e120bd27Smrg 2846e120bd27Smrg 2847e120bd27Smrg 2848e120bd27Smrg 2849e120bd27Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 2850e120bd27Smrg# ------------------------------------------------------------------- 2851e120bd27Smrg# CONFIGNAME is the name given to the value in the libtool script. 2852e120bd27Smrg# VARNAME is the (base) name used in the configure script. 2853e120bd27Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 2854e120bd27Smrg# VARNAME. Any other value will be used directly. 2855e120bd27Smrgm4_define([_LT_DECL], 2856e120bd27Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 2857e120bd27Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 2858e120bd27Smrg [m4_ifval([$1], [$1], [$2])]) 2859e120bd27Smrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 2860e120bd27Smrg m4_ifval([$4], 2861e120bd27Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 2862e120bd27Smrg lt_dict_add_subkey([lt_decl_dict], [$2], 2863e120bd27Smrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 2864e120bd27Smrg]) 2865e120bd27Smrg 2866e120bd27Smrg 2867e120bd27Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 2868e120bd27Smrg# -------------------------------------------------------- 2869e120bd27Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 2870e120bd27Smrg 2871e120bd27Smrg 2872e120bd27Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 2873e120bd27Smrg# ------------------------------------------------ 2874e120bd27Smrgm4_define([lt_decl_tag_varnames], 2875e120bd27Smrg[_lt_decl_filter([tagged?], [yes], $@)]) 2876e120bd27Smrg 2877e120bd27Smrg 2878e120bd27Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 2879e120bd27Smrg# --------------------------------------------------------- 2880e120bd27Smrgm4_define([_lt_decl_filter], 2881e120bd27Smrg[m4_case([$#], 2882e120bd27Smrg [0], [m4_fatal([$0: too few arguments: $#])], 2883e120bd27Smrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 2884e120bd27Smrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 2885e120bd27Smrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 2886e120bd27Smrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 2887e120bd27Smrg]) 2888e120bd27Smrg 2889e120bd27Smrg 2890e120bd27Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 2891e120bd27Smrg# -------------------------------------------------- 2892e120bd27Smrgm4_define([lt_decl_quote_varnames], 2893e120bd27Smrg[_lt_decl_filter([value], [1], $@)]) 2894e120bd27Smrg 2895e120bd27Smrg 2896e120bd27Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 2897e120bd27Smrg# --------------------------------------------------- 2898e120bd27Smrgm4_define([lt_decl_dquote_varnames], 2899e120bd27Smrg[_lt_decl_filter([value], [2], $@)]) 2900e120bd27Smrg 2901e120bd27Smrg 2902e120bd27Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 2903e120bd27Smrg# --------------------------------------------------- 2904e120bd27Smrgm4_define([lt_decl_varnames_tagged], 2905e120bd27Smrg[m4_assert([$# <= 2])dnl 2906e120bd27Smrg_$0(m4_quote(m4_default([$1], [[, ]])), 2907e120bd27Smrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 2908e120bd27Smrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 2909e120bd27Smrgm4_define([_lt_decl_varnames_tagged], 2910e120bd27Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 2911e120bd27Smrg 2912e120bd27Smrg 2913e120bd27Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 2914e120bd27Smrg# ------------------------------------------------ 2915e120bd27Smrgm4_define([lt_decl_all_varnames], 2916e120bd27Smrg[_$0(m4_quote(m4_default([$1], [[, ]])), 2917e120bd27Smrg m4_if([$2], [], 2918e120bd27Smrg m4_quote(lt_decl_varnames), 2919e120bd27Smrg m4_quote(m4_shift($@))))[]dnl 2920e120bd27Smrg]) 2921e120bd27Smrgm4_define([_lt_decl_all_varnames], 2922e120bd27Smrg[lt_join($@, lt_decl_varnames_tagged([$1], 2923e120bd27Smrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 2924e120bd27Smrg]) 2925e120bd27Smrg 2926e120bd27Smrg 2927e120bd27Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 2928e120bd27Smrg# ------------------------------------ 2929e120bd27Smrg# Quote a variable value, and forward it to `config.status' so that its 2930e120bd27Smrg# declaration there will have the same value as in `configure'. VARNAME 2931e120bd27Smrg# must have a single quote delimited value for this to work. 2932e120bd27Smrgm4_define([_LT_CONFIG_STATUS_DECLARE], 2933e120bd27Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 2934e120bd27Smrg 2935e120bd27Smrg 2936e120bd27Smrg# _LT_CONFIG_STATUS_DECLARATIONS 2937e120bd27Smrg# ------------------------------ 2938e120bd27Smrg# We delimit libtool config variables with single quotes, so when 2939e120bd27Smrg# we write them to config.status, we have to be sure to quote all 2940e120bd27Smrg# embedded single quotes properly. In configure, this macro expands 2941e120bd27Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 2942e120bd27Smrg# 2943e120bd27Smrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 2944e120bd27Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 2945e120bd27Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 2946e120bd27Smrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 2947e120bd27Smrg 2948e120bd27Smrg 2949e120bd27Smrg# _LT_LIBTOOL_TAGS 2950e120bd27Smrg# ---------------- 2951e120bd27Smrg# Output comment and list of tags supported by the script 2952e120bd27Smrgm4_defun([_LT_LIBTOOL_TAGS], 2953e120bd27Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 2954e120bd27Smrgavailable_tags="_LT_TAGS"dnl 2955e120bd27Smrg]) 2956e120bd27Smrg 2957e120bd27Smrg 2958e120bd27Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 2959e120bd27Smrg# ----------------------------------- 2960e120bd27Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and 2961e120bd27Smrg# expand to a commented shell variable setting: 2962e120bd27Smrg# 2963e120bd27Smrg# # Some comment about what VAR is for. 2964e120bd27Smrg# visible_name=$lt_internal_name 2965e120bd27Smrgm4_define([_LT_LIBTOOL_DECLARE], 2966e120bd27Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 2967e120bd27Smrg [description])))[]dnl 2968e120bd27Smrgm4_pushdef([_libtool_name], 2969e120bd27Smrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 2970e120bd27Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 2971e120bd27Smrg [0], [_libtool_name=[$]$1], 2972e120bd27Smrg [1], [_libtool_name=$lt_[]$1], 2973e120bd27Smrg [2], [_libtool_name=$lt_[]$1], 2974e120bd27Smrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 2975e120bd27Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 2976e120bd27Smrg]) 2977e120bd27Smrg 2978e120bd27Smrg 2979e120bd27Smrg# _LT_LIBTOOL_CONFIG_VARS 2980e120bd27Smrg# ----------------------- 2981e120bd27Smrg# Produce commented declarations of non-tagged libtool config variables 2982e120bd27Smrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 2983e120bd27Smrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 2984e120bd27Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 2985e120bd27Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 2986e120bd27Smrg[m4_foreach([_lt_var], 2987e120bd27Smrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 2988e120bd27Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 2989e120bd27Smrg 2990e120bd27Smrg 2991e120bd27Smrg# _LT_LIBTOOL_TAG_VARS(TAG) 2992e120bd27Smrg# ------------------------- 2993e120bd27Smrgm4_define([_LT_LIBTOOL_TAG_VARS], 2994e120bd27Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 2995e120bd27Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 2996e120bd27Smrg 2997e120bd27Smrg 2998e120bd27Smrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 2999e120bd27Smrg# ------------------------------ 3000e120bd27Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 3001e120bd27Smrg 3002e120bd27Smrg 3003e120bd27Smrg# _LT_CONFIG_COMMANDS 3004e120bd27Smrg# ------------------- 3005e120bd27Smrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 3006e120bd27Smrg# variables for single and double quote escaping we saved from calls 3007e120bd27Smrg# to _LT_DECL, we can put quote escaped variables declarations 3008e120bd27Smrg# into `config.status', and then the shell code to quote escape them in 3009e120bd27Smrg# for loops in `config.status'. Finally, any additional code accumulated 3010e120bd27Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 3011e120bd27Smrgm4_defun([_LT_CONFIG_COMMANDS], 3012e120bd27Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 3013e120bd27Smrg dnl If the libtool generation code has been placed in $CONFIG_LT, 3014e120bd27Smrg dnl instead of duplicating it all over again into config.status, 3015e120bd27Smrg dnl then we will have config.status run $CONFIG_LT later, so it 3016e120bd27Smrg dnl needs to know what name is stored there: 3017e120bd27Smrg [AC_CONFIG_COMMANDS([libtool], 3018e120bd27Smrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 3019e120bd27Smrg dnl If the libtool generation code is destined for config.status, 3020e120bd27Smrg dnl expand the accumulated commands and init code now: 3021e120bd27Smrg [AC_CONFIG_COMMANDS([libtool], 3022e120bd27Smrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 3023e120bd27Smrg])#_LT_CONFIG_COMMANDS 3024e120bd27Smrg 3025e120bd27Smrg 3026e120bd27Smrg# Initialize. 3027e120bd27Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 3028e120bd27Smrg[ 3029e120bd27Smrg 3030e120bd27Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 3031e120bd27Smrg# if CDPATH is set. 3032e120bd27Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 3033e120bd27Smrg 3034e120bd27Smrgsed_quote_subst='$sed_quote_subst' 3035e120bd27Smrgdouble_quote_subst='$double_quote_subst' 3036e120bd27Smrgdelay_variable_subst='$delay_variable_subst' 3037e120bd27Smrg_LT_CONFIG_STATUS_DECLARATIONS 3038e120bd27SmrgLTCC='$LTCC' 3039e120bd27SmrgLTCFLAGS='$LTCFLAGS' 3040e120bd27Smrgcompiler='$compiler_DEFAULT' 3041e120bd27Smrg 3042e120bd27Smrg# A function that is used when there is no print builtin or printf. 3043e120bd27Smrgfunc_fallback_echo () 3044e120bd27Smrg{ 3045e120bd27Smrg eval 'cat <<_LTECHO_EOF 3046e120bd27Smrg\$[]1 3047e120bd27Smrg_LTECHO_EOF' 3048e120bd27Smrg} 3049e120bd27Smrg 3050e120bd27Smrg# Quote evaled strings. 3051e120bd27Smrgfor var in lt_decl_all_varnames([[ \ 3052e120bd27Smrg]], lt_decl_quote_varnames); do 3053e120bd27Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 3054e120bd27Smrg *[[\\\\\\\`\\"\\\$]]*) 3055e120bd27Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 3056e120bd27Smrg ;; 3057e120bd27Smrg *) 3058e120bd27Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 3059e120bd27Smrg ;; 3060e120bd27Smrg esac 3061e120bd27Smrgdone 3062e120bd27Smrg 3063e120bd27Smrg# Double-quote double-evaled strings. 3064e120bd27Smrgfor var in lt_decl_all_varnames([[ \ 3065e120bd27Smrg]], lt_decl_dquote_varnames); do 3066e120bd27Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 3067e120bd27Smrg *[[\\\\\\\`\\"\\\$]]*) 3068e120bd27Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 3069e120bd27Smrg ;; 3070e120bd27Smrg *) 3071e120bd27Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 3072e120bd27Smrg ;; 3073e120bd27Smrg esac 3074e120bd27Smrgdone 3075e120bd27Smrg 3076e120bd27Smrg_LT_OUTPUT_LIBTOOL_INIT 3077e120bd27Smrg]) 3078e120bd27Smrg 3079e120bd27Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 3080e120bd27Smrg# ------------------------------------ 3081e120bd27Smrg# Generate a child script FILE with all initialization necessary to 3082e120bd27Smrg# reuse the environment learned by the parent script, and make the 3083e120bd27Smrg# file executable. If COMMENT is supplied, it is inserted after the 3084e120bd27Smrg# `#!' sequence but before initialization text begins. After this 3085e120bd27Smrg# macro, additional text can be appended to FILE to form the body of 3086e120bd27Smrg# the child script. The macro ends with non-zero status if the 3087e120bd27Smrg# file could not be fully written (such as if the disk is full). 3088e120bd27Smrgm4_ifdef([AS_INIT_GENERATED], 3089e120bd27Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 3090e120bd27Smrg[m4_defun([_LT_GENERATED_FILE_INIT], 3091e120bd27Smrg[m4_require([AS_PREPARE])]dnl 3092e120bd27Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 3093e120bd27Smrg[lt_write_fail=0 3094e120bd27Smrgcat >$1 <<_ASEOF || lt_write_fail=1 3095e120bd27Smrg#! $SHELL 3096e120bd27Smrg# Generated by $as_me. 3097e120bd27Smrg$2 3098e120bd27SmrgSHELL=\${CONFIG_SHELL-$SHELL} 3099e120bd27Smrgexport SHELL 3100e120bd27Smrg_ASEOF 3101e120bd27Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1 3102e120bd27SmrgAS_SHELL_SANITIZE 3103e120bd27Smrg_AS_PREPARE 3104e120bd27Smrgexec AS_MESSAGE_FD>&1 3105e120bd27Smrg_ASEOF 3106e120bd27Smrgtest $lt_write_fail = 0 && chmod +x $1[]dnl 3107e120bd27Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 3108e120bd27Smrg 3109e120bd27Smrg# LT_OUTPUT 3110e120bd27Smrg# --------- 3111e120bd27Smrg# This macro allows early generation of the libtool script (before 3112e120bd27Smrg# AC_OUTPUT is called), incase it is used in configure for compilation 3113e120bd27Smrg# tests. 3114e120bd27SmrgAC_DEFUN([LT_OUTPUT], 3115e120bd27Smrg[: ${CONFIG_LT=./config.lt} 3116e120bd27SmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 3117e120bd27Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 3118e120bd27Smrg[# Run this file to recreate a libtool stub with the current configuration.]) 3119e120bd27Smrg 3120e120bd27Smrgcat >>"$CONFIG_LT" <<\_LTEOF 3121e120bd27Smrglt_cl_silent=false 3122e120bd27Smrgexec AS_MESSAGE_LOG_FD>>config.log 3123e120bd27Smrg{ 3124e120bd27Smrg echo 3125e120bd27Smrg AS_BOX([Running $as_me.]) 3126e120bd27Smrg} >&AS_MESSAGE_LOG_FD 3127e120bd27Smrg 3128e120bd27Smrglt_cl_help="\ 3129e120bd27Smrg\`$as_me' creates a local libtool stub from the current configuration, 3130e120bd27Smrgfor use in further configure time tests before the real libtool is 3131e120bd27Smrggenerated. 3132e120bd27Smrg 3133e120bd27SmrgUsage: $[0] [[OPTIONS]] 3134e120bd27Smrg 3135e120bd27Smrg -h, --help print this help, then exit 3136e120bd27Smrg -V, --version print version number, then exit 3137e120bd27Smrg -q, --quiet do not print progress messages 3138e120bd27Smrg -d, --debug don't remove temporary files 3139e120bd27Smrg 3140e120bd27SmrgReport bugs to <bug-libtool@gnu.org>." 3141e120bd27Smrg 3142e120bd27Smrglt_cl_version="\ 3143e120bd27Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 3144e120bd27Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 3145e120bd27Smrgconfigured by $[0], generated by m4_PACKAGE_STRING. 3146e120bd27Smrg 3147e120bd27SmrgCopyright (C) 2010 Free Software Foundation, Inc. 3148e120bd27SmrgThis config.lt script is free software; the Free Software Foundation 3149e120bd27Smrggives unlimited permision to copy, distribute and modify it." 3150e120bd27Smrg 3151e120bd27Smrgwhile test $[#] != 0 3152e120bd27Smrgdo 3153e120bd27Smrg case $[1] in 3154e120bd27Smrg --version | --v* | -V ) 3155e120bd27Smrg echo "$lt_cl_version"; exit 0 ;; 3156e120bd27Smrg --help | --h* | -h ) 3157e120bd27Smrg echo "$lt_cl_help"; exit 0 ;; 3158e120bd27Smrg --debug | --d* | -d ) 3159e120bd27Smrg debug=: ;; 3160e120bd27Smrg --quiet | --q* | --silent | --s* | -q ) 3161e120bd27Smrg lt_cl_silent=: ;; 3162e120bd27Smrg 3163e120bd27Smrg -*) AC_MSG_ERROR([unrecognized option: $[1] 3164e120bd27SmrgTry \`$[0] --help' for more information.]) ;; 3165e120bd27Smrg 3166e120bd27Smrg *) AC_MSG_ERROR([unrecognized argument: $[1] 3167e120bd27SmrgTry \`$[0] --help' for more information.]) ;; 3168e120bd27Smrg esac 3169e120bd27Smrg shift 3170e120bd27Smrgdone 3171e120bd27Smrg 3172e120bd27Smrgif $lt_cl_silent; then 3173e120bd27Smrg exec AS_MESSAGE_FD>/dev/null 3174e120bd27Smrgfi 3175e120bd27Smrg_LTEOF 3176e120bd27Smrg 3177e120bd27Smrgcat >>"$CONFIG_LT" <<_LTEOF 3178e120bd27Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 3179e120bd27Smrg_LTEOF 3180e120bd27Smrg 3181e120bd27Smrgcat >>"$CONFIG_LT" <<\_LTEOF 3182e120bd27SmrgAC_MSG_NOTICE([creating $ofile]) 3183e120bd27Smrg_LT_OUTPUT_LIBTOOL_COMMANDS 3184e120bd27SmrgAS_EXIT(0) 3185e120bd27Smrg_LTEOF 3186e120bd27Smrgchmod +x "$CONFIG_LT" 3187e120bd27Smrg 3188e120bd27Smrg# configure is writing to config.log, but config.lt does its own redirection, 3189e120bd27Smrg# appending to config.log, which fails on DOS, as config.log is still kept 3190e120bd27Smrg# open by configure. Here we exec the FD to /dev/null, effectively closing 3191e120bd27Smrg# config.log, so it can be properly (re)opened and appended to by config.lt. 3192e120bd27Smrglt_cl_success=: 3193e120bd27Smrgtest "$silent" = yes && 3194e120bd27Smrg lt_config_lt_args="$lt_config_lt_args --quiet" 3195e120bd27Smrgexec AS_MESSAGE_LOG_FD>/dev/null 3196e120bd27Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 3197e120bd27Smrgexec AS_MESSAGE_LOG_FD>>config.log 3198e120bd27Smrg$lt_cl_success || AS_EXIT(1) 3199e120bd27Smrg])# LT_OUTPUT 3200e120bd27Smrg 3201e120bd27Smrg 3202e120bd27Smrg# _LT_CONFIG(TAG) 3203e120bd27Smrg# --------------- 3204e120bd27Smrg# If TAG is the built-in tag, create an initial libtool script with a 3205e120bd27Smrg# default configuration from the untagged config vars. Otherwise add code 3206e120bd27Smrg# to config.status for appending the configuration named by TAG from the 3207e120bd27Smrg# matching tagged config vars. 3208e120bd27Smrgm4_defun([_LT_CONFIG], 3209e120bd27Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 3210e120bd27Smrg_LT_CONFIG_SAVE_COMMANDS([ 3211e120bd27Smrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 3212e120bd27Smrg m4_if(_LT_TAG, [C], [ 3213e120bd27Smrg # See if we are running on zsh, and set the options which allow our 3214e120bd27Smrg # commands through without removal of \ escapes. 3215e120bd27Smrg if test -n "${ZSH_VERSION+set}" ; then 3216e120bd27Smrg setopt NO_GLOB_SUBST 3217e120bd27Smrg fi 3218e120bd27Smrg 3219e120bd27Smrg cfgfile="${ofile}T" 3220e120bd27Smrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 3221e120bd27Smrg $RM "$cfgfile" 3222e120bd27Smrg 3223e120bd27Smrg cat <<_LT_EOF >> "$cfgfile" 3224e120bd27Smrg#! $SHELL 3225e120bd27Smrg 3226e120bd27Smrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 3227e120bd27Smrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 3228e120bd27Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 3229e120bd27Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 3230e120bd27Smrg# 3231e120bd27Smrg_LT_COPYING 3232e120bd27Smrg_LT_LIBTOOL_TAGS 3233e120bd27Smrg 3234e120bd27Smrg# ### BEGIN LIBTOOL CONFIG 3235e120bd27Smrg_LT_LIBTOOL_CONFIG_VARS 3236e120bd27Smrg_LT_LIBTOOL_TAG_VARS 3237e120bd27Smrg# ### END LIBTOOL CONFIG 3238e120bd27Smrg 3239e120bd27Smrg_LT_EOF 3240e120bd27Smrg 3241e120bd27Smrg case $host_os in 3242e120bd27Smrg aix3*) 3243e120bd27Smrg cat <<\_LT_EOF >> "$cfgfile" 3244e120bd27Smrg# AIX sometimes has problems with the GCC collect2 program. For some 3245e120bd27Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 3246e120bd27Smrg# vanish in a puff of smoke. 3247e120bd27Smrgif test "X${COLLECT_NAMES+set}" != Xset; then 3248e120bd27Smrg COLLECT_NAMES= 3249e120bd27Smrg export COLLECT_NAMES 3250e120bd27Smrgfi 3251e120bd27Smrg_LT_EOF 3252e120bd27Smrg ;; 3253e120bd27Smrg esac 3254e120bd27Smrg 3255e120bd27Smrg _LT_PROG_LTMAIN 3256e120bd27Smrg 3257e120bd27Smrg # We use sed instead of cat because bash on DJGPP gets confused if 3258e120bd27Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 3259e120bd27Smrg # text mode, it properly converts lines to CR/LF. This bash problem 3260e120bd27Smrg # is reportedly fixed, but why not run on old versions too? 3261e120bd27Smrg sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ 3262e120bd27Smrg || (rm -f "$cfgfile"; exit 1) 3263e120bd27Smrg 3264e120bd27Smrg _LT_PROG_XSI_SHELLFNS 3265e120bd27Smrg 3266e120bd27Smrg sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ 3267e120bd27Smrg || (rm -f "$cfgfile"; exit 1) 3268e120bd27Smrg 3269e120bd27Smrg mv -f "$cfgfile" "$ofile" || 3270e120bd27Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 3271e120bd27Smrg chmod +x "$ofile" 3272e120bd27Smrg], 3273e120bd27Smrg[cat <<_LT_EOF >> "$ofile" 3274e120bd27Smrg 3275e120bd27Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 3276e120bd27Smrgdnl in a comment (ie after a #). 3277e120bd27Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1 3278e120bd27Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 3279e120bd27Smrg# ### END LIBTOOL TAG CONFIG: $1 3280e120bd27Smrg_LT_EOF 3281e120bd27Smrg])dnl /m4_if 3282e120bd27Smrg], 3283e120bd27Smrg[m4_if([$1], [], [ 3284e120bd27Smrg PACKAGE='$PACKAGE' 3285e120bd27Smrg VERSION='$VERSION' 3286e120bd27Smrg TIMESTAMP='$TIMESTAMP' 3287e120bd27Smrg RM='$RM' 3288e120bd27Smrg ofile='$ofile'], []) 3289e120bd27Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS 3290e120bd27Smrg])# _LT_CONFIG 3291e120bd27Smrg 3292e120bd27Smrg 3293e120bd27Smrg# LT_SUPPORTED_TAG(TAG) 3294e120bd27Smrg# --------------------- 3295e120bd27Smrg# Trace this macro to discover what tags are supported by the libtool 3296e120bd27Smrg# --tag option, using: 3297e120bd27Smrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 3298e120bd27SmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 3299e120bd27Smrg 3300e120bd27Smrg 3301e120bd27Smrg# C support is built-in for now 3302e120bd27Smrgm4_define([_LT_LANG_C_enabled], []) 3303e120bd27Smrgm4_define([_LT_TAGS], []) 3304e120bd27Smrg 3305e120bd27Smrg 3306e120bd27Smrg# LT_LANG(LANG) 3307e120bd27Smrg# ------------- 3308e120bd27Smrg# Enable libtool support for the given language if not already enabled. 3309e120bd27SmrgAC_DEFUN([LT_LANG], 3310e120bd27Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 3311e120bd27Smrgm4_case([$1], 3312e120bd27Smrg [C], [_LT_LANG(C)], 3313e120bd27Smrg [C++], [_LT_LANG(CXX)], 3314e120bd27Smrg [Java], [_LT_LANG(GCJ)], 3315e120bd27Smrg [Fortran 77], [_LT_LANG(F77)], 3316e120bd27Smrg [Fortran], [_LT_LANG(FC)], 3317e120bd27Smrg [Windows Resource], [_LT_LANG(RC)], 3318e120bd27Smrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 3319e120bd27Smrg [_LT_LANG($1)], 3320e120bd27Smrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 3321e120bd27Smrg])# LT_LANG 3322e120bd27Smrg 3323e120bd27Smrg 3324e120bd27Smrg# _LT_LANG(LANGNAME) 3325e120bd27Smrg# ------------------ 3326e120bd27Smrgm4_defun([_LT_LANG], 3327e120bd27Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 3328e120bd27Smrg [LT_SUPPORTED_TAG([$1])dnl 3329e120bd27Smrg m4_append([_LT_TAGS], [$1 ])dnl 3330e120bd27Smrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 3331e120bd27Smrg _LT_LANG_$1_CONFIG($1)])dnl 3332e120bd27Smrg])# _LT_LANG 3333e120bd27Smrg 3334e120bd27Smrg 3335e120bd27Smrg# _LT_LANG_DEFAULT_CONFIG 3336e120bd27Smrg# ----------------------- 3337e120bd27Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 3338e120bd27Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 3339e120bd27Smrg [LT_LANG(CXX)], 3340e120bd27Smrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 3341e120bd27Smrg 3342e120bd27SmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 3343e120bd27Smrg [LT_LANG(F77)], 3344e120bd27Smrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 3345e120bd27Smrg 3346e120bd27SmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 3347e120bd27Smrg [LT_LANG(FC)], 3348e120bd27Smrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 3349e120bd27Smrg 3350e120bd27Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 3351e120bd27Smrgdnl pulling things in needlessly. 3352e120bd27SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 3353e120bd27Smrg [LT_LANG(GCJ)], 3354e120bd27Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 3355e120bd27Smrg [LT_LANG(GCJ)], 3356e120bd27Smrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 3357e120bd27Smrg [LT_LANG(GCJ)], 3358e120bd27Smrg [m4_ifdef([AC_PROG_GCJ], 3359e120bd27Smrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 3360e120bd27Smrg m4_ifdef([A][M_PROG_GCJ], 3361e120bd27Smrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 3362e120bd27Smrg m4_ifdef([LT_PROG_GCJ], 3363e120bd27Smrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 3364e120bd27Smrg 3365e120bd27SmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 3366e120bd27Smrg [LT_LANG(RC)], 3367e120bd27Smrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 3368e120bd27Smrg])# _LT_LANG_DEFAULT_CONFIG 3369e120bd27Smrg 3370e120bd27Smrg# Obsolete macros: 3371e120bd27SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 3372e120bd27SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 3373e120bd27SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 3374e120bd27SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 3375e120bd27SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 3376e120bd27Smrgdnl aclocal-1.4 backwards compatibility: 3377e120bd27Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 3378e120bd27Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 3379e120bd27Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 3380e120bd27Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 3381e120bd27Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 3382e120bd27Smrg 3383e120bd27Smrg 3384e120bd27Smrg# _LT_TAG_COMPILER 3385e120bd27Smrg# ---------------- 3386e120bd27Smrgm4_defun([_LT_TAG_COMPILER], 3387e120bd27Smrg[AC_REQUIRE([AC_PROG_CC])dnl 3388e120bd27Smrg 3389e120bd27Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 3390e120bd27Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 3391e120bd27Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 3392e120bd27Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 3393e120bd27Smrg 3394e120bd27Smrg# If no C compiler was specified, use CC. 3395e120bd27SmrgLTCC=${LTCC-"$CC"} 3396e120bd27Smrg 3397e120bd27Smrg# If no C compiler flags were specified, use CFLAGS. 3398e120bd27SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 3399e120bd27Smrg 3400e120bd27Smrg# Allow CC to be a program name with arguments. 3401e120bd27Smrgcompiler=$CC 3402e120bd27Smrg])# _LT_TAG_COMPILER 3403e120bd27Smrg 3404e120bd27Smrg 3405e120bd27Smrg# _LT_COMPILER_BOILERPLATE 3406e120bd27Smrg# ------------------------ 3407e120bd27Smrg# Check for compiler boilerplate output or warnings with 3408e120bd27Smrg# the simple compiler test code. 3409e120bd27Smrgm4_defun([_LT_COMPILER_BOILERPLATE], 3410e120bd27Smrg[m4_require([_LT_DECL_SED])dnl 3411e120bd27Smrgac_outfile=conftest.$ac_objext 3412e120bd27Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 3413e120bd27Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 3414e120bd27Smrg_lt_compiler_boilerplate=`cat conftest.err` 3415e120bd27Smrg$RM conftest* 3416e120bd27Smrg])# _LT_COMPILER_BOILERPLATE 3417e120bd27Smrg 3418e120bd27Smrg 3419e120bd27Smrg# _LT_LINKER_BOILERPLATE 3420e120bd27Smrg# ---------------------- 3421e120bd27Smrg# Check for linker boilerplate output or warnings with 3422e120bd27Smrg# the simple link test code. 3423e120bd27Smrgm4_defun([_LT_LINKER_BOILERPLATE], 3424e120bd27Smrg[m4_require([_LT_DECL_SED])dnl 3425e120bd27Smrgac_outfile=conftest.$ac_objext 3426e120bd27Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 3427e120bd27Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 3428e120bd27Smrg_lt_linker_boilerplate=`cat conftest.err` 3429e120bd27Smrg$RM -r conftest* 3430e120bd27Smrg])# _LT_LINKER_BOILERPLATE 3431e120bd27Smrg 3432e120bd27Smrg# _LT_REQUIRED_DARWIN_CHECKS 3433e120bd27Smrg# ------------------------- 3434e120bd27Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 343593493779Smrg case $host_os in 343693493779Smrg rhapsody* | darwin*) 343793493779Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 343893493779Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 3439e120bd27Smrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 3440e120bd27Smrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 3441e120bd27Smrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 3442e120bd27Smrg _LT_DECL([], [DSYMUTIL], [1], 3443e120bd27Smrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 3444e120bd27Smrg _LT_DECL([], [NMEDIT], [1], 3445e120bd27Smrg [Tool to change global to local symbols on Mac OS X]) 3446e120bd27Smrg _LT_DECL([], [LIPO], [1], 3447e120bd27Smrg [Tool to manipulate fat objects and archives on Mac OS X]) 3448e120bd27Smrg _LT_DECL([], [OTOOL], [1], 3449e120bd27Smrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 3450e120bd27Smrg _LT_DECL([], [OTOOL64], [1], 3451e120bd27Smrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 345293493779Smrg 345393493779Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 345493493779Smrg [lt_cv_apple_cc_single_mod=no 345593493779Smrg if test -z "${LT_MULTI_MODULE}"; then 3456e120bd27Smrg # By default we will add the -single_module flag. You can override 3457e120bd27Smrg # by either setting the environment variable LT_MULTI_MODULE 3458e120bd27Smrg # non-empty at configure time, or by adding -multi_module to the 3459e120bd27Smrg # link flags. 3460e120bd27Smrg rm -rf libconftest.dylib* 3461e120bd27Smrg echo "int foo(void){return 1;}" > conftest.c 3462e120bd27Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 3463e120bd27Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 3464e120bd27Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 3465e120bd27Smrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 3466e120bd27Smrg _lt_result=$? 3467e120bd27Smrg if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then 3468e120bd27Smrg lt_cv_apple_cc_single_mod=yes 3469e120bd27Smrg else 3470e120bd27Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 3471e120bd27Smrg fi 3472e120bd27Smrg rm -rf libconftest.dylib* 3473e120bd27Smrg rm -f conftest.* 347493493779Smrg fi]) 347593493779Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 347693493779Smrg [lt_cv_ld_exported_symbols_list], 347793493779Smrg [lt_cv_ld_exported_symbols_list=no 347893493779Smrg save_LDFLAGS=$LDFLAGS 347993493779Smrg echo "_main" > conftest.sym 348093493779Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 348193493779Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 3482e120bd27Smrg [lt_cv_ld_exported_symbols_list=yes], 3483e120bd27Smrg [lt_cv_ld_exported_symbols_list=no]) 3484e120bd27Smrg LDFLAGS="$save_LDFLAGS" 3485e120bd27Smrg ]) 3486e120bd27Smrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 3487e120bd27Smrg [lt_cv_ld_force_load=no 3488e120bd27Smrg cat > conftest.c << _LT_EOF 3489e120bd27Smrgint forced_loaded() { return 2;} 3490e120bd27Smrg_LT_EOF 3491e120bd27Smrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 3492e120bd27Smrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 3493e120bd27Smrg echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 3494e120bd27Smrg $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 3495e120bd27Smrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 3496e120bd27Smrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 3497e120bd27Smrg cat > conftest.c << _LT_EOF 3498e120bd27Smrgint main() { return 0;} 3499e120bd27Smrg_LT_EOF 3500e120bd27Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 3501e120bd27Smrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 3502e120bd27Smrg _lt_result=$? 3503e120bd27Smrg if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then 3504e120bd27Smrg lt_cv_ld_force_load=yes 3505e120bd27Smrg else 3506e120bd27Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 3507e120bd27Smrg fi 3508e120bd27Smrg rm -f conftest.err libconftest.a conftest conftest.c 3509e120bd27Smrg rm -rf conftest.dSYM 351093493779Smrg ]) 351193493779Smrg case $host_os in 3512e120bd27Smrg rhapsody* | darwin1.[[012]]) 351393493779Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 351493493779Smrg darwin1.*) 3515e120bd27Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 3516e120bd27Smrg darwin*) # darwin 5.x on 351793493779Smrg # if running on 10.5 or later, the deployment target defaults 351893493779Smrg # to the OS version, if on x86, and 10.4, the deployment 351993493779Smrg # target defaults to 10.4. Don't you love it? 352093493779Smrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 3521e120bd27Smrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 3522e120bd27Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 3523e120bd27Smrg 10.[[012]]*) 3524e120bd27Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 3525e120bd27Smrg 10.*) 3526e120bd27Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 352793493779Smrg esac 352893493779Smrg ;; 352993493779Smrg esac 353093493779Smrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 353193493779Smrg _lt_dar_single_mod='$single_module' 353293493779Smrg fi 353393493779Smrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 353493493779Smrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 353593493779Smrg else 3536e120bd27Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 353793493779Smrg fi 3538e120bd27Smrg if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then 3539e120bd27Smrg _lt_dsymutil='~$DSYMUTIL $lib || :' 354093493779Smrg else 354193493779Smrg _lt_dsymutil= 354293493779Smrg fi 354393493779Smrg ;; 354493493779Smrg esac 354593493779Smrg]) 35466c321187Smrg 3547e120bd27Smrg 3548e120bd27Smrg# _LT_DARWIN_LINKER_FEATURES 3549e120bd27Smrg# -------------------------- 3550e120bd27Smrg# Checks for linker and compiler features on darwin 3551e120bd27Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 3552e120bd27Smrg[ 3553e120bd27Smrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 3554e120bd27Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 3555e120bd27Smrg _LT_TAGVAR(hardcode_direct, $1)=no 3556e120bd27Smrg _LT_TAGVAR(hardcode_automatic, $1)=yes 3557e120bd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 3558e120bd27Smrg if test "$lt_cv_ld_force_load" = "yes"; then 3559e120bd27Smrg _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\"`' 3560e120bd27Smrg else 3561e120bd27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 3562e120bd27Smrg fi 3563e120bd27Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 3564e120bd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 3565e120bd27Smrg case $cc_basename in 3566e120bd27Smrg ifort*) _lt_dar_can_shared=yes ;; 3567e120bd27Smrg *) _lt_dar_can_shared=$GCC ;; 3568e120bd27Smrg esac 3569e120bd27Smrg if test "$_lt_dar_can_shared" = "yes"; then 3570e120bd27Smrg output_verbose_link_cmd=func_echo_all 3571e120bd27Smrg _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}" 3572e120bd27Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 3573e120bd27Smrg _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}" 3574e120bd27Smrg _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}" 3575e120bd27Smrg m4_if([$1], [CXX], 3576e120bd27Smrg[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 3577e120bd27Smrg _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}" 3578e120bd27Smrg _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}" 3579e120bd27Smrg fi 3580e120bd27Smrg],[]) 3581e120bd27Smrg else 3582e120bd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 3583e120bd27Smrg fi 3584e120bd27Smrg]) 3585e120bd27Smrg 3586e120bd27Smrg# _LT_SYS_MODULE_PATH_AIX 3587e120bd27Smrg# ----------------------- 35886c321187Smrg# Links a minimal program and checks the executable 35896c321187Smrg# for the system default hardcoded library path. In most cases, 35906c321187Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 35916c321187Smrg# the location of the communication and MPI libs are included too. 35926c321187Smrg# If we don't find anything, use the default library path according 35936c321187Smrg# to the aix ld manual. 3594e120bd27Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 3595e120bd27Smrg[m4_require([_LT_DECL_SED])dnl 359693493779SmrgAC_LINK_IFELSE(AC_LANG_PROGRAM,[ 359793493779Smrglt_aix_libpath_sed=' 359893493779Smrg /Import File Strings/,/^$/ { 359993493779Smrg /^0/ { 360093493779Smrg s/^0 *\(.*\)$/\1/ 360193493779Smrg p 360293493779Smrg } 360393493779Smrg }' 360493493779Smrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 36056c321187Smrg# Check for a 64-bit object if we didn't find anything. 360693493779Smrgif test -z "$aix_libpath"; then 360793493779Smrg aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 360893493779Smrgfi],[]) 36096c321187Smrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 3610e120bd27Smrg])# _LT_SYS_MODULE_PATH_AIX 36116c321187Smrg 36126c321187Smrg 3613e120bd27Smrg# _LT_SHELL_INIT(ARG) 3614e120bd27Smrg# ------------------- 3615e120bd27Smrgm4_define([_LT_SHELL_INIT], 3616e120bd27Smrg[m4_divert_text([M4SH-INIT], [$1 3617e120bd27Smrg])])# _LT_SHELL_INIT 36186c321187Smrg 36196c321187Smrg 36206c321187Smrg 3621e120bd27Smrg# _LT_PROG_ECHO_BACKSLASH 3622e120bd27Smrg# ----------------------- 3623e120bd27Smrg# Find how we can fake an echo command that does not interpret backslash. 3624e120bd27Smrg# In particular, with Autoconf 2.60 or later we add some code to the start 3625e120bd27Smrg# of the generated configure script which will find a shell with a builtin 3626e120bd27Smrg# printf (which we can use as an echo command). 3627e120bd27Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 3628e120bd27Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 3629e120bd27SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 3630e120bd27SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 3631e120bd27Smrg 3632e120bd27SmrgAC_MSG_CHECKING([how to print strings]) 3633e120bd27Smrg# Test print first, because it will be a builtin if present. 3634e120bd27Smrgif test "X`print -r -- -n 2>/dev/null`" = X-n && \ 3635e120bd27Smrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 3636e120bd27Smrg ECHO='print -r --' 3637e120bd27Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 3638e120bd27Smrg ECHO='printf %s\n' 36396c321187Smrgelse 3640e120bd27Smrg # Use this function as a fallback that always works. 3641e120bd27Smrg func_fallback_echo () 3642e120bd27Smrg { 3643e120bd27Smrg eval 'cat <<_LTECHO_EOF 3644e120bd27Smrg$[]1 3645e120bd27Smrg_LTECHO_EOF' 3646e120bd27Smrg } 3647e120bd27Smrg ECHO='func_fallback_echo' 36486c321187Smrgfi 36496c321187Smrg 3650e120bd27Smrg# func_echo_all arg... 3651e120bd27Smrg# Invoke $ECHO with all args, space-separated. 3652e120bd27Smrgfunc_echo_all () 3653e120bd27Smrg{ 3654e120bd27Smrg $ECHO "$*" 3655e120bd27Smrg} 36566c321187Smrg 3657e120bd27Smrgcase "$ECHO" in 3658e120bd27Smrg printf*) AC_MSG_RESULT([printf]) ;; 3659e120bd27Smrg print*) AC_MSG_RESULT([print -r]) ;; 3660e120bd27Smrg *) AC_MSG_RESULT([cat]) ;; 3661e120bd27Smrgesac 36626c321187Smrg 3663e120bd27Smrgm4_ifdef([_AS_DETECT_SUGGESTED], 3664e120bd27Smrg[_AS_DETECT_SUGGESTED([ 3665e120bd27Smrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 3666e120bd27Smrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 3667e120bd27Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 3668e120bd27Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 3669e120bd27Smrg PATH=/empty FPATH=/empty; export PATH FPATH 3670e120bd27Smrg test "X`printf %s $ECHO`" = "X$ECHO" \ 3671e120bd27Smrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 36726c321187Smrg 3673e120bd27Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 3674e120bd27Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 3675e120bd27Smrg])# _LT_PROG_ECHO_BACKSLASH 36766c321187Smrg 36776c321187Smrg 3678e120bd27Smrg# _LT_ENABLE_LOCK 3679e120bd27Smrg# --------------- 3680e120bd27Smrgm4_defun([_LT_ENABLE_LOCK], 36816c321187Smrg[AC_ARG_ENABLE([libtool-lock], 3682e120bd27Smrg [AS_HELP_STRING([--disable-libtool-lock], 3683e120bd27Smrg [avoid locking (might break parallel builds)])]) 36846c321187Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 36856c321187Smrg 36866c321187Smrg# Some flags need to be propagated to the compiler or linker for good 36876c321187Smrg# libtool support. 36886c321187Smrgcase $host in 36896c321187Smrgia64-*-hpux*) 36906c321187Smrg # Find out which ABI we are using. 36916c321187Smrg echo 'int i;' > conftest.$ac_ext 36926c321187Smrg if AC_TRY_EVAL(ac_compile); then 36936c321187Smrg case `/usr/bin/file conftest.$ac_objext` in 3694e120bd27Smrg *ELF-32*) 3695e120bd27Smrg HPUX_IA64_MODE="32" 3696e120bd27Smrg ;; 3697e120bd27Smrg *ELF-64*) 3698e120bd27Smrg HPUX_IA64_MODE="64" 3699e120bd27Smrg ;; 37006c321187Smrg esac 37016c321187Smrg fi 37026c321187Smrg rm -rf conftest* 37036c321187Smrg ;; 37046c321187Smrg*-*-irix6*) 37056c321187Smrg # Find out which ABI we are using. 3706e120bd27Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 37076c321187Smrg if AC_TRY_EVAL(ac_compile); then 3708e120bd27Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 3709e120bd27Smrg case `/usr/bin/file conftest.$ac_objext` in 3710e120bd27Smrg *32-bit*) 3711e120bd27Smrg LD="${LD-ld} -melf32bsmip" 3712e120bd27Smrg ;; 3713e120bd27Smrg *N32*) 3714e120bd27Smrg LD="${LD-ld} -melf32bmipn32" 3715e120bd27Smrg ;; 3716e120bd27Smrg *64-bit*) 3717e120bd27Smrg LD="${LD-ld} -melf64bmip" 3718e120bd27Smrg ;; 3719e120bd27Smrg esac 3720e120bd27Smrg else 3721e120bd27Smrg case `/usr/bin/file conftest.$ac_objext` in 3722e120bd27Smrg *32-bit*) 3723e120bd27Smrg LD="${LD-ld} -32" 3724e120bd27Smrg ;; 3725e120bd27Smrg *N32*) 3726e120bd27Smrg LD="${LD-ld} -n32" 3727e120bd27Smrg ;; 3728e120bd27Smrg *64-bit*) 3729e120bd27Smrg LD="${LD-ld} -64" 3730e120bd27Smrg ;; 3731e120bd27Smrg esac 3732e120bd27Smrg fi 37336c321187Smrg fi 37346c321187Smrg rm -rf conftest* 37356c321187Smrg ;; 37366c321187Smrg 373793493779Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 3738e120bd27Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 37396c321187Smrg # Find out which ABI we are using. 37406c321187Smrg echo 'int i;' > conftest.$ac_ext 37416c321187Smrg if AC_TRY_EVAL(ac_compile); then 37426c321187Smrg case `/usr/bin/file conftest.o` in 3743e120bd27Smrg *32-bit*) 3744e120bd27Smrg case $host in 3745e120bd27Smrg x86_64-*kfreebsd*-gnu) 3746e120bd27Smrg LD="${LD-ld} -m elf_i386_fbsd" 3747e120bd27Smrg ;; 3748e120bd27Smrg x86_64-*linux*) 3749e120bd27Smrg LD="${LD-ld} -m elf_i386" 3750e120bd27Smrg ;; 3751e120bd27Smrg ppc64-*linux*|powerpc64-*linux*) 3752e120bd27Smrg LD="${LD-ld} -m elf32ppclinux" 3753e120bd27Smrg ;; 3754e120bd27Smrg s390x-*linux*) 3755e120bd27Smrg LD="${LD-ld} -m elf_s390" 3756e120bd27Smrg ;; 3757e120bd27Smrg sparc64-*linux*) 3758e120bd27Smrg LD="${LD-ld} -m elf32_sparc" 3759e120bd27Smrg ;; 3760e120bd27Smrg esac 3761e120bd27Smrg ;; 3762e120bd27Smrg *64-bit*) 3763e120bd27Smrg case $host in 3764e120bd27Smrg x86_64-*kfreebsd*-gnu) 3765e120bd27Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 3766e120bd27Smrg ;; 3767e120bd27Smrg x86_64-*linux*) 3768e120bd27Smrg LD="${LD-ld} -m elf_x86_64" 3769e120bd27Smrg ;; 3770e120bd27Smrg ppc*-*linux*|powerpc*-*linux*) 3771e120bd27Smrg LD="${LD-ld} -m elf64ppc" 3772e120bd27Smrg ;; 3773e120bd27Smrg s390*-*linux*|s390*-*tpf*) 3774e120bd27Smrg LD="${LD-ld} -m elf64_s390" 3775e120bd27Smrg ;; 3776e120bd27Smrg sparc*-*linux*) 3777e120bd27Smrg LD="${LD-ld} -m elf64_sparc" 3778e120bd27Smrg ;; 3779e120bd27Smrg esac 3780e120bd27Smrg ;; 37816c321187Smrg esac 37826c321187Smrg fi 37836c321187Smrg rm -rf conftest* 37846c321187Smrg ;; 37856c321187Smrg 37866c321187Smrg*-*-sco3.2v5*) 37876c321187Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 37886c321187Smrg SAVE_CFLAGS="$CFLAGS" 37896c321187Smrg CFLAGS="$CFLAGS -belf" 37906c321187Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 37916c321187Smrg [AC_LANG_PUSH(C) 3792e120bd27Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 37936c321187Smrg AC_LANG_POP]) 37946c321187Smrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 37956c321187Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 37966c321187Smrg CFLAGS="$SAVE_CFLAGS" 37976c321187Smrg fi 37986c321187Smrg ;; 37996c321187Smrgsparc*-*solaris*) 38006c321187Smrg # Find out which ABI we are using. 38016c321187Smrg echo 'int i;' > conftest.$ac_ext 38026c321187Smrg if AC_TRY_EVAL(ac_compile); then 38036c321187Smrg case `/usr/bin/file conftest.o` in 38046c321187Smrg *64-bit*) 38056c321187Smrg case $lt_cv_prog_gnu_ld in 38066c321187Smrg yes*) LD="${LD-ld} -m elf64_sparc" ;; 380793493779Smrg *) 3808e120bd27Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 380993493779Smrg LD="${LD-ld} -64" 381093493779Smrg fi 381193493779Smrg ;; 38126c321187Smrg esac 38136c321187Smrg ;; 38146c321187Smrg esac 38156c321187Smrg fi 38166c321187Smrg rm -rf conftest* 38176c321187Smrg ;; 38186c321187Smrgesac 38196c321187Smrg 38206c321187Smrgneed_locks="$enable_libtool_lock" 3821e120bd27Smrg])# _LT_ENABLE_LOCK 3822e120bd27Smrg 3823e120bd27Smrg 3824e120bd27Smrg# _LT_CMD_OLD_ARCHIVE 3825e120bd27Smrg# ------------------- 3826e120bd27Smrgm4_defun([_LT_CMD_OLD_ARCHIVE], 3827e120bd27Smrg[AC_CHECK_TOOL(AR, ar, false) 3828e120bd27Smrgtest -z "$AR" && AR=ar 3829e120bd27Smrgtest -z "$AR_FLAGS" && AR_FLAGS=cru 3830e120bd27Smrg_LT_DECL([], [AR], [1], [The archiver]) 3831e120bd27Smrg_LT_DECL([], [AR_FLAGS], [1]) 3832e120bd27Smrg 3833e120bd27SmrgAC_CHECK_TOOL(STRIP, strip, :) 3834e120bd27Smrgtest -z "$STRIP" && STRIP=: 3835e120bd27Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 3836e120bd27Smrg 3837e120bd27SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 3838e120bd27Smrgtest -z "$RANLIB" && RANLIB=: 3839e120bd27Smrg_LT_DECL([], [RANLIB], [1], 3840e120bd27Smrg [Commands used to install an old-style archive]) 3841e120bd27Smrg 3842e120bd27Smrg# Determine commands to create old-style static archives. 3843e120bd27Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 3844e120bd27Smrgold_postinstall_cmds='chmod 644 $oldlib' 3845e120bd27Smrgold_postuninstall_cmds= 3846e120bd27Smrg 3847e120bd27Smrgif test -n "$RANLIB"; then 3848e120bd27Smrg case $host_os in 3849e120bd27Smrg openbsd*) 3850e120bd27Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 3851e120bd27Smrg ;; 3852e120bd27Smrg *) 3853e120bd27Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 3854e120bd27Smrg ;; 3855e120bd27Smrg esac 3856e120bd27Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 3857e120bd27Smrgfi 38586c321187Smrg 3859e120bd27Smrgcase $host_os in 3860e120bd27Smrg darwin*) 3861e120bd27Smrg lock_old_archive_extraction=yes ;; 3862e120bd27Smrg *) 3863e120bd27Smrg lock_old_archive_extraction=no ;; 3864e120bd27Smrgesac 3865e120bd27Smrg_LT_DECL([], [old_postinstall_cmds], [2]) 3866e120bd27Smrg_LT_DECL([], [old_postuninstall_cmds], [2]) 3867e120bd27Smrg_LT_TAGDECL([], [old_archive_cmds], [2], 3868e120bd27Smrg [Commands used to build an old-style archive]) 3869e120bd27Smrg_LT_DECL([], [lock_old_archive_extraction], [0], 3870e120bd27Smrg [Whether to use a lock for old archive extraction]) 3871e120bd27Smrg])# _LT_CMD_OLD_ARCHIVE 38726c321187Smrg 38736c321187Smrg 3874e120bd27Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 38756c321187Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 38766c321187Smrg# ---------------------------------------------------------------- 38776c321187Smrg# Check whether the given compiler option works 3878e120bd27SmrgAC_DEFUN([_LT_COMPILER_OPTION], 3879e120bd27Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 3880e120bd27Smrgm4_require([_LT_DECL_SED])dnl 38816c321187SmrgAC_CACHE_CHECK([$1], [$2], 38826c321187Smrg [$2=no 3883e120bd27Smrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 388493493779Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 38856c321187Smrg lt_compiler_flag="$3" 38866c321187Smrg # Insert the option either (1) after the last *FLAGS variable, or 38876c321187Smrg # (2) before a word containing "conftest.", or (3) at the end. 38886c321187Smrg # Note that $ac_compile itself does not contain backslashes and begins 38896c321187Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 38906c321187Smrg # The option is referenced via a variable to avoid confusing sed. 38916c321187Smrg lt_compile=`echo "$ac_compile" | $SED \ 38926c321187Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 38936c321187Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 38946c321187Smrg -e 's:$: $lt_compiler_flag:'` 3895e120bd27Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 38966c321187Smrg (eval "$lt_compile" 2>conftest.err) 38976c321187Smrg ac_status=$? 38986c321187Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 3899e120bd27Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 39006c321187Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 39016c321187Smrg # The compiler can only warn and ignore the option if not recognized 39026c321187Smrg # So say no if there are warnings other than the usual output. 3903e120bd27Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 39046c321187Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 39056c321187Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 39066c321187Smrg $2=yes 39076c321187Smrg fi 39086c321187Smrg fi 3909e120bd27Smrg $RM conftest* 39106c321187Smrg]) 39116c321187Smrg 39126c321187Smrgif test x"[$]$2" = xyes; then 3913e120bd27Smrg m4_if([$5], , :, [$5]) 39146c321187Smrgelse 3915e120bd27Smrg m4_if([$6], , :, [$6]) 39166c321187Smrgfi 3917e120bd27Smrg])# _LT_COMPILER_OPTION 39186c321187Smrg 3919e120bd27Smrg# Old name: 3920e120bd27SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 3921e120bd27Smrgdnl aclocal-1.4 backwards compatibility: 3922e120bd27Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 39236c321187Smrg 3924e120bd27Smrg 3925e120bd27Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 3926e120bd27Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 3927e120bd27Smrg# ---------------------------------------------------- 3928e120bd27Smrg# Check whether the given linker option works 3929e120bd27SmrgAC_DEFUN([_LT_LINKER_OPTION], 3930e120bd27Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 3931e120bd27Smrgm4_require([_LT_DECL_SED])dnl 393293493779SmrgAC_CACHE_CHECK([$1], [$2], 39336c321187Smrg [$2=no 39346c321187Smrg save_LDFLAGS="$LDFLAGS" 39356c321187Smrg LDFLAGS="$LDFLAGS $3" 393693493779Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 39376c321187Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 39386c321187Smrg # The linker can only warn and ignore the option if not recognized 39396c321187Smrg # So say no if there are warnings 39406c321187Smrg if test -s conftest.err; then 39416c321187Smrg # Append any errors to the config.log. 39426c321187Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 3943e120bd27Smrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 39446c321187Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 39456c321187Smrg if diff conftest.exp conftest.er2 >/dev/null; then 39466c321187Smrg $2=yes 39476c321187Smrg fi 39486c321187Smrg else 39496c321187Smrg $2=yes 39506c321187Smrg fi 39516c321187Smrg fi 3952e120bd27Smrg $RM -r conftest* 39536c321187Smrg LDFLAGS="$save_LDFLAGS" 39546c321187Smrg]) 39556c321187Smrg 39566c321187Smrgif test x"[$]$2" = xyes; then 3957e120bd27Smrg m4_if([$4], , :, [$4]) 39586c321187Smrgelse 3959e120bd27Smrg m4_if([$5], , :, [$5]) 39606c321187Smrgfi 3961e120bd27Smrg])# _LT_LINKER_OPTION 39626c321187Smrg 3963e120bd27Smrg# Old name: 3964e120bd27SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 3965e120bd27Smrgdnl aclocal-1.4 backwards compatibility: 3966e120bd27Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 39676c321187Smrg 3968e120bd27Smrg 3969e120bd27Smrg# LT_CMD_MAX_LEN 3970e120bd27Smrg#--------------- 3971e120bd27SmrgAC_DEFUN([LT_CMD_MAX_LEN], 3972e120bd27Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3973e120bd27Smrg# find the maximum length of command line arguments 39746c321187SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 39756c321187SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 39766c321187Smrg i=0 39776c321187Smrg teststring="ABCD" 39786c321187Smrg 39796c321187Smrg case $build_os in 39806c321187Smrg msdosdjgpp*) 39816c321187Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 39826c321187Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 39836c321187Smrg # during glob expansion). Even if it were fixed, the result of this 39846c321187Smrg # check would be larger than it should be. 39856c321187Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 39866c321187Smrg ;; 39876c321187Smrg 39886c321187Smrg gnu*) 39896c321187Smrg # Under GNU Hurd, this test is not required because there is 39906c321187Smrg # no limit to the length of command line arguments. 39916c321187Smrg # Libtool will interpret -1 as no limit whatsoever 39926c321187Smrg lt_cv_sys_max_cmd_len=-1; 39936c321187Smrg ;; 39946c321187Smrg 3995e120bd27Smrg cygwin* | mingw* | cegcc*) 39966c321187Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 39976c321187Smrg # about 5 minutes as the teststring grows exponentially. 39986c321187Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 39996c321187Smrg # you end up with a "frozen" computer, even though with patience 40006c321187Smrg # the test eventually succeeds (with a max line length of 256k). 40016c321187Smrg # Instead, let's just punt: use the minimum linelength reported by 40026c321187Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 40036c321187Smrg lt_cv_sys_max_cmd_len=8192; 40046c321187Smrg ;; 40056c321187Smrg 4006e120bd27Smrg mint*) 4007e120bd27Smrg # On MiNT this can take a long time and run out of memory. 4008e120bd27Smrg lt_cv_sys_max_cmd_len=8192; 4009e120bd27Smrg ;; 4010e120bd27Smrg 40116c321187Smrg amigaos*) 40126c321187Smrg # On AmigaOS with pdksh, this test takes hours, literally. 40136c321187Smrg # So we just punt and use a minimum line length of 8192. 40146c321187Smrg lt_cv_sys_max_cmd_len=8192; 40156c321187Smrg ;; 40166c321187Smrg 40176c321187Smrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 40186c321187Smrg # This has been around since 386BSD, at least. Likely further. 40196c321187Smrg if test -x /sbin/sysctl; then 40206c321187Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 40216c321187Smrg elif test -x /usr/sbin/sysctl; then 40226c321187Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 40236c321187Smrg else 40246c321187Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 40256c321187Smrg fi 40266c321187Smrg # And add a safety zone 40276c321187Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 40286c321187Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 40296c321187Smrg ;; 40306c321187Smrg 40316c321187Smrg interix*) 40326c321187Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 40336c321187Smrg lt_cv_sys_max_cmd_len=196608 40346c321187Smrg ;; 40356c321187Smrg 40366c321187Smrg osf*) 40376c321187Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 40386c321187Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 40396c321187Smrg # nice to cause kernel panics so lets avoid the loop below. 40406c321187Smrg # First set a reasonable default. 40416c321187Smrg lt_cv_sys_max_cmd_len=16384 40426c321187Smrg # 40436c321187Smrg if test -x /sbin/sysconfig; then 40446c321187Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 40456c321187Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 40466c321187Smrg esac 40476c321187Smrg fi 40486c321187Smrg ;; 40496c321187Smrg sco3.2v5*) 40506c321187Smrg lt_cv_sys_max_cmd_len=102400 40516c321187Smrg ;; 40526c321187Smrg sysv5* | sco5v6* | sysv4.2uw2*) 40536c321187Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 40546c321187Smrg if test -n "$kargmax"; then 4055e120bd27Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 40566c321187Smrg else 40576c321187Smrg lt_cv_sys_max_cmd_len=32768 40586c321187Smrg fi 40596c321187Smrg ;; 40606c321187Smrg *) 406193493779Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 406293493779Smrg if test -n "$lt_cv_sys_max_cmd_len"; then 406393493779Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 406493493779Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 406593493779Smrg else 4066e120bd27Smrg # Make teststring a little bigger before we do anything with it. 4067e120bd27Smrg # a 1K string should be a reasonable start. 4068e120bd27Smrg for i in 1 2 3 4 5 6 7 8 ; do 4069e120bd27Smrg teststring=$teststring$teststring 4070e120bd27Smrg done 407193493779Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 4072e120bd27Smrg # If test is not a shell built-in, we'll probably end up computing a 4073e120bd27Smrg # maximum length that is only half of the actual maximum length, but 4074e120bd27Smrg # we can't tell. 4075e120bd27Smrg while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ 4076e120bd27Smrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 407793493779Smrg test $i != 17 # 1/2 MB should be enough 407893493779Smrg do 407993493779Smrg i=`expr $i + 1` 408093493779Smrg teststring=$teststring$teststring 408193493779Smrg done 4082e120bd27Smrg # Only check the string length outside the loop. 4083e120bd27Smrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 408493493779Smrg teststring= 4085e120bd27Smrg # Add a significant safety factor because C++ compilers can tack on 4086e120bd27Smrg # massive amounts of additional arguments before passing them to the 4087e120bd27Smrg # linker. It appears as though 1/2 is a usable value. 408893493779Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 408993493779Smrg fi 40906c321187Smrg ;; 40916c321187Smrg esac 40926c321187Smrg]) 40936c321187Smrgif test -n $lt_cv_sys_max_cmd_len ; then 40946c321187Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 40956c321187Smrgelse 40966c321187Smrg AC_MSG_RESULT(none) 40976c321187Smrgfi 4098e120bd27Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 4099e120bd27Smrg_LT_DECL([], [max_cmd_len], [0], 4100e120bd27Smrg [What is the maximum length of a command?]) 4101e120bd27Smrg])# LT_CMD_MAX_LEN 41026c321187Smrg 4103e120bd27Smrg# Old name: 4104e120bd27SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 4105e120bd27Smrgdnl aclocal-1.4 backwards compatibility: 4106e120bd27Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 41076c321187Smrg 4108e120bd27Smrg 4109e120bd27Smrg# _LT_HEADER_DLFCN 4110e120bd27Smrg# ---------------- 4111e120bd27Smrgm4_defun([_LT_HEADER_DLFCN], 4112e120bd27Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 4113e120bd27Smrg])# _LT_HEADER_DLFCN 41146c321187Smrg 41156c321187Smrg 4116e120bd27Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 4117e120bd27Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 4118e120bd27Smrg# ---------------------------------------------------------------- 4119e120bd27Smrgm4_defun([_LT_TRY_DLOPEN_SELF], 4120e120bd27Smrg[m4_require([_LT_HEADER_DLFCN])dnl 41216c321187Smrgif test "$cross_compiling" = yes; then : 41226c321187Smrg [$4] 41236c321187Smrgelse 41246c321187Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 41256c321187Smrg lt_status=$lt_dlunknown 4126e120bd27Smrg cat > conftest.$ac_ext <<_LT_EOF 4127e120bd27Smrg[#line $LINENO "configure" 41286c321187Smrg#include "confdefs.h" 41296c321187Smrg 41306c321187Smrg#if HAVE_DLFCN_H 41316c321187Smrg#include <dlfcn.h> 41326c321187Smrg#endif 41336c321187Smrg 41346c321187Smrg#include <stdio.h> 41356c321187Smrg 41366c321187Smrg#ifdef RTLD_GLOBAL 41376c321187Smrg# define LT_DLGLOBAL RTLD_GLOBAL 41386c321187Smrg#else 41396c321187Smrg# ifdef DL_GLOBAL 41406c321187Smrg# define LT_DLGLOBAL DL_GLOBAL 41416c321187Smrg# else 41426c321187Smrg# define LT_DLGLOBAL 0 41436c321187Smrg# endif 41446c321187Smrg#endif 41456c321187Smrg 41466c321187Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 41476c321187Smrg find out it does not work in some platform. */ 41486c321187Smrg#ifndef LT_DLLAZY_OR_NOW 41496c321187Smrg# ifdef RTLD_LAZY 41506c321187Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 41516c321187Smrg# else 41526c321187Smrg# ifdef DL_LAZY 41536c321187Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 41546c321187Smrg# else 41556c321187Smrg# ifdef RTLD_NOW 41566c321187Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 41576c321187Smrg# else 41586c321187Smrg# ifdef DL_NOW 41596c321187Smrg# define LT_DLLAZY_OR_NOW DL_NOW 41606c321187Smrg# else 41616c321187Smrg# define LT_DLLAZY_OR_NOW 0 41626c321187Smrg# endif 41636c321187Smrg# endif 41646c321187Smrg# endif 41656c321187Smrg# endif 41666c321187Smrg#endif 41676c321187Smrg 4168e120bd27Smrg/* When -fvisbility=hidden is used, assume the code has been annotated 4169e120bd27Smrg correspondingly for the symbols needed. */ 4170e120bd27Smrg#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 4171e120bd27Smrgvoid fnord () __attribute__((visibility("default"))); 41726c321187Smrg#endif 41736c321187Smrg 4174e120bd27Smrgvoid fnord () { int i=42; } 41756c321187Smrgint main () 41766c321187Smrg{ 41776c321187Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 41786c321187Smrg int status = $lt_dlunknown; 41796c321187Smrg 41806c321187Smrg if (self) 41816c321187Smrg { 41826c321187Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 4183e120bd27Smrg else 4184e120bd27Smrg { 4185e120bd27Smrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 4186e120bd27Smrg else puts (dlerror ()); 4187e120bd27Smrg } 41886c321187Smrg /* dlclose (self); */ 41896c321187Smrg } 41906c321187Smrg else 41916c321187Smrg puts (dlerror ()); 41926c321187Smrg 4193e120bd27Smrg return status; 41946c321187Smrg}] 4195e120bd27Smrg_LT_EOF 41966c321187Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 41976c321187Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 41986c321187Smrg lt_status=$? 41996c321187Smrg case x$lt_status in 42006c321187Smrg x$lt_dlno_uscore) $1 ;; 42016c321187Smrg x$lt_dlneed_uscore) $2 ;; 42026c321187Smrg x$lt_dlunknown|x*) $3 ;; 42036c321187Smrg esac 42046c321187Smrg else : 42056c321187Smrg # compilation failed 42066c321187Smrg $3 42076c321187Smrg fi 42086c321187Smrgfi 42096c321187Smrgrm -fr conftest* 4210e120bd27Smrg])# _LT_TRY_DLOPEN_SELF 42116c321187Smrg 42126c321187Smrg 4213e120bd27Smrg# LT_SYS_DLOPEN_SELF 4214e120bd27Smrg# ------------------ 4215e120bd27SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 4216e120bd27Smrg[m4_require([_LT_HEADER_DLFCN])dnl 42176c321187Smrgif test "x$enable_dlopen" != xyes; then 42186c321187Smrg enable_dlopen=unknown 42196c321187Smrg enable_dlopen_self=unknown 42206c321187Smrg enable_dlopen_self_static=unknown 42216c321187Smrgelse 42226c321187Smrg lt_cv_dlopen=no 42236c321187Smrg lt_cv_dlopen_libs= 42246c321187Smrg 42256c321187Smrg case $host_os in 42266c321187Smrg beos*) 42276c321187Smrg lt_cv_dlopen="load_add_on" 42286c321187Smrg lt_cv_dlopen_libs= 42296c321187Smrg lt_cv_dlopen_self=yes 42306c321187Smrg ;; 42316c321187Smrg 4232e120bd27Smrg mingw* | pw32* | cegcc*) 42336c321187Smrg lt_cv_dlopen="LoadLibrary" 42346c321187Smrg lt_cv_dlopen_libs= 4235e120bd27Smrg ;; 42366c321187Smrg 42376c321187Smrg cygwin*) 42386c321187Smrg lt_cv_dlopen="dlopen" 42396c321187Smrg lt_cv_dlopen_libs= 4240e120bd27Smrg ;; 42416c321187Smrg 42426c321187Smrg darwin*) 42436c321187Smrg # if libdl is installed we need to link against it 42446c321187Smrg AC_CHECK_LIB([dl], [dlopen], 42456c321187Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 42466c321187Smrg lt_cv_dlopen="dyld" 42476c321187Smrg lt_cv_dlopen_libs= 42486c321187Smrg lt_cv_dlopen_self=yes 42496c321187Smrg ]) 4250e120bd27Smrg ;; 42516c321187Smrg 42526c321187Smrg *) 42536c321187Smrg AC_CHECK_FUNC([shl_load], 42546c321187Smrg [lt_cv_dlopen="shl_load"], 42556c321187Smrg [AC_CHECK_LIB([dld], [shl_load], 425693493779Smrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 42576c321187Smrg [AC_CHECK_FUNC([dlopen], 42586c321187Smrg [lt_cv_dlopen="dlopen"], 42596c321187Smrg [AC_CHECK_LIB([dl], [dlopen], 42606c321187Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 42616c321187Smrg [AC_CHECK_LIB([svld], [dlopen], 42626c321187Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 42636c321187Smrg [AC_CHECK_LIB([dld], [dld_link], 426493493779Smrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 42656c321187Smrg ]) 42666c321187Smrg ]) 42676c321187Smrg ]) 42686c321187Smrg ]) 42696c321187Smrg ]) 42706c321187Smrg ;; 42716c321187Smrg esac 42726c321187Smrg 42736c321187Smrg if test "x$lt_cv_dlopen" != xno; then 42746c321187Smrg enable_dlopen=yes 42756c321187Smrg else 42766c321187Smrg enable_dlopen=no 42776c321187Smrg fi 42786c321187Smrg 42796c321187Smrg case $lt_cv_dlopen in 42806c321187Smrg dlopen) 42816c321187Smrg save_CPPFLAGS="$CPPFLAGS" 42826c321187Smrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 42836c321187Smrg 42846c321187Smrg save_LDFLAGS="$LDFLAGS" 42856c321187Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 42866c321187Smrg 42876c321187Smrg save_LIBS="$LIBS" 42886c321187Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 42896c321187Smrg 42906c321187Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 42916c321187Smrg lt_cv_dlopen_self, [dnl 4292e120bd27Smrg _LT_TRY_DLOPEN_SELF( 42936c321187Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 42946c321187Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 42956c321187Smrg ]) 42966c321187Smrg 42976c321187Smrg if test "x$lt_cv_dlopen_self" = xyes; then 42986c321187Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 42996c321187Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 4300e120bd27Smrg lt_cv_dlopen_self_static, [dnl 4301e120bd27Smrg _LT_TRY_DLOPEN_SELF( 43026c321187Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 43036c321187Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 43046c321187Smrg ]) 43056c321187Smrg fi 43066c321187Smrg 43076c321187Smrg CPPFLAGS="$save_CPPFLAGS" 43086c321187Smrg LDFLAGS="$save_LDFLAGS" 43096c321187Smrg LIBS="$save_LIBS" 43106c321187Smrg ;; 43116c321187Smrg esac 43126c321187Smrg 43136c321187Smrg case $lt_cv_dlopen_self in 43146c321187Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 43156c321187Smrg *) enable_dlopen_self=unknown ;; 43166c321187Smrg esac 43176c321187Smrg 43186c321187Smrg case $lt_cv_dlopen_self_static in 43196c321187Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 43206c321187Smrg *) enable_dlopen_self_static=unknown ;; 43216c321187Smrg esac 43226c321187Smrgfi 4323e120bd27Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 4324e120bd27Smrg [Whether dlopen is supported]) 4325e120bd27Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 4326e120bd27Smrg [Whether dlopen of programs is supported]) 4327e120bd27Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 4328e120bd27Smrg [Whether dlopen of statically linked programs is supported]) 4329e120bd27Smrg])# LT_SYS_DLOPEN_SELF 43306c321187Smrg 4331e120bd27Smrg# Old name: 4332e120bd27SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 4333e120bd27Smrgdnl aclocal-1.4 backwards compatibility: 4334e120bd27Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 43356c321187Smrg 4336e120bd27Smrg 4337e120bd27Smrg# _LT_COMPILER_C_O([TAGNAME]) 4338e120bd27Smrg# --------------------------- 4339e120bd27Smrg# Check to see if options -c and -o are simultaneously supported by compiler. 4340e120bd27Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 4341e120bd27Smrgm4_defun([_LT_COMPILER_C_O], 4342e120bd27Smrg[m4_require([_LT_DECL_SED])dnl 4343e120bd27Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 4344e120bd27Smrgm4_require([_LT_TAG_COMPILER])dnl 43456c321187SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 4346e120bd27Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 4347e120bd27Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 4348e120bd27Smrg $RM -r conftest 2>/dev/null 43496c321187Smrg mkdir conftest 43506c321187Smrg cd conftest 43516c321187Smrg mkdir out 435293493779Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 43536c321187Smrg 43546c321187Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 43556c321187Smrg # Insert the option either (1) after the last *FLAGS variable, or 43566c321187Smrg # (2) before a word containing "conftest.", or (3) at the end. 43576c321187Smrg # Note that $ac_compile itself does not contain backslashes and begins 43586c321187Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 43596c321187Smrg lt_compile=`echo "$ac_compile" | $SED \ 43606c321187Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 43616c321187Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 43626c321187Smrg -e 's:$: $lt_compiler_flag:'` 4363e120bd27Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 43646c321187Smrg (eval "$lt_compile" 2>out/conftest.err) 43656c321187Smrg ac_status=$? 43666c321187Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 4367e120bd27Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 43686c321187Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 43696c321187Smrg then 43706c321187Smrg # The compiler can only warn and ignore the option if not recognized 43716c321187Smrg # So say no if there are warnings 4372e120bd27Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 43736c321187Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 43746c321187Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 4375e120bd27Smrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 43766c321187Smrg fi 43776c321187Smrg fi 43786c321187Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 4379e120bd27Smrg $RM conftest* 43806c321187Smrg # SGI C++ compiler will create directory out/ii_files/ for 43816c321187Smrg # template instantiation 4382e120bd27Smrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 4383e120bd27Smrg $RM out/* && rmdir out 43846c321187Smrg cd .. 4385e120bd27Smrg $RM -r conftest 4386e120bd27Smrg $RM conftest* 43876c321187Smrg]) 4388e120bd27Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 4389e120bd27Smrg [Does compiler simultaneously support -c and -o options?]) 4390e120bd27Smrg])# _LT_COMPILER_C_O 43916c321187Smrg 43926c321187Smrg 4393e120bd27Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 4394e120bd27Smrg# ---------------------------------- 43956c321187Smrg# Check to see if we can do hard links to lock some files if needed 4396e120bd27Smrgm4_defun([_LT_COMPILER_FILE_LOCKS], 4397e120bd27Smrg[m4_require([_LT_ENABLE_LOCK])dnl 4398e120bd27Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 4399e120bd27Smrg_LT_COMPILER_C_O([$1]) 44006c321187Smrg 44016c321187Smrghard_links="nottested" 4402e120bd27Smrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 44036c321187Smrg # do not overwrite the value of need_locks provided by the user 44046c321187Smrg AC_MSG_CHECKING([if we can lock with hard links]) 44056c321187Smrg hard_links=yes 4406e120bd27Smrg $RM conftest* 44076c321187Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 44086c321187Smrg touch conftest.a 44096c321187Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 44106c321187Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 44116c321187Smrg AC_MSG_RESULT([$hard_links]) 44126c321187Smrg if test "$hard_links" = no; then 44136c321187Smrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 44146c321187Smrg need_locks=warn 44156c321187Smrg fi 44166c321187Smrgelse 44176c321187Smrg need_locks=no 44186c321187Smrgfi 4419e120bd27Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 4420e120bd27Smrg])# _LT_COMPILER_FILE_LOCKS 44216c321187Smrg 44226c321187Smrg 4423e120bd27Smrg# _LT_CHECK_OBJDIR 4424e120bd27Smrg# ---------------- 4425e120bd27Smrgm4_defun([_LT_CHECK_OBJDIR], 44266c321187Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 44276c321187Smrg[rm -f .libs 2>/dev/null 44286c321187Smrgmkdir .libs 2>/dev/null 44296c321187Smrgif test -d .libs; then 44306c321187Smrg lt_cv_objdir=.libs 44316c321187Smrgelse 44326c321187Smrg # MS-DOS does not allow filenames that begin with a dot. 44336c321187Smrg lt_cv_objdir=_libs 44346c321187Smrgfi 44356c321187Smrgrmdir .libs 2>/dev/null]) 44366c321187Smrgobjdir=$lt_cv_objdir 4437e120bd27Smrg_LT_DECL([], [objdir], [0], 4438e120bd27Smrg [The name of the directory that contains temporary libtool files])dnl 4439e120bd27Smrgm4_pattern_allow([LT_OBJDIR])dnl 4440e120bd27SmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 4441e120bd27Smrg [Define to the sub-directory in which libtool stores uninstalled libraries.]) 4442e120bd27Smrg])# _LT_CHECK_OBJDIR 44436c321187Smrg 44446c321187Smrg 4445e120bd27Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 4446e120bd27Smrg# -------------------------------------- 44476c321187Smrg# Check hardcoding attributes. 4448e120bd27Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 44496c321187Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 4450e120bd27Smrg_LT_TAGVAR(hardcode_action, $1)= 4451e120bd27Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 4452e120bd27Smrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 4453e120bd27Smrg test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 44546c321187Smrg 4455e120bd27Smrg # We can hardcode non-existent directories. 4456e120bd27Smrg if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 44576c321187Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 44586c321187Smrg # have to relink, otherwise we might link with an installed library 44596c321187Smrg # when we should be linking with a yet-to-be-installed one 4460e120bd27Smrg ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 4461e120bd27Smrg test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 44626c321187Smrg # Linking always hardcodes the temporary library directory. 4463e120bd27Smrg _LT_TAGVAR(hardcode_action, $1)=relink 44646c321187Smrg else 44656c321187Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 4466e120bd27Smrg _LT_TAGVAR(hardcode_action, $1)=immediate 44676c321187Smrg fi 44686c321187Smrgelse 44696c321187Smrg # We cannot hardcode anything, or else we can only hardcode existing 44706c321187Smrg # directories. 4471e120bd27Smrg _LT_TAGVAR(hardcode_action, $1)=unsupported 44726c321187Smrgfi 4473e120bd27SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 44746c321187Smrg 4475e120bd27Smrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 4476e120bd27Smrg test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 44776c321187Smrg # Fast installation is not supported 44786c321187Smrg enable_fast_install=no 44796c321187Smrgelif test "$shlibpath_overrides_runpath" = yes || 44806c321187Smrg test "$enable_shared" = no; then 44816c321187Smrg # Fast installation is not necessary 44826c321187Smrg enable_fast_install=needless 44836c321187Smrgfi 4484e120bd27Smrg_LT_TAGDECL([], [hardcode_action], [0], 4485e120bd27Smrg [How to hardcode a shared library path into an executable]) 4486e120bd27Smrg])# _LT_LINKER_HARDCODE_LIBPATH 44876c321187Smrg 44886c321187Smrg 4489e120bd27Smrg# _LT_CMD_STRIPLIB 4490e120bd27Smrg# ---------------- 4491e120bd27Smrgm4_defun([_LT_CMD_STRIPLIB], 4492e120bd27Smrg[m4_require([_LT_DECL_EGREP]) 4493e120bd27Smrgstriplib= 44946c321187Smrgold_striplib= 44956c321187SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 4496e120bd27Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 44976c321187Smrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 44986c321187Smrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 44996c321187Smrg AC_MSG_RESULT([yes]) 45006c321187Smrgelse 45016c321187Smrg# FIXME - insert some real tests, host_os isn't really good enough 45026c321187Smrg case $host_os in 4503e120bd27Smrg darwin*) 4504e120bd27Smrg if test -n "$STRIP" ; then 4505e120bd27Smrg striplib="$STRIP -x" 4506e120bd27Smrg old_striplib="$STRIP -S" 4507e120bd27Smrg AC_MSG_RESULT([yes]) 4508e120bd27Smrg else 4509e120bd27Smrg AC_MSG_RESULT([no]) 4510e120bd27Smrg fi 4511e120bd27Smrg ;; 4512e120bd27Smrg *) 4513e120bd27Smrg AC_MSG_RESULT([no]) 45146c321187Smrg ;; 45156c321187Smrg esac 45166c321187Smrgfi 4517e120bd27Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 4518e120bd27Smrg_LT_DECL([], [striplib], [1]) 4519e120bd27Smrg])# _LT_CMD_STRIPLIB 45206c321187Smrg 45216c321187Smrg 4522e120bd27Smrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 45236c321187Smrg# ----------------------------- 45246c321187Smrg# PORTME Fill in your ld.so characteristics 4525e120bd27Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 4526e120bd27Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 4527e120bd27Smrgm4_require([_LT_DECL_EGREP])dnl 4528e120bd27Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 4529e120bd27Smrgm4_require([_LT_DECL_OBJDUMP])dnl 4530e120bd27Smrgm4_require([_LT_DECL_SED])dnl 4531e120bd27Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 453293493779SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 4533e120bd27Smrgm4_if([$1], 4534e120bd27Smrg [], [ 45356c321187Smrgif test "$GCC" = yes; then 453693493779Smrg case $host_os in 453793493779Smrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 453893493779Smrg *) lt_awk_arg="/^libraries:/" ;; 453993493779Smrg esac 4540e120bd27Smrg case $host_os in 4541e120bd27Smrg mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 4542e120bd27Smrg *) lt_sed_strip_eq="s,=/,/,g" ;; 4543e120bd27Smrg esac 4544e120bd27Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 4545e120bd27Smrg case $lt_search_path_spec in 4546e120bd27Smrg *\;*) 45476c321187Smrg # if the path contains ";" then we assume it to be the separator 45486c321187Smrg # otherwise default to the standard path separator (i.e. ":") - it is 45496c321187Smrg # assumed that no part of a normal pathname contains ";" but that should 45506c321187Smrg # okay in the real world where ";" in dirpaths is itself problematic. 4551e120bd27Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 4552e120bd27Smrg ;; 4553e120bd27Smrg *) 4554e120bd27Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 4555e120bd27Smrg ;; 4556e120bd27Smrg esac 455793493779Smrg # Ok, now we have the path, separated by spaces, we can step through it 455893493779Smrg # and add multilib dir if necessary. 455993493779Smrg lt_tmp_lt_search_path_spec= 456093493779Smrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 456193493779Smrg for lt_sys_path in $lt_search_path_spec; do 456293493779Smrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 456393493779Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 456493493779Smrg else 456593493779Smrg test -d "$lt_sys_path" && \ 456693493779Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 456793493779Smrg fi 456893493779Smrg done 4569e120bd27Smrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 457093493779SmrgBEGIN {RS=" "; FS="/|\n";} { 457193493779Smrg lt_foo=""; 457293493779Smrg lt_count=0; 457393493779Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 457493493779Smrg if ($lt_i != "" && $lt_i != ".") { 457593493779Smrg if ($lt_i == "..") { 457693493779Smrg lt_count++; 457793493779Smrg } else { 457893493779Smrg if (lt_count == 0) { 457993493779Smrg lt_foo="/" $lt_i lt_foo; 458093493779Smrg } else { 458193493779Smrg lt_count--; 458293493779Smrg } 458393493779Smrg } 458493493779Smrg } 458593493779Smrg } 458693493779Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 458793493779Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 458893493779Smrg}'` 4589e120bd27Smrg # AWK program above erroneously prepends '/' to C:/dos/paths 4590e120bd27Smrg # for these hosts. 4591e120bd27Smrg case $host_os in 4592e120bd27Smrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 4593e120bd27Smrg $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 4594e120bd27Smrg esac 4595e120bd27Smrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 45966c321187Smrgelse 45976c321187Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 459893493779Smrgfi]) 4599e120bd27Smrglibrary_names_spec= 4600e120bd27Smrglibname_spec='lib$name' 4601e120bd27Smrgsoname_spec= 4602e120bd27Smrgshrext_cmds=".so" 4603e120bd27Smrgpostinstall_cmds= 4604e120bd27Smrgpostuninstall_cmds= 4605e120bd27Smrgfinish_cmds= 4606e120bd27Smrgfinish_eval= 4607e120bd27Smrgshlibpath_var= 4608e120bd27Smrgshlibpath_overrides_runpath=unknown 4609e120bd27Smrgversion_type=none 4610e120bd27Smrgdynamic_linker="$host_os ld.so" 4611e120bd27Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 46126c321187Smrgneed_lib_prefix=unknown 46136c321187Smrghardcode_into_libs=no 46146c321187Smrg 46156c321187Smrg# when you set need_version to no, make sure it does not cause -set_version 46166c321187Smrg# flags to be left without arguments 46176c321187Smrgneed_version=unknown 46186c321187Smrg 46196c321187Smrgcase $host_os in 46206c321187Smrgaix3*) 46216c321187Smrg version_type=linux 46226c321187Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 46236c321187Smrg shlibpath_var=LIBPATH 46246c321187Smrg 46256c321187Smrg # AIX 3 has no versioning support, so we append a major version to the name. 46266c321187Smrg soname_spec='${libname}${release}${shared_ext}$major' 46276c321187Smrg ;; 46286c321187Smrg 462993493779Smrgaix[[4-9]]*) 46306c321187Smrg version_type=linux 46316c321187Smrg need_lib_prefix=no 46326c321187Smrg need_version=no 46336c321187Smrg hardcode_into_libs=yes 46346c321187Smrg if test "$host_cpu" = ia64; then 46356c321187Smrg # AIX 5 supports IA64 46366c321187Smrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 46376c321187Smrg shlibpath_var=LD_LIBRARY_PATH 46386c321187Smrg else 46396c321187Smrg # With GCC up to 2.95.x, collect2 would create an import file 46406c321187Smrg # for dependence libraries. The import file would start with 46416c321187Smrg # the line `#! .'. This would cause the generated library to 46426c321187Smrg # depend on `.', always an invalid library. This was fixed in 46436c321187Smrg # development snapshots of GCC prior to 3.0. 46446c321187Smrg case $host_os in 46456c321187Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 46466c321187Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 46476c321187Smrg echo ' yes ' 4648e120bd27Smrg echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 46496c321187Smrg : 46506c321187Smrg else 46516c321187Smrg can_build_shared=no 46526c321187Smrg fi 46536c321187Smrg ;; 46546c321187Smrg esac 46556c321187Smrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 46566c321187Smrg # soname into executable. Probably we can add versioning support to 46576c321187Smrg # collect2, so additional links can be useful in future. 46586c321187Smrg if test "$aix_use_runtimelinking" = yes; then 46596c321187Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 46606c321187Smrg # instead of lib<name>.a to let people know that these are not 46616c321187Smrg # typical AIX shared libraries. 46626c321187Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 46636c321187Smrg else 46646c321187Smrg # We preserve .a as extension for shared libraries through AIX4.2 46656c321187Smrg # and later when we are not doing run time linking. 46666c321187Smrg library_names_spec='${libname}${release}.a $libname.a' 46676c321187Smrg soname_spec='${libname}${release}${shared_ext}$major' 46686c321187Smrg fi 46696c321187Smrg shlibpath_var=LIBPATH 46706c321187Smrg fi 46716c321187Smrg ;; 46726c321187Smrg 46736c321187Smrgamigaos*) 4674e120bd27Smrg case $host_cpu in 4675e120bd27Smrg powerpc) 4676e120bd27Smrg # Since July 2007 AmigaOS4 officially supports .so libraries. 4677e120bd27Smrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 4678e120bd27Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4679e120bd27Smrg ;; 4680e120bd27Smrg m68k) 4681e120bd27Smrg library_names_spec='$libname.ixlibrary $libname.a' 4682e120bd27Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 4683e120bd27Smrg 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' 4684e120bd27Smrg ;; 4685e120bd27Smrg esac 46866c321187Smrg ;; 46876c321187Smrg 46886c321187Smrgbeos*) 46896c321187Smrg library_names_spec='${libname}${shared_ext}' 46906c321187Smrg dynamic_linker="$host_os ld.so" 46916c321187Smrg shlibpath_var=LIBRARY_PATH 46926c321187Smrg ;; 46936c321187Smrg 46946c321187Smrgbsdi[[45]]*) 46956c321187Smrg version_type=linux 46966c321187Smrg need_version=no 46976c321187Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 46986c321187Smrg soname_spec='${libname}${release}${shared_ext}$major' 46996c321187Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 47006c321187Smrg shlibpath_var=LD_LIBRARY_PATH 47016c321187Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 47026c321187Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 47036c321187Smrg # the default ld.so.conf also contains /usr/contrib/lib and 47046c321187Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 47056c321187Smrg # libtool to hard-code these into programs 47066c321187Smrg ;; 47076c321187Smrg 4708e120bd27Smrgcygwin* | mingw* | pw32* | cegcc*) 47096c321187Smrg version_type=windows 47106c321187Smrg shrext_cmds=".dll" 47116c321187Smrg need_version=no 47126c321187Smrg need_lib_prefix=no 47136c321187Smrg 47146c321187Smrg case $GCC,$host_os in 4715e120bd27Smrg yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) 47166c321187Smrg library_names_spec='$libname.dll.a' 47176c321187Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 47186c321187Smrg postinstall_cmds='base_file=`basename \${file}`~ 4719e120bd27Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 47206c321187Smrg dldir=$destdir/`dirname \$dlpath`~ 47216c321187Smrg test -d \$dldir || mkdir -p \$dldir~ 47226c321187Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 4723e120bd27Smrg chmod a+x \$dldir/$dlname~ 4724e120bd27Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 4725e120bd27Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 4726e120bd27Smrg fi' 47276c321187Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 47286c321187Smrg dlpath=$dir/\$dldll~ 4729e120bd27Smrg $RM \$dlpath' 47306c321187Smrg shlibpath_overrides_runpath=yes 47316c321187Smrg 47326c321187Smrg case $host_os in 47336c321187Smrg cygwin*) 47346c321187Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 47356c321187Smrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 4736e120bd27Smrgm4_if([$1], [],[ 4737e120bd27Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 47386c321187Smrg ;; 4739e120bd27Smrg mingw* | cegcc*) 47406c321187Smrg # MinGW DLLs use traditional 'lib' prefix 47416c321187Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 47426c321187Smrg ;; 47436c321187Smrg pw32*) 47446c321187Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 47456c321187Smrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 47466c321187Smrg ;; 47476c321187Smrg esac 47486c321187Smrg ;; 47496c321187Smrg 47506c321187Smrg *) 47516c321187Smrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 47526c321187Smrg ;; 47536c321187Smrg esac 47546c321187Smrg dynamic_linker='Win32 ld.exe' 47556c321187Smrg # FIXME: first we should search . and the directory the executable is in 47566c321187Smrg shlibpath_var=PATH 47576c321187Smrg ;; 47586c321187Smrg 47596c321187Smrgdarwin* | rhapsody*) 47606c321187Smrg dynamic_linker="$host_os dyld" 47616c321187Smrg version_type=darwin 47626c321187Smrg need_lib_prefix=no 47636c321187Smrg need_version=no 4764e120bd27Smrg library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 47656c321187Smrg soname_spec='${libname}${release}${major}$shared_ext' 47666c321187Smrg shlibpath_overrides_runpath=yes 47676c321187Smrg shlibpath_var=DYLD_LIBRARY_PATH 47686c321187Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 4769e120bd27Smrgm4_if([$1], [],[ 4770e120bd27Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 47716c321187Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 47726c321187Smrg ;; 47736c321187Smrg 47746c321187Smrgdgux*) 47756c321187Smrg version_type=linux 47766c321187Smrg need_lib_prefix=no 47776c321187Smrg need_version=no 47786c321187Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 47796c321187Smrg soname_spec='${libname}${release}${shared_ext}$major' 47806c321187Smrg shlibpath_var=LD_LIBRARY_PATH 47816c321187Smrg ;; 47826c321187Smrg 47836c321187Smrgfreebsd1*) 47846c321187Smrg dynamic_linker=no 47856c321187Smrg ;; 47866c321187Smrg 47876c321187Smrgfreebsd* | dragonfly*) 47886c321187Smrg # DragonFly does not have aout. When/if they implement a new 47896c321187Smrg # versioning mechanism, adjust this. 47906c321187Smrg if test -x /usr/bin/objformat; then 47916c321187Smrg objformat=`/usr/bin/objformat` 47926c321187Smrg else 47936c321187Smrg case $host_os in 47946c321187Smrg freebsd[[123]]*) objformat=aout ;; 47956c321187Smrg *) objformat=elf ;; 47966c321187Smrg esac 47976c321187Smrg fi 47986c321187Smrg version_type=freebsd-$objformat 47996c321187Smrg case $version_type in 48006c321187Smrg freebsd-elf*) 48016c321187Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 48026c321187Smrg need_version=no 48036c321187Smrg need_lib_prefix=no 48046c321187Smrg ;; 48056c321187Smrg freebsd-*) 48066c321187Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 48076c321187Smrg need_version=yes 48086c321187Smrg ;; 48096c321187Smrg esac 48106c321187Smrg shlibpath_var=LD_LIBRARY_PATH 48116c321187Smrg case $host_os in 48126c321187Smrg freebsd2*) 48136c321187Smrg shlibpath_overrides_runpath=yes 48146c321187Smrg ;; 48156c321187Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 48166c321187Smrg shlibpath_overrides_runpath=yes 48176c321187Smrg hardcode_into_libs=yes 48186c321187Smrg ;; 48196c321187Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 48206c321187Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 48216c321187Smrg shlibpath_overrides_runpath=no 48226c321187Smrg hardcode_into_libs=yes 48236c321187Smrg ;; 482493493779Smrg *) # from 4.6 on, and DragonFly 48256c321187Smrg shlibpath_overrides_runpath=yes 48266c321187Smrg hardcode_into_libs=yes 48276c321187Smrg ;; 48286c321187Smrg esac 48296c321187Smrg ;; 48306c321187Smrg 48316c321187Smrggnu*) 48326c321187Smrg version_type=linux 48336c321187Smrg need_lib_prefix=no 48346c321187Smrg need_version=no 48356c321187Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 48366c321187Smrg soname_spec='${libname}${release}${shared_ext}$major' 48376c321187Smrg shlibpath_var=LD_LIBRARY_PATH 48386c321187Smrg hardcode_into_libs=yes 48396c321187Smrg ;; 48406c321187Smrg 4841e120bd27Smrghaiku*) 4842e120bd27Smrg version_type=linux 4843e120bd27Smrg need_lib_prefix=no 4844e120bd27Smrg need_version=no 4845e120bd27Smrg dynamic_linker="$host_os runtime_loader" 4846e120bd27Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 4847e120bd27Smrg soname_spec='${libname}${release}${shared_ext}$major' 4848e120bd27Smrg shlibpath_var=LIBRARY_PATH 4849e120bd27Smrg shlibpath_overrides_runpath=yes 4850e120bd27Smrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 4851e120bd27Smrg hardcode_into_libs=yes 4852e120bd27Smrg ;; 4853e120bd27Smrg 48546c321187Smrghpux9* | hpux10* | hpux11*) 48556c321187Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 48566c321187Smrg # link against other versions. 48576c321187Smrg version_type=sunos 48586c321187Smrg need_lib_prefix=no 48596c321187Smrg need_version=no 48606c321187Smrg case $host_cpu in 48616c321187Smrg ia64*) 48626c321187Smrg shrext_cmds='.so' 48636c321187Smrg hardcode_into_libs=yes 48646c321187Smrg dynamic_linker="$host_os dld.so" 48656c321187Smrg shlibpath_var=LD_LIBRARY_PATH 48666c321187Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 48676c321187Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 48686c321187Smrg soname_spec='${libname}${release}${shared_ext}$major' 48696c321187Smrg if test "X$HPUX_IA64_MODE" = X32; then 48706c321187Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 48716c321187Smrg else 48726c321187Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 48736c321187Smrg fi 48746c321187Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 48756c321187Smrg ;; 4876e120bd27Smrg hppa*64*) 4877e120bd27Smrg shrext_cmds='.sl' 4878e120bd27Smrg hardcode_into_libs=yes 4879e120bd27Smrg dynamic_linker="$host_os dld.sl" 4880e120bd27Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 4881e120bd27Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 4882e120bd27Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 4883e120bd27Smrg soname_spec='${libname}${release}${shared_ext}$major' 4884e120bd27Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 4885e120bd27Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 4886e120bd27Smrg ;; 4887e120bd27Smrg *) 48886c321187Smrg shrext_cmds='.sl' 48896c321187Smrg dynamic_linker="$host_os dld.sl" 48906c321187Smrg shlibpath_var=SHLIB_PATH 48916c321187Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 48926c321187Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 48936c321187Smrg soname_spec='${libname}${release}${shared_ext}$major' 48946c321187Smrg ;; 48956c321187Smrg esac 4896e120bd27Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 48976c321187Smrg postinstall_cmds='chmod 555 $lib' 4898e120bd27Smrg # or fails outright, so override atomically: 4899e120bd27Smrg install_override_mode=555 49006c321187Smrg ;; 49016c321187Smrg 490293493779Smrginterix[[3-9]]*) 49036c321187Smrg version_type=linux 49046c321187Smrg need_lib_prefix=no 49056c321187Smrg need_version=no 49066c321187Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 49076c321187Smrg soname_spec='${libname}${release}${shared_ext}$major' 49086c321187Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 49096c321187Smrg shlibpath_var=LD_LIBRARY_PATH 49106c321187Smrg shlibpath_overrides_runpath=no 49116c321187Smrg hardcode_into_libs=yes 49126c321187Smrg ;; 49136c321187Smrg 49146c321187Smrgirix5* | irix6* | nonstopux*) 49156c321187Smrg case $host_os in 49166c321187Smrg nonstopux*) version_type=nonstopux ;; 49176c321187Smrg *) 49186c321187Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 49196c321187Smrg version_type=linux 49206c321187Smrg else 49216c321187Smrg version_type=irix 49226c321187Smrg fi ;; 49236c321187Smrg esac 49246c321187Smrg need_lib_prefix=no 49256c321187Smrg need_version=no 49266c321187Smrg soname_spec='${libname}${release}${shared_ext}$major' 49276c321187Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 49286c321187Smrg case $host_os in 49296c321187Smrg irix5* | nonstopux*) 49306c321187Smrg libsuff= shlibsuff= 49316c321187Smrg ;; 49326c321187Smrg *) 49336c321187Smrg case $LD in # libtool.m4 will add one of these switches to LD 49346c321187Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 49356c321187Smrg libsuff= shlibsuff= libmagic=32-bit;; 49366c321187Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 49376c321187Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 49386c321187Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 49396c321187Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 49406c321187Smrg *) libsuff= shlibsuff= libmagic=never-match;; 49416c321187Smrg esac 49426c321187Smrg ;; 49436c321187Smrg esac 49446c321187Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 49456c321187Smrg shlibpath_overrides_runpath=no 49466c321187Smrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 49476c321187Smrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 49486c321187Smrg hardcode_into_libs=yes 49496c321187Smrg ;; 49506c321187Smrg 49516c321187Smrg# No shared lib support for Linux oldld, aout, or coff. 49526c321187Smrglinux*oldld* | linux*aout* | linux*coff*) 49536c321187Smrg dynamic_linker=no 49546c321187Smrg ;; 49556c321187Smrg 49566c321187Smrg# This must be Linux ELF. 4957e120bd27Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 49586c321187Smrg version_type=linux 49596c321187Smrg need_lib_prefix=no 49606c321187Smrg need_version=no 49616c321187Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 49626c321187Smrg soname_spec='${libname}${release}${shared_ext}$major' 49636c321187Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 49646c321187Smrg shlibpath_var=LD_LIBRARY_PATH 49656c321187Smrg shlibpath_overrides_runpath=no 4966e120bd27Smrg 4967e120bd27Smrg # Some binutils ld are patched to set DT_RUNPATH 4968e120bd27Smrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 4969e120bd27Smrg [lt_cv_shlibpath_overrides_runpath=no 4970e120bd27Smrg save_LDFLAGS=$LDFLAGS 4971e120bd27Smrg save_libdir=$libdir 4972e120bd27Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 4973e120bd27Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 4974e120bd27Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 4975e120bd27Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 4976e120bd27Smrg [lt_cv_shlibpath_overrides_runpath=yes])]) 4977e120bd27Smrg LDFLAGS=$save_LDFLAGS 4978e120bd27Smrg libdir=$save_libdir 4979e120bd27Smrg ]) 4980e120bd27Smrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 4981e120bd27Smrg 49826c321187Smrg # This implies no fast_install, which is unacceptable. 49836c321187Smrg # Some rework will be needed to allow for fast_install 49846c321187Smrg # before this can be enabled. 49856c321187Smrg hardcode_into_libs=yes 49866c321187Smrg 49876c321187Smrg # Append ld.so.conf contents to the search path 49886c321187Smrg if test -f /etc/ld.so.conf; then 4989e120bd27Smrg 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' ' '` 49906c321187Smrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 49916c321187Smrg fi 49926c321187Smrg 49936c321187Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 49946c321187Smrg # powerpc, because MkLinux only supported shared libraries with the 49956c321187Smrg # GNU dynamic linker. Since this was broken with cross compilers, 49966c321187Smrg # most powerpc-linux boxes support dynamic linking these days and 49976c321187Smrg # people can always --disable-shared, the test was removed, and we 49986c321187Smrg # assume the GNU/Linux dynamic linker is in use. 49996c321187Smrg dynamic_linker='GNU/Linux ld.so' 50006c321187Smrg ;; 50016c321187Smrg 50026c321187Smrgnetbsd*) 50036c321187Smrg version_type=sunos 50046c321187Smrg need_lib_prefix=no 50056c321187Smrg need_version=no 5006e120bd27Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 50076c321187Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 50086c321187Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 50096c321187Smrg dynamic_linker='NetBSD (a.out) ld.so' 50106c321187Smrg else 50116c321187Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 50126c321187Smrg soname_spec='${libname}${release}${shared_ext}$major' 50136c321187Smrg dynamic_linker='NetBSD ld.elf_so' 50146c321187Smrg fi 50156c321187Smrg shlibpath_var=LD_LIBRARY_PATH 50166c321187Smrg shlibpath_overrides_runpath=yes 50176c321187Smrg hardcode_into_libs=yes 50186c321187Smrg ;; 50196c321187Smrg 50206c321187Smrgnewsos6) 50216c321187Smrg version_type=linux 50226c321187Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 50236c321187Smrg shlibpath_var=LD_LIBRARY_PATH 50246c321187Smrg shlibpath_overrides_runpath=yes 50256c321187Smrg ;; 50266c321187Smrg 5027e120bd27Smrg*nto* | *qnx*) 5028e120bd27Smrg version_type=qnx 50296c321187Smrg need_lib_prefix=no 50306c321187Smrg need_version=no 50316c321187Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 50326c321187Smrg soname_spec='${libname}${release}${shared_ext}$major' 50336c321187Smrg shlibpath_var=LD_LIBRARY_PATH 5034e120bd27Smrg shlibpath_overrides_runpath=no 5035e120bd27Smrg hardcode_into_libs=yes 5036e120bd27Smrg dynamic_linker='ldqnx.so' 50376c321187Smrg ;; 50386c321187Smrg 50396c321187Smrgopenbsd*) 50406c321187Smrg version_type=sunos 50416c321187Smrg sys_lib_dlsearch_path_spec="/usr/lib" 50426c321187Smrg need_lib_prefix=no 50436c321187Smrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 50446c321187Smrg case $host_os in 5045e120bd27Smrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 5046e120bd27Smrg *) need_version=no ;; 50476c321187Smrg esac 50486c321187Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 50496c321187Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 50506c321187Smrg shlibpath_var=LD_LIBRARY_PATH 5051e120bd27Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 50526c321187Smrg case $host_os in 50536c321187Smrg openbsd2.[[89]] | openbsd2.[[89]].*) 50546c321187Smrg shlibpath_overrides_runpath=no 50556c321187Smrg ;; 50566c321187Smrg *) 50576c321187Smrg shlibpath_overrides_runpath=yes 50586c321187Smrg ;; 50596c321187Smrg esac 50606c321187Smrg else 50616c321187Smrg shlibpath_overrides_runpath=yes 50626c321187Smrg fi 50636c321187Smrg ;; 50646c321187Smrg 50656c321187Smrgos2*) 50666c321187Smrg libname_spec='$name' 50676c321187Smrg shrext_cmds=".dll" 50686c321187Smrg need_lib_prefix=no 50696c321187Smrg library_names_spec='$libname${shared_ext} $libname.a' 50706c321187Smrg dynamic_linker='OS/2 ld.exe' 50716c321187Smrg shlibpath_var=LIBPATH 50726c321187Smrg ;; 50736c321187Smrg 50746c321187Smrgosf3* | osf4* | osf5*) 50756c321187Smrg version_type=osf 50766c321187Smrg need_lib_prefix=no 50776c321187Smrg need_version=no 50786c321187Smrg soname_spec='${libname}${release}${shared_ext}$major' 50796c321187Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 50806c321187Smrg shlibpath_var=LD_LIBRARY_PATH 50816c321187Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 50826c321187Smrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 50836c321187Smrg ;; 50846c321187Smrg 508593493779Smrgrdos*) 508693493779Smrg dynamic_linker=no 508793493779Smrg ;; 508893493779Smrg 50896c321187Smrgsolaris*) 50906c321187Smrg version_type=linux 50916c321187Smrg need_lib_prefix=no 50926c321187Smrg need_version=no 50936c321187Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 50946c321187Smrg soname_spec='${libname}${release}${shared_ext}$major' 50956c321187Smrg shlibpath_var=LD_LIBRARY_PATH 50966c321187Smrg shlibpath_overrides_runpath=yes 50976c321187Smrg hardcode_into_libs=yes 50986c321187Smrg # ldd complains unless libraries are executable 50996c321187Smrg postinstall_cmds='chmod +x $lib' 51006c321187Smrg ;; 51016c321187Smrg 51026c321187Smrgsunos4*) 51036c321187Smrg version_type=sunos 51046c321187Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 51056c321187Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 51066c321187Smrg shlibpath_var=LD_LIBRARY_PATH 51076c321187Smrg shlibpath_overrides_runpath=yes 51086c321187Smrg if test "$with_gnu_ld" = yes; then 51096c321187Smrg need_lib_prefix=no 51106c321187Smrg fi 51116c321187Smrg need_version=yes 51126c321187Smrg ;; 51136c321187Smrg 51146c321187Smrgsysv4 | sysv4.3*) 51156c321187Smrg version_type=linux 51166c321187Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 51176c321187Smrg soname_spec='${libname}${release}${shared_ext}$major' 51186c321187Smrg shlibpath_var=LD_LIBRARY_PATH 51196c321187Smrg case $host_vendor in 51206c321187Smrg sni) 51216c321187Smrg shlibpath_overrides_runpath=no 51226c321187Smrg need_lib_prefix=no 51236c321187Smrg runpath_var=LD_RUN_PATH 51246c321187Smrg ;; 51256c321187Smrg siemens) 51266c321187Smrg need_lib_prefix=no 51276c321187Smrg ;; 51286c321187Smrg motorola) 51296c321187Smrg need_lib_prefix=no 51306c321187Smrg need_version=no 51316c321187Smrg shlibpath_overrides_runpath=no 51326c321187Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 51336c321187Smrg ;; 51346c321187Smrg esac 51356c321187Smrg ;; 51366c321187Smrg 51376c321187Smrgsysv4*MP*) 51386c321187Smrg if test -d /usr/nec ;then 51396c321187Smrg version_type=linux 51406c321187Smrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 51416c321187Smrg soname_spec='$libname${shared_ext}.$major' 51426c321187Smrg shlibpath_var=LD_LIBRARY_PATH 51436c321187Smrg fi 51446c321187Smrg ;; 51456c321187Smrg 51466c321187Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 51476c321187Smrg version_type=freebsd-elf 51486c321187Smrg need_lib_prefix=no 51496c321187Smrg need_version=no 51506c321187Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 51516c321187Smrg soname_spec='${libname}${release}${shared_ext}$major' 51526c321187Smrg shlibpath_var=LD_LIBRARY_PATH 5153e120bd27Smrg shlibpath_overrides_runpath=yes 51546c321187Smrg hardcode_into_libs=yes 51556c321187Smrg if test "$with_gnu_ld" = yes; then 51566c321187Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 51576c321187Smrg else 51586c321187Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 51596c321187Smrg case $host_os in 51606c321187Smrg sco3.2v5*) 51616c321187Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 51626c321187Smrg ;; 51636c321187Smrg esac 51646c321187Smrg fi 51656c321187Smrg sys_lib_dlsearch_path_spec='/usr/lib' 51666c321187Smrg ;; 51676c321187Smrg 5168e120bd27Smrgtpf*) 5169e120bd27Smrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 5170e120bd27Smrg version_type=linux 5171e120bd27Smrg need_lib_prefix=no 5172e120bd27Smrg need_version=no 5173e120bd27Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 5174e120bd27Smrg shlibpath_var=LD_LIBRARY_PATH 5175e120bd27Smrg shlibpath_overrides_runpath=no 5176e120bd27Smrg hardcode_into_libs=yes 5177e120bd27Smrg ;; 5178e120bd27Smrg 51796c321187Smrguts4*) 51806c321187Smrg version_type=linux 51816c321187Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 51826c321187Smrg soname_spec='${libname}${release}${shared_ext}$major' 51836c321187Smrg shlibpath_var=LD_LIBRARY_PATH 51846c321187Smrg ;; 51856c321187Smrg 51866c321187Smrg*) 51876c321187Smrg dynamic_linker=no 51886c321187Smrg ;; 51896c321187Smrgesac 51906c321187SmrgAC_MSG_RESULT([$dynamic_linker]) 51916c321187Smrgtest "$dynamic_linker" = no && can_build_shared=no 51926c321187Smrg 51936c321187Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 51946c321187Smrgif test "$GCC" = yes; then 51956c321187Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 51966c321187Smrgfi 51976c321187Smrg 5198e120bd27Smrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 5199e120bd27Smrg sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 5200e120bd27Smrgfi 5201e120bd27Smrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 5202e120bd27Smrg sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 5203e120bd27Smrgfi 52046c321187Smrg 5205e120bd27Smrg_LT_DECL([], [variables_saved_for_relink], [1], 5206e120bd27Smrg [Variables whose values should be saved in libtool wrapper scripts and 5207e120bd27Smrg restored at link time]) 5208e120bd27Smrg_LT_DECL([], [need_lib_prefix], [0], 5209e120bd27Smrg [Do we need the "lib" prefix for modules?]) 5210e120bd27Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 5211e120bd27Smrg_LT_DECL([], [version_type], [0], [Library versioning type]) 5212e120bd27Smrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 5213e120bd27Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 5214e120bd27Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 5215e120bd27Smrg [Is shlibpath searched before the hard-coded library search path?]) 5216e120bd27Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 5217e120bd27Smrg_LT_DECL([], [library_names_spec], [1], 5218e120bd27Smrg [[List of archive names. First name is the real one, the rest are links. 5219e120bd27Smrg The last name is the one that the linker finds with -lNAME]]) 5220e120bd27Smrg_LT_DECL([], [soname_spec], [1], 5221e120bd27Smrg [[The coded name of the library, if different from the real name]]) 5222e120bd27Smrg_LT_DECL([], [install_override_mode], [1], 5223e120bd27Smrg [Permission mode override for installation of shared libraries]) 5224e120bd27Smrg_LT_DECL([], [postinstall_cmds], [2], 5225e120bd27Smrg [Command to use after installation of a shared archive]) 5226e120bd27Smrg_LT_DECL([], [postuninstall_cmds], [2], 5227e120bd27Smrg [Command to use after uninstallation of a shared archive]) 5228e120bd27Smrg_LT_DECL([], [finish_cmds], [2], 5229e120bd27Smrg [Commands used to finish a libtool library installation in a directory]) 5230e120bd27Smrg_LT_DECL([], [finish_eval], [1], 5231e120bd27Smrg [[As "finish_cmds", except a single script fragment to be evaled but 5232e120bd27Smrg not shown]]) 5233e120bd27Smrg_LT_DECL([], [hardcode_into_libs], [0], 5234e120bd27Smrg [Whether we should hardcode library paths into libraries]) 5235e120bd27Smrg_LT_DECL([], [sys_lib_search_path_spec], [2], 5236e120bd27Smrg [Compile-time system search path for libraries]) 5237e120bd27Smrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 5238e120bd27Smrg [Run-time system search path for libraries]) 5239e120bd27Smrg])# _LT_SYS_DYNAMIC_LINKER 5240e120bd27Smrg 5241e120bd27Smrg 5242e120bd27Smrg# _LT_PATH_TOOL_PREFIX(TOOL) 5243e120bd27Smrg# -------------------------- 5244e120bd27Smrg# find a file program which can recognize shared library 5245e120bd27SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 5246e120bd27Smrg[m4_require([_LT_DECL_EGREP])dnl 5247e120bd27SmrgAC_MSG_CHECKING([for $1]) 5248e120bd27SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 5249e120bd27Smrg[case $MAGIC_CMD in 5250e120bd27Smrg[[\\/*] | ?:[\\/]*]) 5251e120bd27Smrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 5252e120bd27Smrg ;; 5253e120bd27Smrg*) 5254e120bd27Smrg lt_save_MAGIC_CMD="$MAGIC_CMD" 5255e120bd27Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 5256e120bd27Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 5257e120bd27Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 5258e120bd27Smrgdnl not every word. This closes a longstanding sh security hole. 5259e120bd27Smrg ac_dummy="m4_if([$2], , $PATH, [$2])" 5260e120bd27Smrg for ac_dir in $ac_dummy; do 52616c321187Smrg IFS="$lt_save_ifs" 5262e120bd27Smrg test -z "$ac_dir" && ac_dir=. 5263e120bd27Smrg if test -f $ac_dir/$1; then 5264e120bd27Smrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 5265e120bd27Smrg if test -n "$file_magic_test_file"; then 5266e120bd27Smrg case $deplibs_check_method in 5267e120bd27Smrg "file_magic "*) 5268e120bd27Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 5269e120bd27Smrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 5270e120bd27Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 5271e120bd27Smrg $EGREP "$file_magic_regex" > /dev/null; then 5272e120bd27Smrg : 5273e120bd27Smrg else 5274e120bd27Smrg cat <<_LT_EOF 1>&2 52756c321187Smrg 52766c321187Smrg*** Warning: the command libtool uses to detect shared libraries, 52776c321187Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 52786c321187Smrg*** The result is that libtool may fail to recognize shared libraries 52796c321187Smrg*** as such. This will affect the creation of libtool libraries that 52806c321187Smrg*** depend on shared libraries, but programs linked with such libtool 52816c321187Smrg*** libraries will work regardless of this problem. Nevertheless, you 52826c321187Smrg*** may want to report the problem to your system manager and/or to 52836c321187Smrg*** bug-libtool@gnu.org 52846c321187Smrg 5285e120bd27Smrg_LT_EOF 52866c321187Smrg fi ;; 52876c321187Smrg esac 52886c321187Smrg fi 52896c321187Smrg break 52906c321187Smrg fi 52916c321187Smrg done 52926c321187Smrg IFS="$lt_save_ifs" 52936c321187Smrg MAGIC_CMD="$lt_save_MAGIC_CMD" 52946c321187Smrg ;; 52956c321187Smrgesac]) 52966c321187SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 52976c321187Smrgif test -n "$MAGIC_CMD"; then 52986c321187Smrg AC_MSG_RESULT($MAGIC_CMD) 52996c321187Smrgelse 53006c321187Smrg AC_MSG_RESULT(no) 53016c321187Smrgfi 5302e120bd27Smrg_LT_DECL([], [MAGIC_CMD], [0], 5303e120bd27Smrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 5304e120bd27Smrg])# _LT_PATH_TOOL_PREFIX 53056c321187Smrg 5306e120bd27Smrg# Old name: 5307e120bd27SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 5308e120bd27Smrgdnl aclocal-1.4 backwards compatibility: 5309e120bd27Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 53106c321187Smrg 5311e120bd27Smrg 5312e120bd27Smrg# _LT_PATH_MAGIC 5313e120bd27Smrg# -------------- 531493493779Smrg# find a file program which can recognize a shared library 5315e120bd27Smrgm4_defun([_LT_PATH_MAGIC], 5316e120bd27Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 53176c321187Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 53186c321187Smrg if test -n "$ac_tool_prefix"; then 5319e120bd27Smrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 53206c321187Smrg else 53216c321187Smrg MAGIC_CMD=: 53226c321187Smrg fi 53236c321187Smrgfi 5324e120bd27Smrg])# _LT_PATH_MAGIC 53256c321187Smrg 53266c321187Smrg 5327e120bd27Smrg# LT_PATH_LD 53286c321187Smrg# ---------- 53296c321187Smrg# find the pathname to the GNU or non-GNU linker 5330e120bd27SmrgAC_DEFUN([LT_PATH_LD], 5331e120bd27Smrg[AC_REQUIRE([AC_PROG_CC])dnl 53326c321187SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 53336c321187SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 5334e120bd27Smrgm4_require([_LT_DECL_SED])dnl 5335e120bd27Smrgm4_require([_LT_DECL_EGREP])dnl 5336e120bd27Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 5337e120bd27Smrg 5338e120bd27SmrgAC_ARG_WITH([gnu-ld], 5339e120bd27Smrg [AS_HELP_STRING([--with-gnu-ld], 5340e120bd27Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 5341e120bd27Smrg [test "$withval" = no || with_gnu_ld=yes], 5342e120bd27Smrg [with_gnu_ld=no])dnl 5343e120bd27Smrg 53446c321187Smrgac_prog=ld 53456c321187Smrgif test "$GCC" = yes; then 53466c321187Smrg # Check if gcc -print-prog-name=ld gives a path. 53476c321187Smrg AC_MSG_CHECKING([for ld used by $CC]) 53486c321187Smrg case $host in 53496c321187Smrg *-*-mingw*) 53506c321187Smrg # gcc leaves a trailing carriage return which upsets mingw 53516c321187Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 53526c321187Smrg *) 53536c321187Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 53546c321187Smrg esac 53556c321187Smrg case $ac_prog in 53566c321187Smrg # Accept absolute paths. 53576c321187Smrg [[\\/]]* | ?:[[\\/]]*) 53586c321187Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 53596c321187Smrg # Canonicalize the pathname of ld 5360e120bd27Smrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 5361e120bd27Smrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 5362e120bd27Smrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 53636c321187Smrg done 53646c321187Smrg test -z "$LD" && LD="$ac_prog" 53656c321187Smrg ;; 53666c321187Smrg "") 53676c321187Smrg # If it fails, then pretend we aren't using GCC. 53686c321187Smrg ac_prog=ld 53696c321187Smrg ;; 53706c321187Smrg *) 53716c321187Smrg # If it is relative, then search for the first ld in PATH. 53726c321187Smrg with_gnu_ld=unknown 53736c321187Smrg ;; 53746c321187Smrg esac 53756c321187Smrgelif test "$with_gnu_ld" = yes; then 53766c321187Smrg AC_MSG_CHECKING([for GNU ld]) 53776c321187Smrgelse 53786c321187Smrg AC_MSG_CHECKING([for non-GNU ld]) 53796c321187Smrgfi 53806c321187SmrgAC_CACHE_VAL(lt_cv_path_LD, 53816c321187Smrg[if test -z "$LD"; then 53826c321187Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 53836c321187Smrg for ac_dir in $PATH; do 53846c321187Smrg IFS="$lt_save_ifs" 53856c321187Smrg test -z "$ac_dir" && ac_dir=. 53866c321187Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 53876c321187Smrg lt_cv_path_LD="$ac_dir/$ac_prog" 53886c321187Smrg # Check to see if the program is GNU ld. I'd rather use --version, 53896c321187Smrg # but apparently some variants of GNU ld only accept -v. 53906c321187Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 53916c321187Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 53926c321187Smrg *GNU* | *'with BFD'*) 53936c321187Smrg test "$with_gnu_ld" != no && break 53946c321187Smrg ;; 53956c321187Smrg *) 53966c321187Smrg test "$with_gnu_ld" != yes && break 53976c321187Smrg ;; 53986c321187Smrg esac 53996c321187Smrg fi 54006c321187Smrg done 54016c321187Smrg IFS="$lt_save_ifs" 54026c321187Smrgelse 54036c321187Smrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 54046c321187Smrgfi]) 54056c321187SmrgLD="$lt_cv_path_LD" 54066c321187Smrgif test -n "$LD"; then 54076c321187Smrg AC_MSG_RESULT($LD) 54086c321187Smrgelse 54096c321187Smrg AC_MSG_RESULT(no) 54106c321187Smrgfi 54116c321187Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 5412e120bd27Smrg_LT_PATH_LD_GNU 5413e120bd27SmrgAC_SUBST([LD]) 54146c321187Smrg 5415e120bd27Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 5416e120bd27Smrg])# LT_PATH_LD 54176c321187Smrg 5418e120bd27Smrg# Old names: 5419e120bd27SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 5420e120bd27SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 5421e120bd27Smrgdnl aclocal-1.4 backwards compatibility: 5422e120bd27Smrgdnl AC_DEFUN([AM_PROG_LD], []) 5423e120bd27Smrgdnl AC_DEFUN([AC_PROG_LD], []) 5424e120bd27Smrg 5425e120bd27Smrg 5426e120bd27Smrg# _LT_PATH_LD_GNU 5427e120bd27Smrg#- -------------- 5428e120bd27Smrgm4_defun([_LT_PATH_LD_GNU], 5429e120bd27Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 54306c321187Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 54316c321187Smrgcase `$LD -v 2>&1 </dev/null` in 54326c321187Smrg*GNU* | *'with BFD'*) 54336c321187Smrg lt_cv_prog_gnu_ld=yes 54346c321187Smrg ;; 54356c321187Smrg*) 54366c321187Smrg lt_cv_prog_gnu_ld=no 54376c321187Smrg ;; 54386c321187Smrgesac]) 54396c321187Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 5440e120bd27Smrg])# _LT_PATH_LD_GNU 54416c321187Smrg 54426c321187Smrg 5443e120bd27Smrg# _LT_CMD_RELOAD 5444e120bd27Smrg# -------------- 54456c321187Smrg# find reload flag for linker 54466c321187Smrg# -- PORTME Some linkers may need a different reload flag. 5447e120bd27Smrgm4_defun([_LT_CMD_RELOAD], 54486c321187Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 54496c321187Smrg lt_cv_ld_reload_flag, 54506c321187Smrg [lt_cv_ld_reload_flag='-r']) 54516c321187Smrgreload_flag=$lt_cv_ld_reload_flag 54526c321187Smrgcase $reload_flag in 54536c321187Smrg"" | " "*) ;; 54546c321187Smrg*) reload_flag=" $reload_flag" ;; 54556c321187Smrgesac 54566c321187Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 54576c321187Smrgcase $host_os in 54586c321187Smrg darwin*) 54596c321187Smrg if test "$GCC" = yes; then 54606c321187Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 54616c321187Smrg else 54626c321187Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 54636c321187Smrg fi 54646c321187Smrg ;; 54656c321187Smrgesac 5466e120bd27Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 5467e120bd27Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl 5468e120bd27Smrg])# _LT_CMD_RELOAD 54696c321187Smrg 54706c321187Smrg 5471e120bd27Smrg# _LT_CHECK_MAGIC_METHOD 5472e120bd27Smrg# ---------------------- 54736c321187Smrg# how to check for library dependencies 54746c321187Smrg# -- PORTME fill in with the dynamic library characteristics 5475e120bd27Smrgm4_defun([_LT_CHECK_MAGIC_METHOD], 5476e120bd27Smrg[m4_require([_LT_DECL_EGREP]) 5477e120bd27Smrgm4_require([_LT_DECL_OBJDUMP]) 5478e120bd27SmrgAC_CACHE_CHECK([how to recognize dependent libraries], 54796c321187Smrglt_cv_deplibs_check_method, 54806c321187Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 54816c321187Smrglt_cv_file_magic_test_file= 54826c321187Smrglt_cv_deplibs_check_method='unknown' 54836c321187Smrg# Need to set the preceding variable on all platforms that support 54846c321187Smrg# interlibrary dependencies. 54856c321187Smrg# 'none' -- dependencies not supported. 54866c321187Smrg# `unknown' -- same as none, but documents that we really don't know. 54876c321187Smrg# 'pass_all' -- all dependencies passed with no checks. 54886c321187Smrg# 'test_compile' -- check by making test program. 54896c321187Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 54906c321187Smrg# which responds to the $file_magic_cmd with a given extended regex. 54916c321187Smrg# If you have `file' or equivalent on your system and you're not sure 54926c321187Smrg# whether `pass_all' will *always* work, you probably want this one. 54936c321187Smrg 54946c321187Smrgcase $host_os in 549593493779Smrgaix[[4-9]]*) 54966c321187Smrg lt_cv_deplibs_check_method=pass_all 54976c321187Smrg ;; 54986c321187Smrg 54996c321187Smrgbeos*) 55006c321187Smrg lt_cv_deplibs_check_method=pass_all 55016c321187Smrg ;; 55026c321187Smrg 55036c321187Smrgbsdi[[45]]*) 55046c321187Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 55056c321187Smrg lt_cv_file_magic_cmd='/usr/bin/file -L' 55066c321187Smrg lt_cv_file_magic_test_file=/shlib/libc.so 55076c321187Smrg ;; 55086c321187Smrg 55096c321187Smrgcygwin*) 55106c321187Smrg # func_win32_libid is a shell function defined in ltmain.sh 55116c321187Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 55126c321187Smrg lt_cv_file_magic_cmd='func_win32_libid' 55136c321187Smrg ;; 55146c321187Smrg 55156c321187Smrgmingw* | pw32*) 55166c321187Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 551793493779Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 551893493779Smrg # unless we find 'file', for example because we are cross-compiling. 5519e120bd27Smrg # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 5520e120bd27Smrg if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 552193493779Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 552293493779Smrg lt_cv_file_magic_cmd='func_win32_libid' 552393493779Smrg else 5524e120bd27Smrg # Keep this pattern in sync with the one in func_win32_libid. 5525e120bd27Smrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 552693493779Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 552793493779Smrg fi 55286c321187Smrg ;; 55296c321187Smrg 5530e120bd27Smrgcegcc*) 5531e120bd27Smrg # use the weaker test based on 'objdump'. See mingw*. 5532e120bd27Smrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 5533e120bd27Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 5534e120bd27Smrg ;; 5535e120bd27Smrg 55366c321187Smrgdarwin* | rhapsody*) 55376c321187Smrg lt_cv_deplibs_check_method=pass_all 55386c321187Smrg ;; 55396c321187Smrg 554093493779Smrgfreebsd* | dragonfly*) 5541e120bd27Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 55426c321187Smrg case $host_cpu in 55436c321187Smrg i*86 ) 55446c321187Smrg # Not sure whether the presence of OpenBSD here was a mistake. 55456c321187Smrg # Let's accept both of them until this is cleared up. 55466c321187Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 55476c321187Smrg lt_cv_file_magic_cmd=/usr/bin/file 55486c321187Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 55496c321187Smrg ;; 55506c321187Smrg esac 55516c321187Smrg else 55526c321187Smrg lt_cv_deplibs_check_method=pass_all 55536c321187Smrg fi 55546c321187Smrg ;; 55556c321187Smrg 55566c321187Smrggnu*) 55576c321187Smrg lt_cv_deplibs_check_method=pass_all 55586c321187Smrg ;; 55596c321187Smrg 5560e120bd27Smrghaiku*) 5561e120bd27Smrg lt_cv_deplibs_check_method=pass_all 5562e120bd27Smrg ;; 5563e120bd27Smrg 55646c321187Smrghpux10.20* | hpux11*) 55656c321187Smrg lt_cv_file_magic_cmd=/usr/bin/file 55666c321187Smrg case $host_cpu in 55676c321187Smrg ia64*) 55686c321187Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 55696c321187Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 55706c321187Smrg ;; 55716c321187Smrg hppa*64*) 5572e120bd27Smrg [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]'] 55736c321187Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 55746c321187Smrg ;; 55756c321187Smrg *) 5576e120bd27Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 55776c321187Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 55786c321187Smrg ;; 55796c321187Smrg esac 55806c321187Smrg ;; 55816c321187Smrg 558293493779Smrginterix[[3-9]]*) 55836c321187Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 55846c321187Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 55856c321187Smrg ;; 55866c321187Smrg 55876c321187Smrgirix5* | irix6* | nonstopux*) 55886c321187Smrg case $LD in 55896c321187Smrg *-32|*"-32 ") libmagic=32-bit;; 55906c321187Smrg *-n32|*"-n32 ") libmagic=N32;; 55916c321187Smrg *-64|*"-64 ") libmagic=64-bit;; 55926c321187Smrg *) libmagic=never-match;; 55936c321187Smrg esac 55946c321187Smrg lt_cv_deplibs_check_method=pass_all 55956c321187Smrg ;; 55966c321187Smrg 55976c321187Smrg# This must be Linux ELF. 5598e120bd27Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 55996c321187Smrg lt_cv_deplibs_check_method=pass_all 56006c321187Smrg ;; 56016c321187Smrg 56026c321187Smrgnetbsd*) 5603e120bd27Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 56046c321187Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 56056c321187Smrg else 56066c321187Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 56076c321187Smrg fi 56086c321187Smrg ;; 56096c321187Smrg 56106c321187Smrgnewos6*) 56116c321187Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 56126c321187Smrg lt_cv_file_magic_cmd=/usr/bin/file 56136c321187Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 56146c321187Smrg ;; 56156c321187Smrg 5616e120bd27Smrg*nto* | *qnx*) 5617e120bd27Smrg lt_cv_deplibs_check_method=pass_all 56186c321187Smrg ;; 56196c321187Smrg 56206c321187Smrgopenbsd*) 5621e120bd27Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 56226c321187Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 56236c321187Smrg else 56246c321187Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 56256c321187Smrg fi 56266c321187Smrg ;; 56276c321187Smrg 56286c321187Smrgosf3* | osf4* | osf5*) 56296c321187Smrg lt_cv_deplibs_check_method=pass_all 56306c321187Smrg ;; 56316c321187Smrg 563293493779Smrgrdos*) 563393493779Smrg lt_cv_deplibs_check_method=pass_all 563493493779Smrg ;; 563593493779Smrg 56366c321187Smrgsolaris*) 56376c321187Smrg lt_cv_deplibs_check_method=pass_all 56386c321187Smrg ;; 56396c321187Smrg 5640e120bd27Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 5641e120bd27Smrg lt_cv_deplibs_check_method=pass_all 5642e120bd27Smrg ;; 5643e120bd27Smrg 56446c321187Smrgsysv4 | sysv4.3*) 56456c321187Smrg case $host_vendor in 56466c321187Smrg motorola) 56476c321187Smrg 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]]' 56486c321187Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 56496c321187Smrg ;; 56506c321187Smrg ncr) 56516c321187Smrg lt_cv_deplibs_check_method=pass_all 56526c321187Smrg ;; 56536c321187Smrg sequent) 56546c321187Smrg lt_cv_file_magic_cmd='/bin/file' 56556c321187Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 56566c321187Smrg ;; 56576c321187Smrg sni) 56586c321187Smrg lt_cv_file_magic_cmd='/bin/file' 56596c321187Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 56606c321187Smrg lt_cv_file_magic_test_file=/lib/libc.so 56616c321187Smrg ;; 56626c321187Smrg siemens) 56636c321187Smrg lt_cv_deplibs_check_method=pass_all 56646c321187Smrg ;; 56656c321187Smrg pc) 56666c321187Smrg lt_cv_deplibs_check_method=pass_all 56676c321187Smrg ;; 56686c321187Smrg esac 56696c321187Smrg ;; 56706c321187Smrg 5671e120bd27Smrgtpf*) 56726c321187Smrg lt_cv_deplibs_check_method=pass_all 56736c321187Smrg ;; 56746c321187Smrgesac 56756c321187Smrg]) 56766c321187Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 56776c321187Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 56786c321187Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 56796c321187Smrg 5680e120bd27Smrg_LT_DECL([], [deplibs_check_method], [1], 5681e120bd27Smrg [Method to check whether dependent libraries are shared objects]) 5682e120bd27Smrg_LT_DECL([], [file_magic_cmd], [1], 5683e120bd27Smrg [Command to use when deplibs_check_method == "file_magic"]) 5684e120bd27Smrg])# _LT_CHECK_MAGIC_METHOD 56856c321187Smrg 5686e120bd27Smrg 5687e120bd27Smrg# LT_PATH_NM 56886c321187Smrg# ---------- 5689e120bd27Smrg# find the pathname to a BSD- or MS-compatible name lister 5690e120bd27SmrgAC_DEFUN([LT_PATH_NM], 5691e120bd27Smrg[AC_REQUIRE([AC_PROG_CC])dnl 5692e120bd27SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 56936c321187Smrg[if test -n "$NM"; then 56946c321187Smrg # Let the user override the test. 56956c321187Smrg lt_cv_path_NM="$NM" 56966c321187Smrgelse 56976c321187Smrg lt_nm_to_check="${ac_tool_prefix}nm" 569893493779Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 56996c321187Smrg lt_nm_to_check="$lt_nm_to_check nm" 57006c321187Smrg fi 57016c321187Smrg for lt_tmp_nm in $lt_nm_to_check; do 57026c321187Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 57036c321187Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 57046c321187Smrg IFS="$lt_save_ifs" 57056c321187Smrg test -z "$ac_dir" && ac_dir=. 57066c321187Smrg tmp_nm="$ac_dir/$lt_tmp_nm" 57076c321187Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 57086c321187Smrg # Check to see if the nm accepts a BSD-compat flag. 57096c321187Smrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 57106c321187Smrg # nm: unknown option "B" ignored 57116c321187Smrg # Tru64's nm complains that /dev/null is an invalid object file 57126c321187Smrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 57136c321187Smrg */dev/null* | *'Invalid file or object type'*) 57146c321187Smrg lt_cv_path_NM="$tmp_nm -B" 57156c321187Smrg break 57166c321187Smrg ;; 57176c321187Smrg *) 57186c321187Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 57196c321187Smrg */dev/null*) 57206c321187Smrg lt_cv_path_NM="$tmp_nm -p" 57216c321187Smrg break 57226c321187Smrg ;; 57236c321187Smrg *) 57246c321187Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 57256c321187Smrg continue # so that we can try to find one that supports BSD flags 57266c321187Smrg ;; 57276c321187Smrg esac 57286c321187Smrg ;; 57296c321187Smrg esac 57306c321187Smrg fi 57316c321187Smrg done 57326c321187Smrg IFS="$lt_save_ifs" 57336c321187Smrg done 5734e120bd27Smrg : ${lt_cv_path_NM=no} 57356c321187Smrgfi]) 5736e120bd27Smrgif test "$lt_cv_path_NM" != "no"; then 5737e120bd27Smrg NM="$lt_cv_path_NM" 5738e120bd27Smrgelse 5739e120bd27Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 5740e120bd27Smrg if test -n "$DUMPBIN"; then : 5741e120bd27Smrg # Let the user override the test. 5742e120bd27Smrg else 5743e120bd27Smrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 5744e120bd27Smrg case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 5745e120bd27Smrg *COFF*) 5746e120bd27Smrg DUMPBIN="$DUMPBIN -symbols" 5747e120bd27Smrg ;; 5748e120bd27Smrg *) 5749e120bd27Smrg DUMPBIN=: 5750e120bd27Smrg ;; 5751e120bd27Smrg esac 5752e120bd27Smrg fi 5753e120bd27Smrg AC_SUBST([DUMPBIN]) 5754e120bd27Smrg if test "$DUMPBIN" != ":"; then 5755e120bd27Smrg NM="$DUMPBIN" 5756e120bd27Smrg fi 5757e120bd27Smrgfi 5758e120bd27Smrgtest -z "$NM" && NM=nm 5759e120bd27SmrgAC_SUBST([NM]) 5760e120bd27Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 5761e120bd27Smrg 5762e120bd27SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 5763e120bd27Smrg [lt_cv_nm_interface="BSD nm" 5764e120bd27Smrg echo "int some_variable = 0;" > conftest.$ac_ext 5765e120bd27Smrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 5766e120bd27Smrg (eval "$ac_compile" 2>conftest.err) 5767e120bd27Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 5768e120bd27Smrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 5769e120bd27Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 5770e120bd27Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 5771e120bd27Smrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 5772e120bd27Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 5773e120bd27Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 5774e120bd27Smrg lt_cv_nm_interface="MS dumpbin" 5775e120bd27Smrg fi 5776e120bd27Smrg rm -f conftest*]) 5777e120bd27Smrg])# LT_PATH_NM 57786c321187Smrg 5779e120bd27Smrg# Old names: 5780e120bd27SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 5781e120bd27SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 5782e120bd27Smrgdnl aclocal-1.4 backwards compatibility: 5783e120bd27Smrgdnl AC_DEFUN([AM_PROG_NM], []) 5784e120bd27Smrgdnl AC_DEFUN([AC_PROG_NM], []) 57856c321187Smrg 5786e120bd27Smrg 5787e120bd27Smrg# LT_LIB_M 5788e120bd27Smrg# -------- 57896c321187Smrg# check for math library 5790e120bd27SmrgAC_DEFUN([LT_LIB_M], 57916c321187Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 57926c321187SmrgLIBM= 57936c321187Smrgcase $host in 5794e120bd27Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 57956c321187Smrg # These system don't have libm, or don't need it 57966c321187Smrg ;; 57976c321187Smrg*-ncr-sysv4.3*) 57986c321187Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 57996c321187Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 58006c321187Smrg ;; 58016c321187Smrg*) 58026c321187Smrg AC_CHECK_LIB(m, cos, LIBM="-lm") 58036c321187Smrg ;; 58046c321187Smrgesac 5805e120bd27SmrgAC_SUBST([LIBM]) 5806e120bd27Smrg])# LT_LIB_M 58076c321187Smrg 5808e120bd27Smrg# Old name: 5809e120bd27SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 5810e120bd27Smrgdnl aclocal-1.4 backwards compatibility: 5811e120bd27Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 58126c321187Smrg 58136c321187Smrg 5814e120bd27Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 5815e120bd27Smrg# ------------------------------- 5816e120bd27Smrgm4_defun([_LT_COMPILER_NO_RTTI], 5817e120bd27Smrg[m4_require([_LT_TAG_COMPILER])dnl 58186c321187Smrg 5819e120bd27Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 58206c321187Smrg 5821e120bd27Smrgif test "$GCC" = yes; then 5822e120bd27Smrg case $cc_basename in 5823e120bd27Smrg nvcc*) 5824e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 5825e120bd27Smrg *) 5826e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 5827e120bd27Smrg esac 58286c321187Smrg 5829e120bd27Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 5830e120bd27Smrg lt_cv_prog_compiler_rtti_exceptions, 5831e120bd27Smrg [-fno-rtti -fno-exceptions], [], 5832e120bd27Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 58336c321187Smrgfi 5834e120bd27Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 5835e120bd27Smrg [Compiler flag to turn off builtin functions]) 5836e120bd27Smrg])# _LT_COMPILER_NO_RTTI 58376c321187Smrg 58386c321187Smrg 5839e120bd27Smrg# _LT_CMD_GLOBAL_SYMBOLS 5840e120bd27Smrg# ---------------------- 5841e120bd27Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 5842e120bd27Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 5843e120bd27SmrgAC_REQUIRE([AC_PROG_CC])dnl 5844e120bd27SmrgAC_REQUIRE([AC_PROG_AWK])dnl 5845e120bd27SmrgAC_REQUIRE([LT_PATH_NM])dnl 5846e120bd27SmrgAC_REQUIRE([LT_PATH_LD])dnl 5847e120bd27Smrgm4_require([_LT_DECL_SED])dnl 5848e120bd27Smrgm4_require([_LT_DECL_EGREP])dnl 5849e120bd27Smrgm4_require([_LT_TAG_COMPILER])dnl 58506c321187Smrg 5851e120bd27Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 5852e120bd27SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 5853e120bd27SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 5854e120bd27Smrg[ 5855e120bd27Smrg# These are sane defaults that work on at least a few old systems. 5856e120bd27Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 58576c321187Smrg 5858e120bd27Smrg# Character class describing NM global symbol codes. 5859e120bd27Smrgsymcode='[[BCDEGRST]]' 58606c321187Smrg 5861e120bd27Smrg# Regexp to match symbols that can be accessed directly from C. 5862e120bd27Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 58636c321187Smrg 5864e120bd27Smrg# Define system-specific variables. 58656c321187Smrgcase $host_os in 5866e120bd27Smrgaix*) 5867e120bd27Smrg symcode='[[BCDT]]' 58686c321187Smrg ;; 5869e120bd27Smrgcygwin* | mingw* | pw32* | cegcc*) 5870e120bd27Smrg symcode='[[ABCDGISTW]]' 5871e120bd27Smrg ;; 5872e120bd27Smrghpux*) 5873e120bd27Smrg if test "$host_cpu" = ia64; then 5874e120bd27Smrg symcode='[[ABCDEGRST]]' 58756c321187Smrg fi 5876e120bd27Smrg ;; 5877e120bd27Smrgirix* | nonstopux*) 5878e120bd27Smrg symcode='[[BCDEGRST]]' 5879e120bd27Smrg ;; 5880e120bd27Smrgosf*) 5881e120bd27Smrg symcode='[[BCDEGQRST]]' 5882e120bd27Smrg ;; 5883e120bd27Smrgsolaris*) 5884e120bd27Smrg symcode='[[BDRT]]' 5885e120bd27Smrg ;; 5886e120bd27Smrgsco3.2v5*) 5887e120bd27Smrg symcode='[[DT]]' 5888e120bd27Smrg ;; 5889e120bd27Smrgsysv4.2uw2*) 5890e120bd27Smrg symcode='[[DT]]' 5891e120bd27Smrg ;; 5892e120bd27Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 5893e120bd27Smrg symcode='[[ABDT]]' 5894e120bd27Smrg ;; 5895e120bd27Smrgsysv4) 5896e120bd27Smrg symcode='[[DFNSTU]]' 5897e120bd27Smrg ;; 58986c321187Smrgesac 58996c321187Smrg 5900e120bd27Smrg# If we're using GNU nm, then use its standard symbol codes. 5901e120bd27Smrgcase `$NM -V 2>&1` in 5902e120bd27Smrg*GNU* | *'with BFD'*) 5903e120bd27Smrg symcode='[[ABCDGIRSTW]]' ;; 5904e120bd27Smrgesac 59056c321187Smrg 5906e120bd27Smrg# Transform an extracted symbol line into a proper C declaration. 5907e120bd27Smrg# Some systems (esp. on ia64) link data and code symbols differently, 5908e120bd27Smrg# so use this general approach. 5909e120bd27Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 59106c321187Smrg 5911e120bd27Smrg# Transform an extracted symbol line into symbol name and symbol address 5912e120bd27Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 5913e120bd27Smrglt_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'" 59146c321187Smrg 5915e120bd27Smrg# Handle CRLF in mingw tool chain 5916e120bd27Smrgopt_cr= 5917e120bd27Smrgcase $build_os in 5918e120bd27Smrgmingw*) 5919e120bd27Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 5920e120bd27Smrg ;; 5921e120bd27Smrgesac 59226c321187Smrg 5923e120bd27Smrg# Try without a prefix underscore, then with it. 5924e120bd27Smrgfor ac_symprfx in "" "_"; do 59256c321187Smrg 5926e120bd27Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 5927e120bd27Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 59286c321187Smrg 5929e120bd27Smrg # Write the raw and C identifiers. 5930e120bd27Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 5931e120bd27Smrg # Fake it for dumpbin and say T for any non-static function 5932e120bd27Smrg # and D for any global variable. 5933e120bd27Smrg # Also find C++ and __fastcall symbols from MSVC++, 5934e120bd27Smrg # which start with @ or ?. 5935e120bd27Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 5936e120bd27Smrg" {last_section=section; section=\$ 3};"\ 5937e120bd27Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 5938e120bd27Smrg" \$ 0!~/External *\|/{next};"\ 5939e120bd27Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 5940e120bd27Smrg" {if(hide[section]) next};"\ 5941e120bd27Smrg" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 5942e120bd27Smrg" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 5943e120bd27Smrg" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 5944e120bd27Smrg" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 5945e120bd27Smrg" ' prfx=^$ac_symprfx]" 5946e120bd27Smrg else 5947e120bd27Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 5948e120bd27Smrg fi 59496c321187Smrg 5950e120bd27Smrg # Check to see that the pipe works correctly. 5951e120bd27Smrg pipe_works=no 59526c321187Smrg 5953e120bd27Smrg rm -f conftest* 5954e120bd27Smrg cat > conftest.$ac_ext <<_LT_EOF 5955e120bd27Smrg#ifdef __cplusplus 5956e120bd27Smrgextern "C" { 5957e120bd27Smrg#endif 5958e120bd27Smrgchar nm_test_var; 5959e120bd27Smrgvoid nm_test_func(void); 5960e120bd27Smrgvoid nm_test_func(void){} 5961e120bd27Smrg#ifdef __cplusplus 5962e120bd27Smrg} 5963e120bd27Smrg#endif 5964e120bd27Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 5965e120bd27Smrg_LT_EOF 59666c321187Smrg 5967e120bd27Smrg if AC_TRY_EVAL(ac_compile); then 5968e120bd27Smrg # Now try to grab the symbols. 5969e120bd27Smrg nlist=conftest.nm 5970e120bd27Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 5971e120bd27Smrg # Try sorting and uniquifying the output. 5972e120bd27Smrg if sort "$nlist" | uniq > "$nlist"T; then 5973e120bd27Smrg mv -f "$nlist"T "$nlist" 5974e120bd27Smrg else 5975e120bd27Smrg rm -f "$nlist"T 5976e120bd27Smrg fi 59776c321187Smrg 5978e120bd27Smrg # Make sure that we snagged all the symbols we need. 5979e120bd27Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 5980e120bd27Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 5981e120bd27Smrg cat <<_LT_EOF > conftest.$ac_ext 5982e120bd27Smrg#ifdef __cplusplus 5983e120bd27Smrgextern "C" { 5984e120bd27Smrg#endif 59856c321187Smrg 5986e120bd27Smrg_LT_EOF 5987e120bd27Smrg # Now generate the symbol file. 5988e120bd27Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 59896c321187Smrg 5990e120bd27Smrg cat <<_LT_EOF >> conftest.$ac_ext 59916c321187Smrg 5992e120bd27Smrg/* The mapping between symbol names and symbols. */ 5993e120bd27Smrgconst struct { 5994e120bd27Smrg const char *name; 5995e120bd27Smrg void *address; 5996e120bd27Smrg} 5997e120bd27Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 5998e120bd27Smrg{ 5999e120bd27Smrg { "@PROGRAM@", (void *) 0 }, 6000e120bd27Smrg_LT_EOF 6001e120bd27Smrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 6002e120bd27Smrg cat <<\_LT_EOF >> conftest.$ac_ext 6003e120bd27Smrg {0, (void *) 0} 6004e120bd27Smrg}; 60056c321187Smrg 6006e120bd27Smrg/* This works around a problem in FreeBSD linker */ 6007e120bd27Smrg#ifdef FREEBSD_WORKAROUND 6008e120bd27Smrgstatic const void *lt_preloaded_setup() { 6009e120bd27Smrg return lt__PROGRAM__LTX_preloaded_symbols; 6010e120bd27Smrg} 6011e120bd27Smrg#endif 60126c321187Smrg 6013e120bd27Smrg#ifdef __cplusplus 6014e120bd27Smrg} 6015e120bd27Smrg#endif 6016e120bd27Smrg_LT_EOF 6017e120bd27Smrg # Now try linking the two files. 6018e120bd27Smrg mv conftest.$ac_objext conftstm.$ac_objext 6019e120bd27Smrg lt_save_LIBS="$LIBS" 6020e120bd27Smrg lt_save_CFLAGS="$CFLAGS" 6021e120bd27Smrg LIBS="conftstm.$ac_objext" 6022e120bd27Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 6023e120bd27Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 6024e120bd27Smrg pipe_works=yes 6025e120bd27Smrg fi 6026e120bd27Smrg LIBS="$lt_save_LIBS" 6027e120bd27Smrg CFLAGS="$lt_save_CFLAGS" 6028e120bd27Smrg else 6029e120bd27Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 6030e120bd27Smrg fi 6031e120bd27Smrg else 6032e120bd27Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 6033e120bd27Smrg fi 60346c321187Smrg else 6035e120bd27Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 60366c321187Smrg fi 60376c321187Smrg else 6038e120bd27Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 6039e120bd27Smrg cat conftest.$ac_ext >&5 60406c321187Smrg fi 6041e120bd27Smrg rm -rf conftest* conftst* 60426c321187Smrg 6043e120bd27Smrg # Do not use the global_symbol_pipe unless it works. 6044e120bd27Smrg if test "$pipe_works" = yes; then 6045e120bd27Smrg break 6046e120bd27Smrg else 6047e120bd27Smrg lt_cv_sys_global_symbol_pipe= 6048e120bd27Smrg fi 6049e120bd27Smrgdone 6050e120bd27Smrg]) 6051e120bd27Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 6052e120bd27Smrg lt_cv_sys_global_symbol_to_cdecl= 6053e120bd27Smrgfi 6054e120bd27Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 6055e120bd27Smrg AC_MSG_RESULT(failed) 60566c321187Smrgelse 6057e120bd27Smrg AC_MSG_RESULT(ok) 60586c321187Smrgfi 60596c321187Smrg 6060e120bd27Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 6061e120bd27Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 6062e120bd27Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 6063e120bd27Smrg [Transform the output of nm in a proper C declaration]) 6064e120bd27Smrg_LT_DECL([global_symbol_to_c_name_address], 6065e120bd27Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 6066e120bd27Smrg [Transform the output of nm in a C name address pair]) 6067e120bd27Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 6068e120bd27Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 6069e120bd27Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 6070e120bd27Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 60716c321187Smrg 60726c321187Smrg 6073e120bd27Smrg# _LT_COMPILER_PIC([TAGNAME]) 6074e120bd27Smrg# --------------------------- 6075e120bd27Smrgm4_defun([_LT_COMPILER_PIC], 6076e120bd27Smrg[m4_require([_LT_TAG_COMPILER])dnl 6077e120bd27Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 6078e120bd27Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 6079e120bd27Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 60806c321187Smrg 6081e120bd27SmrgAC_MSG_CHECKING([for $compiler option to produce PIC]) 6082e120bd27Smrgm4_if([$1], [CXX], [ 6083e120bd27Smrg # C++ specific cases for pic, static, wl, etc. 6084e120bd27Smrg if test "$GXX" = yes; then 6085e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6086e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 60876c321187Smrg 6088e120bd27Smrg case $host_os in 6089e120bd27Smrg aix*) 6090e120bd27Smrg # All AIX code is PIC. 60916c321187Smrg if test "$host_cpu" = ia64; then 6092e120bd27Smrg # AIX 5 now supports IA64 processor 6093e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 60946c321187Smrg fi 6095e120bd27Smrg ;; 60966c321187Smrg 6097e120bd27Smrg amigaos*) 6098e120bd27Smrg case $host_cpu in 6099e120bd27Smrg powerpc) 6100e120bd27Smrg # see comment about AmigaOS4 .so support 6101e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6102e120bd27Smrg ;; 6103e120bd27Smrg m68k) 6104e120bd27Smrg # FIXME: we need at least 68020 code to build shared libraries, but 6105e120bd27Smrg # adding the `-m68020' flag to GCC prevents building anything better, 6106e120bd27Smrg # like `-m68040'. 6107e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 61086c321187Smrg ;; 6109e120bd27Smrg esac 6110e120bd27Smrg ;; 61116c321187Smrg 6112e120bd27Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 6113e120bd27Smrg # PIC is the default for these OSes. 61146c321187Smrg ;; 6115e120bd27Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 6116e120bd27Smrg # This hack is so that the source file can tell whether it is being 6117e120bd27Smrg # built for inclusion in a dll (and should export symbols for example). 6118e120bd27Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 6119e120bd27Smrg # (--disable-auto-import) libraries 6120e120bd27Smrg m4_if([$1], [GCJ], [], 6121e120bd27Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 61226c321187Smrg ;; 6123e120bd27Smrg darwin* | rhapsody*) 6124e120bd27Smrg # PIC is the default on this platform 6125e120bd27Smrg # Common symbols not allowed in MH_DYLIB files 6126e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 6127e120bd27Smrg ;; 6128e120bd27Smrg *djgpp*) 6129e120bd27Smrg # DJGPP does not support shared libraries at all 6130e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 6131e120bd27Smrg ;; 6132e120bd27Smrg haiku*) 6133e120bd27Smrg # PIC is the default for Haiku. 6134e120bd27Smrg # The "-static" flag exists, but is broken. 6135e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 6136e120bd27Smrg ;; 6137e120bd27Smrg interix[[3-9]]*) 6138e120bd27Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 6139e120bd27Smrg # Instead, we relocate shared libraries at runtime. 6140e120bd27Smrg ;; 6141e120bd27Smrg sysv4*MP*) 6142e120bd27Smrg if test -d /usr/nec; then 6143e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 61446c321187Smrg fi 61456c321187Smrg ;; 6146e120bd27Smrg hpux*) 6147e120bd27Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 6148e120bd27Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 6149e120bd27Smrg # sets the default TLS model and affects inlining. 61506c321187Smrg case $host_cpu in 6151e120bd27Smrg hppa*64*) 6152e120bd27Smrg ;; 61536c321187Smrg *) 6154e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6155e120bd27Smrg ;; 61566c321187Smrg esac 6157e120bd27Smrg ;; 6158e120bd27Smrg *qnx* | *nto*) 6159e120bd27Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 6160e120bd27Smrg # it will coredump. 6161e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 61626c321187Smrg ;; 61636c321187Smrg *) 6164e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 61656c321187Smrg ;; 61666c321187Smrg esac 6167e120bd27Smrg else 6168e120bd27Smrg case $host_os in 6169e120bd27Smrg aix[[4-9]]*) 6170e120bd27Smrg # All AIX code is PIC. 6171e120bd27Smrg if test "$host_cpu" = ia64; then 6172e120bd27Smrg # AIX 5 now supports IA64 processor 6173e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6174e120bd27Smrg else 6175e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 6176e120bd27Smrg fi 61776c321187Smrg ;; 6178e120bd27Smrg chorus*) 6179e120bd27Smrg case $cc_basename in 6180e120bd27Smrg cxch68*) 6181e120bd27Smrg # Green Hills C++ Compiler 6182e120bd27Smrg # _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" 61836c321187Smrg ;; 61846c321187Smrg esac 61856c321187Smrg ;; 6186e120bd27Smrg dgux*) 6187e120bd27Smrg case $cc_basename in 6188e120bd27Smrg ec++*) 6189e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6190e120bd27Smrg ;; 6191e120bd27Smrg ghcx*) 6192e120bd27Smrg # Green Hills C++ Compiler 6193e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 6194e120bd27Smrg ;; 6195e120bd27Smrg *) 6196e120bd27Smrg ;; 6197e120bd27Smrg esac 6198e120bd27Smrg ;; 6199e120bd27Smrg freebsd* | dragonfly*) 6200e120bd27Smrg # FreeBSD uses GNU C++ 6201e120bd27Smrg ;; 6202e120bd27Smrg hpux9* | hpux10* | hpux11*) 6203e120bd27Smrg case $cc_basename in 6204e120bd27Smrg CC*) 6205e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6206e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 6207e120bd27Smrg if test "$host_cpu" != ia64; then 6208e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 6209e120bd27Smrg fi 6210e120bd27Smrg ;; 6211e120bd27Smrg aCC*) 6212e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6213e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 62146c321187Smrg case $host_cpu in 6215e120bd27Smrg hppa*64*|ia64*) 6216e120bd27Smrg # +Z the default 62176c321187Smrg ;; 62186c321187Smrg *) 6219e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 62206c321187Smrg ;; 62216c321187Smrg esac 6222e120bd27Smrg ;; 6223e120bd27Smrg *) 6224e120bd27Smrg ;; 6225e120bd27Smrg esac 62266c321187Smrg ;; 6227e120bd27Smrg interix*) 6228e120bd27Smrg # This is c89, which is MS Visual C++ (no shared libs) 6229e120bd27Smrg # Anyone wants to do a port? 62306c321187Smrg ;; 6231e120bd27Smrg irix5* | irix6* | nonstopux*) 6232e120bd27Smrg case $cc_basename in 6233e120bd27Smrg CC*) 6234e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6235e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6236e120bd27Smrg # CC pic flag -KPIC is the default. 6237e120bd27Smrg ;; 6238e120bd27Smrg *) 6239e120bd27Smrg ;; 6240e120bd27Smrg esac 62416c321187Smrg ;; 6242e120bd27Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 6243e120bd27Smrg case $cc_basename in 6244e120bd27Smrg KCC*) 6245e120bd27Smrg # KAI C++ Compiler 6246e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 6247e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6248e120bd27Smrg ;; 6249e120bd27Smrg ecpc* ) 6250e120bd27Smrg # old Intel C++ for x86_64 which still supported -KPIC. 6251e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6252e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6253e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 6254e120bd27Smrg ;; 6255e120bd27Smrg icpc* ) 6256e120bd27Smrg # Intel C++, used to be incompatible with GCC. 6257e120bd27Smrg # ICC 10 doesn't accept -KPIC any more. 6258e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6259e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6260e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 6261e120bd27Smrg ;; 6262e120bd27Smrg pgCC* | pgcpp*) 6263e120bd27Smrg # Portland Group C++ compiler 6264e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6265e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 6266e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6267e120bd27Smrg ;; 6268e120bd27Smrg cxx*) 6269e120bd27Smrg # Compaq C++ 6270e120bd27Smrg # Make sure the PIC flag is empty. It appears that all Alpha 6271e120bd27Smrg # Linux and Compaq Tru64 Unix objects are PIC. 6272e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 6273e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6274e120bd27Smrg ;; 6275e120bd27Smrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 6276e120bd27Smrg # IBM XL 8.0, 9.0 on PPC and BlueGene 6277e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6278e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 6279e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 6280e120bd27Smrg ;; 6281e120bd27Smrg *) 6282e120bd27Smrg case `$CC -V 2>&1 | sed 5q` in 6283e120bd27Smrg *Sun\ C*) 6284e120bd27Smrg # Sun C++ 5.9 6285e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6286e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6287e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 6288e120bd27Smrg ;; 6289e120bd27Smrg esac 6290e120bd27Smrg ;; 62916c321187Smrg esac 62926c321187Smrg ;; 6293e120bd27Smrg lynxos*) 62946c321187Smrg ;; 6295e120bd27Smrg m88k*) 629693493779Smrg ;; 6297e120bd27Smrg mvs*) 6298e120bd27Smrg case $cc_basename in 6299e120bd27Smrg cxx*) 6300e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 6301e120bd27Smrg ;; 6302e120bd27Smrg *) 6303e120bd27Smrg ;; 6304e120bd27Smrg esac 63056c321187Smrg ;; 6306e120bd27Smrg netbsd*) 63076c321187Smrg ;; 6308e120bd27Smrg *qnx* | *nto*) 6309e120bd27Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 6310e120bd27Smrg # it will coredump. 6311e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 6312e120bd27Smrg ;; 6313e120bd27Smrg osf3* | osf4* | osf5*) 6314e120bd27Smrg case $cc_basename in 6315e120bd27Smrg KCC*) 6316e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 6317e120bd27Smrg ;; 6318e120bd27Smrg RCC*) 6319e120bd27Smrg # Rational C++ 2.4.1 6320e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 6321e120bd27Smrg ;; 6322e120bd27Smrg cxx*) 6323e120bd27Smrg # Digital/Compaq C++ 6324e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6325e120bd27Smrg # Make sure the PIC flag is empty. It appears that all Alpha 6326e120bd27Smrg # Linux and Compaq Tru64 Unix objects are PIC. 6327e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 6328e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6329e120bd27Smrg ;; 6330e120bd27Smrg *) 6331e120bd27Smrg ;; 6332e120bd27Smrg esac 63336c321187Smrg ;; 6334e120bd27Smrg psos*) 63356c321187Smrg ;; 6336e120bd27Smrg solaris*) 6337e120bd27Smrg case $cc_basename in 6338e120bd27Smrg CC* | sunCC*) 6339e120bd27Smrg # Sun C++ 4.2, 5.x and Centerline C++ 6340e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6341e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6342e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 6343e120bd27Smrg ;; 6344e120bd27Smrg gcx*) 6345e120bd27Smrg # Green Hills C++ Compiler 6346e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 6347e120bd27Smrg ;; 6348e120bd27Smrg *) 6349e120bd27Smrg ;; 6350e120bd27Smrg esac 63516c321187Smrg ;; 6352e120bd27Smrg sunos4*) 6353e120bd27Smrg case $cc_basename in 6354e120bd27Smrg CC*) 6355e120bd27Smrg # Sun C++ 4.x 6356e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 6357e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6358e120bd27Smrg ;; 6359e120bd27Smrg lcc*) 6360e120bd27Smrg # Lucid 6361e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 6362e120bd27Smrg ;; 6363e120bd27Smrg *) 6364e120bd27Smrg ;; 6365e120bd27Smrg esac 63666c321187Smrg ;; 6367e120bd27Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 6368e120bd27Smrg case $cc_basename in 6369e120bd27Smrg CC*) 6370e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6371e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6372e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6373e120bd27Smrg ;; 6374e120bd27Smrg esac 63756c321187Smrg ;; 6376e120bd27Smrg tandem*) 6377e120bd27Smrg case $cc_basename in 6378e120bd27Smrg NCC*) 6379e120bd27Smrg # NonStop-UX NCC 3.20 6380e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6381e120bd27Smrg ;; 6382e120bd27Smrg *) 6383e120bd27Smrg ;; 6384e120bd27Smrg esac 63856c321187Smrg ;; 6386e120bd27Smrg vxworks*) 63876c321187Smrg ;; 63886c321187Smrg *) 6389e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 63906c321187Smrg ;; 63916c321187Smrg esac 6392e120bd27Smrg fi 6393e120bd27Smrg], 6394e120bd27Smrg[ 6395e120bd27Smrg if test "$GCC" = yes; then 6396e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6397e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 63986c321187Smrg 6399e120bd27Smrg case $host_os in 6400e120bd27Smrg aix*) 6401e120bd27Smrg # All AIX code is PIC. 6402e120bd27Smrg if test "$host_cpu" = ia64; then 6403e120bd27Smrg # AIX 5 now supports IA64 processor 6404e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6405e120bd27Smrg fi 6406e120bd27Smrg ;; 64076c321187Smrg 6408e120bd27Smrg amigaos*) 6409e120bd27Smrg case $host_cpu in 6410e120bd27Smrg powerpc) 6411e120bd27Smrg # see comment about AmigaOS4 .so support 6412e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6413e120bd27Smrg ;; 6414e120bd27Smrg m68k) 6415e120bd27Smrg # FIXME: we need at least 68020 code to build shared libraries, but 6416e120bd27Smrg # adding the `-m68020' flag to GCC prevents building anything better, 6417e120bd27Smrg # like `-m68040'. 6418e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 6419e120bd27Smrg ;; 6420e120bd27Smrg esac 6421e120bd27Smrg ;; 64226c321187Smrg 6423e120bd27Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 6424e120bd27Smrg # PIC is the default for these OSes. 6425e120bd27Smrg ;; 64266c321187Smrg 6427e120bd27Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 6428e120bd27Smrg # This hack is so that the source file can tell whether it is being 6429e120bd27Smrg # built for inclusion in a dll (and should export symbols for example). 6430e120bd27Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 6431e120bd27Smrg # (--disable-auto-import) libraries 6432e120bd27Smrg m4_if([$1], [GCJ], [], 6433e120bd27Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 6434e120bd27Smrg ;; 64356c321187Smrg 6436e120bd27Smrg darwin* | rhapsody*) 6437e120bd27Smrg # PIC is the default on this platform 6438e120bd27Smrg # Common symbols not allowed in MH_DYLIB files 6439e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 6440e120bd27Smrg ;; 64416c321187Smrg 6442e120bd27Smrg haiku*) 6443e120bd27Smrg # PIC is the default for Haiku. 6444e120bd27Smrg # The "-static" flag exists, but is broken. 6445e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 6446e120bd27Smrg ;; 64476c321187Smrg 6448e120bd27Smrg hpux*) 6449e120bd27Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 6450e120bd27Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 6451e120bd27Smrg # sets the default TLS model and affects inlining. 6452e120bd27Smrg case $host_cpu in 6453e120bd27Smrg hppa*64*) 6454e120bd27Smrg # +Z the default 64556c321187Smrg ;; 64566c321187Smrg *) 6457e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 64586c321187Smrg ;; 6459e120bd27Smrg esac 6460e120bd27Smrg ;; 6461e120bd27Smrg 6462e120bd27Smrg interix[[3-9]]*) 6463e120bd27Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 6464e120bd27Smrg # Instead, we relocate shared libraries at runtime. 6465e120bd27Smrg ;; 6466e120bd27Smrg 6467e120bd27Smrg msdosdjgpp*) 6468e120bd27Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 6469e120bd27Smrg # on systems that don't support them. 6470e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 6471e120bd27Smrg enable_shared=no 6472e120bd27Smrg ;; 6473e120bd27Smrg 6474e120bd27Smrg *nto* | *qnx*) 6475e120bd27Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 6476e120bd27Smrg # it will coredump. 6477e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 6478e120bd27Smrg ;; 6479e120bd27Smrg 6480e120bd27Smrg sysv4*MP*) 6481e120bd27Smrg if test -d /usr/nec; then 6482e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 6483e120bd27Smrg fi 6484e120bd27Smrg ;; 6485e120bd27Smrg 6486e120bd27Smrg *) 6487e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6488e120bd27Smrg ;; 64896c321187Smrg esac 64906c321187Smrg 64916c321187Smrg case $cc_basename in 6492e120bd27Smrg nvcc*) # Cuda Compiler Driver 2.2 6493e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 6494e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC' 6495e120bd27Smrg ;; 6496e120bd27Smrg esac 6497e120bd27Smrg else 6498e120bd27Smrg # PORTME Check for flag to pass linker flags through the system compiler. 6499e120bd27Smrg case $host_os in 6500e120bd27Smrg aix*) 6501e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6502e120bd27Smrg if test "$host_cpu" = ia64; then 6503e120bd27Smrg # AIX 5 now supports IA64 processor 6504e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6505e120bd27Smrg else 6506e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 6507e120bd27Smrg fi 6508e120bd27Smrg ;; 6509e120bd27Smrg 6510e120bd27Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 6511e120bd27Smrg # This hack is so that the source file can tell whether it is being 6512e120bd27Smrg # built for inclusion in a dll (and should export symbols for example). 6513e120bd27Smrg m4_if([$1], [GCJ], [], 6514e120bd27Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 6515e120bd27Smrg ;; 6516e120bd27Smrg 6517e120bd27Smrg hpux9* | hpux10* | hpux11*) 6518e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6519e120bd27Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 6520e120bd27Smrg # not for PA HP-UX. 6521e120bd27Smrg case $host_cpu in 6522e120bd27Smrg hppa*64*|ia64*) 6523e120bd27Smrg # +Z the default 65246c321187Smrg ;; 65256c321187Smrg *) 6526e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 65276c321187Smrg ;; 6528e120bd27Smrg esac 6529e120bd27Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 6530e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 6531e120bd27Smrg ;; 6532e120bd27Smrg 6533e120bd27Smrg irix5* | irix6* | nonstopux*) 6534e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6535e120bd27Smrg # PIC (with -KPIC) is the default. 6536e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6537e120bd27Smrg ;; 6538e120bd27Smrg 6539e120bd27Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 6540e120bd27Smrg case $cc_basename in 6541e120bd27Smrg # old Intel for x86_64 which still supported -KPIC. 6542e120bd27Smrg ecc*) 6543e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6544e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6545e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 6546e120bd27Smrg ;; 6547e120bd27Smrg # icc used to be incompatible with GCC. 6548e120bd27Smrg # ICC 10 doesn't accept -KPIC any more. 6549e120bd27Smrg icc* | ifort*) 6550e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6551e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 6552e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 6553e120bd27Smrg ;; 6554e120bd27Smrg # Lahey Fortran 8.1. 6555e120bd27Smrg lf95*) 6556e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6557e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 6558e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 6559e120bd27Smrg ;; 6560e120bd27Smrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 6561e120bd27Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 6562e120bd27Smrg # which looks to be a dead project) 6563e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6564e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 6565e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6566e120bd27Smrg ;; 6567e120bd27Smrg ccc*) 6568e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6569e120bd27Smrg # All Alpha code is PIC. 6570e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6571e120bd27Smrg ;; 6572e120bd27Smrg xl* | bgxl* | bgf* | mpixl*) 6573e120bd27Smrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 6574e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6575e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 6576e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 65776c321187Smrg ;; 65786c321187Smrg *) 6579e120bd27Smrg case `$CC -V 2>&1 | sed 5q` in 6580e120bd27Smrg *Sun\ F* | *Sun*Fortran*) 6581e120bd27Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 6582e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6583e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6584e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 6585e120bd27Smrg ;; 6586e120bd27Smrg *Sun\ C*) 6587e120bd27Smrg # Sun C 5.9 6588e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6589e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6590e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6591e120bd27Smrg ;; 6592e120bd27Smrg esac 65936c321187Smrg ;; 6594e120bd27Smrg esac 6595e120bd27Smrg ;; 65966c321187Smrg 6597e120bd27Smrg newsos6) 6598e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6599e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6600e120bd27Smrg ;; 66016c321187Smrg 6602e120bd27Smrg *nto* | *qnx*) 6603e120bd27Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 6604e120bd27Smrg # it will coredump. 6605e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 6606e120bd27Smrg ;; 66076c321187Smrg 6608e120bd27Smrg osf3* | osf4* | osf5*) 6609e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6610e120bd27Smrg # All OSF/1 code is PIC. 6611e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6612e120bd27Smrg ;; 66136c321187Smrg 6614e120bd27Smrg rdos*) 6615e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 6616e120bd27Smrg ;; 66176c321187Smrg 6618e120bd27Smrg solaris*) 6619e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6620e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6621e120bd27Smrg case $cc_basename in 6622e120bd27Smrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 6623e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 6624e120bd27Smrg *) 6625e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 6626e120bd27Smrg esac 6627e120bd27Smrg ;; 66286c321187Smrg 6629e120bd27Smrg sunos4*) 6630e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 6631e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 6632e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6633e120bd27Smrg ;; 66346c321187Smrg 6635e120bd27Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 6636e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6637e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6638e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6639e120bd27Smrg ;; 66406c321187Smrg 6641e120bd27Smrg sysv4*MP*) 6642e120bd27Smrg if test -d /usr/nec ;then 6643e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 6644e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6645e120bd27Smrg fi 6646e120bd27Smrg ;; 66476c321187Smrg 6648e120bd27Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 6649e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6650e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 6651e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6652e120bd27Smrg ;; 66536c321187Smrg 6654e120bd27Smrg unicos*) 6655e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 6656e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 6657e120bd27Smrg ;; 66586c321187Smrg 6659e120bd27Smrg uts4*) 6660e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 6661e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 6662e120bd27Smrg ;; 66636c321187Smrg 6664e120bd27Smrg *) 6665e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 6666e120bd27Smrg ;; 66676c321187Smrg esac 6668e120bd27Smrg fi 6669e120bd27Smrg]) 6670e120bd27Smrgcase $host_os in 6671e120bd27Smrg # For platforms which do not support PIC, -DPIC is meaningless: 6672e120bd27Smrg *djgpp*) 6673e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 6674e120bd27Smrg ;; 6675e120bd27Smrg *) 6676e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 6677e120bd27Smrg ;; 6678e120bd27Smrgesac 6679e120bd27SmrgAC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 6680e120bd27Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 6681e120bd27Smrg [How to pass a linker flag through the compiler]) 66826c321187Smrg 6683e120bd27Smrg# 6684e120bd27Smrg# Check to make sure the PIC flag actually works. 6685e120bd27Smrg# 6686e120bd27Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 6687e120bd27Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 6688e120bd27Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 6689e120bd27Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 6690e120bd27Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 6691e120bd27Smrg "" | " "*) ;; 6692e120bd27Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 6693e120bd27Smrg esac], 6694e120bd27Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 6695e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 66966c321187Smrgfi 6697e120bd27Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 6698e120bd27Smrg [Additional compiler flags for building library objects]) 66996c321187Smrg 6700e120bd27Smrg# 6701e120bd27Smrg# Check to make sure the static flag actually works. 6702e120bd27Smrg# 6703e120bd27Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 6704e120bd27Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 6705e120bd27Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 6706e120bd27Smrg $lt_tmp_static_flag, 6707e120bd27Smrg [], 6708e120bd27Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 6709e120bd27Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 6710e120bd27Smrg [Compiler flag to prevent dynamic linking]) 6711e120bd27Smrg])# _LT_COMPILER_PIC 671293493779Smrg 67136c321187Smrg 6714e120bd27Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 6715e120bd27Smrg# ---------------------------- 6716e120bd27Smrg# See if the linker supports building shared libraries. 6717e120bd27Smrgm4_defun([_LT_LINKER_SHLIBS], 6718e120bd27Smrg[AC_REQUIRE([LT_PATH_LD])dnl 6719e120bd27SmrgAC_REQUIRE([LT_PATH_NM])dnl 6720e120bd27Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 6721e120bd27Smrgm4_require([_LT_DECL_EGREP])dnl 6722e120bd27Smrgm4_require([_LT_DECL_SED])dnl 6723e120bd27Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 6724e120bd27Smrgm4_require([_LT_TAG_COMPILER])dnl 6725e120bd27SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 6726e120bd27Smrgm4_if([$1], [CXX], [ 6727e120bd27Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 6728e120bd27Smrg case $host_os in 6729e120bd27Smrg aix[[4-9]]*) 6730e120bd27Smrg # If we're using GNU nm, then we don't want the "-C" option. 6731e120bd27Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 6732e120bd27Smrg # Also, AIX nm treats weak defined symbols like other global defined 6733e120bd27Smrg # symbols, whereas GNU nm marks them as "W". 6734e120bd27Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 6735e120bd27Smrg _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' 6736e120bd27Smrg else 6737e120bd27Smrg _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' 673893493779Smrg fi 673993493779Smrg ;; 6740e120bd27Smrg pw32*) 6741e120bd27Smrg _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 674293493779Smrg ;; 6743e120bd27Smrg cygwin* | mingw* | cegcc*) 6744e120bd27Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' 6745e120bd27Smrg ;; 6746e120bd27Smrg *) 6747e120bd27Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 6748e120bd27Smrg ;; 6749e120bd27Smrg esac 6750e120bd27Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 6751e120bd27Smrg], [ 6752e120bd27Smrg runpath_var= 6753e120bd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 6754e120bd27Smrg _LT_TAGVAR(always_export_symbols, $1)=no 6755e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)= 6756e120bd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 6757e120bd27Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 6758e120bd27Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6759e120bd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 6760e120bd27Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 6761e120bd27Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 6762e120bd27Smrg _LT_TAGVAR(hardcode_direct, $1)=no 6763e120bd27Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 6764e120bd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6765e120bd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 6766e120bd27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 6767e120bd27Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 6768e120bd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 6769e120bd27Smrg _LT_TAGVAR(inherit_rpath, $1)=no 6770e120bd27Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 6771e120bd27Smrg _LT_TAGVAR(module_cmds, $1)= 6772e120bd27Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 6773e120bd27Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 6774e120bd27Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 6775e120bd27Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 6776e120bd27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 6777e120bd27Smrg # include_expsyms should be a list of space-separated symbols to be *always* 6778e120bd27Smrg # included in the symbol list 6779e120bd27Smrg _LT_TAGVAR(include_expsyms, $1)= 6780e120bd27Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 6781e120bd27Smrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 6782e120bd27Smrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 6783e120bd27Smrg # as well as any symbol that contains `d'. 6784e120bd27Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 6785e120bd27Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 6786e120bd27Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 6787e120bd27Smrg # the symbol is explicitly referenced. Since portable code cannot 6788e120bd27Smrg # rely on this symbol name, it's probably fine to never include it in 6789e120bd27Smrg # preloaded symbol tables. 6790e120bd27Smrg # Exclude shared library initialization/finalization symbols. 6791e120bd27Smrgdnl Note also adjust exclude_expsyms for C++ above. 6792e120bd27Smrg extract_expsyms_cmds= 679393493779Smrg 6794e120bd27Smrg case $host_os in 6795e120bd27Smrg cygwin* | mingw* | pw32* | cegcc*) 6796e120bd27Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 6797e120bd27Smrg # When not using gcc, we currently assume that we are using 6798e120bd27Smrg # Microsoft Visual C++. 6799e120bd27Smrg if test "$GCC" != yes; then 6800e120bd27Smrg with_gnu_ld=no 680193493779Smrg fi 68026c321187Smrg ;; 6803e120bd27Smrg interix*) 6804e120bd27Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 6805e120bd27Smrg with_gnu_ld=yes 6806e120bd27Smrg ;; 6807e120bd27Smrg openbsd*) 6808e120bd27Smrg with_gnu_ld=no 6809e120bd27Smrg ;; 68106c321187Smrg esac 68116c321187Smrg 6812e120bd27Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 68136c321187Smrg 6814e120bd27Smrg # On some targets, GNU ld is compatible enough with the native linker 6815e120bd27Smrg # that we're better off using the native interface for both. 6816e120bd27Smrg lt_use_gnu_ld_interface=no 6817e120bd27Smrg if test "$with_gnu_ld" = yes; then 6818e120bd27Smrg case $host_os in 6819e120bd27Smrg aix*) 6820e120bd27Smrg # The AIX port of GNU ld has always aspired to compatibility 6821e120bd27Smrg # with the native linker. However, as the warning in the GNU ld 6822e120bd27Smrg # block says, versions before 2.19.5* couldn't really create working 6823e120bd27Smrg # shared libraries, regardless of the interface used. 6824e120bd27Smrg case `$LD -v 2>&1` in 6825e120bd27Smrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 6826e120bd27Smrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 6827e120bd27Smrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 6828e120bd27Smrg *) 6829e120bd27Smrg lt_use_gnu_ld_interface=yes 6830e120bd27Smrg ;; 6831e120bd27Smrg esac 6832e120bd27Smrg ;; 6833e120bd27Smrg *) 6834e120bd27Smrg lt_use_gnu_ld_interface=yes 6835e120bd27Smrg ;; 6836e120bd27Smrg esac 6837e120bd27Smrg fi 68386c321187Smrg 6839e120bd27Smrg if test "$lt_use_gnu_ld_interface" = yes; then 6840e120bd27Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 6841e120bd27Smrg wlarc='${wl}' 68426c321187Smrg 6843e120bd27Smrg # Set some defaults for GNU ld with shared library support. These 6844e120bd27Smrg # are reset later if shared libraries are not supported. Putting them 6845e120bd27Smrg # here allows them to be overridden if necessary. 6846e120bd27Smrg runpath_var=LD_RUN_PATH 6847e120bd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6848e120bd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6849e120bd27Smrg # ancient GNU ld didn't support --whole-archive et. al. 6850e120bd27Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 6851e120bd27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 6852e120bd27Smrg else 6853e120bd27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 6854e120bd27Smrg fi 6855e120bd27Smrg supports_anon_versioning=no 6856e120bd27Smrg case `$LD -v 2>&1` in 6857e120bd27Smrg *GNU\ gold*) supports_anon_versioning=yes ;; 6858e120bd27Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 6859e120bd27Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 6860e120bd27Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 6861e120bd27Smrg *\ 2.11.*) ;; # other 2.11 versions 6862e120bd27Smrg *) supports_anon_versioning=yes ;; 6863e120bd27Smrg esac 68646c321187Smrg 6865e120bd27Smrg # See if GNU ld supports shared libraries. 6866e120bd27Smrg case $host_os in 6867e120bd27Smrg aix[[3-9]]*) 6868e120bd27Smrg # On AIX/PPC, the GNU linker is very broken 6869e120bd27Smrg if test "$host_cpu" != ia64; then 6870e120bd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6871e120bd27Smrg cat <<_LT_EOF 1>&2 68726c321187Smrg 6873e120bd27Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported 6874e120bd27Smrg*** to be unable to reliably create shared libraries on AIX. 6875e120bd27Smrg*** Therefore, libtool is disabling shared libraries support. If you 6876e120bd27Smrg*** really care for shared libraries, you may want to install binutils 6877e120bd27Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 6878e120bd27Smrg*** You will then need to restart the configuration process. 68796c321187Smrg 6880e120bd27Smrg_LT_EOF 6881e120bd27Smrg fi 6882e120bd27Smrg ;; 68836c321187Smrg 6884e120bd27Smrg amigaos*) 6885e120bd27Smrg case $host_cpu in 6886e120bd27Smrg powerpc) 6887e120bd27Smrg # see comment about AmigaOS4 .so support 6888e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6889e120bd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 6890e120bd27Smrg ;; 6891e120bd27Smrg m68k) 6892e120bd27Smrg _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)' 6893e120bd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6894e120bd27Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6895e120bd27Smrg ;; 6896e120bd27Smrg esac 6897e120bd27Smrg ;; 68986c321187Smrg 6899e120bd27Smrg beos*) 6900e120bd27Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6901e120bd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6902e120bd27Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 6903e120bd27Smrg # support --undefined. This deserves some investigation. FIXME 6904e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6905e120bd27Smrg else 6906e120bd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6907e120bd27Smrg fi 6908e120bd27Smrg ;; 69096c321187Smrg 6910e120bd27Smrg cygwin* | mingw* | pw32* | cegcc*) 6911e120bd27Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 6912e120bd27Smrg # as there is no search path for DLLs. 6913e120bd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6914e120bd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 6915e120bd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6916e120bd27Smrg _LT_TAGVAR(always_export_symbols, $1)=no 6917e120bd27Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6918e120bd27Smrg _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' 6919e120bd27Smrg 6920e120bd27Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 6921e120bd27Smrg _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' 6922e120bd27Smrg # If the export-symbols file already is a .def file (1st line 6923e120bd27Smrg # is EXPORTS), use it as is; otherwise, prepend... 6924e120bd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 6925e120bd27Smrg cp $export_symbols $output_objdir/$soname.def; 6926e120bd27Smrg else 6927e120bd27Smrg echo EXPORTS > $output_objdir/$soname.def; 6928e120bd27Smrg cat $export_symbols >> $output_objdir/$soname.def; 6929e120bd27Smrg fi~ 6930e120bd27Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 6931e120bd27Smrg else 6932e120bd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6933e120bd27Smrg fi 6934e120bd27Smrg ;; 69356c321187Smrg 6936e120bd27Smrg haiku*) 6937e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6938e120bd27Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6939e120bd27Smrg ;; 69406c321187Smrg 6941e120bd27Smrg interix[[3-9]]*) 6942e120bd27Smrg _LT_TAGVAR(hardcode_direct, $1)=no 6943e120bd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6944e120bd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6945e120bd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6946e120bd27Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 6947e120bd27Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 6948e120bd27Smrg # default) and relocated if they conflict, which is a slow very memory 6949e120bd27Smrg # consuming and fragmenting process. To avoid this, we pick a random, 6950e120bd27Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 6951e120bd27Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 6952e120bd27Smrg _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' 6953e120bd27Smrg _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' 6954e120bd27Smrg ;; 69556c321187Smrg 6956e120bd27Smrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 6957e120bd27Smrg tmp_diet=no 6958e120bd27Smrg if test "$host_os" = linux-dietlibc; then 6959e120bd27Smrg case $cc_basename in 6960e120bd27Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 6961e120bd27Smrg esac 6962e120bd27Smrg fi 6963e120bd27Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 6964e120bd27Smrg && test "$tmp_diet" = no 6965e120bd27Smrg then 6966e120bd27Smrg tmp_addflag= 6967e120bd27Smrg tmp_sharedflag='-shared' 6968e120bd27Smrg case $cc_basename,$host_cpu in 6969e120bd27Smrg pgcc*) # Portland Group C compiler 6970e120bd27Smrg _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' 6971e120bd27Smrg tmp_addflag=' $pic_flag' 6972e120bd27Smrg ;; 6973e120bd27Smrg pgf77* | pgf90* | pgf95* | pgfortran*) 6974e120bd27Smrg # Portland Group f77 and f90 compilers 6975e120bd27Smrg _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' 6976e120bd27Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 6977e120bd27Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 6978e120bd27Smrg tmp_addflag=' -i_dynamic' ;; 6979e120bd27Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 6980e120bd27Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 6981e120bd27Smrg ifc* | ifort*) # Intel Fortran compiler 6982e120bd27Smrg tmp_addflag=' -nofor_main' ;; 6983e120bd27Smrg lf95*) # Lahey Fortran 8.1 6984e120bd27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 6985e120bd27Smrg tmp_sharedflag='--shared' ;; 6986e120bd27Smrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 6987e120bd27Smrg tmp_sharedflag='-qmkshrobj' 6988e120bd27Smrg tmp_addflag= ;; 6989e120bd27Smrg nvcc*) # Cuda Compiler Driver 2.2 6990e120bd27Smrg _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' 6991e120bd27Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 6992e120bd27Smrg ;; 6993e120bd27Smrg esac 6994e120bd27Smrg case `$CC -V 2>&1 | sed 5q` in 6995e120bd27Smrg *Sun\ C*) # Sun C 5.9 6996e120bd27Smrg _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' 6997e120bd27Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 6998e120bd27Smrg tmp_sharedflag='-G' ;; 6999e120bd27Smrg *Sun\ F*) # Sun Fortran 8.3 7000e120bd27Smrg tmp_sharedflag='-G' ;; 7001e120bd27Smrg esac 7002e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 70036c321187Smrg 7004e120bd27Smrg if test "x$supports_anon_versioning" = xyes; then 7005e120bd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 7006e120bd27Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 7007e120bd27Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 7008e120bd27Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 7009e120bd27Smrg fi 70106c321187Smrg 7011e120bd27Smrg case $cc_basename in 7012e120bd27Smrg xlf* | bgf* | bgxlf* | mpixlf*) 7013e120bd27Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 7014e120bd27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 7015e120bd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7016e120bd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 7017e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 7018e120bd27Smrg if test "x$supports_anon_versioning" = xyes; then 7019e120bd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 7020e120bd27Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 7021e120bd27Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 7022e120bd27Smrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 7023e120bd27Smrg fi 7024e120bd27Smrg ;; 7025e120bd27Smrg esac 7026e120bd27Smrg else 7027e120bd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7028e120bd27Smrg fi 7029e120bd27Smrg ;; 70306c321187Smrg 7031e120bd27Smrg netbsd*) 7032e120bd27Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 7033e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 7034e120bd27Smrg wlarc= 7035e120bd27Smrg else 7036e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7037e120bd27Smrg _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' 7038e120bd27Smrg fi 7039e120bd27Smrg ;; 70406c321187Smrg 7041e120bd27Smrg solaris*) 7042e120bd27Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 7043e120bd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7044e120bd27Smrg cat <<_LT_EOF 1>&2 70456c321187Smrg 7046e120bd27Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 7047e120bd27Smrg*** create shared libraries on Solaris systems. Therefore, libtool 7048e120bd27Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 7049e120bd27Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 7050e120bd27Smrg*** your PATH or compiler configuration so that the native linker is 7051e120bd27Smrg*** used, and then restart. 70526c321187Smrg 7053e120bd27Smrg_LT_EOF 7054e120bd27Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 7055e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7056e120bd27Smrg _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' 7057e120bd27Smrg else 7058e120bd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7059e120bd27Smrg fi 7060e120bd27Smrg ;; 70616c321187Smrg 7062e120bd27Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 7063e120bd27Smrg case `$LD -v 2>&1` in 7064e120bd27Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 7065e120bd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7066e120bd27Smrg cat <<_LT_EOF 1>&2 70676c321187Smrg 7068e120bd27Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 7069e120bd27Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 7070e120bd27Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 7071e120bd27Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 7072e120bd27Smrg*** your PATH or compiler configuration so that the native linker is 7073e120bd27Smrg*** used, and then restart. 70746c321187Smrg 7075e120bd27Smrg_LT_EOF 7076e120bd27Smrg ;; 7077e120bd27Smrg *) 7078e120bd27Smrg # For security reasons, it is highly recommended that you always 7079e120bd27Smrg # use absolute paths for naming shared libraries, and exclude the 7080e120bd27Smrg # DT_RUNPATH tag from executables and libraries. But doing so 7081e120bd27Smrg # requires that you compile everything twice, which is a pain. 7082e120bd27Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 7083e120bd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7084e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7085e120bd27Smrg _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' 7086e120bd27Smrg else 7087e120bd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7088e120bd27Smrg fi 7089e120bd27Smrg ;; 7090e120bd27Smrg esac 7091e120bd27Smrg ;; 70926c321187Smrg 7093e120bd27Smrg sunos4*) 7094e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 7095e120bd27Smrg wlarc= 7096e120bd27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7097e120bd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7098e120bd27Smrg ;; 70996c321187Smrg 7100e120bd27Smrg *) 7101e120bd27Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 7102e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7103e120bd27Smrg _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' 7104e120bd27Smrg else 7105e120bd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7106e120bd27Smrg fi 7107e120bd27Smrg ;; 7108e120bd27Smrg esac 71096c321187Smrg 7110e120bd27Smrg if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 7111e120bd27Smrg runpath_var= 7112e120bd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7113e120bd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 7114e120bd27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 7115e120bd27Smrg fi 7116e120bd27Smrg else 7117e120bd27Smrg # PORTME fill in a description of your system's linker (not GNU ld) 7118e120bd27Smrg case $host_os in 7119e120bd27Smrg aix3*) 7120e120bd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7121e120bd27Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 7122e120bd27Smrg _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' 7123e120bd27Smrg # Note: this linker hardcodes the directories in LIBPATH if there 7124e120bd27Smrg # are no directories specified by -L. 7125e120bd27Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 7126e120bd27Smrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 7127e120bd27Smrg # Neither direct hardcoding nor static linking is supported with a 7128e120bd27Smrg # broken collect2. 7129e120bd27Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 7130e120bd27Smrg fi 7131e120bd27Smrg ;; 71326c321187Smrg 7133e120bd27Smrg aix[[4-9]]*) 7134e120bd27Smrg if test "$host_cpu" = ia64; then 7135e120bd27Smrg # On IA64, the linker does run time linking by default, so we don't 7136e120bd27Smrg # have to do anything special. 7137e120bd27Smrg aix_use_runtimelinking=no 7138e120bd27Smrg exp_sym_flag='-Bexport' 7139e120bd27Smrg no_entry_flag="" 7140e120bd27Smrg else 7141e120bd27Smrg # If we're using GNU nm, then we don't want the "-C" option. 7142e120bd27Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 7143e120bd27Smrg # Also, AIX nm treats weak defined symbols like other global 7144e120bd27Smrg # defined symbols, whereas GNU nm marks them as "W". 7145e120bd27Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 7146e120bd27Smrg _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' 7147e120bd27Smrg else 7148e120bd27Smrg _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' 7149e120bd27Smrg fi 7150e120bd27Smrg aix_use_runtimelinking=no 71516c321187Smrg 7152e120bd27Smrg # Test if we are trying to use run time linking or normal 7153e120bd27Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 7154e120bd27Smrg # need to do runtime linking. 7155e120bd27Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 7156e120bd27Smrg for ld_flag in $LDFLAGS; do 7157e120bd27Smrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 7158e120bd27Smrg aix_use_runtimelinking=yes 7159e120bd27Smrg break 7160e120bd27Smrg fi 7161e120bd27Smrg done 7162e120bd27Smrg ;; 7163e120bd27Smrg esac 71646c321187Smrg 7165e120bd27Smrg exp_sym_flag='-bexport' 7166e120bd27Smrg no_entry_flag='-bnoentry' 7167e120bd27Smrg fi 71686c321187Smrg 7169e120bd27Smrg # When large executables or shared objects are built, AIX ld can 7170e120bd27Smrg # have problems creating the table of contents. If linking a library 7171e120bd27Smrg # or program results in "error TOC overflow" add -mminimal-toc to 7172e120bd27Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 7173e120bd27Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 71746c321187Smrg 7175e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='' 7176e120bd27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7177e120bd27Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7178e120bd27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 7179e120bd27Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7180e120bd27Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 71816c321187Smrg 7182e120bd27Smrg if test "$GCC" = yes; then 7183e120bd27Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 7184e120bd27Smrg # We only want to do this on AIX 4.2 and lower, the check 7185e120bd27Smrg # below for broken collect2 doesn't work under 4.3+ 7186e120bd27Smrg collect2name=`${CC} -print-prog-name=collect2` 7187e120bd27Smrg if test -f "$collect2name" && 7188e120bd27Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 7189e120bd27Smrg then 7190e120bd27Smrg # We have reworked collect2 7191e120bd27Smrg : 7192e120bd27Smrg else 7193e120bd27Smrg # We have old collect2 7194e120bd27Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 7195e120bd27Smrg # It fails to find uninstalled libraries when the uninstalled 7196e120bd27Smrg # path is not listed in the libpath. Setting hardcode_minus_L 7197e120bd27Smrg # to unsupported forces relinking 7198e120bd27Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 7199e120bd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7200e120bd27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 7201e120bd27Smrg fi 7202e120bd27Smrg ;; 7203e120bd27Smrg esac 7204e120bd27Smrg shared_flag='-shared' 7205e120bd27Smrg if test "$aix_use_runtimelinking" = yes; then 7206e120bd27Smrg shared_flag="$shared_flag "'${wl}-G' 7207e120bd27Smrg fi 7208e120bd27Smrg else 7209e120bd27Smrg # not using gcc 7210e120bd27Smrg if test "$host_cpu" = ia64; then 7211e120bd27Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 7212e120bd27Smrg # chokes on -Wl,-G. The following line is correct: 7213e120bd27Smrg shared_flag='-G' 7214e120bd27Smrg else 7215e120bd27Smrg if test "$aix_use_runtimelinking" = yes; then 7216e120bd27Smrg shared_flag='${wl}-G' 7217e120bd27Smrg else 7218e120bd27Smrg shared_flag='${wl}-bM:SRE' 7219e120bd27Smrg fi 7220e120bd27Smrg fi 7221e120bd27Smrg fi 72226c321187Smrg 7223e120bd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 7224e120bd27Smrg # It seems that -bexpall does not export symbols beginning with 7225e120bd27Smrg # underscore (_), so it is better to generate a list of symbols to export. 7226e120bd27Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 7227e120bd27Smrg if test "$aix_use_runtimelinking" = yes; then 7228e120bd27Smrg # Warning - without using the other runtime loading flags (-brtl), 7229e120bd27Smrg # -berok will link without error, but may produce a broken library. 7230e120bd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 7231e120bd27Smrg # Determine the default libpath from the value encoded in an 7232e120bd27Smrg # empty executable. 7233e120bd27Smrg _LT_SYS_MODULE_PATH_AIX 7234e120bd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 7235e120bd27Smrg _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" 7236e120bd27Smrg else 7237e120bd27Smrg if test "$host_cpu" = ia64; then 7238e120bd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 7239e120bd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 7240e120bd27Smrg _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" 7241e120bd27Smrg else 7242e120bd27Smrg # Determine the default libpath from the value encoded in an 7243e120bd27Smrg # empty executable. 7244e120bd27Smrg _LT_SYS_MODULE_PATH_AIX 7245e120bd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 7246e120bd27Smrg # Warning - without using the other run time loading flags, 7247e120bd27Smrg # -berok will link without error, but may produce a broken library. 7248e120bd27Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 7249e120bd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 7250e120bd27Smrg if test "$with_gnu_ld" = yes; then 7251e120bd27Smrg # We only use this code for GNU lds that support --whole-archive. 7252e120bd27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 7253e120bd27Smrg else 7254e120bd27Smrg # Exported symbols can be pulled into shared objects from archives 7255e120bd27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 7256e120bd27Smrg fi 7257e120bd27Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 7258e120bd27Smrg # This is similar to how AIX traditionally builds its shared libraries. 7259e120bd27Smrg _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' 7260e120bd27Smrg fi 7261e120bd27Smrg fi 7262e120bd27Smrg ;; 72636c321187Smrg 7264e120bd27Smrg amigaos*) 7265e120bd27Smrg case $host_cpu in 7266e120bd27Smrg powerpc) 7267e120bd27Smrg # see comment about AmigaOS4 .so support 7268e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 7269e120bd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 7270e120bd27Smrg ;; 7271e120bd27Smrg m68k) 7272e120bd27Smrg _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)' 7273e120bd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7274e120bd27Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 7275e120bd27Smrg ;; 7276e120bd27Smrg esac 7277e120bd27Smrg ;; 72786c321187Smrg 7279e120bd27Smrg bsdi[[45]]*) 7280e120bd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 7281e120bd27Smrg ;; 72826c321187Smrg 7283e120bd27Smrg cygwin* | mingw* | pw32* | cegcc*) 7284e120bd27Smrg # When not using gcc, we currently assume that we are using 7285e120bd27Smrg # Microsoft Visual C++. 7286e120bd27Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 7287e120bd27Smrg # no search path for DLLs. 7288e120bd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 7289e120bd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7290e120bd27Smrg # Tell ltmain to make .lib files, not .a files. 7291e120bd27Smrg libext=lib 7292e120bd27Smrg # Tell ltmain to make .dll files, not .so files. 7293e120bd27Smrg shrext_cmds=".dll" 7294e120bd27Smrg # FIXME: Setting linknames here is a bad hack. 7295e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 7296e120bd27Smrg # The linker will automatically build a .lib file if we build a DLL. 7297e120bd27Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 7298e120bd27Smrg # FIXME: Should let the user specify the lib program. 7299e120bd27Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 7300e120bd27Smrg _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' 7301e120bd27Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 7302e120bd27Smrg ;; 73036c321187Smrg 7304e120bd27Smrg darwin* | rhapsody*) 7305e120bd27Smrg _LT_DARWIN_LINKER_FEATURES($1) 7306e120bd27Smrg ;; 73076c321187Smrg 7308e120bd27Smrg dgux*) 7309e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7310e120bd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7311e120bd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7312e120bd27Smrg ;; 73136c321187Smrg 7314e120bd27Smrg freebsd1*) 7315e120bd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7316e120bd27Smrg ;; 73176c321187Smrg 7318e120bd27Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 7319e120bd27Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 7320e120bd27Smrg # does not break anything, and helps significantly (at the cost of a little 7321e120bd27Smrg # extra space). 7322e120bd27Smrg freebsd2.2*) 7323e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 7324e120bd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7325e120bd27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7326e120bd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7327e120bd27Smrg ;; 73286c321187Smrg 7329e120bd27Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 7330e120bd27Smrg freebsd2*) 7331e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 7332e120bd27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7333e120bd27Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 7334e120bd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7335e120bd27Smrg ;; 73366c321187Smrg 7337e120bd27Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 7338e120bd27Smrg freebsd* | dragonfly*) 7339e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' 7340e120bd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7341e120bd27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7342e120bd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7343e120bd27Smrg ;; 73446c321187Smrg 7345e120bd27Smrg hpux9*) 7346e120bd27Smrg if test "$GCC" = yes; then 7347e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 7348e120bd27Smrg else 7349e120bd27Smrg _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' 7350e120bd27Smrg fi 7351e120bd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 7352e120bd27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7353e120bd27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 73546c321187Smrg 7355e120bd27Smrg # hardcode_minus_L: Not really in the search PATH, 7356e120bd27Smrg # but as the default location of the library. 7357e120bd27Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 7358e120bd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 73596c321187Smrg ;; 73606c321187Smrg 7361e120bd27Smrg hpux10*) 7362e120bd27Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 7363e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 7364e120bd27Smrg else 7365e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 7366e120bd27Smrg fi 7367e120bd27Smrg if test "$with_gnu_ld" = no; then 7368e120bd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 7369e120bd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 7370e120bd27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7371e120bd27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7372e120bd27Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7373e120bd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7374e120bd27Smrg # hardcode_minus_L: Not really in the search PATH, 7375e120bd27Smrg # but as the default location of the library. 7376e120bd27Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 7377e120bd27Smrg fi 7378e120bd27Smrg ;; 73796c321187Smrg 7380e120bd27Smrg hpux11*) 7381e120bd27Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 7382e120bd27Smrg case $host_cpu in 7383e120bd27Smrg hppa*64*) 7384e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 7385e120bd27Smrg ;; 7386e120bd27Smrg ia64*) 7387e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 7388e120bd27Smrg ;; 7389e120bd27Smrg *) 7390e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 7391e120bd27Smrg ;; 7392e120bd27Smrg esac 7393e120bd27Smrg else 7394e120bd27Smrg case $host_cpu in 7395e120bd27Smrg hppa*64*) 7396e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 7397e120bd27Smrg ;; 7398e120bd27Smrg ia64*) 7399e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 7400e120bd27Smrg ;; 7401e120bd27Smrg *) 7402e120bd27Smrg m4_if($1, [], [ 7403e120bd27Smrg # Older versions of the 11.00 compiler do not understand -b yet 7404e120bd27Smrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 7405e120bd27Smrg _LT_LINKER_OPTION([if $CC understands -b], 7406e120bd27Smrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 7407e120bd27Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 7408e120bd27Smrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 7409e120bd27Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 7410e120bd27Smrg ;; 7411e120bd27Smrg esac 7412e120bd27Smrg fi 7413e120bd27Smrg if test "$with_gnu_ld" = no; then 7414e120bd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 7415e120bd27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 74166c321187Smrg 7417e120bd27Smrg case $host_cpu in 7418e120bd27Smrg hppa*64*|ia64*) 7419e120bd27Smrg _LT_TAGVAR(hardcode_direct, $1)=no 7420e120bd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7421e120bd27Smrg ;; 7422e120bd27Smrg *) 7423e120bd27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7424e120bd27Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7425e120bd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 74266c321187Smrg 7427e120bd27Smrg # hardcode_minus_L: Not really in the search PATH, 7428e120bd27Smrg # but as the default location of the library. 7429e120bd27Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 7430e120bd27Smrg ;; 7431e120bd27Smrg esac 7432e120bd27Smrg fi 7433e120bd27Smrg ;; 74346c321187Smrg 7435e120bd27Smrg irix5* | irix6* | nonstopux*) 7436e120bd27Smrg if test "$GCC" = yes; then 7437e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $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' 7438e120bd27Smrg # Try to use the -exported_symbol ld option, if it does not 7439e120bd27Smrg # work, assume that -exports_file does not work either and 7440e120bd27Smrg # implicitly export all symbols. 7441e120bd27Smrg save_LDFLAGS="$LDFLAGS" 7442e120bd27Smrg LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 7443e120bd27Smrg AC_LINK_IFELSE(int foo(void) {}, 7444e120bd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $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' 7445e120bd27Smrg ) 7446e120bd27Smrg LDFLAGS="$save_LDFLAGS" 7447e120bd27Smrg else 7448e120bd27Smrg _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' 7449e120bd27Smrg _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' 7450e120bd27Smrg fi 7451e120bd27Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 7452e120bd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7453e120bd27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7454e120bd27Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 7455e120bd27Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7456e120bd27Smrg ;; 74576c321187Smrg 7458e120bd27Smrg netbsd*) 7459e120bd27Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 7460e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 7461e120bd27Smrg else 7462e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 7463e120bd27Smrg fi 7464e120bd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7465e120bd27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7466e120bd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7467e120bd27Smrg ;; 74686c321187Smrg 7469e120bd27Smrg newsos6) 7470e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7471e120bd27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7472e120bd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7473e120bd27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7474e120bd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7475e120bd27Smrg ;; 74766c321187Smrg 7477e120bd27Smrg *nto* | *qnx*) 7478e120bd27Smrg ;; 74796c321187Smrg 7480e120bd27Smrg openbsd*) 7481e120bd27Smrg if test -f /usr/libexec/ld.so; then 7482e120bd27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7483e120bd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7484e120bd27Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7485e120bd27Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 7486e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 7487e120bd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 7488e120bd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7489e120bd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 7490e120bd27Smrg else 7491e120bd27Smrg case $host_os in 7492e120bd27Smrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 7493e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 7494e120bd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7495e120bd27Smrg ;; 7496e120bd27Smrg *) 7497e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 7498e120bd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 7499e120bd27Smrg ;; 7500e120bd27Smrg esac 7501e120bd27Smrg fi 7502e120bd27Smrg else 7503e120bd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7504e120bd27Smrg fi 7505e120bd27Smrg ;; 75066c321187Smrg 7507e120bd27Smrg os2*) 7508e120bd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7509e120bd27Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 7510e120bd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 7511e120bd27Smrg _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' 7512e120bd27Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 7513e120bd27Smrg ;; 75146c321187Smrg 7515e120bd27Smrg osf3*) 7516e120bd27Smrg if test "$GCC" = yes; then 7517e120bd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 7518e120bd27Smrg _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' 7519e120bd27Smrg else 7520e120bd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 7521e120bd27Smrg _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' 7522e120bd27Smrg fi 7523e120bd27Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 7524e120bd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7525e120bd27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7526e120bd27Smrg ;; 75276c321187Smrg 7528e120bd27Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 7529e120bd27Smrg if test "$GCC" = yes; then 7530e120bd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 7531e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_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' 7532e120bd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 7533e120bd27Smrg else 7534e120bd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 7535e120bd27Smrg _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' 7536e120bd27Smrg _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~ 7537e120bd27Smrg $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' 75386c321187Smrg 7539e120bd27Smrg # Both c and cxx compiler support -rpath directly 7540e120bd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7541e120bd27Smrg fi 7542e120bd27Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 7543e120bd27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7544e120bd27Smrg ;; 75456c321187Smrg 7546e120bd27Smrg solaris*) 7547e120bd27Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 7548e120bd27Smrg if test "$GCC" = yes; then 7549e120bd27Smrg wlarc='${wl}' 7550e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 7551e120bd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7552e120bd27Smrg $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 7553e120bd27Smrg else 7554e120bd27Smrg case `$CC -V 2>&1` in 7555e120bd27Smrg *"Compilers 5.0"*) 7556e120bd27Smrg wlarc='' 7557e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 7558e120bd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7559e120bd27Smrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 7560e120bd27Smrg ;; 7561e120bd27Smrg *) 7562e120bd27Smrg wlarc='${wl}' 7563e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 7564e120bd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7565e120bd27Smrg $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 7566e120bd27Smrg ;; 7567e120bd27Smrg esac 7568e120bd27Smrg fi 7569e120bd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7570e120bd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7571e120bd27Smrg case $host_os in 7572e120bd27Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7573e120bd27Smrg *) 7574e120bd27Smrg # The compiler driver will combine and reorder linker options, 7575e120bd27Smrg # but understands `-z linker_flag'. GCC discards it without `$wl', 7576e120bd27Smrg # but is careful enough not to reorder. 7577e120bd27Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 7578e120bd27Smrg if test "$GCC" = yes; then 7579e120bd27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 7580e120bd27Smrg else 7581e120bd27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 7582e120bd27Smrg fi 7583e120bd27Smrg ;; 7584e120bd27Smrg esac 7585e120bd27Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7586e120bd27Smrg ;; 75876c321187Smrg 7588e120bd27Smrg sunos4*) 7589e120bd27Smrg if test "x$host_vendor" = xsequent; then 7590e120bd27Smrg # Use $CC to link under sequent, because it throws in some extra .o 7591e120bd27Smrg # files that make .init and .fini sections work. 7592e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 7593e120bd27Smrg else 7594e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 7595e120bd27Smrg fi 7596e120bd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7597e120bd27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7598e120bd27Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 7599e120bd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7600e120bd27Smrg ;; 76016c321187Smrg 7602e120bd27Smrg sysv4) 7603e120bd27Smrg case $host_vendor in 7604e120bd27Smrg sni) 7605e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7606e120bd27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 7607e120bd27Smrg ;; 7608e120bd27Smrg siemens) 7609e120bd27Smrg ## LD is ld it makes a PLAMLIB 7610e120bd27Smrg ## CC just makes a GrossModule. 7611e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 7612e120bd27Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 7613e120bd27Smrg _LT_TAGVAR(hardcode_direct, $1)=no 7614e120bd27Smrg ;; 7615e120bd27Smrg motorola) 7616e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7617e120bd27Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 7618e120bd27Smrg ;; 7619e120bd27Smrg esac 7620e120bd27Smrg runpath_var='LD_RUN_PATH' 7621e120bd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7622e120bd27Smrg ;; 76236c321187Smrg 7624e120bd27Smrg sysv4.3*) 7625e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7626e120bd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7627e120bd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 7628e120bd27Smrg ;; 76296c321187Smrg 7630e120bd27Smrg sysv4*MP*) 7631e120bd27Smrg if test -d /usr/nec; then 7632e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7633e120bd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7634e120bd27Smrg runpath_var=LD_RUN_PATH 7635e120bd27Smrg hardcode_runpath_var=yes 7636e120bd27Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 7637e120bd27Smrg fi 7638e120bd27Smrg ;; 76396c321187Smrg 7640e120bd27Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 7641e120bd27Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 7642e120bd27Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7643e120bd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7644e120bd27Smrg runpath_var='LD_RUN_PATH' 76456c321187Smrg 7646e120bd27Smrg if test "$GCC" = yes; then 7647e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7648e120bd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7649e120bd27Smrg else 7650e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7651e120bd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7652e120bd27Smrg fi 7653e120bd27Smrg ;; 76546c321187Smrg 7655e120bd27Smrg sysv5* | sco3.2v5* | sco5v6*) 7656e120bd27Smrg # Note: We can NOT use -z defs as we might desire, because we do not 7657e120bd27Smrg # link with -lc, and that would cause any symbols used from libc to 7658e120bd27Smrg # always be unresolved, which means just about no library would 7659e120bd27Smrg # ever link correctly. If we're not using GNU ld we use -z text 7660e120bd27Smrg # though, which does catch some bad symbols but isn't as heavy-handed 7661e120bd27Smrg # as -z defs. 7662e120bd27Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 7663e120bd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 7664e120bd27Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7665e120bd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7666e120bd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 7667e120bd27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 7668e120bd27Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7669e120bd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 7670e120bd27Smrg runpath_var='LD_RUN_PATH' 76716c321187Smrg 7672e120bd27Smrg if test "$GCC" = yes; then 7673e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7674e120bd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7675e120bd27Smrg else 7676e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7677e120bd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7678e120bd27Smrg fi 7679e120bd27Smrg ;; 76806c321187Smrg 7681e120bd27Smrg uts4*) 7682e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 7683e120bd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 7684e120bd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7685e120bd27Smrg ;; 76866c321187Smrg 7687e120bd27Smrg *) 7688e120bd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7689e120bd27Smrg ;; 7690e120bd27Smrg esac 76916c321187Smrg 7692e120bd27Smrg if test x$host_vendor = xsni; then 7693e120bd27Smrg case $host in 7694e120bd27Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 7695e120bd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 7696e120bd27Smrg ;; 7697e120bd27Smrg esac 7698e120bd27Smrg fi 7699e120bd27Smrg fi 7700e120bd27Smrg]) 7701e120bd27SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 7702e120bd27Smrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 77036c321187Smrg 7704e120bd27Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 77056c321187Smrg 7706e120bd27Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 7707e120bd27Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 7708e120bd27Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 7709e120bd27Smrg [The commands to extract the exported symbol list from a shared archive]) 77106c321187Smrg 7711e120bd27Smrg# 7712e120bd27Smrg# Do we need to explicitly link libc? 7713e120bd27Smrg# 7714e120bd27Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 7715e120bd27Smrgx|xyes) 7716e120bd27Smrg # Assume -lc should be added 7717e120bd27Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 77186c321187Smrg 7719e120bd27Smrg if test "$enable_shared" = yes && test "$GCC" = yes; then 7720e120bd27Smrg case $_LT_TAGVAR(archive_cmds, $1) in 7721e120bd27Smrg *'~'*) 7722e120bd27Smrg # FIXME: we may have to deal with multi-command sequences. 7723e120bd27Smrg ;; 7724e120bd27Smrg '$CC '*) 7725e120bd27Smrg # Test whether the compiler implicitly links with -lc since on some 7726e120bd27Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 7727e120bd27Smrg # to ld, don't add -lc before -lgcc. 7728e120bd27Smrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 7729e120bd27Smrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 7730e120bd27Smrg [$RM conftest* 7731e120bd27Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 7732e120bd27Smrg 7733e120bd27Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 7734e120bd27Smrg soname=conftest 7735e120bd27Smrg lib=conftest 7736e120bd27Smrg libobjs=conftest.$ac_objext 7737e120bd27Smrg deplibs= 7738e120bd27Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 7739e120bd27Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 7740e120bd27Smrg compiler_flags=-v 7741e120bd27Smrg linker_flags=-v 7742e120bd27Smrg verstring= 7743e120bd27Smrg output_objdir=. 7744e120bd27Smrg libname=conftest 7745e120bd27Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 7746e120bd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 7747e120bd27Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 7748e120bd27Smrg then 7749e120bd27Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7750e120bd27Smrg else 7751e120bd27Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 7752e120bd27Smrg fi 7753e120bd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 7754e120bd27Smrg else 7755e120bd27Smrg cat conftest.err 1>&5 7756e120bd27Smrg fi 7757e120bd27Smrg $RM conftest* 7758e120bd27Smrg ]) 7759e120bd27Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 7760e120bd27Smrg ;; 7761e120bd27Smrg esac 7762e120bd27Smrg fi 7763e120bd27Smrg ;; 7764e120bd27Smrgesac 77656c321187Smrg 7766e120bd27Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 7767e120bd27Smrg [Whether or not to add -lc for building shared libraries]) 7768e120bd27Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 7769e120bd27Smrg [enable_shared_with_static_runtimes], [0], 7770e120bd27Smrg [Whether or not to disallow shared libs when runtime libs are static]) 7771e120bd27Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 7772e120bd27Smrg [Compiler flag to allow reflexive dlopens]) 7773e120bd27Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 7774e120bd27Smrg [Compiler flag to generate shared objects directly from archives]) 7775e120bd27Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 7776e120bd27Smrg [Whether the compiler copes with passing no objects directly]) 7777e120bd27Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 7778e120bd27Smrg [Create an old-style archive from a shared archive]) 7779e120bd27Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 7780e120bd27Smrg [Create a temporary old-style archive to link instead of a shared archive]) 7781e120bd27Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 7782e120bd27Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 7783e120bd27Smrg_LT_TAGDECL([], [module_cmds], [2], 7784e120bd27Smrg [Commands used to build a loadable module if different from building 7785e120bd27Smrg a shared archive.]) 7786e120bd27Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 7787e120bd27Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 7788e120bd27Smrg [Whether we are building with GNU ld or not]) 7789e120bd27Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 7790e120bd27Smrg [Flag that allows shared libraries with undefined symbols to be built]) 7791e120bd27Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 7792e120bd27Smrg [Flag that enforces no undefined symbols]) 7793e120bd27Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 7794e120bd27Smrg [Flag to hardcode $libdir into a binary during linking. 7795e120bd27Smrg This must work even if $libdir does not exist]) 7796e120bd27Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], 7797e120bd27Smrg [[If ld is used when linking, flag to hardcode $libdir into a binary 7798e120bd27Smrg during linking. This must work even if $libdir does not exist]]) 7799e120bd27Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 7800e120bd27Smrg [Whether we need a single "-rpath" flag with a separated argument]) 7801e120bd27Smrg_LT_TAGDECL([], [hardcode_direct], [0], 7802e120bd27Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 7803e120bd27Smrg DIR into the resulting binary]) 7804e120bd27Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 7805e120bd27Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 7806e120bd27Smrg DIR into the resulting binary and the resulting library dependency is 7807e120bd27Smrg "absolute", i.e impossible to change by setting ${shlibpath_var} if the 7808e120bd27Smrg library is relocated]) 7809e120bd27Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 7810e120bd27Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 7811e120bd27Smrg into the resulting binary]) 7812e120bd27Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 7813e120bd27Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 7814e120bd27Smrg into the resulting binary]) 7815e120bd27Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 7816e120bd27Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 7817e120bd27Smrg into the library and all subsequent libraries and executables linked 7818e120bd27Smrg against it]) 7819e120bd27Smrg_LT_TAGDECL([], [inherit_rpath], [0], 7820e120bd27Smrg [Set to yes if linker adds runtime paths of dependent libraries 7821e120bd27Smrg to runtime path list]) 7822e120bd27Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 7823e120bd27Smrg [Whether libtool must link a program against all its dependency libraries]) 7824e120bd27Smrg_LT_TAGDECL([], [fix_srcfile_path], [1], 7825e120bd27Smrg [Fix the shell variable $srcfile for the compiler]) 7826e120bd27Smrg_LT_TAGDECL([], [always_export_symbols], [0], 7827e120bd27Smrg [Set to "yes" if exported symbols are required]) 7828e120bd27Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 7829e120bd27Smrg [The commands to list exported symbols]) 7830e120bd27Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 7831e120bd27Smrg [Symbols that should not be listed in the preloaded symbols]) 7832e120bd27Smrg_LT_TAGDECL([], [include_expsyms], [1], 7833e120bd27Smrg [Symbols that must always be exported]) 7834e120bd27Smrg_LT_TAGDECL([], [prelink_cmds], [2], 7835e120bd27Smrg [Commands necessary for linking programs (against libraries) with templates]) 7836e120bd27Smrg_LT_TAGDECL([], [file_list_spec], [1], 7837e120bd27Smrg [Specify filename containing input files]) 7838e120bd27Smrgdnl FIXME: Not yet implemented 7839e120bd27Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 7840e120bd27Smrgdnl [Compiler flag to generate thread safe objects]) 7841e120bd27Smrg])# _LT_LINKER_SHLIBS 7842e120bd27Smrg 7843e120bd27Smrg 7844e120bd27Smrg# _LT_LANG_C_CONFIG([TAG]) 7845e120bd27Smrg# ------------------------ 7846e120bd27Smrg# Ensure that the configuration variables for a C compiler are suitably 7847e120bd27Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 7848e120bd27Smrg# the compiler configuration to `libtool'. 7849e120bd27Smrgm4_defun([_LT_LANG_C_CONFIG], 7850e120bd27Smrg[m4_require([_LT_DECL_EGREP])dnl 7851e120bd27Smrglt_save_CC="$CC" 7852e120bd27SmrgAC_LANG_PUSH(C) 78536c321187Smrg 7854e120bd27Smrg# Source file extension for C test sources. 7855e120bd27Smrgac_ext=c 78566c321187Smrg 7857e120bd27Smrg# Object file extension for compiled C test sources. 7858e120bd27Smrgobjext=o 7859e120bd27Smrg_LT_TAGVAR(objext, $1)=$objext 78606c321187Smrg 7861e120bd27Smrg# Code to be used in simple compile tests 7862e120bd27Smrglt_simple_compile_test_code="int some_variable = 0;" 78636c321187Smrg 7864e120bd27Smrg# Code to be used in simple link tests 7865e120bd27Smrglt_simple_link_test_code='int main(){return(0);}' 78666c321187Smrg 7867e120bd27Smrg_LT_TAG_COMPILER 7868e120bd27Smrg# Save the default compiler, since it gets overwritten when the other 7869e120bd27Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 7870e120bd27Smrgcompiler_DEFAULT=$CC 78716c321187Smrg 7872e120bd27Smrg# save warnings/boilerplate of simple test code 7873e120bd27Smrg_LT_COMPILER_BOILERPLATE 7874e120bd27Smrg_LT_LINKER_BOILERPLATE 78756c321187Smrg 7876e120bd27Smrgif test -n "$compiler"; then 7877e120bd27Smrg _LT_COMPILER_NO_RTTI($1) 7878e120bd27Smrg _LT_COMPILER_PIC($1) 7879e120bd27Smrg _LT_COMPILER_C_O($1) 7880e120bd27Smrg _LT_COMPILER_FILE_LOCKS($1) 7881e120bd27Smrg _LT_LINKER_SHLIBS($1) 7882e120bd27Smrg _LT_SYS_DYNAMIC_LINKER($1) 7883e120bd27Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 7884e120bd27Smrg LT_SYS_DLOPEN_SELF 7885e120bd27Smrg _LT_CMD_STRIPLIB 7886e120bd27Smrg 7887e120bd27Smrg # Report which library types will actually be built 7888e120bd27Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 7889e120bd27Smrg AC_MSG_RESULT([$can_build_shared]) 7890e120bd27Smrg 7891e120bd27Smrg AC_MSG_CHECKING([whether to build shared libraries]) 7892e120bd27Smrg test "$can_build_shared" = "no" && enable_shared=no 7893e120bd27Smrg 7894e120bd27Smrg # On AIX, shared libraries and static libraries use the same namespace, and 7895e120bd27Smrg # are all built from PIC. 7896e120bd27Smrg case $host_os in 7897e120bd27Smrg aix3*) 7898e120bd27Smrg test "$enable_shared" = yes && enable_static=no 7899e120bd27Smrg if test -n "$RANLIB"; then 7900e120bd27Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 7901e120bd27Smrg postinstall_cmds='$RANLIB $lib' 7902e120bd27Smrg fi 7903e120bd27Smrg ;; 79046c321187Smrg 7905e120bd27Smrg aix[[4-9]]*) 7906e120bd27Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 7907e120bd27Smrg test "$enable_shared" = yes && enable_static=no 7908e120bd27Smrg fi 7909e120bd27Smrg ;; 7910e120bd27Smrg esac 7911e120bd27Smrg AC_MSG_RESULT([$enable_shared]) 79126c321187Smrg 7913e120bd27Smrg AC_MSG_CHECKING([whether to build static libraries]) 7914e120bd27Smrg # Make sure either enable_shared or enable_static is yes. 7915e120bd27Smrg test "$enable_shared" = yes || enable_static=yes 7916e120bd27Smrg AC_MSG_RESULT([$enable_static]) 79176c321187Smrg 7918e120bd27Smrg _LT_CONFIG($1) 7919e120bd27Smrgfi 7920e120bd27SmrgAC_LANG_POP 7921e120bd27SmrgCC="$lt_save_CC" 7922e120bd27Smrg])# _LT_LANG_C_CONFIG 79236c321187Smrg 79246c321187Smrg 7925e120bd27Smrg# _LT_LANG_CXX_CONFIG([TAG]) 7926e120bd27Smrg# -------------------------- 7927e120bd27Smrg# Ensure that the configuration variables for a C++ compiler are suitably 7928e120bd27Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 7929e120bd27Smrg# the compiler configuration to `libtool'. 7930e120bd27Smrgm4_defun([_LT_LANG_CXX_CONFIG], 7931e120bd27Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 7932e120bd27Smrgm4_require([_LT_DECL_EGREP])dnl 7933e120bd27Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 7934e120bd27Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 7935e120bd27Smrg (test "X$CXX" != "Xg++"))) ; then 7936e120bd27Smrg AC_PROG_CXXCPP 7937e120bd27Smrgelse 7938e120bd27Smrg _lt_caught_CXX_error=yes 7939e120bd27Smrgfi 79406c321187Smrg 7941e120bd27SmrgAC_LANG_PUSH(C++) 7942e120bd27Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7943e120bd27Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 7944e120bd27Smrg_LT_TAGVAR(always_export_symbols, $1)=no 7945e120bd27Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 7946e120bd27Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 7947e120bd27Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7948e120bd27Smrg_LT_TAGVAR(hardcode_direct, $1)=no 7949e120bd27Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7950e120bd27Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7951e120bd27Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 7952e120bd27Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 7953e120bd27Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 7954e120bd27Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 7955e120bd27Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 7956e120bd27Smrg_LT_TAGVAR(inherit_rpath, $1)=no 7957e120bd27Smrg_LT_TAGVAR(module_cmds, $1)= 7958e120bd27Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 7959e120bd27Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 7960e120bd27Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7961e120bd27Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7962e120bd27Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7963e120bd27Smrg_LT_TAGVAR(no_undefined_flag, $1)= 7964e120bd27Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 7965e120bd27Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 79666c321187Smrg 7967e120bd27Smrg# Source file extension for C++ test sources. 7968e120bd27Smrgac_ext=cpp 79696c321187Smrg 7970e120bd27Smrg# Object file extension for compiled C++ test sources. 7971e120bd27Smrgobjext=o 7972e120bd27Smrg_LT_TAGVAR(objext, $1)=$objext 7973e120bd27Smrg 7974e120bd27Smrg# No sense in running all these tests if we already determined that 7975e120bd27Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 7976e120bd27Smrg# are currently assumed to apply to all compilers on this platform, 7977e120bd27Smrg# and will be corrupted by setting them based on a non-working compiler. 7978e120bd27Smrgif test "$_lt_caught_CXX_error" != yes; then 7979e120bd27Smrg # Code to be used in simple compile tests 7980e120bd27Smrg lt_simple_compile_test_code="int some_variable = 0;" 7981e120bd27Smrg 7982e120bd27Smrg # Code to be used in simple link tests 7983e120bd27Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 7984e120bd27Smrg 7985e120bd27Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7986e120bd27Smrg _LT_TAG_COMPILER 7987e120bd27Smrg 7988e120bd27Smrg # save warnings/boilerplate of simple test code 7989e120bd27Smrg _LT_COMPILER_BOILERPLATE 7990e120bd27Smrg _LT_LINKER_BOILERPLATE 7991e120bd27Smrg 7992e120bd27Smrg # Allow CC to be a program name with arguments. 7993e120bd27Smrg lt_save_CC=$CC 7994e120bd27Smrg lt_save_LD=$LD 7995e120bd27Smrg lt_save_GCC=$GCC 7996e120bd27Smrg GCC=$GXX 7997e120bd27Smrg lt_save_with_gnu_ld=$with_gnu_ld 7998e120bd27Smrg lt_save_path_LD=$lt_cv_path_LD 7999e120bd27Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 8000e120bd27Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 8001e120bd27Smrg else 8002e120bd27Smrg $as_unset lt_cv_prog_gnu_ld 8003e120bd27Smrg fi 8004e120bd27Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 8005e120bd27Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 8006e120bd27Smrg else 8007e120bd27Smrg $as_unset lt_cv_path_LD 8008e120bd27Smrg fi 8009e120bd27Smrg test -z "${LDCXX+set}" || LD=$LDCXX 8010e120bd27Smrg CC=${CXX-"c++"} 8011e120bd27Smrg compiler=$CC 8012e120bd27Smrg _LT_TAGVAR(compiler, $1)=$CC 8013e120bd27Smrg _LT_CC_BASENAME([$compiler]) 80146c321187Smrg 8015e120bd27Smrg if test -n "$compiler"; then 8016e120bd27Smrg # We don't want -fno-exception when compiling C++ code, so set the 8017e120bd27Smrg # no_builtin_flag separately 8018e120bd27Smrg if test "$GXX" = yes; then 8019e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 8020e120bd27Smrg else 8021e120bd27Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 8022e120bd27Smrg fi 80236c321187Smrg 8024e120bd27Smrg if test "$GXX" = yes; then 8025e120bd27Smrg # Set up default GNU C++ configuration 80266c321187Smrg 8027e120bd27Smrg LT_PATH_LD 80286c321187Smrg 8029e120bd27Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 8030e120bd27Smrg # archiving commands below assume that GNU ld is being used. 8031e120bd27Smrg if test "$with_gnu_ld" = yes; then 8032e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 8033e120bd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 80346c321187Smrg 8035e120bd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 8036e120bd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 80376c321187Smrg 8038e120bd27Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 8039e120bd27Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 8040e120bd27Smrg # investigate it a little bit more. (MM) 8041e120bd27Smrg wlarc='${wl}' 80426c321187Smrg 8043e120bd27Smrg # ancient GNU ld didn't support --whole-archive et. al. 8044e120bd27Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 8045e120bd27Smrg $GREP 'no-whole-archive' > /dev/null; then 8046e120bd27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 8047e120bd27Smrg else 8048e120bd27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 8049e120bd27Smrg fi 8050e120bd27Smrg else 8051e120bd27Smrg with_gnu_ld=no 8052e120bd27Smrg wlarc= 8053e120bd27Smrg 8054e120bd27Smrg # A generic and very simple default shared library creation 8055e120bd27Smrg # command for GNU C++ for the case where it uses the native 8056e120bd27Smrg # linker, instead of GNU ld. If possible, this setting should 8057e120bd27Smrg # overridden to take advantage of the native linker features on 8058e120bd27Smrg # the platform it is being used on. 8059e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 8060e120bd27Smrg fi 80616c321187Smrg 8062e120bd27Smrg # Commands to make compiler produce verbose output that lists 8063e120bd27Smrg # what "hidden" libraries, object files and flags are used when 8064e120bd27Smrg # linking a shared library. 8065e120bd27Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 80666c321187Smrg 8067e120bd27Smrg else 8068e120bd27Smrg GXX=no 8069e120bd27Smrg with_gnu_ld=no 8070e120bd27Smrg wlarc= 8071e120bd27Smrg fi 80726c321187Smrg 8073e120bd27Smrg # PORTME: fill in a description of your system's C++ link characteristics 8074e120bd27Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 8075e120bd27Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 8076e120bd27Smrg case $host_os in 8077e120bd27Smrg aix3*) 8078e120bd27Smrg # FIXME: insert proper C++ library support 8079e120bd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8080e120bd27Smrg ;; 8081e120bd27Smrg aix[[4-9]]*) 8082e120bd27Smrg if test "$host_cpu" = ia64; then 8083e120bd27Smrg # On IA64, the linker does run time linking by default, so we don't 8084e120bd27Smrg # have to do anything special. 8085e120bd27Smrg aix_use_runtimelinking=no 8086e120bd27Smrg exp_sym_flag='-Bexport' 8087e120bd27Smrg no_entry_flag="" 8088e120bd27Smrg else 8089e120bd27Smrg aix_use_runtimelinking=no 8090e120bd27Smrg 8091e120bd27Smrg # Test if we are trying to use run time linking or normal 8092e120bd27Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 8093e120bd27Smrg # need to do runtime linking. 8094e120bd27Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 8095e120bd27Smrg for ld_flag in $LDFLAGS; do 8096e120bd27Smrg case $ld_flag in 8097e120bd27Smrg *-brtl*) 8098e120bd27Smrg aix_use_runtimelinking=yes 8099e120bd27Smrg break 8100e120bd27Smrg ;; 8101e120bd27Smrg esac 8102e120bd27Smrg done 8103e120bd27Smrg ;; 8104e120bd27Smrg esac 81056c321187Smrg 8106e120bd27Smrg exp_sym_flag='-bexport' 8107e120bd27Smrg no_entry_flag='-bnoentry' 8108e120bd27Smrg fi 81096c321187Smrg 8110e120bd27Smrg # When large executables or shared objects are built, AIX ld can 8111e120bd27Smrg # have problems creating the table of contents. If linking a library 8112e120bd27Smrg # or program results in "error TOC overflow" add -mminimal-toc to 8113e120bd27Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 8114e120bd27Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 8115e120bd27Smrg 8116e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='' 8117e120bd27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 8118e120bd27Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 8119e120bd27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 8120e120bd27Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 8121e120bd27Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 8122e120bd27Smrg 8123e120bd27Smrg if test "$GXX" = yes; then 8124e120bd27Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 8125e120bd27Smrg # We only want to do this on AIX 4.2 and lower, the check 8126e120bd27Smrg # below for broken collect2 doesn't work under 4.3+ 8127e120bd27Smrg collect2name=`${CC} -print-prog-name=collect2` 8128e120bd27Smrg if test -f "$collect2name" && 8129e120bd27Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 8130e120bd27Smrg then 8131e120bd27Smrg # We have reworked collect2 8132e120bd27Smrg : 8133e120bd27Smrg else 8134e120bd27Smrg # We have old collect2 8135e120bd27Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 8136e120bd27Smrg # It fails to find uninstalled libraries when the uninstalled 8137e120bd27Smrg # path is not listed in the libpath. Setting hardcode_minus_L 8138e120bd27Smrg # to unsupported forces relinking 8139e120bd27Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 8140e120bd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8141e120bd27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 8142e120bd27Smrg fi 8143e120bd27Smrg esac 8144e120bd27Smrg shared_flag='-shared' 8145e120bd27Smrg if test "$aix_use_runtimelinking" = yes; then 8146e120bd27Smrg shared_flag="$shared_flag "'${wl}-G' 8147e120bd27Smrg fi 8148e120bd27Smrg else 8149e120bd27Smrg # not using gcc 8150e120bd27Smrg if test "$host_cpu" = ia64; then 8151e120bd27Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 8152e120bd27Smrg # chokes on -Wl,-G. The following line is correct: 8153e120bd27Smrg shared_flag='-G' 8154e120bd27Smrg else 8155e120bd27Smrg if test "$aix_use_runtimelinking" = yes; then 8156e120bd27Smrg shared_flag='${wl}-G' 8157e120bd27Smrg else 8158e120bd27Smrg shared_flag='${wl}-bM:SRE' 8159e120bd27Smrg fi 8160e120bd27Smrg fi 8161e120bd27Smrg fi 81626c321187Smrg 8163e120bd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 8164e120bd27Smrg # It seems that -bexpall does not export symbols beginning with 8165e120bd27Smrg # underscore (_), so it is better to generate a list of symbols to 8166e120bd27Smrg # export. 8167e120bd27Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 8168e120bd27Smrg if test "$aix_use_runtimelinking" = yes; then 8169e120bd27Smrg # Warning - without using the other runtime loading flags (-brtl), 8170e120bd27Smrg # -berok will link without error, but may produce a broken library. 8171e120bd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 8172e120bd27Smrg # Determine the default libpath from the value encoded in an empty 8173e120bd27Smrg # executable. 8174e120bd27Smrg _LT_SYS_MODULE_PATH_AIX 8175e120bd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 8176e120bd27Smrg 8177e120bd27Smrg _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" 8178e120bd27Smrg else 8179e120bd27Smrg if test "$host_cpu" = ia64; then 8180e120bd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 8181e120bd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 8182e120bd27Smrg _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" 8183e120bd27Smrg else 8184e120bd27Smrg # Determine the default libpath from the value encoded in an 8185e120bd27Smrg # empty executable. 8186e120bd27Smrg _LT_SYS_MODULE_PATH_AIX 8187e120bd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 8188e120bd27Smrg # Warning - without using the other run time loading flags, 8189e120bd27Smrg # -berok will link without error, but may produce a broken library. 8190e120bd27Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 8191e120bd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 8192e120bd27Smrg if test "$with_gnu_ld" = yes; then 8193e120bd27Smrg # We only use this code for GNU lds that support --whole-archive. 8194e120bd27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 8195e120bd27Smrg else 8196e120bd27Smrg # Exported symbols can be pulled into shared objects from archives 8197e120bd27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 8198e120bd27Smrg fi 8199e120bd27Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 8200e120bd27Smrg # This is similar to how AIX traditionally builds its shared 8201e120bd27Smrg # libraries. 8202e120bd27Smrg _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' 8203e120bd27Smrg fi 8204e120bd27Smrg fi 8205e120bd27Smrg ;; 82066c321187Smrg 8207e120bd27Smrg beos*) 8208e120bd27Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 8209e120bd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8210e120bd27Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 8211e120bd27Smrg # support --undefined. This deserves some investigation. FIXME 8212e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 8213e120bd27Smrg else 8214e120bd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8215e120bd27Smrg fi 8216e120bd27Smrg ;; 82176c321187Smrg 8218e120bd27Smrg chorus*) 8219e120bd27Smrg case $cc_basename in 8220e120bd27Smrg *) 8221e120bd27Smrg # FIXME: insert proper C++ library support 8222e120bd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8223e120bd27Smrg ;; 8224e120bd27Smrg esac 8225e120bd27Smrg ;; 82266c321187Smrg 8227e120bd27Smrg cygwin* | mingw* | pw32* | cegcc*) 8228e120bd27Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 8229e120bd27Smrg # as there is no search path for DLLs. 8230e120bd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 8231e120bd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 8232e120bd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 8233e120bd27Smrg _LT_TAGVAR(always_export_symbols, $1)=no 8234e120bd27Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 8235e120bd27Smrg 8236e120bd27Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 8237e120bd27Smrg _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' 8238e120bd27Smrg # If the export-symbols file already is a .def file (1st line 8239e120bd27Smrg # is EXPORTS), use it as is; otherwise, prepend... 8240e120bd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 8241e120bd27Smrg cp $export_symbols $output_objdir/$soname.def; 8242e120bd27Smrg else 8243e120bd27Smrg echo EXPORTS > $output_objdir/$soname.def; 8244e120bd27Smrg cat $export_symbols >> $output_objdir/$soname.def; 8245e120bd27Smrg fi~ 8246e120bd27Smrg $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' 8247e120bd27Smrg else 8248e120bd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8249e120bd27Smrg fi 8250e120bd27Smrg ;; 8251e120bd27Smrg darwin* | rhapsody*) 8252e120bd27Smrg _LT_DARWIN_LINKER_FEATURES($1) 8253e120bd27Smrg ;; 82546c321187Smrg 8255e120bd27Smrg dgux*) 8256e120bd27Smrg case $cc_basename in 8257e120bd27Smrg ec++*) 8258e120bd27Smrg # FIXME: insert proper C++ library support 8259e120bd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8260e120bd27Smrg ;; 8261e120bd27Smrg ghcx*) 8262e120bd27Smrg # Green Hills C++ Compiler 8263e120bd27Smrg # FIXME: insert proper C++ library support 8264e120bd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8265e120bd27Smrg ;; 8266e120bd27Smrg *) 8267e120bd27Smrg # FIXME: insert proper C++ library support 8268e120bd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8269e120bd27Smrg ;; 8270e120bd27Smrg esac 8271e120bd27Smrg ;; 82726c321187Smrg 8273e120bd27Smrg freebsd[[12]]*) 8274e120bd27Smrg # C++ shared libraries reported to be fairly broken before 8275e120bd27Smrg # switch to ELF 8276e120bd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8277e120bd27Smrg ;; 82786c321187Smrg 8279e120bd27Smrg freebsd-elf*) 8280e120bd27Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 8281e120bd27Smrg ;; 82826c321187Smrg 8283e120bd27Smrg freebsd* | dragonfly*) 8284e120bd27Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 8285e120bd27Smrg # conventions 8286e120bd27Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 8287e120bd27Smrg ;; 828893493779Smrg 8289e120bd27Smrg gnu*) 8290e120bd27Smrg ;; 82916c321187Smrg 8292e120bd27Smrg haiku*) 8293e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 8294e120bd27Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 8295e120bd27Smrg ;; 82966c321187Smrg 8297e120bd27Smrg hpux9*) 8298e120bd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 8299e120bd27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 8300e120bd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 8301e120bd27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 8302e120bd27Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 8303e120bd27Smrg # but as the default 8304e120bd27Smrg # location of the library. 8305e120bd27Smrg 8306e120bd27Smrg case $cc_basename in 8307e120bd27Smrg CC*) 8308e120bd27Smrg # FIXME: insert proper C++ library support 8309e120bd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8310e120bd27Smrg ;; 8311e120bd27Smrg aCC*) 8312e120bd27Smrg _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' 8313e120bd27Smrg # Commands to make compiler produce verbose output that lists 8314e120bd27Smrg # what "hidden" libraries, object files and flags are used when 8315e120bd27Smrg # linking a shared library. 8316e120bd27Smrg # 8317e120bd27Smrg # There doesn't appear to be a way to prevent this compiler from 8318e120bd27Smrg # explicitly linking system object files so we need to strip them 8319e120bd27Smrg # from the output so that they don't get included in the library 8320e120bd27Smrg # dependencies. 8321e120bd27Smrg 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"' 8322e120bd27Smrg ;; 8323e120bd27Smrg *) 8324e120bd27Smrg if test "$GXX" = yes; then 8325e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${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' 8326e120bd27Smrg else 8327e120bd27Smrg # FIXME: insert proper C++ library support 8328e120bd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8329e120bd27Smrg fi 8330e120bd27Smrg ;; 8331e120bd27Smrg esac 8332e120bd27Smrg ;; 83336c321187Smrg 8334e120bd27Smrg hpux10*|hpux11*) 8335e120bd27Smrg if test $with_gnu_ld = no; then 8336e120bd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 8337e120bd27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 8338e120bd27Smrg 8339e120bd27Smrg case $host_cpu in 8340e120bd27Smrg hppa*64*|ia64*) 8341e120bd27Smrg ;; 8342e120bd27Smrg *) 8343e120bd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 8344e120bd27Smrg ;; 8345e120bd27Smrg esac 8346e120bd27Smrg fi 8347e120bd27Smrg case $host_cpu in 8348e120bd27Smrg hppa*64*|ia64*) 8349e120bd27Smrg _LT_TAGVAR(hardcode_direct, $1)=no 8350e120bd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8351e120bd27Smrg ;; 8352e120bd27Smrg *) 8353e120bd27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 8354e120bd27Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 8355e120bd27Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 8356e120bd27Smrg # but as the default 8357e120bd27Smrg # location of the library. 8358e120bd27Smrg ;; 8359e120bd27Smrg esac 8360e120bd27Smrg 8361e120bd27Smrg case $cc_basename in 8362e120bd27Smrg CC*) 8363e120bd27Smrg # FIXME: insert proper C++ library support 8364e120bd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8365e120bd27Smrg ;; 8366e120bd27Smrg aCC*) 8367e120bd27Smrg case $host_cpu in 8368e120bd27Smrg hppa*64*) 8369e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 8370e120bd27Smrg ;; 8371e120bd27Smrg ia64*) 8372e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 8373e120bd27Smrg ;; 8374e120bd27Smrg *) 8375e120bd27Smrg _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' 8376e120bd27Smrg ;; 8377e120bd27Smrg esac 8378e120bd27Smrg # Commands to make compiler produce verbose output that lists 8379e120bd27Smrg # what "hidden" libraries, object files and flags are used when 8380e120bd27Smrg # linking a shared library. 8381e120bd27Smrg # 8382e120bd27Smrg # There doesn't appear to be a way to prevent this compiler from 8383e120bd27Smrg # explicitly linking system object files so we need to strip them 8384e120bd27Smrg # from the output so that they don't get included in the library 8385e120bd27Smrg # dependencies. 8386e120bd27Smrg 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"' 8387e120bd27Smrg ;; 8388e120bd27Smrg *) 8389e120bd27Smrg if test "$GXX" = yes; then 8390e120bd27Smrg if test $with_gnu_ld = no; then 8391e120bd27Smrg case $host_cpu in 8392e120bd27Smrg hppa*64*) 8393e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 8394e120bd27Smrg ;; 8395e120bd27Smrg ia64*) 8396e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 8397e120bd27Smrg ;; 8398e120bd27Smrg *) 8399e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 8400e120bd27Smrg ;; 8401e120bd27Smrg esac 8402e120bd27Smrg fi 8403e120bd27Smrg else 8404e120bd27Smrg # FIXME: insert proper C++ library support 8405e120bd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8406e120bd27Smrg fi 8407e120bd27Smrg ;; 8408e120bd27Smrg esac 8409e120bd27Smrg ;; 84106c321187Smrg 8411e120bd27Smrg interix[[3-9]]*) 8412e120bd27Smrg _LT_TAGVAR(hardcode_direct, $1)=no 8413e120bd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8414e120bd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 8415e120bd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 8416e120bd27Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 8417e120bd27Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 8418e120bd27Smrg # default) and relocated if they conflict, which is a slow very memory 8419e120bd27Smrg # consuming and fragmenting process. To avoid this, we pick a random, 8420e120bd27Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 8421e120bd27Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 8422e120bd27Smrg _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' 8423e120bd27Smrg _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' 8424e120bd27Smrg ;; 8425e120bd27Smrg irix5* | irix6*) 8426e120bd27Smrg case $cc_basename in 8427e120bd27Smrg CC*) 8428e120bd27Smrg # SGI C++ 8429e120bd27Smrg _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' 8430e120bd27Smrg 8431e120bd27Smrg # Archives containing C++ object files must be created using 8432e120bd27Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 8433e120bd27Smrg # necessary to make sure instantiated templates are included 8434e120bd27Smrg # in the archive. 8435e120bd27Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 8436e120bd27Smrg ;; 8437e120bd27Smrg *) 8438e120bd27Smrg if test "$GXX" = yes; then 8439e120bd27Smrg if test "$with_gnu_ld" = no; then 8440e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -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' 8441e120bd27Smrg else 8442e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -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' 8443e120bd27Smrg fi 8444e120bd27Smrg fi 8445e120bd27Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 8446e120bd27Smrg ;; 8447e120bd27Smrg esac 8448e120bd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 8449e120bd27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 8450e120bd27Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 8451e120bd27Smrg ;; 84526c321187Smrg 8453e120bd27Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 8454e120bd27Smrg case $cc_basename in 8455e120bd27Smrg KCC*) 8456e120bd27Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 84576c321187Smrg 8458e120bd27Smrg # KCC will only create a shared library if the output file 8459e120bd27Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 8460e120bd27Smrg # to its proper name (with version) after linking. 8461e120bd27Smrg _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' 8462e120bd27Smrg _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' 8463e120bd27Smrg # Commands to make compiler produce verbose output that lists 8464e120bd27Smrg # what "hidden" libraries, object files and flags are used when 8465e120bd27Smrg # linking a shared library. 8466e120bd27Smrg # 8467e120bd27Smrg # There doesn't appear to be a way to prevent this compiler from 8468e120bd27Smrg # explicitly linking system object files so we need to strip them 8469e120bd27Smrg # from the output so that they don't get included in the library 8470e120bd27Smrg # dependencies. 8471e120bd27Smrg 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"' 8472e120bd27Smrg 8473e120bd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 8474e120bd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 8475e120bd27Smrg 8476e120bd27Smrg # Archives containing C++ object files must be created using 8477e120bd27Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 8478e120bd27Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 8479e120bd27Smrg ;; 8480e120bd27Smrg icpc* | ecpc* ) 8481e120bd27Smrg # Intel C++ 8482e120bd27Smrg with_gnu_ld=yes 8483e120bd27Smrg # version 8.0 and above of icpc choke on multiply defined symbols 8484e120bd27Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 8485e120bd27Smrg # earlier do not add the objects themselves. 8486e120bd27Smrg case `$CC -V 2>&1` in 8487e120bd27Smrg *"Version 7."*) 8488e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 8489e120bd27Smrg _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' 8490e120bd27Smrg ;; 8491e120bd27Smrg *) # Version 8.0 or newer 8492e120bd27Smrg tmp_idyn= 8493e120bd27Smrg case $host_cpu in 8494e120bd27Smrg ia64*) tmp_idyn=' -i_dynamic';; 8495e120bd27Smrg esac 8496e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 8497e120bd27Smrg _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' 8498e120bd27Smrg ;; 8499e120bd27Smrg esac 8500e120bd27Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 8501e120bd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 8502e120bd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 8503e120bd27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 8504e120bd27Smrg ;; 8505e120bd27Smrg pgCC* | pgcpp*) 8506e120bd27Smrg # Portland Group C++ compiler 8507e120bd27Smrg case `$CC -V` in 8508e120bd27Smrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 8509e120bd27Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 8510e120bd27Smrg rm -rf $tpldir~ 8511e120bd27Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 8512e120bd27Smrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 8513e120bd27Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 8514e120bd27Smrg rm -rf $tpldir~ 8515e120bd27Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 8516e120bd27Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 8517e120bd27Smrg $RANLIB $oldlib' 8518e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 8519e120bd27Smrg rm -rf $tpldir~ 8520e120bd27Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 8521e120bd27Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 8522e120bd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 8523e120bd27Smrg rm -rf $tpldir~ 8524e120bd27Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 8525e120bd27Smrg $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' 8526e120bd27Smrg ;; 8527e120bd27Smrg *) # Version 6 and above use weak symbols 8528e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 8529e120bd27Smrg _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' 8530e120bd27Smrg ;; 8531e120bd27Smrg esac 85326c321187Smrg 8533e120bd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 8534e120bd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 8535e120bd27Smrg _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' 8536e120bd27Smrg ;; 8537e120bd27Smrg cxx*) 8538e120bd27Smrg # Compaq C++ 8539e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 8540e120bd27Smrg _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' 85416c321187Smrg 8542e120bd27Smrg runpath_var=LD_RUN_PATH 8543e120bd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 8544e120bd27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 85456c321187Smrg 8546e120bd27Smrg # Commands to make compiler produce verbose output that lists 8547e120bd27Smrg # what "hidden" libraries, object files and flags are used when 8548e120bd27Smrg # linking a shared library. 8549e120bd27Smrg # 8550e120bd27Smrg # There doesn't appear to be a way to prevent this compiler from 8551e120bd27Smrg # explicitly linking system object files so we need to strip them 8552e120bd27Smrg # from the output so that they don't get included in the library 8553e120bd27Smrg # dependencies. 8554e120bd27Smrg 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' 8555e120bd27Smrg ;; 8556e120bd27Smrg xl* | mpixl* | bgxl*) 8557e120bd27Smrg # IBM XL 8.0 on PPC, with GNU ld 8558e120bd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 8559e120bd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 8560e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 8561e120bd27Smrg if test "x$supports_anon_versioning" = xyes; then 8562e120bd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 8563e120bd27Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 8564e120bd27Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 8565e120bd27Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 8566e120bd27Smrg fi 8567e120bd27Smrg ;; 8568e120bd27Smrg *) 8569e120bd27Smrg case `$CC -V 2>&1 | sed 5q` in 8570e120bd27Smrg *Sun\ C*) 8571e120bd27Smrg # Sun C++ 5.9 8572e120bd27Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 8573e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 8574e120bd27Smrg _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' 8575e120bd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 8576e120bd27Smrg _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' 8577e120bd27Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 8578e120bd27Smrg 8579e120bd27Smrg # Not sure whether something based on 8580e120bd27Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 8581e120bd27Smrg # would be better. 8582e120bd27Smrg output_verbose_link_cmd='func_echo_all' 8583e120bd27Smrg 8584e120bd27Smrg # Archives containing C++ object files must be created using 8585e120bd27Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 8586e120bd27Smrg # necessary to make sure instantiated templates are included 8587e120bd27Smrg # in the archive. 8588e120bd27Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 8589e120bd27Smrg ;; 8590e120bd27Smrg esac 8591e120bd27Smrg ;; 8592e120bd27Smrg esac 8593e120bd27Smrg ;; 85946c321187Smrg 8595e120bd27Smrg lynxos*) 8596e120bd27Smrg # FIXME: insert proper C++ library support 8597e120bd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8598e120bd27Smrg ;; 85996c321187Smrg 8600e120bd27Smrg m88k*) 8601e120bd27Smrg # FIXME: insert proper C++ library support 8602e120bd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8603e120bd27Smrg ;; 86046c321187Smrg 8605e120bd27Smrg mvs*) 8606e120bd27Smrg case $cc_basename in 8607e120bd27Smrg cxx*) 8608e120bd27Smrg # FIXME: insert proper C++ library support 8609e120bd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8610e120bd27Smrg ;; 8611e120bd27Smrg *) 8612e120bd27Smrg # FIXME: insert proper C++ library support 8613e120bd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8614e120bd27Smrg ;; 8615e120bd27Smrg esac 8616e120bd27Smrg ;; 86176c321187Smrg 8618e120bd27Smrg netbsd*) 8619e120bd27Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 8620e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 8621e120bd27Smrg wlarc= 8622e120bd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 8623e120bd27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 8624e120bd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8625e120bd27Smrg fi 8626e120bd27Smrg # Workaround some broken pre-1.5 toolchains 8627e120bd27Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 8628e120bd27Smrg ;; 86296c321187Smrg 8630e120bd27Smrg *nto* | *qnx*) 8631e120bd27Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 8632e120bd27Smrg ;; 86336c321187Smrg 8634e120bd27Smrg openbsd2*) 8635e120bd27Smrg # C++ shared libraries are fairly broken 8636e120bd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8637e120bd27Smrg ;; 86386c321187Smrg 8639e120bd27Smrg openbsd*) 8640e120bd27Smrg if test -f /usr/libexec/ld.so; then 8641e120bd27Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 8642e120bd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8643e120bd27Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 8644e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 8645e120bd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 8646e120bd27Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 8647e120bd27Smrg _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' 8648e120bd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 8649e120bd27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 8650e120bd27Smrg fi 8651e120bd27Smrg output_verbose_link_cmd=func_echo_all 8652e120bd27Smrg else 8653e120bd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8654e120bd27Smrg fi 8655e120bd27Smrg ;; 86566c321187Smrg 8657e120bd27Smrg osf3* | osf4* | osf5*) 8658e120bd27Smrg case $cc_basename in 8659e120bd27Smrg KCC*) 8660e120bd27Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 8661e120bd27Smrg 8662e120bd27Smrg # KCC will only create a shared library if the output file 8663e120bd27Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 8664e120bd27Smrg # to its proper name (with version) after linking. 8665e120bd27Smrg _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' 8666e120bd27Smrg 8667e120bd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 8668e120bd27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 8669e120bd27Smrg 8670e120bd27Smrg # Archives containing C++ object files must be created using 8671e120bd27Smrg # the KAI C++ compiler. 8672e120bd27Smrg case $host in 8673e120bd27Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 8674e120bd27Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 8675e120bd27Smrg esac 8676e120bd27Smrg ;; 8677e120bd27Smrg RCC*) 8678e120bd27Smrg # Rational C++ 2.4.1 8679e120bd27Smrg # FIXME: insert proper C++ library support 8680e120bd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8681e120bd27Smrg ;; 8682e120bd27Smrg cxx*) 8683e120bd27Smrg case $host in 8684e120bd27Smrg osf3*) 8685e120bd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 8686e120bd27Smrg _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' 8687e120bd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 8688e120bd27Smrg ;; 8689e120bd27Smrg *) 8690e120bd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 8691e120bd27Smrg _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' 8692e120bd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 8693e120bd27Smrg echo "-hidden">> $lib.exp~ 8694e120bd27Smrg $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~ 8695e120bd27Smrg $RM $lib.exp' 8696e120bd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 8697e120bd27Smrg ;; 8698e120bd27Smrg esac 86996c321187Smrg 8700e120bd27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 87016c321187Smrg 8702e120bd27Smrg # Commands to make compiler produce verbose output that lists 8703e120bd27Smrg # what "hidden" libraries, object files and flags are used when 8704e120bd27Smrg # linking a shared library. 8705e120bd27Smrg # 8706e120bd27Smrg # There doesn't appear to be a way to prevent this compiler from 8707e120bd27Smrg # explicitly linking system object files so we need to strip them 8708e120bd27Smrg # from the output so that they don't get included in the library 8709e120bd27Smrg # dependencies. 8710e120bd27Smrg 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"' 8711e120bd27Smrg ;; 8712e120bd27Smrg *) 8713e120bd27Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 8714e120bd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 8715e120bd27Smrg case $host in 8716e120bd27Smrg osf3*) 8717e120bd27Smrg _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' 8718e120bd27Smrg ;; 8719e120bd27Smrg *) 8720e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -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' 8721e120bd27Smrg ;; 8722e120bd27Smrg esac 8723e120bd27Smrg 8724e120bd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 8725e120bd27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 8726e120bd27Smrg 8727e120bd27Smrg # Commands to make compiler produce verbose output that lists 8728e120bd27Smrg # what "hidden" libraries, object files and flags are used when 8729e120bd27Smrg # linking a shared library. 8730e120bd27Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 8731e120bd27Smrg 8732e120bd27Smrg else 8733e120bd27Smrg # FIXME: insert proper C++ library support 8734e120bd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8735e120bd27Smrg fi 8736e120bd27Smrg ;; 8737e120bd27Smrg esac 8738e120bd27Smrg ;; 87396c321187Smrg 8740e120bd27Smrg psos*) 8741e120bd27Smrg # FIXME: insert proper C++ library support 8742e120bd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8743e120bd27Smrg ;; 87446c321187Smrg 8745e120bd27Smrg sunos4*) 8746e120bd27Smrg case $cc_basename in 8747e120bd27Smrg CC*) 8748e120bd27Smrg # Sun C++ 4.x 8749e120bd27Smrg # FIXME: insert proper C++ library support 8750e120bd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8751e120bd27Smrg ;; 8752e120bd27Smrg lcc*) 8753e120bd27Smrg # Lucid 8754e120bd27Smrg # FIXME: insert proper C++ library support 8755e120bd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8756e120bd27Smrg ;; 8757e120bd27Smrg *) 8758e120bd27Smrg # FIXME: insert proper C++ library support 8759e120bd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8760e120bd27Smrg ;; 8761e120bd27Smrg esac 8762e120bd27Smrg ;; 87636c321187Smrg 8764e120bd27Smrg solaris*) 8765e120bd27Smrg case $cc_basename in 8766e120bd27Smrg CC* | sunCC*) 8767e120bd27Smrg # Sun C++ 4.2, 5.x and Centerline C++ 8768e120bd27Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 8769e120bd27Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 8770e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 8771e120bd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 8772e120bd27Smrg $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' 8773e120bd27Smrg 8774e120bd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 8775e120bd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8776e120bd27Smrg case $host_os in 8777e120bd27Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 8778e120bd27Smrg *) 8779e120bd27Smrg # The compiler driver will combine and reorder linker options, 8780e120bd27Smrg # but understands `-z linker_flag'. 8781e120bd27Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 8782e120bd27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 8783e120bd27Smrg ;; 8784e120bd27Smrg esac 8785e120bd27Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 87866c321187Smrg 8787e120bd27Smrg output_verbose_link_cmd='func_echo_all' 87886c321187Smrg 8789e120bd27Smrg # Archives containing C++ object files must be created using 8790e120bd27Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 8791e120bd27Smrg # necessary to make sure instantiated templates are included 8792e120bd27Smrg # in the archive. 8793e120bd27Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 8794e120bd27Smrg ;; 8795e120bd27Smrg gcx*) 8796e120bd27Smrg # Green Hills C++ Compiler 8797e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 87986c321187Smrg 8799e120bd27Smrg # The C++ compiler must be used to create the archive. 8800e120bd27Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 8801e120bd27Smrg ;; 8802e120bd27Smrg *) 8803e120bd27Smrg # GNU C++ compiler with Solaris linker 8804e120bd27Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 8805e120bd27Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 8806e120bd27Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 8807e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 8808e120bd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 8809e120bd27Smrg $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 8810e120bd27Smrg 8811e120bd27Smrg # Commands to make compiler produce verbose output that lists 8812e120bd27Smrg # what "hidden" libraries, object files and flags are used when 8813e120bd27Smrg # linking a shared library. 8814e120bd27Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 8815e120bd27Smrg else 8816e120bd27Smrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 8817e120bd27Smrg # platform. 8818e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 8819e120bd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 8820e120bd27Smrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 8821e120bd27Smrg 8822e120bd27Smrg # Commands to make compiler produce verbose output that lists 8823e120bd27Smrg # what "hidden" libraries, object files and flags are used when 8824e120bd27Smrg # linking a shared library. 8825e120bd27Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 8826e120bd27Smrg fi 8827e120bd27Smrg 8828e120bd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 8829e120bd27Smrg case $host_os in 8830e120bd27Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 8831e120bd27Smrg *) 8832e120bd27Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 8833e120bd27Smrg ;; 8834e120bd27Smrg esac 8835e120bd27Smrg fi 8836e120bd27Smrg ;; 8837e120bd27Smrg esac 8838e120bd27Smrg ;; 88396c321187Smrg 8840e120bd27Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 8841e120bd27Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 8842e120bd27Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 8843e120bd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8844e120bd27Smrg runpath_var='LD_RUN_PATH' 88456c321187Smrg 8846e120bd27Smrg case $cc_basename in 8847e120bd27Smrg CC*) 8848e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8849e120bd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8850e120bd27Smrg ;; 8851e120bd27Smrg *) 8852e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8853e120bd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8854e120bd27Smrg ;; 8855e120bd27Smrg esac 8856e120bd27Smrg ;; 88576c321187Smrg 8858e120bd27Smrg sysv5* | sco3.2v5* | sco5v6*) 8859e120bd27Smrg # Note: We can NOT use -z defs as we might desire, because we do not 8860e120bd27Smrg # link with -lc, and that would cause any symbols used from libc to 8861e120bd27Smrg # always be unresolved, which means just about no library would 8862e120bd27Smrg # ever link correctly. If we're not using GNU ld we use -z text 8863e120bd27Smrg # though, which does catch some bad symbols but isn't as heavy-handed 8864e120bd27Smrg # as -z defs. 8865e120bd27Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 8866e120bd27Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 8867e120bd27Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 8868e120bd27Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 8869e120bd27Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 8870e120bd27Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 8871e120bd27Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 8872e120bd27Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 8873e120bd27Smrg runpath_var='LD_RUN_PATH' 88746c321187Smrg 8875e120bd27Smrg case $cc_basename in 8876e120bd27Smrg CC*) 8877e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8878e120bd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8879e120bd27Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 8880e120bd27Smrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 8881e120bd27Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 8882e120bd27Smrg '"$_LT_TAGVAR(reload_cmds, $1)" 8883e120bd27Smrg ;; 8884e120bd27Smrg *) 8885e120bd27Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8886e120bd27Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 8887e120bd27Smrg ;; 8888e120bd27Smrg esac 8889e120bd27Smrg ;; 88906c321187Smrg 8891e120bd27Smrg tandem*) 8892e120bd27Smrg case $cc_basename in 8893e120bd27Smrg NCC*) 8894e120bd27Smrg # NonStop-UX NCC 3.20 8895e120bd27Smrg # FIXME: insert proper C++ library support 8896e120bd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8897e120bd27Smrg ;; 8898e120bd27Smrg *) 8899e120bd27Smrg # FIXME: insert proper C++ library support 8900e120bd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8901e120bd27Smrg ;; 8902e120bd27Smrg esac 8903e120bd27Smrg ;; 89046c321187Smrg 8905e120bd27Smrg vxworks*) 8906e120bd27Smrg # FIXME: insert proper C++ library support 8907e120bd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8908e120bd27Smrg ;; 89096c321187Smrg 8910e120bd27Smrg *) 8911e120bd27Smrg # FIXME: insert proper C++ library support 8912e120bd27Smrg _LT_TAGVAR(ld_shlibs, $1)=no 8913e120bd27Smrg ;; 8914e120bd27Smrg esac 89156c321187Smrg 8916e120bd27Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 8917e120bd27Smrg test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 8918e120bd27Smrg 8919e120bd27Smrg _LT_TAGVAR(GCC, $1)="$GXX" 8920e120bd27Smrg _LT_TAGVAR(LD, $1)="$LD" 8921e120bd27Smrg 8922e120bd27Smrg ## CAVEAT EMPTOR: 8923e120bd27Smrg ## There is no encapsulation within the following macros, do not change 8924e120bd27Smrg ## the running order or otherwise move them around unless you know exactly 8925e120bd27Smrg ## what you are doing... 8926e120bd27Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 8927e120bd27Smrg _LT_COMPILER_PIC($1) 8928e120bd27Smrg _LT_COMPILER_C_O($1) 8929e120bd27Smrg _LT_COMPILER_FILE_LOCKS($1) 8930e120bd27Smrg _LT_LINKER_SHLIBS($1) 8931e120bd27Smrg _LT_SYS_DYNAMIC_LINKER($1) 8932e120bd27Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 8933e120bd27Smrg 8934e120bd27Smrg _LT_CONFIG($1) 8935e120bd27Smrg fi # test -n "$compiler" 8936e120bd27Smrg 8937e120bd27Smrg CC=$lt_save_CC 8938e120bd27Smrg LDCXX=$LD 8939e120bd27Smrg LD=$lt_save_LD 8940e120bd27Smrg GCC=$lt_save_GCC 8941e120bd27Smrg with_gnu_ld=$lt_save_with_gnu_ld 8942e120bd27Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 8943e120bd27Smrg lt_cv_path_LD=$lt_save_path_LD 8944e120bd27Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 8945e120bd27Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 8946e120bd27Smrgfi # test "$_lt_caught_CXX_error" != yes 89476c321187Smrg 8948e120bd27SmrgAC_LANG_POP 8949e120bd27Smrg])# _LT_LANG_CXX_CONFIG 89506c321187Smrg 89516c321187Smrg 8952e120bd27Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 8953e120bd27Smrg# --------------------------------- 8954e120bd27Smrg# Figure out "hidden" library dependencies from verbose 8955e120bd27Smrg# compiler output when linking a shared library. 8956e120bd27Smrg# Parse the compiler output and extract the necessary 8957e120bd27Smrg# objects, libraries and library flags. 8958e120bd27Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 8959e120bd27Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 8960e120bd27Smrg# Dependencies to place before and after the object being linked: 8961e120bd27Smrg_LT_TAGVAR(predep_objects, $1)= 8962e120bd27Smrg_LT_TAGVAR(postdep_objects, $1)= 8963e120bd27Smrg_LT_TAGVAR(predeps, $1)= 8964e120bd27Smrg_LT_TAGVAR(postdeps, $1)= 8965e120bd27Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 89666c321187Smrg 8967e120bd27Smrgdnl we can't use the lt_simple_compile_test_code here, 8968e120bd27Smrgdnl because it contains code intended for an executable, 8969e120bd27Smrgdnl not a library. It's possible we should let each 8970e120bd27Smrgdnl tag define a new lt_????_link_test_code variable, 8971e120bd27Smrgdnl but it's only used here... 8972e120bd27Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 8973e120bd27Smrgint a; 8974e120bd27Smrgvoid foo (void) { a = 0; } 8975e120bd27Smrg_LT_EOF 8976e120bd27Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 8977e120bd27Smrgclass Foo 8978e120bd27Smrg{ 8979e120bd27Smrgpublic: 8980e120bd27Smrg Foo (void) { a = 0; } 8981e120bd27Smrgprivate: 8982e120bd27Smrg int a; 8983e120bd27Smrg}; 8984e120bd27Smrg_LT_EOF 8985e120bd27Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 8986e120bd27Smrg subroutine foo 8987e120bd27Smrg implicit none 8988e120bd27Smrg integer*4 a 8989e120bd27Smrg a=0 8990e120bd27Smrg return 8991e120bd27Smrg end 8992e120bd27Smrg_LT_EOF 8993e120bd27Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 8994e120bd27Smrg subroutine foo 8995e120bd27Smrg implicit none 8996e120bd27Smrg integer a 8997e120bd27Smrg a=0 8998e120bd27Smrg return 8999e120bd27Smrg end 9000e120bd27Smrg_LT_EOF 9001e120bd27Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 9002e120bd27Smrgpublic class foo { 9003e120bd27Smrg private int a; 9004e120bd27Smrg public void bar (void) { 9005e120bd27Smrg a = 0; 9006e120bd27Smrg } 9007e120bd27Smrg}; 9008e120bd27Smrg_LT_EOF 90096c321187Smrg]) 9010e120bd27Smrgdnl Parse the compiler output and extract the necessary 9011e120bd27Smrgdnl objects, libraries and library flags. 9012e120bd27Smrgif AC_TRY_EVAL(ac_compile); then 9013e120bd27Smrg # Parse the compiler output and extract the necessary 9014e120bd27Smrg # objects, libraries and library flags. 90156c321187Smrg 9016e120bd27Smrg # Sentinel used to keep track of whether or not we are before 9017e120bd27Smrg # the conftest object file. 9018e120bd27Smrg pre_test_object_deps_done=no 90196c321187Smrg 9020e120bd27Smrg for p in `eval "$output_verbose_link_cmd"`; do 9021e120bd27Smrg case $p in 90226c321187Smrg 9023e120bd27Smrg -L* | -R* | -l*) 9024e120bd27Smrg # Some compilers place space between "-{L,R}" and the path. 9025e120bd27Smrg # Remove the space. 9026e120bd27Smrg if test $p = "-L" || 9027e120bd27Smrg test $p = "-R"; then 9028e120bd27Smrg prev=$p 9029e120bd27Smrg continue 9030e120bd27Smrg else 9031e120bd27Smrg prev= 9032e120bd27Smrg fi 90336c321187Smrg 9034e120bd27Smrg if test "$pre_test_object_deps_done" = no; then 9035e120bd27Smrg case $p in 9036e120bd27Smrg -L* | -R*) 9037e120bd27Smrg # Internal compiler library paths should come after those 9038e120bd27Smrg # provided the user. The postdeps already come after the 9039e120bd27Smrg # user supplied libs so there is no need to process them. 9040e120bd27Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 9041e120bd27Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 9042e120bd27Smrg else 9043e120bd27Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 9044e120bd27Smrg fi 9045e120bd27Smrg ;; 9046e120bd27Smrg # The "-l" case would never come before the object being 9047e120bd27Smrg # linked, so don't bother handling this case. 9048e120bd27Smrg esac 9049e120bd27Smrg else 9050e120bd27Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 9051e120bd27Smrg _LT_TAGVAR(postdeps, $1)="${prev}${p}" 9052e120bd27Smrg else 9053e120bd27Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 9054e120bd27Smrg fi 9055e120bd27Smrg fi 9056e120bd27Smrg ;; 90576c321187Smrg 9058e120bd27Smrg *.$objext) 9059e120bd27Smrg # This assumes that the test object file only shows up 9060e120bd27Smrg # once in the compiler output. 9061e120bd27Smrg if test "$p" = "conftest.$objext"; then 9062e120bd27Smrg pre_test_object_deps_done=yes 9063e120bd27Smrg continue 9064e120bd27Smrg fi 90656c321187Smrg 9066e120bd27Smrg if test "$pre_test_object_deps_done" = no; then 9067e120bd27Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 9068e120bd27Smrg _LT_TAGVAR(predep_objects, $1)="$p" 9069e120bd27Smrg else 9070e120bd27Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 9071e120bd27Smrg fi 9072e120bd27Smrg else 9073e120bd27Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 9074e120bd27Smrg _LT_TAGVAR(postdep_objects, $1)="$p" 9075e120bd27Smrg else 9076e120bd27Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 9077e120bd27Smrg fi 9078e120bd27Smrg fi 9079e120bd27Smrg ;; 90806c321187Smrg 9081e120bd27Smrg *) ;; # Ignore the rest. 90826c321187Smrg 9083e120bd27Smrg esac 9084e120bd27Smrg done 90856c321187Smrg 9086e120bd27Smrg # Clean up. 9087e120bd27Smrg rm -f a.out a.exe 9088e120bd27Smrgelse 9089e120bd27Smrg echo "libtool.m4: error: problem compiling $1 test program" 9090e120bd27Smrgfi 90916c321187Smrg 9092e120bd27Smrg$RM -f confest.$objext 9093e120bd27Smrg 9094e120bd27Smrg# PORTME: override above test on systems where it is broken 9095e120bd27Smrgm4_if([$1], [CXX], 9096e120bd27Smrg[case $host_os in 9097e120bd27Smrginterix[[3-9]]*) 9098e120bd27Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 9099e120bd27Smrg # hack all around it, let's just trust "g++" to DTRT. 9100e120bd27Smrg _LT_TAGVAR(predep_objects,$1)= 9101e120bd27Smrg _LT_TAGVAR(postdep_objects,$1)= 9102e120bd27Smrg _LT_TAGVAR(postdeps,$1)= 91036c321187Smrg ;; 9104e120bd27Smrg 9105e120bd27Smrglinux*) 9106e120bd27Smrg case `$CC -V 2>&1 | sed 5q` in 9107e120bd27Smrg *Sun\ C*) 9108e120bd27Smrg # Sun C++ 5.9 9109e120bd27Smrg 9110e120bd27Smrg # The more standards-conforming stlport4 library is 9111e120bd27Smrg # incompatible with the Cstd library. Avoid specifying 9112e120bd27Smrg # it if it's in CXXFLAGS. Ignore libCrun as 9113e120bd27Smrg # -library=stlport4 depends on it. 9114e120bd27Smrg case " $CXX $CXXFLAGS " in 9115e120bd27Smrg *" -library=stlport4 "*) 9116e120bd27Smrg solaris_use_stlport4=yes 9117e120bd27Smrg ;; 9118e120bd27Smrg esac 9119e120bd27Smrg 9120e120bd27Smrg if test "$solaris_use_stlport4" != yes; then 9121e120bd27Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 9122e120bd27Smrg fi 9123e120bd27Smrg ;; 9124e120bd27Smrg esac 91256c321187Smrg ;; 9126e120bd27Smrg 91276c321187Smrgsolaris*) 9128e120bd27Smrg case $cc_basename in 9129e120bd27Smrg CC* | sunCC*) 9130e120bd27Smrg # The more standards-conforming stlport4 library is 9131e120bd27Smrg # incompatible with the Cstd library. Avoid specifying 9132e120bd27Smrg # it if it's in CXXFLAGS. Ignore libCrun as 9133e120bd27Smrg # -library=stlport4 depends on it. 9134e120bd27Smrg case " $CXX $CXXFLAGS " in 9135e120bd27Smrg *" -library=stlport4 "*) 9136e120bd27Smrg solaris_use_stlport4=yes 9137e120bd27Smrg ;; 9138e120bd27Smrg esac 91396c321187Smrg 9140e120bd27Smrg # Adding this requires a known-good setup of shared libraries for 9141e120bd27Smrg # Sun compiler versions before 5.6, else PIC objects from an old 9142e120bd27Smrg # archive will be linked into the output, leading to subtle bugs. 9143e120bd27Smrg if test "$solaris_use_stlport4" != yes; then 9144e120bd27Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 9145e120bd27Smrg fi 9146e120bd27Smrg ;; 9147e120bd27Smrg esac 91486c321187Smrg ;; 91496c321187Smrgesac 9150e120bd27Smrg]) 91516c321187Smrg 9152e120bd27Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 9153e120bd27Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 91546c321187Smrgesac 9155e120bd27Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 9156e120bd27Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 9157e120bd27Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 9158e120bd27Smrgfi 9159e120bd27Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 9160e120bd27Smrg [The directories searched by this compiler when creating a shared library]) 9161e120bd27Smrg_LT_TAGDECL([], [predep_objects], [1], 9162e120bd27Smrg [Dependencies to place before and after the objects being linked to 9163e120bd27Smrg create a shared library]) 9164e120bd27Smrg_LT_TAGDECL([], [postdep_objects], [1]) 9165e120bd27Smrg_LT_TAGDECL([], [predeps], [1]) 9166e120bd27Smrg_LT_TAGDECL([], [postdeps], [1]) 9167e120bd27Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 9168e120bd27Smrg [The library search path used internally by the compiler when linking 9169e120bd27Smrg a shared library]) 9170e120bd27Smrg])# _LT_SYS_HIDDEN_LIBDEPS 9171e120bd27Smrg 9172e120bd27Smrg 9173e120bd27Smrg# _LT_LANG_F77_CONFIG([TAG]) 9174e120bd27Smrg# -------------------------- 9175e120bd27Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 9176e120bd27Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 9177e120bd27Smrg# to write the compiler configuration to `libtool'. 9178e120bd27Smrgm4_defun([_LT_LANG_F77_CONFIG], 9179e120bd27Smrg[AC_LANG_PUSH(Fortran 77) 9180e120bd27Smrgif test -z "$F77" || test "X$F77" = "Xno"; then 9181e120bd27Smrg _lt_disable_F77=yes 9182e120bd27Smrgfi 91836c321187Smrg 9184e120bd27Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 9185e120bd27Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 9186e120bd27Smrg_LT_TAGVAR(always_export_symbols, $1)=no 9187e120bd27Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 9188e120bd27Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 9189e120bd27Smrg_LT_TAGVAR(hardcode_direct, $1)=no 9190e120bd27Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 9191e120bd27Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 9192e120bd27Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 9193e120bd27Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 9194e120bd27Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 9195e120bd27Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 9196e120bd27Smrg_LT_TAGVAR(inherit_rpath, $1)=no 9197e120bd27Smrg_LT_TAGVAR(module_cmds, $1)= 9198e120bd27Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 9199e120bd27Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 9200e120bd27Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 9201e120bd27Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 9202e120bd27Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 9203e120bd27Smrg_LT_TAGVAR(no_undefined_flag, $1)= 9204e120bd27Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 9205e120bd27Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 92066c321187Smrg 9207e120bd27Smrg# Source file extension for f77 test sources. 9208e120bd27Smrgac_ext=f 92096c321187Smrg 9210e120bd27Smrg# Object file extension for compiled f77 test sources. 9211e120bd27Smrgobjext=o 9212e120bd27Smrg_LT_TAGVAR(objext, $1)=$objext 9213e120bd27Smrg 9214e120bd27Smrg# No sense in running all these tests if we already determined that 9215e120bd27Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 9216e120bd27Smrg# are currently assumed to apply to all compilers on this platform, 9217e120bd27Smrg# and will be corrupted by setting them based on a non-working compiler. 9218e120bd27Smrgif test "$_lt_disable_F77" != yes; then 9219e120bd27Smrg # Code to be used in simple compile tests 9220e120bd27Smrg lt_simple_compile_test_code="\ 9221e120bd27Smrg subroutine t 9222e120bd27Smrg return 9223e120bd27Smrg end 9224e120bd27Smrg" 92256c321187Smrg 9226e120bd27Smrg # Code to be used in simple link tests 9227e120bd27Smrg lt_simple_link_test_code="\ 9228e120bd27Smrg program t 9229e120bd27Smrg end 9230e120bd27Smrg" 92316c321187Smrg 9232e120bd27Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 9233e120bd27Smrg _LT_TAG_COMPILER 92346c321187Smrg 9235e120bd27Smrg # save warnings/boilerplate of simple test code 9236e120bd27Smrg _LT_COMPILER_BOILERPLATE 9237e120bd27Smrg _LT_LINKER_BOILERPLATE 92386c321187Smrg 9239e120bd27Smrg # Allow CC to be a program name with arguments. 9240e120bd27Smrg lt_save_CC="$CC" 9241e120bd27Smrg lt_save_GCC=$GCC 9242e120bd27Smrg CC=${F77-"f77"} 9243e120bd27Smrg compiler=$CC 9244e120bd27Smrg _LT_TAGVAR(compiler, $1)=$CC 9245e120bd27Smrg _LT_CC_BASENAME([$compiler]) 9246e120bd27Smrg GCC=$G77 9247e120bd27Smrg if test -n "$compiler"; then 9248e120bd27Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 9249e120bd27Smrg AC_MSG_RESULT([$can_build_shared]) 92506c321187Smrg 9251e120bd27Smrg AC_MSG_CHECKING([whether to build shared libraries]) 9252e120bd27Smrg test "$can_build_shared" = "no" && enable_shared=no 92536c321187Smrg 9254e120bd27Smrg # On AIX, shared libraries and static libraries use the same namespace, and 9255e120bd27Smrg # are all built from PIC. 9256e120bd27Smrg case $host_os in 9257e120bd27Smrg aix3*) 9258e120bd27Smrg test "$enable_shared" = yes && enable_static=no 9259e120bd27Smrg if test -n "$RANLIB"; then 9260e120bd27Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 9261e120bd27Smrg postinstall_cmds='$RANLIB $lib' 9262e120bd27Smrg fi 9263e120bd27Smrg ;; 9264e120bd27Smrg aix[[4-9]]*) 9265e120bd27Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 9266e120bd27Smrg test "$enable_shared" = yes && enable_static=no 9267e120bd27Smrg fi 9268e120bd27Smrg ;; 9269e120bd27Smrg esac 9270e120bd27Smrg AC_MSG_RESULT([$enable_shared]) 9271e120bd27Smrg 9272e120bd27Smrg AC_MSG_CHECKING([whether to build static libraries]) 9273e120bd27Smrg # Make sure either enable_shared or enable_static is yes. 9274e120bd27Smrg test "$enable_shared" = yes || enable_static=yes 9275e120bd27Smrg AC_MSG_RESULT([$enable_static]) 9276e120bd27Smrg 9277e120bd27Smrg _LT_TAGVAR(GCC, $1)="$G77" 9278e120bd27Smrg _LT_TAGVAR(LD, $1)="$LD" 9279e120bd27Smrg 9280e120bd27Smrg ## CAVEAT EMPTOR: 9281e120bd27Smrg ## There is no encapsulation within the following macros, do not change 9282e120bd27Smrg ## the running order or otherwise move them around unless you know exactly 9283e120bd27Smrg ## what you are doing... 9284e120bd27Smrg _LT_COMPILER_PIC($1) 9285e120bd27Smrg _LT_COMPILER_C_O($1) 9286e120bd27Smrg _LT_COMPILER_FILE_LOCKS($1) 9287e120bd27Smrg _LT_LINKER_SHLIBS($1) 9288e120bd27Smrg _LT_SYS_DYNAMIC_LINKER($1) 9289e120bd27Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 9290e120bd27Smrg 9291e120bd27Smrg _LT_CONFIG($1) 9292e120bd27Smrg fi # test -n "$compiler" 9293e120bd27Smrg 9294e120bd27Smrg GCC=$lt_save_GCC 9295e120bd27Smrg CC="$lt_save_CC" 9296e120bd27Smrgfi # test "$_lt_disable_F77" != yes 92976c321187Smrg 9298e120bd27SmrgAC_LANG_POP 9299e120bd27Smrg])# _LT_LANG_F77_CONFIG 93006c321187Smrg 93016c321187Smrg 9302e120bd27Smrg# _LT_LANG_FC_CONFIG([TAG]) 9303e120bd27Smrg# ------------------------- 9304e120bd27Smrg# Ensure that the configuration variables for a Fortran compiler are 9305e120bd27Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 9306e120bd27Smrg# to write the compiler configuration to `libtool'. 9307e120bd27Smrgm4_defun([_LT_LANG_FC_CONFIG], 9308e120bd27Smrg[AC_LANG_PUSH(Fortran) 9309e120bd27Smrg 9310e120bd27Smrgif test -z "$FC" || test "X$FC" = "Xno"; then 9311e120bd27Smrg _lt_disable_FC=yes 93126c321187Smrgfi 93136c321187Smrg 9314e120bd27Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 9315e120bd27Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 9316e120bd27Smrg_LT_TAGVAR(always_export_symbols, $1)=no 9317e120bd27Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 9318e120bd27Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 9319e120bd27Smrg_LT_TAGVAR(hardcode_direct, $1)=no 9320e120bd27Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 9321e120bd27Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 9322e120bd27Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 9323e120bd27Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 9324e120bd27Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 9325e120bd27Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 9326e120bd27Smrg_LT_TAGVAR(inherit_rpath, $1)=no 9327e120bd27Smrg_LT_TAGVAR(module_cmds, $1)= 9328e120bd27Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 9329e120bd27Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 9330e120bd27Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 9331e120bd27Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 9332e120bd27Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 9333e120bd27Smrg_LT_TAGVAR(no_undefined_flag, $1)= 9334e120bd27Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 9335e120bd27Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 9336e120bd27Smrg 9337e120bd27Smrg# Source file extension for fc test sources. 9338e120bd27Smrgac_ext=${ac_fc_srcext-f} 9339e120bd27Smrg 9340e120bd27Smrg# Object file extension for compiled fc test sources. 9341e120bd27Smrgobjext=o 9342e120bd27Smrg_LT_TAGVAR(objext, $1)=$objext 9343e120bd27Smrg 9344e120bd27Smrg# No sense in running all these tests if we already determined that 9345e120bd27Smrg# the FC compiler isn't working. Some variables (like enable_shared) 9346e120bd27Smrg# are currently assumed to apply to all compilers on this platform, 9347e120bd27Smrg# and will be corrupted by setting them based on a non-working compiler. 9348e120bd27Smrgif test "$_lt_disable_FC" != yes; then 9349e120bd27Smrg # Code to be used in simple compile tests 9350e120bd27Smrg lt_simple_compile_test_code="\ 9351e120bd27Smrg subroutine t 9352e120bd27Smrg return 9353e120bd27Smrg end 9354e120bd27Smrg" 9355e120bd27Smrg 9356e120bd27Smrg # Code to be used in simple link tests 9357e120bd27Smrg lt_simple_link_test_code="\ 9358e120bd27Smrg program t 9359e120bd27Smrg end 9360e120bd27Smrg" 93616c321187Smrg 9362e120bd27Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 9363e120bd27Smrg _LT_TAG_COMPILER 93646c321187Smrg 9365e120bd27Smrg # save warnings/boilerplate of simple test code 9366e120bd27Smrg _LT_COMPILER_BOILERPLATE 9367e120bd27Smrg _LT_LINKER_BOILERPLATE 93686c321187Smrg 9369e120bd27Smrg # Allow CC to be a program name with arguments. 9370e120bd27Smrg lt_save_CC="$CC" 9371e120bd27Smrg lt_save_GCC=$GCC 9372e120bd27Smrg CC=${FC-"f95"} 9373e120bd27Smrg compiler=$CC 9374e120bd27Smrg GCC=$ac_cv_fc_compiler_gnu 9375e120bd27Smrg 9376e120bd27Smrg _LT_TAGVAR(compiler, $1)=$CC 9377e120bd27Smrg _LT_CC_BASENAME([$compiler]) 9378e120bd27Smrg 9379e120bd27Smrg if test -n "$compiler"; then 9380e120bd27Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 9381e120bd27Smrg AC_MSG_RESULT([$can_build_shared]) 9382e120bd27Smrg 9383e120bd27Smrg AC_MSG_CHECKING([whether to build shared libraries]) 9384e120bd27Smrg test "$can_build_shared" = "no" && enable_shared=no 9385e120bd27Smrg 9386e120bd27Smrg # On AIX, shared libraries and static libraries use the same namespace, and 9387e120bd27Smrg # are all built from PIC. 93886c321187Smrg case $host_os in 9389e120bd27Smrg aix3*) 9390e120bd27Smrg test "$enable_shared" = yes && enable_static=no 9391e120bd27Smrg if test -n "$RANLIB"; then 9392e120bd27Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 9393e120bd27Smrg postinstall_cmds='$RANLIB $lib' 9394e120bd27Smrg fi 9395e120bd27Smrg ;; 939693493779Smrg aix[[4-9]]*) 9397e120bd27Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 9398e120bd27Smrg test "$enable_shared" = yes && enable_static=no 93996c321187Smrg fi 9400e120bd27Smrg ;; 94016c321187Smrg esac 9402e120bd27Smrg AC_MSG_RESULT([$enable_shared]) 9403e120bd27Smrg 9404e120bd27Smrg AC_MSG_CHECKING([whether to build static libraries]) 9405e120bd27Smrg # Make sure either enable_shared or enable_static is yes. 9406e120bd27Smrg test "$enable_shared" = yes || enable_static=yes 9407e120bd27Smrg AC_MSG_RESULT([$enable_static]) 9408e120bd27Smrg 9409e120bd27Smrg _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 9410e120bd27Smrg _LT_TAGVAR(LD, $1)="$LD" 9411e120bd27Smrg 9412e120bd27Smrg ## CAVEAT EMPTOR: 9413e120bd27Smrg ## There is no encapsulation within the following macros, do not change 9414e120bd27Smrg ## the running order or otherwise move them around unless you know exactly 9415e120bd27Smrg ## what you are doing... 9416e120bd27Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 9417e120bd27Smrg _LT_COMPILER_PIC($1) 9418e120bd27Smrg _LT_COMPILER_C_O($1) 9419e120bd27Smrg _LT_COMPILER_FILE_LOCKS($1) 9420e120bd27Smrg _LT_LINKER_SHLIBS($1) 9421e120bd27Smrg _LT_SYS_DYNAMIC_LINKER($1) 9422e120bd27Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 9423e120bd27Smrg 9424e120bd27Smrg _LT_CONFIG($1) 9425e120bd27Smrg fi # test -n "$compiler" 9426e120bd27Smrg 9427e120bd27Smrg GCC=$lt_save_GCC 9428e120bd27Smrg CC="$lt_save_CC" 9429e120bd27Smrgfi # test "$_lt_disable_FC" != yes 94306c321187Smrg 9431e120bd27SmrgAC_LANG_POP 9432e120bd27Smrg])# _LT_LANG_FC_CONFIG 94336c321187Smrg 94346c321187Smrg 9435e120bd27Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 9436e120bd27Smrg# -------------------------- 9437e120bd27Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 9438e120bd27Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 9439e120bd27Smrg# to write the compiler configuration to `libtool'. 9440e120bd27Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 9441e120bd27Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 9442e120bd27SmrgAC_LANG_SAVE 94436c321187Smrg 9444e120bd27Smrg# Source file extension for Java test sources. 9445e120bd27Smrgac_ext=java 94466c321187Smrg 9447e120bd27Smrg# Object file extension for compiled Java test sources. 9448e120bd27Smrgobjext=o 9449e120bd27Smrg_LT_TAGVAR(objext, $1)=$objext 94506c321187Smrg 9451e120bd27Smrg# Code to be used in simple compile tests 9452e120bd27Smrglt_simple_compile_test_code="class foo {}" 94536c321187Smrg 9454e120bd27Smrg# Code to be used in simple link tests 9455e120bd27Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 94566c321187Smrg 9457e120bd27Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 9458e120bd27Smrg_LT_TAG_COMPILER 94596c321187Smrg 9460e120bd27Smrg# save warnings/boilerplate of simple test code 9461e120bd27Smrg_LT_COMPILER_BOILERPLATE 9462e120bd27Smrg_LT_LINKER_BOILERPLATE 94636c321187Smrg 9464e120bd27Smrg# Allow CC to be a program name with arguments. 9465e120bd27Smrglt_save_CC="$CC" 9466e120bd27Smrglt_save_GCC=$GCC 9467e120bd27SmrgGCC=yes 9468e120bd27SmrgCC=${GCJ-"gcj"} 9469e120bd27Smrgcompiler=$CC 9470e120bd27Smrg_LT_TAGVAR(compiler, $1)=$CC 9471e120bd27Smrg_LT_TAGVAR(LD, $1)="$LD" 9472e120bd27Smrg_LT_CC_BASENAME([$compiler]) 9473e120bd27Smrg 9474e120bd27Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 9475e120bd27Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 9476e120bd27Smrg 9477e120bd27Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 9478e120bd27Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 9479e120bd27Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 9480e120bd27Smrg 9481e120bd27Smrgif test -n "$compiler"; then 9482e120bd27Smrg _LT_COMPILER_NO_RTTI($1) 9483e120bd27Smrg _LT_COMPILER_PIC($1) 9484e120bd27Smrg _LT_COMPILER_C_O($1) 9485e120bd27Smrg _LT_COMPILER_FILE_LOCKS($1) 9486e120bd27Smrg _LT_LINKER_SHLIBS($1) 9487e120bd27Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 9488e120bd27Smrg 9489e120bd27Smrg _LT_CONFIG($1) 9490e120bd27Smrgfi 9491e120bd27Smrg 9492e120bd27SmrgAC_LANG_RESTORE 9493e120bd27Smrg 9494e120bd27SmrgGCC=$lt_save_GCC 9495e120bd27SmrgCC="$lt_save_CC" 9496e120bd27Smrg])# _LT_LANG_GCJ_CONFIG 94976c321187Smrg 94986c321187Smrg 9499e120bd27Smrg# _LT_LANG_RC_CONFIG([TAG]) 9500e120bd27Smrg# ------------------------- 9501e120bd27Smrg# Ensure that the configuration variables for the Windows resource compiler 9502e120bd27Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 9503e120bd27Smrg# to write the compiler configuration to `libtool'. 9504e120bd27Smrgm4_defun([_LT_LANG_RC_CONFIG], 9505e120bd27Smrg[AC_REQUIRE([LT_PROG_RC])dnl 9506e120bd27SmrgAC_LANG_SAVE 95076c321187Smrg 9508e120bd27Smrg# Source file extension for RC test sources. 9509e120bd27Smrgac_ext=rc 95106c321187Smrg 9511e120bd27Smrg# Object file extension for compiled RC test sources. 9512e120bd27Smrgobjext=o 9513e120bd27Smrg_LT_TAGVAR(objext, $1)=$objext 95146c321187Smrg 9515e120bd27Smrg# Code to be used in simple compile tests 9516e120bd27Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 95176c321187Smrg 9518e120bd27Smrg# Code to be used in simple link tests 9519e120bd27Smrglt_simple_link_test_code="$lt_simple_compile_test_code" 95206c321187Smrg 9521e120bd27Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 9522e120bd27Smrg_LT_TAG_COMPILER 952393493779Smrg 9524e120bd27Smrg# save warnings/boilerplate of simple test code 9525e120bd27Smrg_LT_COMPILER_BOILERPLATE 9526e120bd27Smrg_LT_LINKER_BOILERPLATE 95276c321187Smrg 9528e120bd27Smrg# Allow CC to be a program name with arguments. 9529e120bd27Smrglt_save_CC="$CC" 9530e120bd27Smrglt_save_GCC=$GCC 9531e120bd27SmrgGCC= 9532e120bd27SmrgCC=${RC-"windres"} 9533e120bd27Smrgcompiler=$CC 9534e120bd27Smrg_LT_TAGVAR(compiler, $1)=$CC 9535e120bd27Smrg_LT_CC_BASENAME([$compiler]) 9536e120bd27Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 95376c321187Smrg 9538e120bd27Smrgif test -n "$compiler"; then 9539e120bd27Smrg : 9540e120bd27Smrg _LT_CONFIG($1) 9541e120bd27Smrgfi 95426c321187Smrg 9543e120bd27SmrgGCC=$lt_save_GCC 9544e120bd27SmrgAC_LANG_RESTORE 9545e120bd27SmrgCC="$lt_save_CC" 9546e120bd27Smrg])# _LT_LANG_RC_CONFIG 95476c321187Smrg 95486c321187Smrg 9549e120bd27Smrg# LT_PROG_GCJ 9550e120bd27Smrg# ----------- 9551e120bd27SmrgAC_DEFUN([LT_PROG_GCJ], 9552e120bd27Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 9553e120bd27Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 9554e120bd27Smrg [AC_CHECK_TOOL(GCJ, gcj,) 9555e120bd27Smrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 9556e120bd27Smrg AC_SUBST(GCJFLAGS)])])[]dnl 9557e120bd27Smrg]) 95586c321187Smrg 9559e120bd27Smrg# Old name: 9560e120bd27SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 9561e120bd27Smrgdnl aclocal-1.4 backwards compatibility: 9562e120bd27Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 95636c321187Smrg 9564e120bd27Smrg 9565e120bd27Smrg# LT_PROG_RC 9566e120bd27Smrg# ---------- 9567e120bd27SmrgAC_DEFUN([LT_PROG_RC], 9568e120bd27Smrg[AC_CHECK_TOOL(RC, windres,) 95696c321187Smrg]) 95706c321187Smrg 9571e120bd27Smrg# Old name: 9572e120bd27SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 9573e120bd27Smrgdnl aclocal-1.4 backwards compatibility: 9574e120bd27Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 95756c321187Smrg 9576e120bd27Smrg 9577e120bd27Smrg# _LT_DECL_EGREP 9578e120bd27Smrg# -------------- 9579e120bd27Smrg# If we don't have a new enough Autoconf to choose the best grep 9580e120bd27Smrg# available, choose the one first in the user's PATH. 9581e120bd27Smrgm4_defun([_LT_DECL_EGREP], 9582e120bd27Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 9583e120bd27SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 9584e120bd27Smrgtest -z "$GREP" && GREP=grep 9585e120bd27Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 9586e120bd27Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 9587e120bd27Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 9588e120bd27Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 9589e120bd27SmrgAC_SUBST([GREP]) 95906c321187Smrg]) 95916c321187Smrg 95926c321187Smrg 9593e120bd27Smrg# _LT_DECL_OBJDUMP 9594e120bd27Smrg# -------------- 9595e120bd27Smrg# If we don't have a new enough Autoconf to choose the best objdump 9596e120bd27Smrg# available, choose the one first in the user's PATH. 9597e120bd27Smrgm4_defun([_LT_DECL_OBJDUMP], 9598e120bd27Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 9599e120bd27Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 9600e120bd27Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 9601e120bd27SmrgAC_SUBST([OBJDUMP]) 9602e120bd27Smrg]) 9603e120bd27Smrg 9604e120bd27Smrg 9605e120bd27Smrg# _LT_DECL_SED 9606e120bd27Smrg# ------------ 9607e120bd27Smrg# Check for a fully-functional sed program, that truncates 9608e120bd27Smrg# as few characters as possible. Prefer GNU sed if found. 9609e120bd27Smrgm4_defun([_LT_DECL_SED], 9610e120bd27Smrg[AC_PROG_SED 9611e120bd27Smrgtest -z "$SED" && SED=sed 9612e120bd27SmrgXsed="$SED -e 1s/^X//" 9613e120bd27Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 9614e120bd27Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 9615e120bd27Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 9616e120bd27Smrg])# _LT_DECL_SED 9617e120bd27Smrg 9618e120bd27Smrgm4_ifndef([AC_PROG_SED], [ 9619e120bd27Smrg# NOTE: This macro has been submitted for inclusion into # 9620e120bd27Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 9621e120bd27Smrg# a released version of Autoconf we should remove this # 9622e120bd27Smrg# macro and use it instead. # 9623e120bd27Smrg 9624e120bd27Smrgm4_defun([AC_PROG_SED], 9625e120bd27Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 9626e120bd27SmrgAC_CACHE_VAL(lt_cv_path_SED, 9627e120bd27Smrg[# Loop through the user's path and test for sed and gsed. 9628e120bd27Smrg# Then use that list of sed's as ones to test for truncation. 9629e120bd27Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 9630e120bd27Smrgfor as_dir in $PATH 9631e120bd27Smrgdo 9632e120bd27Smrg IFS=$as_save_IFS 9633e120bd27Smrg test -z "$as_dir" && as_dir=. 9634e120bd27Smrg for lt_ac_prog in sed gsed; do 9635e120bd27Smrg for ac_exec_ext in '' $ac_executable_extensions; do 9636e120bd27Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 9637e120bd27Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 9638e120bd27Smrg fi 9639e120bd27Smrg done 9640e120bd27Smrg done 9641e120bd27Smrgdone 9642e120bd27SmrgIFS=$as_save_IFS 9643e120bd27Smrglt_ac_max=0 9644e120bd27Smrglt_ac_count=0 9645e120bd27Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 9646e120bd27Smrg# along with /bin/sed that truncates output. 9647e120bd27Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 9648e120bd27Smrg test ! -f $lt_ac_sed && continue 9649e120bd27Smrg cat /dev/null > conftest.in 9650e120bd27Smrg lt_ac_count=0 9651e120bd27Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 9652e120bd27Smrg # Check for GNU sed and select it if it is found. 9653e120bd27Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 9654e120bd27Smrg lt_cv_path_SED=$lt_ac_sed 9655e120bd27Smrg break 9656e120bd27Smrg fi 9657e120bd27Smrg while true; do 9658e120bd27Smrg cat conftest.in conftest.in >conftest.tmp 9659e120bd27Smrg mv conftest.tmp conftest.in 9660e120bd27Smrg cp conftest.in conftest.nl 9661e120bd27Smrg echo >>conftest.nl 9662e120bd27Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 9663e120bd27Smrg cmp -s conftest.out conftest.nl || break 9664e120bd27Smrg # 10000 chars as input seems more than enough 9665e120bd27Smrg test $lt_ac_count -gt 10 && break 9666e120bd27Smrg lt_ac_count=`expr $lt_ac_count + 1` 9667e120bd27Smrg if test $lt_ac_count -gt $lt_ac_max; then 9668e120bd27Smrg lt_ac_max=$lt_ac_count 9669e120bd27Smrg lt_cv_path_SED=$lt_ac_sed 96706c321187Smrg fi 9671e120bd27Smrg done 9672e120bd27Smrgdone 9673e120bd27Smrg]) 9674e120bd27SmrgSED=$lt_cv_path_SED 9675e120bd27SmrgAC_SUBST([SED]) 9676e120bd27SmrgAC_MSG_RESULT([$SED]) 9677e120bd27Smrg])#AC_PROG_SED 9678e120bd27Smrg])#m4_ifndef 9679e120bd27Smrg 9680e120bd27Smrg# Old name: 9681e120bd27SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 9682e120bd27Smrgdnl aclocal-1.4 backwards compatibility: 9683e120bd27Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 9684e120bd27Smrg 9685e120bd27Smrg 9686e120bd27Smrg# _LT_CHECK_SHELL_FEATURES 9687e120bd27Smrg# ------------------------ 9688e120bd27Smrg# Find out whether the shell is Bourne or XSI compatible, 9689e120bd27Smrg# or has some other useful features. 9690e120bd27Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 9691e120bd27Smrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 9692e120bd27Smrg# Try some XSI features 9693e120bd27Smrgxsi_shell=no 9694e120bd27Smrg( _lt_dummy="a/b/c" 9695e120bd27Smrg test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ 9696e120bd27Smrg = c,a/b,, \ 9697e120bd27Smrg && eval 'test $(( 1 + 1 )) -eq 2 \ 9698e120bd27Smrg && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 9699e120bd27Smrg && xsi_shell=yes 9700e120bd27SmrgAC_MSG_RESULT([$xsi_shell]) 9701e120bd27Smrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 9702e120bd27Smrg 9703e120bd27SmrgAC_MSG_CHECKING([whether the shell understands "+="]) 9704e120bd27Smrglt_shell_append=no 9705e120bd27Smrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 9706e120bd27Smrg >/dev/null 2>&1 \ 9707e120bd27Smrg && lt_shell_append=yes 9708e120bd27SmrgAC_MSG_RESULT([$lt_shell_append]) 9709e120bd27Smrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 9710e120bd27Smrg 9711e120bd27Smrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 9712e120bd27Smrg lt_unset=unset 9713e120bd27Smrgelse 9714e120bd27Smrg lt_unset=false 9715e120bd27Smrgfi 9716e120bd27Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 9717e120bd27Smrg 9718e120bd27Smrg# test EBCDIC or ASCII 9719e120bd27Smrgcase `echo X|tr X '\101'` in 9720e120bd27Smrg A) # ASCII based system 9721e120bd27Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 9722e120bd27Smrg lt_SP2NL='tr \040 \012' 9723e120bd27Smrg lt_NL2SP='tr \015\012 \040\040' 97246c321187Smrg ;; 9725e120bd27Smrg *) # EBCDIC based system 9726e120bd27Smrg lt_SP2NL='tr \100 \n' 9727e120bd27Smrg lt_NL2SP='tr \r\n \100\100' 97286c321187Smrg ;; 9729e120bd27Smrgesac 9730e120bd27Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 9731e120bd27Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 9732e120bd27Smrg])# _LT_CHECK_SHELL_FEATURES 9733e120bd27Smrg 9734e120bd27Smrg 9735e120bd27Smrg# _LT_PROG_XSI_SHELLFNS 9736e120bd27Smrg# --------------------- 9737e120bd27Smrg# Bourne and XSI compatible variants of some useful shell functions. 9738e120bd27Smrgm4_defun([_LT_PROG_XSI_SHELLFNS], 9739e120bd27Smrg[case $xsi_shell in 9740e120bd27Smrg yes) 9741e120bd27Smrg cat << \_LT_EOF >> "$cfgfile" 9742e120bd27Smrg 9743e120bd27Smrg# func_dirname file append nondir_replacement 9744e120bd27Smrg# Compute the dirname of FILE. If nonempty, add APPEND to the result, 9745e120bd27Smrg# otherwise set result to NONDIR_REPLACEMENT. 9746e120bd27Smrgfunc_dirname () 9747e120bd27Smrg{ 9748e120bd27Smrg case ${1} in 9749e120bd27Smrg */*) func_dirname_result="${1%/*}${2}" ;; 9750e120bd27Smrg * ) func_dirname_result="${3}" ;; 97516c321187Smrg esac 9752e120bd27Smrg} 9753e120bd27Smrg 9754e120bd27Smrg# func_basename file 9755e120bd27Smrgfunc_basename () 9756e120bd27Smrg{ 9757e120bd27Smrg func_basename_result="${1##*/}" 9758e120bd27Smrg} 9759e120bd27Smrg 9760e120bd27Smrg# func_dirname_and_basename file append nondir_replacement 9761e120bd27Smrg# perform func_basename and func_dirname in a single function 9762e120bd27Smrg# call: 9763e120bd27Smrg# dirname: Compute the dirname of FILE. If nonempty, 9764e120bd27Smrg# add APPEND to the result, otherwise set result 9765e120bd27Smrg# to NONDIR_REPLACEMENT. 9766e120bd27Smrg# value returned in "$func_dirname_result" 9767e120bd27Smrg# basename: Compute filename of FILE. 9768e120bd27Smrg# value retuned in "$func_basename_result" 9769e120bd27Smrg# Implementation must be kept synchronized with func_dirname 9770e120bd27Smrg# and func_basename. For efficiency, we do not delegate to 9771e120bd27Smrg# those functions but instead duplicate the functionality here. 9772e120bd27Smrgfunc_dirname_and_basename () 9773e120bd27Smrg{ 9774e120bd27Smrg case ${1} in 9775e120bd27Smrg */*) func_dirname_result="${1%/*}${2}" ;; 9776e120bd27Smrg * ) func_dirname_result="${3}" ;; 97776c321187Smrg esac 9778e120bd27Smrg func_basename_result="${1##*/}" 9779e120bd27Smrg} 97806c321187Smrg 9781e120bd27Smrg# func_stripname prefix suffix name 9782e120bd27Smrg# strip PREFIX and SUFFIX off of NAME. 9783e120bd27Smrg# PREFIX and SUFFIX must not contain globbing or regex special 9784e120bd27Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 9785e120bd27Smrg# dot (in which case that matches only a dot). 9786e120bd27Smrgfunc_stripname () 9787e120bd27Smrg{ 9788e120bd27Smrg # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 9789e120bd27Smrg # positional parameters, so assign one to ordinary parameter first. 9790e120bd27Smrg func_stripname_result=${3} 9791e120bd27Smrg func_stripname_result=${func_stripname_result#"${1}"} 9792e120bd27Smrg func_stripname_result=${func_stripname_result%"${2}"} 9793e120bd27Smrg} 9794e120bd27Smrg 9795e120bd27Smrg# func_opt_split 9796e120bd27Smrgfunc_opt_split () 9797e120bd27Smrg{ 9798e120bd27Smrg func_opt_split_opt=${1%%=*} 9799e120bd27Smrg func_opt_split_arg=${1#*=} 9800e120bd27Smrg} 9801e120bd27Smrg 9802e120bd27Smrg# func_lo2o object 9803e120bd27Smrgfunc_lo2o () 9804e120bd27Smrg{ 9805e120bd27Smrg case ${1} in 9806e120bd27Smrg *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 9807e120bd27Smrg *) func_lo2o_result=${1} ;; 9808e120bd27Smrg esac 9809e120bd27Smrg} 98106c321187Smrg 9811e120bd27Smrg# func_xform libobj-or-source 9812e120bd27Smrgfunc_xform () 9813e120bd27Smrg{ 9814e120bd27Smrg func_xform_result=${1%.*}.lo 9815e120bd27Smrg} 98166c321187Smrg 9817e120bd27Smrg# func_arith arithmetic-term... 9818e120bd27Smrgfunc_arith () 9819e120bd27Smrg{ 9820e120bd27Smrg func_arith_result=$(( $[*] )) 9821e120bd27Smrg} 98226c321187Smrg 9823e120bd27Smrg# func_len string 9824e120bd27Smrg# STRING may not start with a hyphen. 9825e120bd27Smrgfunc_len () 9826e120bd27Smrg{ 9827e120bd27Smrg func_len_result=${#1} 9828e120bd27Smrg} 98296c321187Smrg 9830e120bd27Smrg_LT_EOF 9831e120bd27Smrg ;; 9832e120bd27Smrg *) # Bourne compatible functions. 9833e120bd27Smrg cat << \_LT_EOF >> "$cfgfile" 98346c321187Smrg 9835e120bd27Smrg# func_dirname file append nondir_replacement 9836e120bd27Smrg# Compute the dirname of FILE. If nonempty, add APPEND to the result, 9837e120bd27Smrg# otherwise set result to NONDIR_REPLACEMENT. 9838e120bd27Smrgfunc_dirname () 9839e120bd27Smrg{ 9840e120bd27Smrg # Extract subdirectory from the argument. 9841e120bd27Smrg func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` 9842e120bd27Smrg if test "X$func_dirname_result" = "X${1}"; then 9843e120bd27Smrg func_dirname_result="${3}" 9844e120bd27Smrg else 9845e120bd27Smrg func_dirname_result="$func_dirname_result${2}" 9846e120bd27Smrg fi 9847e120bd27Smrg} 98486c321187Smrg 9849e120bd27Smrg# func_basename file 9850e120bd27Smrgfunc_basename () 9851e120bd27Smrg{ 9852e120bd27Smrg func_basename_result=`$ECHO "${1}" | $SED "$basename"` 9853e120bd27Smrg} 98546c321187Smrg 9855e120bd27Smrgdnl func_dirname_and_basename 9856e120bd27Smrgdnl A portable version of this function is already defined in general.m4sh 9857e120bd27Smrgdnl so there is no need for it here. 9858e120bd27Smrg 9859e120bd27Smrg# func_stripname prefix suffix name 9860e120bd27Smrg# strip PREFIX and SUFFIX off of NAME. 9861e120bd27Smrg# PREFIX and SUFFIX must not contain globbing or regex special 9862e120bd27Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 9863e120bd27Smrg# dot (in which case that matches only a dot). 9864e120bd27Smrg# func_strip_suffix prefix name 9865e120bd27Smrgfunc_stripname () 9866e120bd27Smrg{ 9867e120bd27Smrg case ${2} in 9868e120bd27Smrg .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 9869e120bd27Smrg *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 9870e120bd27Smrg esac 9871e120bd27Smrg} 98726c321187Smrg 9873e120bd27Smrg# sed scripts: 9874e120bd27Smrgmy_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' 9875e120bd27Smrgmy_sed_long_arg='1s/^-[[^=]]*=//' 98766c321187Smrg 9877e120bd27Smrg# func_opt_split 9878e120bd27Smrgfunc_opt_split () 9879e120bd27Smrg{ 9880e120bd27Smrg func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` 9881e120bd27Smrg func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` 9882e120bd27Smrg} 98836c321187Smrg 9884e120bd27Smrg# func_lo2o object 9885e120bd27Smrgfunc_lo2o () 9886e120bd27Smrg{ 9887e120bd27Smrg func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` 9888e120bd27Smrg} 98896c321187Smrg 9890e120bd27Smrg# func_xform libobj-or-source 9891e120bd27Smrgfunc_xform () 9892e120bd27Smrg{ 9893e120bd27Smrg func_xform_result=`$ECHO "${1}" | $SED 's/\.[[^.]]*$/.lo/'` 9894e120bd27Smrg} 98956c321187Smrg 9896e120bd27Smrg# func_arith arithmetic-term... 9897e120bd27Smrgfunc_arith () 9898e120bd27Smrg{ 9899e120bd27Smrg func_arith_result=`expr "$[@]"` 9900e120bd27Smrg} 99016c321187Smrg 9902e120bd27Smrg# func_len string 9903e120bd27Smrg# STRING may not start with a hyphen. 9904e120bd27Smrgfunc_len () 9905e120bd27Smrg{ 9906e120bd27Smrg func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` 9907e120bd27Smrg} 99086c321187Smrg 9909e120bd27Smrg_LT_EOF 9910e120bd27Smrgesac 99116c321187Smrg 9912e120bd27Smrgcase $lt_shell_append in 9913e120bd27Smrg yes) 9914e120bd27Smrg cat << \_LT_EOF >> "$cfgfile" 99156c321187Smrg 9916e120bd27Smrg# func_append var value 9917e120bd27Smrg# Append VALUE to the end of shell variable VAR. 9918e120bd27Smrgfunc_append () 9919e120bd27Smrg{ 9920e120bd27Smrg eval "$[1]+=\$[2]" 9921e120bd27Smrg} 9922e120bd27Smrg_LT_EOF 9923e120bd27Smrg ;; 9924e120bd27Smrg *) 9925e120bd27Smrg cat << \_LT_EOF >> "$cfgfile" 9926e120bd27Smrg 9927e120bd27Smrg# func_append var value 9928e120bd27Smrg# Append VALUE to the end of shell variable VAR. 9929e120bd27Smrgfunc_append () 9930e120bd27Smrg{ 9931e120bd27Smrg eval "$[1]=\$$[1]\$[2]" 9932e120bd27Smrg} 99336c321187Smrg 99346c321187Smrg_LT_EOF 9935e120bd27Smrg ;; 9936e120bd27Smrg esac 9937e120bd27Smrg]) 99386c321187Smrg 9939e120bd27Smrg# Helper functions for option handling. -*- Autoconf -*- 9940e120bd27Smrg# 9941e120bd27Smrg# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, 9942e120bd27Smrg# Inc. 9943e120bd27Smrg# Written by Gary V. Vaughan, 2004 9944e120bd27Smrg# 9945e120bd27Smrg# This file is free software; the Free Software Foundation gives 9946e120bd27Smrg# unlimited permission to copy and/or distribute it, with or without 9947e120bd27Smrg# modifications, as long as this notice is preserved. 99486c321187Smrg 9949e120bd27Smrg# serial 7 ltoptions.m4 99506c321187Smrg 9951e120bd27Smrg# This is to help aclocal find these macros, as it can't see m4_define. 9952e120bd27SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 99536c321187Smrg 99546c321187Smrg 9955e120bd27Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 9956e120bd27Smrg# ------------------------------------------ 9957e120bd27Smrgm4_define([_LT_MANGLE_OPTION], 9958e120bd27Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 99596c321187Smrg 99606c321187Smrg 9961e120bd27Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 9962e120bd27Smrg# --------------------------------------- 9963e120bd27Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 9964e120bd27Smrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 9965e120bd27Smrg# saved as a flag. 9966e120bd27Smrgm4_define([_LT_SET_OPTION], 9967e120bd27Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 9968e120bd27Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 9969e120bd27Smrg _LT_MANGLE_DEFUN([$1], [$2]), 9970e120bd27Smrg [m4_warning([Unknown $1 option `$2'])])[]dnl 9971e120bd27Smrg]) 99726c321187Smrg 99736c321187Smrg 9974e120bd27Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 9975e120bd27Smrg# ------------------------------------------------------------ 9976e120bd27Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 9977e120bd27Smrgm4_define([_LT_IF_OPTION], 9978e120bd27Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 9979e120bd27Smrg 9980e120bd27Smrg 9981e120bd27Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 9982e120bd27Smrg# ------------------------------------------------------- 9983e120bd27Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 9984e120bd27Smrg# are set. 9985e120bd27Smrgm4_define([_LT_UNLESS_OPTIONS], 9986e120bd27Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 9987e120bd27Smrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 9988e120bd27Smrg [m4_define([$0_found])])])[]dnl 9989e120bd27Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 9990e120bd27Smrg])[]dnl 9991e120bd27Smrg]) 99926c321187Smrg 99936c321187Smrg 9994e120bd27Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 9995e120bd27Smrg# ---------------------------------------- 9996e120bd27Smrg# OPTION-LIST is a space-separated list of Libtool options associated 9997e120bd27Smrg# with MACRO-NAME. If any OPTION has a matching handler declared with 9998e120bd27Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 9999e120bd27Smrg# the unknown option and exit. 10000e120bd27Smrgm4_defun([_LT_SET_OPTIONS], 10001e120bd27Smrg[# Set options 10002e120bd27Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 10003e120bd27Smrg [_LT_SET_OPTION([$1], _LT_Option)]) 10004e120bd27Smrg 10005e120bd27Smrgm4_if([$1],[LT_INIT],[ 10006e120bd27Smrg dnl 10007e120bd27Smrg dnl Simply set some default values (i.e off) if boolean options were not 10008e120bd27Smrg dnl specified: 10009e120bd27Smrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 10010e120bd27Smrg ]) 10011e120bd27Smrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 10012e120bd27Smrg ]) 10013e120bd27Smrg dnl 10014e120bd27Smrg dnl If no reference was made to various pairs of opposing options, then 10015e120bd27Smrg dnl we run the default mode handler for the pair. For example, if neither 10016e120bd27Smrg dnl `shared' nor `disable-shared' was passed, we enable building of shared 10017e120bd27Smrg dnl archives by default: 10018e120bd27Smrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 10019e120bd27Smrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 10020e120bd27Smrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 10021e120bd27Smrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 10022e120bd27Smrg [_LT_ENABLE_FAST_INSTALL]) 10023e120bd27Smrg ]) 10024e120bd27Smrg])# _LT_SET_OPTIONS 10025e120bd27Smrg 10026e120bd27Smrg 10027e120bd27Smrg 10028e120bd27Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 10029e120bd27Smrg# ----------------------------------------- 10030e120bd27Smrgm4_define([_LT_MANGLE_DEFUN], 10031e120bd27Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 100326c321187Smrg 100336c321187Smrg 10034e120bd27Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 10035e120bd27Smrg# ----------------------------------------------- 10036e120bd27Smrgm4_define([LT_OPTION_DEFINE], 10037e120bd27Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 10038e120bd27Smrg])# LT_OPTION_DEFINE 100396c321187Smrg 100406c321187Smrg 10041e120bd27Smrg# dlopen 10042e120bd27Smrg# ------ 10043e120bd27SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 10044e120bd27Smrg]) 100456c321187Smrg 10046e120bd27SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 10047e120bd27Smrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 10048e120bd27SmrgAC_DIAGNOSE([obsolete], 10049e120bd27Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 10050e120bd27Smrgput the `dlopen' option into LT_INIT's first parameter.]) 10051e120bd27Smrg]) 100526c321187Smrg 10053e120bd27Smrgdnl aclocal-1.4 backwards compatibility: 10054e120bd27Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 100556c321187Smrg 100566c321187Smrg 10057e120bd27Smrg# win32-dll 10058e120bd27Smrg# --------- 10059e120bd27Smrg# Declare package support for building win32 dll's. 10060e120bd27SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 10061e120bd27Smrg[enable_win32_dll=yes 100626c321187Smrg 10063e120bd27Smrgcase $host in 10064e120bd27Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 10065e120bd27Smrg AC_CHECK_TOOL(AS, as, false) 10066e120bd27Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 10067e120bd27Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 10068e120bd27Smrg ;; 10069e120bd27Smrgesac 100706c321187Smrg 10071e120bd27Smrgtest -z "$AS" && AS=as 10072e120bd27Smrg_LT_DECL([], [AS], [1], [Assembler program])dnl 100736c321187Smrg 10074e120bd27Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 10075e120bd27Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 100766c321187Smrg 10077e120bd27Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 10078e120bd27Smrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 10079e120bd27Smrg])# win32-dll 100806c321187Smrg 10081e120bd27SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 10082e120bd27Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 10083e120bd27Smrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 10084e120bd27SmrgAC_DIAGNOSE([obsolete], 10085e120bd27Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 10086e120bd27Smrgput the `win32-dll' option into LT_INIT's first parameter.]) 10087e120bd27Smrg]) 100886c321187Smrg 10089e120bd27Smrgdnl aclocal-1.4 backwards compatibility: 10090e120bd27Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 100916c321187Smrg 100926c321187Smrg 10093e120bd27Smrg# _LT_ENABLE_SHARED([DEFAULT]) 10094e120bd27Smrg# ---------------------------- 10095e120bd27Smrg# implement the --enable-shared flag, and supports the `shared' and 10096e120bd27Smrg# `disable-shared' LT_INIT options. 10097e120bd27Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 10098e120bd27Smrgm4_define([_LT_ENABLE_SHARED], 10099e120bd27Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 10100e120bd27SmrgAC_ARG_ENABLE([shared], 10101e120bd27Smrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 10102e120bd27Smrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 10103e120bd27Smrg [p=${PACKAGE-default} 10104e120bd27Smrg case $enableval in 10105e120bd27Smrg yes) enable_shared=yes ;; 10106e120bd27Smrg no) enable_shared=no ;; 10107e120bd27Smrg *) 10108e120bd27Smrg enable_shared=no 10109e120bd27Smrg # Look at the argument we got. We use all the common list separators. 10110e120bd27Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 10111e120bd27Smrg for pkg in $enableval; do 10112e120bd27Smrg IFS="$lt_save_ifs" 10113e120bd27Smrg if test "X$pkg" = "X$p"; then 10114e120bd27Smrg enable_shared=yes 10115e120bd27Smrg fi 10116e120bd27Smrg done 10117e120bd27Smrg IFS="$lt_save_ifs" 101186c321187Smrg ;; 10119e120bd27Smrg esac], 10120e120bd27Smrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 101216c321187Smrg 10122e120bd27Smrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 10123e120bd27Smrg [Whether or not to build shared libraries]) 10124e120bd27Smrg])# _LT_ENABLE_SHARED 101256c321187Smrg 10126e120bd27SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 10127e120bd27SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 101286c321187Smrg 10129e120bd27Smrg# Old names: 10130e120bd27SmrgAC_DEFUN([AC_ENABLE_SHARED], 10131e120bd27Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 10132e120bd27Smrg]) 101336c321187Smrg 10134e120bd27SmrgAC_DEFUN([AC_DISABLE_SHARED], 10135e120bd27Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 10136e120bd27Smrg]) 101376c321187Smrg 10138e120bd27SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 10139e120bd27SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 101406c321187Smrg 10141e120bd27Smrgdnl aclocal-1.4 backwards compatibility: 10142e120bd27Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 10143e120bd27Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 101446c321187Smrg 101456c321187Smrg 101466c321187Smrg 10147e120bd27Smrg# _LT_ENABLE_STATIC([DEFAULT]) 10148e120bd27Smrg# ---------------------------- 10149e120bd27Smrg# implement the --enable-static flag, and support the `static' and 10150e120bd27Smrg# `disable-static' LT_INIT options. 10151e120bd27Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 10152e120bd27Smrgm4_define([_LT_ENABLE_STATIC], 10153e120bd27Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 10154e120bd27SmrgAC_ARG_ENABLE([static], 10155e120bd27Smrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 10156e120bd27Smrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 10157e120bd27Smrg [p=${PACKAGE-default} 10158e120bd27Smrg case $enableval in 10159e120bd27Smrg yes) enable_static=yes ;; 10160e120bd27Smrg no) enable_static=no ;; 10161e120bd27Smrg *) 10162e120bd27Smrg enable_static=no 10163e120bd27Smrg # Look at the argument we got. We use all the common list separators. 10164e120bd27Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 10165e120bd27Smrg for pkg in $enableval; do 10166e120bd27Smrg IFS="$lt_save_ifs" 10167e120bd27Smrg if test "X$pkg" = "X$p"; then 10168e120bd27Smrg enable_static=yes 1016993493779Smrg fi 10170e120bd27Smrg done 10171e120bd27Smrg IFS="$lt_save_ifs" 101726c321187Smrg ;; 10173e120bd27Smrg esac], 10174e120bd27Smrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 101756c321187Smrg 10176e120bd27Smrg _LT_DECL([build_old_libs], [enable_static], [0], 10177e120bd27Smrg [Whether or not to build static libraries]) 10178e120bd27Smrg])# _LT_ENABLE_STATIC 101796c321187Smrg 10180e120bd27SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 10181e120bd27SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 101826c321187Smrg 10183e120bd27Smrg# Old names: 10184e120bd27SmrgAC_DEFUN([AC_ENABLE_STATIC], 10185e120bd27Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 10186e120bd27Smrg]) 101876c321187Smrg 10188e120bd27SmrgAC_DEFUN([AC_DISABLE_STATIC], 10189e120bd27Smrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 10190e120bd27Smrg]) 101916c321187Smrg 10192e120bd27SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 10193e120bd27SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 101946c321187Smrg 10195e120bd27Smrgdnl aclocal-1.4 backwards compatibility: 10196e120bd27Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 10197e120bd27Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 101986c321187Smrg 101996c321187Smrg 102006c321187Smrg 10201e120bd27Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 10202e120bd27Smrg# ---------------------------------- 10203e120bd27Smrg# implement the --enable-fast-install flag, and support the `fast-install' 10204e120bd27Smrg# and `disable-fast-install' LT_INIT options. 10205e120bd27Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 10206e120bd27Smrgm4_define([_LT_ENABLE_FAST_INSTALL], 10207e120bd27Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 10208e120bd27SmrgAC_ARG_ENABLE([fast-install], 10209e120bd27Smrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 10210e120bd27Smrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 10211e120bd27Smrg [p=${PACKAGE-default} 10212e120bd27Smrg case $enableval in 10213e120bd27Smrg yes) enable_fast_install=yes ;; 10214e120bd27Smrg no) enable_fast_install=no ;; 10215e120bd27Smrg *) 10216e120bd27Smrg enable_fast_install=no 10217e120bd27Smrg # Look at the argument we got. We use all the common list separators. 10218e120bd27Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 10219e120bd27Smrg for pkg in $enableval; do 10220e120bd27Smrg IFS="$lt_save_ifs" 10221e120bd27Smrg if test "X$pkg" = "X$p"; then 10222e120bd27Smrg enable_fast_install=yes 10223e120bd27Smrg fi 10224e120bd27Smrg done 10225e120bd27Smrg IFS="$lt_save_ifs" 102266c321187Smrg ;; 10227e120bd27Smrg esac], 10228e120bd27Smrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 102296c321187Smrg 10230e120bd27Smrg_LT_DECL([fast_install], [enable_fast_install], [0], 10231e120bd27Smrg [Whether or not to optimize for fast installation])dnl 10232e120bd27Smrg])# _LT_ENABLE_FAST_INSTALL 102336c321187Smrg 10234e120bd27SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 10235e120bd27SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 102366c321187Smrg 10237e120bd27Smrg# Old names: 10238e120bd27SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 10239e120bd27Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 10240e120bd27SmrgAC_DIAGNOSE([obsolete], 10241e120bd27Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 10242e120bd27Smrgthe `fast-install' option into LT_INIT's first parameter.]) 10243e120bd27Smrg]) 102446c321187Smrg 10245e120bd27SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 10246e120bd27Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 10247e120bd27SmrgAC_DIAGNOSE([obsolete], 10248e120bd27Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 10249e120bd27Smrgthe `disable-fast-install' option into LT_INIT's first parameter.]) 10250e120bd27Smrg]) 102516c321187Smrg 10252e120bd27Smrgdnl aclocal-1.4 backwards compatibility: 10253e120bd27Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 10254e120bd27Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 102556c321187Smrg 102566c321187Smrg 10257e120bd27Smrg# _LT_WITH_PIC([MODE]) 10258e120bd27Smrg# -------------------- 10259e120bd27Smrg# implement the --with-pic flag, and support the `pic-only' and `no-pic' 10260e120bd27Smrg# LT_INIT options. 10261e120bd27Smrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 10262e120bd27Smrgm4_define([_LT_WITH_PIC], 10263e120bd27Smrg[AC_ARG_WITH([pic], 10264e120bd27Smrg [AS_HELP_STRING([--with-pic], 10265e120bd27Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 10266e120bd27Smrg [pic_mode="$withval"], 10267e120bd27Smrg [pic_mode=default]) 102686c321187Smrg 10269e120bd27Smrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 102706c321187Smrg 10271e120bd27Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 10272e120bd27Smrg])# _LT_WITH_PIC 102736c321187Smrg 10274e120bd27SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 10275e120bd27SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 102766c321187Smrg 10277e120bd27Smrg# Old name: 10278e120bd27SmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 10279e120bd27Smrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 10280e120bd27SmrgAC_DIAGNOSE([obsolete], 10281e120bd27Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 10282e120bd27Smrgput the `pic-only' option into LT_INIT's first parameter.]) 10283e120bd27Smrg]) 1028493493779Smrg 10285e120bd27Smrgdnl aclocal-1.4 backwards compatibility: 10286e120bd27Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 1028793493779Smrg 1028893493779Smrg 10289e120bd27Smrgm4_define([_LTDL_MODE], []) 10290e120bd27SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 10291e120bd27Smrg [m4_define([_LTDL_MODE], [nonrecursive])]) 10292e120bd27SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 10293e120bd27Smrg [m4_define([_LTDL_MODE], [recursive])]) 10294e120bd27SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 10295e120bd27Smrg [m4_define([_LTDL_MODE], [subproject])]) 1029693493779Smrg 10297e120bd27Smrgm4_define([_LTDL_TYPE], []) 10298e120bd27SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 10299e120bd27Smrg [m4_define([_LTDL_TYPE], [installable])]) 10300e120bd27SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 10301e120bd27Smrg [m4_define([_LTDL_TYPE], [convenience])]) 103026c321187Smrg 10303e120bd27Smrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 103046c321187Smrg# 10305e120bd27Smrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 10306e120bd27Smrg# Written by Gary V. Vaughan, 2004 103076c321187Smrg# 10308e120bd27Smrg# This file is free software; the Free Software Foundation gives 10309e120bd27Smrg# unlimited permission to copy and/or distribute it, with or without 10310e120bd27Smrg# modifications, as long as this notice is preserved. 103116c321187Smrg 10312e120bd27Smrg# serial 6 ltsugar.m4 103136c321187Smrg 10314e120bd27Smrg# This is to help aclocal find these macros, as it can't see m4_define. 10315e120bd27SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 10316e120bd27Smrg 10317e120bd27Smrg 10318e120bd27Smrg# lt_join(SEP, ARG1, [ARG2...]) 10319e120bd27Smrg# ----------------------------- 10320e120bd27Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 10321e120bd27Smrg# associated separator. 10322e120bd27Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 10323e120bd27Smrg# versions in m4sugar had bugs. 10324e120bd27Smrgm4_define([lt_join], 10325e120bd27Smrg[m4_if([$#], [1], [], 10326e120bd27Smrg [$#], [2], [[$2]], 10327e120bd27Smrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 10328e120bd27Smrgm4_define([_lt_join], 10329e120bd27Smrg[m4_if([$#$2], [2], [], 10330e120bd27Smrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 10331e120bd27Smrg 10332e120bd27Smrg 10333e120bd27Smrg# lt_car(LIST) 10334e120bd27Smrg# lt_cdr(LIST) 10335e120bd27Smrg# ------------ 10336e120bd27Smrg# Manipulate m4 lists. 10337e120bd27Smrg# These macros are necessary as long as will still need to support 10338e120bd27Smrg# Autoconf-2.59 which quotes differently. 10339e120bd27Smrgm4_define([lt_car], [[$1]]) 10340e120bd27Smrgm4_define([lt_cdr], 10341e120bd27Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 10342e120bd27Smrg [$#], 1, [], 10343e120bd27Smrg [m4_dquote(m4_shift($@))])]) 10344e120bd27Smrgm4_define([lt_unquote], $1) 10345e120bd27Smrg 10346e120bd27Smrg 10347e120bd27Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 10348e120bd27Smrg# ------------------------------------------ 10349e120bd27Smrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 10350e120bd27Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 10351e120bd27Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 10352e120bd27Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 10353e120bd27Smrg# than defined and empty). 103546c321187Smrg# 10355e120bd27Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 10356e120bd27Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 10357e120bd27Smrgm4_define([lt_append], 10358e120bd27Smrg[m4_define([$1], 10359e120bd27Smrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 10360e120bd27Smrg 10361e120bd27Smrg 10362e120bd27Smrg 10363e120bd27Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 10364e120bd27Smrg# ---------------------------------------------------------- 10365e120bd27Smrg# Produce a SEP delimited list of all paired combinations of elements of 10366e120bd27Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 10367e120bd27Smrg# has the form PREFIXmINFIXSUFFIXn. 10368e120bd27Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 10369e120bd27Smrgm4_define([lt_combine], 10370e120bd27Smrg[m4_if(m4_eval([$# > 3]), [1], 10371e120bd27Smrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 10372e120bd27Smrg[[m4_foreach([_Lt_prefix], [$2], 10373e120bd27Smrg [m4_foreach([_Lt_suffix], 10374e120bd27Smrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 10375e120bd27Smrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 10376e120bd27Smrg 10377e120bd27Smrg 10378e120bd27Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 10379e120bd27Smrg# ----------------------------------------------------------------------- 10380e120bd27Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 10381e120bd27Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 10382e120bd27Smrgm4_define([lt_if_append_uniq], 10383e120bd27Smrg[m4_ifdef([$1], 10384e120bd27Smrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 10385e120bd27Smrg [lt_append([$1], [$2], [$3])$4], 10386e120bd27Smrg [$5])], 10387e120bd27Smrg [lt_append([$1], [$2], [$3])$4])]) 10388e120bd27Smrg 10389e120bd27Smrg 10390e120bd27Smrg# lt_dict_add(DICT, KEY, VALUE) 10391e120bd27Smrg# ----------------------------- 10392e120bd27Smrgm4_define([lt_dict_add], 10393e120bd27Smrg[m4_define([$1($2)], [$3])]) 103946c321187Smrg 103956c321187Smrg 10396e120bd27Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 10397e120bd27Smrg# -------------------------------------------- 10398e120bd27Smrgm4_define([lt_dict_add_subkey], 10399e120bd27Smrg[m4_define([$1($2:$3)], [$4])]) 104006c321187Smrg 1040193493779Smrg 10402e120bd27Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 10403e120bd27Smrg# ---------------------------------- 10404e120bd27Smrgm4_define([lt_dict_fetch], 10405e120bd27Smrg[m4_ifval([$3], 10406e120bd27Smrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 10407e120bd27Smrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 1040893493779Smrg 104096c321187Smrg 10410e120bd27Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 10411e120bd27Smrg# ----------------------------------------------------------------- 10412e120bd27Smrgm4_define([lt_if_dict_fetch], 10413e120bd27Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 10414e120bd27Smrg [$5], 10415e120bd27Smrg [$6])]) 104166c321187Smrg 104176c321187Smrg 10418e120bd27Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 10419e120bd27Smrg# -------------------------------------------------------------- 10420e120bd27Smrgm4_define([lt_dict_filter], 10421e120bd27Smrg[m4_if([$5], [], [], 10422e120bd27Smrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 10423e120bd27Smrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 10424e120bd27Smrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 10425e120bd27Smrg]) 1042693493779Smrg 10427e120bd27Smrg# ltversion.m4 -- version numbers -*- Autoconf -*- 10428e120bd27Smrg# 10429e120bd27Smrg# Copyright (C) 2004 Free Software Foundation, Inc. 10430e120bd27Smrg# Written by Scott James Remnant, 2004 10431e120bd27Smrg# 10432e120bd27Smrg# This file is free software; the Free Software Foundation gives 10433e120bd27Smrg# unlimited permission to copy and/or distribute it, with or without 10434e120bd27Smrg# modifications, as long as this notice is preserved. 104356c321187Smrg 10436e120bd27Smrg# Generated from ltversion.in. 1043793493779Smrg 10438e120bd27Smrg# serial 3175 ltversion.m4 10439e120bd27Smrg# This file is part of GNU Libtool 1044093493779Smrg 10441e120bd27Smrgm4_define([LT_PACKAGE_VERSION], [2.2.10]) 10442e120bd27Smrgm4_define([LT_PACKAGE_REVISION], [1.3175]) 104436c321187Smrg 10444e120bd27SmrgAC_DEFUN([LTVERSION_VERSION], 10445e120bd27Smrg[macro_version='2.2.10' 10446e120bd27Smrgmacro_revision='1.3175' 10447e120bd27Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 10448e120bd27Smrg_LT_DECL(, macro_revision, 0) 10449e120bd27Smrg]) 104506c321187Smrg 10451e120bd27Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 10452e120bd27Smrg# 10453e120bd27Smrg# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. 10454e120bd27Smrg# Written by Scott James Remnant, 2004. 10455e120bd27Smrg# 10456e120bd27Smrg# This file is free software; the Free Software Foundation gives 10457e120bd27Smrg# unlimited permission to copy and/or distribute it, with or without 10458e120bd27Smrg# modifications, as long as this notice is preserved. 104596c321187Smrg 10460e120bd27Smrg# serial 5 lt~obsolete.m4 10461e120bd27Smrg 10462e120bd27Smrg# These exist entirely to fool aclocal when bootstrapping libtool. 10463e120bd27Smrg# 10464e120bd27Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 10465e120bd27Smrg# which have later been changed to m4_define as they aren't part of the 10466e120bd27Smrg# exported API, or moved to Autoconf or Automake where they belong. 10467e120bd27Smrg# 10468e120bd27Smrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 10469e120bd27Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 10470e120bd27Smrg# using a macro with the same name in our local m4/libtool.m4 it'll 10471e120bd27Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 10472e120bd27Smrg# and doesn't know about Autoconf macros at all.) 10473e120bd27Smrg# 10474e120bd27Smrg# So we provide this file, which has a silly filename so it's always 10475e120bd27Smrg# included after everything else. This provides aclocal with the 10476e120bd27Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 10477e120bd27Smrg# because those macros already exist, or will be overwritten later. 10478e120bd27Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 10479e120bd27Smrg# 10480e120bd27Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 10481e120bd27Smrg# Yes, that means every name once taken will need to remain here until 10482e120bd27Smrg# we give up compatibility with versions before 1.7, at which point 10483e120bd27Smrg# we need to keep only those names which we still refer to. 10484e120bd27Smrg 10485e120bd27Smrg# This is to help aclocal find these macros, as it can't see m4_define. 10486e120bd27SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 10487e120bd27Smrg 10488e120bd27Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 10489e120bd27Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 10490e120bd27Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 10491e120bd27Smrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 10492e120bd27Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 10493e120bd27Smrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 10494e120bd27Smrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 10495e120bd27Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 10496e120bd27Smrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 10497e120bd27Smrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 10498e120bd27Smrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 10499e120bd27Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 10500e120bd27Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 10501e120bd27Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 10502e120bd27Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 10503e120bd27Smrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 10504e120bd27Smrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 10505e120bd27Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 10506e120bd27Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 10507e120bd27Smrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 10508e120bd27Smrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 10509e120bd27Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 10510e120bd27Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 10511e120bd27Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 10512e120bd27Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 10513e120bd27Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 10514e120bd27Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 10515e120bd27Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 10516e120bd27Smrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 10517e120bd27Smrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 10518e120bd27Smrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 10519e120bd27Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 10520e120bd27Smrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 10521e120bd27Smrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 10522e120bd27Smrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 10523e120bd27Smrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 10524e120bd27Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 10525e120bd27Smrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 10526e120bd27Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 10527e120bd27Smrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 10528e120bd27Smrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 10529e120bd27Smrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 10530e120bd27Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 10531e120bd27Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 10532e120bd27Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 10533e120bd27Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 10534e120bd27Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 10535e120bd27Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 10536e120bd27Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 10537e120bd27Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 10538e120bd27Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 10539e120bd27Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 10540e120bd27Smrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 10541e120bd27Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 10542e120bd27Smrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 10543e120bd27Smrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 10544e120bd27Smrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 10545e120bd27Smrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 10546e120bd27Smrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 10547e120bd27Smrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 10548e120bd27Smrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 105496c321187Smrg 10550