aclocal.m4 revision 93493779
193493779Smrg# generated automatically by aclocal 1.11 -*- 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 1693493779Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],, 1793493779Smrg[m4_warning([this file was generated for autoconf 2.63. 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. 3793493779Smrgm4_if([$1], [1.11], [], 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], 5393493779Smrg[AM_AUTOMAKE_VERSION([1.11])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 10336c321187Smrgdnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. 10346c321187Smrgdnl 10356c321187Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 10366c321187Smrgdnl copy of this software and associated documentation files (the 10376c321187Smrgdnl "Software"), to deal in the Software without restriction, including 10386c321187Smrgdnl without limitation the rights to use, copy, modify, merge, publish, 10396c321187Smrgdnl distribute, and/or sell copies of the Software, and to permit persons 10406c321187Smrgdnl to whom the Software is furnished to do so, provided that the above 10416c321187Smrgdnl copyright notice(s) and this permission notice appear in all copies of 10426c321187Smrgdnl the Software and that both the above copyright notice(s) and this 10436c321187Smrgdnl permission notice appear in supporting documentation. 10446c321187Smrgdnl 10456c321187Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 10466c321187Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 10476c321187Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 10486c321187Smrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 10496c321187Smrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL 10506c321187Smrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING 10516c321187Smrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 10526c321187Smrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 10536c321187Smrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 10546c321187Smrgdnl 10556c321187Smrgdnl Except as contained in this notice, the name of a copyright holder 10566c321187Smrgdnl shall not be used in advertising or otherwise to promote the sale, use 10576c321187Smrgdnl or other dealings in this Software without prior written authorization 10586c321187Smrgdnl of the copyright holder. 10596c321187Smrg 10606c321187Smrg# XORG_MACROS_VERSION(required-version) 10616c321187Smrg# ------------------------------------- 10626c321187Smrg# Minimum version: 1.1.0 10636c321187Smrg# 10646c321187Smrg# If you're using a macro added in Version 1.1 or newer, include this in 10656c321187Smrg# your configure.ac with the minimum required version, such as: 10666c321187Smrg# XORG_MACROS_VERSION(1.1) 10676c321187Smrg# 106893493779Smrg# To ensure that this macro is defined, also add: 106993493779Smrg# m4_ifndef([XORG_MACROS_VERSION], 107093493779Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 10716c321187Smrg# 10726c321187Smrg# 10736c321187Smrg# See the "minimum version" comment for each macro you use to see what 10746c321187Smrg# version you require. 107593493779Smrgm4_defun([XORG_MACROS_VERSION],[ 107693493779Smrgm4_define([vers_have], [1.3.0]) 107793493779Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 107893493779Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 107993493779Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 108093493779Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 108193493779Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 108293493779Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 108393493779Smrgm4_undefine([vers_have]) 108493493779Smrgm4_undefine([maj_have]) 108593493779Smrgm4_undefine([maj_needed]) 10866c321187Smrg]) # XORG_MACROS_VERSION 10876c321187Smrg 10886c321187Smrg# XORG_PROG_RAWCPP() 10896c321187Smrg# ------------------ 10906c321187Smrg# Minimum version: 1.0.0 10916c321187Smrg# 10926c321187Smrg# Find cpp program and necessary flags for use in pre-processing text files 10936c321187Smrg# such as man pages and config files 10946c321187SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 10956c321187SmrgAC_REQUIRE([AC_PROG_CPP]) 10966c321187SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 10976c321187Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 10986c321187Smrg 10996c321187Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 11006c321187Smrg# which is not the best choice for supporting other OS'es, but covers most 11016c321187Smrg# of the ones we need for now. 11026c321187SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 11036c321187SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 11046c321187Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 11056c321187Smrg AC_MSG_RESULT([no]) 11066c321187Smrgelse 11076c321187Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 11086c321187Smrg RAWCPPFLAGS=-undef 11096c321187Smrg AC_MSG_RESULT([yes]) 111093493779Smrg # under Cygwin unix is still defined even with -undef 111193493779Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 111293493779Smrg RAWCPPFLAGS="-undef -ansi" 111393493779Smrg AC_MSG_RESULT([yes, with -ansi]) 11146c321187Smrg else 11156c321187Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 11166c321187Smrg fi 11176c321187Smrgfi 11186c321187Smrgrm -f conftest.$ac_ext 11196c321187Smrg 11206c321187SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 11216c321187SmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 11226c321187Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 11236c321187Smrg AC_MSG_RESULT([no]) 11246c321187Smrgelse 11256c321187Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 11266c321187Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 11276c321187Smrg AC_MSG_RESULT([yes]) 11286c321187Smrg else 11296c321187Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 11306c321187Smrg fi 11316c321187Smrgfi 11326c321187Smrgrm -f conftest.$ac_ext 11336c321187SmrgAC_SUBST(RAWCPPFLAGS) 11346c321187Smrg]) # XORG_PROG_RAWCPP 11356c321187Smrg 11366c321187Smrg# XORG_MANPAGE_SECTIONS() 11376c321187Smrg# ----------------------- 11386c321187Smrg# Minimum version: 1.0.0 11396c321187Smrg# 11406c321187Smrg# Determine which sections man pages go in for the different man page types 11416c321187Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 11426c321187Smrg# Not sure if there's any better way than just hardcoding by OS name. 11436c321187Smrg# Override default settings by setting environment variables 11446c321187Smrg 11456c321187SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 11466c321187SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 11476c321187Smrg 11486c321187Smrgif test x$APP_MAN_SUFFIX = x ; then 11496c321187Smrg APP_MAN_SUFFIX=1 11506c321187Smrgfi 11516c321187Smrgif test x$APP_MAN_DIR = x ; then 11526c321187Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 11536c321187Smrgfi 11546c321187Smrg 11556c321187Smrgif test x$LIB_MAN_SUFFIX = x ; then 11566c321187Smrg LIB_MAN_SUFFIX=3 11576c321187Smrgfi 11586c321187Smrgif test x$LIB_MAN_DIR = x ; then 11596c321187Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 11606c321187Smrgfi 11616c321187Smrg 11626c321187Smrgif test x$FILE_MAN_SUFFIX = x ; then 11636c321187Smrg case $host_os in 11646c321187Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 11656c321187Smrg *) FILE_MAN_SUFFIX=5 ;; 11666c321187Smrg esac 11676c321187Smrgfi 11686c321187Smrgif test x$FILE_MAN_DIR = x ; then 11696c321187Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 11706c321187Smrgfi 11716c321187Smrg 11726c321187Smrgif test x$MISC_MAN_SUFFIX = x ; then 11736c321187Smrg case $host_os in 11746c321187Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 11756c321187Smrg *) MISC_MAN_SUFFIX=7 ;; 11766c321187Smrg esac 11776c321187Smrgfi 11786c321187Smrgif test x$MISC_MAN_DIR = x ; then 11796c321187Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 11806c321187Smrgfi 11816c321187Smrg 11826c321187Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 11836c321187Smrg case $host_os in 11846c321187Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 11856c321187Smrg *) DRIVER_MAN_SUFFIX=4 ;; 11866c321187Smrg esac 11876c321187Smrgfi 11886c321187Smrgif test x$DRIVER_MAN_DIR = x ; then 11896c321187Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 11906c321187Smrgfi 11916c321187Smrg 11926c321187Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 11936c321187Smrg case $host_os in 11946c321187Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 11956c321187Smrg *) ADMIN_MAN_SUFFIX=8 ;; 11966c321187Smrg esac 11976c321187Smrgfi 11986c321187Smrgif test x$ADMIN_MAN_DIR = x ; then 11996c321187Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 12006c321187Smrgfi 12016c321187Smrg 12026c321187Smrg 12036c321187SmrgAC_SUBST([APP_MAN_SUFFIX]) 12046c321187SmrgAC_SUBST([LIB_MAN_SUFFIX]) 12056c321187SmrgAC_SUBST([FILE_MAN_SUFFIX]) 12066c321187SmrgAC_SUBST([MISC_MAN_SUFFIX]) 12076c321187SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 12086c321187SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 12096c321187SmrgAC_SUBST([APP_MAN_DIR]) 12106c321187SmrgAC_SUBST([LIB_MAN_DIR]) 12116c321187SmrgAC_SUBST([FILE_MAN_DIR]) 12126c321187SmrgAC_SUBST([MISC_MAN_DIR]) 12136c321187SmrgAC_SUBST([DRIVER_MAN_DIR]) 12146c321187SmrgAC_SUBST([ADMIN_MAN_DIR]) 12156c321187Smrg]) # XORG_MANPAGE_SECTIONS 12166c321187Smrg 12176c321187Smrg# XORG_CHECK_LINUXDOC 12186c321187Smrg# ------------------- 12196c321187Smrg# Minimum version: 1.0.0 12206c321187Smrg# 12216c321187Smrg# Defines the variable MAKE_TEXT if the necessary tools and 12226c321187Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 12236c321187Smrg# Whether or not the necessary tools and files are found can be checked 12246c321187Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 12256c321187SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 122693493779Smrgif test x$XORG_SGML_PATH = x ; then 122793493779Smrg XORG_SGML_PATH=$prefix/share/sgml 122893493779Smrgfi 12296c321187SmrgHAVE_DEFS_ENT= 12306c321187Smrg 12316c321187Smrgif test x"$cross_compiling" = x"yes" ; then 12326c321187Smrg HAVE_DEFS_ENT=no 12336c321187Smrgelse 12346c321187Smrg AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 12356c321187Smrgfi 12366c321187Smrg 12376c321187SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 12386c321187SmrgAC_PATH_PROG(PS2PDF, ps2pdf) 12396c321187Smrg 12406c321187SmrgAC_MSG_CHECKING([Whether to build documentation]) 12416c321187Smrg 12426c321187Smrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then 12436c321187Smrg BUILDDOC=yes 12446c321187Smrgelse 12456c321187Smrg BUILDDOC=no 12466c321187Smrgfi 12476c321187Smrg 12486c321187SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 12496c321187Smrg 12506c321187SmrgAC_MSG_RESULT([$BUILDDOC]) 12516c321187Smrg 12526c321187SmrgAC_MSG_CHECKING([Whether to build pdf documentation]) 12536c321187Smrg 12546c321187Smrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then 12556c321187Smrg BUILDPDFDOC=yes 12566c321187Smrgelse 12576c321187Smrg BUILDPDFDOC=no 12586c321187Smrgfi 12596c321187Smrg 12606c321187SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 12616c321187Smrg 12626c321187SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 12636c321187Smrg 12646c321187SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" 12656c321187SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 12666c321187SmrgMAKE_PDF="$PS2PDF" 12676c321187SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 12686c321187Smrg 12696c321187SmrgAC_SUBST(MAKE_TEXT) 12706c321187SmrgAC_SUBST(MAKE_PS) 12716c321187SmrgAC_SUBST(MAKE_PDF) 12726c321187SmrgAC_SUBST(MAKE_HTML) 12736c321187Smrg]) # XORG_CHECK_LINUXDOC 12746c321187Smrg 12756c321187Smrg# XORG_CHECK_DOCBOOK 12766c321187Smrg# ------------------- 12776c321187Smrg# Minimum version: 1.0.0 12786c321187Smrg# 12796c321187Smrg# Checks for the ability to build output formats from SGML DocBook source. 12806c321187Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 12816c321187Smrg# indicates whether the necessary tools and files are found and, if set, 12826c321187Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 12836c321187SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 128493493779Smrgif test x$XORG_SGML_PATH = x ; then 128593493779Smrg XORG_SGML_PATH=$prefix/share/sgml 128693493779Smrgfi 12876c321187SmrgHAVE_DEFS_ENT= 12886c321187SmrgBUILDTXTDOC=no 12896c321187SmrgBUILDPDFDOC=no 12906c321187SmrgBUILDPSDOC=no 12916c321187SmrgBUILDHTMLDOC=no 12926c321187Smrg 12936c321187SmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 12946c321187Smrg 12956c321187SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 12966c321187SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 12976c321187SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 12986c321187SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 12996c321187Smrg 13006c321187SmrgAC_MSG_CHECKING([Whether to build text documentation]) 13016c321187Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x && 13026c321187Smrg test x$BUILD_TXTDOC != xno; then 13036c321187Smrg BUILDTXTDOC=yes 13046c321187Smrgfi 13056c321187SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 13066c321187SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 13076c321187Smrg 13086c321187SmrgAC_MSG_CHECKING([Whether to build PDF documentation]) 13096c321187Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x && 13106c321187Smrg test x$BUILD_PDFDOC != xno; then 13116c321187Smrg BUILDPDFDOC=yes 13126c321187Smrgfi 13136c321187SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 13146c321187SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 13156c321187Smrg 13166c321187SmrgAC_MSG_CHECKING([Whether to build PostScript documentation]) 13176c321187Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x && 13186c321187Smrg test x$BUILD_PSDOC != xno; then 13196c321187Smrg BUILDPSDOC=yes 13206c321187Smrgfi 13216c321187SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 13226c321187SmrgAC_MSG_RESULT([$BUILDPSDOC]) 13236c321187Smrg 13246c321187SmrgAC_MSG_CHECKING([Whether to build HTML documentation]) 13256c321187Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x && 13266c321187Smrg test x$BUILD_HTMLDOC != xno; then 13276c321187Smrg BUILDHTMLDOC=yes 13286c321187Smrgfi 13296c321187SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 13306c321187SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 13316c321187Smrg 13326c321187SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 13336c321187SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 13346c321187SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 13356c321187SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 13366c321187Smrg 13376c321187SmrgAC_SUBST(MAKE_TEXT) 13386c321187SmrgAC_SUBST(MAKE_PS) 13396c321187SmrgAC_SUBST(MAKE_PDF) 13406c321187SmrgAC_SUBST(MAKE_HTML) 13416c321187Smrg]) # XORG_CHECK_DOCBOOK 13426c321187Smrg 13436c321187Smrg# XORG_CHECK_MALLOC_ZERO 13446c321187Smrg# ---------------------- 13456c321187Smrg# Minimum version: 1.0.0 13466c321187Smrg# 13476c321187Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 13486c321187Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 13496c321187Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 13506c321187SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 13516c321187SmrgAC_ARG_ENABLE(malloc0returnsnull, 135293493779Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 13536c321187Smrg [malloc(0) returns NULL (default: auto)]), 13546c321187Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 13556c321187Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 13566c321187Smrg 13576c321187SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 13586c321187Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 13596c321187Smrg AC_RUN_IFELSE([ 13606c321187Smrgchar *malloc(); 13616c321187Smrgchar *realloc(); 13626c321187Smrgchar *calloc(); 13636c321187Smrgmain() { 13646c321187Smrg char *m0, *r0, *c0, *p; 13656c321187Smrg m0 = malloc(0); 13666c321187Smrg p = malloc(10); 13676c321187Smrg r0 = realloc(p,0); 13686c321187Smrg c0 = calloc(0); 13696c321187Smrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 13706c321187Smrg}], 13716c321187Smrg [MALLOC_ZERO_RETURNS_NULL=yes], 13726c321187Smrg [MALLOC_ZERO_RETURNS_NULL=no]) 13736c321187Smrgfi 13746c321187SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 13756c321187Smrg 13766c321187Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 13776c321187Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 13786c321187Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 13796c321187Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 13806c321187Smrgelse 13816c321187Smrg MALLOC_ZERO_CFLAGS="" 13826c321187Smrg XMALLOC_ZERO_CFLAGS="" 13836c321187Smrg XTMALLOC_ZERO_CFLAGS="" 13846c321187Smrgfi 13856c321187Smrg 13866c321187SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 13876c321187SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 13886c321187SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 13896c321187Smrg]) # XORG_CHECK_MALLOC_ZERO 13906c321187Smrg 13916c321187Smrg# XORG_WITH_LINT() 13926c321187Smrg# ---------------- 13936c321187Smrg# Minimum version: 1.1.0 13946c321187Smrg# 13956c321187Smrg# Sets up flags for source checkers such as lint and sparse if --with-lint 13966c321187Smrg# is specified. (Use --with-lint=sparse for sparse.) 13976c321187Smrg# Sets $LINT to name of source checker passed with --with-lint (default: lint) 13986c321187Smrg# Sets $LINT_FLAGS to flags to pass to source checker 13996c321187Smrg# Sets LINT automake conditional if enabled (default: disabled) 14006c321187Smrg# 14016c321187SmrgAC_DEFUN([XORG_WITH_LINT],[ 14026c321187Smrg 14036c321187Smrg# Allow checking code with lint, sparse, etc. 140493493779SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 14056c321187Smrg [Use a lint-style source code checker (default: disabled)])], 14066c321187Smrg [use_lint=$withval], [use_lint=no]) 14076c321187Smrgif test "x$use_lint" = "xyes" ; then 14086c321187Smrg LINT="lint" 14096c321187Smrgelse 14106c321187Smrg LINT="$use_lint" 14116c321187Smrgfi 14126c321187Smrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then 14136c321187Smrg case $LINT in 14146c321187Smrg lint|*/lint) 14156c321187Smrg case $host_os in 14166c321187Smrg solaris*) 14176c321187Smrg LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 14186c321187Smrg ;; 14196c321187Smrg esac 14206c321187Smrg ;; 14216c321187Smrg esac 14226c321187Smrgfi 14236c321187Smrg 14246c321187SmrgAC_SUBST(LINT) 14256c321187SmrgAC_SUBST(LINT_FLAGS) 14266c321187SmrgAM_CONDITIONAL(LINT, [test x$LINT != xno]) 14276c321187Smrg 14286c321187Smrg]) # XORG_WITH_LINT 14296c321187Smrg 14306c321187Smrg# XORG_LINT_LIBRARY(LIBNAME) 14316c321187Smrg# -------------------------- 14326c321187Smrg# Minimum version: 1.1.0 14336c321187Smrg# 14346c321187Smrg# Sets up flags for building lint libraries for checking programs that call 14356c321187Smrg# functions in the library. 14366c321187Smrg# Disabled by default, enable with --enable-lint-library 14376c321187Smrg# Sets: 14386c321187Smrg# @LINTLIB@ - name of lint library file to make 14396c321187Smrg# MAKE_LINT_LIB - automake conditional 14406c321187Smrg# 14416c321187Smrg 14426c321187SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 14436c321187SmrgAC_REQUIRE([XORG_WITH_LINT]) 14446c321187Smrg# Build lint "library" for more indepth checks of programs calling this library 144593493779SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 14466c321187Smrg [Create lint library (default: disabled)])], 14476c321187Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 14486c321187Smrgif test "x$make_lint_lib" != "xno" ; then 14496c321187Smrg if test "x$LINT" = "xno" ; then 14506c321187Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 14516c321187Smrg fi 14526c321187Smrg if test "x$make_lint_lib" = "xyes" ; then 14536c321187Smrg LINTLIB=llib-l$1.ln 14546c321187Smrg else 14556c321187Smrg LINTLIB=$make_lint_lib 14566c321187Smrg fi 14576c321187Smrgfi 14586c321187SmrgAC_SUBST(LINTLIB) 14596c321187SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 14606c321187Smrg 14616c321187Smrg]) # XORG_LINT_LIBRARY 14626c321187Smrg 146393493779Smrg# XORG_CWARNFLAGS 146493493779Smrg# --------------- 146593493779Smrg# Minimum version: 1.2.0 146693493779Smrg# 146793493779Smrg# Defines CWARNFLAGS to enable C compiler warnings. 146893493779Smrg# 146993493779SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 147093493779SmrgAC_REQUIRE([AC_PROG_CC]) 147193493779Smrgif test "x$GCC" = xyes ; then 147293493779Smrg CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ 147393493779Smrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ 147493493779Smrg-Wbad-function-cast" 147593493779Smrg case `$CC -dumpversion` in 147693493779Smrg 3.4.* | 4.*) 147793493779Smrg CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement" 147893493779Smrg ;; 147993493779Smrg esac 148093493779Smrgelse 148193493779Smrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 148293493779Smrg if test "x$SUNCC" = "xyes"; then 148393493779Smrg CWARNFLAGS="-v" 148493493779Smrg fi 148593493779Smrgfi 148693493779SmrgAC_SUBST(CWARNFLAGS) 148793493779Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) 148893493779Smrg]) # XORG_CWARNFLAGS 148993493779Smrg 149093493779Smrg# XORG_STRICT_OPTION 149193493779Smrg# ----------------------- 149293493779Smrg# Minimum version: 1.3.0 149393493779Smrg# 149493493779Smrg# Add configure option to enable strict compilation 149593493779SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 149693493779SmrgAC_REQUIRE([AC_PROG_CC]) 149793493779SmrgAC_REQUIRE([AC_PROG_CC_C99]) 149893493779SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 149993493779Smrg 150093493779SmrgAC_ARG_ENABLE(strict-compilation, 150193493779Smrg AS_HELP_STRING([--enable-strict-compilation], 150293493779Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 150393493779Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 150493493779Smrgif test "x$STRICT_COMPILE" = "xyes"; then 150593493779Smrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 150693493779Smrg AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 150793493779Smrg if test "x$GCC" = xyes ; then 150893493779Smrg STRICT_CFLAGS="-pedantic -Werror" 150993493779Smrg elif test "x$SUNCC" = "xyes"; then 151093493779Smrg STRICT_CFLAGS="-errwarn" 151193493779Smrg elif test "x$INTELCC" = "xyes"; then 151293493779Smrg STRICT_CFLAGS="-Werror" 151393493779Smrg fi 151493493779Smrgfi 151593493779SmrgCWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS" 151693493779SmrgAC_SUBST([CWARNFLAGS]) 151793493779Smrg]) # XORG_STRICT_OPTION 151893493779Smrg 151993493779Smrg# XORG_DEFAULT_OPTIONS 152093493779Smrg# -------------------- 152193493779Smrg# Minimum version: 1.3.0 152293493779Smrg# 152393493779Smrg# Defines default options for X.Org modules. 152493493779Smrg# 152593493779SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 152693493779SmrgXORG_CWARNFLAGS 152793493779SmrgXORG_STRICT_OPTION 152893493779SmrgXORG_RELEASE_VERSION 152993493779SmrgXORG_CHANGELOG 153093493779SmrgXORG_MANPAGE_SECTIONS 153193493779Smrg]) # XORG_DEFAULT_OPTIONS 15326c321187Smrgdnl Copyright 2005 Red Hat, Inc 15336c321187Smrgdnl 15346c321187Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 15356c321187Smrgdnl documentation for any purpose is hereby granted without fee, provided that 15366c321187Smrgdnl the above copyright notice appear in all copies and that both that 15376c321187Smrgdnl copyright notice and this permission notice appear in supporting 15386c321187Smrgdnl documentation. 15396c321187Smrgdnl 15406c321187Smrgdnl The above copyright notice and this permission notice shall be included 15416c321187Smrgdnl in all copies or substantial portions of the Software. 15426c321187Smrgdnl 15436c321187Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 15446c321187Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 15456c321187Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 15466c321187Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 15476c321187Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 15486c321187Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 15496c321187Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 15506c321187Smrgdnl 15516c321187Smrgdnl Except as contained in this notice, the name of the copyright holders shall 15526c321187Smrgdnl not be used in advertising or otherwise to promote the sale, use or 15536c321187Smrgdnl other dealings in this Software without prior written authorization 15546c321187Smrgdnl from the copyright holders. 15556c321187Smrgdnl 15566c321187Smrg 15576c321187Smrg# XORG_RELEASE_VERSION 15586c321187Smrg# -------------------- 15596c321187Smrg# Adds --with/without-release-string and changes the PACKAGE and 15606c321187Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If 15616c321187Smrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also 15626c321187Smrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 15636c321187Smrg 15646c321187SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 15656c321187Smrg AC_ARG_WITH(release-version, 156693493779Smrg AS_HELP_STRING([--with-release-version=STRING], 15676c321187Smrg [Use release version string in package name]), 15686c321187Smrg [RELEASE_VERSION="$withval"], 15696c321187Smrg [RELEASE_VERSION=""]) 15706c321187Smrg if test "x$RELEASE_VERSION" != "x"; then 15716c321187Smrg PACKAGE="$PACKAGE-$RELEASE_VERSION" 15726c321187Smrg PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" 15736c321187Smrg AC_MSG_NOTICE([Building with package name set to $PACKAGE]) 15746c321187Smrg fi 15756c321187Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 15766c321187Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 15776c321187Smrg [Major version of this package]) 157893493779Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 15796c321187Smrg if test "x$PVM" = "x"; then 15806c321187Smrg PVM="0" 15816c321187Smrg fi 15826c321187Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 15836c321187Smrg [$PVM], 15846c321187Smrg [Minor version of this package]) 158593493779Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 15866c321187Smrg if test "x$PVP" = "x"; then 15876c321187Smrg PVP="0" 15886c321187Smrg fi 15896c321187Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 15906c321187Smrg [$PVP], 15916c321187Smrg [Patch version of this package]) 15926c321187Smrg]) 15936c321187Smrg 159493493779Smrg# XORG_CHANGELOG() 159593493779Smrg# ---------------- 159693493779Smrg# Minimum version: 1.2.0 159793493779Smrg# 159893493779Smrg# Defines the variable CHANGELOG_CMD as the command to generate 159993493779Smrg# ChangeLog from git. 160093493779Smrg# 160193493779Smrg# Arrange that distcleancheck ignores ChangeLog left over by distclean. 160293493779Smrg# 160393493779SmrgAC_DEFUN([XORG_CHANGELOG], [ 160493493779SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \ 160593493779Smrgmv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \ 160693493779Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 160793493779SmrgAC_SUBST([CHANGELOG_CMD]) 160893493779SmrgAC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print']) 160993493779Smrg]) # XORG_CHANGELOG 161093493779Smrg 16116c321187Smrgdnl $XdotOrg: lib/xtrans/xtrans.m4,v 1.6 2005/07/26 18:59:11 alanc Exp $ 16126c321187Smrgdnl 16136c321187Smrgdnl Copyright 2005 Sun Microsystems, Inc. All rights reserved. 16146c321187Smrgdnl 16156c321187Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 16166c321187Smrgdnl documentation for any purpose is hereby granted without fee, provided that 16176c321187Smrgdnl the above copyright notice appear in all copies and that both that 16186c321187Smrgdnl copyright notice and this permission notice appear in supporting 16196c321187Smrgdnl documentation. 16206c321187Smrgdnl 16216c321187Smrgdnl The above copyright notice and this permission notice shall be included 16226c321187Smrgdnl in all copies or substantial portions of the Software. 16236c321187Smrgdnl 16246c321187Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16256c321187Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16266c321187Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 16276c321187Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 16286c321187Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 16296c321187Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 16306c321187Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 16316c321187Smrgdnl 16326c321187Smrgdnl Except as contained in this notice, the name of the copyright holders shall 16336c321187Smrgdnl not be used in advertising or otherwise to promote the sale, use or 16346c321187Smrgdnl other dealings in this Software without prior written authorization 16356c321187Smrgdnl from the copyright holders. 16366c321187Smrgdnl 16376c321187Smrg 16386c321187Smrg# XTRANS_TCP_FLAGS() 16396c321187Smrg# ------------------ 16406c321187Smrg# Find needed libraries for TCP sockets, and check for IPv6 support 16416c321187SmrgAC_DEFUN([XTRANS_TCP_FLAGS],[ 16426c321187Smrg # SVR4 hides these in libraries other than libc 16436c321187Smrg AC_SEARCH_LIBS(socket, [socket]) 16446c321187Smrg AC_SEARCH_LIBS(gethostbyname, [nsl]) 164593493779Smrg AC_HAVE_LIBRARY([ws2_32]) 16466c321187Smrg 16476c321187Smrg # Needs to come after above checks for libsocket & libnsl for SVR4 systems 16486c321187Smrg AC_ARG_ENABLE(ipv6, 164993493779Smrg AC_HELP_STRING([--enable-ipv6],[Enable IPv6 support]), 16506c321187Smrg [IPV6CONN=$enableval], 16516c321187Smrg [AC_CHECK_FUNC(getaddrinfo,[IPV6CONN=yes],[IPV6CONN=no])]) 16526c321187Smrg AC_MSG_CHECKING([if IPv6 support should be built]) 16536c321187Smrg if test "$IPV6CONN" = "yes"; then 16546c321187Smrg AC_DEFINE(IPv6,1,[Support IPv6 for TCP connections]) 16556c321187Smrg fi 16566c321187Smrg AC_MSG_RESULT($IPV6CONN) 16576c321187Smrg 16586c321187Smrg # 4.3BSD-Reno added a new member to struct sockaddr_in 16596c321187Smrg AC_CHECK_MEMBER([struct sockaddr_in.sin_len], 16606c321187Smrg AC_DEFINE([BSD44SOCKETS],1, 16616c321187Smrg [Define to 1 if `struct sockaddr_in' has a `sin_len' member]), [], [ 16626c321187Smrg#include <sys/types.h> 16636c321187Smrg#include <sys/socket.h> 16646c321187Smrg#include <netinet/in.h> 16656c321187Smrg ]) 166693493779Smrg 166793493779Smrg # POSIX.1g changed the type of pointer passed to getsockname/getpeername/etc. 166893493779Smrg AC_CHECK_TYPES([socklen_t], [], [], [ 166993493779SmrgAC_INCLUDES_DEFAULT 167093493779Smrg#include <sys/socket.h>]) 167193493779Smrg 16726c321187Smrg]) # XTRANS_TCP_FLAGS 16736c321187Smrg 16746c321187Smrg# XTRANS_CONNECTION_FLAGS() 16756c321187Smrg# ------------------------- 16766c321187Smrg# Standard checks for which Xtrans transports to use by the Xorg packages 16776c321187Smrg# that use Xtrans functions 16786c321187SmrgAC_DEFUN([XTRANS_CONNECTION_FLAGS],[ 16796c321187Smrg AC_REQUIRE([AC_CANONICAL_HOST]) 16806c321187Smrg AC_REQUIRE([AC_TYPE_SIGNAL]) 168193493779Smrg [case $host_os in 168293493779Smrg mingw*) unixdef="no" ;; 168393493779Smrg *) unixdef="yes" ;; 168493493779Smrg esac] 16856c321187Smrg AC_ARG_ENABLE(unix-transport, 16866c321187Smrg AC_HELP_STRING([--enable-unix-transport],[Enable UNIX domain socket transport]), 168793493779Smrg [UNIXCONN=$enableval], [UNIXCONN=$unixdef]) 16886c321187Smrg AC_MSG_CHECKING([if Xtrans should support UNIX socket connections]) 16896c321187Smrg if test "$UNIXCONN" = "yes"; then 16906c321187Smrg AC_DEFINE(UNIXCONN,1,[Support UNIX socket connections]) 16916c321187Smrg fi 16926c321187Smrg AC_MSG_RESULT($UNIXCONN) 169393493779Smrg AC_ARG_ENABLE(tcp-transport, 169493493779Smrg AC_HELP_STRING([--enable-tcp-transport],[Enable TCP socket transport]), 169593493779Smrg [TCPCONN=$enableval], [TCPCONN=yes]) 16966c321187Smrg AC_MSG_CHECKING([if Xtrans should support TCP socket connections]) 16976c321187Smrg AC_MSG_RESULT($TCPCONN) 16986c321187Smrg if test "$TCPCONN" = "yes"; then 16996c321187Smrg AC_DEFINE(TCPCONN,1,[Support TCP socket connections]) 17006c321187Smrg XTRANS_TCP_FLAGS 17016c321187Smrg fi 17026c321187Smrg [case $host_os in 17036c321187Smrg solaris*|sco*|sysv4*) localdef="yes" ;; 17046c321187Smrg *) localdef="no" ;; 17056c321187Smrg esac] 17066c321187Smrg AC_ARG_ENABLE(local-transport, 17076c321187Smrg AC_HELP_STRING([--enable-local-transport],[Enable os-specific local transport]), 17086c321187Smrg [LOCALCONN=$enableval], [LOCALCONN=$localdef]) 17096c321187Smrg AC_MSG_CHECKING([if Xtrans should support os-specific local connections]) 17106c321187Smrg AC_MSG_RESULT($LOCALCONN) 17116c321187Smrg if test "$LOCALCONN" = "yes"; then 17126c321187Smrg AC_DEFINE(LOCALCONN,1,[Support os-specific local connections]) 17136c321187Smrg fi 17146c321187Smrg 17156c321187Smrg]) # XTRANS_CONNECTION_FLAGS 17166c321187Smrg 17176c321187Smrg 17186c321187Smrg# XTRANS_SECURE_RPC_FLAGS() 17196c321187Smrg# ------------------------- 17206c321187Smrg# Check for Secure RPC functions - must come after XTRANS_TCP_FLAGS 17216c321187Smrg# so that any necessary networking libraries are already found 17226c321187SmrgAC_DEFUN([XTRANS_SECURE_RPC_FLAGS], 17236c321187Smrg[AC_REQUIRE([XTRANS_TCP_FLAGS]) 17246c321187Smrg AC_ARG_ENABLE(secure-rpc, 17256c321187Smrg AC_HELP_STRING([--enable-secure-rpc],[Enable Secure RPC]), 17266c321187Smrg [SECURE_RPC=$enableval], [SECURE_RPC="try"]) 17276c321187Smrg 17286c321187Smrg if test "x$SECURE_RPC" = "xyes" -o "x$SECURE_RPC" = "xtry" ; then 17296c321187Smrg FOUND_SECURE_RPC="no" 17306c321187Smrg AC_CHECK_FUNCS([authdes_seccreate authdes_create], 17316c321187Smrg [FOUND_SECURE_RPC="yes"]) 17326c321187Smrg if test "x$FOUND_SECURE_RPC" = "xno" ; then 17336c321187Smrg if test "x$SECURE_RPC" = "xyes" ; then 17346c321187Smrg AC_MSG_ERROR([Secure RPC requested, but required functions not found]) 17356c321187Smrg fi 17366c321187Smrg SECURE_RPC="no" 17376c321187Smrg else 17386c321187Smrg dnl FreeBSD keeps getsecretkey in librpcsvc 17396c321187Smrg AC_SEARCH_LIBS(getsecretkey, [rpcsvc]) 17406c321187Smrg SECURE_RPC="yes" 17416c321187Smrg fi 17426c321187Smrg fi 17436c321187Smrg AC_MSG_CHECKING([if Secure RPC authentication ("SUN-DES-1") should be supported]) 17446c321187Smrg if test "x$SECURE_RPC" = "xyes" ; then 17456c321187Smrg AC_DEFINE(SECURE_RPC, 1, [Support Secure RPC ("SUN-DES-1") authentication for X11 clients]) 17466c321187Smrg fi 17476c321187Smrg AC_MSG_RESULT($SECURE_RPC) 17486c321187Smrg]) # XTRANS_SECURE_RPC_FLAGS 17496c321187Smrg 17506c321187Smrg 17516c321187Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 17526c321187Smrg 175393493779Smrg# serial 52 AC_PROG_LIBTOOL 17546c321187Smrg 17556c321187Smrg 17566c321187Smrg# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) 17576c321187Smrg# ----------------------------------------------------------- 17586c321187Smrg# If this macro is not defined by Autoconf, define it here. 17596c321187Smrgm4_ifdef([AC_PROVIDE_IFELSE], 17606c321187Smrg [], 17616c321187Smrg [m4_define([AC_PROVIDE_IFELSE], 17626c321187Smrg [m4_ifdef([AC_PROVIDE_$1], 17636c321187Smrg [$2], [$3])])]) 17646c321187Smrg 17656c321187Smrg 17666c321187Smrg# AC_PROG_LIBTOOL 17676c321187Smrg# --------------- 17686c321187SmrgAC_DEFUN([AC_PROG_LIBTOOL], 17696c321187Smrg[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl 17706c321187Smrgdnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX 17716c321187Smrgdnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. 17726c321187Smrg AC_PROVIDE_IFELSE([AC_PROG_CXX], 17736c321187Smrg [AC_LIBTOOL_CXX], 17746c321187Smrg [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX 17756c321187Smrg ])]) 17766c321187Smrgdnl And a similar setup for Fortran 77 support 17776c321187Smrg AC_PROVIDE_IFELSE([AC_PROG_F77], 17786c321187Smrg [AC_LIBTOOL_F77], 17796c321187Smrg [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 17806c321187Smrg])]) 17816c321187Smrg 17826c321187Smrgdnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. 17836c321187Smrgdnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run 17846c321187Smrgdnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. 17856c321187Smrg AC_PROVIDE_IFELSE([AC_PROG_GCJ], 17866c321187Smrg [AC_LIBTOOL_GCJ], 17876c321187Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 17886c321187Smrg [AC_LIBTOOL_GCJ], 17896c321187Smrg [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], 17906c321187Smrg [AC_LIBTOOL_GCJ], 17916c321187Smrg [ifdef([AC_PROG_GCJ], 17926c321187Smrg [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 17936c321187Smrg ifdef([A][M_PROG_GCJ], 17946c321187Smrg [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 17956c321187Smrg ifdef([LT_AC_PROG_GCJ], 17966c321187Smrg [define([LT_AC_PROG_GCJ], 17976c321187Smrg defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) 17986c321187Smrg])])# AC_PROG_LIBTOOL 17996c321187Smrg 18006c321187Smrg 18016c321187Smrg# _AC_PROG_LIBTOOL 18026c321187Smrg# ---------------- 18036c321187SmrgAC_DEFUN([_AC_PROG_LIBTOOL], 18046c321187Smrg[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl 18056c321187SmrgAC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl 18066c321187SmrgAC_BEFORE([$0],[AC_LIBTOOL_F77])dnl 18076c321187SmrgAC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl 18086c321187Smrg 18096c321187Smrg# This can be used to rebuild libtool when needed 18106c321187SmrgLIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" 18116c321187Smrg 18126c321187Smrg# Always use our own libtool. 18136c321187SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 18146c321187SmrgAC_SUBST(LIBTOOL)dnl 18156c321187Smrg 18166c321187Smrg# Prevent multiple expansion 18176c321187Smrgdefine([AC_PROG_LIBTOOL], []) 18186c321187Smrg])# _AC_PROG_LIBTOOL 18196c321187Smrg 18206c321187Smrg 18216c321187Smrg# AC_LIBTOOL_SETUP 18226c321187Smrg# ---------------- 18236c321187SmrgAC_DEFUN([AC_LIBTOOL_SETUP], 18246c321187Smrg[AC_PREREQ(2.50)dnl 18256c321187SmrgAC_REQUIRE([AC_ENABLE_SHARED])dnl 18266c321187SmrgAC_REQUIRE([AC_ENABLE_STATIC])dnl 18276c321187SmrgAC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl 18286c321187SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 18296c321187SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 18306c321187SmrgAC_REQUIRE([AC_PROG_CC])dnl 18316c321187SmrgAC_REQUIRE([AC_PROG_LD])dnl 18326c321187SmrgAC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl 18336c321187SmrgAC_REQUIRE([AC_PROG_NM])dnl 18346c321187Smrg 18356c321187SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 18366c321187SmrgAC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl 18376c321187Smrg# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! 18386c321187SmrgAC_REQUIRE([AC_OBJEXT])dnl 18396c321187SmrgAC_REQUIRE([AC_EXEEXT])dnl 18406c321187Smrgdnl 18416c321187SmrgAC_LIBTOOL_SYS_MAX_CMD_LEN 18426c321187SmrgAC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 18436c321187SmrgAC_LIBTOOL_OBJDIR 18446c321187Smrg 18456c321187SmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 18466c321187Smrg_LT_AC_PROG_ECHO_BACKSLASH 18476c321187Smrg 18486c321187Smrgcase $host_os in 18496c321187Smrgaix3*) 18506c321187Smrg # AIX sometimes has problems with the GCC collect2 program. For some 18516c321187Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 18526c321187Smrg # vanish in a puff of smoke. 18536c321187Smrg if test "X${COLLECT_NAMES+set}" != Xset; then 18546c321187Smrg COLLECT_NAMES= 18556c321187Smrg export COLLECT_NAMES 18566c321187Smrg fi 18576c321187Smrg ;; 18586c321187Smrgesac 18596c321187Smrg 18606c321187Smrg# Sed substitution that helps us do robust quoting. It backslashifies 18616c321187Smrg# metacharacters that are still active within double-quoted strings. 18626c321187SmrgXsed='sed -e 1s/^X//' 18636c321187Smrg[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] 18646c321187Smrg 18656c321187Smrg# Same as above, but do not quote variable references. 18666c321187Smrg[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] 18676c321187Smrg 18686c321187Smrg# Sed substitution to delay expansion of an escaped shell variable in a 18696c321187Smrg# double_quote_subst'ed string. 18706c321187Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 18716c321187Smrg 18726c321187Smrg# Sed substitution to avoid accidental globbing in evaled expressions 18736c321187Smrgno_glob_subst='s/\*/\\\*/g' 18746c321187Smrg 18756c321187Smrg# Constants: 18766c321187Smrgrm="rm -f" 18776c321187Smrg 18786c321187Smrg# Global variables: 18796c321187Smrgdefault_ofile=libtool 18806c321187Smrgcan_build_shared=yes 18816c321187Smrg 18826c321187Smrg# All known linkers require a `.a' archive for static linking (except MSVC, 18836c321187Smrg# which needs '.lib'). 18846c321187Smrglibext=a 18856c321187Smrgltmain="$ac_aux_dir/ltmain.sh" 18866c321187Smrgofile="$default_ofile" 18876c321187Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 18886c321187Smrg 18896c321187SmrgAC_CHECK_TOOL(AR, ar, false) 18906c321187SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 18916c321187SmrgAC_CHECK_TOOL(STRIP, strip, :) 18926c321187Smrg 18936c321187Smrgold_CC="$CC" 18946c321187Smrgold_CFLAGS="$CFLAGS" 18956c321187Smrg 18966c321187Smrg# Set sane defaults for various variables 18976c321187Smrgtest -z "$AR" && AR=ar 18986c321187Smrgtest -z "$AR_FLAGS" && AR_FLAGS=cru 18996c321187Smrgtest -z "$AS" && AS=as 19006c321187Smrgtest -z "$CC" && CC=cc 19016c321187Smrgtest -z "$LTCC" && LTCC=$CC 19026c321187Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 19036c321187Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 19046c321187Smrgtest -z "$LD" && LD=ld 19056c321187Smrgtest -z "$LN_S" && LN_S="ln -s" 19066c321187Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 19076c321187Smrgtest -z "$NM" && NM=nm 19086c321187Smrgtest -z "$SED" && SED=sed 19096c321187Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 19106c321187Smrgtest -z "$RANLIB" && RANLIB=: 19116c321187Smrgtest -z "$STRIP" && STRIP=: 19126c321187Smrgtest -z "$ac_objext" && ac_objext=o 19136c321187Smrg 19146c321187Smrg# Determine commands to create old-style static archives. 191593493779Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 19166c321187Smrgold_postinstall_cmds='chmod 644 $oldlib' 19176c321187Smrgold_postuninstall_cmds= 19186c321187Smrg 19196c321187Smrgif test -n "$RANLIB"; then 19206c321187Smrg case $host_os in 19216c321187Smrg openbsd*) 19226c321187Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 19236c321187Smrg ;; 19246c321187Smrg *) 19256c321187Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 19266c321187Smrg ;; 19276c321187Smrg esac 19286c321187Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 19296c321187Smrgfi 19306c321187Smrg 19316c321187Smrg_LT_CC_BASENAME([$compiler]) 19326c321187Smrg 19336c321187Smrg# Only perform the check for file, if the check method requires it 19346c321187Smrgcase $deplibs_check_method in 19356c321187Smrgfile_magic*) 19366c321187Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 19376c321187Smrg AC_PATH_MAGIC 19386c321187Smrg fi 19396c321187Smrg ;; 19406c321187Smrgesac 19416c321187Smrg 194293493779Smrg_LT_REQUIRED_DARWIN_CHECKS 194393493779Smrg 19446c321187SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) 19456c321187SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 19466c321187Smrgenable_win32_dll=yes, enable_win32_dll=no) 19476c321187Smrg 19486c321187SmrgAC_ARG_ENABLE([libtool-lock], 19496c321187Smrg [AC_HELP_STRING([--disable-libtool-lock], 19506c321187Smrg [avoid locking (might break parallel builds)])]) 19516c321187Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 19526c321187Smrg 19536c321187SmrgAC_ARG_WITH([pic], 19546c321187Smrg [AC_HELP_STRING([--with-pic], 19556c321187Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 19566c321187Smrg [pic_mode="$withval"], 19576c321187Smrg [pic_mode=default]) 19586c321187Smrgtest -z "$pic_mode" && pic_mode=default 19596c321187Smrg 19606c321187Smrg# Use C for the default configuration in the libtool script 19616c321187Smrgtagname= 19626c321187SmrgAC_LIBTOOL_LANG_C_CONFIG 19636c321187Smrg_LT_AC_TAGCONFIG 19646c321187Smrg])# AC_LIBTOOL_SETUP 19656c321187Smrg 19666c321187Smrg 19676c321187Smrg# _LT_AC_SYS_COMPILER 19686c321187Smrg# ------------------- 19696c321187SmrgAC_DEFUN([_LT_AC_SYS_COMPILER], 19706c321187Smrg[AC_REQUIRE([AC_PROG_CC])dnl 19716c321187Smrg 19726c321187Smrg# If no C compiler was specified, use CC. 19736c321187SmrgLTCC=${LTCC-"$CC"} 19746c321187Smrg 19756c321187Smrg# If no C compiler flags were specified, use CFLAGS. 19766c321187SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 19776c321187Smrg 19786c321187Smrg# Allow CC to be a program name with arguments. 19796c321187Smrgcompiler=$CC 19806c321187Smrg])# _LT_AC_SYS_COMPILER 19816c321187Smrg 19826c321187Smrg 19836c321187Smrg# _LT_CC_BASENAME(CC) 19846c321187Smrg# ------------------- 19856c321187Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 19866c321187SmrgAC_DEFUN([_LT_CC_BASENAME], 19876c321187Smrg[for cc_temp in $1""; do 19886c321187Smrg case $cc_temp in 19896c321187Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 19906c321187Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 19916c321187Smrg \-*) ;; 19926c321187Smrg *) break;; 19936c321187Smrg esac 19946c321187Smrgdone 19956c321187Smrgcc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` 19966c321187Smrg]) 19976c321187Smrg 19986c321187Smrg 19996c321187Smrg# _LT_COMPILER_BOILERPLATE 20006c321187Smrg# ------------------------ 20016c321187Smrg# Check for compiler boilerplate output or warnings with 20026c321187Smrg# the simple compiler test code. 20036c321187SmrgAC_DEFUN([_LT_COMPILER_BOILERPLATE], 200493493779Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 200593493779Smrgac_outfile=conftest.$ac_objext 200693493779Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 20076c321187Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 20086c321187Smrg_lt_compiler_boilerplate=`cat conftest.err` 20096c321187Smrg$rm conftest* 20106c321187Smrg])# _LT_COMPILER_BOILERPLATE 20116c321187Smrg 20126c321187Smrg 20136c321187Smrg# _LT_LINKER_BOILERPLATE 20146c321187Smrg# ---------------------- 20156c321187Smrg# Check for linker boilerplate output or warnings with 20166c321187Smrg# the simple link test code. 20176c321187SmrgAC_DEFUN([_LT_LINKER_BOILERPLATE], 201893493779Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 201993493779Smrgac_outfile=conftest.$ac_objext 202093493779Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 20216c321187Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 20226c321187Smrg_lt_linker_boilerplate=`cat conftest.err` 202393493779Smrg$rm -r conftest* 20246c321187Smrg])# _LT_LINKER_BOILERPLATE 20256c321187Smrg 202693493779Smrg# _LT_REQUIRED_DARWIN_CHECKS 202793493779Smrg# -------------------------- 202893493779Smrg# Check for some things on darwin 202993493779SmrgAC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[ 203093493779Smrg case $host_os in 203193493779Smrg rhapsody* | darwin*) 203293493779Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 203393493779Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 203493493779Smrg 203593493779Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 203693493779Smrg [lt_cv_apple_cc_single_mod=no 203793493779Smrg if test -z "${LT_MULTI_MODULE}"; then 203893493779Smrg # By default we will add the -single_module flag. You can override 203993493779Smrg # by either setting the environment variable LT_MULTI_MODULE 204093493779Smrg # non-empty at configure time, or by adding -multi_module to the 204193493779Smrg # link flags. 204293493779Smrg echo "int foo(void){return 1;}" > conftest.c 204393493779Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 204493493779Smrg -dynamiclib ${wl}-single_module conftest.c 204593493779Smrg if test -f libconftest.dylib; then 204693493779Smrg lt_cv_apple_cc_single_mod=yes 204793493779Smrg rm -rf libconftest.dylib* 204893493779Smrg fi 204993493779Smrg rm conftest.c 205093493779Smrg fi]) 205193493779Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 205293493779Smrg [lt_cv_ld_exported_symbols_list], 205393493779Smrg [lt_cv_ld_exported_symbols_list=no 205493493779Smrg save_LDFLAGS=$LDFLAGS 205593493779Smrg echo "_main" > conftest.sym 205693493779Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 205793493779Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 205893493779Smrg [lt_cv_ld_exported_symbols_list=yes], 205993493779Smrg [lt_cv_ld_exported_symbols_list=no]) 206093493779Smrg LDFLAGS="$save_LDFLAGS" 206193493779Smrg ]) 206293493779Smrg case $host_os in 206393493779Smrg rhapsody* | darwin1.[[0123]]) 206493493779Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 206593493779Smrg darwin1.*) 206693493779Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 206793493779Smrg darwin*) 206893493779Smrg # if running on 10.5 or later, the deployment target defaults 206993493779Smrg # to the OS version, if on x86, and 10.4, the deployment 207093493779Smrg # target defaults to 10.4. Don't you love it? 207193493779Smrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 207293493779Smrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 207393493779Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 207493493779Smrg 10.[[012]]*) 207593493779Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 207693493779Smrg 10.*) 207793493779Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 207893493779Smrg esac 207993493779Smrg ;; 208093493779Smrg esac 208193493779Smrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 208293493779Smrg _lt_dar_single_mod='$single_module' 208393493779Smrg fi 208493493779Smrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 208593493779Smrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 208693493779Smrg else 208793493779Smrg _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}" 208893493779Smrg fi 208993493779Smrg if test "$DSYMUTIL" != ":"; then 209093493779Smrg _lt_dsymutil="~$DSYMUTIL \$lib || :" 209193493779Smrg else 209293493779Smrg _lt_dsymutil= 209393493779Smrg fi 209493493779Smrg ;; 209593493779Smrg esac 209693493779Smrg]) 20976c321187Smrg 20986c321187Smrg# _LT_AC_SYS_LIBPATH_AIX 20996c321187Smrg# ---------------------- 21006c321187Smrg# Links a minimal program and checks the executable 21016c321187Smrg# for the system default hardcoded library path. In most cases, 21026c321187Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 21036c321187Smrg# the location of the communication and MPI libs are included too. 21046c321187Smrg# If we don't find anything, use the default library path according 21056c321187Smrg# to the aix ld manual. 21066c321187SmrgAC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], 210793493779Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 210893493779SmrgAC_LINK_IFELSE(AC_LANG_PROGRAM,[ 210993493779Smrglt_aix_libpath_sed=' 211093493779Smrg /Import File Strings/,/^$/ { 211193493779Smrg /^0/ { 211293493779Smrg s/^0 *\(.*\)$/\1/ 211393493779Smrg p 211493493779Smrg } 211593493779Smrg }' 211693493779Smrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 21176c321187Smrg# Check for a 64-bit object if we didn't find anything. 211893493779Smrgif test -z "$aix_libpath"; then 211993493779Smrg aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 212093493779Smrgfi],[]) 21216c321187Smrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 21226c321187Smrg])# _LT_AC_SYS_LIBPATH_AIX 21236c321187Smrg 21246c321187Smrg 21256c321187Smrg# _LT_AC_SHELL_INIT(ARG) 21266c321187Smrg# ---------------------- 21276c321187SmrgAC_DEFUN([_LT_AC_SHELL_INIT], 21286c321187Smrg[ifdef([AC_DIVERSION_NOTICE], 21296c321187Smrg [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], 21306c321187Smrg [AC_DIVERT_PUSH(NOTICE)]) 21316c321187Smrg$1 21326c321187SmrgAC_DIVERT_POP 21336c321187Smrg])# _LT_AC_SHELL_INIT 21346c321187Smrg 21356c321187Smrg 21366c321187Smrg# _LT_AC_PROG_ECHO_BACKSLASH 21376c321187Smrg# -------------------------- 21386c321187Smrg# Add some code to the start of the generated configure script which 21396c321187Smrg# will find an echo command which doesn't interpret backslashes. 21406c321187SmrgAC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], 21416c321187Smrg[_LT_AC_SHELL_INIT([ 21426c321187Smrg# Check that we are running under the correct shell. 21436c321187SmrgSHELL=${CONFIG_SHELL-/bin/sh} 21446c321187Smrg 21456c321187Smrgcase X$ECHO in 21466c321187SmrgX*--fallback-echo) 21476c321187Smrg # Remove one level of quotation (which was required for Make). 21486c321187Smrg ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` 21496c321187Smrg ;; 21506c321187Smrgesac 21516c321187Smrg 21526c321187Smrgecho=${ECHO-echo} 21536c321187Smrgif test "X[$]1" = X--no-reexec; then 21546c321187Smrg # Discard the --no-reexec flag, and continue. 21556c321187Smrg shift 21566c321187Smrgelif test "X[$]1" = X--fallback-echo; then 21576c321187Smrg # Avoid inline document here, it may be left over 21586c321187Smrg : 21596c321187Smrgelif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then 21606c321187Smrg # Yippee, $echo works! 21616c321187Smrg : 21626c321187Smrgelse 21636c321187Smrg # Restart under the correct shell. 21646c321187Smrg exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} 21656c321187Smrgfi 21666c321187Smrg 21676c321187Smrgif test "X[$]1" = X--fallback-echo; then 21686c321187Smrg # used as fallback echo 21696c321187Smrg shift 21706c321187Smrg cat <<EOF 21716c321187Smrg[$]* 21726c321187SmrgEOF 21736c321187Smrg exit 0 21746c321187Smrgfi 21756c321187Smrg 21766c321187Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 21776c321187Smrg# if CDPATH is set. 21786c321187Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 21796c321187Smrg 21806c321187Smrgif test -z "$ECHO"; then 21816c321187Smrgif test "X${echo_test_string+set}" != Xset; then 21826c321187Smrg# find a string as large as possible, as long as the shell can cope with it 21836c321187Smrg for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do 21846c321187Smrg # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... 21856c321187Smrg if (echo_test_string=`eval $cmd`) 2>/dev/null && 21866c321187Smrg echo_test_string=`eval $cmd` && 21876c321187Smrg (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null 21886c321187Smrg then 21896c321187Smrg break 21906c321187Smrg fi 21916c321187Smrg done 21926c321187Smrgfi 21936c321187Smrg 21946c321187Smrgif test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 21956c321187Smrg echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 21966c321187Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 21976c321187Smrg : 21986c321187Smrgelse 21996c321187Smrg # The Solaris, AIX, and Digital Unix default echo programs unquote 22006c321187Smrg # backslashes. This makes it impossible to quote backslashes using 22016c321187Smrg # echo "$something" | sed 's/\\/\\\\/g' 22026c321187Smrg # 22036c321187Smrg # So, first we look for a working echo in the user's PATH. 22046c321187Smrg 22056c321187Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 22066c321187Smrg for dir in $PATH /usr/ucb; do 22076c321187Smrg IFS="$lt_save_ifs" 22086c321187Smrg if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && 22096c321187Smrg test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && 22106c321187Smrg echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && 22116c321187Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 22126c321187Smrg echo="$dir/echo" 22136c321187Smrg break 22146c321187Smrg fi 22156c321187Smrg done 22166c321187Smrg IFS="$lt_save_ifs" 22176c321187Smrg 22186c321187Smrg if test "X$echo" = Xecho; then 22196c321187Smrg # We didn't find a better echo, so look for alternatives. 22206c321187Smrg if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && 22216c321187Smrg echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && 22226c321187Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 22236c321187Smrg # This shell has a builtin print -r that does the trick. 22246c321187Smrg echo='print -r' 22256c321187Smrg elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && 22266c321187Smrg test "X$CONFIG_SHELL" != X/bin/ksh; then 22276c321187Smrg # If we have ksh, try running configure again with it. 22286c321187Smrg ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} 22296c321187Smrg export ORIGINAL_CONFIG_SHELL 22306c321187Smrg CONFIG_SHELL=/bin/ksh 22316c321187Smrg export CONFIG_SHELL 22326c321187Smrg exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} 22336c321187Smrg else 22346c321187Smrg # Try using printf. 22356c321187Smrg echo='printf %s\n' 22366c321187Smrg if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 22376c321187Smrg echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 22386c321187Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 22396c321187Smrg # Cool, printf works 22406c321187Smrg : 22416c321187Smrg elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 22426c321187Smrg test "X$echo_testing_string" = 'X\t' && 22436c321187Smrg echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 22446c321187Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 22456c321187Smrg CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL 22466c321187Smrg export CONFIG_SHELL 22476c321187Smrg SHELL="$CONFIG_SHELL" 22486c321187Smrg export SHELL 22496c321187Smrg echo="$CONFIG_SHELL [$]0 --fallback-echo" 22506c321187Smrg elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 22516c321187Smrg test "X$echo_testing_string" = 'X\t' && 22526c321187Smrg echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 22536c321187Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 22546c321187Smrg echo="$CONFIG_SHELL [$]0 --fallback-echo" 22556c321187Smrg else 22566c321187Smrg # maybe with a smaller string... 22576c321187Smrg prev=: 22586c321187Smrg 22596c321187Smrg for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do 22606c321187Smrg if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null 22616c321187Smrg then 22626c321187Smrg break 22636c321187Smrg fi 22646c321187Smrg prev="$cmd" 22656c321187Smrg done 22666c321187Smrg 22676c321187Smrg if test "$prev" != 'sed 50q "[$]0"'; then 22686c321187Smrg echo_test_string=`eval $prev` 22696c321187Smrg export echo_test_string 22706c321187Smrg exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} 22716c321187Smrg else 22726c321187Smrg # Oops. We lost completely, so just stick with echo. 22736c321187Smrg echo=echo 22746c321187Smrg fi 22756c321187Smrg fi 22766c321187Smrg fi 22776c321187Smrg fi 22786c321187Smrgfi 22796c321187Smrgfi 22806c321187Smrg 22816c321187Smrg# Copy echo and quote the copy suitably for passing to libtool from 22826c321187Smrg# the Makefile, instead of quoting the original, which is used later. 22836c321187SmrgECHO=$echo 22846c321187Smrgif test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then 22856c321187Smrg ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" 22866c321187Smrgfi 22876c321187Smrg 22886c321187SmrgAC_SUBST(ECHO) 22896c321187Smrg])])# _LT_AC_PROG_ECHO_BACKSLASH 22906c321187Smrg 22916c321187Smrg 22926c321187Smrg# _LT_AC_LOCK 22936c321187Smrg# ----------- 22946c321187SmrgAC_DEFUN([_LT_AC_LOCK], 22956c321187Smrg[AC_ARG_ENABLE([libtool-lock], 22966c321187Smrg [AC_HELP_STRING([--disable-libtool-lock], 22976c321187Smrg [avoid locking (might break parallel builds)])]) 22986c321187Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 22996c321187Smrg 23006c321187Smrg# Some flags need to be propagated to the compiler or linker for good 23016c321187Smrg# libtool support. 23026c321187Smrgcase $host in 23036c321187Smrgia64-*-hpux*) 23046c321187Smrg # Find out which ABI we are using. 23056c321187Smrg echo 'int i;' > conftest.$ac_ext 23066c321187Smrg if AC_TRY_EVAL(ac_compile); then 23076c321187Smrg case `/usr/bin/file conftest.$ac_objext` in 23086c321187Smrg *ELF-32*) 23096c321187Smrg HPUX_IA64_MODE="32" 23106c321187Smrg ;; 23116c321187Smrg *ELF-64*) 23126c321187Smrg HPUX_IA64_MODE="64" 23136c321187Smrg ;; 23146c321187Smrg esac 23156c321187Smrg fi 23166c321187Smrg rm -rf conftest* 23176c321187Smrg ;; 23186c321187Smrg*-*-irix6*) 23196c321187Smrg # Find out which ABI we are using. 23206c321187Smrg echo '[#]line __oline__ "configure"' > conftest.$ac_ext 23216c321187Smrg if AC_TRY_EVAL(ac_compile); then 23226c321187Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 23236c321187Smrg case `/usr/bin/file conftest.$ac_objext` in 23246c321187Smrg *32-bit*) 23256c321187Smrg LD="${LD-ld} -melf32bsmip" 23266c321187Smrg ;; 23276c321187Smrg *N32*) 23286c321187Smrg LD="${LD-ld} -melf32bmipn32" 23296c321187Smrg ;; 23306c321187Smrg *64-bit*) 23316c321187Smrg LD="${LD-ld} -melf64bmip" 23326c321187Smrg ;; 23336c321187Smrg esac 23346c321187Smrg else 23356c321187Smrg case `/usr/bin/file conftest.$ac_objext` in 23366c321187Smrg *32-bit*) 23376c321187Smrg LD="${LD-ld} -32" 23386c321187Smrg ;; 23396c321187Smrg *N32*) 23406c321187Smrg LD="${LD-ld} -n32" 23416c321187Smrg ;; 23426c321187Smrg *64-bit*) 23436c321187Smrg LD="${LD-ld} -64" 23446c321187Smrg ;; 23456c321187Smrg esac 23466c321187Smrg fi 23476c321187Smrg fi 23486c321187Smrg rm -rf conftest* 23496c321187Smrg ;; 23506c321187Smrg 235193493779Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 235293493779Smrgs390*-*linux*|sparc*-*linux*) 23536c321187Smrg # Find out which ABI we are using. 23546c321187Smrg echo 'int i;' > conftest.$ac_ext 23556c321187Smrg if AC_TRY_EVAL(ac_compile); then 23566c321187Smrg case `/usr/bin/file conftest.o` in 23576c321187Smrg *32-bit*) 23586c321187Smrg case $host in 235993493779Smrg x86_64-*kfreebsd*-gnu) 236093493779Smrg LD="${LD-ld} -m elf_i386_fbsd" 236193493779Smrg ;; 23626c321187Smrg x86_64-*linux*) 23636c321187Smrg LD="${LD-ld} -m elf_i386" 23646c321187Smrg ;; 23656c321187Smrg ppc64-*linux*|powerpc64-*linux*) 23666c321187Smrg LD="${LD-ld} -m elf32ppclinux" 23676c321187Smrg ;; 23686c321187Smrg s390x-*linux*) 23696c321187Smrg LD="${LD-ld} -m elf_s390" 23706c321187Smrg ;; 23716c321187Smrg sparc64-*linux*) 23726c321187Smrg LD="${LD-ld} -m elf32_sparc" 23736c321187Smrg ;; 23746c321187Smrg esac 23756c321187Smrg ;; 23766c321187Smrg *64-bit*) 23776c321187Smrg case $host in 237893493779Smrg x86_64-*kfreebsd*-gnu) 237993493779Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 238093493779Smrg ;; 23816c321187Smrg x86_64-*linux*) 23826c321187Smrg LD="${LD-ld} -m elf_x86_64" 23836c321187Smrg ;; 23846c321187Smrg ppc*-*linux*|powerpc*-*linux*) 23856c321187Smrg LD="${LD-ld} -m elf64ppc" 23866c321187Smrg ;; 23876c321187Smrg s390*-*linux*) 23886c321187Smrg LD="${LD-ld} -m elf64_s390" 23896c321187Smrg ;; 23906c321187Smrg sparc*-*linux*) 23916c321187Smrg LD="${LD-ld} -m elf64_sparc" 23926c321187Smrg ;; 23936c321187Smrg esac 23946c321187Smrg ;; 23956c321187Smrg esac 23966c321187Smrg fi 23976c321187Smrg rm -rf conftest* 23986c321187Smrg ;; 23996c321187Smrg 24006c321187Smrg*-*-sco3.2v5*) 24016c321187Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 24026c321187Smrg SAVE_CFLAGS="$CFLAGS" 24036c321187Smrg CFLAGS="$CFLAGS -belf" 24046c321187Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 24056c321187Smrg [AC_LANG_PUSH(C) 24066c321187Smrg AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 24076c321187Smrg AC_LANG_POP]) 24086c321187Smrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 24096c321187Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 24106c321187Smrg CFLAGS="$SAVE_CFLAGS" 24116c321187Smrg fi 24126c321187Smrg ;; 24136c321187Smrgsparc*-*solaris*) 24146c321187Smrg # Find out which ABI we are using. 24156c321187Smrg echo 'int i;' > conftest.$ac_ext 24166c321187Smrg if AC_TRY_EVAL(ac_compile); then 24176c321187Smrg case `/usr/bin/file conftest.o` in 24186c321187Smrg *64-bit*) 24196c321187Smrg case $lt_cv_prog_gnu_ld in 24206c321187Smrg yes*) LD="${LD-ld} -m elf64_sparc" ;; 242193493779Smrg *) 242293493779Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 242393493779Smrg LD="${LD-ld} -64" 242493493779Smrg fi 242593493779Smrg ;; 24266c321187Smrg esac 24276c321187Smrg ;; 24286c321187Smrg esac 24296c321187Smrg fi 24306c321187Smrg rm -rf conftest* 24316c321187Smrg ;; 24326c321187Smrg 24336c321187SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 24346c321187Smrg[*-*-cygwin* | *-*-mingw* | *-*-pw32*) 24356c321187Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 24366c321187Smrg AC_CHECK_TOOL(AS, as, false) 24376c321187Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 24386c321187Smrg ;; 24396c321187Smrg ]) 24406c321187Smrgesac 24416c321187Smrg 24426c321187Smrgneed_locks="$enable_libtool_lock" 24436c321187Smrg 24446c321187Smrg])# _LT_AC_LOCK 24456c321187Smrg 24466c321187Smrg 24476c321187Smrg# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 24486c321187Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 24496c321187Smrg# ---------------------------------------------------------------- 24506c321187Smrg# Check whether the given compiler option works 24516c321187SmrgAC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], 24526c321187Smrg[AC_REQUIRE([LT_AC_PROG_SED]) 24536c321187SmrgAC_CACHE_CHECK([$1], [$2], 24546c321187Smrg [$2=no 24556c321187Smrg ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 245693493779Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 24576c321187Smrg lt_compiler_flag="$3" 24586c321187Smrg # Insert the option either (1) after the last *FLAGS variable, or 24596c321187Smrg # (2) before a word containing "conftest.", or (3) at the end. 24606c321187Smrg # Note that $ac_compile itself does not contain backslashes and begins 24616c321187Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 24626c321187Smrg # The option is referenced via a variable to avoid confusing sed. 24636c321187Smrg lt_compile=`echo "$ac_compile" | $SED \ 24646c321187Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 24656c321187Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 24666c321187Smrg -e 's:$: $lt_compiler_flag:'` 24676c321187Smrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 24686c321187Smrg (eval "$lt_compile" 2>conftest.err) 24696c321187Smrg ac_status=$? 24706c321187Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 24716c321187Smrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 24726c321187Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 24736c321187Smrg # The compiler can only warn and ignore the option if not recognized 24746c321187Smrg # So say no if there are warnings other than the usual output. 24756c321187Smrg $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp 24766c321187Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 24776c321187Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 24786c321187Smrg $2=yes 24796c321187Smrg fi 24806c321187Smrg fi 24816c321187Smrg $rm conftest* 24826c321187Smrg]) 24836c321187Smrg 24846c321187Smrgif test x"[$]$2" = xyes; then 24856c321187Smrg ifelse([$5], , :, [$5]) 24866c321187Smrgelse 24876c321187Smrg ifelse([$6], , :, [$6]) 24886c321187Smrgfi 24896c321187Smrg])# AC_LIBTOOL_COMPILER_OPTION 24906c321187Smrg 24916c321187Smrg 24926c321187Smrg# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 24936c321187Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 24946c321187Smrg# ------------------------------------------------------------ 24956c321187Smrg# Check whether the given compiler option works 24966c321187SmrgAC_DEFUN([AC_LIBTOOL_LINKER_OPTION], 249793493779Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 249893493779SmrgAC_CACHE_CHECK([$1], [$2], 24996c321187Smrg [$2=no 25006c321187Smrg save_LDFLAGS="$LDFLAGS" 25016c321187Smrg LDFLAGS="$LDFLAGS $3" 250293493779Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 25036c321187Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 25046c321187Smrg # The linker can only warn and ignore the option if not recognized 25056c321187Smrg # So say no if there are warnings 25066c321187Smrg if test -s conftest.err; then 25076c321187Smrg # Append any errors to the config.log. 25086c321187Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 25096c321187Smrg $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp 25106c321187Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 25116c321187Smrg if diff conftest.exp conftest.er2 >/dev/null; then 25126c321187Smrg $2=yes 25136c321187Smrg fi 25146c321187Smrg else 25156c321187Smrg $2=yes 25166c321187Smrg fi 25176c321187Smrg fi 251893493779Smrg $rm -r conftest* 25196c321187Smrg LDFLAGS="$save_LDFLAGS" 25206c321187Smrg]) 25216c321187Smrg 25226c321187Smrgif test x"[$]$2" = xyes; then 25236c321187Smrg ifelse([$4], , :, [$4]) 25246c321187Smrgelse 25256c321187Smrg ifelse([$5], , :, [$5]) 25266c321187Smrgfi 25276c321187Smrg])# AC_LIBTOOL_LINKER_OPTION 25286c321187Smrg 25296c321187Smrg 25306c321187Smrg# AC_LIBTOOL_SYS_MAX_CMD_LEN 25316c321187Smrg# -------------------------- 25326c321187SmrgAC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], 25336c321187Smrg[# find the maximum length of command line arguments 25346c321187SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 25356c321187SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 25366c321187Smrg i=0 25376c321187Smrg teststring="ABCD" 25386c321187Smrg 25396c321187Smrg case $build_os in 25406c321187Smrg msdosdjgpp*) 25416c321187Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 25426c321187Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 25436c321187Smrg # during glob expansion). Even if it were fixed, the result of this 25446c321187Smrg # check would be larger than it should be. 25456c321187Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 25466c321187Smrg ;; 25476c321187Smrg 25486c321187Smrg gnu*) 25496c321187Smrg # Under GNU Hurd, this test is not required because there is 25506c321187Smrg # no limit to the length of command line arguments. 25516c321187Smrg # Libtool will interpret -1 as no limit whatsoever 25526c321187Smrg lt_cv_sys_max_cmd_len=-1; 25536c321187Smrg ;; 25546c321187Smrg 25556c321187Smrg cygwin* | mingw*) 25566c321187Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 25576c321187Smrg # about 5 minutes as the teststring grows exponentially. 25586c321187Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 25596c321187Smrg # you end up with a "frozen" computer, even though with patience 25606c321187Smrg # the test eventually succeeds (with a max line length of 256k). 25616c321187Smrg # Instead, let's just punt: use the minimum linelength reported by 25626c321187Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 25636c321187Smrg lt_cv_sys_max_cmd_len=8192; 25646c321187Smrg ;; 25656c321187Smrg 25666c321187Smrg amigaos*) 25676c321187Smrg # On AmigaOS with pdksh, this test takes hours, literally. 25686c321187Smrg # So we just punt and use a minimum line length of 8192. 25696c321187Smrg lt_cv_sys_max_cmd_len=8192; 25706c321187Smrg ;; 25716c321187Smrg 25726c321187Smrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 25736c321187Smrg # This has been around since 386BSD, at least. Likely further. 25746c321187Smrg if test -x /sbin/sysctl; then 25756c321187Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 25766c321187Smrg elif test -x /usr/sbin/sysctl; then 25776c321187Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 25786c321187Smrg else 25796c321187Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 25806c321187Smrg fi 25816c321187Smrg # And add a safety zone 25826c321187Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 25836c321187Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 25846c321187Smrg ;; 25856c321187Smrg 25866c321187Smrg interix*) 25876c321187Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 25886c321187Smrg lt_cv_sys_max_cmd_len=196608 25896c321187Smrg ;; 25906c321187Smrg 25916c321187Smrg osf*) 25926c321187Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 25936c321187Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 25946c321187Smrg # nice to cause kernel panics so lets avoid the loop below. 25956c321187Smrg # First set a reasonable default. 25966c321187Smrg lt_cv_sys_max_cmd_len=16384 25976c321187Smrg # 25986c321187Smrg if test -x /sbin/sysconfig; then 25996c321187Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 26006c321187Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 26016c321187Smrg esac 26026c321187Smrg fi 26036c321187Smrg ;; 26046c321187Smrg sco3.2v5*) 26056c321187Smrg lt_cv_sys_max_cmd_len=102400 26066c321187Smrg ;; 26076c321187Smrg sysv5* | sco5v6* | sysv4.2uw2*) 26086c321187Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 26096c321187Smrg if test -n "$kargmax"; then 26106c321187Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 26116c321187Smrg else 26126c321187Smrg lt_cv_sys_max_cmd_len=32768 26136c321187Smrg fi 26146c321187Smrg ;; 26156c321187Smrg *) 261693493779Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 261793493779Smrg if test -n "$lt_cv_sys_max_cmd_len"; then 261893493779Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 261993493779Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 262093493779Smrg else 262193493779Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 262293493779Smrg while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ 26236c321187Smrg = "XX$teststring") >/dev/null 2>&1 && 262493493779Smrg new_result=`expr "X$teststring" : ".*" 2>&1` && 262593493779Smrg lt_cv_sys_max_cmd_len=$new_result && 262693493779Smrg test $i != 17 # 1/2 MB should be enough 262793493779Smrg do 262893493779Smrg i=`expr $i + 1` 262993493779Smrg teststring=$teststring$teststring 263093493779Smrg done 263193493779Smrg teststring= 263293493779Smrg # Add a significant safety factor because C++ compilers can tack on massive 263393493779Smrg # amounts of additional arguments before passing them to the linker. 263493493779Smrg # It appears as though 1/2 is a usable value. 263593493779Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 263693493779Smrg fi 26376c321187Smrg ;; 26386c321187Smrg esac 26396c321187Smrg]) 26406c321187Smrgif test -n $lt_cv_sys_max_cmd_len ; then 26416c321187Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 26426c321187Smrgelse 26436c321187Smrg AC_MSG_RESULT(none) 26446c321187Smrgfi 26456c321187Smrg])# AC_LIBTOOL_SYS_MAX_CMD_LEN 26466c321187Smrg 26476c321187Smrg 26486c321187Smrg# _LT_AC_CHECK_DLFCN 26496c321187Smrg# ------------------ 26506c321187SmrgAC_DEFUN([_LT_AC_CHECK_DLFCN], 26516c321187Smrg[AC_CHECK_HEADERS(dlfcn.h)dnl 26526c321187Smrg])# _LT_AC_CHECK_DLFCN 26536c321187Smrg 26546c321187Smrg 26556c321187Smrg# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 26566c321187Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 26576c321187Smrg# --------------------------------------------------------------------- 26586c321187SmrgAC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], 26596c321187Smrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 26606c321187Smrgif test "$cross_compiling" = yes; then : 26616c321187Smrg [$4] 26626c321187Smrgelse 26636c321187Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 26646c321187Smrg lt_status=$lt_dlunknown 26656c321187Smrg cat > conftest.$ac_ext <<EOF 26666c321187Smrg[#line __oline__ "configure" 26676c321187Smrg#include "confdefs.h" 26686c321187Smrg 26696c321187Smrg#if HAVE_DLFCN_H 26706c321187Smrg#include <dlfcn.h> 26716c321187Smrg#endif 26726c321187Smrg 26736c321187Smrg#include <stdio.h> 26746c321187Smrg 26756c321187Smrg#ifdef RTLD_GLOBAL 26766c321187Smrg# define LT_DLGLOBAL RTLD_GLOBAL 26776c321187Smrg#else 26786c321187Smrg# ifdef DL_GLOBAL 26796c321187Smrg# define LT_DLGLOBAL DL_GLOBAL 26806c321187Smrg# else 26816c321187Smrg# define LT_DLGLOBAL 0 26826c321187Smrg# endif 26836c321187Smrg#endif 26846c321187Smrg 26856c321187Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 26866c321187Smrg find out it does not work in some platform. */ 26876c321187Smrg#ifndef LT_DLLAZY_OR_NOW 26886c321187Smrg# ifdef RTLD_LAZY 26896c321187Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 26906c321187Smrg# else 26916c321187Smrg# ifdef DL_LAZY 26926c321187Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 26936c321187Smrg# else 26946c321187Smrg# ifdef RTLD_NOW 26956c321187Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 26966c321187Smrg# else 26976c321187Smrg# ifdef DL_NOW 26986c321187Smrg# define LT_DLLAZY_OR_NOW DL_NOW 26996c321187Smrg# else 27006c321187Smrg# define LT_DLLAZY_OR_NOW 0 27016c321187Smrg# endif 27026c321187Smrg# endif 27036c321187Smrg# endif 27046c321187Smrg# endif 27056c321187Smrg#endif 27066c321187Smrg 27076c321187Smrg#ifdef __cplusplus 27086c321187Smrgextern "C" void exit (int); 27096c321187Smrg#endif 27106c321187Smrg 27116c321187Smrgvoid fnord() { int i=42;} 27126c321187Smrgint main () 27136c321187Smrg{ 27146c321187Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 27156c321187Smrg int status = $lt_dlunknown; 27166c321187Smrg 27176c321187Smrg if (self) 27186c321187Smrg { 27196c321187Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 27206c321187Smrg else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 27216c321187Smrg /* dlclose (self); */ 27226c321187Smrg } 27236c321187Smrg else 27246c321187Smrg puts (dlerror ()); 27256c321187Smrg 27266c321187Smrg exit (status); 27276c321187Smrg}] 27286c321187SmrgEOF 27296c321187Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 27306c321187Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 27316c321187Smrg lt_status=$? 27326c321187Smrg case x$lt_status in 27336c321187Smrg x$lt_dlno_uscore) $1 ;; 27346c321187Smrg x$lt_dlneed_uscore) $2 ;; 27356c321187Smrg x$lt_dlunknown|x*) $3 ;; 27366c321187Smrg esac 27376c321187Smrg else : 27386c321187Smrg # compilation failed 27396c321187Smrg $3 27406c321187Smrg fi 27416c321187Smrgfi 27426c321187Smrgrm -fr conftest* 27436c321187Smrg])# _LT_AC_TRY_DLOPEN_SELF 27446c321187Smrg 27456c321187Smrg 27466c321187Smrg# AC_LIBTOOL_DLOPEN_SELF 27476c321187Smrg# ---------------------- 27486c321187SmrgAC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], 27496c321187Smrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 27506c321187Smrgif test "x$enable_dlopen" != xyes; then 27516c321187Smrg enable_dlopen=unknown 27526c321187Smrg enable_dlopen_self=unknown 27536c321187Smrg enable_dlopen_self_static=unknown 27546c321187Smrgelse 27556c321187Smrg lt_cv_dlopen=no 27566c321187Smrg lt_cv_dlopen_libs= 27576c321187Smrg 27586c321187Smrg case $host_os in 27596c321187Smrg beos*) 27606c321187Smrg lt_cv_dlopen="load_add_on" 27616c321187Smrg lt_cv_dlopen_libs= 27626c321187Smrg lt_cv_dlopen_self=yes 27636c321187Smrg ;; 27646c321187Smrg 27656c321187Smrg mingw* | pw32*) 27666c321187Smrg lt_cv_dlopen="LoadLibrary" 27676c321187Smrg lt_cv_dlopen_libs= 27686c321187Smrg ;; 27696c321187Smrg 27706c321187Smrg cygwin*) 27716c321187Smrg lt_cv_dlopen="dlopen" 27726c321187Smrg lt_cv_dlopen_libs= 27736c321187Smrg ;; 27746c321187Smrg 27756c321187Smrg darwin*) 27766c321187Smrg # if libdl is installed we need to link against it 27776c321187Smrg AC_CHECK_LIB([dl], [dlopen], 27786c321187Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 27796c321187Smrg lt_cv_dlopen="dyld" 27806c321187Smrg lt_cv_dlopen_libs= 27816c321187Smrg lt_cv_dlopen_self=yes 27826c321187Smrg ]) 27836c321187Smrg ;; 27846c321187Smrg 27856c321187Smrg *) 27866c321187Smrg AC_CHECK_FUNC([shl_load], 27876c321187Smrg [lt_cv_dlopen="shl_load"], 27886c321187Smrg [AC_CHECK_LIB([dld], [shl_load], 278993493779Smrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 27906c321187Smrg [AC_CHECK_FUNC([dlopen], 27916c321187Smrg [lt_cv_dlopen="dlopen"], 27926c321187Smrg [AC_CHECK_LIB([dl], [dlopen], 27936c321187Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 27946c321187Smrg [AC_CHECK_LIB([svld], [dlopen], 27956c321187Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 27966c321187Smrg [AC_CHECK_LIB([dld], [dld_link], 279793493779Smrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 27986c321187Smrg ]) 27996c321187Smrg ]) 28006c321187Smrg ]) 28016c321187Smrg ]) 28026c321187Smrg ]) 28036c321187Smrg ;; 28046c321187Smrg esac 28056c321187Smrg 28066c321187Smrg if test "x$lt_cv_dlopen" != xno; then 28076c321187Smrg enable_dlopen=yes 28086c321187Smrg else 28096c321187Smrg enable_dlopen=no 28106c321187Smrg fi 28116c321187Smrg 28126c321187Smrg case $lt_cv_dlopen in 28136c321187Smrg dlopen) 28146c321187Smrg save_CPPFLAGS="$CPPFLAGS" 28156c321187Smrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 28166c321187Smrg 28176c321187Smrg save_LDFLAGS="$LDFLAGS" 28186c321187Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 28196c321187Smrg 28206c321187Smrg save_LIBS="$LIBS" 28216c321187Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 28226c321187Smrg 28236c321187Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 28246c321187Smrg lt_cv_dlopen_self, [dnl 28256c321187Smrg _LT_AC_TRY_DLOPEN_SELF( 28266c321187Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 28276c321187Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 28286c321187Smrg ]) 28296c321187Smrg 28306c321187Smrg if test "x$lt_cv_dlopen_self" = xyes; then 28316c321187Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 28326c321187Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 28336c321187Smrg lt_cv_dlopen_self_static, [dnl 28346c321187Smrg _LT_AC_TRY_DLOPEN_SELF( 28356c321187Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 28366c321187Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 28376c321187Smrg ]) 28386c321187Smrg fi 28396c321187Smrg 28406c321187Smrg CPPFLAGS="$save_CPPFLAGS" 28416c321187Smrg LDFLAGS="$save_LDFLAGS" 28426c321187Smrg LIBS="$save_LIBS" 28436c321187Smrg ;; 28446c321187Smrg esac 28456c321187Smrg 28466c321187Smrg case $lt_cv_dlopen_self in 28476c321187Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 28486c321187Smrg *) enable_dlopen_self=unknown ;; 28496c321187Smrg esac 28506c321187Smrg 28516c321187Smrg case $lt_cv_dlopen_self_static in 28526c321187Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 28536c321187Smrg *) enable_dlopen_self_static=unknown ;; 28546c321187Smrg esac 28556c321187Smrgfi 28566c321187Smrg])# AC_LIBTOOL_DLOPEN_SELF 28576c321187Smrg 28586c321187Smrg 28596c321187Smrg# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) 28606c321187Smrg# --------------------------------- 28616c321187Smrg# Check to see if options -c and -o are simultaneously supported by compiler 28626c321187SmrgAC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], 286393493779Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 286493493779SmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 28656c321187SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 28666c321187Smrg [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 28676c321187Smrg [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 28686c321187Smrg $rm -r conftest 2>/dev/null 28696c321187Smrg mkdir conftest 28706c321187Smrg cd conftest 28716c321187Smrg mkdir out 287293493779Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 28736c321187Smrg 28746c321187Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 28756c321187Smrg # Insert the option either (1) after the last *FLAGS variable, or 28766c321187Smrg # (2) before a word containing "conftest.", or (3) at the end. 28776c321187Smrg # Note that $ac_compile itself does not contain backslashes and begins 28786c321187Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 28796c321187Smrg lt_compile=`echo "$ac_compile" | $SED \ 28806c321187Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 28816c321187Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 28826c321187Smrg -e 's:$: $lt_compiler_flag:'` 28836c321187Smrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 28846c321187Smrg (eval "$lt_compile" 2>out/conftest.err) 28856c321187Smrg ac_status=$? 28866c321187Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 28876c321187Smrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 28886c321187Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 28896c321187Smrg then 28906c321187Smrg # The compiler can only warn and ignore the option if not recognized 28916c321187Smrg # So say no if there are warnings 28926c321187Smrg $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp 28936c321187Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 28946c321187Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 28956c321187Smrg _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 28966c321187Smrg fi 28976c321187Smrg fi 28986c321187Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 28996c321187Smrg $rm conftest* 29006c321187Smrg # SGI C++ compiler will create directory out/ii_files/ for 29016c321187Smrg # template instantiation 29026c321187Smrg test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files 29036c321187Smrg $rm out/* && rmdir out 29046c321187Smrg cd .. 29056c321187Smrg rmdir conftest 29066c321187Smrg $rm conftest* 29076c321187Smrg]) 29086c321187Smrg])# AC_LIBTOOL_PROG_CC_C_O 29096c321187Smrg 29106c321187Smrg 29116c321187Smrg# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) 29126c321187Smrg# ----------------------------------------- 29136c321187Smrg# Check to see if we can do hard links to lock some files if needed 29146c321187SmrgAC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], 29156c321187Smrg[AC_REQUIRE([_LT_AC_LOCK])dnl 29166c321187Smrg 29176c321187Smrghard_links="nottested" 29186c321187Smrgif test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 29196c321187Smrg # do not overwrite the value of need_locks provided by the user 29206c321187Smrg AC_MSG_CHECKING([if we can lock with hard links]) 29216c321187Smrg hard_links=yes 29226c321187Smrg $rm conftest* 29236c321187Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 29246c321187Smrg touch conftest.a 29256c321187Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 29266c321187Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 29276c321187Smrg AC_MSG_RESULT([$hard_links]) 29286c321187Smrg if test "$hard_links" = no; then 29296c321187Smrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 29306c321187Smrg need_locks=warn 29316c321187Smrg fi 29326c321187Smrgelse 29336c321187Smrg need_locks=no 29346c321187Smrgfi 29356c321187Smrg])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS 29366c321187Smrg 29376c321187Smrg 29386c321187Smrg# AC_LIBTOOL_OBJDIR 29396c321187Smrg# ----------------- 29406c321187SmrgAC_DEFUN([AC_LIBTOOL_OBJDIR], 29416c321187Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 29426c321187Smrg[rm -f .libs 2>/dev/null 29436c321187Smrgmkdir .libs 2>/dev/null 29446c321187Smrgif test -d .libs; then 29456c321187Smrg lt_cv_objdir=.libs 29466c321187Smrgelse 29476c321187Smrg # MS-DOS does not allow filenames that begin with a dot. 29486c321187Smrg lt_cv_objdir=_libs 29496c321187Smrgfi 29506c321187Smrgrmdir .libs 2>/dev/null]) 29516c321187Smrgobjdir=$lt_cv_objdir 29526c321187Smrg])# AC_LIBTOOL_OBJDIR 29536c321187Smrg 29546c321187Smrg 29556c321187Smrg# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) 29566c321187Smrg# ---------------------------------------------- 29576c321187Smrg# Check hardcoding attributes. 29586c321187SmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], 29596c321187Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 29606c321187Smrg_LT_AC_TAGVAR(hardcode_action, $1)= 29616c321187Smrgif test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ 29626c321187Smrg test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ 29636c321187Smrg test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 29646c321187Smrg 29656c321187Smrg # We can hardcode non-existant directories. 29666c321187Smrg if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && 29676c321187Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 29686c321187Smrg # have to relink, otherwise we might link with an installed library 29696c321187Smrg # when we should be linking with a yet-to-be-installed one 29706c321187Smrg ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && 29716c321187Smrg test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then 29726c321187Smrg # Linking always hardcodes the temporary library directory. 29736c321187Smrg _LT_AC_TAGVAR(hardcode_action, $1)=relink 29746c321187Smrg else 29756c321187Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 29766c321187Smrg _LT_AC_TAGVAR(hardcode_action, $1)=immediate 29776c321187Smrg fi 29786c321187Smrgelse 29796c321187Smrg # We cannot hardcode anything, or else we can only hardcode existing 29806c321187Smrg # directories. 29816c321187Smrg _LT_AC_TAGVAR(hardcode_action, $1)=unsupported 29826c321187Smrgfi 29836c321187SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) 29846c321187Smrg 29856c321187Smrgif test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then 29866c321187Smrg # Fast installation is not supported 29876c321187Smrg enable_fast_install=no 29886c321187Smrgelif test "$shlibpath_overrides_runpath" = yes || 29896c321187Smrg test "$enable_shared" = no; then 29906c321187Smrg # Fast installation is not necessary 29916c321187Smrg enable_fast_install=needless 29926c321187Smrgfi 29936c321187Smrg])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH 29946c321187Smrg 29956c321187Smrg 29966c321187Smrg# AC_LIBTOOL_SYS_LIB_STRIP 29976c321187Smrg# ------------------------ 29986c321187SmrgAC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], 29996c321187Smrg[striplib= 30006c321187Smrgold_striplib= 30016c321187SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 30026c321187Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then 30036c321187Smrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 30046c321187Smrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 30056c321187Smrg AC_MSG_RESULT([yes]) 30066c321187Smrgelse 30076c321187Smrg# FIXME - insert some real tests, host_os isn't really good enough 30086c321187Smrg case $host_os in 30096c321187Smrg darwin*) 30106c321187Smrg if test -n "$STRIP" ; then 30116c321187Smrg striplib="$STRIP -x" 301293493779Smrg old_striplib="$STRIP -S" 30136c321187Smrg AC_MSG_RESULT([yes]) 30146c321187Smrg else 30156c321187Smrg AC_MSG_RESULT([no]) 30166c321187Smrgfi 30176c321187Smrg ;; 30186c321187Smrg *) 30196c321187Smrg AC_MSG_RESULT([no]) 30206c321187Smrg ;; 30216c321187Smrg esac 30226c321187Smrgfi 30236c321187Smrg])# AC_LIBTOOL_SYS_LIB_STRIP 30246c321187Smrg 30256c321187Smrg 30266c321187Smrg# AC_LIBTOOL_SYS_DYNAMIC_LINKER 30276c321187Smrg# ----------------------------- 30286c321187Smrg# PORTME Fill in your ld.so characteristics 30296c321187SmrgAC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], 303093493779Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 303193493779SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 30326c321187Smrglibrary_names_spec= 30336c321187Smrglibname_spec='lib$name' 30346c321187Smrgsoname_spec= 30356c321187Smrgshrext_cmds=".so" 30366c321187Smrgpostinstall_cmds= 30376c321187Smrgpostuninstall_cmds= 30386c321187Smrgfinish_cmds= 30396c321187Smrgfinish_eval= 30406c321187Smrgshlibpath_var= 30416c321187Smrgshlibpath_overrides_runpath=unknown 30426c321187Smrgversion_type=none 30436c321187Smrgdynamic_linker="$host_os ld.so" 30446c321187Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 304593493779Smrgm4_if($1,[],[ 30466c321187Smrgif test "$GCC" = yes; then 304793493779Smrg case $host_os in 304893493779Smrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 304993493779Smrg *) lt_awk_arg="/^libraries:/" ;; 305093493779Smrg esac 305193493779Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` 305293493779Smrg if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then 30536c321187Smrg # if the path contains ";" then we assume it to be the separator 30546c321187Smrg # otherwise default to the standard path separator (i.e. ":") - it is 30556c321187Smrg # assumed that no part of a normal pathname contains ";" but that should 30566c321187Smrg # okay in the real world where ";" in dirpaths is itself problematic. 305793493779Smrg lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` 30586c321187Smrg else 305993493779Smrg lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 30606c321187Smrg fi 306193493779Smrg # Ok, now we have the path, separated by spaces, we can step through it 306293493779Smrg # and add multilib dir if necessary. 306393493779Smrg lt_tmp_lt_search_path_spec= 306493493779Smrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 306593493779Smrg for lt_sys_path in $lt_search_path_spec; do 306693493779Smrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 306793493779Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 306893493779Smrg else 306993493779Smrg test -d "$lt_sys_path" && \ 307093493779Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 307193493779Smrg fi 307293493779Smrg done 307393493779Smrg lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' 307493493779SmrgBEGIN {RS=" "; FS="/|\n";} { 307593493779Smrg lt_foo=""; 307693493779Smrg lt_count=0; 307793493779Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 307893493779Smrg if ($lt_i != "" && $lt_i != ".") { 307993493779Smrg if ($lt_i == "..") { 308093493779Smrg lt_count++; 308193493779Smrg } else { 308293493779Smrg if (lt_count == 0) { 308393493779Smrg lt_foo="/" $lt_i lt_foo; 308493493779Smrg } else { 308593493779Smrg lt_count--; 308693493779Smrg } 308793493779Smrg } 308893493779Smrg } 308993493779Smrg } 309093493779Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 309193493779Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 309293493779Smrg}'` 309393493779Smrg sys_lib_search_path_spec=`echo $lt_search_path_spec` 30946c321187Smrgelse 30956c321187Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 309693493779Smrgfi]) 30976c321187Smrgneed_lib_prefix=unknown 30986c321187Smrghardcode_into_libs=no 30996c321187Smrg 31006c321187Smrg# when you set need_version to no, make sure it does not cause -set_version 31016c321187Smrg# flags to be left without arguments 31026c321187Smrgneed_version=unknown 31036c321187Smrg 31046c321187Smrgcase $host_os in 31056c321187Smrgaix3*) 31066c321187Smrg version_type=linux 31076c321187Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 31086c321187Smrg shlibpath_var=LIBPATH 31096c321187Smrg 31106c321187Smrg # AIX 3 has no versioning support, so we append a major version to the name. 31116c321187Smrg soname_spec='${libname}${release}${shared_ext}$major' 31126c321187Smrg ;; 31136c321187Smrg 311493493779Smrgaix[[4-9]]*) 31156c321187Smrg version_type=linux 31166c321187Smrg need_lib_prefix=no 31176c321187Smrg need_version=no 31186c321187Smrg hardcode_into_libs=yes 31196c321187Smrg if test "$host_cpu" = ia64; then 31206c321187Smrg # AIX 5 supports IA64 31216c321187Smrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 31226c321187Smrg shlibpath_var=LD_LIBRARY_PATH 31236c321187Smrg else 31246c321187Smrg # With GCC up to 2.95.x, collect2 would create an import file 31256c321187Smrg # for dependence libraries. The import file would start with 31266c321187Smrg # the line `#! .'. This would cause the generated library to 31276c321187Smrg # depend on `.', always an invalid library. This was fixed in 31286c321187Smrg # development snapshots of GCC prior to 3.0. 31296c321187Smrg case $host_os in 31306c321187Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 31316c321187Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 31326c321187Smrg echo ' yes ' 31336c321187Smrg echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then 31346c321187Smrg : 31356c321187Smrg else 31366c321187Smrg can_build_shared=no 31376c321187Smrg fi 31386c321187Smrg ;; 31396c321187Smrg esac 31406c321187Smrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 31416c321187Smrg # soname into executable. Probably we can add versioning support to 31426c321187Smrg # collect2, so additional links can be useful in future. 31436c321187Smrg if test "$aix_use_runtimelinking" = yes; then 31446c321187Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 31456c321187Smrg # instead of lib<name>.a to let people know that these are not 31466c321187Smrg # typical AIX shared libraries. 31476c321187Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 31486c321187Smrg else 31496c321187Smrg # We preserve .a as extension for shared libraries through AIX4.2 31506c321187Smrg # and later when we are not doing run time linking. 31516c321187Smrg library_names_spec='${libname}${release}.a $libname.a' 31526c321187Smrg soname_spec='${libname}${release}${shared_ext}$major' 31536c321187Smrg fi 31546c321187Smrg shlibpath_var=LIBPATH 31556c321187Smrg fi 31566c321187Smrg ;; 31576c321187Smrg 31586c321187Smrgamigaos*) 31596c321187Smrg library_names_spec='$libname.ixlibrary $libname.a' 31606c321187Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 31616c321187Smrg finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''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' 31626c321187Smrg ;; 31636c321187Smrg 31646c321187Smrgbeos*) 31656c321187Smrg library_names_spec='${libname}${shared_ext}' 31666c321187Smrg dynamic_linker="$host_os ld.so" 31676c321187Smrg shlibpath_var=LIBRARY_PATH 31686c321187Smrg ;; 31696c321187Smrg 31706c321187Smrgbsdi[[45]]*) 31716c321187Smrg version_type=linux 31726c321187Smrg need_version=no 31736c321187Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 31746c321187Smrg soname_spec='${libname}${release}${shared_ext}$major' 31756c321187Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 31766c321187Smrg shlibpath_var=LD_LIBRARY_PATH 31776c321187Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 31786c321187Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 31796c321187Smrg # the default ld.so.conf also contains /usr/contrib/lib and 31806c321187Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 31816c321187Smrg # libtool to hard-code these into programs 31826c321187Smrg ;; 31836c321187Smrg 31846c321187Smrgcygwin* | mingw* | pw32*) 31856c321187Smrg version_type=windows 31866c321187Smrg shrext_cmds=".dll" 31876c321187Smrg need_version=no 31886c321187Smrg need_lib_prefix=no 31896c321187Smrg 31906c321187Smrg case $GCC,$host_os in 31916c321187Smrg yes,cygwin* | yes,mingw* | yes,pw32*) 31926c321187Smrg library_names_spec='$libname.dll.a' 31936c321187Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 31946c321187Smrg postinstall_cmds='base_file=`basename \${file}`~ 31956c321187Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ 31966c321187Smrg dldir=$destdir/`dirname \$dlpath`~ 31976c321187Smrg test -d \$dldir || mkdir -p \$dldir~ 31986c321187Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 31996c321187Smrg chmod a+x \$dldir/$dlname' 32006c321187Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 32016c321187Smrg dlpath=$dir/\$dldll~ 32026c321187Smrg $rm \$dlpath' 32036c321187Smrg shlibpath_overrides_runpath=yes 32046c321187Smrg 32056c321187Smrg case $host_os in 32066c321187Smrg cygwin*) 32076c321187Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 32086c321187Smrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 32096c321187Smrg sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" 32106c321187Smrg ;; 32116c321187Smrg mingw*) 32126c321187Smrg # MinGW DLLs use traditional 'lib' prefix 32136c321187Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 32146c321187Smrg sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 32156c321187Smrg if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then 32166c321187Smrg # It is most probably a Windows format PATH printed by 32176c321187Smrg # mingw gcc, but we are running on Cygwin. Gcc prints its search 32186c321187Smrg # path with ; separators, and with drive letters. We can handle the 32196c321187Smrg # drive letters (cygwin fileutils understands them), so leave them, 32206c321187Smrg # especially as we might pass files found there to a mingw objdump, 32216c321187Smrg # which wouldn't understand a cygwinified path. Ahh. 32226c321187Smrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 32236c321187Smrg else 32246c321187Smrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 32256c321187Smrg fi 32266c321187Smrg ;; 32276c321187Smrg pw32*) 32286c321187Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 32296c321187Smrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 32306c321187Smrg ;; 32316c321187Smrg esac 32326c321187Smrg ;; 32336c321187Smrg 32346c321187Smrg *) 32356c321187Smrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 32366c321187Smrg ;; 32376c321187Smrg esac 32386c321187Smrg dynamic_linker='Win32 ld.exe' 32396c321187Smrg # FIXME: first we should search . and the directory the executable is in 32406c321187Smrg shlibpath_var=PATH 32416c321187Smrg ;; 32426c321187Smrg 32436c321187Smrgdarwin* | rhapsody*) 32446c321187Smrg dynamic_linker="$host_os dyld" 32456c321187Smrg version_type=darwin 32466c321187Smrg need_lib_prefix=no 32476c321187Smrg need_version=no 32486c321187Smrg library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' 32496c321187Smrg soname_spec='${libname}${release}${major}$shared_ext' 32506c321187Smrg shlibpath_overrides_runpath=yes 32516c321187Smrg shlibpath_var=DYLD_LIBRARY_PATH 32526c321187Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 325393493779Smrg m4_if([$1], [],[ 325493493779Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 32556c321187Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 32566c321187Smrg ;; 32576c321187Smrg 32586c321187Smrgdgux*) 32596c321187Smrg version_type=linux 32606c321187Smrg need_lib_prefix=no 32616c321187Smrg need_version=no 32626c321187Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 32636c321187Smrg soname_spec='${libname}${release}${shared_ext}$major' 32646c321187Smrg shlibpath_var=LD_LIBRARY_PATH 32656c321187Smrg ;; 32666c321187Smrg 32676c321187Smrgfreebsd1*) 32686c321187Smrg dynamic_linker=no 32696c321187Smrg ;; 32706c321187Smrg 32716c321187Smrgfreebsd* | dragonfly*) 32726c321187Smrg # DragonFly does not have aout. When/if they implement a new 32736c321187Smrg # versioning mechanism, adjust this. 32746c321187Smrg if test -x /usr/bin/objformat; then 32756c321187Smrg objformat=`/usr/bin/objformat` 32766c321187Smrg else 32776c321187Smrg case $host_os in 32786c321187Smrg freebsd[[123]]*) objformat=aout ;; 32796c321187Smrg *) objformat=elf ;; 32806c321187Smrg esac 32816c321187Smrg fi 32826c321187Smrg version_type=freebsd-$objformat 32836c321187Smrg case $version_type in 32846c321187Smrg freebsd-elf*) 32856c321187Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 32866c321187Smrg need_version=no 32876c321187Smrg need_lib_prefix=no 32886c321187Smrg ;; 32896c321187Smrg freebsd-*) 32906c321187Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 32916c321187Smrg need_version=yes 32926c321187Smrg ;; 32936c321187Smrg esac 32946c321187Smrg shlibpath_var=LD_LIBRARY_PATH 32956c321187Smrg case $host_os in 32966c321187Smrg freebsd2*) 32976c321187Smrg shlibpath_overrides_runpath=yes 32986c321187Smrg ;; 32996c321187Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 33006c321187Smrg shlibpath_overrides_runpath=yes 33016c321187Smrg hardcode_into_libs=yes 33026c321187Smrg ;; 33036c321187Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 33046c321187Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 33056c321187Smrg shlibpath_overrides_runpath=no 33066c321187Smrg hardcode_into_libs=yes 33076c321187Smrg ;; 330893493779Smrg *) # from 4.6 on, and DragonFly 33096c321187Smrg shlibpath_overrides_runpath=yes 33106c321187Smrg hardcode_into_libs=yes 33116c321187Smrg ;; 33126c321187Smrg esac 33136c321187Smrg ;; 33146c321187Smrg 33156c321187Smrggnu*) 33166c321187Smrg version_type=linux 33176c321187Smrg need_lib_prefix=no 33186c321187Smrg need_version=no 33196c321187Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 33206c321187Smrg soname_spec='${libname}${release}${shared_ext}$major' 33216c321187Smrg shlibpath_var=LD_LIBRARY_PATH 33226c321187Smrg hardcode_into_libs=yes 33236c321187Smrg ;; 33246c321187Smrg 33256c321187Smrghpux9* | hpux10* | hpux11*) 33266c321187Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 33276c321187Smrg # link against other versions. 33286c321187Smrg version_type=sunos 33296c321187Smrg need_lib_prefix=no 33306c321187Smrg need_version=no 33316c321187Smrg case $host_cpu in 33326c321187Smrg ia64*) 33336c321187Smrg shrext_cmds='.so' 33346c321187Smrg hardcode_into_libs=yes 33356c321187Smrg dynamic_linker="$host_os dld.so" 33366c321187Smrg shlibpath_var=LD_LIBRARY_PATH 33376c321187Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 33386c321187Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 33396c321187Smrg soname_spec='${libname}${release}${shared_ext}$major' 33406c321187Smrg if test "X$HPUX_IA64_MODE" = X32; then 33416c321187Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 33426c321187Smrg else 33436c321187Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 33446c321187Smrg fi 33456c321187Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 33466c321187Smrg ;; 33476c321187Smrg hppa*64*) 33486c321187Smrg shrext_cmds='.sl' 33496c321187Smrg hardcode_into_libs=yes 33506c321187Smrg dynamic_linker="$host_os dld.sl" 33516c321187Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 33526c321187Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 33536c321187Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 33546c321187Smrg soname_spec='${libname}${release}${shared_ext}$major' 33556c321187Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 33566c321187Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 33576c321187Smrg ;; 33586c321187Smrg *) 33596c321187Smrg shrext_cmds='.sl' 33606c321187Smrg dynamic_linker="$host_os dld.sl" 33616c321187Smrg shlibpath_var=SHLIB_PATH 33626c321187Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 33636c321187Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 33646c321187Smrg soname_spec='${libname}${release}${shared_ext}$major' 33656c321187Smrg ;; 33666c321187Smrg esac 33676c321187Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555. 33686c321187Smrg postinstall_cmds='chmod 555 $lib' 33696c321187Smrg ;; 33706c321187Smrg 337193493779Smrginterix[[3-9]]*) 33726c321187Smrg version_type=linux 33736c321187Smrg need_lib_prefix=no 33746c321187Smrg need_version=no 33756c321187Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 33766c321187Smrg soname_spec='${libname}${release}${shared_ext}$major' 33776c321187Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 33786c321187Smrg shlibpath_var=LD_LIBRARY_PATH 33796c321187Smrg shlibpath_overrides_runpath=no 33806c321187Smrg hardcode_into_libs=yes 33816c321187Smrg ;; 33826c321187Smrg 33836c321187Smrgirix5* | irix6* | nonstopux*) 33846c321187Smrg case $host_os in 33856c321187Smrg nonstopux*) version_type=nonstopux ;; 33866c321187Smrg *) 33876c321187Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 33886c321187Smrg version_type=linux 33896c321187Smrg else 33906c321187Smrg version_type=irix 33916c321187Smrg fi ;; 33926c321187Smrg esac 33936c321187Smrg need_lib_prefix=no 33946c321187Smrg need_version=no 33956c321187Smrg soname_spec='${libname}${release}${shared_ext}$major' 33966c321187Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 33976c321187Smrg case $host_os in 33986c321187Smrg irix5* | nonstopux*) 33996c321187Smrg libsuff= shlibsuff= 34006c321187Smrg ;; 34016c321187Smrg *) 34026c321187Smrg case $LD in # libtool.m4 will add one of these switches to LD 34036c321187Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 34046c321187Smrg libsuff= shlibsuff= libmagic=32-bit;; 34056c321187Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 34066c321187Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 34076c321187Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 34086c321187Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 34096c321187Smrg *) libsuff= shlibsuff= libmagic=never-match;; 34106c321187Smrg esac 34116c321187Smrg ;; 34126c321187Smrg esac 34136c321187Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 34146c321187Smrg shlibpath_overrides_runpath=no 34156c321187Smrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 34166c321187Smrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 34176c321187Smrg hardcode_into_libs=yes 34186c321187Smrg ;; 34196c321187Smrg 34206c321187Smrg# No shared lib support for Linux oldld, aout, or coff. 34216c321187Smrglinux*oldld* | linux*aout* | linux*coff*) 34226c321187Smrg dynamic_linker=no 34236c321187Smrg ;; 34246c321187Smrg 34256c321187Smrg# This must be Linux ELF. 342693493779Smrglinux* | k*bsd*-gnu) 34276c321187Smrg version_type=linux 34286c321187Smrg need_lib_prefix=no 34296c321187Smrg need_version=no 34306c321187Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 34316c321187Smrg soname_spec='${libname}${release}${shared_ext}$major' 34326c321187Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 34336c321187Smrg shlibpath_var=LD_LIBRARY_PATH 34346c321187Smrg shlibpath_overrides_runpath=no 34356c321187Smrg # This implies no fast_install, which is unacceptable. 34366c321187Smrg # Some rework will be needed to allow for fast_install 34376c321187Smrg # before this can be enabled. 34386c321187Smrg hardcode_into_libs=yes 34396c321187Smrg 34406c321187Smrg # Append ld.so.conf contents to the search path 34416c321187Smrg if test -f /etc/ld.so.conf; then 344293493779Smrg 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;/^$/d' | tr '\n' ' '` 34436c321187Smrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 34446c321187Smrg fi 34456c321187Smrg 34466c321187Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 34476c321187Smrg # powerpc, because MkLinux only supported shared libraries with the 34486c321187Smrg # GNU dynamic linker. Since this was broken with cross compilers, 34496c321187Smrg # most powerpc-linux boxes support dynamic linking these days and 34506c321187Smrg # people can always --disable-shared, the test was removed, and we 34516c321187Smrg # assume the GNU/Linux dynamic linker is in use. 34526c321187Smrg dynamic_linker='GNU/Linux ld.so' 34536c321187Smrg ;; 34546c321187Smrg 34556c321187Smrgnetbsd*) 34566c321187Smrg version_type=sunos 34576c321187Smrg need_lib_prefix=no 34586c321187Smrg need_version=no 34596c321187Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 34606c321187Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 34616c321187Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 34626c321187Smrg dynamic_linker='NetBSD (a.out) ld.so' 34636c321187Smrg else 34646c321187Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 34656c321187Smrg soname_spec='${libname}${release}${shared_ext}$major' 34666c321187Smrg dynamic_linker='NetBSD ld.elf_so' 34676c321187Smrg fi 34686c321187Smrg shlibpath_var=LD_LIBRARY_PATH 34696c321187Smrg shlibpath_overrides_runpath=yes 34706c321187Smrg hardcode_into_libs=yes 34716c321187Smrg ;; 34726c321187Smrg 34736c321187Smrgnewsos6) 34746c321187Smrg version_type=linux 34756c321187Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 34766c321187Smrg shlibpath_var=LD_LIBRARY_PATH 34776c321187Smrg shlibpath_overrides_runpath=yes 34786c321187Smrg ;; 34796c321187Smrg 34806c321187Smrgnto-qnx*) 34816c321187Smrg version_type=linux 34826c321187Smrg need_lib_prefix=no 34836c321187Smrg need_version=no 34846c321187Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 34856c321187Smrg soname_spec='${libname}${release}${shared_ext}$major' 34866c321187Smrg shlibpath_var=LD_LIBRARY_PATH 34876c321187Smrg shlibpath_overrides_runpath=yes 34886c321187Smrg ;; 34896c321187Smrg 34906c321187Smrgopenbsd*) 34916c321187Smrg version_type=sunos 34926c321187Smrg sys_lib_dlsearch_path_spec="/usr/lib" 34936c321187Smrg need_lib_prefix=no 34946c321187Smrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 34956c321187Smrg case $host_os in 34966c321187Smrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 34976c321187Smrg *) need_version=no ;; 34986c321187Smrg esac 34996c321187Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 35006c321187Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 35016c321187Smrg shlibpath_var=LD_LIBRARY_PATH 35026c321187Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 35036c321187Smrg case $host_os in 35046c321187Smrg openbsd2.[[89]] | openbsd2.[[89]].*) 35056c321187Smrg shlibpath_overrides_runpath=no 35066c321187Smrg ;; 35076c321187Smrg *) 35086c321187Smrg shlibpath_overrides_runpath=yes 35096c321187Smrg ;; 35106c321187Smrg esac 35116c321187Smrg else 35126c321187Smrg shlibpath_overrides_runpath=yes 35136c321187Smrg fi 35146c321187Smrg ;; 35156c321187Smrg 35166c321187Smrgos2*) 35176c321187Smrg libname_spec='$name' 35186c321187Smrg shrext_cmds=".dll" 35196c321187Smrg need_lib_prefix=no 35206c321187Smrg library_names_spec='$libname${shared_ext} $libname.a' 35216c321187Smrg dynamic_linker='OS/2 ld.exe' 35226c321187Smrg shlibpath_var=LIBPATH 35236c321187Smrg ;; 35246c321187Smrg 35256c321187Smrgosf3* | osf4* | osf5*) 35266c321187Smrg version_type=osf 35276c321187Smrg need_lib_prefix=no 35286c321187Smrg need_version=no 35296c321187Smrg soname_spec='${libname}${release}${shared_ext}$major' 35306c321187Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 35316c321187Smrg shlibpath_var=LD_LIBRARY_PATH 35326c321187Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 35336c321187Smrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 35346c321187Smrg ;; 35356c321187Smrg 353693493779Smrgrdos*) 353793493779Smrg dynamic_linker=no 353893493779Smrg ;; 353993493779Smrg 35406c321187Smrgsolaris*) 35416c321187Smrg version_type=linux 35426c321187Smrg need_lib_prefix=no 35436c321187Smrg need_version=no 35446c321187Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 35456c321187Smrg soname_spec='${libname}${release}${shared_ext}$major' 35466c321187Smrg shlibpath_var=LD_LIBRARY_PATH 35476c321187Smrg shlibpath_overrides_runpath=yes 35486c321187Smrg hardcode_into_libs=yes 35496c321187Smrg # ldd complains unless libraries are executable 35506c321187Smrg postinstall_cmds='chmod +x $lib' 35516c321187Smrg ;; 35526c321187Smrg 35536c321187Smrgsunos4*) 35546c321187Smrg version_type=sunos 35556c321187Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 35566c321187Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 35576c321187Smrg shlibpath_var=LD_LIBRARY_PATH 35586c321187Smrg shlibpath_overrides_runpath=yes 35596c321187Smrg if test "$with_gnu_ld" = yes; then 35606c321187Smrg need_lib_prefix=no 35616c321187Smrg fi 35626c321187Smrg need_version=yes 35636c321187Smrg ;; 35646c321187Smrg 35656c321187Smrgsysv4 | sysv4.3*) 35666c321187Smrg version_type=linux 35676c321187Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 35686c321187Smrg soname_spec='${libname}${release}${shared_ext}$major' 35696c321187Smrg shlibpath_var=LD_LIBRARY_PATH 35706c321187Smrg case $host_vendor in 35716c321187Smrg sni) 35726c321187Smrg shlibpath_overrides_runpath=no 35736c321187Smrg need_lib_prefix=no 35746c321187Smrg export_dynamic_flag_spec='${wl}-Blargedynsym' 35756c321187Smrg runpath_var=LD_RUN_PATH 35766c321187Smrg ;; 35776c321187Smrg siemens) 35786c321187Smrg need_lib_prefix=no 35796c321187Smrg ;; 35806c321187Smrg motorola) 35816c321187Smrg need_lib_prefix=no 35826c321187Smrg need_version=no 35836c321187Smrg shlibpath_overrides_runpath=no 35846c321187Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 35856c321187Smrg ;; 35866c321187Smrg esac 35876c321187Smrg ;; 35886c321187Smrg 35896c321187Smrgsysv4*MP*) 35906c321187Smrg if test -d /usr/nec ;then 35916c321187Smrg version_type=linux 35926c321187Smrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 35936c321187Smrg soname_spec='$libname${shared_ext}.$major' 35946c321187Smrg shlibpath_var=LD_LIBRARY_PATH 35956c321187Smrg fi 35966c321187Smrg ;; 35976c321187Smrg 35986c321187Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 35996c321187Smrg version_type=freebsd-elf 36006c321187Smrg need_lib_prefix=no 36016c321187Smrg need_version=no 36026c321187Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 36036c321187Smrg soname_spec='${libname}${release}${shared_ext}$major' 36046c321187Smrg shlibpath_var=LD_LIBRARY_PATH 36056c321187Smrg hardcode_into_libs=yes 36066c321187Smrg if test "$with_gnu_ld" = yes; then 36076c321187Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 36086c321187Smrg shlibpath_overrides_runpath=no 36096c321187Smrg else 36106c321187Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 36116c321187Smrg shlibpath_overrides_runpath=yes 36126c321187Smrg case $host_os in 36136c321187Smrg sco3.2v5*) 36146c321187Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 36156c321187Smrg ;; 36166c321187Smrg esac 36176c321187Smrg fi 36186c321187Smrg sys_lib_dlsearch_path_spec='/usr/lib' 36196c321187Smrg ;; 36206c321187Smrg 36216c321187Smrguts4*) 36226c321187Smrg version_type=linux 36236c321187Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 36246c321187Smrg soname_spec='${libname}${release}${shared_ext}$major' 36256c321187Smrg shlibpath_var=LD_LIBRARY_PATH 36266c321187Smrg ;; 36276c321187Smrg 36286c321187Smrg*) 36296c321187Smrg dynamic_linker=no 36306c321187Smrg ;; 36316c321187Smrgesac 36326c321187SmrgAC_MSG_RESULT([$dynamic_linker]) 36336c321187Smrgtest "$dynamic_linker" = no && can_build_shared=no 36346c321187Smrg 363593493779SmrgAC_CACHE_VAL([lt_cv_sys_lib_search_path_spec], 363693493779Smrg[lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"]) 363793493779Smrgsys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 363893493779SmrgAC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec], 363993493779Smrg[lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"]) 364093493779Smrgsys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 364193493779Smrg 36426c321187Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 36436c321187Smrgif test "$GCC" = yes; then 36446c321187Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 36456c321187Smrgfi 36466c321187Smrg])# AC_LIBTOOL_SYS_DYNAMIC_LINKER 36476c321187Smrg 36486c321187Smrg 36496c321187Smrg# _LT_AC_TAGCONFIG 36506c321187Smrg# ---------------- 36516c321187SmrgAC_DEFUN([_LT_AC_TAGCONFIG], 365293493779Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 365393493779SmrgAC_ARG_WITH([tags], 36546c321187Smrg [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], 36556c321187Smrg [include additional configurations @<:@automatic@:>@])], 36566c321187Smrg [tagnames="$withval"]) 36576c321187Smrg 36586c321187Smrgif test -f "$ltmain" && test -n "$tagnames"; then 36596c321187Smrg if test ! -f "${ofile}"; then 36606c321187Smrg AC_MSG_WARN([output file `$ofile' does not exist]) 36616c321187Smrg fi 36626c321187Smrg 36636c321187Smrg if test -z "$LTCC"; then 36646c321187Smrg eval "`$SHELL ${ofile} --config | grep '^LTCC='`" 36656c321187Smrg if test -z "$LTCC"; then 36666c321187Smrg AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) 36676c321187Smrg else 36686c321187Smrg AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) 36696c321187Smrg fi 36706c321187Smrg fi 36716c321187Smrg if test -z "$LTCFLAGS"; then 36726c321187Smrg eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" 36736c321187Smrg fi 36746c321187Smrg 36756c321187Smrg # Extract list of available tagged configurations in $ofile. 36766c321187Smrg # Note that this assumes the entire list is on one line. 36776c321187Smrg available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` 36786c321187Smrg 36796c321187Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 36806c321187Smrg for tagname in $tagnames; do 36816c321187Smrg IFS="$lt_save_ifs" 36826c321187Smrg # Check whether tagname contains only valid characters 36836c321187Smrg case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in 36846c321187Smrg "") ;; 36856c321187Smrg *) AC_MSG_ERROR([invalid tag name: $tagname]) 36866c321187Smrg ;; 36876c321187Smrg esac 36886c321187Smrg 36896c321187Smrg if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null 36906c321187Smrg then 36916c321187Smrg AC_MSG_ERROR([tag name \"$tagname\" already exists]) 36926c321187Smrg fi 36936c321187Smrg 36946c321187Smrg # Update the list of available tags. 36956c321187Smrg if test -n "$tagname"; then 36966c321187Smrg echo appending configuration tag \"$tagname\" to $ofile 36976c321187Smrg 36986c321187Smrg case $tagname in 36996c321187Smrg CXX) 37006c321187Smrg if test -n "$CXX" && ( test "X$CXX" != "Xno" && 37016c321187Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 37026c321187Smrg (test "X$CXX" != "Xg++"))) ; then 37036c321187Smrg AC_LIBTOOL_LANG_CXX_CONFIG 37046c321187Smrg else 37056c321187Smrg tagname="" 37066c321187Smrg fi 37076c321187Smrg ;; 37086c321187Smrg 37096c321187Smrg F77) 37106c321187Smrg if test -n "$F77" && test "X$F77" != "Xno"; then 37116c321187Smrg AC_LIBTOOL_LANG_F77_CONFIG 37126c321187Smrg else 37136c321187Smrg tagname="" 37146c321187Smrg fi 37156c321187Smrg ;; 37166c321187Smrg 37176c321187Smrg GCJ) 37186c321187Smrg if test -n "$GCJ" && test "X$GCJ" != "Xno"; then 37196c321187Smrg AC_LIBTOOL_LANG_GCJ_CONFIG 37206c321187Smrg else 37216c321187Smrg tagname="" 37226c321187Smrg fi 37236c321187Smrg ;; 37246c321187Smrg 37256c321187Smrg RC) 37266c321187Smrg AC_LIBTOOL_LANG_RC_CONFIG 37276c321187Smrg ;; 37286c321187Smrg 37296c321187Smrg *) 37306c321187Smrg AC_MSG_ERROR([Unsupported tag name: $tagname]) 37316c321187Smrg ;; 37326c321187Smrg esac 37336c321187Smrg 37346c321187Smrg # Append the new tag name to the list of available tags. 37356c321187Smrg if test -n "$tagname" ; then 37366c321187Smrg available_tags="$available_tags $tagname" 37376c321187Smrg fi 37386c321187Smrg fi 37396c321187Smrg done 37406c321187Smrg IFS="$lt_save_ifs" 37416c321187Smrg 37426c321187Smrg # Now substitute the updated list of available tags. 37436c321187Smrg if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then 37446c321187Smrg mv "${ofile}T" "$ofile" 37456c321187Smrg chmod +x "$ofile" 37466c321187Smrg else 37476c321187Smrg rm -f "${ofile}T" 37486c321187Smrg AC_MSG_ERROR([unable to update list of available tagged configurations.]) 37496c321187Smrg fi 37506c321187Smrgfi 37516c321187Smrg])# _LT_AC_TAGCONFIG 37526c321187Smrg 37536c321187Smrg 37546c321187Smrg# AC_LIBTOOL_DLOPEN 37556c321187Smrg# ----------------- 37566c321187Smrg# enable checks for dlopen support 37576c321187SmrgAC_DEFUN([AC_LIBTOOL_DLOPEN], 37586c321187Smrg [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) 37596c321187Smrg])# AC_LIBTOOL_DLOPEN 37606c321187Smrg 37616c321187Smrg 37626c321187Smrg# AC_LIBTOOL_WIN32_DLL 37636c321187Smrg# -------------------- 37646c321187Smrg# declare package support for building win32 DLLs 37656c321187SmrgAC_DEFUN([AC_LIBTOOL_WIN32_DLL], 37666c321187Smrg[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) 37676c321187Smrg])# AC_LIBTOOL_WIN32_DLL 37686c321187Smrg 37696c321187Smrg 37706c321187Smrg# AC_ENABLE_SHARED([DEFAULT]) 37716c321187Smrg# --------------------------- 37726c321187Smrg# implement the --enable-shared flag 37736c321187Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 37746c321187SmrgAC_DEFUN([AC_ENABLE_SHARED], 37756c321187Smrg[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl 37766c321187SmrgAC_ARG_ENABLE([shared], 37776c321187Smrg [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 37786c321187Smrg [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], 37796c321187Smrg [p=${PACKAGE-default} 37806c321187Smrg case $enableval in 37816c321187Smrg yes) enable_shared=yes ;; 37826c321187Smrg no) enable_shared=no ;; 37836c321187Smrg *) 37846c321187Smrg enable_shared=no 37856c321187Smrg # Look at the argument we got. We use all the common list separators. 37866c321187Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 37876c321187Smrg for pkg in $enableval; do 37886c321187Smrg IFS="$lt_save_ifs" 37896c321187Smrg if test "X$pkg" = "X$p"; then 37906c321187Smrg enable_shared=yes 37916c321187Smrg fi 37926c321187Smrg done 37936c321187Smrg IFS="$lt_save_ifs" 37946c321187Smrg ;; 37956c321187Smrg esac], 37966c321187Smrg [enable_shared=]AC_ENABLE_SHARED_DEFAULT) 37976c321187Smrg])# AC_ENABLE_SHARED 37986c321187Smrg 37996c321187Smrg 38006c321187Smrg# AC_DISABLE_SHARED 38016c321187Smrg# ----------------- 38026c321187Smrg# set the default shared flag to --disable-shared 38036c321187SmrgAC_DEFUN([AC_DISABLE_SHARED], 38046c321187Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 38056c321187SmrgAC_ENABLE_SHARED(no) 38066c321187Smrg])# AC_DISABLE_SHARED 38076c321187Smrg 38086c321187Smrg 38096c321187Smrg# AC_ENABLE_STATIC([DEFAULT]) 38106c321187Smrg# --------------------------- 38116c321187Smrg# implement the --enable-static flag 38126c321187Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 38136c321187SmrgAC_DEFUN([AC_ENABLE_STATIC], 38146c321187Smrg[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl 38156c321187SmrgAC_ARG_ENABLE([static], 38166c321187Smrg [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], 38176c321187Smrg [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], 38186c321187Smrg [p=${PACKAGE-default} 38196c321187Smrg case $enableval in 38206c321187Smrg yes) enable_static=yes ;; 38216c321187Smrg no) enable_static=no ;; 38226c321187Smrg *) 38236c321187Smrg enable_static=no 38246c321187Smrg # Look at the argument we got. We use all the common list separators. 38256c321187Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 38266c321187Smrg for pkg in $enableval; do 38276c321187Smrg IFS="$lt_save_ifs" 38286c321187Smrg if test "X$pkg" = "X$p"; then 38296c321187Smrg enable_static=yes 38306c321187Smrg fi 38316c321187Smrg done 38326c321187Smrg IFS="$lt_save_ifs" 38336c321187Smrg ;; 38346c321187Smrg esac], 38356c321187Smrg [enable_static=]AC_ENABLE_STATIC_DEFAULT) 38366c321187Smrg])# AC_ENABLE_STATIC 38376c321187Smrg 38386c321187Smrg 38396c321187Smrg# AC_DISABLE_STATIC 38406c321187Smrg# ----------------- 38416c321187Smrg# set the default static flag to --disable-static 38426c321187SmrgAC_DEFUN([AC_DISABLE_STATIC], 38436c321187Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 38446c321187SmrgAC_ENABLE_STATIC(no) 38456c321187Smrg])# AC_DISABLE_STATIC 38466c321187Smrg 38476c321187Smrg 38486c321187Smrg# AC_ENABLE_FAST_INSTALL([DEFAULT]) 38496c321187Smrg# --------------------------------- 38506c321187Smrg# implement the --enable-fast-install flag 38516c321187Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 38526c321187SmrgAC_DEFUN([AC_ENABLE_FAST_INSTALL], 38536c321187Smrg[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl 38546c321187SmrgAC_ARG_ENABLE([fast-install], 38556c321187Smrg [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 38566c321187Smrg [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 38576c321187Smrg [p=${PACKAGE-default} 38586c321187Smrg case $enableval in 38596c321187Smrg yes) enable_fast_install=yes ;; 38606c321187Smrg no) enable_fast_install=no ;; 38616c321187Smrg *) 38626c321187Smrg enable_fast_install=no 38636c321187Smrg # Look at the argument we got. We use all the common list separators. 38646c321187Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 38656c321187Smrg for pkg in $enableval; do 38666c321187Smrg IFS="$lt_save_ifs" 38676c321187Smrg if test "X$pkg" = "X$p"; then 38686c321187Smrg enable_fast_install=yes 38696c321187Smrg fi 38706c321187Smrg done 38716c321187Smrg IFS="$lt_save_ifs" 38726c321187Smrg ;; 38736c321187Smrg esac], 38746c321187Smrg [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) 38756c321187Smrg])# AC_ENABLE_FAST_INSTALL 38766c321187Smrg 38776c321187Smrg 38786c321187Smrg# AC_DISABLE_FAST_INSTALL 38796c321187Smrg# ----------------------- 38806c321187Smrg# set the default to --disable-fast-install 38816c321187SmrgAC_DEFUN([AC_DISABLE_FAST_INSTALL], 38826c321187Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 38836c321187SmrgAC_ENABLE_FAST_INSTALL(no) 38846c321187Smrg])# AC_DISABLE_FAST_INSTALL 38856c321187Smrg 38866c321187Smrg 38876c321187Smrg# AC_LIBTOOL_PICMODE([MODE]) 38886c321187Smrg# -------------------------- 38896c321187Smrg# implement the --with-pic flag 38906c321187Smrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 38916c321187SmrgAC_DEFUN([AC_LIBTOOL_PICMODE], 38926c321187Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 38936c321187Smrgpic_mode=ifelse($#,1,$1,default) 38946c321187Smrg])# AC_LIBTOOL_PICMODE 38956c321187Smrg 38966c321187Smrg 38976c321187Smrg# AC_PROG_EGREP 38986c321187Smrg# ------------- 38996c321187Smrg# This is predefined starting with Autoconf 2.54, so this conditional 39006c321187Smrg# definition can be removed once we require Autoconf 2.54 or later. 39016c321187Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], 39026c321187Smrg[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], 39036c321187Smrg [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 39046c321187Smrg then ac_cv_prog_egrep='grep -E' 39056c321187Smrg else ac_cv_prog_egrep='egrep' 39066c321187Smrg fi]) 39076c321187Smrg EGREP=$ac_cv_prog_egrep 39086c321187Smrg AC_SUBST([EGREP]) 39096c321187Smrg])]) 39106c321187Smrg 39116c321187Smrg 39126c321187Smrg# AC_PATH_TOOL_PREFIX 39136c321187Smrg# ------------------- 391493493779Smrg# find a file program which can recognize shared library 39156c321187SmrgAC_DEFUN([AC_PATH_TOOL_PREFIX], 39166c321187Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 39176c321187SmrgAC_MSG_CHECKING([for $1]) 39186c321187SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 39196c321187Smrg[case $MAGIC_CMD in 39206c321187Smrg[[\\/*] | ?:[\\/]*]) 39216c321187Smrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 39226c321187Smrg ;; 39236c321187Smrg*) 39246c321187Smrg lt_save_MAGIC_CMD="$MAGIC_CMD" 39256c321187Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 39266c321187Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 39276c321187Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 39286c321187Smrgdnl not every word. This closes a longstanding sh security hole. 39296c321187Smrg ac_dummy="ifelse([$2], , $PATH, [$2])" 39306c321187Smrg for ac_dir in $ac_dummy; do 39316c321187Smrg IFS="$lt_save_ifs" 39326c321187Smrg test -z "$ac_dir" && ac_dir=. 39336c321187Smrg if test -f $ac_dir/$1; then 39346c321187Smrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 39356c321187Smrg if test -n "$file_magic_test_file"; then 39366c321187Smrg case $deplibs_check_method in 39376c321187Smrg "file_magic "*) 39386c321187Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 39396c321187Smrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 39406c321187Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 39416c321187Smrg $EGREP "$file_magic_regex" > /dev/null; then 39426c321187Smrg : 39436c321187Smrg else 39446c321187Smrg cat <<EOF 1>&2 39456c321187Smrg 39466c321187Smrg*** Warning: the command libtool uses to detect shared libraries, 39476c321187Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 39486c321187Smrg*** The result is that libtool may fail to recognize shared libraries 39496c321187Smrg*** as such. This will affect the creation of libtool libraries that 39506c321187Smrg*** depend on shared libraries, but programs linked with such libtool 39516c321187Smrg*** libraries will work regardless of this problem. Nevertheless, you 39526c321187Smrg*** may want to report the problem to your system manager and/or to 39536c321187Smrg*** bug-libtool@gnu.org 39546c321187Smrg 39556c321187SmrgEOF 39566c321187Smrg fi ;; 39576c321187Smrg esac 39586c321187Smrg fi 39596c321187Smrg break 39606c321187Smrg fi 39616c321187Smrg done 39626c321187Smrg IFS="$lt_save_ifs" 39636c321187Smrg MAGIC_CMD="$lt_save_MAGIC_CMD" 39646c321187Smrg ;; 39656c321187Smrgesac]) 39666c321187SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 39676c321187Smrgif test -n "$MAGIC_CMD"; then 39686c321187Smrg AC_MSG_RESULT($MAGIC_CMD) 39696c321187Smrgelse 39706c321187Smrg AC_MSG_RESULT(no) 39716c321187Smrgfi 39726c321187Smrg])# AC_PATH_TOOL_PREFIX 39736c321187Smrg 39746c321187Smrg 39756c321187Smrg# AC_PATH_MAGIC 39766c321187Smrg# ------------- 397793493779Smrg# find a file program which can recognize a shared library 39786c321187SmrgAC_DEFUN([AC_PATH_MAGIC], 39796c321187Smrg[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 39806c321187Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 39816c321187Smrg if test -n "$ac_tool_prefix"; then 39826c321187Smrg AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 39836c321187Smrg else 39846c321187Smrg MAGIC_CMD=: 39856c321187Smrg fi 39866c321187Smrgfi 39876c321187Smrg])# AC_PATH_MAGIC 39886c321187Smrg 39896c321187Smrg 39906c321187Smrg# AC_PROG_LD 39916c321187Smrg# ---------- 39926c321187Smrg# find the pathname to the GNU or non-GNU linker 39936c321187SmrgAC_DEFUN([AC_PROG_LD], 39946c321187Smrg[AC_ARG_WITH([gnu-ld], 39956c321187Smrg [AC_HELP_STRING([--with-gnu-ld], 39966c321187Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 39976c321187Smrg [test "$withval" = no || with_gnu_ld=yes], 39986c321187Smrg [with_gnu_ld=no]) 39996c321187SmrgAC_REQUIRE([LT_AC_PROG_SED])dnl 40006c321187SmrgAC_REQUIRE([AC_PROG_CC])dnl 40016c321187SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 40026c321187SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 40036c321187Smrgac_prog=ld 40046c321187Smrgif test "$GCC" = yes; then 40056c321187Smrg # Check if gcc -print-prog-name=ld gives a path. 40066c321187Smrg AC_MSG_CHECKING([for ld used by $CC]) 40076c321187Smrg case $host in 40086c321187Smrg *-*-mingw*) 40096c321187Smrg # gcc leaves a trailing carriage return which upsets mingw 40106c321187Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 40116c321187Smrg *) 40126c321187Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 40136c321187Smrg esac 40146c321187Smrg case $ac_prog in 40156c321187Smrg # Accept absolute paths. 40166c321187Smrg [[\\/]]* | ?:[[\\/]]*) 40176c321187Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 40186c321187Smrg # Canonicalize the pathname of ld 40196c321187Smrg ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` 40206c321187Smrg while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do 40216c321187Smrg ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` 40226c321187Smrg done 40236c321187Smrg test -z "$LD" && LD="$ac_prog" 40246c321187Smrg ;; 40256c321187Smrg "") 40266c321187Smrg # If it fails, then pretend we aren't using GCC. 40276c321187Smrg ac_prog=ld 40286c321187Smrg ;; 40296c321187Smrg *) 40306c321187Smrg # If it is relative, then search for the first ld in PATH. 40316c321187Smrg with_gnu_ld=unknown 40326c321187Smrg ;; 40336c321187Smrg esac 40346c321187Smrgelif test "$with_gnu_ld" = yes; then 40356c321187Smrg AC_MSG_CHECKING([for GNU ld]) 40366c321187Smrgelse 40376c321187Smrg AC_MSG_CHECKING([for non-GNU ld]) 40386c321187Smrgfi 40396c321187SmrgAC_CACHE_VAL(lt_cv_path_LD, 40406c321187Smrg[if test -z "$LD"; then 40416c321187Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 40426c321187Smrg for ac_dir in $PATH; do 40436c321187Smrg IFS="$lt_save_ifs" 40446c321187Smrg test -z "$ac_dir" && ac_dir=. 40456c321187Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 40466c321187Smrg lt_cv_path_LD="$ac_dir/$ac_prog" 40476c321187Smrg # Check to see if the program is GNU ld. I'd rather use --version, 40486c321187Smrg # but apparently some variants of GNU ld only accept -v. 40496c321187Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 40506c321187Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 40516c321187Smrg *GNU* | *'with BFD'*) 40526c321187Smrg test "$with_gnu_ld" != no && break 40536c321187Smrg ;; 40546c321187Smrg *) 40556c321187Smrg test "$with_gnu_ld" != yes && break 40566c321187Smrg ;; 40576c321187Smrg esac 40586c321187Smrg fi 40596c321187Smrg done 40606c321187Smrg IFS="$lt_save_ifs" 40616c321187Smrgelse 40626c321187Smrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 40636c321187Smrgfi]) 40646c321187SmrgLD="$lt_cv_path_LD" 40656c321187Smrgif test -n "$LD"; then 40666c321187Smrg AC_MSG_RESULT($LD) 40676c321187Smrgelse 40686c321187Smrg AC_MSG_RESULT(no) 40696c321187Smrgfi 40706c321187Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 40716c321187SmrgAC_PROG_LD_GNU 40726c321187Smrg])# AC_PROG_LD 40736c321187Smrg 40746c321187Smrg 40756c321187Smrg# AC_PROG_LD_GNU 40766c321187Smrg# -------------- 40776c321187SmrgAC_DEFUN([AC_PROG_LD_GNU], 40786c321187Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 40796c321187SmrgAC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 40806c321187Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 40816c321187Smrgcase `$LD -v 2>&1 </dev/null` in 40826c321187Smrg*GNU* | *'with BFD'*) 40836c321187Smrg lt_cv_prog_gnu_ld=yes 40846c321187Smrg ;; 40856c321187Smrg*) 40866c321187Smrg lt_cv_prog_gnu_ld=no 40876c321187Smrg ;; 40886c321187Smrgesac]) 40896c321187Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 40906c321187Smrg])# AC_PROG_LD_GNU 40916c321187Smrg 40926c321187Smrg 40936c321187Smrg# AC_PROG_LD_RELOAD_FLAG 40946c321187Smrg# ---------------------- 40956c321187Smrg# find reload flag for linker 40966c321187Smrg# -- PORTME Some linkers may need a different reload flag. 40976c321187SmrgAC_DEFUN([AC_PROG_LD_RELOAD_FLAG], 40986c321187Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 40996c321187Smrg lt_cv_ld_reload_flag, 41006c321187Smrg [lt_cv_ld_reload_flag='-r']) 41016c321187Smrgreload_flag=$lt_cv_ld_reload_flag 41026c321187Smrgcase $reload_flag in 41036c321187Smrg"" | " "*) ;; 41046c321187Smrg*) reload_flag=" $reload_flag" ;; 41056c321187Smrgesac 41066c321187Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 41076c321187Smrgcase $host_os in 41086c321187Smrg darwin*) 41096c321187Smrg if test "$GCC" = yes; then 41106c321187Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 41116c321187Smrg else 41126c321187Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 41136c321187Smrg fi 41146c321187Smrg ;; 41156c321187Smrgesac 41166c321187Smrg])# AC_PROG_LD_RELOAD_FLAG 41176c321187Smrg 41186c321187Smrg 41196c321187Smrg# AC_DEPLIBS_CHECK_METHOD 41206c321187Smrg# ----------------------- 41216c321187Smrg# how to check for library dependencies 41226c321187Smrg# -- PORTME fill in with the dynamic library characteristics 41236c321187SmrgAC_DEFUN([AC_DEPLIBS_CHECK_METHOD], 412493493779Smrg[AC_CACHE_CHECK([how to recognize dependent libraries], 41256c321187Smrglt_cv_deplibs_check_method, 41266c321187Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 41276c321187Smrglt_cv_file_magic_test_file= 41286c321187Smrglt_cv_deplibs_check_method='unknown' 41296c321187Smrg# Need to set the preceding variable on all platforms that support 41306c321187Smrg# interlibrary dependencies. 41316c321187Smrg# 'none' -- dependencies not supported. 41326c321187Smrg# `unknown' -- same as none, but documents that we really don't know. 41336c321187Smrg# 'pass_all' -- all dependencies passed with no checks. 41346c321187Smrg# 'test_compile' -- check by making test program. 41356c321187Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 41366c321187Smrg# which responds to the $file_magic_cmd with a given extended regex. 41376c321187Smrg# If you have `file' or equivalent on your system and you're not sure 41386c321187Smrg# whether `pass_all' will *always* work, you probably want this one. 41396c321187Smrg 41406c321187Smrgcase $host_os in 414193493779Smrgaix[[4-9]]*) 41426c321187Smrg lt_cv_deplibs_check_method=pass_all 41436c321187Smrg ;; 41446c321187Smrg 41456c321187Smrgbeos*) 41466c321187Smrg lt_cv_deplibs_check_method=pass_all 41476c321187Smrg ;; 41486c321187Smrg 41496c321187Smrgbsdi[[45]]*) 41506c321187Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 41516c321187Smrg lt_cv_file_magic_cmd='/usr/bin/file -L' 41526c321187Smrg lt_cv_file_magic_test_file=/shlib/libc.so 41536c321187Smrg ;; 41546c321187Smrg 41556c321187Smrgcygwin*) 41566c321187Smrg # func_win32_libid is a shell function defined in ltmain.sh 41576c321187Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 41586c321187Smrg lt_cv_file_magic_cmd='func_win32_libid' 41596c321187Smrg ;; 41606c321187Smrg 41616c321187Smrgmingw* | pw32*) 41626c321187Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 416393493779Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 416493493779Smrg # unless we find 'file', for example because we are cross-compiling. 416593493779Smrg if ( file / ) >/dev/null 2>&1; then 416693493779Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 416793493779Smrg lt_cv_file_magic_cmd='func_win32_libid' 416893493779Smrg else 416993493779Smrg lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' 417093493779Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 417193493779Smrg fi 41726c321187Smrg ;; 41736c321187Smrg 41746c321187Smrgdarwin* | rhapsody*) 41756c321187Smrg lt_cv_deplibs_check_method=pass_all 41766c321187Smrg ;; 41776c321187Smrg 417893493779Smrgfreebsd* | dragonfly*) 41796c321187Smrg if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 41806c321187Smrg case $host_cpu in 41816c321187Smrg i*86 ) 41826c321187Smrg # Not sure whether the presence of OpenBSD here was a mistake. 41836c321187Smrg # Let's accept both of them until this is cleared up. 41846c321187Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 41856c321187Smrg lt_cv_file_magic_cmd=/usr/bin/file 41866c321187Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 41876c321187Smrg ;; 41886c321187Smrg esac 41896c321187Smrg else 41906c321187Smrg lt_cv_deplibs_check_method=pass_all 41916c321187Smrg fi 41926c321187Smrg ;; 41936c321187Smrg 41946c321187Smrggnu*) 41956c321187Smrg lt_cv_deplibs_check_method=pass_all 41966c321187Smrg ;; 41976c321187Smrg 41986c321187Smrghpux10.20* | hpux11*) 41996c321187Smrg lt_cv_file_magic_cmd=/usr/bin/file 42006c321187Smrg case $host_cpu in 42016c321187Smrg ia64*) 42026c321187Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 42036c321187Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 42046c321187Smrg ;; 42056c321187Smrg hppa*64*) 42066c321187Smrg [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] 42076c321187Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 42086c321187Smrg ;; 42096c321187Smrg *) 42106c321187Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' 42116c321187Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 42126c321187Smrg ;; 42136c321187Smrg esac 42146c321187Smrg ;; 42156c321187Smrg 421693493779Smrginterix[[3-9]]*) 42176c321187Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 42186c321187Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 42196c321187Smrg ;; 42206c321187Smrg 42216c321187Smrgirix5* | irix6* | nonstopux*) 42226c321187Smrg case $LD in 42236c321187Smrg *-32|*"-32 ") libmagic=32-bit;; 42246c321187Smrg *-n32|*"-n32 ") libmagic=N32;; 42256c321187Smrg *-64|*"-64 ") libmagic=64-bit;; 42266c321187Smrg *) libmagic=never-match;; 42276c321187Smrg esac 42286c321187Smrg lt_cv_deplibs_check_method=pass_all 42296c321187Smrg ;; 42306c321187Smrg 42316c321187Smrg# This must be Linux ELF. 423293493779Smrglinux* | k*bsd*-gnu) 42336c321187Smrg lt_cv_deplibs_check_method=pass_all 42346c321187Smrg ;; 42356c321187Smrg 42366c321187Smrgnetbsd*) 42376c321187Smrg if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 42386c321187Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 42396c321187Smrg else 42406c321187Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 42416c321187Smrg fi 42426c321187Smrg ;; 42436c321187Smrg 42446c321187Smrgnewos6*) 42456c321187Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 42466c321187Smrg lt_cv_file_magic_cmd=/usr/bin/file 42476c321187Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 42486c321187Smrg ;; 42496c321187Smrg 42506c321187Smrgnto-qnx*) 42516c321187Smrg lt_cv_deplibs_check_method=unknown 42526c321187Smrg ;; 42536c321187Smrg 42546c321187Smrgopenbsd*) 42556c321187Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 42566c321187Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 42576c321187Smrg else 42586c321187Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 42596c321187Smrg fi 42606c321187Smrg ;; 42616c321187Smrg 42626c321187Smrgosf3* | osf4* | osf5*) 42636c321187Smrg lt_cv_deplibs_check_method=pass_all 42646c321187Smrg ;; 42656c321187Smrg 426693493779Smrgrdos*) 426793493779Smrg lt_cv_deplibs_check_method=pass_all 426893493779Smrg ;; 426993493779Smrg 42706c321187Smrgsolaris*) 42716c321187Smrg lt_cv_deplibs_check_method=pass_all 42726c321187Smrg ;; 42736c321187Smrg 42746c321187Smrgsysv4 | sysv4.3*) 42756c321187Smrg case $host_vendor in 42766c321187Smrg motorola) 42776c321187Smrg 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]]' 42786c321187Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 42796c321187Smrg ;; 42806c321187Smrg ncr) 42816c321187Smrg lt_cv_deplibs_check_method=pass_all 42826c321187Smrg ;; 42836c321187Smrg sequent) 42846c321187Smrg lt_cv_file_magic_cmd='/bin/file' 42856c321187Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 42866c321187Smrg ;; 42876c321187Smrg sni) 42886c321187Smrg lt_cv_file_magic_cmd='/bin/file' 42896c321187Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 42906c321187Smrg lt_cv_file_magic_test_file=/lib/libc.so 42916c321187Smrg ;; 42926c321187Smrg siemens) 42936c321187Smrg lt_cv_deplibs_check_method=pass_all 42946c321187Smrg ;; 42956c321187Smrg pc) 42966c321187Smrg lt_cv_deplibs_check_method=pass_all 42976c321187Smrg ;; 42986c321187Smrg esac 42996c321187Smrg ;; 43006c321187Smrg 43016c321187Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 43026c321187Smrg lt_cv_deplibs_check_method=pass_all 43036c321187Smrg ;; 43046c321187Smrgesac 43056c321187Smrg]) 43066c321187Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 43076c321187Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 43086c321187Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 43096c321187Smrg])# AC_DEPLIBS_CHECK_METHOD 43106c321187Smrg 43116c321187Smrg 43126c321187Smrg# AC_PROG_NM 43136c321187Smrg# ---------- 43146c321187Smrg# find the pathname to a BSD-compatible name lister 43156c321187SmrgAC_DEFUN([AC_PROG_NM], 43166c321187Smrg[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, 43176c321187Smrg[if test -n "$NM"; then 43186c321187Smrg # Let the user override the test. 43196c321187Smrg lt_cv_path_NM="$NM" 43206c321187Smrgelse 43216c321187Smrg lt_nm_to_check="${ac_tool_prefix}nm" 432293493779Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 43236c321187Smrg lt_nm_to_check="$lt_nm_to_check nm" 43246c321187Smrg fi 43256c321187Smrg for lt_tmp_nm in $lt_nm_to_check; do 43266c321187Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 43276c321187Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 43286c321187Smrg IFS="$lt_save_ifs" 43296c321187Smrg test -z "$ac_dir" && ac_dir=. 43306c321187Smrg tmp_nm="$ac_dir/$lt_tmp_nm" 43316c321187Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 43326c321187Smrg # Check to see if the nm accepts a BSD-compat flag. 43336c321187Smrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 43346c321187Smrg # nm: unknown option "B" ignored 43356c321187Smrg # Tru64's nm complains that /dev/null is an invalid object file 43366c321187Smrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 43376c321187Smrg */dev/null* | *'Invalid file or object type'*) 43386c321187Smrg lt_cv_path_NM="$tmp_nm -B" 43396c321187Smrg break 43406c321187Smrg ;; 43416c321187Smrg *) 43426c321187Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 43436c321187Smrg */dev/null*) 43446c321187Smrg lt_cv_path_NM="$tmp_nm -p" 43456c321187Smrg break 43466c321187Smrg ;; 43476c321187Smrg *) 43486c321187Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 43496c321187Smrg continue # so that we can try to find one that supports BSD flags 43506c321187Smrg ;; 43516c321187Smrg esac 43526c321187Smrg ;; 43536c321187Smrg esac 43546c321187Smrg fi 43556c321187Smrg done 43566c321187Smrg IFS="$lt_save_ifs" 43576c321187Smrg done 43586c321187Smrg test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm 43596c321187Smrgfi]) 43606c321187SmrgNM="$lt_cv_path_NM" 43616c321187Smrg])# AC_PROG_NM 43626c321187Smrg 43636c321187Smrg 43646c321187Smrg# AC_CHECK_LIBM 43656c321187Smrg# ------------- 43666c321187Smrg# check for math library 43676c321187SmrgAC_DEFUN([AC_CHECK_LIBM], 43686c321187Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 43696c321187SmrgLIBM= 43706c321187Smrgcase $host in 43716c321187Smrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) 43726c321187Smrg # These system don't have libm, or don't need it 43736c321187Smrg ;; 43746c321187Smrg*-ncr-sysv4.3*) 43756c321187Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 43766c321187Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 43776c321187Smrg ;; 43786c321187Smrg*) 43796c321187Smrg AC_CHECK_LIB(m, cos, LIBM="-lm") 43806c321187Smrg ;; 43816c321187Smrgesac 43826c321187Smrg])# AC_CHECK_LIBM 43836c321187Smrg 43846c321187Smrg 43856c321187Smrg# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) 43866c321187Smrg# ----------------------------------- 43876c321187Smrg# sets LIBLTDL to the link flags for the libltdl convenience library and 43886c321187Smrg# LTDLINCL to the include flags for the libltdl header and adds 43896c321187Smrg# --enable-ltdl-convenience to the configure arguments. Note that 43906c321187Smrg# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 43916c321187Smrg# it is assumed to be `libltdl'. LIBLTDL will be prefixed with 43926c321187Smrg# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' 43936c321187Smrg# (note the single quotes!). If your package is not flat and you're not 43946c321187Smrg# using automake, define top_builddir and top_srcdir appropriately in 43956c321187Smrg# the Makefiles. 43966c321187SmrgAC_DEFUN([AC_LIBLTDL_CONVENIENCE], 43976c321187Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 43986c321187Smrg case $enable_ltdl_convenience in 43996c321187Smrg no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; 44006c321187Smrg "") enable_ltdl_convenience=yes 44016c321187Smrg ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; 44026c321187Smrg esac 44036c321187Smrg LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la 44046c321187Smrg LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 44056c321187Smrg # For backwards non-gettext consistent compatibility... 44066c321187Smrg INCLTDL="$LTDLINCL" 44076c321187Smrg])# AC_LIBLTDL_CONVENIENCE 44086c321187Smrg 44096c321187Smrg 44106c321187Smrg# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) 44116c321187Smrg# ----------------------------------- 44126c321187Smrg# sets LIBLTDL to the link flags for the libltdl installable library and 44136c321187Smrg# LTDLINCL to the include flags for the libltdl header and adds 44146c321187Smrg# --enable-ltdl-install to the configure arguments. Note that 44156c321187Smrg# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 44166c321187Smrg# and an installed libltdl is not found, it is assumed to be `libltdl'. 44176c321187Smrg# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with 44186c321187Smrg# '${top_srcdir}/' (note the single quotes!). If your package is not 44196c321187Smrg# flat and you're not using automake, define top_builddir and top_srcdir 44206c321187Smrg# appropriately in the Makefiles. 44216c321187Smrg# In the future, this macro may have to be called after AC_PROG_LIBTOOL. 44226c321187SmrgAC_DEFUN([AC_LIBLTDL_INSTALLABLE], 44236c321187Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 44246c321187Smrg AC_CHECK_LIB(ltdl, lt_dlinit, 44256c321187Smrg [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], 44266c321187Smrg [if test x"$enable_ltdl_install" = xno; then 44276c321187Smrg AC_MSG_WARN([libltdl not installed, but installation disabled]) 44286c321187Smrg else 44296c321187Smrg enable_ltdl_install=yes 44306c321187Smrg fi 44316c321187Smrg ]) 44326c321187Smrg if test x"$enable_ltdl_install" = x"yes"; then 44336c321187Smrg ac_configure_args="$ac_configure_args --enable-ltdl-install" 44346c321187Smrg LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la 44356c321187Smrg LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 44366c321187Smrg else 44376c321187Smrg ac_configure_args="$ac_configure_args --enable-ltdl-install=no" 44386c321187Smrg LIBLTDL="-lltdl" 44396c321187Smrg LTDLINCL= 44406c321187Smrg fi 44416c321187Smrg # For backwards non-gettext consistent compatibility... 44426c321187Smrg INCLTDL="$LTDLINCL" 44436c321187Smrg])# AC_LIBLTDL_INSTALLABLE 44446c321187Smrg 44456c321187Smrg 44466c321187Smrg# AC_LIBTOOL_CXX 44476c321187Smrg# -------------- 44486c321187Smrg# enable support for C++ libraries 44496c321187SmrgAC_DEFUN([AC_LIBTOOL_CXX], 44506c321187Smrg[AC_REQUIRE([_LT_AC_LANG_CXX]) 44516c321187Smrg])# AC_LIBTOOL_CXX 44526c321187Smrg 44536c321187Smrg 44546c321187Smrg# _LT_AC_LANG_CXX 44556c321187Smrg# --------------- 44566c321187SmrgAC_DEFUN([_LT_AC_LANG_CXX], 44576c321187Smrg[AC_REQUIRE([AC_PROG_CXX]) 44586c321187SmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 44596c321187Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) 44606c321187Smrg])# _LT_AC_LANG_CXX 44616c321187Smrg 44626c321187Smrg# _LT_AC_PROG_CXXCPP 44636c321187Smrg# ------------------ 44646c321187SmrgAC_DEFUN([_LT_AC_PROG_CXXCPP], 44656c321187Smrg[ 44666c321187SmrgAC_REQUIRE([AC_PROG_CXX]) 44676c321187Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 44686c321187Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 44696c321187Smrg (test "X$CXX" != "Xg++"))) ; then 44706c321187Smrg AC_PROG_CXXCPP 44716c321187Smrgfi 44726c321187Smrg])# _LT_AC_PROG_CXXCPP 44736c321187Smrg 44746c321187Smrg# AC_LIBTOOL_F77 44756c321187Smrg# -------------- 44766c321187Smrg# enable support for Fortran 77 libraries 44776c321187SmrgAC_DEFUN([AC_LIBTOOL_F77], 44786c321187Smrg[AC_REQUIRE([_LT_AC_LANG_F77]) 44796c321187Smrg])# AC_LIBTOOL_F77 44806c321187Smrg 44816c321187Smrg 44826c321187Smrg# _LT_AC_LANG_F77 44836c321187Smrg# --------------- 44846c321187SmrgAC_DEFUN([_LT_AC_LANG_F77], 44856c321187Smrg[AC_REQUIRE([AC_PROG_F77]) 44866c321187Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) 44876c321187Smrg])# _LT_AC_LANG_F77 44886c321187Smrg 44896c321187Smrg 44906c321187Smrg# AC_LIBTOOL_GCJ 44916c321187Smrg# -------------- 44926c321187Smrg# enable support for GCJ libraries 44936c321187SmrgAC_DEFUN([AC_LIBTOOL_GCJ], 44946c321187Smrg[AC_REQUIRE([_LT_AC_LANG_GCJ]) 44956c321187Smrg])# AC_LIBTOOL_GCJ 44966c321187Smrg 44976c321187Smrg 44986c321187Smrg# _LT_AC_LANG_GCJ 44996c321187Smrg# --------------- 45006c321187SmrgAC_DEFUN([_LT_AC_LANG_GCJ], 45016c321187Smrg[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], 45026c321187Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], 45036c321187Smrg [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], 45046c321187Smrg [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], 45056c321187Smrg [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], 45066c321187Smrg [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) 45076c321187Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) 45086c321187Smrg])# _LT_AC_LANG_GCJ 45096c321187Smrg 45106c321187Smrg 45116c321187Smrg# AC_LIBTOOL_RC 45126c321187Smrg# ------------- 45136c321187Smrg# enable support for Windows resource files 45146c321187SmrgAC_DEFUN([AC_LIBTOOL_RC], 45156c321187Smrg[AC_REQUIRE([LT_AC_PROG_RC]) 45166c321187Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) 45176c321187Smrg])# AC_LIBTOOL_RC 45186c321187Smrg 45196c321187Smrg 45206c321187Smrg# AC_LIBTOOL_LANG_C_CONFIG 45216c321187Smrg# ------------------------ 45226c321187Smrg# Ensure that the configuration vars for the C compiler are 45236c321187Smrg# suitably defined. Those variables are subsequently used by 45246c321187Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 45256c321187SmrgAC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) 45266c321187SmrgAC_DEFUN([_LT_AC_LANG_C_CONFIG], 45276c321187Smrg[lt_save_CC="$CC" 45286c321187SmrgAC_LANG_PUSH(C) 45296c321187Smrg 45306c321187Smrg# Source file extension for C test sources. 45316c321187Smrgac_ext=c 45326c321187Smrg 45336c321187Smrg# Object file extension for compiled C test sources. 45346c321187Smrgobjext=o 45356c321187Smrg_LT_AC_TAGVAR(objext, $1)=$objext 45366c321187Smrg 45376c321187Smrg# Code to be used in simple compile tests 453893493779Smrglt_simple_compile_test_code="int some_variable = 0;" 45396c321187Smrg 45406c321187Smrg# Code to be used in simple link tests 454193493779Smrglt_simple_link_test_code='int main(){return(0);}' 45426c321187Smrg 45436c321187Smrg_LT_AC_SYS_COMPILER 45446c321187Smrg 45456c321187Smrg# save warnings/boilerplate of simple test code 45466c321187Smrg_LT_COMPILER_BOILERPLATE 45476c321187Smrg_LT_LINKER_BOILERPLATE 45486c321187Smrg 45496c321187SmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 45506c321187SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 45516c321187SmrgAC_LIBTOOL_PROG_CC_C_O($1) 45526c321187SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 45536c321187SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 45546c321187SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 45556c321187SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 45566c321187SmrgAC_LIBTOOL_SYS_LIB_STRIP 45576c321187SmrgAC_LIBTOOL_DLOPEN_SELF 45586c321187Smrg 45596c321187Smrg# Report which library types will actually be built 45606c321187SmrgAC_MSG_CHECKING([if libtool supports shared libraries]) 45616c321187SmrgAC_MSG_RESULT([$can_build_shared]) 45626c321187Smrg 45636c321187SmrgAC_MSG_CHECKING([whether to build shared libraries]) 45646c321187Smrgtest "$can_build_shared" = "no" && enable_shared=no 45656c321187Smrg 45666c321187Smrg# On AIX, shared libraries and static libraries use the same namespace, and 45676c321187Smrg# are all built from PIC. 45686c321187Smrgcase $host_os in 45696c321187Smrgaix3*) 45706c321187Smrg test "$enable_shared" = yes && enable_static=no 45716c321187Smrg if test -n "$RANLIB"; then 45726c321187Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 45736c321187Smrg postinstall_cmds='$RANLIB $lib' 45746c321187Smrg fi 45756c321187Smrg ;; 45766c321187Smrg 457793493779Smrgaix[[4-9]]*) 45786c321187Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 45796c321187Smrg test "$enable_shared" = yes && enable_static=no 45806c321187Smrg fi 45816c321187Smrg ;; 45826c321187Smrgesac 45836c321187SmrgAC_MSG_RESULT([$enable_shared]) 45846c321187Smrg 45856c321187SmrgAC_MSG_CHECKING([whether to build static libraries]) 45866c321187Smrg# Make sure either enable_shared or enable_static is yes. 45876c321187Smrgtest "$enable_shared" = yes || enable_static=yes 45886c321187SmrgAC_MSG_RESULT([$enable_static]) 45896c321187Smrg 45906c321187SmrgAC_LIBTOOL_CONFIG($1) 45916c321187Smrg 45926c321187SmrgAC_LANG_POP 45936c321187SmrgCC="$lt_save_CC" 45946c321187Smrg])# AC_LIBTOOL_LANG_C_CONFIG 45956c321187Smrg 45966c321187Smrg 45976c321187Smrg# AC_LIBTOOL_LANG_CXX_CONFIG 45986c321187Smrg# -------------------------- 45996c321187Smrg# Ensure that the configuration vars for the C compiler are 46006c321187Smrg# suitably defined. Those variables are subsequently used by 46016c321187Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 46026c321187SmrgAC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) 46036c321187SmrgAC_DEFUN([_LT_AC_LANG_CXX_CONFIG], 46046c321187Smrg[AC_LANG_PUSH(C++) 46056c321187SmrgAC_REQUIRE([AC_PROG_CXX]) 46066c321187SmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 46076c321187Smrg 46086c321187Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 46096c321187Smrg_LT_AC_TAGVAR(allow_undefined_flag, $1)= 46106c321187Smrg_LT_AC_TAGVAR(always_export_symbols, $1)=no 46116c321187Smrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 46126c321187Smrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 46136c321187Smrg_LT_AC_TAGVAR(hardcode_direct, $1)=no 46146c321187Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 46156c321187Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 46166c321187Smrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 46176c321187Smrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 46186c321187Smrg_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 46196c321187Smrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no 46206c321187Smrg_LT_AC_TAGVAR(module_cmds, $1)= 46216c321187Smrg_LT_AC_TAGVAR(module_expsym_cmds, $1)= 46226c321187Smrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 46236c321187Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 46246c321187Smrg_LT_AC_TAGVAR(no_undefined_flag, $1)= 46256c321187Smrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 46266c321187Smrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 46276c321187Smrg 46286c321187Smrg# Dependencies to place before and after the object being linked: 46296c321187Smrg_LT_AC_TAGVAR(predep_objects, $1)= 46306c321187Smrg_LT_AC_TAGVAR(postdep_objects, $1)= 46316c321187Smrg_LT_AC_TAGVAR(predeps, $1)= 46326c321187Smrg_LT_AC_TAGVAR(postdeps, $1)= 46336c321187Smrg_LT_AC_TAGVAR(compiler_lib_search_path, $1)= 463493493779Smrg_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)= 46356c321187Smrg 46366c321187Smrg# Source file extension for C++ test sources. 46376c321187Smrgac_ext=cpp 46386c321187Smrg 46396c321187Smrg# Object file extension for compiled C++ test sources. 46406c321187Smrgobjext=o 46416c321187Smrg_LT_AC_TAGVAR(objext, $1)=$objext 46426c321187Smrg 46436c321187Smrg# Code to be used in simple compile tests 464493493779Smrglt_simple_compile_test_code="int some_variable = 0;" 46456c321187Smrg 46466c321187Smrg# Code to be used in simple link tests 464793493779Smrglt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 46486c321187Smrg 46496c321187Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 46506c321187Smrg_LT_AC_SYS_COMPILER 46516c321187Smrg 46526c321187Smrg# save warnings/boilerplate of simple test code 46536c321187Smrg_LT_COMPILER_BOILERPLATE 46546c321187Smrg_LT_LINKER_BOILERPLATE 46556c321187Smrg 46566c321187Smrg# Allow CC to be a program name with arguments. 46576c321187Smrglt_save_CC=$CC 46586c321187Smrglt_save_LD=$LD 46596c321187Smrglt_save_GCC=$GCC 46606c321187SmrgGCC=$GXX 46616c321187Smrglt_save_with_gnu_ld=$with_gnu_ld 46626c321187Smrglt_save_path_LD=$lt_cv_path_LD 46636c321187Smrgif test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 46646c321187Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 46656c321187Smrgelse 46666c321187Smrg $as_unset lt_cv_prog_gnu_ld 46676c321187Smrgfi 46686c321187Smrgif test -n "${lt_cv_path_LDCXX+set}"; then 46696c321187Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 46706c321187Smrgelse 46716c321187Smrg $as_unset lt_cv_path_LD 46726c321187Smrgfi 46736c321187Smrgtest -z "${LDCXX+set}" || LD=$LDCXX 46746c321187SmrgCC=${CXX-"c++"} 46756c321187Smrgcompiler=$CC 46766c321187Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 46776c321187Smrg_LT_CC_BASENAME([$compiler]) 46786c321187Smrg 46796c321187Smrg# We don't want -fno-exception wen compiling C++ code, so set the 46806c321187Smrg# no_builtin_flag separately 46816c321187Smrgif test "$GXX" = yes; then 46826c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 46836c321187Smrgelse 46846c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 46856c321187Smrgfi 46866c321187Smrg 46876c321187Smrgif test "$GXX" = yes; then 46886c321187Smrg # Set up default GNU C++ configuration 46896c321187Smrg 46906c321187Smrg AC_PROG_LD 46916c321187Smrg 46926c321187Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 46936c321187Smrg # archiving commands below assume that GNU ld is being used. 46946c321187Smrg if test "$with_gnu_ld" = yes; then 46956c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 46966c321187Smrg _LT_AC_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' 46976c321187Smrg 46986c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 46996c321187Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 47006c321187Smrg 47016c321187Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 47026c321187Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 47036c321187Smrg # investigate it a little bit more. (MM) 47046c321187Smrg wlarc='${wl}' 47056c321187Smrg 47066c321187Smrg # ancient GNU ld didn't support --whole-archive et. al. 47076c321187Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ 47086c321187Smrg grep 'no-whole-archive' > /dev/null; then 47096c321187Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 47106c321187Smrg else 47116c321187Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 47126c321187Smrg fi 47136c321187Smrg else 47146c321187Smrg with_gnu_ld=no 47156c321187Smrg wlarc= 47166c321187Smrg 47176c321187Smrg # A generic and very simple default shared library creation 47186c321187Smrg # command for GNU C++ for the case where it uses the native 47196c321187Smrg # linker, instead of GNU ld. If possible, this setting should 47206c321187Smrg # overridden to take advantage of the native linker features on 47216c321187Smrg # the platform it is being used on. 47226c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 47236c321187Smrg fi 47246c321187Smrg 47256c321187Smrg # Commands to make compiler produce verbose output that lists 47266c321187Smrg # what "hidden" libraries, object files and flags are used when 47276c321187Smrg # linking a shared library. 47286c321187Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 47296c321187Smrg 47306c321187Smrgelse 47316c321187Smrg GXX=no 47326c321187Smrg with_gnu_ld=no 47336c321187Smrg wlarc= 47346c321187Smrgfi 47356c321187Smrg 47366c321187Smrg# PORTME: fill in a description of your system's C++ link characteristics 47376c321187SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 47386c321187Smrg_LT_AC_TAGVAR(ld_shlibs, $1)=yes 47396c321187Smrgcase $host_os in 47406c321187Smrg aix3*) 47416c321187Smrg # FIXME: insert proper C++ library support 47426c321187Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 47436c321187Smrg ;; 474493493779Smrg aix[[4-9]]*) 47456c321187Smrg if test "$host_cpu" = ia64; then 47466c321187Smrg # On IA64, the linker does run time linking by default, so we don't 47476c321187Smrg # have to do anything special. 47486c321187Smrg aix_use_runtimelinking=no 47496c321187Smrg exp_sym_flag='-Bexport' 47506c321187Smrg no_entry_flag="" 47516c321187Smrg else 47526c321187Smrg aix_use_runtimelinking=no 47536c321187Smrg 47546c321187Smrg # Test if we are trying to use run time linking or normal 47556c321187Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 47566c321187Smrg # need to do runtime linking. 475793493779Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 47586c321187Smrg for ld_flag in $LDFLAGS; do 47596c321187Smrg case $ld_flag in 47606c321187Smrg *-brtl*) 47616c321187Smrg aix_use_runtimelinking=yes 47626c321187Smrg break 47636c321187Smrg ;; 47646c321187Smrg esac 47656c321187Smrg done 47666c321187Smrg ;; 47676c321187Smrg esac 47686c321187Smrg 47696c321187Smrg exp_sym_flag='-bexport' 47706c321187Smrg no_entry_flag='-bnoentry' 47716c321187Smrg fi 47726c321187Smrg 47736c321187Smrg # When large executables or shared objects are built, AIX ld can 47746c321187Smrg # have problems creating the table of contents. If linking a library 47756c321187Smrg # or program results in "error TOC overflow" add -mminimal-toc to 47766c321187Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 47776c321187Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 47786c321187Smrg 47796c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='' 47806c321187Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 47816c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 47826c321187Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 47836c321187Smrg 47846c321187Smrg if test "$GXX" = yes; then 47856c321187Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 47866c321187Smrg # We only want to do this on AIX 4.2 and lower, the check 47876c321187Smrg # below for broken collect2 doesn't work under 4.3+ 47886c321187Smrg collect2name=`${CC} -print-prog-name=collect2` 47896c321187Smrg if test -f "$collect2name" && \ 47906c321187Smrg strings "$collect2name" | grep resolve_lib_name >/dev/null 47916c321187Smrg then 47926c321187Smrg # We have reworked collect2 479393493779Smrg : 47946c321187Smrg else 47956c321187Smrg # We have old collect2 47966c321187Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 47976c321187Smrg # It fails to find uninstalled libraries when the uninstalled 47986c321187Smrg # path is not listed in the libpath. Setting hardcode_minus_L 47996c321187Smrg # to unsupported forces relinking 48006c321187Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 48016c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 48026c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 48036c321187Smrg fi 48046c321187Smrg ;; 48056c321187Smrg esac 48066c321187Smrg shared_flag='-shared' 48076c321187Smrg if test "$aix_use_runtimelinking" = yes; then 48086c321187Smrg shared_flag="$shared_flag "'${wl}-G' 48096c321187Smrg fi 48106c321187Smrg else 48116c321187Smrg # not using gcc 48126c321187Smrg if test "$host_cpu" = ia64; then 48136c321187Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 48146c321187Smrg # chokes on -Wl,-G. The following line is correct: 48156c321187Smrg shared_flag='-G' 48166c321187Smrg else 48176c321187Smrg if test "$aix_use_runtimelinking" = yes; then 48186c321187Smrg shared_flag='${wl}-G' 48196c321187Smrg else 48206c321187Smrg shared_flag='${wl}-bM:SRE' 48216c321187Smrg fi 48226c321187Smrg fi 48236c321187Smrg fi 48246c321187Smrg 48256c321187Smrg # It seems that -bexpall does not export symbols beginning with 48266c321187Smrg # underscore (_), so it is better to generate a list of symbols to export. 48276c321187Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 48286c321187Smrg if test "$aix_use_runtimelinking" = yes; then 48296c321187Smrg # Warning - without using the other runtime loading flags (-brtl), 48306c321187Smrg # -berok will link without error, but may produce a broken library. 48316c321187Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 48326c321187Smrg # Determine the default libpath from the value encoded in an empty executable. 48336c321187Smrg _LT_AC_SYS_LIBPATH_AIX 48346c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 48356c321187Smrg 48366c321187Smrg _LT_AC_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 echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 48376c321187Smrg else 48386c321187Smrg if test "$host_cpu" = ia64; then 48396c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 48406c321187Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 48416c321187Smrg _LT_AC_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" 48426c321187Smrg else 48436c321187Smrg # Determine the default libpath from the value encoded in an empty executable. 48446c321187Smrg _LT_AC_SYS_LIBPATH_AIX 48456c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 48466c321187Smrg # Warning - without using the other run time loading flags, 48476c321187Smrg # -berok will link without error, but may produce a broken library. 48486c321187Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 48496c321187Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 48506c321187Smrg # Exported symbols can be pulled into shared objects from archives 48516c321187Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 48526c321187Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 48536c321187Smrg # This is similar to how AIX traditionally builds its shared libraries. 48546c321187Smrg _LT_AC_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' 48556c321187Smrg fi 48566c321187Smrg fi 48576c321187Smrg ;; 48586c321187Smrg 48596c321187Smrg beos*) 48606c321187Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 48616c321187Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 48626c321187Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 48636c321187Smrg # support --undefined. This deserves some investigation. FIXME 48646c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 48656c321187Smrg else 48666c321187Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 48676c321187Smrg fi 48686c321187Smrg ;; 48696c321187Smrg 48706c321187Smrg chorus*) 48716c321187Smrg case $cc_basename in 48726c321187Smrg *) 48736c321187Smrg # FIXME: insert proper C++ library support 48746c321187Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 48756c321187Smrg ;; 48766c321187Smrg esac 48776c321187Smrg ;; 48786c321187Smrg 48796c321187Smrg cygwin* | mingw* | pw32*) 48806c321187Smrg # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 48816c321187Smrg # as there is no search path for DLLs. 48826c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 48836c321187Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 48846c321187Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 48856c321187Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 48866c321187Smrg 48876c321187Smrg if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 48886c321187Smrg _LT_AC_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' 48896c321187Smrg # If the export-symbols file already is a .def file (1st line 48906c321187Smrg # is EXPORTS), use it as is; otherwise, prepend... 48916c321187Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 48926c321187Smrg cp $export_symbols $output_objdir/$soname.def; 48936c321187Smrg else 48946c321187Smrg echo EXPORTS > $output_objdir/$soname.def; 48956c321187Smrg cat $export_symbols >> $output_objdir/$soname.def; 48966c321187Smrg fi~ 48976c321187Smrg $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' 48986c321187Smrg else 48996c321187Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 49006c321187Smrg fi 49016c321187Smrg ;; 49026c321187Smrg darwin* | rhapsody*) 49036c321187Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 49046c321187Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 49056c321187Smrg _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 49066c321187Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 49076c321187Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 49086c321187Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 490993493779Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 491093493779Smrg if test "$GXX" = yes ; then 49116c321187Smrg output_verbose_link_cmd='echo' 491293493779Smrg _LT_AC_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}" 491393493779Smrg _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 491493493779Smrg _LT_AC_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}" 491593493779Smrg _LT_AC_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}" 491693493779Smrg if test "$lt_cv_apple_cc_single_mod" != "yes"; then 491793493779Smrg _LT_AC_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}" 491893493779Smrg _LT_AC_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}" 49196c321187Smrg fi 49206c321187Smrg else 49216c321187Smrg case $cc_basename in 49226c321187Smrg xlc*) 49236c321187Smrg output_verbose_link_cmd='echo' 492493493779Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' 49256c321187Smrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 49266c321187Smrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 492793493779Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 49286c321187Smrg _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 49296c321187Smrg ;; 49306c321187Smrg *) 49316c321187Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 49326c321187Smrg ;; 49336c321187Smrg esac 49346c321187Smrg fi 49356c321187Smrg ;; 49366c321187Smrg 49376c321187Smrg dgux*) 49386c321187Smrg case $cc_basename in 49396c321187Smrg ec++*) 49406c321187Smrg # FIXME: insert proper C++ library support 49416c321187Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 49426c321187Smrg ;; 49436c321187Smrg ghcx*) 49446c321187Smrg # Green Hills C++ Compiler 49456c321187Smrg # FIXME: insert proper C++ library support 49466c321187Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 49476c321187Smrg ;; 49486c321187Smrg *) 49496c321187Smrg # FIXME: insert proper C++ library support 49506c321187Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 49516c321187Smrg ;; 49526c321187Smrg esac 49536c321187Smrg ;; 49546c321187Smrg freebsd[[12]]*) 49556c321187Smrg # C++ shared libraries reported to be fairly broken before switch to ELF 49566c321187Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 49576c321187Smrg ;; 49586c321187Smrg freebsd-elf*) 49596c321187Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 49606c321187Smrg ;; 496193493779Smrg freebsd* | dragonfly*) 49626c321187Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 49636c321187Smrg # conventions 49646c321187Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 49656c321187Smrg ;; 49666c321187Smrg gnu*) 49676c321187Smrg ;; 49686c321187Smrg hpux9*) 49696c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 49706c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 49716c321187Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 49726c321187Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 49736c321187Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 49746c321187Smrg # but as the default 49756c321187Smrg # location of the library. 49766c321187Smrg 49776c321187Smrg case $cc_basename in 49786c321187Smrg CC*) 49796c321187Smrg # FIXME: insert proper C++ library support 49806c321187Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 49816c321187Smrg ;; 49826c321187Smrg aCC*) 49836c321187Smrg _LT_AC_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' 49846c321187Smrg # Commands to make compiler produce verbose output that lists 49856c321187Smrg # what "hidden" libraries, object files and flags are used when 49866c321187Smrg # linking a shared library. 49876c321187Smrg # 49886c321187Smrg # There doesn't appear to be a way to prevent this compiler from 49896c321187Smrg # explicitly linking system object files so we need to strip them 49906c321187Smrg # from the output so that they don't get included in the library 49916c321187Smrg # dependencies. 49926c321187Smrg 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; echo $list' 49936c321187Smrg ;; 49946c321187Smrg *) 49956c321187Smrg if test "$GXX" = yes; then 49966c321187Smrg _LT_AC_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' 49976c321187Smrg else 49986c321187Smrg # FIXME: insert proper C++ library support 49996c321187Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 50006c321187Smrg fi 50016c321187Smrg ;; 50026c321187Smrg esac 50036c321187Smrg ;; 50046c321187Smrg hpux10*|hpux11*) 50056c321187Smrg if test $with_gnu_ld = no; then 50066c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 50076c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 50086c321187Smrg 50096c321187Smrg case $host_cpu in 501093493779Smrg hppa*64*|ia64*) ;; 50116c321187Smrg *) 50126c321187Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 50136c321187Smrg ;; 50146c321187Smrg esac 50156c321187Smrg fi 50166c321187Smrg case $host_cpu in 50176c321187Smrg hppa*64*|ia64*) 50186c321187Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 50196c321187Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 50206c321187Smrg ;; 50216c321187Smrg *) 50226c321187Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 50236c321187Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 50246c321187Smrg # but as the default 50256c321187Smrg # location of the library. 50266c321187Smrg ;; 50276c321187Smrg esac 50286c321187Smrg 50296c321187Smrg case $cc_basename in 50306c321187Smrg CC*) 50316c321187Smrg # FIXME: insert proper C++ library support 50326c321187Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 50336c321187Smrg ;; 50346c321187Smrg aCC*) 50356c321187Smrg case $host_cpu in 50366c321187Smrg hppa*64*) 50376c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 50386c321187Smrg ;; 50396c321187Smrg ia64*) 50406c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 50416c321187Smrg ;; 50426c321187Smrg *) 50436c321187Smrg _LT_AC_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' 50446c321187Smrg ;; 50456c321187Smrg esac 50466c321187Smrg # Commands to make compiler produce verbose output that lists 50476c321187Smrg # what "hidden" libraries, object files and flags are used when 50486c321187Smrg # linking a shared library. 50496c321187Smrg # 50506c321187Smrg # There doesn't appear to be a way to prevent this compiler from 50516c321187Smrg # explicitly linking system object files so we need to strip them 50526c321187Smrg # from the output so that they don't get included in the library 50536c321187Smrg # dependencies. 50546c321187Smrg 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; echo $list' 50556c321187Smrg ;; 50566c321187Smrg *) 50576c321187Smrg if test "$GXX" = yes; then 50586c321187Smrg if test $with_gnu_ld = no; then 50596c321187Smrg case $host_cpu in 50606c321187Smrg hppa*64*) 50616c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 50626c321187Smrg ;; 50636c321187Smrg ia64*) 50646c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 50656c321187Smrg ;; 50666c321187Smrg *) 50676c321187Smrg _LT_AC_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' 50686c321187Smrg ;; 50696c321187Smrg esac 50706c321187Smrg fi 50716c321187Smrg else 50726c321187Smrg # FIXME: insert proper C++ library support 50736c321187Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 50746c321187Smrg fi 50756c321187Smrg ;; 50766c321187Smrg esac 50776c321187Smrg ;; 507893493779Smrg interix[[3-9]]*) 50796c321187Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 50806c321187Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 50816c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 50826c321187Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 50836c321187Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 50846c321187Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 50856c321187Smrg # default) and relocated if they conflict, which is a slow very memory 50866c321187Smrg # consuming and fragmenting process. To avoid this, we pick a random, 50876c321187Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 50886c321187Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 50896c321187Smrg _LT_AC_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' 50906c321187Smrg _LT_AC_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' 50916c321187Smrg ;; 50926c321187Smrg irix5* | irix6*) 50936c321187Smrg case $cc_basename in 50946c321187Smrg CC*) 50956c321187Smrg # SGI C++ 50966c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' 50976c321187Smrg 50986c321187Smrg # Archives containing C++ object files must be created using 50996c321187Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 51006c321187Smrg # necessary to make sure instantiated templates are included 51016c321187Smrg # in the archive. 51026c321187Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 51036c321187Smrg ;; 51046c321187Smrg *) 51056c321187Smrg if test "$GXX" = yes; then 51066c321187Smrg if test "$with_gnu_ld" = no; then 51076c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 51086c321187Smrg else 51096c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' 51106c321187Smrg fi 51116c321187Smrg fi 51126c321187Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 51136c321187Smrg ;; 51146c321187Smrg esac 51156c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 51166c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 51176c321187Smrg ;; 511893493779Smrg linux* | k*bsd*-gnu) 51196c321187Smrg case $cc_basename in 51206c321187Smrg KCC*) 51216c321187Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 51226c321187Smrg 51236c321187Smrg # KCC will only create a shared library if the output file 51246c321187Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 51256c321187Smrg # to its proper name (with version) after linking. 51266c321187Smrg _LT_AC_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' 51276c321187Smrg _LT_AC_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' 51286c321187Smrg # Commands to make compiler produce verbose output that lists 51296c321187Smrg # what "hidden" libraries, object files and flags are used when 51306c321187Smrg # linking a shared library. 51316c321187Smrg # 51326c321187Smrg # There doesn't appear to be a way to prevent this compiler from 51336c321187Smrg # explicitly linking system object files so we need to strip them 51346c321187Smrg # from the output so that they don't get included in the library 51356c321187Smrg # dependencies. 51366c321187Smrg 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; echo $list' 51376c321187Smrg 51386c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' 51396c321187Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 51406c321187Smrg 51416c321187Smrg # Archives containing C++ object files must be created using 51426c321187Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 51436c321187Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 51446c321187Smrg ;; 51456c321187Smrg icpc*) 51466c321187Smrg # Intel C++ 51476c321187Smrg with_gnu_ld=yes 51486c321187Smrg # version 8.0 and above of icpc choke on multiply defined symbols 51496c321187Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 51506c321187Smrg # earlier do not add the objects themselves. 51516c321187Smrg case `$CC -V 2>&1` in 51526c321187Smrg *"Version 7."*) 51536c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 51546c321187Smrg _LT_AC_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' 51556c321187Smrg ;; 51566c321187Smrg *) # Version 8.0 or newer 51576c321187Smrg tmp_idyn= 51586c321187Smrg case $host_cpu in 51596c321187Smrg ia64*) tmp_idyn=' -i_dynamic';; 51606c321187Smrg esac 51616c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 51626c321187Smrg _LT_AC_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' 51636c321187Smrg ;; 51646c321187Smrg esac 51656c321187Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 51666c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 51676c321187Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 51686c321187Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 51696c321187Smrg ;; 517093493779Smrg pgCC* | pgcpp*) 51716c321187Smrg # Portland Group C++ compiler 51726c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 51736c321187Smrg _LT_AC_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' 51746c321187Smrg 51756c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 51766c321187Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 51776c321187Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' 51786c321187Smrg ;; 51796c321187Smrg cxx*) 51806c321187Smrg # Compaq C++ 51816c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 51826c321187Smrg _LT_AC_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' 51836c321187Smrg 51846c321187Smrg runpath_var=LD_RUN_PATH 51856c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 51866c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 51876c321187Smrg 51886c321187Smrg # Commands to make compiler produce verbose output that lists 51896c321187Smrg # what "hidden" libraries, object files and flags are used when 51906c321187Smrg # linking a shared library. 51916c321187Smrg # 51926c321187Smrg # There doesn't appear to be a way to prevent this compiler from 51936c321187Smrg # explicitly linking system object files so we need to strip them 51946c321187Smrg # from the output so that they don't get included in the library 51956c321187Smrg # dependencies. 51966c321187Smrg output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $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; echo $list' 51976c321187Smrg ;; 519893493779Smrg *) 519993493779Smrg case `$CC -V 2>&1 | sed 5q` in 520093493779Smrg *Sun\ C*) 520193493779Smrg # Sun C++ 5.9 520293493779Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' 520393493779Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 520493493779Smrg _LT_AC_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' 520593493779Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 520693493779Smrg _LT_AC_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; $echo \"$new_convenience\"` ${wl}--no-whole-archive' 520793493779Smrg 520893493779Smrg # Not sure whether something based on 520993493779Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 521093493779Smrg # would be better. 521193493779Smrg output_verbose_link_cmd='echo' 521293493779Smrg 521393493779Smrg # Archives containing C++ object files must be created using 521493493779Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 521593493779Smrg # necessary to make sure instantiated templates are included 521693493779Smrg # in the archive. 521793493779Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 521893493779Smrg ;; 521993493779Smrg esac 522093493779Smrg ;; 52216c321187Smrg esac 52226c321187Smrg ;; 52236c321187Smrg lynxos*) 52246c321187Smrg # FIXME: insert proper C++ library support 52256c321187Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 52266c321187Smrg ;; 52276c321187Smrg m88k*) 52286c321187Smrg # FIXME: insert proper C++ library support 52296c321187Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 52306c321187Smrg ;; 52316c321187Smrg mvs*) 52326c321187Smrg case $cc_basename in 52336c321187Smrg cxx*) 52346c321187Smrg # FIXME: insert proper C++ library support 52356c321187Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 52366c321187Smrg ;; 52376c321187Smrg *) 52386c321187Smrg # FIXME: insert proper C++ library support 52396c321187Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 52406c321187Smrg ;; 52416c321187Smrg esac 52426c321187Smrg ;; 52436c321187Smrg netbsd*) 52446c321187Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 52456c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 52466c321187Smrg wlarc= 52476c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 52486c321187Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 52496c321187Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 52506c321187Smrg fi 52516c321187Smrg # Workaround some broken pre-1.5 toolchains 52526c321187Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 52536c321187Smrg ;; 52546c321187Smrg openbsd2*) 52556c321187Smrg # C++ shared libraries are fairly broken 52566c321187Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 52576c321187Smrg ;; 52586c321187Smrg openbsd*) 525993493779Smrg if test -f /usr/libexec/ld.so; then 526093493779Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 526193493779Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 526293493779Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 526393493779Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 526493493779Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 526593493779Smrg _LT_AC_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' 526693493779Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 526793493779Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 526893493779Smrg fi 526993493779Smrg output_verbose_link_cmd='echo' 527093493779Smrg else 527193493779Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 52726c321187Smrg fi 52736c321187Smrg ;; 52746c321187Smrg osf3*) 52756c321187Smrg case $cc_basename in 52766c321187Smrg KCC*) 52776c321187Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 52786c321187Smrg 52796c321187Smrg # KCC will only create a shared library if the output file 52806c321187Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 52816c321187Smrg # to its proper name (with version) after linking. 52826c321187Smrg _LT_AC_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' 52836c321187Smrg 52846c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 52856c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 52866c321187Smrg 52876c321187Smrg # Archives containing C++ object files must be created using 52886c321187Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 52896c321187Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 52906c321187Smrg 52916c321187Smrg ;; 52926c321187Smrg RCC*) 52936c321187Smrg # Rational C++ 2.4.1 52946c321187Smrg # FIXME: insert proper C++ library support 52956c321187Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 52966c321187Smrg ;; 52976c321187Smrg cxx*) 52986c321187Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 52996c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' 53006c321187Smrg 53016c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 53026c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 53036c321187Smrg 53046c321187Smrg # Commands to make compiler produce verbose output that lists 53056c321187Smrg # what "hidden" libraries, object files and flags are used when 53066c321187Smrg # linking a shared library. 53076c321187Smrg # 53086c321187Smrg # There doesn't appear to be a way to prevent this compiler from 53096c321187Smrg # explicitly linking system object files so we need to strip them 53106c321187Smrg # from the output so that they don't get included in the library 53116c321187Smrg # dependencies. 53126c321187Smrg output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $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; echo $list' 53136c321187Smrg ;; 53146c321187Smrg *) 53156c321187Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 53166c321187Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 53176c321187Smrg _LT_AC_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" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 53186c321187Smrg 53196c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 53206c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 53216c321187Smrg 53226c321187Smrg # Commands to make compiler produce verbose output that lists 53236c321187Smrg # what "hidden" libraries, object files and flags are used when 53246c321187Smrg # linking a shared library. 53256c321187Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 53266c321187Smrg 53276c321187Smrg else 53286c321187Smrg # FIXME: insert proper C++ library support 53296c321187Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 53306c321187Smrg fi 53316c321187Smrg ;; 53326c321187Smrg esac 53336c321187Smrg ;; 53346c321187Smrg osf4* | osf5*) 53356c321187Smrg case $cc_basename in 53366c321187Smrg KCC*) 53376c321187Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 53386c321187Smrg 53396c321187Smrg # KCC will only create a shared library if the output file 53406c321187Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 53416c321187Smrg # to its proper name (with version) after linking. 53426c321187Smrg _LT_AC_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' 53436c321187Smrg 53446c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 53456c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 53466c321187Smrg 53476c321187Smrg # Archives containing C++ object files must be created using 53486c321187Smrg # the KAI C++ compiler. 53496c321187Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' 53506c321187Smrg ;; 53516c321187Smrg RCC*) 53526c321187Smrg # Rational C++ 2.4.1 53536c321187Smrg # FIXME: insert proper C++ library support 53546c321187Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 53556c321187Smrg ;; 53566c321187Smrg cxx*) 53576c321187Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 53586c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' 53596c321187Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 53606c321187Smrg echo "-hidden">> $lib.exp~ 53616c321187Smrg $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~ 53626c321187Smrg $rm $lib.exp' 53636c321187Smrg 53646c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 53656c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 53666c321187Smrg 53676c321187Smrg # Commands to make compiler produce verbose output that lists 53686c321187Smrg # what "hidden" libraries, object files and flags are used when 53696c321187Smrg # linking a shared library. 53706c321187Smrg # 53716c321187Smrg # There doesn't appear to be a way to prevent this compiler from 53726c321187Smrg # explicitly linking system object files so we need to strip them 53736c321187Smrg # from the output so that they don't get included in the library 53746c321187Smrg # dependencies. 53756c321187Smrg output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $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; echo $list' 53766c321187Smrg ;; 53776c321187Smrg *) 53786c321187Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 53796c321187Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 53806c321187Smrg _LT_AC_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" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 53816c321187Smrg 53826c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 53836c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 53846c321187Smrg 53856c321187Smrg # Commands to make compiler produce verbose output that lists 53866c321187Smrg # what "hidden" libraries, object files and flags are used when 53876c321187Smrg # linking a shared library. 53886c321187Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 53896c321187Smrg 53906c321187Smrg else 53916c321187Smrg # FIXME: insert proper C++ library support 53926c321187Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 53936c321187Smrg fi 53946c321187Smrg ;; 53956c321187Smrg esac 53966c321187Smrg ;; 53976c321187Smrg psos*) 53986c321187Smrg # FIXME: insert proper C++ library support 53996c321187Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 54006c321187Smrg ;; 54016c321187Smrg sunos4*) 54026c321187Smrg case $cc_basename in 54036c321187Smrg CC*) 54046c321187Smrg # Sun C++ 4.x 54056c321187Smrg # FIXME: insert proper C++ library support 54066c321187Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 54076c321187Smrg ;; 54086c321187Smrg lcc*) 54096c321187Smrg # Lucid 54106c321187Smrg # FIXME: insert proper C++ library support 54116c321187Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 54126c321187Smrg ;; 54136c321187Smrg *) 54146c321187Smrg # FIXME: insert proper C++ library support 54156c321187Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 54166c321187Smrg ;; 54176c321187Smrg esac 54186c321187Smrg ;; 54196c321187Smrg solaris*) 54206c321187Smrg case $cc_basename in 54216c321187Smrg CC*) 54226c321187Smrg # Sun C++ 4.2, 5.x and Centerline C++ 54236c321187Smrg _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes 54246c321187Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' 54256c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 54266c321187Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 54276c321187Smrg $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' 54286c321187Smrg 54296c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 54306c321187Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 54316c321187Smrg case $host_os in 54326c321187Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 54336c321187Smrg *) 543493493779Smrg # The compiler driver will combine and reorder linker options, 543593493779Smrg # but understands `-z linker_flag'. 54366c321187Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 543793493779Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 54386c321187Smrg ;; 54396c321187Smrg esac 54406c321187Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 54416c321187Smrg 54426c321187Smrg output_verbose_link_cmd='echo' 54436c321187Smrg 54446c321187Smrg # Archives containing C++ object files must be created using 54456c321187Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 54466c321187Smrg # necessary to make sure instantiated templates are included 54476c321187Smrg # in the archive. 54486c321187Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 54496c321187Smrg ;; 54506c321187Smrg gcx*) 54516c321187Smrg # Green Hills C++ Compiler 54526c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 54536c321187Smrg 54546c321187Smrg # The C++ compiler must be used to create the archive. 54556c321187Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 54566c321187Smrg ;; 54576c321187Smrg *) 54586c321187Smrg # GNU C++ compiler with Solaris linker 54596c321187Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 54606c321187Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 54616c321187Smrg if $CC --version | grep -v '^2\.7' > /dev/null; then 54626c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 54636c321187Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 54646c321187Smrg $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 54656c321187Smrg 54666c321187Smrg # Commands to make compiler produce verbose output that lists 54676c321187Smrg # what "hidden" libraries, object files and flags are used when 54686c321187Smrg # linking a shared library. 54696c321187Smrg output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 54706c321187Smrg else 54716c321187Smrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 54726c321187Smrg # platform. 54736c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 54746c321187Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 54756c321187Smrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 54766c321187Smrg 54776c321187Smrg # Commands to make compiler produce verbose output that lists 54786c321187Smrg # what "hidden" libraries, object files and flags are used when 54796c321187Smrg # linking a shared library. 54806c321187Smrg output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 54816c321187Smrg fi 54826c321187Smrg 54836c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 548493493779Smrg case $host_os in 548593493779Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 548693493779Smrg *) 548793493779Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 548893493779Smrg ;; 548993493779Smrg esac 54906c321187Smrg fi 54916c321187Smrg ;; 54926c321187Smrg esac 54936c321187Smrg ;; 54946c321187Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 54956c321187Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 54966c321187Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 54976c321187Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 54986c321187Smrg runpath_var='LD_RUN_PATH' 54996c321187Smrg 55006c321187Smrg case $cc_basename in 55016c321187Smrg CC*) 55026c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55036c321187Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55046c321187Smrg ;; 55056c321187Smrg *) 55066c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55076c321187Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55086c321187Smrg ;; 55096c321187Smrg esac 55106c321187Smrg ;; 55116c321187Smrg sysv5* | sco3.2v5* | sco5v6*) 55126c321187Smrg # Note: We can NOT use -z defs as we might desire, because we do not 55136c321187Smrg # link with -lc, and that would cause any symbols used from libc to 55146c321187Smrg # always be unresolved, which means just about no library would 55156c321187Smrg # ever link correctly. If we're not using GNU ld we use -z text 55166c321187Smrg # though, which does catch some bad symbols but isn't as heavy-handed 55176c321187Smrg # as -z defs. 55186c321187Smrg # For security reasons, it is highly recommended that you always 55196c321187Smrg # use absolute paths for naming shared libraries, and exclude the 55206c321187Smrg # DT_RUNPATH tag from executables and libraries. But doing so 55216c321187Smrg # requires that you compile everything twice, which is a pain. 55226c321187Smrg # So that behaviour is only enabled if SCOABSPATH is set to a 55236c321187Smrg # non-empty value in the environment. Most likely only useful for 55246c321187Smrg # creating official distributions of packages. 55256c321187Smrg # This is a hack until libtool officially supports absolute path 55266c321187Smrg # names for shared libraries. 55276c321187Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 55286c321187Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 55296c321187Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 55306c321187Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 55316c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 55326c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 55336c321187Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 55346c321187Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 55356c321187Smrg runpath_var='LD_RUN_PATH' 55366c321187Smrg 55376c321187Smrg case $cc_basename in 55386c321187Smrg CC*) 55396c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 55406c321187Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 55416c321187Smrg ;; 55426c321187Smrg *) 55436c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 55446c321187Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 55456c321187Smrg ;; 55466c321187Smrg esac 55476c321187Smrg ;; 55486c321187Smrg tandem*) 55496c321187Smrg case $cc_basename in 55506c321187Smrg NCC*) 55516c321187Smrg # NonStop-UX NCC 3.20 55526c321187Smrg # FIXME: insert proper C++ library support 55536c321187Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 55546c321187Smrg ;; 55556c321187Smrg *) 55566c321187Smrg # FIXME: insert proper C++ library support 55576c321187Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 55586c321187Smrg ;; 55596c321187Smrg esac 55606c321187Smrg ;; 55616c321187Smrg vxworks*) 55626c321187Smrg # FIXME: insert proper C++ library support 55636c321187Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 55646c321187Smrg ;; 55656c321187Smrg *) 55666c321187Smrg # FIXME: insert proper C++ library support 55676c321187Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 55686c321187Smrg ;; 55696c321187Smrgesac 55706c321187SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 55716c321187Smrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 55726c321187Smrg 55736c321187Smrg_LT_AC_TAGVAR(GCC, $1)="$GXX" 55746c321187Smrg_LT_AC_TAGVAR(LD, $1)="$LD" 55756c321187Smrg 55766c321187SmrgAC_LIBTOOL_POSTDEP_PREDEP($1) 55776c321187SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 55786c321187SmrgAC_LIBTOOL_PROG_CC_C_O($1) 55796c321187SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 55806c321187SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 55816c321187SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 55826c321187SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 55836c321187Smrg 55846c321187SmrgAC_LIBTOOL_CONFIG($1) 55856c321187Smrg 55866c321187SmrgAC_LANG_POP 55876c321187SmrgCC=$lt_save_CC 55886c321187SmrgLDCXX=$LD 55896c321187SmrgLD=$lt_save_LD 55906c321187SmrgGCC=$lt_save_GCC 55916c321187Smrgwith_gnu_ldcxx=$with_gnu_ld 55926c321187Smrgwith_gnu_ld=$lt_save_with_gnu_ld 55936c321187Smrglt_cv_path_LDCXX=$lt_cv_path_LD 55946c321187Smrglt_cv_path_LD=$lt_save_path_LD 55956c321187Smrglt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 55966c321187Smrglt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 55976c321187Smrg])# AC_LIBTOOL_LANG_CXX_CONFIG 55986c321187Smrg 55996c321187Smrg# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) 56006c321187Smrg# ------------------------------------ 56016c321187Smrg# Figure out "hidden" library dependencies from verbose 56026c321187Smrg# compiler output when linking a shared library. 56036c321187Smrg# Parse the compiler output and extract the necessary 56046c321187Smrg# objects, libraries and library flags. 560593493779SmrgAC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP], 560693493779Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 56076c321187Smrgdnl we can't use the lt_simple_compile_test_code here, 56086c321187Smrgdnl because it contains code intended for an executable, 56096c321187Smrgdnl not a library. It's possible we should let each 56106c321187Smrgdnl tag define a new lt_????_link_test_code variable, 56116c321187Smrgdnl but it's only used here... 56126c321187Smrgifelse([$1],[],[cat > conftest.$ac_ext <<EOF 56136c321187Smrgint a; 56146c321187Smrgvoid foo (void) { a = 0; } 56156c321187SmrgEOF 56166c321187Smrg],[$1],[CXX],[cat > conftest.$ac_ext <<EOF 56176c321187Smrgclass Foo 56186c321187Smrg{ 56196c321187Smrgpublic: 56206c321187Smrg Foo (void) { a = 0; } 56216c321187Smrgprivate: 56226c321187Smrg int a; 56236c321187Smrg}; 56246c321187SmrgEOF 56256c321187Smrg],[$1],[F77],[cat > conftest.$ac_ext <<EOF 56266c321187Smrg subroutine foo 56276c321187Smrg implicit none 56286c321187Smrg integer*4 a 56296c321187Smrg a=0 56306c321187Smrg return 56316c321187Smrg end 56326c321187SmrgEOF 56336c321187Smrg],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF 56346c321187Smrgpublic class foo { 56356c321187Smrg private int a; 56366c321187Smrg public void bar (void) { 56376c321187Smrg a = 0; 56386c321187Smrg } 56396c321187Smrg}; 56406c321187SmrgEOF 56416c321187Smrg]) 56426c321187Smrgdnl Parse the compiler output and extract the necessary 56436c321187Smrgdnl objects, libraries and library flags. 56446c321187Smrgif AC_TRY_EVAL(ac_compile); then 56456c321187Smrg # Parse the compiler output and extract the necessary 56466c321187Smrg # objects, libraries and library flags. 56476c321187Smrg 56486c321187Smrg # Sentinel used to keep track of whether or not we are before 56496c321187Smrg # the conftest object file. 56506c321187Smrg pre_test_object_deps_done=no 56516c321187Smrg 56526c321187Smrg # The `*' in the case matches for architectures that use `case' in 56536c321187Smrg # $output_verbose_cmd can trigger glob expansion during the loop 56546c321187Smrg # eval without this substitution. 56556c321187Smrg output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` 56566c321187Smrg 56576c321187Smrg for p in `eval $output_verbose_link_cmd`; do 56586c321187Smrg case $p in 56596c321187Smrg 56606c321187Smrg -L* | -R* | -l*) 56616c321187Smrg # Some compilers place space between "-{L,R}" and the path. 56626c321187Smrg # Remove the space. 56636c321187Smrg if test $p = "-L" \ 56646c321187Smrg || test $p = "-R"; then 56656c321187Smrg prev=$p 56666c321187Smrg continue 56676c321187Smrg else 56686c321187Smrg prev= 56696c321187Smrg fi 56706c321187Smrg 56716c321187Smrg if test "$pre_test_object_deps_done" = no; then 56726c321187Smrg case $p in 56736c321187Smrg -L* | -R*) 56746c321187Smrg # Internal compiler library paths should come after those 56756c321187Smrg # provided the user. The postdeps already come after the 56766c321187Smrg # user supplied libs so there is no need to process them. 56776c321187Smrg if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then 56786c321187Smrg _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 56796c321187Smrg else 56806c321187Smrg _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 56816c321187Smrg fi 56826c321187Smrg ;; 56836c321187Smrg # The "-l" case would never come before the object being 56846c321187Smrg # linked, so don't bother handling this case. 56856c321187Smrg esac 56866c321187Smrg else 56876c321187Smrg if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then 56886c321187Smrg _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}" 56896c321187Smrg else 56906c321187Smrg _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}" 56916c321187Smrg fi 56926c321187Smrg fi 56936c321187Smrg ;; 56946c321187Smrg 56956c321187Smrg *.$objext) 56966c321187Smrg # This assumes that the test object file only shows up 56976c321187Smrg # once in the compiler output. 56986c321187Smrg if test "$p" = "conftest.$objext"; then 56996c321187Smrg pre_test_object_deps_done=yes 57006c321187Smrg continue 57016c321187Smrg fi 57026c321187Smrg 57036c321187Smrg if test "$pre_test_object_deps_done" = no; then 57046c321187Smrg if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then 57056c321187Smrg _LT_AC_TAGVAR(predep_objects, $1)="$p" 57066c321187Smrg else 57076c321187Smrg _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p" 57086c321187Smrg fi 57096c321187Smrg else 57106c321187Smrg if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then 57116c321187Smrg _LT_AC_TAGVAR(postdep_objects, $1)="$p" 57126c321187Smrg else 57136c321187Smrg _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p" 57146c321187Smrg fi 57156c321187Smrg fi 57166c321187Smrg ;; 57176c321187Smrg 57186c321187Smrg *) ;; # Ignore the rest. 57196c321187Smrg 57206c321187Smrg esac 57216c321187Smrg done 57226c321187Smrg 57236c321187Smrg # Clean up. 57246c321187Smrg rm -f a.out a.exe 57256c321187Smrgelse 57266c321187Smrg echo "libtool.m4: error: problem compiling $1 test program" 57276c321187Smrgfi 57286c321187Smrg 57296c321187Smrg$rm -f confest.$objext 57306c321187Smrg 573193493779Smrg_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)= 573293493779Smrgif test -n "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then 573393493779Smrg _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_AC_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 573493493779Smrgfi 573593493779Smrg 57366c321187Smrg# PORTME: override above test on systems where it is broken 57376c321187Smrgifelse([$1],[CXX], 57386c321187Smrg[case $host_os in 573993493779Smrginterix[[3-9]]*) 57406c321187Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 57416c321187Smrg # hack all around it, let's just trust "g++" to DTRT. 57426c321187Smrg _LT_AC_TAGVAR(predep_objects,$1)= 57436c321187Smrg _LT_AC_TAGVAR(postdep_objects,$1)= 57446c321187Smrg _LT_AC_TAGVAR(postdeps,$1)= 57456c321187Smrg ;; 57466c321187Smrg 574793493779Smrglinux*) 574893493779Smrg case `$CC -V 2>&1 | sed 5q` in 574993493779Smrg *Sun\ C*) 575093493779Smrg # Sun C++ 5.9 575193493779Smrg # 575293493779Smrg # The more standards-conforming stlport4 library is 575393493779Smrg # incompatible with the Cstd library. Avoid specifying 575493493779Smrg # it if it's in CXXFLAGS. Ignore libCrun as 575593493779Smrg # -library=stlport4 depends on it. 575693493779Smrg case " $CXX $CXXFLAGS " in 575793493779Smrg *" -library=stlport4 "*) 575893493779Smrg solaris_use_stlport4=yes 575993493779Smrg ;; 576093493779Smrg esac 576193493779Smrg if test "$solaris_use_stlport4" != yes; then 576293493779Smrg _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 576393493779Smrg fi 576493493779Smrg ;; 576593493779Smrg esac 576693493779Smrg ;; 576793493779Smrg 57686c321187Smrgsolaris*) 57696c321187Smrg case $cc_basename in 57706c321187Smrg CC*) 577193493779Smrg # The more standards-conforming stlport4 library is 577293493779Smrg # incompatible with the Cstd library. Avoid specifying 577393493779Smrg # it if it's in CXXFLAGS. Ignore libCrun as 577493493779Smrg # -library=stlport4 depends on it. 577593493779Smrg case " $CXX $CXXFLAGS " in 577693493779Smrg *" -library=stlport4 "*) 577793493779Smrg solaris_use_stlport4=yes 577893493779Smrg ;; 577993493779Smrg esac 578093493779Smrg 57816c321187Smrg # Adding this requires a known-good setup of shared libraries for 57826c321187Smrg # Sun compiler versions before 5.6, else PIC objects from an old 57836c321187Smrg # archive will be linked into the output, leading to subtle bugs. 578493493779Smrg if test "$solaris_use_stlport4" != yes; then 578593493779Smrg _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 578693493779Smrg fi 57876c321187Smrg ;; 57886c321187Smrg esac 57896c321187Smrg ;; 57906c321187Smrgesac 57916c321187Smrg]) 57926c321187Smrgcase " $_LT_AC_TAGVAR(postdeps, $1) " in 57936c321187Smrg*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; 57946c321187Smrgesac 57956c321187Smrg])# AC_LIBTOOL_POSTDEP_PREDEP 57966c321187Smrg 57976c321187Smrg# AC_LIBTOOL_LANG_F77_CONFIG 57986c321187Smrg# -------------------------- 57996c321187Smrg# Ensure that the configuration vars for the C compiler are 58006c321187Smrg# suitably defined. Those variables are subsequently used by 58016c321187Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 58026c321187SmrgAC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) 58036c321187SmrgAC_DEFUN([_LT_AC_LANG_F77_CONFIG], 58046c321187Smrg[AC_REQUIRE([AC_PROG_F77]) 58056c321187SmrgAC_LANG_PUSH(Fortran 77) 58066c321187Smrg 58076c321187Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 58086c321187Smrg_LT_AC_TAGVAR(allow_undefined_flag, $1)= 58096c321187Smrg_LT_AC_TAGVAR(always_export_symbols, $1)=no 58106c321187Smrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 58116c321187Smrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 58126c321187Smrg_LT_AC_TAGVAR(hardcode_direct, $1)=no 58136c321187Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 58146c321187Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 58156c321187Smrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 58166c321187Smrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 58176c321187Smrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no 58186c321187Smrg_LT_AC_TAGVAR(module_cmds, $1)= 58196c321187Smrg_LT_AC_TAGVAR(module_expsym_cmds, $1)= 58206c321187Smrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 58216c321187Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 58226c321187Smrg_LT_AC_TAGVAR(no_undefined_flag, $1)= 58236c321187Smrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 58246c321187Smrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 58256c321187Smrg 58266c321187Smrg# Source file extension for f77 test sources. 58276c321187Smrgac_ext=f 58286c321187Smrg 58296c321187Smrg# Object file extension for compiled f77 test sources. 58306c321187Smrgobjext=o 58316c321187Smrg_LT_AC_TAGVAR(objext, $1)=$objext 58326c321187Smrg 58336c321187Smrg# Code to be used in simple compile tests 583493493779Smrglt_simple_compile_test_code="\ 583593493779Smrg subroutine t 583693493779Smrg return 583793493779Smrg end 583893493779Smrg" 58396c321187Smrg 58406c321187Smrg# Code to be used in simple link tests 584193493779Smrglt_simple_link_test_code="\ 584293493779Smrg program t 584393493779Smrg end 584493493779Smrg" 58456c321187Smrg 58466c321187Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 58476c321187Smrg_LT_AC_SYS_COMPILER 58486c321187Smrg 58496c321187Smrg# save warnings/boilerplate of simple test code 58506c321187Smrg_LT_COMPILER_BOILERPLATE 58516c321187Smrg_LT_LINKER_BOILERPLATE 58526c321187Smrg 58536c321187Smrg# Allow CC to be a program name with arguments. 58546c321187Smrglt_save_CC="$CC" 58556c321187SmrgCC=${F77-"f77"} 58566c321187Smrgcompiler=$CC 58576c321187Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 58586c321187Smrg_LT_CC_BASENAME([$compiler]) 58596c321187Smrg 58606c321187SmrgAC_MSG_CHECKING([if libtool supports shared libraries]) 58616c321187SmrgAC_MSG_RESULT([$can_build_shared]) 58626c321187Smrg 58636c321187SmrgAC_MSG_CHECKING([whether to build shared libraries]) 58646c321187Smrgtest "$can_build_shared" = "no" && enable_shared=no 58656c321187Smrg 58666c321187Smrg# On AIX, shared libraries and static libraries use the same namespace, and 58676c321187Smrg# are all built from PIC. 58686c321187Smrgcase $host_os in 58696c321187Smrgaix3*) 58706c321187Smrg test "$enable_shared" = yes && enable_static=no 58716c321187Smrg if test -n "$RANLIB"; then 58726c321187Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 58736c321187Smrg postinstall_cmds='$RANLIB $lib' 58746c321187Smrg fi 58756c321187Smrg ;; 587693493779Smrgaix[[4-9]]*) 58776c321187Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 58786c321187Smrg test "$enable_shared" = yes && enable_static=no 58796c321187Smrg fi 58806c321187Smrg ;; 58816c321187Smrgesac 58826c321187SmrgAC_MSG_RESULT([$enable_shared]) 58836c321187Smrg 58846c321187SmrgAC_MSG_CHECKING([whether to build static libraries]) 58856c321187Smrg# Make sure either enable_shared or enable_static is yes. 58866c321187Smrgtest "$enable_shared" = yes || enable_static=yes 58876c321187SmrgAC_MSG_RESULT([$enable_static]) 58886c321187Smrg 58896c321187Smrg_LT_AC_TAGVAR(GCC, $1)="$G77" 58906c321187Smrg_LT_AC_TAGVAR(LD, $1)="$LD" 58916c321187Smrg 58926c321187SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 58936c321187SmrgAC_LIBTOOL_PROG_CC_C_O($1) 58946c321187SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 58956c321187SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 58966c321187SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 58976c321187SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 58986c321187Smrg 58996c321187SmrgAC_LIBTOOL_CONFIG($1) 59006c321187Smrg 59016c321187SmrgAC_LANG_POP 59026c321187SmrgCC="$lt_save_CC" 59036c321187Smrg])# AC_LIBTOOL_LANG_F77_CONFIG 59046c321187Smrg 59056c321187Smrg 59066c321187Smrg# AC_LIBTOOL_LANG_GCJ_CONFIG 59076c321187Smrg# -------------------------- 59086c321187Smrg# Ensure that the configuration vars for the C compiler are 59096c321187Smrg# suitably defined. Those variables are subsequently used by 59106c321187Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 59116c321187SmrgAC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) 59126c321187SmrgAC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], 59136c321187Smrg[AC_LANG_SAVE 59146c321187Smrg 59156c321187Smrg# Source file extension for Java test sources. 59166c321187Smrgac_ext=java 59176c321187Smrg 59186c321187Smrg# Object file extension for compiled Java test sources. 59196c321187Smrgobjext=o 59206c321187Smrg_LT_AC_TAGVAR(objext, $1)=$objext 59216c321187Smrg 59226c321187Smrg# Code to be used in simple compile tests 592393493779Smrglt_simple_compile_test_code="class foo {}" 59246c321187Smrg 59256c321187Smrg# Code to be used in simple link tests 592693493779Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 59276c321187Smrg 59286c321187Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 59296c321187Smrg_LT_AC_SYS_COMPILER 59306c321187Smrg 59316c321187Smrg# save warnings/boilerplate of simple test code 59326c321187Smrg_LT_COMPILER_BOILERPLATE 59336c321187Smrg_LT_LINKER_BOILERPLATE 59346c321187Smrg 59356c321187Smrg# Allow CC to be a program name with arguments. 59366c321187Smrglt_save_CC="$CC" 59376c321187SmrgCC=${GCJ-"gcj"} 59386c321187Smrgcompiler=$CC 59396c321187Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 59406c321187Smrg_LT_CC_BASENAME([$compiler]) 59416c321187Smrg 59426c321187Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 59436c321187Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 59446c321187Smrg 59456c321187Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 59466c321187Smrg 59476c321187SmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 59486c321187SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 59496c321187SmrgAC_LIBTOOL_PROG_CC_C_O($1) 59506c321187SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 59516c321187SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 59526c321187SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 59536c321187SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 59546c321187Smrg 59556c321187SmrgAC_LIBTOOL_CONFIG($1) 59566c321187Smrg 59576c321187SmrgAC_LANG_RESTORE 59586c321187SmrgCC="$lt_save_CC" 59596c321187Smrg])# AC_LIBTOOL_LANG_GCJ_CONFIG 59606c321187Smrg 59616c321187Smrg 59626c321187Smrg# AC_LIBTOOL_LANG_RC_CONFIG 59636c321187Smrg# ------------------------- 59646c321187Smrg# Ensure that the configuration vars for the Windows resource compiler are 59656c321187Smrg# suitably defined. Those variables are subsequently used by 59666c321187Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 59676c321187SmrgAC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) 59686c321187SmrgAC_DEFUN([_LT_AC_LANG_RC_CONFIG], 59696c321187Smrg[AC_LANG_SAVE 59706c321187Smrg 59716c321187Smrg# Source file extension for RC test sources. 59726c321187Smrgac_ext=rc 59736c321187Smrg 59746c321187Smrg# Object file extension for compiled RC test sources. 59756c321187Smrgobjext=o 59766c321187Smrg_LT_AC_TAGVAR(objext, $1)=$objext 59776c321187Smrg 59786c321187Smrg# Code to be used in simple compile tests 597993493779Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 59806c321187Smrg 59816c321187Smrg# Code to be used in simple link tests 59826c321187Smrglt_simple_link_test_code="$lt_simple_compile_test_code" 59836c321187Smrg 59846c321187Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 59856c321187Smrg_LT_AC_SYS_COMPILER 59866c321187Smrg 59876c321187Smrg# save warnings/boilerplate of simple test code 59886c321187Smrg_LT_COMPILER_BOILERPLATE 59896c321187Smrg_LT_LINKER_BOILERPLATE 59906c321187Smrg 59916c321187Smrg# Allow CC to be a program name with arguments. 59926c321187Smrglt_save_CC="$CC" 59936c321187SmrgCC=${RC-"windres"} 59946c321187Smrgcompiler=$CC 59956c321187Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 59966c321187Smrg_LT_CC_BASENAME([$compiler]) 59976c321187Smrg_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 59986c321187Smrg 59996c321187SmrgAC_LIBTOOL_CONFIG($1) 60006c321187Smrg 60016c321187SmrgAC_LANG_RESTORE 60026c321187SmrgCC="$lt_save_CC" 60036c321187Smrg])# AC_LIBTOOL_LANG_RC_CONFIG 60046c321187Smrg 60056c321187Smrg 60066c321187Smrg# AC_LIBTOOL_CONFIG([TAGNAME]) 60076c321187Smrg# ---------------------------- 60086c321187Smrg# If TAGNAME is not passed, then create an initial libtool script 60096c321187Smrg# with a default configuration from the untagged config vars. Otherwise 60106c321187Smrg# add code to config.status for appending the configuration named by 60116c321187Smrg# TAGNAME from the matching tagged config vars. 60126c321187SmrgAC_DEFUN([AC_LIBTOOL_CONFIG], 60136c321187Smrg[# The else clause should only fire when bootstrapping the 60146c321187Smrg# libtool distribution, otherwise you forgot to ship ltmain.sh 60156c321187Smrg# with your package, and you will get complaints that there are 60166c321187Smrg# no rules to generate ltmain.sh. 60176c321187Smrgif test -f "$ltmain"; then 60186c321187Smrg # See if we are running on zsh, and set the options which allow our commands through 60196c321187Smrg # without removal of \ escapes. 60206c321187Smrg if test -n "${ZSH_VERSION+set}" ; then 60216c321187Smrg setopt NO_GLOB_SUBST 60226c321187Smrg fi 60236c321187Smrg # Now quote all the things that may contain metacharacters while being 60246c321187Smrg # careful not to overquote the AC_SUBSTed values. We take copies of the 60256c321187Smrg # variables and quote the copies for generation of the libtool script. 60266c321187Smrg for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ 60276c321187Smrg SED SHELL STRIP \ 60286c321187Smrg libname_spec library_names_spec soname_spec extract_expsyms_cmds \ 60296c321187Smrg old_striplib striplib file_magic_cmd finish_cmds finish_eval \ 60306c321187Smrg deplibs_check_method reload_flag reload_cmds need_locks \ 60316c321187Smrg lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ 60326c321187Smrg lt_cv_sys_global_symbol_to_c_name_address \ 60336c321187Smrg sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ 60346c321187Smrg old_postinstall_cmds old_postuninstall_cmds \ 60356c321187Smrg _LT_AC_TAGVAR(compiler, $1) \ 60366c321187Smrg _LT_AC_TAGVAR(CC, $1) \ 60376c321187Smrg _LT_AC_TAGVAR(LD, $1) \ 60386c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ 60396c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ 60406c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ 60416c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ 60426c321187Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ 60436c321187Smrg _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ 60446c321187Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ 60456c321187Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ 60466c321187Smrg _LT_AC_TAGVAR(old_archive_cmds, $1) \ 60476c321187Smrg _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ 60486c321187Smrg _LT_AC_TAGVAR(predep_objects, $1) \ 60496c321187Smrg _LT_AC_TAGVAR(postdep_objects, $1) \ 60506c321187Smrg _LT_AC_TAGVAR(predeps, $1) \ 60516c321187Smrg _LT_AC_TAGVAR(postdeps, $1) \ 60526c321187Smrg _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ 605393493779Smrg _LT_AC_TAGVAR(compiler_lib_search_dirs, $1) \ 60546c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1) \ 60556c321187Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ 60566c321187Smrg _LT_AC_TAGVAR(postinstall_cmds, $1) \ 60576c321187Smrg _LT_AC_TAGVAR(postuninstall_cmds, $1) \ 60586c321187Smrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ 60596c321187Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1) \ 60606c321187Smrg _LT_AC_TAGVAR(no_undefined_flag, $1) \ 60616c321187Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1) \ 60626c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ 60636c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ 60646c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ 60656c321187Smrg _LT_AC_TAGVAR(hardcode_automatic, $1) \ 60666c321187Smrg _LT_AC_TAGVAR(module_cmds, $1) \ 60676c321187Smrg _LT_AC_TAGVAR(module_expsym_cmds, $1) \ 60686c321187Smrg _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ 606993493779Smrg _LT_AC_TAGVAR(fix_srcfile_path, $1) \ 60706c321187Smrg _LT_AC_TAGVAR(exclude_expsyms, $1) \ 60716c321187Smrg _LT_AC_TAGVAR(include_expsyms, $1); do 60726c321187Smrg 60736c321187Smrg case $var in 60746c321187Smrg _LT_AC_TAGVAR(old_archive_cmds, $1) | \ 60756c321187Smrg _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ 60766c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1) | \ 60776c321187Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ 60786c321187Smrg _LT_AC_TAGVAR(module_cmds, $1) | \ 60796c321187Smrg _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ 60806c321187Smrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ 60816c321187Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ 60826c321187Smrg extract_expsyms_cmds | reload_cmds | finish_cmds | \ 60836c321187Smrg postinstall_cmds | postuninstall_cmds | \ 60846c321187Smrg old_postinstall_cmds | old_postuninstall_cmds | \ 60856c321187Smrg sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) 60866c321187Smrg # Double-quote double-evaled strings. 60876c321187Smrg eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" 60886c321187Smrg ;; 60896c321187Smrg *) 60906c321187Smrg eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" 60916c321187Smrg ;; 60926c321187Smrg esac 60936c321187Smrg done 60946c321187Smrg 60956c321187Smrg case $lt_echo in 60966c321187Smrg *'\[$]0 --fallback-echo"') 60976c321187Smrg lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` 60986c321187Smrg ;; 60996c321187Smrg esac 61006c321187Smrg 61016c321187Smrgifelse([$1], [], 61026c321187Smrg [cfgfile="${ofile}T" 61036c321187Smrg trap "$rm \"$cfgfile\"; exit 1" 1 2 15 61046c321187Smrg $rm -f "$cfgfile" 61056c321187Smrg AC_MSG_NOTICE([creating $ofile])], 61066c321187Smrg [cfgfile="$ofile"]) 61076c321187Smrg 61086c321187Smrg cat <<__EOF__ >> "$cfgfile" 61096c321187Smrgifelse([$1], [], 61106c321187Smrg[#! $SHELL 61116c321187Smrg 61126c321187Smrg# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 61136c321187Smrg# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) 61146c321187Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 61156c321187Smrg# 611693493779Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 61176c321187Smrg# Free Software Foundation, Inc. 61186c321187Smrg# 61196c321187Smrg# This file is part of GNU Libtool: 61206c321187Smrg# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 61216c321187Smrg# 61226c321187Smrg# This program is free software; you can redistribute it and/or modify 61236c321187Smrg# it under the terms of the GNU General Public License as published by 61246c321187Smrg# the Free Software Foundation; either version 2 of the License, or 61256c321187Smrg# (at your option) any later version. 61266c321187Smrg# 61276c321187Smrg# This program is distributed in the hope that it will be useful, but 61286c321187Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 61296c321187Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 61306c321187Smrg# General Public License for more details. 61316c321187Smrg# 61326c321187Smrg# You should have received a copy of the GNU General Public License 61336c321187Smrg# along with this program; if not, write to the Free Software 61346c321187Smrg# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 61356c321187Smrg# 61366c321187Smrg# As a special exception to the GNU General Public License, if you 61376c321187Smrg# distribute this file as part of a program that contains a 61386c321187Smrg# configuration script generated by Autoconf, you may include it under 61396c321187Smrg# the same distribution terms that you use for the rest of that program. 61406c321187Smrg 61416c321187Smrg# A sed program that does not truncate output. 61426c321187SmrgSED=$lt_SED 61436c321187Smrg 61446c321187Smrg# Sed that helps us avoid accidentally triggering echo(1) options like -n. 61456c321187SmrgXsed="$SED -e 1s/^X//" 61466c321187Smrg 61476c321187Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 61486c321187Smrg# if CDPATH is set. 61496c321187Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 61506c321187Smrg 61516c321187Smrg# The names of the tagged configurations supported by this script. 61526c321187Smrgavailable_tags= 61536c321187Smrg 61546c321187Smrg# ### BEGIN LIBTOOL CONFIG], 61556c321187Smrg[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) 61566c321187Smrg 61576c321187Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 61586c321187Smrg 61596c321187Smrg# Shell to use when invoking shell scripts. 61606c321187SmrgSHELL=$lt_SHELL 61616c321187Smrg 61626c321187Smrg# Whether or not to build shared libraries. 61636c321187Smrgbuild_libtool_libs=$enable_shared 61646c321187Smrg 61656c321187Smrg# Whether or not to build static libraries. 61666c321187Smrgbuild_old_libs=$enable_static 61676c321187Smrg 61686c321187Smrg# Whether or not to add -lc for building shared libraries. 61696c321187Smrgbuild_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) 61706c321187Smrg 61716c321187Smrg# Whether or not to disallow shared libs when runtime libs are static 61726c321187Smrgallow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) 61736c321187Smrg 61746c321187Smrg# Whether or not to optimize for fast installation. 61756c321187Smrgfast_install=$enable_fast_install 61766c321187Smrg 61776c321187Smrg# The host system. 61786c321187Smrghost_alias=$host_alias 61796c321187Smrghost=$host 61806c321187Smrghost_os=$host_os 61816c321187Smrg 61826c321187Smrg# The build system. 61836c321187Smrgbuild_alias=$build_alias 61846c321187Smrgbuild=$build 61856c321187Smrgbuild_os=$build_os 61866c321187Smrg 61876c321187Smrg# An echo program that does not interpret backslashes. 61886c321187Smrgecho=$lt_echo 61896c321187Smrg 61906c321187Smrg# The archiver. 61916c321187SmrgAR=$lt_AR 61926c321187SmrgAR_FLAGS=$lt_AR_FLAGS 61936c321187Smrg 61946c321187Smrg# A C compiler. 61956c321187SmrgLTCC=$lt_LTCC 61966c321187Smrg 61976c321187Smrg# LTCC compiler flags. 61986c321187SmrgLTCFLAGS=$lt_LTCFLAGS 61996c321187Smrg 62006c321187Smrg# A language-specific compiler. 62016c321187SmrgCC=$lt_[]_LT_AC_TAGVAR(compiler, $1) 62026c321187Smrg 62036c321187Smrg# Is the compiler the GNU C compiler? 62046c321187Smrgwith_gcc=$_LT_AC_TAGVAR(GCC, $1) 62056c321187Smrg 62066c321187Smrg# An ERE matcher. 62076c321187SmrgEGREP=$lt_EGREP 62086c321187Smrg 62096c321187Smrg# The linker used to build libraries. 62106c321187SmrgLD=$lt_[]_LT_AC_TAGVAR(LD, $1) 62116c321187Smrg 62126c321187Smrg# Whether we need hard or soft links. 62136c321187SmrgLN_S=$lt_LN_S 62146c321187Smrg 62156c321187Smrg# A BSD-compatible nm program. 62166c321187SmrgNM=$lt_NM 62176c321187Smrg 62186c321187Smrg# A symbol stripping program 62196c321187SmrgSTRIP=$lt_STRIP 62206c321187Smrg 62216c321187Smrg# Used to examine libraries when file_magic_cmd begins "file" 62226c321187SmrgMAGIC_CMD=$MAGIC_CMD 62236c321187Smrg 62246c321187Smrg# Used on cygwin: DLL creation program. 62256c321187SmrgDLLTOOL="$DLLTOOL" 62266c321187Smrg 62276c321187Smrg# Used on cygwin: object dumper. 62286c321187SmrgOBJDUMP="$OBJDUMP" 62296c321187Smrg 62306c321187Smrg# Used on cygwin: assembler. 62316c321187SmrgAS="$AS" 62326c321187Smrg 62336c321187Smrg# The name of the directory that contains temporary libtool files. 62346c321187Smrgobjdir=$objdir 62356c321187Smrg 62366c321187Smrg# How to create reloadable object files. 62376c321187Smrgreload_flag=$lt_reload_flag 62386c321187Smrgreload_cmds=$lt_reload_cmds 62396c321187Smrg 62406c321187Smrg# How to pass a linker flag through the compiler. 62416c321187Smrgwl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 62426c321187Smrg 62436c321187Smrg# Object file suffix (normally "o"). 62446c321187Smrgobjext="$ac_objext" 62456c321187Smrg 62466c321187Smrg# Old archive suffix (normally "a"). 62476c321187Smrglibext="$libext" 62486c321187Smrg 62496c321187Smrg# Shared library suffix (normally ".so"). 62506c321187Smrgshrext_cmds='$shrext_cmds' 62516c321187Smrg 62526c321187Smrg# Executable file suffix (normally ""). 62536c321187Smrgexeext="$exeext" 62546c321187Smrg 62556c321187Smrg# Additional compiler flags for building library objects. 62566c321187Smrgpic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 62576c321187Smrgpic_mode=$pic_mode 62586c321187Smrg 62596c321187Smrg# What is the maximum length of a command? 62606c321187Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 62616c321187Smrg 62626c321187Smrg# Does compiler simultaneously support -c and -o options? 62636c321187Smrgcompiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) 62646c321187Smrg 62656c321187Smrg# Must we lock files when doing compilation? 62666c321187Smrgneed_locks=$lt_need_locks 62676c321187Smrg 62686c321187Smrg# Do we need the lib prefix for modules? 62696c321187Smrgneed_lib_prefix=$need_lib_prefix 62706c321187Smrg 62716c321187Smrg# Do we need a version for libraries? 62726c321187Smrgneed_version=$need_version 62736c321187Smrg 62746c321187Smrg# Whether dlopen is supported. 62756c321187Smrgdlopen_support=$enable_dlopen 62766c321187Smrg 62776c321187Smrg# Whether dlopen of programs is supported. 62786c321187Smrgdlopen_self=$enable_dlopen_self 62796c321187Smrg 62806c321187Smrg# Whether dlopen of statically linked programs is supported. 62816c321187Smrgdlopen_self_static=$enable_dlopen_self_static 62826c321187Smrg 62836c321187Smrg# Compiler flag to prevent dynamic linking. 62846c321187Smrglink_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) 62856c321187Smrg 62866c321187Smrg# Compiler flag to turn off builtin functions. 62876c321187Smrgno_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) 62886c321187Smrg 62896c321187Smrg# Compiler flag to allow reflexive dlopens. 62906c321187Smrgexport_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) 62916c321187Smrg 62926c321187Smrg# Compiler flag to generate shared objects directly from archives. 62936c321187Smrgwhole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) 62946c321187Smrg 62956c321187Smrg# Compiler flag to generate thread-safe objects. 62966c321187Smrgthread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) 62976c321187Smrg 62986c321187Smrg# Library versioning type. 62996c321187Smrgversion_type=$version_type 63006c321187Smrg 63016c321187Smrg# Format of library name prefix. 63026c321187Smrglibname_spec=$lt_libname_spec 63036c321187Smrg 63046c321187Smrg# List of archive names. First name is the real one, the rest are links. 63056c321187Smrg# The last name is the one that the linker finds with -lNAME. 63066c321187Smrglibrary_names_spec=$lt_library_names_spec 63076c321187Smrg 63086c321187Smrg# The coded name of the library, if different from the real name. 63096c321187Smrgsoname_spec=$lt_soname_spec 63106c321187Smrg 63116c321187Smrg# Commands used to build and install an old-style archive. 63126c321187SmrgRANLIB=$lt_RANLIB 63136c321187Smrgold_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) 63146c321187Smrgold_postinstall_cmds=$lt_old_postinstall_cmds 63156c321187Smrgold_postuninstall_cmds=$lt_old_postuninstall_cmds 63166c321187Smrg 63176c321187Smrg# Create an old-style archive from a shared archive. 63186c321187Smrgold_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) 63196c321187Smrg 63206c321187Smrg# Create a temporary old-style archive to link instead of a shared archive. 63216c321187Smrgold_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) 63226c321187Smrg 63236c321187Smrg# Commands used to build and install a shared archive. 63246c321187Smrgarchive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) 63256c321187Smrgarchive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) 63266c321187Smrgpostinstall_cmds=$lt_postinstall_cmds 63276c321187Smrgpostuninstall_cmds=$lt_postuninstall_cmds 63286c321187Smrg 63296c321187Smrg# Commands used to build a loadable module (assumed same as above if empty) 63306c321187Smrgmodule_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) 63316c321187Smrgmodule_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) 63326c321187Smrg 63336c321187Smrg# Commands to strip libraries. 63346c321187Smrgold_striplib=$lt_old_striplib 63356c321187Smrgstriplib=$lt_striplib 63366c321187Smrg 63376c321187Smrg# Dependencies to place before the objects being linked to create a 63386c321187Smrg# shared library. 63396c321187Smrgpredep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) 63406c321187Smrg 63416c321187Smrg# Dependencies to place after the objects being linked to create a 63426c321187Smrg# shared library. 63436c321187Smrgpostdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) 63446c321187Smrg 63456c321187Smrg# Dependencies to place before the objects being linked to create a 63466c321187Smrg# shared library. 63476c321187Smrgpredeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) 63486c321187Smrg 63496c321187Smrg# Dependencies to place after the objects being linked to create a 63506c321187Smrg# shared library. 63516c321187Smrgpostdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) 63526c321187Smrg 635393493779Smrg# The directories searched by this compiler when creating a shared 635493493779Smrg# library 635593493779Smrgcompiler_lib_search_dirs=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_dirs, $1) 635693493779Smrg 63576c321187Smrg# The library search path used internally by the compiler when linking 63586c321187Smrg# a shared library. 63596c321187Smrgcompiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) 63606c321187Smrg 63616c321187Smrg# Method to check whether dependent libraries are shared objects. 63626c321187Smrgdeplibs_check_method=$lt_deplibs_check_method 63636c321187Smrg 63646c321187Smrg# Command to use when deplibs_check_method == file_magic. 63656c321187Smrgfile_magic_cmd=$lt_file_magic_cmd 63666c321187Smrg 63676c321187Smrg# Flag that allows shared libraries with undefined symbols to be built. 63686c321187Smrgallow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) 63696c321187Smrg 63706c321187Smrg# Flag that forces no undefined symbols. 63716c321187Smrgno_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) 63726c321187Smrg 63736c321187Smrg# Commands used to finish a libtool library installation in a directory. 63746c321187Smrgfinish_cmds=$lt_finish_cmds 63756c321187Smrg 63766c321187Smrg# Same as above, but a single script fragment to be evaled but not shown. 63776c321187Smrgfinish_eval=$lt_finish_eval 63786c321187Smrg 63796c321187Smrg# Take the output of nm and produce a listing of raw symbols and C names. 63806c321187Smrgglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe 63816c321187Smrg 63826c321187Smrg# Transform the output of nm in a proper C declaration 63836c321187Smrgglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl 63846c321187Smrg 63856c321187Smrg# Transform the output of nm in a C name address pair 63866c321187Smrgglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address 63876c321187Smrg 63886c321187Smrg# This is the shared library runtime path variable. 63896c321187Smrgrunpath_var=$runpath_var 63906c321187Smrg 63916c321187Smrg# This is the shared library path variable. 63926c321187Smrgshlibpath_var=$shlibpath_var 63936c321187Smrg 63946c321187Smrg# Is shlibpath searched before the hard-coded library search path? 63956c321187Smrgshlibpath_overrides_runpath=$shlibpath_overrides_runpath 63966c321187Smrg 63976c321187Smrg# How to hardcode a shared library path into an executable. 63986c321187Smrghardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) 63996c321187Smrg 64006c321187Smrg# Whether we should hardcode library paths into libraries. 64016c321187Smrghardcode_into_libs=$hardcode_into_libs 64026c321187Smrg 64036c321187Smrg# Flag to hardcode \$libdir into a binary during linking. 64046c321187Smrg# This must work even if \$libdir does not exist. 64056c321187Smrghardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) 64066c321187Smrg 64076c321187Smrg# If ld is used when linking, flag to hardcode \$libdir into 64086c321187Smrg# a binary during linking. This must work even if \$libdir does 64096c321187Smrg# not exist. 64106c321187Smrghardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) 64116c321187Smrg 64126c321187Smrg# Whether we need a single -rpath flag with a separated argument. 64136c321187Smrghardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) 64146c321187Smrg 64156c321187Smrg# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the 64166c321187Smrg# resulting binary. 64176c321187Smrghardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) 64186c321187Smrg 64196c321187Smrg# Set to yes if using the -LDIR flag during linking hardcodes DIR into the 64206c321187Smrg# resulting binary. 64216c321187Smrghardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) 64226c321187Smrg 64236c321187Smrg# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into 64246c321187Smrg# the resulting binary. 64256c321187Smrghardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) 64266c321187Smrg 64276c321187Smrg# Set to yes if building a shared library automatically hardcodes DIR into the library 64286c321187Smrg# and all subsequent libraries and executables linked against it. 64296c321187Smrghardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) 64306c321187Smrg 64316c321187Smrg# Variables whose values should be saved in libtool wrapper scripts and 64326c321187Smrg# restored at relink time. 64336c321187Smrgvariables_saved_for_relink="$variables_saved_for_relink" 64346c321187Smrg 64356c321187Smrg# Whether libtool must link a program against all its dependency libraries. 64366c321187Smrglink_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) 64376c321187Smrg 64386c321187Smrg# Compile-time system search path for libraries 64396c321187Smrgsys_lib_search_path_spec=$lt_sys_lib_search_path_spec 64406c321187Smrg 64416c321187Smrg# Run-time system search path for libraries 64426c321187Smrgsys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec 64436c321187Smrg 64446c321187Smrg# Fix the shell variable \$srcfile for the compiler. 644593493779Smrgfix_srcfile_path=$lt_fix_srcfile_path 64466c321187Smrg 64476c321187Smrg# Set to yes if exported symbols are required. 64486c321187Smrgalways_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) 64496c321187Smrg 64506c321187Smrg# The commands to list exported symbols. 64516c321187Smrgexport_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) 64526c321187Smrg 64536c321187Smrg# The commands to extract the exported symbol list from a shared archive. 64546c321187Smrgextract_expsyms_cmds=$lt_extract_expsyms_cmds 64556c321187Smrg 64566c321187Smrg# Symbols that should not be listed in the preloaded symbols. 64576c321187Smrgexclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) 64586c321187Smrg 64596c321187Smrg# Symbols that must always be exported. 64606c321187Smrginclude_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) 64616c321187Smrg 64626c321187Smrgifelse([$1],[], 64636c321187Smrg[# ### END LIBTOOL CONFIG], 64646c321187Smrg[# ### END LIBTOOL TAG CONFIG: $tagname]) 64656c321187Smrg 64666c321187Smrg__EOF__ 64676c321187Smrg 64686c321187Smrgifelse([$1],[], [ 64696c321187Smrg case $host_os in 64706c321187Smrg aix3*) 64716c321187Smrg cat <<\EOF >> "$cfgfile" 64726c321187Smrg 64736c321187Smrg# AIX sometimes has problems with the GCC collect2 program. For some 64746c321187Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 64756c321187Smrg# vanish in a puff of smoke. 64766c321187Smrgif test "X${COLLECT_NAMES+set}" != Xset; then 64776c321187Smrg COLLECT_NAMES= 64786c321187Smrg export COLLECT_NAMES 64796c321187Smrgfi 64806c321187SmrgEOF 64816c321187Smrg ;; 64826c321187Smrg esac 64836c321187Smrg 64846c321187Smrg # We use sed instead of cat because bash on DJGPP gets confused if 64856c321187Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 64866c321187Smrg # text mode, it properly converts lines to CR/LF. This bash problem 64876c321187Smrg # is reportedly fixed, but why not run on old versions too? 64886c321187Smrg sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) 64896c321187Smrg 64906c321187Smrg mv -f "$cfgfile" "$ofile" || \ 64916c321187Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 64926c321187Smrg chmod +x "$ofile" 64936c321187Smrg]) 64946c321187Smrgelse 64956c321187Smrg # If there is no Makefile yet, we rely on a make rule to execute 64966c321187Smrg # `config.status --recheck' to rerun these tests and create the 64976c321187Smrg # libtool script then. 64986c321187Smrg ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` 64996c321187Smrg if test -f "$ltmain_in"; then 65006c321187Smrg test -f Makefile && make "$ltmain" 65016c321187Smrg fi 65026c321187Smrgfi 65036c321187Smrg])# AC_LIBTOOL_CONFIG 65046c321187Smrg 65056c321187Smrg 65066c321187Smrg# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) 65076c321187Smrg# ------------------------------------------- 65086c321187SmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], 65096c321187Smrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 65106c321187Smrg 65116c321187Smrg_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 65126c321187Smrg 65136c321187Smrgif test "$GCC" = yes; then 65146c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 65156c321187Smrg 65166c321187Smrg AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 65176c321187Smrg lt_cv_prog_compiler_rtti_exceptions, 65186c321187Smrg [-fno-rtti -fno-exceptions], [], 65196c321187Smrg [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 65206c321187Smrgfi 65216c321187Smrg])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI 65226c321187Smrg 65236c321187Smrg 65246c321187Smrg# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 65256c321187Smrg# --------------------------------- 65266c321187SmrgAC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], 65276c321187Smrg[AC_REQUIRE([AC_CANONICAL_HOST]) 652893493779SmrgAC_REQUIRE([LT_AC_PROG_SED]) 65296c321187SmrgAC_REQUIRE([AC_PROG_NM]) 65306c321187SmrgAC_REQUIRE([AC_OBJEXT]) 65316c321187Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 65326c321187SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 65336c321187SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 65346c321187Smrg[ 65356c321187Smrg# These are sane defaults that work on at least a few old systems. 65366c321187Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 65376c321187Smrg 65386c321187Smrg# Character class describing NM global symbol codes. 65396c321187Smrgsymcode='[[BCDEGRST]]' 65406c321187Smrg 65416c321187Smrg# Regexp to match symbols that can be accessed directly from C. 65426c321187Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 65436c321187Smrg 65446c321187Smrg# Transform an extracted symbol line into a proper C declaration 65456c321187Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" 65466c321187Smrg 65476c321187Smrg# Transform an extracted symbol line into symbol name and symbol address 65486c321187Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" 65496c321187Smrg 65506c321187Smrg# Define system-specific variables. 65516c321187Smrgcase $host_os in 65526c321187Smrgaix*) 65536c321187Smrg symcode='[[BCDT]]' 65546c321187Smrg ;; 65556c321187Smrgcygwin* | mingw* | pw32*) 65566c321187Smrg symcode='[[ABCDGISTW]]' 65576c321187Smrg ;; 65586c321187Smrghpux*) # Its linker distinguishes data from code symbols 65596c321187Smrg if test "$host_cpu" = ia64; then 65606c321187Smrg symcode='[[ABCDEGRST]]' 65616c321187Smrg fi 65626c321187Smrg lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 65636c321187Smrg lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" 65646c321187Smrg ;; 656593493779Smrglinux* | k*bsd*-gnu) 65666c321187Smrg if test "$host_cpu" = ia64; then 65676c321187Smrg symcode='[[ABCDGIRSTW]]' 65686c321187Smrg lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 65696c321187Smrg lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" 65706c321187Smrg fi 65716c321187Smrg ;; 65726c321187Smrgirix* | nonstopux*) 65736c321187Smrg symcode='[[BCDEGRST]]' 65746c321187Smrg ;; 65756c321187Smrgosf*) 65766c321187Smrg symcode='[[BCDEGQRST]]' 65776c321187Smrg ;; 65786c321187Smrgsolaris*) 65796c321187Smrg symcode='[[BDRT]]' 65806c321187Smrg ;; 65816c321187Smrgsco3.2v5*) 65826c321187Smrg symcode='[[DT]]' 65836c321187Smrg ;; 65846c321187Smrgsysv4.2uw2*) 65856c321187Smrg symcode='[[DT]]' 65866c321187Smrg ;; 65876c321187Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 65886c321187Smrg symcode='[[ABDT]]' 65896c321187Smrg ;; 65906c321187Smrgsysv4) 65916c321187Smrg symcode='[[DFNSTU]]' 65926c321187Smrg ;; 65936c321187Smrgesac 65946c321187Smrg 65956c321187Smrg# Handle CRLF in mingw tool chain 65966c321187Smrgopt_cr= 65976c321187Smrgcase $build_os in 65986c321187Smrgmingw*) 65996c321187Smrg opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp 66006c321187Smrg ;; 66016c321187Smrgesac 66026c321187Smrg 66036c321187Smrg# If we're using GNU nm, then use its standard symbol codes. 66046c321187Smrgcase `$NM -V 2>&1` in 66056c321187Smrg*GNU* | *'with BFD'*) 66066c321187Smrg symcode='[[ABCDGIRSTW]]' ;; 66076c321187Smrgesac 66086c321187Smrg 66096c321187Smrg# Try without a prefix undercore, then with it. 66106c321187Smrgfor ac_symprfx in "" "_"; do 66116c321187Smrg 66126c321187Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 66136c321187Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 66146c321187Smrg 66156c321187Smrg # Write the raw and C identifiers. 66166c321187Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 66176c321187Smrg 66186c321187Smrg # Check to see that the pipe works correctly. 66196c321187Smrg pipe_works=no 66206c321187Smrg 66216c321187Smrg rm -f conftest* 66226c321187Smrg cat > conftest.$ac_ext <<EOF 66236c321187Smrg#ifdef __cplusplus 66246c321187Smrgextern "C" { 66256c321187Smrg#endif 66266c321187Smrgchar nm_test_var; 66276c321187Smrgvoid nm_test_func(){} 66286c321187Smrg#ifdef __cplusplus 66296c321187Smrg} 66306c321187Smrg#endif 66316c321187Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 66326c321187SmrgEOF 66336c321187Smrg 66346c321187Smrg if AC_TRY_EVAL(ac_compile); then 66356c321187Smrg # Now try to grab the symbols. 66366c321187Smrg nlist=conftest.nm 66376c321187Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then 66386c321187Smrg # Try sorting and uniquifying the output. 66396c321187Smrg if sort "$nlist" | uniq > "$nlist"T; then 66406c321187Smrg mv -f "$nlist"T "$nlist" 66416c321187Smrg else 66426c321187Smrg rm -f "$nlist"T 66436c321187Smrg fi 66446c321187Smrg 66456c321187Smrg # Make sure that we snagged all the symbols we need. 66466c321187Smrg if grep ' nm_test_var$' "$nlist" >/dev/null; then 66476c321187Smrg if grep ' nm_test_func$' "$nlist" >/dev/null; then 66486c321187Smrg cat <<EOF > conftest.$ac_ext 66496c321187Smrg#ifdef __cplusplus 66506c321187Smrgextern "C" { 66516c321187Smrg#endif 66526c321187Smrg 66536c321187SmrgEOF 66546c321187Smrg # Now generate the symbol file. 66556c321187Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' 66566c321187Smrg 66576c321187Smrg cat <<EOF >> conftest.$ac_ext 66586c321187Smrg#if defined (__STDC__) && __STDC__ 66596c321187Smrg# define lt_ptr_t void * 66606c321187Smrg#else 66616c321187Smrg# define lt_ptr_t char * 66626c321187Smrg# define const 66636c321187Smrg#endif 66646c321187Smrg 66656c321187Smrg/* The mapping between symbol names and symbols. */ 66666c321187Smrgconst struct { 66676c321187Smrg const char *name; 66686c321187Smrg lt_ptr_t address; 66696c321187Smrg} 66706c321187Smrglt_preloaded_symbols[[]] = 66716c321187Smrg{ 66726c321187SmrgEOF 66736c321187Smrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext 66746c321187Smrg cat <<\EOF >> conftest.$ac_ext 66756c321187Smrg {0, (lt_ptr_t) 0} 66766c321187Smrg}; 66776c321187Smrg 66786c321187Smrg#ifdef __cplusplus 66796c321187Smrg} 66806c321187Smrg#endif 66816c321187SmrgEOF 66826c321187Smrg # Now try linking the two files. 66836c321187Smrg mv conftest.$ac_objext conftstm.$ac_objext 66846c321187Smrg lt_save_LIBS="$LIBS" 66856c321187Smrg lt_save_CFLAGS="$CFLAGS" 66866c321187Smrg LIBS="conftstm.$ac_objext" 66876c321187Smrg CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 66886c321187Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 66896c321187Smrg pipe_works=yes 66906c321187Smrg fi 66916c321187Smrg LIBS="$lt_save_LIBS" 66926c321187Smrg CFLAGS="$lt_save_CFLAGS" 66936c321187Smrg else 66946c321187Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 66956c321187Smrg fi 66966c321187Smrg else 66976c321187Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 66986c321187Smrg fi 66996c321187Smrg else 67006c321187Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 67016c321187Smrg fi 67026c321187Smrg else 67036c321187Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 67046c321187Smrg cat conftest.$ac_ext >&5 67056c321187Smrg fi 670693493779Smrg rm -rf conftest* conftst* 67076c321187Smrg 67086c321187Smrg # Do not use the global_symbol_pipe unless it works. 67096c321187Smrg if test "$pipe_works" = yes; then 67106c321187Smrg break 67116c321187Smrg else 67126c321187Smrg lt_cv_sys_global_symbol_pipe= 67136c321187Smrg fi 67146c321187Smrgdone 67156c321187Smrg]) 67166c321187Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 67176c321187Smrg lt_cv_sys_global_symbol_to_cdecl= 67186c321187Smrgfi 67196c321187Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 67206c321187Smrg AC_MSG_RESULT(failed) 67216c321187Smrgelse 67226c321187Smrg AC_MSG_RESULT(ok) 67236c321187Smrgfi 67246c321187Smrg]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 67256c321187Smrg 67266c321187Smrg 67276c321187Smrg# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) 67286c321187Smrg# --------------------------------------- 67296c321187SmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], 67306c321187Smrg[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= 67316c321187Smrg_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 67326c321187Smrg_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= 67336c321187Smrg 67346c321187SmrgAC_MSG_CHECKING([for $compiler option to produce PIC]) 67356c321187Smrg ifelse([$1],[CXX],[ 67366c321187Smrg # C++ specific cases for pic, static, wl, etc. 67376c321187Smrg if test "$GXX" = yes; then 67386c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 67396c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 67406c321187Smrg 67416c321187Smrg case $host_os in 67426c321187Smrg aix*) 67436c321187Smrg # All AIX code is PIC. 67446c321187Smrg if test "$host_cpu" = ia64; then 67456c321187Smrg # AIX 5 now supports IA64 processor 67466c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 67476c321187Smrg fi 67486c321187Smrg ;; 67496c321187Smrg amigaos*) 67506c321187Smrg # FIXME: we need at least 68020 code to build shared libraries, but 67516c321187Smrg # adding the `-m68020' flag to GCC prevents building anything better, 67526c321187Smrg # like `-m68040'. 67536c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 67546c321187Smrg ;; 675593493779Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 67566c321187Smrg # PIC is the default for these OSes. 67576c321187Smrg ;; 675893493779Smrg mingw* | cygwin* | os2* | pw32*) 67596c321187Smrg # This hack is so that the source file can tell whether it is being 67606c321187Smrg # built for inclusion in a dll (and should export symbols for example). 676193493779Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 676293493779Smrg # (--disable-auto-import) libraries 676393493779Smrg m4_if([$1], [GCJ], [], 676493493779Smrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 67656c321187Smrg ;; 67666c321187Smrg darwin* | rhapsody*) 67676c321187Smrg # PIC is the default on this platform 67686c321187Smrg # Common symbols not allowed in MH_DYLIB files 67696c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 67706c321187Smrg ;; 67716c321187Smrg *djgpp*) 67726c321187Smrg # DJGPP does not support shared libraries at all 67736c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 67746c321187Smrg ;; 677593493779Smrg interix[[3-9]]*) 67766c321187Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 67776c321187Smrg # Instead, we relocate shared libraries at runtime. 67786c321187Smrg ;; 67796c321187Smrg sysv4*MP*) 67806c321187Smrg if test -d /usr/nec; then 67816c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 67826c321187Smrg fi 67836c321187Smrg ;; 67846c321187Smrg hpux*) 67856c321187Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 67866c321187Smrg # not for PA HP-UX. 67876c321187Smrg case $host_cpu in 67886c321187Smrg hppa*64*|ia64*) 67896c321187Smrg ;; 67906c321187Smrg *) 67916c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 67926c321187Smrg ;; 67936c321187Smrg esac 67946c321187Smrg ;; 67956c321187Smrg *) 67966c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 67976c321187Smrg ;; 67986c321187Smrg esac 67996c321187Smrg else 68006c321187Smrg case $host_os in 680193493779Smrg aix[[4-9]]*) 68026c321187Smrg # All AIX code is PIC. 68036c321187Smrg if test "$host_cpu" = ia64; then 68046c321187Smrg # AIX 5 now supports IA64 processor 68056c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 68066c321187Smrg else 68076c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 68086c321187Smrg fi 68096c321187Smrg ;; 68106c321187Smrg chorus*) 68116c321187Smrg case $cc_basename in 68126c321187Smrg cxch68*) 68136c321187Smrg # Green Hills C++ Compiler 68146c321187Smrg # _LT_AC_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" 68156c321187Smrg ;; 68166c321187Smrg esac 68176c321187Smrg ;; 68186c321187Smrg darwin*) 68196c321187Smrg # PIC is the default on this platform 68206c321187Smrg # Common symbols not allowed in MH_DYLIB files 68216c321187Smrg case $cc_basename in 68226c321187Smrg xlc*) 68236c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 68246c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 68256c321187Smrg ;; 68266c321187Smrg esac 68276c321187Smrg ;; 68286c321187Smrg dgux*) 68296c321187Smrg case $cc_basename in 68306c321187Smrg ec++*) 68316c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 68326c321187Smrg ;; 68336c321187Smrg ghcx*) 68346c321187Smrg # Green Hills C++ Compiler 68356c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 68366c321187Smrg ;; 68376c321187Smrg *) 68386c321187Smrg ;; 68396c321187Smrg esac 68406c321187Smrg ;; 684193493779Smrg freebsd* | dragonfly*) 68426c321187Smrg # FreeBSD uses GNU C++ 68436c321187Smrg ;; 68446c321187Smrg hpux9* | hpux10* | hpux11*) 68456c321187Smrg case $cc_basename in 68466c321187Smrg CC*) 68476c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 68486c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 68496c321187Smrg if test "$host_cpu" != ia64; then 68506c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 68516c321187Smrg fi 68526c321187Smrg ;; 68536c321187Smrg aCC*) 68546c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 68556c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 68566c321187Smrg case $host_cpu in 68576c321187Smrg hppa*64*|ia64*) 68586c321187Smrg # +Z the default 68596c321187Smrg ;; 68606c321187Smrg *) 68616c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 68626c321187Smrg ;; 68636c321187Smrg esac 68646c321187Smrg ;; 68656c321187Smrg *) 68666c321187Smrg ;; 68676c321187Smrg esac 68686c321187Smrg ;; 68696c321187Smrg interix*) 68706c321187Smrg # This is c89, which is MS Visual C++ (no shared libs) 68716c321187Smrg # Anyone wants to do a port? 68726c321187Smrg ;; 68736c321187Smrg irix5* | irix6* | nonstopux*) 68746c321187Smrg case $cc_basename in 68756c321187Smrg CC*) 68766c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 68776c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 68786c321187Smrg # CC pic flag -KPIC is the default. 68796c321187Smrg ;; 68806c321187Smrg *) 68816c321187Smrg ;; 68826c321187Smrg esac 68836c321187Smrg ;; 688493493779Smrg linux* | k*bsd*-gnu) 68856c321187Smrg case $cc_basename in 68866c321187Smrg KCC*) 68876c321187Smrg # KAI C++ Compiler 68886c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 68896c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 68906c321187Smrg ;; 68916c321187Smrg icpc* | ecpc*) 68926c321187Smrg # Intel C++ 68936c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 68946c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 68956c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 68966c321187Smrg ;; 689793493779Smrg pgCC* | pgcpp*) 68986c321187Smrg # Portland Group C++ compiler. 68996c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 69006c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 69016c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 69026c321187Smrg ;; 69036c321187Smrg cxx*) 69046c321187Smrg # Compaq C++ 69056c321187Smrg # Make sure the PIC flag is empty. It appears that all Alpha 69066c321187Smrg # Linux and Compaq Tru64 Unix objects are PIC. 69076c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 69086c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 69096c321187Smrg ;; 69106c321187Smrg *) 691193493779Smrg case `$CC -V 2>&1 | sed 5q` in 691293493779Smrg *Sun\ C*) 691393493779Smrg # Sun C++ 5.9 691493493779Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 691593493779Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 691693493779Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 691793493779Smrg ;; 691893493779Smrg esac 69196c321187Smrg ;; 69206c321187Smrg esac 69216c321187Smrg ;; 69226c321187Smrg lynxos*) 69236c321187Smrg ;; 69246c321187Smrg m88k*) 69256c321187Smrg ;; 69266c321187Smrg mvs*) 69276c321187Smrg case $cc_basename in 69286c321187Smrg cxx*) 69296c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 69306c321187Smrg ;; 69316c321187Smrg *) 69326c321187Smrg ;; 69336c321187Smrg esac 69346c321187Smrg ;; 69356c321187Smrg netbsd*) 69366c321187Smrg ;; 69376c321187Smrg osf3* | osf4* | osf5*) 69386c321187Smrg case $cc_basename in 69396c321187Smrg KCC*) 69406c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 69416c321187Smrg ;; 69426c321187Smrg RCC*) 69436c321187Smrg # Rational C++ 2.4.1 69446c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 69456c321187Smrg ;; 69466c321187Smrg cxx*) 69476c321187Smrg # Digital/Compaq C++ 69486c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 69496c321187Smrg # Make sure the PIC flag is empty. It appears that all Alpha 69506c321187Smrg # Linux and Compaq Tru64 Unix objects are PIC. 69516c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 69526c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 69536c321187Smrg ;; 69546c321187Smrg *) 69556c321187Smrg ;; 69566c321187Smrg esac 69576c321187Smrg ;; 69586c321187Smrg psos*) 69596c321187Smrg ;; 69606c321187Smrg solaris*) 69616c321187Smrg case $cc_basename in 69626c321187Smrg CC*) 69636c321187Smrg # Sun C++ 4.2, 5.x and Centerline C++ 69646c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 69656c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 69666c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 69676c321187Smrg ;; 69686c321187Smrg gcx*) 69696c321187Smrg # Green Hills C++ Compiler 69706c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 69716c321187Smrg ;; 69726c321187Smrg *) 69736c321187Smrg ;; 69746c321187Smrg esac 69756c321187Smrg ;; 69766c321187Smrg sunos4*) 69776c321187Smrg case $cc_basename in 69786c321187Smrg CC*) 69796c321187Smrg # Sun C++ 4.x 69806c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 69816c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 69826c321187Smrg ;; 69836c321187Smrg lcc*) 69846c321187Smrg # Lucid 69856c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 69866c321187Smrg ;; 69876c321187Smrg *) 69886c321187Smrg ;; 69896c321187Smrg esac 69906c321187Smrg ;; 69916c321187Smrg tandem*) 69926c321187Smrg case $cc_basename in 69936c321187Smrg NCC*) 69946c321187Smrg # NonStop-UX NCC 3.20 69956c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 69966c321187Smrg ;; 69976c321187Smrg *) 69986c321187Smrg ;; 69996c321187Smrg esac 70006c321187Smrg ;; 70016c321187Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 70026c321187Smrg case $cc_basename in 70036c321187Smrg CC*) 70046c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 70056c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 70066c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 70076c321187Smrg ;; 70086c321187Smrg esac 70096c321187Smrg ;; 70106c321187Smrg vxworks*) 70116c321187Smrg ;; 70126c321187Smrg *) 70136c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 70146c321187Smrg ;; 70156c321187Smrg esac 70166c321187Smrg fi 70176c321187Smrg], 70186c321187Smrg[ 70196c321187Smrg if test "$GCC" = yes; then 70206c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 70216c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 70226c321187Smrg 70236c321187Smrg case $host_os in 70246c321187Smrg aix*) 70256c321187Smrg # All AIX code is PIC. 70266c321187Smrg if test "$host_cpu" = ia64; then 70276c321187Smrg # AIX 5 now supports IA64 processor 70286c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 70296c321187Smrg fi 70306c321187Smrg ;; 70316c321187Smrg 70326c321187Smrg amigaos*) 70336c321187Smrg # FIXME: we need at least 68020 code to build shared libraries, but 70346c321187Smrg # adding the `-m68020' flag to GCC prevents building anything better, 70356c321187Smrg # like `-m68040'. 70366c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 70376c321187Smrg ;; 70386c321187Smrg 703993493779Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 70406c321187Smrg # PIC is the default for these OSes. 70416c321187Smrg ;; 70426c321187Smrg 704393493779Smrg mingw* | cygwin* | pw32* | os2*) 70446c321187Smrg # This hack is so that the source file can tell whether it is being 70456c321187Smrg # built for inclusion in a dll (and should export symbols for example). 704693493779Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 704793493779Smrg # (--disable-auto-import) libraries 704893493779Smrg m4_if([$1], [GCJ], [], 704993493779Smrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 70506c321187Smrg ;; 70516c321187Smrg 70526c321187Smrg darwin* | rhapsody*) 70536c321187Smrg # PIC is the default on this platform 70546c321187Smrg # Common symbols not allowed in MH_DYLIB files 70556c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 70566c321187Smrg ;; 70576c321187Smrg 705893493779Smrg interix[[3-9]]*) 70596c321187Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 70606c321187Smrg # Instead, we relocate shared libraries at runtime. 70616c321187Smrg ;; 70626c321187Smrg 70636c321187Smrg msdosdjgpp*) 70646c321187Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 70656c321187Smrg # on systems that don't support them. 70666c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 70676c321187Smrg enable_shared=no 70686c321187Smrg ;; 70696c321187Smrg 70706c321187Smrg sysv4*MP*) 70716c321187Smrg if test -d /usr/nec; then 70726c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 70736c321187Smrg fi 70746c321187Smrg ;; 70756c321187Smrg 70766c321187Smrg hpux*) 70776c321187Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 70786c321187Smrg # not for PA HP-UX. 70796c321187Smrg case $host_cpu in 70806c321187Smrg hppa*64*|ia64*) 70816c321187Smrg # +Z the default 70826c321187Smrg ;; 70836c321187Smrg *) 70846c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 70856c321187Smrg ;; 70866c321187Smrg esac 70876c321187Smrg ;; 70886c321187Smrg 70896c321187Smrg *) 70906c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 70916c321187Smrg ;; 70926c321187Smrg esac 70936c321187Smrg else 70946c321187Smrg # PORTME Check for flag to pass linker flags through the system compiler. 70956c321187Smrg case $host_os in 70966c321187Smrg aix*) 70976c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 70986c321187Smrg if test "$host_cpu" = ia64; then 70996c321187Smrg # AIX 5 now supports IA64 processor 71006c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 71016c321187Smrg else 71026c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 71036c321187Smrg fi 71046c321187Smrg ;; 71056c321187Smrg darwin*) 71066c321187Smrg # PIC is the default on this platform 71076c321187Smrg # Common symbols not allowed in MH_DYLIB files 71086c321187Smrg case $cc_basename in 71096c321187Smrg xlc*) 71106c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 71116c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 71126c321187Smrg ;; 71136c321187Smrg esac 71146c321187Smrg ;; 71156c321187Smrg 711693493779Smrg mingw* | cygwin* | pw32* | os2*) 71176c321187Smrg # This hack is so that the source file can tell whether it is being 71186c321187Smrg # built for inclusion in a dll (and should export symbols for example). 711993493779Smrg m4_if([$1], [GCJ], [], 712093493779Smrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 71216c321187Smrg ;; 71226c321187Smrg 71236c321187Smrg hpux9* | hpux10* | hpux11*) 71246c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 71256c321187Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 71266c321187Smrg # not for PA HP-UX. 71276c321187Smrg case $host_cpu in 71286c321187Smrg hppa*64*|ia64*) 71296c321187Smrg # +Z the default 71306c321187Smrg ;; 71316c321187Smrg *) 71326c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 71336c321187Smrg ;; 71346c321187Smrg esac 71356c321187Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 71366c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 71376c321187Smrg ;; 71386c321187Smrg 71396c321187Smrg irix5* | irix6* | nonstopux*) 71406c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 71416c321187Smrg # PIC (with -KPIC) is the default. 71426c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 71436c321187Smrg ;; 71446c321187Smrg 71456c321187Smrg newsos6) 71466c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 71476c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 71486c321187Smrg ;; 71496c321187Smrg 715093493779Smrg linux* | k*bsd*-gnu) 71516c321187Smrg case $cc_basename in 71526c321187Smrg icc* | ecc*) 71536c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 71546c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 71556c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 71566c321187Smrg ;; 71576c321187Smrg pgcc* | pgf77* | pgf90* | pgf95*) 71586c321187Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 71596c321187Smrg # which looks to be a dead project) 71606c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 71616c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 71626c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 71636c321187Smrg ;; 71646c321187Smrg ccc*) 71656c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 71666c321187Smrg # All Alpha code is PIC. 71676c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 71686c321187Smrg ;; 716993493779Smrg *) 717093493779Smrg case `$CC -V 2>&1 | sed 5q` in 717193493779Smrg *Sun\ C*) 717293493779Smrg # Sun C 5.9 717393493779Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 717493493779Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 717593493779Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 717693493779Smrg ;; 717793493779Smrg *Sun\ F*) 717893493779Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 717993493779Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 718093493779Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 718193493779Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='' 718293493779Smrg ;; 718393493779Smrg esac 718493493779Smrg ;; 71856c321187Smrg esac 71866c321187Smrg ;; 71876c321187Smrg 71886c321187Smrg osf3* | osf4* | osf5*) 71896c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 71906c321187Smrg # All OSF/1 code is PIC. 71916c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 71926c321187Smrg ;; 71936c321187Smrg 719493493779Smrg rdos*) 719593493779Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 719693493779Smrg ;; 719793493779Smrg 71986c321187Smrg solaris*) 71996c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 72006c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 72016c321187Smrg case $cc_basename in 72026c321187Smrg f77* | f90* | f95*) 72036c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 72046c321187Smrg *) 72056c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 72066c321187Smrg esac 72076c321187Smrg ;; 72086c321187Smrg 72096c321187Smrg sunos4*) 72106c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 72116c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 72126c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 72136c321187Smrg ;; 72146c321187Smrg 72156c321187Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 72166c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 72176c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 72186c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 72196c321187Smrg ;; 72206c321187Smrg 72216c321187Smrg sysv4*MP*) 72226c321187Smrg if test -d /usr/nec ;then 72236c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 72246c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 72256c321187Smrg fi 72266c321187Smrg ;; 72276c321187Smrg 72286c321187Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 72296c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 72306c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 72316c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 72326c321187Smrg ;; 72336c321187Smrg 72346c321187Smrg unicos*) 72356c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 72366c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 72376c321187Smrg ;; 72386c321187Smrg 72396c321187Smrg uts4*) 72406c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 72416c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 72426c321187Smrg ;; 72436c321187Smrg 72446c321187Smrg *) 72456c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 72466c321187Smrg ;; 72476c321187Smrg esac 72486c321187Smrg fi 72496c321187Smrg]) 72506c321187SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) 72516c321187Smrg 72526c321187Smrg# 72536c321187Smrg# Check to make sure the PIC flag actually works. 72546c321187Smrg# 72556c321187Smrgif test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then 72566c321187Smrg AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], 725793493779Smrg _LT_AC_TAGVAR(lt_cv_prog_compiler_pic_works, $1), 72586c321187Smrg [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], 72596c321187Smrg [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in 72606c321187Smrg "" | " "*) ;; 72616c321187Smrg *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; 72626c321187Smrg esac], 72636c321187Smrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 72646c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 72656c321187Smrgfi 72666c321187Smrgcase $host_os in 72676c321187Smrg # For platforms which do not support PIC, -DPIC is meaningless: 72686c321187Smrg *djgpp*) 72696c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 72706c321187Smrg ;; 72716c321187Smrg *) 72726c321187Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" 72736c321187Smrg ;; 72746c321187Smrgesac 72756c321187Smrg 72766c321187Smrg# 72776c321187Smrg# Check to make sure the static flag actually works. 72786c321187Smrg# 72796c321187Smrgwl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" 72806c321187SmrgAC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 728193493779Smrg _LT_AC_TAGVAR(lt_cv_prog_compiler_static_works, $1), 72826c321187Smrg $lt_tmp_static_flag, 72836c321187Smrg [], 72846c321187Smrg [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) 72856c321187Smrg]) 72866c321187Smrg 72876c321187Smrg 72886c321187Smrg# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) 72896c321187Smrg# ------------------------------------ 72906c321187Smrg# See if the linker supports building shared libraries. 72916c321187SmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], 729293493779Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 729393493779SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 72946c321187Smrgifelse([$1],[CXX],[ 72956c321187Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 72966c321187Smrg case $host_os in 729793493779Smrg aix[[4-9]]*) 72986c321187Smrg # If we're using GNU nm, then we don't want the "-C" option. 72996c321187Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 73006c321187Smrg if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 73016c321187Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' 73026c321187Smrg else 73036c321187Smrg _LT_AC_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' 73046c321187Smrg fi 73056c321187Smrg ;; 73066c321187Smrg pw32*) 73076c321187Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 73086c321187Smrg ;; 73096c321187Smrg cygwin* | mingw*) 731093493779Smrg _LT_AC_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' 73116c321187Smrg ;; 73126c321187Smrg *) 73136c321187Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 73146c321187Smrg ;; 73156c321187Smrg esac 731693493779Smrg _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 73176c321187Smrg],[ 73186c321187Smrg runpath_var= 73196c321187Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)= 73206c321187Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 73216c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)= 73226c321187Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)= 73236c321187Smrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= 73246c321187Smrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= 73256c321187Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 73266c321187Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 73276c321187Smrg _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= 73286c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 73296c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 73306c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 73316c321187Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 73326c321187Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=no 73336c321187Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 73346c321187Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 73356c321187Smrg _LT_AC_TAGVAR(hardcode_automatic, $1)=no 73366c321187Smrg _LT_AC_TAGVAR(module_cmds, $1)= 73376c321187Smrg _LT_AC_TAGVAR(module_expsym_cmds, $1)= 73386c321187Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 73396c321187Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 73406c321187Smrg # include_expsyms should be a list of space-separated symbols to be *always* 73416c321187Smrg # included in the symbol list 73426c321187Smrg _LT_AC_TAGVAR(include_expsyms, $1)= 73436c321187Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 73446c321187Smrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 73456c321187Smrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 73466c321187Smrg # as well as any symbol that contains `d'. 734793493779Smrg _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 73486c321187Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 73496c321187Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 73506c321187Smrg # the symbol is explicitly referenced. Since portable code cannot 73516c321187Smrg # rely on this symbol name, it's probably fine to never include it in 73526c321187Smrg # preloaded symbol tables. 735393493779Smrg # Exclude shared library initialization/finalization symbols. 735493493779Smrgdnl Note also adjust exclude_expsyms for C++ above. 73556c321187Smrg extract_expsyms_cmds= 73566c321187Smrg # Just being paranoid about ensuring that cc_basename is set. 73576c321187Smrg _LT_CC_BASENAME([$compiler]) 73586c321187Smrg case $host_os in 73596c321187Smrg cygwin* | mingw* | pw32*) 73606c321187Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 73616c321187Smrg # When not using gcc, we currently assume that we are using 73626c321187Smrg # Microsoft Visual C++. 73636c321187Smrg if test "$GCC" != yes; then 73646c321187Smrg with_gnu_ld=no 73656c321187Smrg fi 73666c321187Smrg ;; 73676c321187Smrg interix*) 73686c321187Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 73696c321187Smrg with_gnu_ld=yes 73706c321187Smrg ;; 73716c321187Smrg openbsd*) 73726c321187Smrg with_gnu_ld=no 73736c321187Smrg ;; 73746c321187Smrg esac 73756c321187Smrg 73766c321187Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 73776c321187Smrg if test "$with_gnu_ld" = yes; then 73786c321187Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 73796c321187Smrg wlarc='${wl}' 73806c321187Smrg 73816c321187Smrg # Set some defaults for GNU ld with shared library support. These 73826c321187Smrg # are reset later if shared libraries are not supported. Putting them 73836c321187Smrg # here allows them to be overridden if necessary. 73846c321187Smrg runpath_var=LD_RUN_PATH 73856c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 73866c321187Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 73876c321187Smrg # ancient GNU ld didn't support --whole-archive et. al. 73886c321187Smrg if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then 73896c321187Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 73906c321187Smrg else 73916c321187Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 73926c321187Smrg fi 73936c321187Smrg supports_anon_versioning=no 73946c321187Smrg case `$LD -v 2>/dev/null` in 73956c321187Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 73966c321187Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 73976c321187Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 73986c321187Smrg *\ 2.11.*) ;; # other 2.11 versions 73996c321187Smrg *) supports_anon_versioning=yes ;; 74006c321187Smrg esac 74016c321187Smrg 74026c321187Smrg # See if GNU ld supports shared libraries. 74036c321187Smrg case $host_os in 740493493779Smrg aix[[3-9]]*) 74056c321187Smrg # On AIX/PPC, the GNU linker is very broken 74066c321187Smrg if test "$host_cpu" != ia64; then 74076c321187Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 74086c321187Smrg cat <<EOF 1>&2 74096c321187Smrg 74106c321187Smrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported 74116c321187Smrg*** to be unable to reliably create shared libraries on AIX. 74126c321187Smrg*** Therefore, libtool is disabling shared libraries support. If you 74136c321187Smrg*** really care for shared libraries, you may want to modify your PATH 74146c321187Smrg*** so that a non-GNU linker is found, and then restart. 74156c321187Smrg 74166c321187SmrgEOF 74176c321187Smrg fi 74186c321187Smrg ;; 74196c321187Smrg 74206c321187Smrg amigaos*) 74216c321187Smrg _LT_AC_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)' 74226c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 74236c321187Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 74246c321187Smrg 74256c321187Smrg # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports 74266c321187Smrg # that the semantics of dynamic libraries on AmigaOS, at least up 74276c321187Smrg # to version 4, is to share data among multiple programs linked 74286c321187Smrg # with the same dynamic library. Since this doesn't match the 74296c321187Smrg # behavior of shared libraries on other platforms, we can't use 74306c321187Smrg # them. 74316c321187Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 74326c321187Smrg ;; 74336c321187Smrg 74346c321187Smrg beos*) 74356c321187Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 74366c321187Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 74376c321187Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 74386c321187Smrg # support --undefined. This deserves some investigation. FIXME 74396c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 74406c321187Smrg else 74416c321187Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 74426c321187Smrg fi 74436c321187Smrg ;; 74446c321187Smrg 74456c321187Smrg cygwin* | mingw* | pw32*) 74466c321187Smrg # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 74476c321187Smrg # as there is no search path for DLLs. 74486c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 74496c321187Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 74506c321187Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 74516c321187Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 745293493779Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' 74536c321187Smrg 74546c321187Smrg if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 74556c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 74566c321187Smrg # If the export-symbols file already is a .def file (1st line 74576c321187Smrg # is EXPORTS), use it as is; otherwise, prepend... 74586c321187Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 74596c321187Smrg cp $export_symbols $output_objdir/$soname.def; 74606c321187Smrg else 74616c321187Smrg echo EXPORTS > $output_objdir/$soname.def; 74626c321187Smrg cat $export_symbols >> $output_objdir/$soname.def; 74636c321187Smrg fi~ 74646c321187Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 74656c321187Smrg else 74666c321187Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 74676c321187Smrg fi 74686c321187Smrg ;; 74696c321187Smrg 747093493779Smrg interix[[3-9]]*) 74716c321187Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 74726c321187Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 74736c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 74746c321187Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 74756c321187Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 74766c321187Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 74776c321187Smrg # default) and relocated if they conflict, which is a slow very memory 74786c321187Smrg # consuming and fragmenting process. To avoid this, we pick a random, 74796c321187Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 74806c321187Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 74816c321187Smrg _LT_AC_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' 74826c321187Smrg _LT_AC_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' 74836c321187Smrg ;; 74846c321187Smrg 748593493779Smrg gnu* | linux* | k*bsd*-gnu) 74866c321187Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 74876c321187Smrg tmp_addflag= 74886c321187Smrg case $cc_basename,$host_cpu in 74896c321187Smrg pgcc*) # Portland Group C compiler 74906c321187Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' 74916c321187Smrg tmp_addflag=' $pic_flag' 74926c321187Smrg ;; 74936c321187Smrg pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers 74946c321187Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' 74956c321187Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 74966c321187Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 74976c321187Smrg tmp_addflag=' -i_dynamic' ;; 74986c321187Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 74996c321187Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 75006c321187Smrg ifc* | ifort*) # Intel Fortran compiler 75016c321187Smrg tmp_addflag=' -nofor_main' ;; 75026c321187Smrg esac 750393493779Smrg case `$CC -V 2>&1 | sed 5q` in 750493493779Smrg *Sun\ C*) # Sun C 5.9 750593493779Smrg _LT_AC_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; $echo \"$new_convenience\"` ${wl}--no-whole-archive' 750693493779Smrg tmp_sharedflag='-G' ;; 750793493779Smrg *Sun\ F*) # Sun Fortran 8.3 750893493779Smrg tmp_sharedflag='-G' ;; 750993493779Smrg *) 751093493779Smrg tmp_sharedflag='-shared' ;; 751193493779Smrg esac 751293493779Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 75136c321187Smrg 75146c321187Smrg if test $supports_anon_versioning = yes; then 75156c321187Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ 75166c321187Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 75176c321187Smrg $echo "local: *; };" >> $output_objdir/$libname.ver~ 751893493779Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 75196c321187Smrg fi 75206c321187Smrg else 75216c321187Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 75226c321187Smrg fi 75236c321187Smrg ;; 75246c321187Smrg 75256c321187Smrg netbsd*) 75266c321187Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 75276c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 75286c321187Smrg wlarc= 75296c321187Smrg else 75306c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 75316c321187Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 75326c321187Smrg fi 75336c321187Smrg ;; 75346c321187Smrg 75356c321187Smrg solaris*) 75366c321187Smrg if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then 75376c321187Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 75386c321187Smrg cat <<EOF 1>&2 75396c321187Smrg 75406c321187Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 75416c321187Smrg*** create shared libraries on Solaris systems. Therefore, libtool 75426c321187Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 75436c321187Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 75446c321187Smrg*** your PATH or compiler configuration so that the native linker is 75456c321187Smrg*** used, and then restart. 75466c321187Smrg 75476c321187SmrgEOF 75486c321187Smrg elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 75496c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 75506c321187Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 75516c321187Smrg else 75526c321187Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 75536c321187Smrg fi 75546c321187Smrg ;; 75556c321187Smrg 75566c321187Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 75576c321187Smrg case `$LD -v 2>&1` in 755893493779Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 75596c321187Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 75606c321187Smrg cat <<_LT_EOF 1>&2 75616c321187Smrg 75626c321187Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 75636c321187Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 75646c321187Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 75656c321187Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 75666c321187Smrg*** your PATH or compiler configuration so that the native linker is 75676c321187Smrg*** used, and then restart. 75686c321187Smrg 75696c321187Smrg_LT_EOF 75706c321187Smrg ;; 75716c321187Smrg *) 75726c321187Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 75736c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' 75746c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' 75756c321187Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' 75766c321187Smrg else 75776c321187Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 75786c321187Smrg fi 75796c321187Smrg ;; 75806c321187Smrg esac 75816c321187Smrg ;; 75826c321187Smrg 75836c321187Smrg sunos4*) 75846c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 75856c321187Smrg wlarc= 75866c321187Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 75876c321187Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 75886c321187Smrg ;; 75896c321187Smrg 75906c321187Smrg *) 75916c321187Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 75926c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 75936c321187Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 75946c321187Smrg else 75956c321187Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 75966c321187Smrg fi 75976c321187Smrg ;; 75986c321187Smrg esac 75996c321187Smrg 76006c321187Smrg if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then 76016c321187Smrg runpath_var= 76026c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 76036c321187Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 76046c321187Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 76056c321187Smrg fi 76066c321187Smrg else 76076c321187Smrg # PORTME fill in a description of your system's linker (not GNU ld) 76086c321187Smrg case $host_os in 76096c321187Smrg aix3*) 76106c321187Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 76116c321187Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 76126c321187Smrg _LT_AC_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' 76136c321187Smrg # Note: this linker hardcodes the directories in LIBPATH if there 76146c321187Smrg # are no directories specified by -L. 76156c321187Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 76166c321187Smrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 76176c321187Smrg # Neither direct hardcoding nor static linking is supported with a 76186c321187Smrg # broken collect2. 76196c321187Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 76206c321187Smrg fi 76216c321187Smrg ;; 76226c321187Smrg 762393493779Smrg aix[[4-9]]*) 76246c321187Smrg if test "$host_cpu" = ia64; then 76256c321187Smrg # On IA64, the linker does run time linking by default, so we don't 76266c321187Smrg # have to do anything special. 76276c321187Smrg aix_use_runtimelinking=no 76286c321187Smrg exp_sym_flag='-Bexport' 76296c321187Smrg no_entry_flag="" 76306c321187Smrg else 76316c321187Smrg # If we're using GNU nm, then we don't want the "-C" option. 76326c321187Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 76336c321187Smrg if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 76346c321187Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' 76356c321187Smrg else 76366c321187Smrg _LT_AC_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' 76376c321187Smrg fi 76386c321187Smrg aix_use_runtimelinking=no 76396c321187Smrg 76406c321187Smrg # Test if we are trying to use run time linking or normal 76416c321187Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 76426c321187Smrg # need to do runtime linking. 764393493779Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 76446c321187Smrg for ld_flag in $LDFLAGS; do 76456c321187Smrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 76466c321187Smrg aix_use_runtimelinking=yes 76476c321187Smrg break 76486c321187Smrg fi 76496c321187Smrg done 76506c321187Smrg ;; 76516c321187Smrg esac 76526c321187Smrg 76536c321187Smrg exp_sym_flag='-bexport' 76546c321187Smrg no_entry_flag='-bnoentry' 76556c321187Smrg fi 76566c321187Smrg 76576c321187Smrg # When large executables or shared objects are built, AIX ld can 76586c321187Smrg # have problems creating the table of contents. If linking a library 76596c321187Smrg # or program results in "error TOC overflow" add -mminimal-toc to 76606c321187Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 76616c321187Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 76626c321187Smrg 76636c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='' 76646c321187Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 76656c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 76666c321187Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 76676c321187Smrg 76686c321187Smrg if test "$GCC" = yes; then 76696c321187Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 76706c321187Smrg # We only want to do this on AIX 4.2 and lower, the check 76716c321187Smrg # below for broken collect2 doesn't work under 4.3+ 76726c321187Smrg collect2name=`${CC} -print-prog-name=collect2` 76736c321187Smrg if test -f "$collect2name" && \ 76746c321187Smrg strings "$collect2name" | grep resolve_lib_name >/dev/null 76756c321187Smrg then 76766c321187Smrg # We have reworked collect2 767793493779Smrg : 76786c321187Smrg else 76796c321187Smrg # We have old collect2 76806c321187Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 76816c321187Smrg # It fails to find uninstalled libraries when the uninstalled 76826c321187Smrg # path is not listed in the libpath. Setting hardcode_minus_L 76836c321187Smrg # to unsupported forces relinking 76846c321187Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 76856c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 76866c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 76876c321187Smrg fi 76886c321187Smrg ;; 76896c321187Smrg esac 76906c321187Smrg shared_flag='-shared' 76916c321187Smrg if test "$aix_use_runtimelinking" = yes; then 76926c321187Smrg shared_flag="$shared_flag "'${wl}-G' 76936c321187Smrg fi 76946c321187Smrg else 76956c321187Smrg # not using gcc 76966c321187Smrg if test "$host_cpu" = ia64; then 76976c321187Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 76986c321187Smrg # chokes on -Wl,-G. The following line is correct: 76996c321187Smrg shared_flag='-G' 77006c321187Smrg else 77016c321187Smrg if test "$aix_use_runtimelinking" = yes; then 77026c321187Smrg shared_flag='${wl}-G' 77036c321187Smrg else 77046c321187Smrg shared_flag='${wl}-bM:SRE' 77056c321187Smrg fi 77066c321187Smrg fi 77076c321187Smrg fi 77086c321187Smrg 77096c321187Smrg # It seems that -bexpall does not export symbols beginning with 77106c321187Smrg # underscore (_), so it is better to generate a list of symbols to export. 77116c321187Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 77126c321187Smrg if test "$aix_use_runtimelinking" = yes; then 77136c321187Smrg # Warning - without using the other runtime loading flags (-brtl), 77146c321187Smrg # -berok will link without error, but may produce a broken library. 77156c321187Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 77166c321187Smrg # Determine the default libpath from the value encoded in an empty executable. 77176c321187Smrg _LT_AC_SYS_LIBPATH_AIX 77186c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 77196c321187Smrg _LT_AC_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 echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 77206c321187Smrg else 77216c321187Smrg if test "$host_cpu" = ia64; then 77226c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 77236c321187Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 77246c321187Smrg _LT_AC_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" 77256c321187Smrg else 77266c321187Smrg # Determine the default libpath from the value encoded in an empty executable. 77276c321187Smrg _LT_AC_SYS_LIBPATH_AIX 77286c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 77296c321187Smrg # Warning - without using the other run time loading flags, 77306c321187Smrg # -berok will link without error, but may produce a broken library. 77316c321187Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 77326c321187Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 77336c321187Smrg # Exported symbols can be pulled into shared objects from archives 77346c321187Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 77356c321187Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 77366c321187Smrg # This is similar to how AIX traditionally builds its shared libraries. 77376c321187Smrg _LT_AC_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' 77386c321187Smrg fi 77396c321187Smrg fi 77406c321187Smrg ;; 77416c321187Smrg 77426c321187Smrg amigaos*) 77436c321187Smrg _LT_AC_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)' 77446c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 77456c321187Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 77466c321187Smrg # see comment about different semantics on the GNU ld section 77476c321187Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 77486c321187Smrg ;; 77496c321187Smrg 77506c321187Smrg bsdi[[45]]*) 77516c321187Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 77526c321187Smrg ;; 77536c321187Smrg 77546c321187Smrg cygwin* | mingw* | pw32*) 77556c321187Smrg # When not using gcc, we currently assume that we are using 77566c321187Smrg # Microsoft Visual C++. 77576c321187Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 77586c321187Smrg # no search path for DLLs. 77596c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 77606c321187Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 77616c321187Smrg # Tell ltmain to make .lib files, not .a files. 77626c321187Smrg libext=lib 77636c321187Smrg # Tell ltmain to make .dll files, not .so files. 77646c321187Smrg shrext_cmds=".dll" 77656c321187Smrg # FIXME: Setting linknames here is a bad hack. 77666c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' 77676c321187Smrg # The linker will automatically build a .lib file if we build a DLL. 77686c321187Smrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' 77696c321187Smrg # FIXME: Should let the user specify the lib program. 777093493779Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 77716c321187Smrg _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' 77726c321187Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 77736c321187Smrg ;; 77746c321187Smrg 77756c321187Smrg darwin* | rhapsody*) 77766c321187Smrg case $host_os in 77776c321187Smrg rhapsody* | darwin1.[[012]]) 77786c321187Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' 77796c321187Smrg ;; 77806c321187Smrg *) # Darwin 1.3 on 77816c321187Smrg if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then 77826c321187Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 77836c321187Smrg else 77846c321187Smrg case ${MACOSX_DEPLOYMENT_TARGET} in 77856c321187Smrg 10.[[012]]) 77866c321187Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 77876c321187Smrg ;; 77886c321187Smrg 10.*) 77896c321187Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' 77906c321187Smrg ;; 77916c321187Smrg esac 77926c321187Smrg fi 77936c321187Smrg ;; 77946c321187Smrg esac 77956c321187Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 77966c321187Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 77976c321187Smrg _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 77986c321187Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 77996c321187Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 78006c321187Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 78016c321187Smrg if test "$GCC" = yes ; then 78026c321187Smrg output_verbose_link_cmd='echo' 780393493779Smrg _LT_AC_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}" 780493493779Smrg _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 780593493779Smrg _LT_AC_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}" 780693493779Smrg _LT_AC_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}" 78076c321187Smrg else 78086c321187Smrg case $cc_basename in 78096c321187Smrg xlc*) 78106c321187Smrg output_verbose_link_cmd='echo' 781193493779Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' 78126c321187Smrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 78136c321187Smrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 781493493779Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 78156c321187Smrg _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' 78166c321187Smrg ;; 78176c321187Smrg *) 78186c321187Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 78196c321187Smrg ;; 78206c321187Smrg esac 78216c321187Smrg fi 78226c321187Smrg ;; 78236c321187Smrg 78246c321187Smrg dgux*) 78256c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 78266c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 78276c321187Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 78286c321187Smrg ;; 78296c321187Smrg 78306c321187Smrg freebsd1*) 78316c321187Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 78326c321187Smrg ;; 78336c321187Smrg 78346c321187Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 78356c321187Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 78366c321187Smrg # does not break anything, and helps significantly (at the cost of a little 78376c321187Smrg # extra space). 78386c321187Smrg freebsd2.2*) 78396c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 78406c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 78416c321187Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 78426c321187Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 78436c321187Smrg ;; 78446c321187Smrg 78456c321187Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 78466c321187Smrg freebsd2*) 78476c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 78486c321187Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 78496c321187Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 78506c321187Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 78516c321187Smrg ;; 78526c321187Smrg 78536c321187Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 785493493779Smrg freebsd* | dragonfly*) 78556c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' 78566c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 78576c321187Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 78586c321187Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 78596c321187Smrg ;; 78606c321187Smrg 78616c321187Smrg hpux9*) 78626c321187Smrg if test "$GCC" = yes; then 78636c321187Smrg _LT_AC_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' 78646c321187Smrg else 78656c321187Smrg _LT_AC_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' 78666c321187Smrg fi 78676c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 78686c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 78696c321187Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 78706c321187Smrg 78716c321187Smrg # hardcode_minus_L: Not really in the search PATH, 78726c321187Smrg # but as the default location of the library. 78736c321187Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 78746c321187Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 78756c321187Smrg ;; 78766c321187Smrg 78776c321187Smrg hpux10*) 78786c321187Smrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 78796c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 78806c321187Smrg else 78816c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 78826c321187Smrg fi 78836c321187Smrg if test "$with_gnu_ld" = no; then 78846c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 78856c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 78866c321187Smrg 78876c321187Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 78886c321187Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 78896c321187Smrg 78906c321187Smrg # hardcode_minus_L: Not really in the search PATH, 78916c321187Smrg # but as the default location of the library. 78926c321187Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 78936c321187Smrg fi 78946c321187Smrg ;; 78956c321187Smrg 78966c321187Smrg hpux11*) 78976c321187Smrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 78986c321187Smrg case $host_cpu in 78996c321187Smrg hppa*64*) 79006c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 79016c321187Smrg ;; 79026c321187Smrg ia64*) 79036c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 79046c321187Smrg ;; 79056c321187Smrg *) 79066c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 79076c321187Smrg ;; 79086c321187Smrg esac 79096c321187Smrg else 79106c321187Smrg case $host_cpu in 79116c321187Smrg hppa*64*) 79126c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 79136c321187Smrg ;; 79146c321187Smrg ia64*) 79156c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 79166c321187Smrg ;; 79176c321187Smrg *) 79186c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 79196c321187Smrg ;; 79206c321187Smrg esac 79216c321187Smrg fi 79226c321187Smrg if test "$with_gnu_ld" = no; then 79236c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 79246c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 79256c321187Smrg 79266c321187Smrg case $host_cpu in 79276c321187Smrg hppa*64*|ia64*) 79286c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 79296c321187Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 79306c321187Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 79316c321187Smrg ;; 79326c321187Smrg *) 79336c321187Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 79346c321187Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 79356c321187Smrg 79366c321187Smrg # hardcode_minus_L: Not really in the search PATH, 79376c321187Smrg # but as the default location of the library. 79386c321187Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 79396c321187Smrg ;; 79406c321187Smrg esac 79416c321187Smrg fi 79426c321187Smrg ;; 79436c321187Smrg 79446c321187Smrg irix5* | irix6* | nonstopux*) 79456c321187Smrg if test "$GCC" = yes; then 79466c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 79476c321187Smrg else 79486c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' 79496c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 79506c321187Smrg fi 79516c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 79526c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 79536c321187Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 79546c321187Smrg ;; 79556c321187Smrg 79566c321187Smrg netbsd*) 79576c321187Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 79586c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 79596c321187Smrg else 79606c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 79616c321187Smrg fi 79626c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 79636c321187Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 79646c321187Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 79656c321187Smrg ;; 79666c321187Smrg 79676c321187Smrg newsos6) 79686c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 79696c321187Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 79706c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 79716c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 79726c321187Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 79736c321187Smrg ;; 79746c321187Smrg 79756c321187Smrg openbsd*) 797693493779Smrg if test -f /usr/libexec/ld.so; then 797793493779Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 797893493779Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 797993493779Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 798093493779Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 798193493779Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 798293493779Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 798393493779Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 798493493779Smrg else 798593493779Smrg case $host_os in 798693493779Smrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 798793493779Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 798893493779Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 798993493779Smrg ;; 799093493779Smrg *) 799193493779Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 799293493779Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 799393493779Smrg ;; 799493493779Smrg esac 799593493779Smrg fi 79966c321187Smrg else 799793493779Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 79986c321187Smrg fi 79996c321187Smrg ;; 80006c321187Smrg 80016c321187Smrg os2*) 80026c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 80036c321187Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 80046c321187Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 80056c321187Smrg _LT_AC_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' 80066c321187Smrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 80076c321187Smrg ;; 80086c321187Smrg 80096c321187Smrg osf3*) 80106c321187Smrg if test "$GCC" = yes; then 80116c321187Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 80126c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 80136c321187Smrg else 80146c321187Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 80156c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' 80166c321187Smrg fi 80176c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 80186c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 80196c321187Smrg ;; 80206c321187Smrg 80216c321187Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 80226c321187Smrg if test "$GCC" = yes; then 80236c321187Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 80246c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 80256c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 80266c321187Smrg else 80276c321187Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 80286c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' 80296c321187Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ 80306c321187Smrg $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' 80316c321187Smrg 80326c321187Smrg # Both c and cxx compiler support -rpath directly 80336c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 80346c321187Smrg fi 80356c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 80366c321187Smrg ;; 80376c321187Smrg 80386c321187Smrg solaris*) 80396c321187Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' 80406c321187Smrg if test "$GCC" = yes; then 80416c321187Smrg wlarc='${wl}' 80426c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 80436c321187Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 80446c321187Smrg $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' 80456c321187Smrg else 80466c321187Smrg wlarc='' 80476c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 80486c321187Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 80496c321187Smrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' 80506c321187Smrg fi 80516c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 80526c321187Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 80536c321187Smrg case $host_os in 80546c321187Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 80556c321187Smrg *) 805693493779Smrg # The compiler driver will combine and reorder linker options, 805793493779Smrg # but understands `-z linker_flag'. GCC discards it without `$wl', 805893493779Smrg # but is careful enough not to reorder. 80596c321187Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 806093493779Smrg if test "$GCC" = yes; then 806193493779Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 806293493779Smrg else 806393493779Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 806493493779Smrg fi 806593493779Smrg ;; 80666c321187Smrg esac 80676c321187Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 80686c321187Smrg ;; 80696c321187Smrg 80706c321187Smrg sunos4*) 80716c321187Smrg if test "x$host_vendor" = xsequent; then 80726c321187Smrg # Use $CC to link under sequent, because it throws in some extra .o 80736c321187Smrg # files that make .init and .fini sections work. 80746c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 80756c321187Smrg else 80766c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 80776c321187Smrg fi 80786c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 80796c321187Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 80806c321187Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 80816c321187Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 80826c321187Smrg ;; 80836c321187Smrg 80846c321187Smrg sysv4) 80856c321187Smrg case $host_vendor in 80866c321187Smrg sni) 80876c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 80886c321187Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 80896c321187Smrg ;; 80906c321187Smrg siemens) 80916c321187Smrg ## LD is ld it makes a PLAMLIB 80926c321187Smrg ## CC just makes a GrossModule. 80936c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 80946c321187Smrg _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 80956c321187Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 80966c321187Smrg ;; 80976c321187Smrg motorola) 80986c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 80996c321187Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 81006c321187Smrg ;; 81016c321187Smrg esac 81026c321187Smrg runpath_var='LD_RUN_PATH' 81036c321187Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 81046c321187Smrg ;; 81056c321187Smrg 81066c321187Smrg sysv4.3*) 81076c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 81086c321187Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 81096c321187Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 81106c321187Smrg ;; 81116c321187Smrg 81126c321187Smrg sysv4*MP*) 81136c321187Smrg if test -d /usr/nec; then 81146c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 81156c321187Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 81166c321187Smrg runpath_var=LD_RUN_PATH 81176c321187Smrg hardcode_runpath_var=yes 81186c321187Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 81196c321187Smrg fi 81206c321187Smrg ;; 81216c321187Smrg 812293493779Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 81236c321187Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 81246c321187Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 81256c321187Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 81266c321187Smrg runpath_var='LD_RUN_PATH' 81276c321187Smrg 81286c321187Smrg if test "$GCC" = yes; then 81296c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 81306c321187Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 81316c321187Smrg else 81326c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 81336c321187Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 81346c321187Smrg fi 81356c321187Smrg ;; 81366c321187Smrg 81376c321187Smrg sysv5* | sco3.2v5* | sco5v6*) 81386c321187Smrg # Note: We can NOT use -z defs as we might desire, because we do not 81396c321187Smrg # link with -lc, and that would cause any symbols used from libc to 81406c321187Smrg # always be unresolved, which means just about no library would 81416c321187Smrg # ever link correctly. If we're not using GNU ld we use -z text 81426c321187Smrg # though, which does catch some bad symbols but isn't as heavy-handed 81436c321187Smrg # as -z defs. 81446c321187Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 81456c321187Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 81466c321187Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 81476c321187Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 81486c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 81496c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 81506c321187Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 81516c321187Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 81526c321187Smrg runpath_var='LD_RUN_PATH' 81536c321187Smrg 81546c321187Smrg if test "$GCC" = yes; then 81556c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 81566c321187Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 81576c321187Smrg else 81586c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 81596c321187Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 81606c321187Smrg fi 81616c321187Smrg ;; 81626c321187Smrg 81636c321187Smrg uts4*) 81646c321187Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 81656c321187Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 81666c321187Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 81676c321187Smrg ;; 81686c321187Smrg 81696c321187Smrg *) 81706c321187Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 81716c321187Smrg ;; 81726c321187Smrg esac 81736c321187Smrg fi 81746c321187Smrg]) 81756c321187SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 81766c321187Smrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 81776c321187Smrg 81786c321187Smrg# 81796c321187Smrg# Do we need to explicitly link libc? 81806c321187Smrg# 81816c321187Smrgcase "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in 81826c321187Smrgx|xyes) 81836c321187Smrg # Assume -lc should be added 81846c321187Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 81856c321187Smrg 81866c321187Smrg if test "$enable_shared" = yes && test "$GCC" = yes; then 81876c321187Smrg case $_LT_AC_TAGVAR(archive_cmds, $1) in 81886c321187Smrg *'~'*) 81896c321187Smrg # FIXME: we may have to deal with multi-command sequences. 81906c321187Smrg ;; 81916c321187Smrg '$CC '*) 81926c321187Smrg # Test whether the compiler implicitly links with -lc since on some 81936c321187Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 81946c321187Smrg # to ld, don't add -lc before -lgcc. 81956c321187Smrg AC_MSG_CHECKING([whether -lc should be explicitly linked in]) 81966c321187Smrg $rm conftest* 819793493779Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 81986c321187Smrg 81996c321187Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 82006c321187Smrg soname=conftest 82016c321187Smrg lib=conftest 82026c321187Smrg libobjs=conftest.$ac_objext 82036c321187Smrg deplibs= 82046c321187Smrg wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 82056c321187Smrg pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 82066c321187Smrg compiler_flags=-v 82076c321187Smrg linker_flags=-v 82086c321187Smrg verstring= 82096c321187Smrg output_objdir=. 82106c321187Smrg libname=conftest 82116c321187Smrg lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) 82126c321187Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)= 82136c321187Smrg if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 82146c321187Smrg then 82156c321187Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 82166c321187Smrg else 82176c321187Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 82186c321187Smrg fi 82196c321187Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 82206c321187Smrg else 82216c321187Smrg cat conftest.err 1>&5 82226c321187Smrg fi 82236c321187Smrg $rm conftest* 82246c321187Smrg AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) 82256c321187Smrg ;; 82266c321187Smrg esac 82276c321187Smrg fi 82286c321187Smrg ;; 82296c321187Smrgesac 82306c321187Smrg])# AC_LIBTOOL_PROG_LD_SHLIBS 82316c321187Smrg 82326c321187Smrg 82336c321187Smrg# _LT_AC_FILE_LTDLL_C 82346c321187Smrg# ------------------- 82356c321187Smrg# Be careful that the start marker always follows a newline. 82366c321187SmrgAC_DEFUN([_LT_AC_FILE_LTDLL_C], [ 82376c321187Smrg# /* ltdll.c starts here */ 82386c321187Smrg# #define WIN32_LEAN_AND_MEAN 82396c321187Smrg# #include <windows.h> 82406c321187Smrg# #undef WIN32_LEAN_AND_MEAN 82416c321187Smrg# #include <stdio.h> 82426c321187Smrg# 82436c321187Smrg# #ifndef __CYGWIN__ 82446c321187Smrg# # ifdef __CYGWIN32__ 82456c321187Smrg# # define __CYGWIN__ __CYGWIN32__ 82466c321187Smrg# # endif 82476c321187Smrg# #endif 82486c321187Smrg# 82496c321187Smrg# #ifdef __cplusplus 82506c321187Smrg# extern "C" { 82516c321187Smrg# #endif 82526c321187Smrg# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); 82536c321187Smrg# #ifdef __cplusplus 82546c321187Smrg# } 82556c321187Smrg# #endif 82566c321187Smrg# 82576c321187Smrg# #ifdef __CYGWIN__ 82586c321187Smrg# #include <cygwin/cygwin_dll.h> 82596c321187Smrg# DECLARE_CYGWIN_DLL( DllMain ); 82606c321187Smrg# #endif 82616c321187Smrg# HINSTANCE __hDllInstance_base; 82626c321187Smrg# 82636c321187Smrg# BOOL APIENTRY 82646c321187Smrg# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) 82656c321187Smrg# { 82666c321187Smrg# __hDllInstance_base = hInst; 82676c321187Smrg# return TRUE; 82686c321187Smrg# } 82696c321187Smrg# /* ltdll.c ends here */ 82706c321187Smrg])# _LT_AC_FILE_LTDLL_C 82716c321187Smrg 82726c321187Smrg 82736c321187Smrg# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) 82746c321187Smrg# --------------------------------- 82756c321187SmrgAC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) 82766c321187Smrg 82776c321187Smrg 82786c321187Smrg# old names 82796c321187SmrgAC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) 82806c321187SmrgAC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 82816c321187SmrgAC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 82826c321187SmrgAC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 82836c321187SmrgAC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 82846c321187SmrgAC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) 82856c321187SmrgAC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) 82866c321187Smrg 82876c321187Smrg# This is just to silence aclocal about the macro not being used 82886c321187Smrgifelse([AC_DISABLE_FAST_INSTALL]) 82896c321187Smrg 82906c321187SmrgAC_DEFUN([LT_AC_PROG_GCJ], 82916c321187Smrg[AC_CHECK_TOOL(GCJ, gcj, no) 82926c321187Smrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 82936c321187Smrg AC_SUBST(GCJFLAGS) 82946c321187Smrg]) 82956c321187Smrg 82966c321187SmrgAC_DEFUN([LT_AC_PROG_RC], 82976c321187Smrg[AC_CHECK_TOOL(RC, windres, no) 82986c321187Smrg]) 82996c321187Smrg 830093493779Smrg 830193493779Smrg# Cheap backport of AS_EXECUTABLE_P and required macros 830293493779Smrg# from Autoconf 2.59; we should not use $as_executable_p directly. 830393493779Smrg 830493493779Smrg# _AS_TEST_PREPARE 830593493779Smrg# ---------------- 830693493779Smrgm4_ifndef([_AS_TEST_PREPARE], 830793493779Smrg[m4_defun([_AS_TEST_PREPARE], 830893493779Smrg[if test -x / >/dev/null 2>&1; then 830993493779Smrg as_executable_p='test -x' 831093493779Smrgelse 831193493779Smrg as_executable_p='test -f' 831293493779Smrgfi 831393493779Smrg])])# _AS_TEST_PREPARE 831493493779Smrg 831593493779Smrg# AS_EXECUTABLE_P 831693493779Smrg# --------------- 831793493779Smrg# Check whether a file is executable. 831893493779Smrgm4_ifndef([AS_EXECUTABLE_P], 831993493779Smrg[m4_defun([AS_EXECUTABLE_P], 832093493779Smrg[AS_REQUIRE([_AS_TEST_PREPARE])dnl 832193493779Smrg$as_executable_p $1[]dnl 832293493779Smrg])])# AS_EXECUTABLE_P 832393493779Smrg 83246c321187Smrg# NOTE: This macro has been submitted for inclusion into # 83256c321187Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 83266c321187Smrg# a released version of Autoconf we should remove this # 83276c321187Smrg# macro and use it instead. # 83286c321187Smrg# LT_AC_PROG_SED 83296c321187Smrg# -------------- 83306c321187Smrg# Check for a fully-functional sed program, that truncates 83316c321187Smrg# as few characters as possible. Prefer GNU sed if found. 83326c321187SmrgAC_DEFUN([LT_AC_PROG_SED], 83336c321187Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 83346c321187SmrgAC_CACHE_VAL(lt_cv_path_SED, 83356c321187Smrg[# Loop through the user's path and test for sed and gsed. 83366c321187Smrg# Then use that list of sed's as ones to test for truncation. 83376c321187Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 83386c321187Smrgfor as_dir in $PATH 83396c321187Smrgdo 83406c321187Smrg IFS=$as_save_IFS 83416c321187Smrg test -z "$as_dir" && as_dir=. 83426c321187Smrg for lt_ac_prog in sed gsed; do 83436c321187Smrg for ac_exec_ext in '' $ac_executable_extensions; do 834493493779Smrg if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then 83456c321187Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 83466c321187Smrg fi 83476c321187Smrg done 83486c321187Smrg done 83496c321187Smrgdone 835093493779SmrgIFS=$as_save_IFS 83516c321187Smrglt_ac_max=0 83526c321187Smrglt_ac_count=0 83536c321187Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 83546c321187Smrg# along with /bin/sed that truncates output. 83556c321187Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 83566c321187Smrg test ! -f $lt_ac_sed && continue 83576c321187Smrg cat /dev/null > conftest.in 83586c321187Smrg lt_ac_count=0 83596c321187Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 83606c321187Smrg # Check for GNU sed and select it if it is found. 83616c321187Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 83626c321187Smrg lt_cv_path_SED=$lt_ac_sed 83636c321187Smrg break 83646c321187Smrg fi 83656c321187Smrg while true; do 83666c321187Smrg cat conftest.in conftest.in >conftest.tmp 83676c321187Smrg mv conftest.tmp conftest.in 83686c321187Smrg cp conftest.in conftest.nl 83696c321187Smrg echo >>conftest.nl 83706c321187Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 83716c321187Smrg cmp -s conftest.out conftest.nl || break 83726c321187Smrg # 10000 chars as input seems more than enough 83736c321187Smrg test $lt_ac_count -gt 10 && break 83746c321187Smrg lt_ac_count=`expr $lt_ac_count + 1` 83756c321187Smrg if test $lt_ac_count -gt $lt_ac_max; then 83766c321187Smrg lt_ac_max=$lt_ac_count 83776c321187Smrg lt_cv_path_SED=$lt_ac_sed 83786c321187Smrg fi 83796c321187Smrg done 83806c321187Smrgdone 83816c321187Smrg]) 83826c321187SmrgSED=$lt_cv_path_SED 838393493779SmrgAC_SUBST([SED]) 83846c321187SmrgAC_MSG_RESULT([$SED]) 83856c321187Smrg]) 83866c321187Smrg 83876c321187Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 83886c321187Smrg# 83896c321187Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 83906c321187Smrg# 83916c321187Smrg# This program is free software; you can redistribute it and/or modify 83926c321187Smrg# it under the terms of the GNU General Public License as published by 83936c321187Smrg# the Free Software Foundation; either version 2 of the License, or 83946c321187Smrg# (at your option) any later version. 83956c321187Smrg# 83966c321187Smrg# This program is distributed in the hope that it will be useful, but 83976c321187Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 83986c321187Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 83996c321187Smrg# General Public License for more details. 84006c321187Smrg# 84016c321187Smrg# You should have received a copy of the GNU General Public License 84026c321187Smrg# along with this program; if not, write to the Free Software 84036c321187Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 84046c321187Smrg# 84056c321187Smrg# As a special exception to the GNU General Public License, if you 84066c321187Smrg# distribute this file as part of a program that contains a 84076c321187Smrg# configuration script generated by Autoconf, you may include it under 84086c321187Smrg# the same distribution terms that you use for the rest of that program. 84096c321187Smrg 84106c321187Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 84116c321187Smrg# ---------------------------------- 84126c321187SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 84136c321187Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 84146c321187Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 84156c321187SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 84166c321187Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 84176c321187Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 84186c321187Smrgfi 84196c321187Smrgif test -n "$PKG_CONFIG"; then 842093493779Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 84216c321187Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 84226c321187Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 84236c321187Smrg AC_MSG_RESULT([yes]) 84246c321187Smrg else 84256c321187Smrg AC_MSG_RESULT([no]) 84266c321187Smrg PKG_CONFIG="" 84276c321187Smrg fi 84286c321187Smrg 84296c321187Smrgfi[]dnl 84306c321187Smrg])# PKG_PROG_PKG_CONFIG 84316c321187Smrg 84326c321187Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 84336c321187Smrg# 84346c321187Smrg# Check to see whether a particular set of modules exists. Similar 84356c321187Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 84366c321187Smrg# 84376c321187Smrg# 84386c321187Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 84396c321187Smrg# this or PKG_CHECK_MODULES is called, or make sure to call 84406c321187Smrg# PKG_CHECK_EXISTS manually 84416c321187Smrg# -------------------------------------------------------------- 84426c321187SmrgAC_DEFUN([PKG_CHECK_EXISTS], 84436c321187Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 84446c321187Smrgif test -n "$PKG_CONFIG" && \ 84456c321187Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 84466c321187Smrg m4_ifval([$2], [$2], [:]) 84476c321187Smrgm4_ifvaln([$3], [else 84486c321187Smrg $3])dnl 84496c321187Smrgfi]) 84506c321187Smrg 84516c321187Smrg 84526c321187Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 84536c321187Smrg# --------------------------------------------- 84546c321187Smrgm4_define([_PKG_CONFIG], 845593493779Smrg[if test -n "$$1"; then 845693493779Smrg pkg_cv_[]$1="$$1" 845793493779Smrg elif test -n "$PKG_CONFIG"; then 845893493779Smrg PKG_CHECK_EXISTS([$3], 845993493779Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 846093493779Smrg [pkg_failed=yes]) 846193493779Smrg else 846293493779Smrg pkg_failed=untried 84636c321187Smrgfi[]dnl 84646c321187Smrg])# _PKG_CONFIG 84656c321187Smrg 846693493779Smrg# _PKG_SHORT_ERRORS_SUPPORTED 846793493779Smrg# ----------------------------- 846893493779SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 846993493779Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 847093493779Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 847193493779Smrg _pkg_short_errors_supported=yes 847293493779Smrgelse 847393493779Smrg _pkg_short_errors_supported=no 847493493779Smrgfi[]dnl 847593493779Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 847693493779Smrg 847793493779Smrg 84786c321187Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 84796c321187Smrg# [ACTION-IF-NOT-FOUND]) 84806c321187Smrg# 84816c321187Smrg# 84826c321187Smrg# Note that if there is a possibility the first call to 84836c321187Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 84846c321187Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 84856c321187Smrg# 84866c321187Smrg# 84876c321187Smrg# -------------------------------------------------------------- 84886c321187SmrgAC_DEFUN([PKG_CHECK_MODULES], 84896c321187Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 84906c321187SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 84916c321187SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 84926c321187Smrg 84936c321187Smrgpkg_failed=no 84946c321187SmrgAC_MSG_CHECKING([for $1]) 84956c321187Smrg 84966c321187Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 84976c321187Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 84986c321187Smrg 849993493779Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 850093493779Smrgand $1[]_LIBS to avoid the need to call pkg-config. 850193493779SmrgSee the pkg-config man page for more details.]) 850293493779Smrg 85036c321187Smrgif test $pkg_failed = yes; then 850493493779Smrg _PKG_SHORT_ERRORS_SUPPORTED 850593493779Smrg if test $_pkg_short_errors_supported = yes; then 850693493779Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 850793493779Smrg else 850893493779Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 850993493779Smrg fi 85106c321187Smrg # Put the nasty error message in config.log where it belongs 851193493779Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 85126c321187Smrg 85136c321187Smrg ifelse([$4], , [AC_MSG_ERROR(dnl 851493493779Smrg[Package requirements ($2) were not met: 851593493779Smrg 851693493779Smrg$$1_PKG_ERRORS 851793493779Smrg 85186c321187SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 85196c321187Smrginstalled software in a non-standard prefix. 85206c321187Smrg 852193493779Smrg_PKG_TEXT 852293493779Smrg])], 852393493779Smrg [AC_MSG_RESULT([no]) 852493493779Smrg $4]) 85256c321187Smrgelif test $pkg_failed = untried; then 85266c321187Smrg ifelse([$4], , [AC_MSG_FAILURE(dnl 85276c321187Smrg[The pkg-config script could not be found or is too old. Make sure it 85286c321187Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 85296c321187Smrgpath to pkg-config. 85306c321187Smrg 853193493779Smrg_PKG_TEXT 85326c321187Smrg 853393493779SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 85346c321187Smrg [$4]) 85356c321187Smrgelse 85366c321187Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 85376c321187Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 85386c321187Smrg AC_MSG_RESULT([yes]) 85396c321187Smrg ifelse([$3], , :, [$3]) 85406c321187Smrgfi[]dnl 85416c321187Smrg])# PKG_CHECK_MODULES 85426c321187Smrg 8543