aclocal.m4 revision 42d69509
142d69509Smrg# generated automatically by aclocal 1.11 -*- Autoconf -*- 24456fccdSmrg 34456fccdSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 442d69509Smrg# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 54456fccdSmrg# This file is free software; the Free Software Foundation 64456fccdSmrg# gives unlimited permission to copy and/or distribute it, 74456fccdSmrg# with or without modifications, as long as this notice is preserved. 84456fccdSmrg 94456fccdSmrg# This program is distributed in the hope that it will be useful, 104456fccdSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 114456fccdSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 124456fccdSmrg# PARTICULAR PURPOSE. 134456fccdSmrg 1442d69509Smrgm4_ifndef([AC_AUTOCONF_VERSION], 1542d69509Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 1642d69509Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],, 1742d69509Smrg[m4_warning([this file was generated for autoconf 2.63. 1842d69509SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 1942d69509SmrgIf you have problems, you may need to regenerate the build system entirely. 2042d69509SmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])]) 214456fccdSmrg 2242d69509Smrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 2342d69509Smrg# 2442d69509Smrg# This file is free software; the Free Software Foundation 2542d69509Smrg# gives unlimited permission to copy and/or distribute it, 2642d69509Smrg# with or without modifications, as long as this notice is preserved. 274456fccdSmrg 2842d69509Smrg# AM_AUTOMAKE_VERSION(VERSION) 2942d69509Smrg# ---------------------------- 3042d69509Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 3142d69509Smrg# generated from the m4 files accompanying Automake X.Y. 3242d69509Smrg# (This private macro should not be called outside this file.) 3342d69509SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 3442d69509Smrg[am__api_version='1.11' 3542d69509Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 3642d69509Smrgdnl require some minimum version. Point them to the right macro. 3742d69509Smrgm4_if([$1], [1.11], [], 3842d69509Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 3942d69509Smrg]) 404456fccdSmrg 4142d69509Smrg# _AM_AUTOCONF_VERSION(VERSION) 4242d69509Smrg# ----------------------------- 4342d69509Smrg# aclocal traces this macro to find the Autoconf version. 4442d69509Smrg# This is a private macro too. Using m4_define simplifies 4542d69509Smrg# the logic in aclocal, which can simply ignore this definition. 4642d69509Smrgm4_define([_AM_AUTOCONF_VERSION], []) 474456fccdSmrg 4842d69509Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 4942d69509Smrg# ------------------------------- 5042d69509Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 5142d69509Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 5242d69509SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 5342d69509Smrg[AM_AUTOMAKE_VERSION([1.11])dnl 5442d69509Smrgm4_ifndef([AC_AUTOCONF_VERSION], 5542d69509Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 5642d69509Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 574456fccdSmrg 5842d69509Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 594456fccdSmrg 6042d69509Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 6142d69509Smrg# 6242d69509Smrg# This file is free software; the Free Software Foundation 6342d69509Smrg# gives unlimited permission to copy and/or distribute it, 6442d69509Smrg# with or without modifications, as long as this notice is preserved. 654456fccdSmrg 6642d69509Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 6742d69509Smrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 6842d69509Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 6942d69509Smrg# 7042d69509Smrg# Of course, Automake must honor this variable whenever it calls a 7142d69509Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 7242d69509Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 7342d69509Smrg# depending on how configure is run. This is pretty annoying, since 7442d69509Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 7542d69509Smrg# source directory, any form will work fine, but in subdirectories a 7642d69509Smrg# relative path needs to be adjusted first. 7742d69509Smrg# 7842d69509Smrg# $ac_aux_dir/missing 7942d69509Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 8042d69509Smrg# $top_srcdir/$ac_aux_dir/missing 8142d69509Smrg# fails if $ac_aux_dir is absolute, 8242d69509Smrg# fails when called from a subdirectory in a VPATH build with 8342d69509Smrg# a relative $ac_aux_dir 8442d69509Smrg# 8542d69509Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 8642d69509Smrg# are both prefixed by $srcdir. In an in-source build this is usually 8742d69509Smrg# harmless because $srcdir is `.', but things will broke when you 8842d69509Smrg# start a VPATH build or use an absolute $srcdir. 8942d69509Smrg# 9042d69509Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 9142d69509Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 9242d69509Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 9342d69509Smrg# and then we would define $MISSING as 9442d69509Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 9542d69509Smrg# This will work as long as MISSING is not called from configure, because 9642d69509Smrg# unfortunately $(top_srcdir) has no meaning in configure. 9742d69509Smrg# However there are other variables, like CC, which are often used in 9842d69509Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 9942d69509Smrg# 10042d69509Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 10142d69509Smrg# absolute PATH. The drawback is that using absolute paths prevent a 10242d69509Smrg# configured tree to be moved without reconfiguration. 1034456fccdSmrg 10442d69509SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 10542d69509Smrg[dnl Rely on autoconf to set up CDPATH properly. 10642d69509SmrgAC_PREREQ([2.50])dnl 10742d69509Smrg# expand $ac_aux_dir to an absolute path 10842d69509Smrgam_aux_dir=`cd $ac_aux_dir && pwd` 10942d69509Smrg]) 1104456fccdSmrg 11142d69509Smrg# AM_CONDITIONAL -*- Autoconf -*- 1124456fccdSmrg 11342d69509Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 11442d69509Smrg# Free Software Foundation, Inc. 11542d69509Smrg# 11642d69509Smrg# This file is free software; the Free Software Foundation 11742d69509Smrg# gives unlimited permission to copy and/or distribute it, 11842d69509Smrg# with or without modifications, as long as this notice is preserved. 1194456fccdSmrg 12042d69509Smrg# serial 9 1214456fccdSmrg 12242d69509Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 12342d69509Smrg# ------------------------------------- 12442d69509Smrg# Define a conditional. 12542d69509SmrgAC_DEFUN([AM_CONDITIONAL], 12642d69509Smrg[AC_PREREQ(2.52)dnl 12742d69509Smrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 12842d69509Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 12942d69509SmrgAC_SUBST([$1_TRUE])dnl 13042d69509SmrgAC_SUBST([$1_FALSE])dnl 13142d69509Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 13242d69509Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 13342d69509Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 13442d69509Smrgif $2; then 13542d69509Smrg $1_TRUE= 13642d69509Smrg $1_FALSE='#' 13742d69509Smrgelse 13842d69509Smrg $1_TRUE='#' 13942d69509Smrg $1_FALSE= 14042d69509Smrgfi 14142d69509SmrgAC_CONFIG_COMMANDS_PRE( 14242d69509Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 14342d69509Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 14442d69509SmrgUsually this means the macro was only invoked conditionally.]]) 14542d69509Smrgfi])]) 1464456fccdSmrg 14742d69509Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 14842d69509Smrg# Free Software Foundation, Inc. 14942d69509Smrg# 15042d69509Smrg# This file is free software; the Free Software Foundation 15142d69509Smrg# gives unlimited permission to copy and/or distribute it, 15242d69509Smrg# with or without modifications, as long as this notice is preserved. 1534456fccdSmrg 15442d69509Smrg# serial 10 1554456fccdSmrg 15642d69509Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 15742d69509Smrg# written in clear, in which case automake, when reading aclocal.m4, 15842d69509Smrg# will think it sees a *use*, and therefore will trigger all it's 15942d69509Smrg# C support machinery. Also note that it means that autoscan, seeing 16042d69509Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 1614456fccdSmrg 1624456fccdSmrg 16342d69509Smrg# _AM_DEPENDENCIES(NAME) 16442d69509Smrg# ---------------------- 16542d69509Smrg# See how the compiler implements dependency checking. 16642d69509Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 16742d69509Smrg# We try a few techniques and use that to set a single cache variable. 16842d69509Smrg# 16942d69509Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 17042d69509Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 17142d69509Smrg# dependency, and given that the user is not expected to run this macro, 17242d69509Smrg# just rely on AC_PROG_CC. 17342d69509SmrgAC_DEFUN([_AM_DEPENDENCIES], 17442d69509Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 17542d69509SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 17642d69509SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 17742d69509SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 1784456fccdSmrg 17942d69509Smrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 18042d69509Smrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 18142d69509Smrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 18242d69509Smrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 18342d69509Smrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 18442d69509Smrg [depcc="$$1" am_compiler_list=]) 1854456fccdSmrg 18642d69509SmrgAC_CACHE_CHECK([dependency style of $depcc], 18742d69509Smrg [am_cv_$1_dependencies_compiler_type], 18842d69509Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 18942d69509Smrg # We make a subdir and do the tests there. Otherwise we can end up 19042d69509Smrg # making bogus files that we don't know about and never remove. For 19142d69509Smrg # instance it was reported that on HP-UX the gcc test will end up 19242d69509Smrg # making a dummy file named `D' -- because `-MD' means `put the output 19342d69509Smrg # in D'. 19442d69509Smrg mkdir conftest.dir 19542d69509Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 19642d69509Smrg # using a relative directory. 19742d69509Smrg cp "$am_depcomp" conftest.dir 19842d69509Smrg cd conftest.dir 19942d69509Smrg # We will build objects and dependencies in a subdirectory because 20042d69509Smrg # it helps to detect inapplicable dependency modes. For instance 20142d69509Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 20242d69509Smrg # side effect of compilation, but ICC will put the dependencies in 20342d69509Smrg # the current directory while Tru64 will put them in the object 20442d69509Smrg # directory. 20542d69509Smrg mkdir sub 2064456fccdSmrg 20742d69509Smrg am_cv_$1_dependencies_compiler_type=none 20842d69509Smrg if test "$am_compiler_list" = ""; then 20942d69509Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 21042d69509Smrg fi 21142d69509Smrg am__universal=false 21242d69509Smrg m4_case([$1], [CC], 21342d69509Smrg [case " $depcc " in #( 21442d69509Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 21542d69509Smrg esac], 21642d69509Smrg [CXX], 21742d69509Smrg [case " $depcc " in #( 21842d69509Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 21942d69509Smrg esac]) 2204456fccdSmrg 22142d69509Smrg for depmode in $am_compiler_list; do 22242d69509Smrg # Setup a source with many dependencies, because some compilers 22342d69509Smrg # like to wrap large dependency lists on column 80 (with \), and 22442d69509Smrg # we should not choose a depcomp mode which is confused by this. 22542d69509Smrg # 22642d69509Smrg # We need to recreate these files for each test, as the compiler may 22742d69509Smrg # overwrite some of them when testing with obscure command lines. 22842d69509Smrg # This happens at least with the AIX C compiler. 22942d69509Smrg : > sub/conftest.c 23042d69509Smrg for i in 1 2 3 4 5 6; do 23142d69509Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 23242d69509Smrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 23342d69509Smrg # Solaris 8's {/usr,}/bin/sh. 23442d69509Smrg touch sub/conftst$i.h 23542d69509Smrg done 23642d69509Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 2374456fccdSmrg 23842d69509Smrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 23942d69509Smrg # mode. It turns out that the SunPro C++ compiler does not properly 24042d69509Smrg # handle `-M -o', and we need to detect this. Also, some Intel 24142d69509Smrg # versions had trouble with output in subdirs 24242d69509Smrg am__obj=sub/conftest.${OBJEXT-o} 24342d69509Smrg am__minus_obj="-o $am__obj" 24442d69509Smrg case $depmode in 24542d69509Smrg gcc) 24642d69509Smrg # This depmode causes a compiler race in universal mode. 24742d69509Smrg test "$am__universal" = false || continue 24842d69509Smrg ;; 24942d69509Smrg nosideeffect) 25042d69509Smrg # after this tag, mechanisms are not by side-effect, so they'll 25142d69509Smrg # only be used when explicitly requested 25242d69509Smrg if test "x$enable_dependency_tracking" = xyes; then 25342d69509Smrg continue 25442d69509Smrg else 25542d69509Smrg break 25642d69509Smrg fi 25742d69509Smrg ;; 25842d69509Smrg msvisualcpp | msvcmsys) 25942d69509Smrg # This compiler won't grok `-c -o', but also, the minuso test has 26042d69509Smrg # not run yet. These depmodes are late enough in the game, and 26142d69509Smrg # so weak that their functioning should not be impacted. 26242d69509Smrg am__obj=conftest.${OBJEXT-o} 26342d69509Smrg am__minus_obj= 26442d69509Smrg ;; 26542d69509Smrg none) break ;; 26642d69509Smrg esac 26742d69509Smrg if depmode=$depmode \ 26842d69509Smrg source=sub/conftest.c object=$am__obj \ 26942d69509Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 27042d69509Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 27142d69509Smrg >/dev/null 2>conftest.err && 27242d69509Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 27342d69509Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 27442d69509Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 27542d69509Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 27642d69509Smrg # icc doesn't choke on unknown options, it will just issue warnings 27742d69509Smrg # or remarks (even with -Werror). So we grep stderr for any message 27842d69509Smrg # that says an option was ignored or not supported. 27942d69509Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 28042d69509Smrg # icc: Command line warning: ignoring option '-M'; no argument required 28142d69509Smrg # The diagnosis changed in icc 8.0: 28242d69509Smrg # icc: Command line remark: option '-MP' not supported 28342d69509Smrg if (grep 'ignoring option' conftest.err || 28442d69509Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 28542d69509Smrg am_cv_$1_dependencies_compiler_type=$depmode 28642d69509Smrg break 28742d69509Smrg fi 28842d69509Smrg fi 28942d69509Smrg done 2904456fccdSmrg 29142d69509Smrg cd .. 29242d69509Smrg rm -rf conftest.dir 29342d69509Smrgelse 29442d69509Smrg am_cv_$1_dependencies_compiler_type=none 2954456fccdSmrgfi 29642d69509Smrg]) 29742d69509SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 29842d69509SmrgAM_CONDITIONAL([am__fastdep$1], [ 29942d69509Smrg test "x$enable_dependency_tracking" != xno \ 30042d69509Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 30142d69509Smrg]) 3024456fccdSmrg 3034456fccdSmrg 30442d69509Smrg# AM_SET_DEPDIR 30542d69509Smrg# ------------- 30642d69509Smrg# Choose a directory name for dependency files. 30742d69509Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 30842d69509SmrgAC_DEFUN([AM_SET_DEPDIR], 30942d69509Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 31042d69509SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 31142d69509Smrg]) 3124456fccdSmrg 3134456fccdSmrg 31442d69509Smrg# AM_DEP_TRACK 31542d69509Smrg# ------------ 31642d69509SmrgAC_DEFUN([AM_DEP_TRACK], 31742d69509Smrg[AC_ARG_ENABLE(dependency-tracking, 31842d69509Smrg[ --disable-dependency-tracking speeds up one-time build 31942d69509Smrg --enable-dependency-tracking do not reject slow dependency extractors]) 32042d69509Smrgif test "x$enable_dependency_tracking" != xno; then 32142d69509Smrg am_depcomp="$ac_aux_dir/depcomp" 32242d69509Smrg AMDEPBACKSLASH='\' 32342d69509Smrgfi 32442d69509SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 32542d69509SmrgAC_SUBST([AMDEPBACKSLASH])dnl 32642d69509Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 32742d69509Smrg]) 3284456fccdSmrg 32942d69509Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 3304456fccdSmrg 33142d69509Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 33242d69509Smrg# Free Software Foundation, Inc. 33342d69509Smrg# 33442d69509Smrg# This file is free software; the Free Software Foundation 33542d69509Smrg# gives unlimited permission to copy and/or distribute it, 33642d69509Smrg# with or without modifications, as long as this notice is preserved. 3374456fccdSmrg 33842d69509Smrg#serial 5 3394456fccdSmrg 34042d69509Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 34142d69509Smrg# ------------------------------ 34242d69509SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 34342d69509Smrg[{ 34442d69509Smrg # Autoconf 2.62 quotes --file arguments for eval, but not when files 34542d69509Smrg # are listed without --file. Let's play safe and only enable the eval 34642d69509Smrg # if we detect the quoting. 34742d69509Smrg case $CONFIG_FILES in 34842d69509Smrg *\'*) eval set x "$CONFIG_FILES" ;; 34942d69509Smrg *) set x $CONFIG_FILES ;; 35042d69509Smrg esac 35142d69509Smrg shift 35242d69509Smrg for mf 35342d69509Smrg do 35442d69509Smrg # Strip MF so we end up with the name of the file. 35542d69509Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 35642d69509Smrg # Check whether this is an Automake generated Makefile or not. 35742d69509Smrg # We used to match only the files named `Makefile.in', but 35842d69509Smrg # some people rename them; so instead we look at the file content. 35942d69509Smrg # Grep'ing the first line is not enough: some people post-process 36042d69509Smrg # each Makefile.in and add a new line on top of each file to say so. 36142d69509Smrg # Grep'ing the whole file is not good either: AIX grep has a line 36242d69509Smrg # limit of 2048, but all sed's we know have understand at least 4000. 36342d69509Smrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 36442d69509Smrg dirpart=`AS_DIRNAME("$mf")` 36542d69509Smrg else 36642d69509Smrg continue 36742d69509Smrg fi 36842d69509Smrg # Extract the definition of DEPDIR, am__include, and am__quote 36942d69509Smrg # from the Makefile without running `make'. 37042d69509Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 37142d69509Smrg test -z "$DEPDIR" && continue 37242d69509Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 37342d69509Smrg test -z "am__include" && continue 37442d69509Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 37542d69509Smrg # When using ansi2knr, U may be empty or an underscore; expand it 37642d69509Smrg U=`sed -n 's/^U = //p' < "$mf"` 37742d69509Smrg # Find all dependency output files, they are included files with 37842d69509Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 37942d69509Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 38042d69509Smrg # expansion. 38142d69509Smrg for file in `sed -n " 38242d69509Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 38342d69509Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 38442d69509Smrg # Make sure the directory exists. 38542d69509Smrg test -f "$dirpart/$file" && continue 38642d69509Smrg fdir=`AS_DIRNAME(["$file"])` 38742d69509Smrg AS_MKDIR_P([$dirpart/$fdir]) 38842d69509Smrg # echo "creating $dirpart/$file" 38942d69509Smrg echo '# dummy' > "$dirpart/$file" 39042d69509Smrg done 39142d69509Smrg done 39242d69509Smrg} 39342d69509Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 3944456fccdSmrg 3954456fccdSmrg 39642d69509Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 39742d69509Smrg# ----------------------------- 39842d69509Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 39942d69509Smrg# 40042d69509Smrg# This code is only required when automatic dependency tracking 40142d69509Smrg# is enabled. FIXME. This creates each `.P' file that we will 40242d69509Smrg# need in order to bootstrap the dependency handling code. 40342d69509SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 40442d69509Smrg[AC_CONFIG_COMMANDS([depfiles], 40542d69509Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 40642d69509Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 4074456fccdSmrg]) 4084456fccdSmrg 40942d69509Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 41042d69509Smrg# Free Software Foundation, Inc. 41142d69509Smrg# 41242d69509Smrg# This file is free software; the Free Software Foundation 41342d69509Smrg# gives unlimited permission to copy and/or distribute it, 41442d69509Smrg# with or without modifications, as long as this notice is preserved. 4154456fccdSmrg 41642d69509Smrg# serial 8 4174456fccdSmrg 41842d69509Smrg# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 41942d69509SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 4204456fccdSmrg 42142d69509Smrg# Do all the work for Automake. -*- Autoconf -*- 4224456fccdSmrg 42342d69509Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 42442d69509Smrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 42542d69509Smrg# 42642d69509Smrg# This file is free software; the Free Software Foundation 42742d69509Smrg# gives unlimited permission to copy and/or distribute it, 42842d69509Smrg# with or without modifications, as long as this notice is preserved. 4294456fccdSmrg 43042d69509Smrg# serial 16 4314456fccdSmrg 43242d69509Smrg# This macro actually does too much. Some checks are only needed if 43342d69509Smrg# your package does certain things. But this isn't really a big deal. 4344456fccdSmrg 43542d69509Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 43642d69509Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 43742d69509Smrg# ----------------------------------------------- 43842d69509Smrg# The call with PACKAGE and VERSION arguments is the old style 43942d69509Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 44042d69509Smrg# and VERSION should now be passed to AC_INIT and removed from 44142d69509Smrg# the call to AM_INIT_AUTOMAKE. 44242d69509Smrg# We support both call styles for the transition. After 44342d69509Smrg# the next Automake release, Autoconf can make the AC_INIT 44442d69509Smrg# arguments mandatory, and then we can depend on a new Autoconf 44542d69509Smrg# release and drop the old call support. 44642d69509SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 44742d69509Smrg[AC_PREREQ([2.62])dnl 44842d69509Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 44942d69509Smrgdnl the ones we care about. 45042d69509Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 45142d69509SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 45242d69509SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 45342d69509Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 45442d69509Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 45542d69509Smrg # is not polluted with repeated "-I." 45642d69509Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 45742d69509Smrg # test to see if srcdir already configured 45842d69509Smrg if test -f $srcdir/config.status; then 45942d69509Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 46042d69509Smrg fi 46142d69509Smrgfi 4624456fccdSmrg 46342d69509Smrg# test whether we have cygpath 46442d69509Smrgif test -z "$CYGPATH_W"; then 46542d69509Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 46642d69509Smrg CYGPATH_W='cygpath -w' 46742d69509Smrg else 46842d69509Smrg CYGPATH_W=echo 46942d69509Smrg fi 47042d69509Smrgfi 47142d69509SmrgAC_SUBST([CYGPATH_W]) 4724456fccdSmrg 47342d69509Smrg# Define the identity of the package. 47442d69509Smrgdnl Distinguish between old-style and new-style calls. 47542d69509Smrgm4_ifval([$2], 47642d69509Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 47742d69509Smrg AC_SUBST([PACKAGE], [$1])dnl 47842d69509Smrg AC_SUBST([VERSION], [$2])], 47942d69509Smrg[_AM_SET_OPTIONS([$1])dnl 48042d69509Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 48142d69509Smrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 48242d69509Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 48342d69509Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 48442d69509Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 4854456fccdSmrg 48642d69509Smrg_AM_IF_OPTION([no-define],, 48742d69509Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 48842d69509Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 4894456fccdSmrg 49042d69509Smrg# Some tools Automake needs. 49142d69509SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 49242d69509SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 49342d69509SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 49442d69509SmrgAM_MISSING_PROG(AUTOCONF, autoconf) 49542d69509SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 49642d69509SmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 49742d69509SmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 49842d69509SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 49942d69509SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 50042d69509SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 50142d69509Smrg# We need awk for the "check" target. The system "awk" is bad on 50242d69509Smrg# some platforms. 50342d69509SmrgAC_REQUIRE([AC_PROG_AWK])dnl 50442d69509SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 50542d69509SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 50642d69509Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 50742d69509Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 50842d69509Smrg [_AM_PROG_TAR([v7])])]) 50942d69509Smrg_AM_IF_OPTION([no-dependencies],, 51042d69509Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 51142d69509Smrg [_AM_DEPENDENCIES(CC)], 51242d69509Smrg [define([AC_PROG_CC], 51342d69509Smrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 51442d69509SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 51542d69509Smrg [_AM_DEPENDENCIES(CXX)], 51642d69509Smrg [define([AC_PROG_CXX], 51742d69509Smrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 51842d69509SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 51942d69509Smrg [_AM_DEPENDENCIES(OBJC)], 52042d69509Smrg [define([AC_PROG_OBJC], 52142d69509Smrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 52242d69509Smrg]) 52342d69509Smrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 52442d69509Smrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the 52542d69509Smrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 52642d69509Smrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 52742d69509SmrgAC_CONFIG_COMMANDS_PRE(dnl 52842d69509Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 52942d69509Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 53042d69509Smrg]) 5314456fccdSmrg 53242d69509Smrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 53342d69509Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 53442d69509Smrgdnl mangled by Autoconf and run in a shell conditional statement. 53542d69509Smrgm4_define([_AC_COMPILER_EXEEXT], 53642d69509Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 5374456fccdSmrg 5384456fccdSmrg 53942d69509Smrg# When config.status generates a header, we must update the stamp-h file. 54042d69509Smrg# This file resides in the same directory as the config header 54142d69509Smrg# that is generated. The stamp files are numbered to have different names. 5424456fccdSmrg 54342d69509Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 54442d69509Smrg# loop where config.status creates the headers, so we can generate 54542d69509Smrg# our stamp files there. 54642d69509SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 54742d69509Smrg[# Compute $1's index in $config_headers. 54842d69509Smrg_am_arg=$1 54942d69509Smrg_am_stamp_count=1 55042d69509Smrgfor _am_header in $config_headers :; do 55142d69509Smrg case $_am_header in 55242d69509Smrg $_am_arg | $_am_arg:* ) 55342d69509Smrg break ;; 55442d69509Smrg * ) 55542d69509Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 55642d69509Smrg esac 55742d69509Smrgdone 55842d69509Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 5594456fccdSmrg 56042d69509Smrg# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. 56142d69509Smrg# 56242d69509Smrg# This file is free software; the Free Software Foundation 56342d69509Smrg# gives unlimited permission to copy and/or distribute it, 56442d69509Smrg# with or without modifications, as long as this notice is preserved. 5654456fccdSmrg 56642d69509Smrg# AM_PROG_INSTALL_SH 56742d69509Smrg# ------------------ 56842d69509Smrg# Define $install_sh. 56942d69509SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 57042d69509Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 57142d69509Smrgif test x"${install_sh}" != xset; then 57242d69509Smrg case $am_aux_dir in 57342d69509Smrg *\ * | *\ *) 57442d69509Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 57542d69509Smrg *) 57642d69509Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 57742d69509Smrg esac 57842d69509Smrgfi 57942d69509SmrgAC_SUBST(install_sh)]) 5804456fccdSmrg 58142d69509Smrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 58242d69509Smrg# 58342d69509Smrg# This file is free software; the Free Software Foundation 58442d69509Smrg# gives unlimited permission to copy and/or distribute it, 58542d69509Smrg# with or without modifications, as long as this notice is preserved. 5864456fccdSmrg 58742d69509Smrg# serial 2 5884456fccdSmrg 58942d69509Smrg# Check whether the underlying file-system supports filenames 59042d69509Smrg# with a leading dot. For instance MS-DOS doesn't. 59142d69509SmrgAC_DEFUN([AM_SET_LEADING_DOT], 59242d69509Smrg[rm -rf .tst 2>/dev/null 59342d69509Smrgmkdir .tst 2>/dev/null 59442d69509Smrgif test -d .tst; then 59542d69509Smrg am__leading_dot=. 59642d69509Smrgelse 59742d69509Smrg am__leading_dot=_ 5984456fccdSmrgfi 59942d69509Smrgrmdir .tst 2>/dev/null 60042d69509SmrgAC_SUBST([am__leading_dot])]) 6014456fccdSmrg 60242d69509Smrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 60342d69509Smrg# From Jim Meyering 6044456fccdSmrg 60542d69509Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 60642d69509Smrg# Free Software Foundation, Inc. 60742d69509Smrg# 60842d69509Smrg# This file is free software; the Free Software Foundation 60942d69509Smrg# gives unlimited permission to copy and/or distribute it, 61042d69509Smrg# with or without modifications, as long as this notice is preserved. 6114456fccdSmrg 61242d69509Smrg# serial 5 6134456fccdSmrg 61442d69509Smrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 61542d69509Smrg# ---------------------------------- 61642d69509Smrg# Control maintainer-specific portions of Makefiles. 61742d69509Smrg# Default is to disable them, unless `enable' is passed literally. 61842d69509Smrg# For symmetry, `disable' may be passed as well. Anyway, the user 61942d69509Smrg# can override the default with the --enable/--disable switch. 62042d69509SmrgAC_DEFUN([AM_MAINTAINER_MODE], 62142d69509Smrg[m4_case(m4_default([$1], [disable]), 62242d69509Smrg [enable], [m4_define([am_maintainer_other], [disable])], 62342d69509Smrg [disable], [m4_define([am_maintainer_other], [enable])], 62442d69509Smrg [m4_define([am_maintainer_other], [enable]) 62542d69509Smrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 62642d69509SmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) 62742d69509Smrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 62842d69509Smrg AC_ARG_ENABLE([maintainer-mode], 62942d69509Smrg[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful 63042d69509Smrg (and sometimes confusing) to the casual installer], 63142d69509Smrg [USE_MAINTAINER_MODE=$enableval], 63242d69509Smrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 63342d69509Smrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 63442d69509Smrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 63542d69509Smrg MAINT=$MAINTAINER_MODE_TRUE 63642d69509Smrg AC_SUBST([MAINT])dnl 63742d69509Smrg] 63842d69509Smrg) 6394456fccdSmrg 64042d69509SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 6414456fccdSmrg 64242d69509Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 64342d69509Smrg 64442d69509Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 64542d69509Smrg# 64642d69509Smrg# This file is free software; the Free Software Foundation 64742d69509Smrg# gives unlimited permission to copy and/or distribute it, 64842d69509Smrg# with or without modifications, as long as this notice is preserved. 64942d69509Smrg 65042d69509Smrg# serial 4 65142d69509Smrg 65242d69509Smrg# AM_MAKE_INCLUDE() 65342d69509Smrg# ----------------- 65442d69509Smrg# Check to see how make treats includes. 65542d69509SmrgAC_DEFUN([AM_MAKE_INCLUDE], 65642d69509Smrg[am_make=${MAKE-make} 65742d69509Smrgcat > confinc << 'END' 65842d69509Smrgam__doit: 65942d69509Smrg @echo this is the am__doit target 66042d69509Smrg.PHONY: am__doit 66142d69509SmrgEND 66242d69509Smrg# If we don't find an include directive, just comment out the code. 66342d69509SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 66442d69509Smrgam__include="#" 66542d69509Smrgam__quote= 66642d69509Smrg_am_result=none 66742d69509Smrg# First try GNU make style include. 66842d69509Smrgecho "include confinc" > confmf 66942d69509Smrg# Ignore all kinds of additional output from `make'. 67042d69509Smrgcase `$am_make -s -f confmf 2> /dev/null` in #( 67142d69509Smrg*the\ am__doit\ target*) 67242d69509Smrg am__include=include 67342d69509Smrg am__quote= 67442d69509Smrg _am_result=GNU 6754456fccdSmrg ;; 6764456fccdSmrgesac 67742d69509Smrg# Now try BSD make style include. 67842d69509Smrgif test "$am__include" = "#"; then 67942d69509Smrg echo '.include "confinc"' > confmf 68042d69509Smrg case `$am_make -s -f confmf 2> /dev/null` in #( 68142d69509Smrg *the\ am__doit\ target*) 68242d69509Smrg am__include=.include 68342d69509Smrg am__quote="\"" 68442d69509Smrg _am_result=BSD 68542d69509Smrg ;; 68642d69509Smrg esac 68742d69509Smrgfi 68842d69509SmrgAC_SUBST([am__include]) 68942d69509SmrgAC_SUBST([am__quote]) 69042d69509SmrgAC_MSG_RESULT([$_am_result]) 69142d69509Smrgrm -f confinc confmf 69242d69509Smrg]) 6934456fccdSmrg 69442d69509Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 6954456fccdSmrg 69642d69509Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 69742d69509Smrg# Free Software Foundation, Inc. 69842d69509Smrg# 69942d69509Smrg# This file is free software; the Free Software Foundation 70042d69509Smrg# gives unlimited permission to copy and/or distribute it, 70142d69509Smrg# with or without modifications, as long as this notice is preserved. 7024456fccdSmrg 70342d69509Smrg# serial 6 7044456fccdSmrg 70542d69509Smrg# AM_MISSING_PROG(NAME, PROGRAM) 70642d69509Smrg# ------------------------------ 70742d69509SmrgAC_DEFUN([AM_MISSING_PROG], 70842d69509Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 70942d69509Smrg$1=${$1-"${am_missing_run}$2"} 71042d69509SmrgAC_SUBST($1)]) 7114456fccdSmrg 71242d69509Smrg 71342d69509Smrg# AM_MISSING_HAS_RUN 71442d69509Smrg# ------------------ 71542d69509Smrg# Define MISSING if not defined so far and test if it supports --run. 71642d69509Smrg# If it does, set am_missing_run to use it, otherwise, to nothing. 71742d69509SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 71842d69509Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 71942d69509SmrgAC_REQUIRE_AUX_FILE([missing])dnl 72042d69509Smrgif test x"${MISSING+set}" != xset; then 72142d69509Smrg case $am_aux_dir in 72242d69509Smrg *\ * | *\ *) 72342d69509Smrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 72442d69509Smrg *) 72542d69509Smrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 72642d69509Smrg esac 72742d69509Smrgfi 72842d69509Smrg# Use eval to expand $SHELL 72942d69509Smrgif eval "$MISSING --run true"; then 73042d69509Smrg am_missing_run="$MISSING --run " 7314456fccdSmrgelse 73242d69509Smrg am_missing_run= 73342d69509Smrg AC_MSG_WARN([`missing' script is too old or missing]) 7344456fccdSmrgfi 73542d69509Smrg]) 7364456fccdSmrg 73742d69509Smrg# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 73842d69509Smrg# 73942d69509Smrg# This file is free software; the Free Software Foundation 74042d69509Smrg# gives unlimited permission to copy and/or distribute it, 74142d69509Smrg# with or without modifications, as long as this notice is preserved. 7424456fccdSmrg 74342d69509Smrg# AM_PROG_MKDIR_P 74442d69509Smrg# --------------- 74542d69509Smrg# Check for `mkdir -p'. 74642d69509SmrgAC_DEFUN([AM_PROG_MKDIR_P], 74742d69509Smrg[AC_PREREQ([2.60])dnl 74842d69509SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 74942d69509Smrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 75042d69509Smrgdnl while keeping a definition of mkdir_p for backward compatibility. 75142d69509Smrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 75242d69509Smrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 75342d69509Smrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 75442d69509Smrgdnl adjustment using top_builddir (which is defined more often than 75542d69509Smrgdnl MKDIR_P). 75642d69509SmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 75742d69509Smrgcase $mkdir_p in 75842d69509Smrg [[\\/$]]* | ?:[[\\/]]*) ;; 75942d69509Smrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 76042d69509Smrgesac 7614456fccdSmrg]) 7624456fccdSmrg 76342d69509Smrg# Helper functions for option handling. -*- Autoconf -*- 7644456fccdSmrg 76542d69509Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. 76642d69509Smrg# 76742d69509Smrg# This file is free software; the Free Software Foundation 76842d69509Smrg# gives unlimited permission to copy and/or distribute it, 76942d69509Smrg# with or without modifications, as long as this notice is preserved. 7704456fccdSmrg 77142d69509Smrg# serial 4 7724456fccdSmrg 77342d69509Smrg# _AM_MANGLE_OPTION(NAME) 77442d69509Smrg# ----------------------- 77542d69509SmrgAC_DEFUN([_AM_MANGLE_OPTION], 77642d69509Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 7774456fccdSmrg 77842d69509Smrg# _AM_SET_OPTION(NAME) 77942d69509Smrg# ------------------------------ 78042d69509Smrg# Set option NAME. Presently that only means defining a flag for this option. 78142d69509SmrgAC_DEFUN([_AM_SET_OPTION], 78242d69509Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 7834456fccdSmrg 78442d69509Smrg# _AM_SET_OPTIONS(OPTIONS) 78542d69509Smrg# ---------------------------------- 78642d69509Smrg# OPTIONS is a space-separated list of Automake options. 78742d69509SmrgAC_DEFUN([_AM_SET_OPTIONS], 78842d69509Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 7894456fccdSmrg 79042d69509Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 79142d69509Smrg# ------------------------------------------- 79242d69509Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 79342d69509SmrgAC_DEFUN([_AM_IF_OPTION], 79442d69509Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 7954456fccdSmrg 79642d69509Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 7974456fccdSmrg 79842d69509Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 79942d69509Smrg# Free Software Foundation, Inc. 80042d69509Smrg# 80142d69509Smrg# This file is free software; the Free Software Foundation 80242d69509Smrg# gives unlimited permission to copy and/or distribute it, 80342d69509Smrg# with or without modifications, as long as this notice is preserved. 8044456fccdSmrg 80542d69509Smrg# serial 5 8064456fccdSmrg 80742d69509Smrg# AM_SANITY_CHECK 80842d69509Smrg# --------------- 80942d69509SmrgAC_DEFUN([AM_SANITY_CHECK], 81042d69509Smrg[AC_MSG_CHECKING([whether build environment is sane]) 81142d69509Smrg# Just in case 81242d69509Smrgsleep 1 81342d69509Smrgecho timestamp > conftest.file 81442d69509Smrg# Reject unsafe characters in $srcdir or the absolute working directory 81542d69509Smrg# name. Accept space and tab only in the latter. 81642d69509Smrgam_lf=' 81742d69509Smrg' 81842d69509Smrgcase `pwd` in 81942d69509Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 82042d69509Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 82142d69509Smrgesac 82242d69509Smrgcase $srcdir in 82342d69509Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 82442d69509Smrg AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 82542d69509Smrgesac 8264456fccdSmrg 82742d69509Smrg# Do `set' in a subshell so we don't clobber the current shell's 82842d69509Smrg# arguments. Must try -L first in case configure is actually a 82942d69509Smrg# symlink; some systems play weird games with the mod time of symlinks 83042d69509Smrg# (eg FreeBSD returns the mod time of the symlink's containing 83142d69509Smrg# directory). 83242d69509Smrgif ( 83342d69509Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 83442d69509Smrg if test "$[*]" = "X"; then 83542d69509Smrg # -L didn't work. 83642d69509Smrg set X `ls -t "$srcdir/configure" conftest.file` 83742d69509Smrg fi 83842d69509Smrg rm -f conftest.file 83942d69509Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 84042d69509Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 8414456fccdSmrg 84242d69509Smrg # If neither matched, then we have a broken ls. This can happen 84342d69509Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 84442d69509Smrg # broken ls alias from the environment. This has actually 84542d69509Smrg # happened. Such a system could not be considered "sane". 84642d69509Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 84742d69509Smrgalias in your environment]) 84842d69509Smrg fi 8494456fccdSmrg 85042d69509Smrg test "$[2]" = conftest.file 85142d69509Smrg ) 85242d69509Smrgthen 85342d69509Smrg # Ok. 85442d69509Smrg : 8554456fccdSmrgelse 85642d69509Smrg AC_MSG_ERROR([newly created file is older than distributed files! 85742d69509SmrgCheck your system clock]) 85842d69509Smrgfi 85942d69509SmrgAC_MSG_RESULT(yes)]) 8604456fccdSmrg 86142d69509Smrg# Copyright (C) 2009 Free Software Foundation, Inc. 86242d69509Smrg# 86342d69509Smrg# This file is free software; the Free Software Foundation 86442d69509Smrg# gives unlimited permission to copy and/or distribute it, 86542d69509Smrg# with or without modifications, as long as this notice is preserved. 8664456fccdSmrg 86742d69509Smrg# serial 1 8684456fccdSmrg 86942d69509Smrg# AM_SILENT_RULES([DEFAULT]) 87042d69509Smrg# -------------------------- 87142d69509Smrg# Enable less verbose build rules; with the default set to DEFAULT 87242d69509Smrg# (`yes' being less verbose, `no' or empty being verbose). 87342d69509SmrgAC_DEFUN([AM_SILENT_RULES], 87442d69509Smrg[AC_ARG_ENABLE([silent-rules], 87542d69509Smrg[ --enable-silent-rules less verbose build output (undo: `make V=1') 87642d69509Smrg --disable-silent-rules verbose build output (undo: `make V=0')]) 87742d69509Smrgcase $enable_silent_rules in 87842d69509Smrgyes) AM_DEFAULT_VERBOSITY=0;; 87942d69509Smrgno) AM_DEFAULT_VERBOSITY=1;; 88042d69509Smrg*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 88142d69509Smrgesac 88242d69509SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 88342d69509SmrgAM_BACKSLASH='\' 88442d69509SmrgAC_SUBST([AM_BACKSLASH])dnl 88542d69509Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 88642d69509Smrg]) 8874456fccdSmrg 88842d69509Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 88942d69509Smrg# 89042d69509Smrg# This file is free software; the Free Software Foundation 89142d69509Smrg# gives unlimited permission to copy and/or distribute it, 89242d69509Smrg# with or without modifications, as long as this notice is preserved. 8934456fccdSmrg 89442d69509Smrg# AM_PROG_INSTALL_STRIP 89542d69509Smrg# --------------------- 89642d69509Smrg# One issue with vendor `install' (even GNU) is that you can't 89742d69509Smrg# specify the program used to strip binaries. This is especially 89842d69509Smrg# annoying in cross-compiling environments, where the build's strip 89942d69509Smrg# is unlikely to handle the host's binaries. 90042d69509Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 90142d69509Smrg# always use install-sh in `make install-strip', and initialize 90242d69509Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 90342d69509SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 90442d69509Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 90542d69509Smrg# Installed binaries are usually stripped using `strip' when the user 90642d69509Smrg# run `make install-strip'. However `strip' might not be the right 90742d69509Smrg# tool to use in cross-compilation environments, therefore Automake 90842d69509Smrg# will honor the `STRIP' environment variable to overrule this program. 90942d69509Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 91042d69509Smrgif test "$cross_compiling" != no; then 91142d69509Smrg AC_CHECK_TOOL([STRIP], [strip], :) 9124456fccdSmrgfi 91342d69509SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 91442d69509SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 9154456fccdSmrg 91642d69509Smrg# Copyright (C) 2006, 2008 Free Software Foundation, Inc. 91742d69509Smrg# 91842d69509Smrg# This file is free software; the Free Software Foundation 91942d69509Smrg# gives unlimited permission to copy and/or distribute it, 92042d69509Smrg# with or without modifications, as long as this notice is preserved. 9214456fccdSmrg 92242d69509Smrg# serial 2 9234456fccdSmrg 92442d69509Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 92542d69509Smrg# --------------------------- 92642d69509Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 92742d69509Smrg# This macro is traced by Automake. 92842d69509SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 9294456fccdSmrg 93042d69509Smrg# AM_SUBST_NOTMAKE(VARIABLE) 93142d69509Smrg# --------------------------- 93242d69509Smrg# Public sister of _AM_SUBST_NOTMAKE. 93342d69509SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 9344456fccdSmrg 93542d69509Smrg# Check how to create a tarball. -*- Autoconf -*- 9364456fccdSmrg 93742d69509Smrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 93842d69509Smrg# 93942d69509Smrg# This file is free software; the Free Software Foundation 94042d69509Smrg# gives unlimited permission to copy and/or distribute it, 94142d69509Smrg# with or without modifications, as long as this notice is preserved. 9424456fccdSmrg 94342d69509Smrg# serial 2 94442d69509Smrg 94542d69509Smrg# _AM_PROG_TAR(FORMAT) 94642d69509Smrg# -------------------- 94742d69509Smrg# Check how to create a tarball in format FORMAT. 94842d69509Smrg# FORMAT should be one of `v7', `ustar', or `pax'. 94942d69509Smrg# 95042d69509Smrg# Substitute a variable $(am__tar) that is a command 95142d69509Smrg# writing to stdout a FORMAT-tarball containing the directory 95242d69509Smrg# $tardir. 95342d69509Smrg# tardir=directory && $(am__tar) > result.tar 95442d69509Smrg# 95542d69509Smrg# Substitute a variable $(am__untar) that extract such 95642d69509Smrg# a tarball read from stdin. 95742d69509Smrg# $(am__untar) < result.tar 95842d69509SmrgAC_DEFUN([_AM_PROG_TAR], 95942d69509Smrg[# Always define AMTAR for backward compatibility. 96042d69509SmrgAM_MISSING_PROG([AMTAR], [tar]) 96142d69509Smrgm4_if([$1], [v7], 96242d69509Smrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 96342d69509Smrg [m4_case([$1], [ustar],, [pax],, 96442d69509Smrg [m4_fatal([Unknown tar format])]) 96542d69509SmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 96642d69509Smrg# Loop over all known methods to create a tar archive until one works. 96742d69509Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 96842d69509Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 96942d69509Smrg# Do not fold the above two line into one, because Tru64 sh and 97042d69509Smrg# Solaris sh will not grok spaces in the rhs of `-'. 97142d69509Smrgfor _am_tool in $_am_tools 97242d69509Smrgdo 97342d69509Smrg case $_am_tool in 97442d69509Smrg gnutar) 97542d69509Smrg for _am_tar in tar gnutar gtar; 97642d69509Smrg do 97742d69509Smrg AM_RUN_LOG([$_am_tar --version]) && break 97842d69509Smrg done 97942d69509Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 98042d69509Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 98142d69509Smrg am__untar="$_am_tar -xf -" 98242d69509Smrg ;; 98342d69509Smrg plaintar) 98442d69509Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 98542d69509Smrg # ustar tarball either. 98642d69509Smrg (tar --version) >/dev/null 2>&1 && continue 98742d69509Smrg am__tar='tar chf - "$$tardir"' 98842d69509Smrg am__tar_='tar chf - "$tardir"' 98942d69509Smrg am__untar='tar xf -' 99042d69509Smrg ;; 99142d69509Smrg pax) 99242d69509Smrg am__tar='pax -L -x $1 -w "$$tardir"' 99342d69509Smrg am__tar_='pax -L -x $1 -w "$tardir"' 99442d69509Smrg am__untar='pax -r' 99542d69509Smrg ;; 99642d69509Smrg cpio) 99742d69509Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 99842d69509Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 99942d69509Smrg am__untar='cpio -i -H $1 -d' 100042d69509Smrg ;; 100142d69509Smrg none) 100242d69509Smrg am__tar=false 100342d69509Smrg am__tar_=false 100442d69509Smrg am__untar=false 10054456fccdSmrg ;; 10064456fccdSmrg esac 10074456fccdSmrg 100842d69509Smrg # If the value was cached, stop now. We just wanted to have am__tar 100942d69509Smrg # and am__untar set. 101042d69509Smrg test -n "${am_cv_prog_tar_$1}" && break 10114456fccdSmrg 101242d69509Smrg # tar/untar a dummy directory, and stop if the command works 101342d69509Smrg rm -rf conftest.dir 101442d69509Smrg mkdir conftest.dir 101542d69509Smrg echo GrepMe > conftest.dir/file 101642d69509Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 101742d69509Smrg rm -rf conftest.dir 101842d69509Smrg if test -s conftest.tar; then 101942d69509Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 102042d69509Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 102142d69509Smrg fi 102242d69509Smrgdone 102342d69509Smrgrm -rf conftest.dir 10244456fccdSmrg 102542d69509SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 102642d69509SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 102742d69509SmrgAC_SUBST([am__tar]) 102842d69509SmrgAC_SUBST([am__untar]) 102942d69509Smrg]) # _AM_PROG_TAR 10304456fccdSmrg 103142d69509Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 103242d69509Smrgdnl 103342d69509Smrgdnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. 103442d69509Smrgdnl 103542d69509Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 103642d69509Smrgdnl copy of this software and associated documentation files (the 103742d69509Smrgdnl "Software"), to deal in the Software without restriction, including 103842d69509Smrgdnl without limitation the rights to use, copy, modify, merge, publish, 103942d69509Smrgdnl distribute, and/or sell copies of the Software, and to permit persons 104042d69509Smrgdnl to whom the Software is furnished to do so, provided that the above 104142d69509Smrgdnl copyright notice(s) and this permission notice appear in all copies of 104242d69509Smrgdnl the Software and that both the above copyright notice(s) and this 104342d69509Smrgdnl permission notice appear in supporting documentation. 104442d69509Smrgdnl 104542d69509Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 104642d69509Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 104742d69509Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 104842d69509Smrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 104942d69509Smrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL 105042d69509Smrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING 105142d69509Smrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 105242d69509Smrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 105342d69509Smrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 105442d69509Smrgdnl 105542d69509Smrgdnl Except as contained in this notice, the name of a copyright holder 105642d69509Smrgdnl shall not be used in advertising or otherwise to promote the sale, use 105742d69509Smrgdnl or other dealings in this Software without prior written authorization 105842d69509Smrgdnl of the copyright holder. 10594456fccdSmrg 106042d69509Smrg# XORG_MACROS_VERSION(required-version) 106142d69509Smrg# ------------------------------------- 106242d69509Smrg# Minimum version: 1.1.0 106342d69509Smrg# 106442d69509Smrg# If you're using a macro added in Version 1.1 or newer, include this in 106542d69509Smrg# your configure.ac with the minimum required version, such as: 106642d69509Smrg# XORG_MACROS_VERSION(1.1) 106742d69509Smrg# 106842d69509Smrg# To ensure that this macro is defined, also add: 106942d69509Smrg# m4_ifndef([XORG_MACROS_VERSION], 107042d69509Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 107142d69509Smrg# 107242d69509Smrg# 107342d69509Smrg# See the "minimum version" comment for each macro you use to see what 107442d69509Smrg# version you require. 107542d69509Smrgm4_defun([XORG_MACROS_VERSION],[ 107642d69509Smrgm4_define([vers_have], [1.3.0]) 107742d69509Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 107842d69509Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 107942d69509Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 108042d69509Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 108142d69509Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 108242d69509Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 108342d69509Smrgm4_undefine([vers_have]) 108442d69509Smrgm4_undefine([maj_have]) 108542d69509Smrgm4_undefine([maj_needed]) 108642d69509Smrg]) # XORG_MACROS_VERSION 10874456fccdSmrg 108842d69509Smrg# XORG_PROG_RAWCPP() 108942d69509Smrg# ------------------ 109042d69509Smrg# Minimum version: 1.0.0 109142d69509Smrg# 109242d69509Smrg# Find cpp program and necessary flags for use in pre-processing text files 109342d69509Smrg# such as man pages and config files 109442d69509SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 109542d69509SmrgAC_REQUIRE([AC_PROG_CPP]) 109642d69509SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 109742d69509Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 10984456fccdSmrg 109942d69509Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 110042d69509Smrg# which is not the best choice for supporting other OS'es, but covers most 110142d69509Smrg# of the ones we need for now. 110242d69509SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 110342d69509SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 110442d69509Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 110542d69509Smrg AC_MSG_RESULT([no]) 110642d69509Smrgelse 110742d69509Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 110842d69509Smrg RAWCPPFLAGS=-undef 110942d69509Smrg AC_MSG_RESULT([yes]) 111042d69509Smrg # under Cygwin unix is still defined even with -undef 111142d69509Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 111242d69509Smrg RAWCPPFLAGS="-undef -ansi" 111342d69509Smrg AC_MSG_RESULT([yes, with -ansi]) 111442d69509Smrg else 111542d69509Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 111642d69509Smrg fi 11174456fccdSmrgfi 111842d69509Smrgrm -f conftest.$ac_ext 11194456fccdSmrg 112042d69509SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 112142d69509SmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 112242d69509Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 112342d69509Smrg AC_MSG_RESULT([no]) 112442d69509Smrgelse 112542d69509Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 112642d69509Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 112742d69509Smrg AC_MSG_RESULT([yes]) 112842d69509Smrg else 112942d69509Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 113042d69509Smrg fi 113142d69509Smrgfi 113242d69509Smrgrm -f conftest.$ac_ext 113342d69509SmrgAC_SUBST(RAWCPPFLAGS) 113442d69509Smrg]) # XORG_PROG_RAWCPP 11354456fccdSmrg 113642d69509Smrg# XORG_MANPAGE_SECTIONS() 113742d69509Smrg# ----------------------- 113842d69509Smrg# Minimum version: 1.0.0 113942d69509Smrg# 114042d69509Smrg# Determine which sections man pages go in for the different man page types 114142d69509Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 114242d69509Smrg# Not sure if there's any better way than just hardcoding by OS name. 114342d69509Smrg# Override default settings by setting environment variables 11444456fccdSmrg 114542d69509SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 114642d69509SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 11474456fccdSmrg 114842d69509Smrgif test x$APP_MAN_SUFFIX = x ; then 114942d69509Smrg APP_MAN_SUFFIX=1 115042d69509Smrgfi 115142d69509Smrgif test x$APP_MAN_DIR = x ; then 115242d69509Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 115342d69509Smrgfi 11544456fccdSmrg 115542d69509Smrgif test x$LIB_MAN_SUFFIX = x ; then 115642d69509Smrg LIB_MAN_SUFFIX=3 115742d69509Smrgfi 115842d69509Smrgif test x$LIB_MAN_DIR = x ; then 115942d69509Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 116042d69509Smrgfi 11614456fccdSmrg 116242d69509Smrgif test x$FILE_MAN_SUFFIX = x ; then 116342d69509Smrg case $host_os in 116442d69509Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 116542d69509Smrg *) FILE_MAN_SUFFIX=5 ;; 116642d69509Smrg esac 116742d69509Smrgfi 116842d69509Smrgif test x$FILE_MAN_DIR = x ; then 116942d69509Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 117042d69509Smrgfi 117142d69509Smrg 117242d69509Smrgif test x$MISC_MAN_SUFFIX = x ; then 117342d69509Smrg case $host_os in 117442d69509Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 117542d69509Smrg *) MISC_MAN_SUFFIX=7 ;; 117642d69509Smrg esac 117742d69509Smrgfi 117842d69509Smrgif test x$MISC_MAN_DIR = x ; then 117942d69509Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 11804456fccdSmrgfi 11814456fccdSmrg 118242d69509Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 118342d69509Smrg case $host_os in 118442d69509Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 118542d69509Smrg *) DRIVER_MAN_SUFFIX=4 ;; 118642d69509Smrg esac 118742d69509Smrgfi 118842d69509Smrgif test x$DRIVER_MAN_DIR = x ; then 118942d69509Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 119042d69509Smrgfi 11914456fccdSmrg 119242d69509Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 119342d69509Smrg case $host_os in 119442d69509Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 119542d69509Smrg *) ADMIN_MAN_SUFFIX=8 ;; 119642d69509Smrg esac 119742d69509Smrgfi 119842d69509Smrgif test x$ADMIN_MAN_DIR = x ; then 119942d69509Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 12004456fccdSmrgfi 12014456fccdSmrg 12024456fccdSmrg 120342d69509SmrgAC_SUBST([APP_MAN_SUFFIX]) 120442d69509SmrgAC_SUBST([LIB_MAN_SUFFIX]) 120542d69509SmrgAC_SUBST([FILE_MAN_SUFFIX]) 120642d69509SmrgAC_SUBST([MISC_MAN_SUFFIX]) 120742d69509SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 120842d69509SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 120942d69509SmrgAC_SUBST([APP_MAN_DIR]) 121042d69509SmrgAC_SUBST([LIB_MAN_DIR]) 121142d69509SmrgAC_SUBST([FILE_MAN_DIR]) 121242d69509SmrgAC_SUBST([MISC_MAN_DIR]) 121342d69509SmrgAC_SUBST([DRIVER_MAN_DIR]) 121442d69509SmrgAC_SUBST([ADMIN_MAN_DIR]) 121542d69509Smrg]) # XORG_MANPAGE_SECTIONS 12164456fccdSmrg 121742d69509Smrg# XORG_CHECK_LINUXDOC 121842d69509Smrg# ------------------- 121942d69509Smrg# Minimum version: 1.0.0 122042d69509Smrg# 122142d69509Smrg# Defines the variable MAKE_TEXT if the necessary tools and 122242d69509Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 122342d69509Smrg# Whether or not the necessary tools and files are found can be checked 122442d69509Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 122542d69509SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 122642d69509Smrgif test x$XORG_SGML_PATH = x ; then 122742d69509Smrg XORG_SGML_PATH=$prefix/share/sgml 12284456fccdSmrgfi 122942d69509SmrgHAVE_DEFS_ENT= 12304456fccdSmrg 123142d69509Smrgif test x"$cross_compiling" = x"yes" ; then 123242d69509Smrg HAVE_DEFS_ENT=no 123342d69509Smrgelse 123442d69509Smrg AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 12354456fccdSmrgfi 12364456fccdSmrg 123742d69509SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 123842d69509SmrgAC_PATH_PROG(PS2PDF, ps2pdf) 123942d69509Smrg 124042d69509SmrgAC_MSG_CHECKING([Whether to build documentation]) 12414456fccdSmrg 124242d69509Smrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then 124342d69509Smrg BUILDDOC=yes 12444456fccdSmrgelse 124542d69509Smrg BUILDDOC=no 12464456fccdSmrgfi 12474456fccdSmrg 124842d69509SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 12494456fccdSmrg 125042d69509SmrgAC_MSG_RESULT([$BUILDDOC]) 125142d69509Smrg 125242d69509SmrgAC_MSG_CHECKING([Whether to build pdf documentation]) 125342d69509Smrg 125442d69509Smrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then 125542d69509Smrg BUILDPDFDOC=yes 12564456fccdSmrgelse 125742d69509Smrg BUILDPDFDOC=no 12584456fccdSmrgfi 12594456fccdSmrg 126042d69509SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 12614456fccdSmrg 126242d69509SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 12634456fccdSmrg 126442d69509SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" 126542d69509SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 126642d69509SmrgMAKE_PDF="$PS2PDF" 126742d69509SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 12684456fccdSmrg 126942d69509SmrgAC_SUBST(MAKE_TEXT) 127042d69509SmrgAC_SUBST(MAKE_PS) 127142d69509SmrgAC_SUBST(MAKE_PDF) 127242d69509SmrgAC_SUBST(MAKE_HTML) 127342d69509Smrg]) # XORG_CHECK_LINUXDOC 12744456fccdSmrg 127542d69509Smrg# XORG_CHECK_DOCBOOK 127642d69509Smrg# ------------------- 127742d69509Smrg# Minimum version: 1.0.0 127842d69509Smrg# 127942d69509Smrg# Checks for the ability to build output formats from SGML DocBook source. 128042d69509Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 128142d69509Smrg# indicates whether the necessary tools and files are found and, if set, 128242d69509Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 128342d69509SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 128442d69509Smrgif test x$XORG_SGML_PATH = x ; then 128542d69509Smrg XORG_SGML_PATH=$prefix/share/sgml 128642d69509Smrgfi 128742d69509SmrgHAVE_DEFS_ENT= 128842d69509SmrgBUILDTXTDOC=no 128942d69509SmrgBUILDPDFDOC=no 129042d69509SmrgBUILDPSDOC=no 129142d69509SmrgBUILDHTMLDOC=no 129242d69509Smrg 129342d69509SmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 129442d69509Smrg 129542d69509SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 129642d69509SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 129742d69509SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 129842d69509SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 129942d69509Smrg 130042d69509SmrgAC_MSG_CHECKING([Whether to build text documentation]) 130142d69509Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x && 130242d69509Smrg test x$BUILD_TXTDOC != xno; then 130342d69509Smrg BUILDTXTDOC=yes 130442d69509Smrgfi 130542d69509SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 130642d69509SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 13074456fccdSmrg 130842d69509SmrgAC_MSG_CHECKING([Whether to build PDF documentation]) 130942d69509Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x && 131042d69509Smrg test x$BUILD_PDFDOC != xno; then 131142d69509Smrg BUILDPDFDOC=yes 131242d69509Smrgfi 131342d69509SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 131442d69509SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 13154456fccdSmrg 131642d69509SmrgAC_MSG_CHECKING([Whether to build PostScript documentation]) 131742d69509Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x && 131842d69509Smrg test x$BUILD_PSDOC != xno; then 131942d69509Smrg BUILDPSDOC=yes 132042d69509Smrgfi 132142d69509SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 132242d69509SmrgAC_MSG_RESULT([$BUILDPSDOC]) 13234456fccdSmrg 132442d69509SmrgAC_MSG_CHECKING([Whether to build HTML documentation]) 132542d69509Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x && 132642d69509Smrg test x$BUILD_HTMLDOC != xno; then 132742d69509Smrg BUILDHTMLDOC=yes 132842d69509Smrgfi 132942d69509SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 133042d69509SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 13314456fccdSmrg 133242d69509SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 133342d69509SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 133442d69509SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 133542d69509SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 13364456fccdSmrg 133742d69509SmrgAC_SUBST(MAKE_TEXT) 133842d69509SmrgAC_SUBST(MAKE_PS) 133942d69509SmrgAC_SUBST(MAKE_PDF) 134042d69509SmrgAC_SUBST(MAKE_HTML) 134142d69509Smrg]) # XORG_CHECK_DOCBOOK 13424456fccdSmrg 134342d69509Smrg# XORG_CHECK_MALLOC_ZERO 134442d69509Smrg# ---------------------- 134542d69509Smrg# Minimum version: 1.0.0 134642d69509Smrg# 134742d69509Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 134842d69509Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 134942d69509Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 135042d69509SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 135142d69509SmrgAC_ARG_ENABLE(malloc0returnsnull, 135242d69509Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 135342d69509Smrg [malloc(0) returns NULL (default: auto)]), 135442d69509Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 135542d69509Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 13564456fccdSmrg 135742d69509SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 135842d69509Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 135942d69509Smrg AC_RUN_IFELSE([ 136042d69509Smrgchar *malloc(); 136142d69509Smrgchar *realloc(); 136242d69509Smrgchar *calloc(); 136342d69509Smrgmain() { 136442d69509Smrg char *m0, *r0, *c0, *p; 136542d69509Smrg m0 = malloc(0); 136642d69509Smrg p = malloc(10); 136742d69509Smrg r0 = realloc(p,0); 136842d69509Smrg c0 = calloc(0); 136942d69509Smrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 137042d69509Smrg}], 137142d69509Smrg [MALLOC_ZERO_RETURNS_NULL=yes], 137242d69509Smrg [MALLOC_ZERO_RETURNS_NULL=no]) 137342d69509Smrgfi 137442d69509SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 13754456fccdSmrg 137642d69509Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 137742d69509Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 137842d69509Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 137942d69509Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 138042d69509Smrgelse 138142d69509Smrg MALLOC_ZERO_CFLAGS="" 138242d69509Smrg XMALLOC_ZERO_CFLAGS="" 138342d69509Smrg XTMALLOC_ZERO_CFLAGS="" 138442d69509Smrgfi 13854456fccdSmrg 138642d69509SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 138742d69509SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 138842d69509SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 138942d69509Smrg]) # XORG_CHECK_MALLOC_ZERO 13904456fccdSmrg 139142d69509Smrg# XORG_WITH_LINT() 139242d69509Smrg# ---------------- 139342d69509Smrg# Minimum version: 1.1.0 139442d69509Smrg# 139542d69509Smrg# Sets up flags for source checkers such as lint and sparse if --with-lint 139642d69509Smrg# is specified. (Use --with-lint=sparse for sparse.) 139742d69509Smrg# Sets $LINT to name of source checker passed with --with-lint (default: lint) 139842d69509Smrg# Sets $LINT_FLAGS to flags to pass to source checker 139942d69509Smrg# Sets LINT automake conditional if enabled (default: disabled) 140042d69509Smrg# 140142d69509SmrgAC_DEFUN([XORG_WITH_LINT],[ 140242d69509Smrg 140342d69509Smrg# Allow checking code with lint, sparse, etc. 140442d69509SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 140542d69509Smrg [Use a lint-style source code checker (default: disabled)])], 140642d69509Smrg [use_lint=$withval], [use_lint=no]) 140742d69509Smrgif test "x$use_lint" = "xyes" ; then 140842d69509Smrg LINT="lint" 140942d69509Smrgelse 141042d69509Smrg LINT="$use_lint" 141142d69509Smrgfi 141242d69509Smrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then 141342d69509Smrg case $LINT in 141442d69509Smrg lint|*/lint) 141542d69509Smrg case $host_os in 141642d69509Smrg solaris*) 141742d69509Smrg LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 141842d69509Smrg ;; 141942d69509Smrg esac 142042d69509Smrg ;; 14214456fccdSmrg esac 142242d69509Smrgfi 14234456fccdSmrg 142442d69509SmrgAC_SUBST(LINT) 142542d69509SmrgAC_SUBST(LINT_FLAGS) 142642d69509SmrgAM_CONDITIONAL(LINT, [test x$LINT != xno]) 14274456fccdSmrg 142842d69509Smrg]) # XORG_WITH_LINT 14294456fccdSmrg 143042d69509Smrg# XORG_LINT_LIBRARY(LIBNAME) 143142d69509Smrg# -------------------------- 143242d69509Smrg# Minimum version: 1.1.0 143342d69509Smrg# 143442d69509Smrg# Sets up flags for building lint libraries for checking programs that call 143542d69509Smrg# functions in the library. 143642d69509Smrg# Disabled by default, enable with --enable-lint-library 143742d69509Smrg# Sets: 143842d69509Smrg# @LINTLIB@ - name of lint library file to make 143942d69509Smrg# MAKE_LINT_LIB - automake conditional 144042d69509Smrg# 14414456fccdSmrg 144242d69509SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 144342d69509SmrgAC_REQUIRE([XORG_WITH_LINT]) 144442d69509Smrg# Build lint "library" for more indepth checks of programs calling this library 144542d69509SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 144642d69509Smrg [Create lint library (default: disabled)])], 144742d69509Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 144842d69509Smrgif test "x$make_lint_lib" != "xno" ; then 144942d69509Smrg if test "x$LINT" = "xno" ; then 145042d69509Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 145142d69509Smrg fi 145242d69509Smrg if test "x$make_lint_lib" = "xyes" ; then 145342d69509Smrg LINTLIB=llib-l$1.ln 14544456fccdSmrg else 145542d69509Smrg LINTLIB=$make_lint_lib 145642d69509Smrg fi 145742d69509Smrgfi 145842d69509SmrgAC_SUBST(LINTLIB) 145942d69509SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 146042d69509Smrg 146142d69509Smrg]) # XORG_LINT_LIBRARY 146242d69509Smrg 146342d69509Smrg# XORG_CWARNFLAGS 146442d69509Smrg# --------------- 146542d69509Smrg# Minimum version: 1.2.0 146642d69509Smrg# 146742d69509Smrg# Defines CWARNFLAGS to enable C compiler warnings. 146842d69509Smrg# 146942d69509SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 147042d69509SmrgAC_REQUIRE([AC_PROG_CC]) 147142d69509Smrgif test "x$GCC" = xyes ; then 147242d69509Smrg CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ 147342d69509Smrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ 147442d69509Smrg-Wbad-function-cast" 147542d69509Smrg case `$CC -dumpversion` in 147642d69509Smrg 3.4.* | 4.*) 147742d69509Smrg CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement" 147842d69509Smrg ;; 14794456fccdSmrg esac 148042d69509Smrgelse 148142d69509Smrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 148242d69509Smrg if test "x$SUNCC" = "xyes"; then 148342d69509Smrg CWARNFLAGS="-v" 148442d69509Smrg fi 148542d69509Smrgfi 148642d69509SmrgAC_SUBST(CWARNFLAGS) 148742d69509Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) 148842d69509Smrg]) # XORG_CWARNFLAGS 14894456fccdSmrg 149042d69509Smrg# XORG_STRICT_OPTION 149142d69509Smrg# ----------------------- 149242d69509Smrg# Minimum version: 1.3.0 149342d69509Smrg# 149442d69509Smrg# Add configure option to enable strict compilation 149542d69509SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 149642d69509SmrgAC_REQUIRE([AC_PROG_CC]) 149742d69509SmrgAC_REQUIRE([AC_PROG_CC_C99]) 149842d69509SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 149942d69509Smrg 150042d69509SmrgAC_ARG_ENABLE(strict-compilation, 150142d69509Smrg AS_HELP_STRING([--enable-strict-compilation], 150242d69509Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 150342d69509Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 150442d69509Smrgif test "x$STRICT_COMPILE" = "xyes"; then 150542d69509Smrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 150642d69509Smrg AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 150742d69509Smrg if test "x$GCC" = xyes ; then 150842d69509Smrg STRICT_CFLAGS="-pedantic -Werror" 150942d69509Smrg elif test "x$SUNCC" = "xyes"; then 151042d69509Smrg STRICT_CFLAGS="-errwarn" 151142d69509Smrg elif test "x$INTELCC" = "xyes"; then 151242d69509Smrg STRICT_CFLAGS="-Werror" 151342d69509Smrg fi 151442d69509Smrgfi 151542d69509SmrgCWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS" 151642d69509SmrgAC_SUBST([CWARNFLAGS]) 151742d69509Smrg]) # XORG_STRICT_OPTION 15184456fccdSmrg 151942d69509Smrg# XORG_DEFAULT_OPTIONS 152042d69509Smrg# -------------------- 152142d69509Smrg# Minimum version: 1.3.0 152242d69509Smrg# 152342d69509Smrg# Defines default options for X.Org modules. 152442d69509Smrg# 152542d69509SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 152642d69509SmrgXORG_CWARNFLAGS 152742d69509SmrgXORG_STRICT_OPTION 152842d69509SmrgXORG_RELEASE_VERSION 152942d69509SmrgXORG_CHANGELOG 153042d69509SmrgXORG_MANPAGE_SECTIONS 153142d69509Smrg]) # XORG_DEFAULT_OPTIONS 153242d69509Smrgdnl Copyright 2005 Red Hat, Inc 153342d69509Smrgdnl 153442d69509Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 153542d69509Smrgdnl documentation for any purpose is hereby granted without fee, provided that 153642d69509Smrgdnl the above copyright notice appear in all copies and that both that 153742d69509Smrgdnl copyright notice and this permission notice appear in supporting 153842d69509Smrgdnl documentation. 153942d69509Smrgdnl 154042d69509Smrgdnl The above copyright notice and this permission notice shall be included 154142d69509Smrgdnl in all copies or substantial portions of the Software. 154242d69509Smrgdnl 154342d69509Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 154442d69509Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 154542d69509Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 154642d69509Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 154742d69509Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 154842d69509Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 154942d69509Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 155042d69509Smrgdnl 155142d69509Smrgdnl Except as contained in this notice, the name of the copyright holders shall 155242d69509Smrgdnl not be used in advertising or otherwise to promote the sale, use or 155342d69509Smrgdnl other dealings in this Software without prior written authorization 155442d69509Smrgdnl from the copyright holders. 155542d69509Smrgdnl 15564456fccdSmrg 155742d69509Smrg# XORG_RELEASE_VERSION 155842d69509Smrg# -------------------- 155942d69509Smrg# Adds --with/without-release-string and changes the PACKAGE and 156042d69509Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If 156142d69509Smrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also 156242d69509Smrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 156342d69509Smrg 156442d69509SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 156542d69509Smrg AC_ARG_WITH(release-version, 156642d69509Smrg AS_HELP_STRING([--with-release-version=STRING], 156742d69509Smrg [Use release version string in package name]), 156842d69509Smrg [RELEASE_VERSION="$withval"], 156942d69509Smrg [RELEASE_VERSION=""]) 157042d69509Smrg if test "x$RELEASE_VERSION" != "x"; then 157142d69509Smrg PACKAGE="$PACKAGE-$RELEASE_VERSION" 157242d69509Smrg PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" 157342d69509Smrg AC_MSG_NOTICE([Building with package name set to $PACKAGE]) 157442d69509Smrg fi 157542d69509Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 157642d69509Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 157742d69509Smrg [Major version of this package]) 157842d69509Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 157942d69509Smrg if test "x$PVM" = "x"; then 158042d69509Smrg PVM="0" 158142d69509Smrg fi 158242d69509Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 158342d69509Smrg [$PVM], 158442d69509Smrg [Minor version of this package]) 158542d69509Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 158642d69509Smrg if test "x$PVP" = "x"; then 158742d69509Smrg PVP="0" 158842d69509Smrg fi 158942d69509Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 159042d69509Smrg [$PVP], 159142d69509Smrg [Patch version of this package]) 159242d69509Smrg]) 15934456fccdSmrg 159442d69509Smrg# XORG_CHANGELOG() 159542d69509Smrg# ---------------- 159642d69509Smrg# Minimum version: 1.2.0 159742d69509Smrg# 159842d69509Smrg# Defines the variable CHANGELOG_CMD as the command to generate 159942d69509Smrg# ChangeLog from git. 160042d69509Smrg# 160142d69509Smrg# Arrange that distcleancheck ignores ChangeLog left over by distclean. 160242d69509Smrg# 160342d69509SmrgAC_DEFUN([XORG_CHANGELOG], [ 160442d69509SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \ 160542d69509Smrgmv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \ 160642d69509Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 160742d69509SmrgAC_SUBST([CHANGELOG_CMD]) 160842d69509SmrgAC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print']) 160942d69509Smrg]) # XORG_CHANGELOG 16104456fccdSmrg 161142d69509Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 16124456fccdSmrg 161342d69509Smrg# serial 52 AC_PROG_LIBTOOL 16144456fccdSmrg 16154456fccdSmrg 161642d69509Smrg# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) 161742d69509Smrg# ----------------------------------------------------------- 161842d69509Smrg# If this macro is not defined by Autoconf, define it here. 161942d69509Smrgm4_ifdef([AC_PROVIDE_IFELSE], 162042d69509Smrg [], 162142d69509Smrg [m4_define([AC_PROVIDE_IFELSE], 162242d69509Smrg [m4_ifdef([AC_PROVIDE_$1], 162342d69509Smrg [$2], [$3])])]) 16244456fccdSmrg 16254456fccdSmrg 162642d69509Smrg# AC_PROG_LIBTOOL 162742d69509Smrg# --------------- 162842d69509SmrgAC_DEFUN([AC_PROG_LIBTOOL], 162942d69509Smrg[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl 163042d69509Smrgdnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX 163142d69509Smrgdnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. 163242d69509Smrg AC_PROVIDE_IFELSE([AC_PROG_CXX], 163342d69509Smrg [AC_LIBTOOL_CXX], 163442d69509Smrg [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX 163542d69509Smrg ])]) 163642d69509Smrgdnl And a similar setup for Fortran 77 support 163742d69509Smrg AC_PROVIDE_IFELSE([AC_PROG_F77], 163842d69509Smrg [AC_LIBTOOL_F77], 163942d69509Smrg [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 164042d69509Smrg])]) 16414456fccdSmrg 164242d69509Smrgdnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. 164342d69509Smrgdnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run 164442d69509Smrgdnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. 164542d69509Smrg AC_PROVIDE_IFELSE([AC_PROG_GCJ], 164642d69509Smrg [AC_LIBTOOL_GCJ], 164742d69509Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 164842d69509Smrg [AC_LIBTOOL_GCJ], 164942d69509Smrg [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], 165042d69509Smrg [AC_LIBTOOL_GCJ], 165142d69509Smrg [ifdef([AC_PROG_GCJ], 165242d69509Smrg [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 165342d69509Smrg ifdef([A][M_PROG_GCJ], 165442d69509Smrg [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) 165542d69509Smrg ifdef([LT_AC_PROG_GCJ], 165642d69509Smrg [define([LT_AC_PROG_GCJ], 165742d69509Smrg defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) 165842d69509Smrg])])# AC_PROG_LIBTOOL 16594456fccdSmrg 16604456fccdSmrg 166142d69509Smrg# _AC_PROG_LIBTOOL 166242d69509Smrg# ---------------- 166342d69509SmrgAC_DEFUN([_AC_PROG_LIBTOOL], 166442d69509Smrg[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl 166542d69509SmrgAC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl 166642d69509SmrgAC_BEFORE([$0],[AC_LIBTOOL_F77])dnl 166742d69509SmrgAC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl 16684456fccdSmrg 166942d69509Smrg# This can be used to rebuild libtool when needed 167042d69509SmrgLIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" 16714456fccdSmrg 167242d69509Smrg# Always use our own libtool. 167342d69509SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 167442d69509SmrgAC_SUBST(LIBTOOL)dnl 16754456fccdSmrg 167642d69509Smrg# Prevent multiple expansion 167742d69509Smrgdefine([AC_PROG_LIBTOOL], []) 167842d69509Smrg])# _AC_PROG_LIBTOOL 16794456fccdSmrg 16804456fccdSmrg 168142d69509Smrg# AC_LIBTOOL_SETUP 168242d69509Smrg# ---------------- 168342d69509SmrgAC_DEFUN([AC_LIBTOOL_SETUP], 168442d69509Smrg[AC_PREREQ(2.50)dnl 168542d69509SmrgAC_REQUIRE([AC_ENABLE_SHARED])dnl 168642d69509SmrgAC_REQUIRE([AC_ENABLE_STATIC])dnl 168742d69509SmrgAC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl 168842d69509SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 168942d69509SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 169042d69509SmrgAC_REQUIRE([AC_PROG_CC])dnl 169142d69509SmrgAC_REQUIRE([AC_PROG_LD])dnl 169242d69509SmrgAC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl 169342d69509SmrgAC_REQUIRE([AC_PROG_NM])dnl 169442d69509Smrg 169542d69509SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 169642d69509SmrgAC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl 169742d69509Smrg# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! 169842d69509SmrgAC_REQUIRE([AC_OBJEXT])dnl 169942d69509SmrgAC_REQUIRE([AC_EXEEXT])dnl 170042d69509Smrgdnl 170142d69509SmrgAC_LIBTOOL_SYS_MAX_CMD_LEN 170242d69509SmrgAC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 170342d69509SmrgAC_LIBTOOL_OBJDIR 170442d69509Smrg 170542d69509SmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 170642d69509Smrg_LT_AC_PROG_ECHO_BACKSLASH 170742d69509Smrg 170842d69509Smrgcase $host_os in 170942d69509Smrgaix3*) 171042d69509Smrg # AIX sometimes has problems with the GCC collect2 program. For some 171142d69509Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 171242d69509Smrg # vanish in a puff of smoke. 171342d69509Smrg if test "X${COLLECT_NAMES+set}" != Xset; then 171442d69509Smrg COLLECT_NAMES= 171542d69509Smrg export COLLECT_NAMES 171642d69509Smrg fi 17174456fccdSmrg ;; 17184456fccdSmrgesac 17194456fccdSmrg 172042d69509Smrg# Sed substitution that helps us do robust quoting. It backslashifies 172142d69509Smrg# metacharacters that are still active within double-quoted strings. 172242d69509SmrgXsed='sed -e 1s/^X//' 172342d69509Smrg[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] 17244456fccdSmrg 172542d69509Smrg# Same as above, but do not quote variable references. 172642d69509Smrg[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] 17274456fccdSmrg 172842d69509Smrg# Sed substitution to delay expansion of an escaped shell variable in a 172942d69509Smrg# double_quote_subst'ed string. 173042d69509Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 17314456fccdSmrg 173242d69509Smrg# Sed substitution to avoid accidental globbing in evaled expressions 173342d69509Smrgno_glob_subst='s/\*/\\\*/g' 17344456fccdSmrg 173542d69509Smrg# Constants: 173642d69509Smrgrm="rm -f" 17374456fccdSmrg 173842d69509Smrg# Global variables: 173942d69509Smrgdefault_ofile=libtool 174042d69509Smrgcan_build_shared=yes 17414456fccdSmrg 174242d69509Smrg# All known linkers require a `.a' archive for static linking (except MSVC, 174342d69509Smrg# which needs '.lib'). 174442d69509Smrglibext=a 174542d69509Smrgltmain="$ac_aux_dir/ltmain.sh" 174642d69509Smrgofile="$default_ofile" 174742d69509Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 17484456fccdSmrg 174942d69509SmrgAC_CHECK_TOOL(AR, ar, false) 175042d69509SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 175142d69509SmrgAC_CHECK_TOOL(STRIP, strip, :) 17524456fccdSmrg 175342d69509Smrgold_CC="$CC" 175442d69509Smrgold_CFLAGS="$CFLAGS" 17554456fccdSmrg 175642d69509Smrg# Set sane defaults for various variables 175742d69509Smrgtest -z "$AR" && AR=ar 175842d69509Smrgtest -z "$AR_FLAGS" && AR_FLAGS=cru 175942d69509Smrgtest -z "$AS" && AS=as 176042d69509Smrgtest -z "$CC" && CC=cc 176142d69509Smrgtest -z "$LTCC" && LTCC=$CC 176242d69509Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 176342d69509Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 176442d69509Smrgtest -z "$LD" && LD=ld 176542d69509Smrgtest -z "$LN_S" && LN_S="ln -s" 176642d69509Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 176742d69509Smrgtest -z "$NM" && NM=nm 176842d69509Smrgtest -z "$SED" && SED=sed 176942d69509Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 177042d69509Smrgtest -z "$RANLIB" && RANLIB=: 177142d69509Smrgtest -z "$STRIP" && STRIP=: 177242d69509Smrgtest -z "$ac_objext" && ac_objext=o 17734456fccdSmrg 177442d69509Smrg# Determine commands to create old-style static archives. 177542d69509Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 177642d69509Smrgold_postinstall_cmds='chmod 644 $oldlib' 177742d69509Smrgold_postuninstall_cmds= 17784456fccdSmrg 177942d69509Smrgif test -n "$RANLIB"; then 178042d69509Smrg case $host_os in 178142d69509Smrg openbsd*) 178242d69509Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 178342d69509Smrg ;; 178442d69509Smrg *) 178542d69509Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 178642d69509Smrg ;; 178742d69509Smrg esac 178842d69509Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 178942d69509Smrgfi 17904456fccdSmrg 179142d69509Smrg_LT_CC_BASENAME([$compiler]) 17924456fccdSmrg 179342d69509Smrg# Only perform the check for file, if the check method requires it 179442d69509Smrgcase $deplibs_check_method in 179542d69509Smrgfile_magic*) 179642d69509Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 179742d69509Smrg AC_PATH_MAGIC 17984456fccdSmrg fi 179942d69509Smrg ;; 180042d69509Smrgesac 18014456fccdSmrg 180242d69509Smrg_LT_REQUIRED_DARWIN_CHECKS 18034456fccdSmrg 180442d69509SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) 180542d69509SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 180642d69509Smrgenable_win32_dll=yes, enable_win32_dll=no) 18074456fccdSmrg 180842d69509SmrgAC_ARG_ENABLE([libtool-lock], 180942d69509Smrg [AC_HELP_STRING([--disable-libtool-lock], 181042d69509Smrg [avoid locking (might break parallel builds)])]) 181142d69509Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 18124456fccdSmrg 181342d69509SmrgAC_ARG_WITH([pic], 181442d69509Smrg [AC_HELP_STRING([--with-pic], 181542d69509Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 181642d69509Smrg [pic_mode="$withval"], 181742d69509Smrg [pic_mode=default]) 181842d69509Smrgtest -z "$pic_mode" && pic_mode=default 18194456fccdSmrg 182042d69509Smrg# Use C for the default configuration in the libtool script 182142d69509Smrgtagname= 182242d69509SmrgAC_LIBTOOL_LANG_C_CONFIG 182342d69509Smrg_LT_AC_TAGCONFIG 182442d69509Smrg])# AC_LIBTOOL_SETUP 18254456fccdSmrg 18264456fccdSmrg 182742d69509Smrg# _LT_AC_SYS_COMPILER 182842d69509Smrg# ------------------- 182942d69509SmrgAC_DEFUN([_LT_AC_SYS_COMPILER], 183042d69509Smrg[AC_REQUIRE([AC_PROG_CC])dnl 18314456fccdSmrg 183242d69509Smrg# If no C compiler was specified, use CC. 183342d69509SmrgLTCC=${LTCC-"$CC"} 18344456fccdSmrg 183542d69509Smrg# If no C compiler flags were specified, use CFLAGS. 183642d69509SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 18374456fccdSmrg 183842d69509Smrg# Allow CC to be a program name with arguments. 183942d69509Smrgcompiler=$CC 184042d69509Smrg])# _LT_AC_SYS_COMPILER 18414456fccdSmrg 18424456fccdSmrg 184342d69509Smrg# _LT_CC_BASENAME(CC) 184442d69509Smrg# ------------------- 184542d69509Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 184642d69509SmrgAC_DEFUN([_LT_CC_BASENAME], 184742d69509Smrg[for cc_temp in $1""; do 184842d69509Smrg case $cc_temp in 184942d69509Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 185042d69509Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 185142d69509Smrg \-*) ;; 185242d69509Smrg *) break;; 185342d69509Smrg esac 185442d69509Smrgdone 185542d69509Smrgcc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` 185642d69509Smrg]) 18574456fccdSmrg 18584456fccdSmrg 185942d69509Smrg# _LT_COMPILER_BOILERPLATE 186042d69509Smrg# ------------------------ 186142d69509Smrg# Check for compiler boilerplate output or warnings with 186242d69509Smrg# the simple compiler test code. 186342d69509SmrgAC_DEFUN([_LT_COMPILER_BOILERPLATE], 186442d69509Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 186542d69509Smrgac_outfile=conftest.$ac_objext 186642d69509Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 186742d69509Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 186842d69509Smrg_lt_compiler_boilerplate=`cat conftest.err` 186942d69509Smrg$rm conftest* 187042d69509Smrg])# _LT_COMPILER_BOILERPLATE 18714456fccdSmrg 18724456fccdSmrg 187342d69509Smrg# _LT_LINKER_BOILERPLATE 187442d69509Smrg# ---------------------- 187542d69509Smrg# Check for linker boilerplate output or warnings with 187642d69509Smrg# the simple link test code. 187742d69509SmrgAC_DEFUN([_LT_LINKER_BOILERPLATE], 187842d69509Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 187942d69509Smrgac_outfile=conftest.$ac_objext 188042d69509Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 188142d69509Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 188242d69509Smrg_lt_linker_boilerplate=`cat conftest.err` 188342d69509Smrg$rm -r conftest* 188442d69509Smrg])# _LT_LINKER_BOILERPLATE 18854456fccdSmrg 188642d69509Smrg# _LT_REQUIRED_DARWIN_CHECKS 18874456fccdSmrg# -------------------------- 188842d69509Smrg# Check for some things on darwin 188942d69509SmrgAC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[ 189042d69509Smrg case $host_os in 189142d69509Smrg rhapsody* | darwin*) 189242d69509Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 189342d69509Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 189442d69509Smrg 189542d69509Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 189642d69509Smrg [lt_cv_apple_cc_single_mod=no 189742d69509Smrg if test -z "${LT_MULTI_MODULE}"; then 189842d69509Smrg # By default we will add the -single_module flag. You can override 189942d69509Smrg # by either setting the environment variable LT_MULTI_MODULE 190042d69509Smrg # non-empty at configure time, or by adding -multi_module to the 190142d69509Smrg # link flags. 190242d69509Smrg echo "int foo(void){return 1;}" > conftest.c 190342d69509Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 190442d69509Smrg -dynamiclib ${wl}-single_module conftest.c 190542d69509Smrg if test -f libconftest.dylib; then 190642d69509Smrg lt_cv_apple_cc_single_mod=yes 190742d69509Smrg rm -rf libconftest.dylib* 190842d69509Smrg fi 190942d69509Smrg rm conftest.c 191042d69509Smrg fi]) 191142d69509Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 191242d69509Smrg [lt_cv_ld_exported_symbols_list], 191342d69509Smrg [lt_cv_ld_exported_symbols_list=no 191442d69509Smrg save_LDFLAGS=$LDFLAGS 191542d69509Smrg echo "_main" > conftest.sym 191642d69509Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 191742d69509Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 191842d69509Smrg [lt_cv_ld_exported_symbols_list=yes], 191942d69509Smrg [lt_cv_ld_exported_symbols_list=no]) 192042d69509Smrg LDFLAGS="$save_LDFLAGS" 192142d69509Smrg ]) 192242d69509Smrg case $host_os in 192342d69509Smrg rhapsody* | darwin1.[[0123]]) 192442d69509Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 192542d69509Smrg darwin1.*) 192642d69509Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 192742d69509Smrg darwin*) 192842d69509Smrg # if running on 10.5 or later, the deployment target defaults 192942d69509Smrg # to the OS version, if on x86, and 10.4, the deployment 193042d69509Smrg # target defaults to 10.4. Don't you love it? 193142d69509Smrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 193242d69509Smrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 193342d69509Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 193442d69509Smrg 10.[[012]]*) 193542d69509Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 193642d69509Smrg 10.*) 193742d69509Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 193842d69509Smrg esac 193942d69509Smrg ;; 194042d69509Smrg esac 194142d69509Smrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 194242d69509Smrg _lt_dar_single_mod='$single_module' 194342d69509Smrg fi 194442d69509Smrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 194542d69509Smrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 194642d69509Smrg else 194742d69509Smrg _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}" 194842d69509Smrg fi 194942d69509Smrg if test "$DSYMUTIL" != ":"; then 195042d69509Smrg _lt_dsymutil="~$DSYMUTIL \$lib || :" 195142d69509Smrg else 195242d69509Smrg _lt_dsymutil= 195342d69509Smrg fi 195442d69509Smrg ;; 195542d69509Smrg esac 195642d69509Smrg]) 195742d69509Smrg 195842d69509Smrg# _LT_AC_SYS_LIBPATH_AIX 195942d69509Smrg# ---------------------- 196042d69509Smrg# Links a minimal program and checks the executable 196142d69509Smrg# for the system default hardcoded library path. In most cases, 196242d69509Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 196342d69509Smrg# the location of the communication and MPI libs are included too. 196442d69509Smrg# If we don't find anything, use the default library path according 196542d69509Smrg# to the aix ld manual. 196642d69509SmrgAC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], 196742d69509Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 196842d69509SmrgAC_LINK_IFELSE(AC_LANG_PROGRAM,[ 196942d69509Smrglt_aix_libpath_sed=' 197042d69509Smrg /Import File Strings/,/^$/ { 197142d69509Smrg /^0/ { 197242d69509Smrg s/^0 *\(.*\)$/\1/ 197342d69509Smrg p 197442d69509Smrg } 197542d69509Smrg }' 197642d69509Smrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 197742d69509Smrg# Check for a 64-bit object if we didn't find anything. 197842d69509Smrgif test -z "$aix_libpath"; then 197942d69509Smrg aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 198042d69509Smrgfi],[]) 198142d69509Smrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 198242d69509Smrg])# _LT_AC_SYS_LIBPATH_AIX 19834456fccdSmrg 19844456fccdSmrg 198542d69509Smrg# _LT_AC_SHELL_INIT(ARG) 198642d69509Smrg# ---------------------- 198742d69509SmrgAC_DEFUN([_LT_AC_SHELL_INIT], 198842d69509Smrg[ifdef([AC_DIVERSION_NOTICE], 198942d69509Smrg [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], 199042d69509Smrg [AC_DIVERT_PUSH(NOTICE)]) 199142d69509Smrg$1 199242d69509SmrgAC_DIVERT_POP 199342d69509Smrg])# _LT_AC_SHELL_INIT 19944456fccdSmrg 19954456fccdSmrg 199642d69509Smrg# _LT_AC_PROG_ECHO_BACKSLASH 199742d69509Smrg# -------------------------- 199842d69509Smrg# Add some code to the start of the generated configure script which 199942d69509Smrg# will find an echo command which doesn't interpret backslashes. 200042d69509SmrgAC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], 200142d69509Smrg[_LT_AC_SHELL_INIT([ 200242d69509Smrg# Check that we are running under the correct shell. 200342d69509SmrgSHELL=${CONFIG_SHELL-/bin/sh} 200442d69509Smrg 200542d69509Smrgcase X$ECHO in 200642d69509SmrgX*--fallback-echo) 200742d69509Smrg # Remove one level of quotation (which was required for Make). 200842d69509Smrg ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` 20094456fccdSmrg ;; 201042d69509Smrgesac 20114456fccdSmrg 201242d69509Smrgecho=${ECHO-echo} 201342d69509Smrgif test "X[$]1" = X--no-reexec; then 201442d69509Smrg # Discard the --no-reexec flag, and continue. 201542d69509Smrg shift 201642d69509Smrgelif test "X[$]1" = X--fallback-echo; then 201742d69509Smrg # Avoid inline document here, it may be left over 201842d69509Smrg : 201942d69509Smrgelif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then 202042d69509Smrg # Yippee, $echo works! 202142d69509Smrg : 202242d69509Smrgelse 202342d69509Smrg # Restart under the correct shell. 202442d69509Smrg exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} 202542d69509Smrgfi 20264456fccdSmrg 202742d69509Smrgif test "X[$]1" = X--fallback-echo; then 202842d69509Smrg # used as fallback echo 202942d69509Smrg shift 203042d69509Smrg cat <<EOF 203142d69509Smrg[$]* 20324456fccdSmrgEOF 203342d69509Smrg exit 0 20344456fccdSmrgfi 20354456fccdSmrg 203642d69509Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 203742d69509Smrg# if CDPATH is set. 203842d69509Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 20394456fccdSmrg 204042d69509Smrgif test -z "$ECHO"; then 204142d69509Smrgif test "X${echo_test_string+set}" != Xset; then 204242d69509Smrg# find a string as large as possible, as long as the shell can cope with it 204342d69509Smrg for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do 204442d69509Smrg # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... 204542d69509Smrg if (echo_test_string=`eval $cmd`) 2>/dev/null && 204642d69509Smrg echo_test_string=`eval $cmd` && 204742d69509Smrg (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null 204842d69509Smrg then 204942d69509Smrg break 205042d69509Smrg fi 205142d69509Smrg done 20524456fccdSmrgfi 20534456fccdSmrg 205442d69509Smrgif test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 205542d69509Smrg echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 205642d69509Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 205742d69509Smrg : 205842d69509Smrgelse 205942d69509Smrg # The Solaris, AIX, and Digital Unix default echo programs unquote 206042d69509Smrg # backslashes. This makes it impossible to quote backslashes using 206142d69509Smrg # echo "$something" | sed 's/\\/\\\\/g' 206242d69509Smrg # 206342d69509Smrg # So, first we look for a working echo in the user's PATH. 20644456fccdSmrg 20654456fccdSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 206642d69509Smrg for dir in $PATH /usr/ucb; do 20674456fccdSmrg IFS="$lt_save_ifs" 206842d69509Smrg if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && 206942d69509Smrg test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && 207042d69509Smrg echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && 207142d69509Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 207242d69509Smrg echo="$dir/echo" 207342d69509Smrg break 20744456fccdSmrg fi 20754456fccdSmrg done 20764456fccdSmrg IFS="$lt_save_ifs" 20774456fccdSmrg 207842d69509Smrg if test "X$echo" = Xecho; then 207942d69509Smrg # We didn't find a better echo, so look for alternatives. 208042d69509Smrg if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && 208142d69509Smrg echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && 208242d69509Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 208342d69509Smrg # This shell has a builtin print -r that does the trick. 208442d69509Smrg echo='print -r' 208542d69509Smrg elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && 208642d69509Smrg test "X$CONFIG_SHELL" != X/bin/ksh; then 208742d69509Smrg # If we have ksh, try running configure again with it. 208842d69509Smrg ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} 208942d69509Smrg export ORIGINAL_CONFIG_SHELL 209042d69509Smrg CONFIG_SHELL=/bin/ksh 209142d69509Smrg export CONFIG_SHELL 209242d69509Smrg exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} 20934456fccdSmrg else 209442d69509Smrg # Try using printf. 209542d69509Smrg echo='printf %s\n' 209642d69509Smrg if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && 209742d69509Smrg echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && 209842d69509Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 209942d69509Smrg # Cool, printf works 210042d69509Smrg : 210142d69509Smrg elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 210242d69509Smrg test "X$echo_testing_string" = 'X\t' && 210342d69509Smrg echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 210442d69509Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 210542d69509Smrg CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL 210642d69509Smrg export CONFIG_SHELL 210742d69509Smrg SHELL="$CONFIG_SHELL" 210842d69509Smrg export SHELL 210942d69509Smrg echo="$CONFIG_SHELL [$]0 --fallback-echo" 211042d69509Smrg elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 211142d69509Smrg test "X$echo_testing_string" = 'X\t' && 211242d69509Smrg echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 211342d69509Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 211442d69509Smrg echo="$CONFIG_SHELL [$]0 --fallback-echo" 211542d69509Smrg else 211642d69509Smrg # maybe with a smaller string... 211742d69509Smrg prev=: 21184456fccdSmrg 211942d69509Smrg for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do 212042d69509Smrg if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null 212142d69509Smrg then 212242d69509Smrg break 212342d69509Smrg fi 212442d69509Smrg prev="$cmd" 212542d69509Smrg done 21264456fccdSmrg 212742d69509Smrg if test "$prev" != 'sed 50q "[$]0"'; then 212842d69509Smrg echo_test_string=`eval $prev` 212942d69509Smrg export echo_test_string 213042d69509Smrg exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} 213142d69509Smrg else 213242d69509Smrg # Oops. We lost completely, so just stick with echo. 213342d69509Smrg echo=echo 213442d69509Smrg fi 213542d69509Smrg fi 213642d69509Smrg fi 213742d69509Smrg fi 213842d69509Smrgfi 213942d69509Smrgfi 21404456fccdSmrg 214142d69509Smrg# Copy echo and quote the copy suitably for passing to libtool from 214242d69509Smrg# the Makefile, instead of quoting the original, which is used later. 214342d69509SmrgECHO=$echo 214442d69509Smrgif test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then 214542d69509Smrg ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" 214642d69509Smrgfi 21474456fccdSmrg 214842d69509SmrgAC_SUBST(ECHO) 214942d69509Smrg])])# _LT_AC_PROG_ECHO_BACKSLASH 21504456fccdSmrg 21514456fccdSmrg 215242d69509Smrg# _LT_AC_LOCK 215342d69509Smrg# ----------- 215442d69509SmrgAC_DEFUN([_LT_AC_LOCK], 215542d69509Smrg[AC_ARG_ENABLE([libtool-lock], 215642d69509Smrg [AC_HELP_STRING([--disable-libtool-lock], 215742d69509Smrg [avoid locking (might break parallel builds)])]) 215842d69509Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 21594456fccdSmrg 216042d69509Smrg# Some flags need to be propagated to the compiler or linker for good 216142d69509Smrg# libtool support. 216242d69509Smrgcase $host in 216342d69509Smrgia64-*-hpux*) 216442d69509Smrg # Find out which ABI we are using. 216542d69509Smrg echo 'int i;' > conftest.$ac_ext 216642d69509Smrg if AC_TRY_EVAL(ac_compile); then 216742d69509Smrg case `/usr/bin/file conftest.$ac_objext` in 216842d69509Smrg *ELF-32*) 216942d69509Smrg HPUX_IA64_MODE="32" 217042d69509Smrg ;; 217142d69509Smrg *ELF-64*) 217242d69509Smrg HPUX_IA64_MODE="64" 217342d69509Smrg ;; 217442d69509Smrg esac 217542d69509Smrg fi 217642d69509Smrg rm -rf conftest* 21774456fccdSmrg ;; 217842d69509Smrg*-*-irix6*) 217942d69509Smrg # Find out which ABI we are using. 218042d69509Smrg echo '[#]line __oline__ "configure"' > conftest.$ac_ext 218142d69509Smrg if AC_TRY_EVAL(ac_compile); then 218242d69509Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 218342d69509Smrg case `/usr/bin/file conftest.$ac_objext` in 218442d69509Smrg *32-bit*) 218542d69509Smrg LD="${LD-ld} -melf32bsmip" 218642d69509Smrg ;; 218742d69509Smrg *N32*) 218842d69509Smrg LD="${LD-ld} -melf32bmipn32" 218942d69509Smrg ;; 219042d69509Smrg *64-bit*) 219142d69509Smrg LD="${LD-ld} -melf64bmip" 219242d69509Smrg ;; 219342d69509Smrg esac 219442d69509Smrg else 219542d69509Smrg case `/usr/bin/file conftest.$ac_objext` in 219642d69509Smrg *32-bit*) 219742d69509Smrg LD="${LD-ld} -32" 219842d69509Smrg ;; 219942d69509Smrg *N32*) 220042d69509Smrg LD="${LD-ld} -n32" 220142d69509Smrg ;; 220242d69509Smrg *64-bit*) 220342d69509Smrg LD="${LD-ld} -64" 220442d69509Smrg ;; 220542d69509Smrg esac 220642d69509Smrg fi 220742d69509Smrg fi 220842d69509Smrg rm -rf conftest* 22094456fccdSmrg ;; 22104456fccdSmrg 221142d69509Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 221242d69509Smrgs390*-*linux*|sparc*-*linux*) 221342d69509Smrg # Find out which ABI we are using. 221442d69509Smrg echo 'int i;' > conftest.$ac_ext 221542d69509Smrg if AC_TRY_EVAL(ac_compile); then 221642d69509Smrg case `/usr/bin/file conftest.o` in 221742d69509Smrg *32-bit*) 221842d69509Smrg case $host in 221942d69509Smrg x86_64-*kfreebsd*-gnu) 222042d69509Smrg LD="${LD-ld} -m elf_i386_fbsd" 222142d69509Smrg ;; 222242d69509Smrg x86_64-*linux*) 222342d69509Smrg LD="${LD-ld} -m elf_i386" 222442d69509Smrg ;; 222542d69509Smrg ppc64-*linux*|powerpc64-*linux*) 222642d69509Smrg LD="${LD-ld} -m elf32ppclinux" 222742d69509Smrg ;; 222842d69509Smrg s390x-*linux*) 222942d69509Smrg LD="${LD-ld} -m elf_s390" 223042d69509Smrg ;; 223142d69509Smrg sparc64-*linux*) 223242d69509Smrg LD="${LD-ld} -m elf32_sparc" 223342d69509Smrg ;; 223442d69509Smrg esac 223542d69509Smrg ;; 223642d69509Smrg *64-bit*) 223742d69509Smrg case $host in 223842d69509Smrg x86_64-*kfreebsd*-gnu) 223942d69509Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 224042d69509Smrg ;; 224142d69509Smrg x86_64-*linux*) 224242d69509Smrg LD="${LD-ld} -m elf_x86_64" 224342d69509Smrg ;; 224442d69509Smrg ppc*-*linux*|powerpc*-*linux*) 224542d69509Smrg LD="${LD-ld} -m elf64ppc" 224642d69509Smrg ;; 224742d69509Smrg s390*-*linux*) 224842d69509Smrg LD="${LD-ld} -m elf64_s390" 224942d69509Smrg ;; 225042d69509Smrg sparc*-*linux*) 225142d69509Smrg LD="${LD-ld} -m elf64_sparc" 225242d69509Smrg ;; 225342d69509Smrg esac 22544456fccdSmrg ;; 22554456fccdSmrg esac 22564456fccdSmrg fi 225742d69509Smrg rm -rf conftest* 22584456fccdSmrg ;; 22594456fccdSmrg 226042d69509Smrg*-*-sco3.2v5*) 226142d69509Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 226242d69509Smrg SAVE_CFLAGS="$CFLAGS" 226342d69509Smrg CFLAGS="$CFLAGS -belf" 226442d69509Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 226542d69509Smrg [AC_LANG_PUSH(C) 226642d69509Smrg AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 226742d69509Smrg AC_LANG_POP]) 226842d69509Smrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 226942d69509Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 227042d69509Smrg CFLAGS="$SAVE_CFLAGS" 227142d69509Smrg fi 22724456fccdSmrg ;; 227342d69509Smrgsparc*-*solaris*) 227442d69509Smrg # Find out which ABI we are using. 227542d69509Smrg echo 'int i;' > conftest.$ac_ext 227642d69509Smrg if AC_TRY_EVAL(ac_compile); then 227742d69509Smrg case `/usr/bin/file conftest.o` in 227842d69509Smrg *64-bit*) 227942d69509Smrg case $lt_cv_prog_gnu_ld in 228042d69509Smrg yes*) LD="${LD-ld} -m elf64_sparc" ;; 228142d69509Smrg *) 228242d69509Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 228342d69509Smrg LD="${LD-ld} -64" 228442d69509Smrg fi 228542d69509Smrg ;; 228642d69509Smrg esac 228742d69509Smrg ;; 228842d69509Smrg esac 228942d69509Smrg fi 229042d69509Smrg rm -rf conftest* 22914456fccdSmrg ;; 22924456fccdSmrg 229342d69509SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], 229442d69509Smrg[*-*-cygwin* | *-*-mingw* | *-*-pw32*) 229542d69509Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 229642d69509Smrg AC_CHECK_TOOL(AS, as, false) 229742d69509Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 22984456fccdSmrg ;; 229942d69509Smrg ]) 230042d69509Smrgesac 23014456fccdSmrg 230242d69509Smrgneed_locks="$enable_libtool_lock" 23034456fccdSmrg 230442d69509Smrg])# _LT_AC_LOCK 23054456fccdSmrg 23064456fccdSmrg 230742d69509Smrg# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 230842d69509Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 230942d69509Smrg# ---------------------------------------------------------------- 231042d69509Smrg# Check whether the given compiler option works 231142d69509SmrgAC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], 231242d69509Smrg[AC_REQUIRE([LT_AC_PROG_SED]) 231342d69509SmrgAC_CACHE_CHECK([$1], [$2], 231442d69509Smrg [$2=no 231542d69509Smrg ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 231642d69509Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 231742d69509Smrg lt_compiler_flag="$3" 231842d69509Smrg # Insert the option either (1) after the last *FLAGS variable, or 231942d69509Smrg # (2) before a word containing "conftest.", or (3) at the end. 232042d69509Smrg # Note that $ac_compile itself does not contain backslashes and begins 232142d69509Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 232242d69509Smrg # The option is referenced via a variable to avoid confusing sed. 232342d69509Smrg lt_compile=`echo "$ac_compile" | $SED \ 232442d69509Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 232542d69509Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 232642d69509Smrg -e 's:$: $lt_compiler_flag:'` 232742d69509Smrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 232842d69509Smrg (eval "$lt_compile" 2>conftest.err) 232942d69509Smrg ac_status=$? 233042d69509Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 233142d69509Smrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 233242d69509Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 233342d69509Smrg # The compiler can only warn and ignore the option if not recognized 233442d69509Smrg # So say no if there are warnings other than the usual output. 233542d69509Smrg $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp 233642d69509Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 233742d69509Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 233842d69509Smrg $2=yes 233942d69509Smrg fi 234042d69509Smrg fi 234142d69509Smrg $rm conftest* 234242d69509Smrg]) 23434456fccdSmrg 234442d69509Smrgif test x"[$]$2" = xyes; then 234542d69509Smrg ifelse([$5], , :, [$5]) 234642d69509Smrgelse 234742d69509Smrg ifelse([$6], , :, [$6]) 234842d69509Smrgfi 234942d69509Smrg])# AC_LIBTOOL_COMPILER_OPTION 23504456fccdSmrg 23514456fccdSmrg 235242d69509Smrg# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 235342d69509Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 235442d69509Smrg# ------------------------------------------------------------ 235542d69509Smrg# Check whether the given compiler option works 235642d69509SmrgAC_DEFUN([AC_LIBTOOL_LINKER_OPTION], 235742d69509Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 235842d69509SmrgAC_CACHE_CHECK([$1], [$2], 235942d69509Smrg [$2=no 236042d69509Smrg save_LDFLAGS="$LDFLAGS" 236142d69509Smrg LDFLAGS="$LDFLAGS $3" 236242d69509Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 236342d69509Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 236442d69509Smrg # The linker can only warn and ignore the option if not recognized 236542d69509Smrg # So say no if there are warnings 236642d69509Smrg if test -s conftest.err; then 236742d69509Smrg # Append any errors to the config.log. 236842d69509Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 236942d69509Smrg $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp 237042d69509Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 237142d69509Smrg if diff conftest.exp conftest.er2 >/dev/null; then 237242d69509Smrg $2=yes 237342d69509Smrg fi 237442d69509Smrg else 237542d69509Smrg $2=yes 237642d69509Smrg fi 237742d69509Smrg fi 237842d69509Smrg $rm -r conftest* 237942d69509Smrg LDFLAGS="$save_LDFLAGS" 238042d69509Smrg]) 23814456fccdSmrg 238242d69509Smrgif test x"[$]$2" = xyes; then 238342d69509Smrg ifelse([$4], , :, [$4]) 238442d69509Smrgelse 238542d69509Smrg ifelse([$5], , :, [$5]) 238642d69509Smrgfi 238742d69509Smrg])# AC_LIBTOOL_LINKER_OPTION 23884456fccdSmrg 238942d69509Smrg 239042d69509Smrg# AC_LIBTOOL_SYS_MAX_CMD_LEN 239142d69509Smrg# -------------------------- 239242d69509SmrgAC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], 239342d69509Smrg[# find the maximum length of command line arguments 239442d69509SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 239542d69509SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 239642d69509Smrg i=0 239742d69509Smrg teststring="ABCD" 239842d69509Smrg 239942d69509Smrg case $build_os in 240042d69509Smrg msdosdjgpp*) 240142d69509Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 240242d69509Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 240342d69509Smrg # during glob expansion). Even if it were fixed, the result of this 240442d69509Smrg # check would be larger than it should be. 240542d69509Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 24064456fccdSmrg ;; 240742d69509Smrg 240842d69509Smrg gnu*) 240942d69509Smrg # Under GNU Hurd, this test is not required because there is 241042d69509Smrg # no limit to the length of command line arguments. 241142d69509Smrg # Libtool will interpret -1 as no limit whatsoever 241242d69509Smrg lt_cv_sys_max_cmd_len=-1; 24134456fccdSmrg ;; 241442d69509Smrg 241542d69509Smrg cygwin* | mingw*) 241642d69509Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 241742d69509Smrg # about 5 minutes as the teststring grows exponentially. 241842d69509Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 241942d69509Smrg # you end up with a "frozen" computer, even though with patience 242042d69509Smrg # the test eventually succeeds (with a max line length of 256k). 242142d69509Smrg # Instead, let's just punt: use the minimum linelength reported by 242242d69509Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 242342d69509Smrg lt_cv_sys_max_cmd_len=8192; 24244456fccdSmrg ;; 242542d69509Smrg 242642d69509Smrg amigaos*) 242742d69509Smrg # On AmigaOS with pdksh, this test takes hours, literally. 242842d69509Smrg # So we just punt and use a minimum line length of 8192. 242942d69509Smrg lt_cv_sys_max_cmd_len=8192; 24304456fccdSmrg ;; 243142d69509Smrg 243242d69509Smrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 243342d69509Smrg # This has been around since 386BSD, at least. Likely further. 243442d69509Smrg if test -x /sbin/sysctl; then 243542d69509Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 243642d69509Smrg elif test -x /usr/sbin/sysctl; then 243742d69509Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 243842d69509Smrg else 243942d69509Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 244042d69509Smrg fi 244142d69509Smrg # And add a safety zone 244242d69509Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 244342d69509Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 24444456fccdSmrg ;; 244542d69509Smrg 244642d69509Smrg interix*) 244742d69509Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 244842d69509Smrg lt_cv_sys_max_cmd_len=196608 24494456fccdSmrg ;; 24504456fccdSmrg 245142d69509Smrg osf*) 245242d69509Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 245342d69509Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 245442d69509Smrg # nice to cause kernel panics so lets avoid the loop below. 245542d69509Smrg # First set a reasonable default. 245642d69509Smrg lt_cv_sys_max_cmd_len=16384 245742d69509Smrg # 245842d69509Smrg if test -x /sbin/sysconfig; then 245942d69509Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 246042d69509Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 246142d69509Smrg esac 246242d69509Smrg fi 246342d69509Smrg ;; 246442d69509Smrg sco3.2v5*) 246542d69509Smrg lt_cv_sys_max_cmd_len=102400 246642d69509Smrg ;; 246742d69509Smrg sysv5* | sco5v6* | sysv4.2uw2*) 246842d69509Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 246942d69509Smrg if test -n "$kargmax"; then 247042d69509Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 247142d69509Smrg else 247242d69509Smrg lt_cv_sys_max_cmd_len=32768 247342d69509Smrg fi 247442d69509Smrg ;; 247542d69509Smrg *) 247642d69509Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 247742d69509Smrg if test -n "$lt_cv_sys_max_cmd_len"; then 247842d69509Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 247942d69509Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 248042d69509Smrg else 248142d69509Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 248242d69509Smrg while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ 248342d69509Smrg = "XX$teststring") >/dev/null 2>&1 && 248442d69509Smrg new_result=`expr "X$teststring" : ".*" 2>&1` && 248542d69509Smrg lt_cv_sys_max_cmd_len=$new_result && 248642d69509Smrg test $i != 17 # 1/2 MB should be enough 248742d69509Smrg do 248842d69509Smrg i=`expr $i + 1` 248942d69509Smrg teststring=$teststring$teststring 249042d69509Smrg done 249142d69509Smrg teststring= 249242d69509Smrg # Add a significant safety factor because C++ compilers can tack on massive 249342d69509Smrg # amounts of additional arguments before passing them to the linker. 249442d69509Smrg # It appears as though 1/2 is a usable value. 249542d69509Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 249642d69509Smrg fi 249742d69509Smrg ;; 249842d69509Smrg esac 24994456fccdSmrg]) 250042d69509Smrgif test -n $lt_cv_sys_max_cmd_len ; then 250142d69509Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 250242d69509Smrgelse 250342d69509Smrg AC_MSG_RESULT(none) 250442d69509Smrgfi 250542d69509Smrg])# AC_LIBTOOL_SYS_MAX_CMD_LEN 25064456fccdSmrg 25074456fccdSmrg 250842d69509Smrg# _LT_AC_CHECK_DLFCN 250942d69509Smrg# ------------------ 251042d69509SmrgAC_DEFUN([_LT_AC_CHECK_DLFCN], 251142d69509Smrg[AC_CHECK_HEADERS(dlfcn.h)dnl 251242d69509Smrg])# _LT_AC_CHECK_DLFCN 25134456fccdSmrg 25144456fccdSmrg 251542d69509Smrg# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 251642d69509Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 251742d69509Smrg# --------------------------------------------------------------------- 251842d69509SmrgAC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], 251942d69509Smrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 252042d69509Smrgif test "$cross_compiling" = yes; then : 252142d69509Smrg [$4] 252242d69509Smrgelse 252342d69509Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 252442d69509Smrg lt_status=$lt_dlunknown 252542d69509Smrg cat > conftest.$ac_ext <<EOF 252642d69509Smrg[#line __oline__ "configure" 252742d69509Smrg#include "confdefs.h" 25284456fccdSmrg 252942d69509Smrg#if HAVE_DLFCN_H 253042d69509Smrg#include <dlfcn.h> 253142d69509Smrg#endif 25324456fccdSmrg 253342d69509Smrg#include <stdio.h> 25344456fccdSmrg 253542d69509Smrg#ifdef RTLD_GLOBAL 253642d69509Smrg# define LT_DLGLOBAL RTLD_GLOBAL 253742d69509Smrg#else 253842d69509Smrg# ifdef DL_GLOBAL 253942d69509Smrg# define LT_DLGLOBAL DL_GLOBAL 254042d69509Smrg# else 254142d69509Smrg# define LT_DLGLOBAL 0 254242d69509Smrg# endif 254342d69509Smrg#endif 25444456fccdSmrg 254542d69509Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 254642d69509Smrg find out it does not work in some platform. */ 254742d69509Smrg#ifndef LT_DLLAZY_OR_NOW 254842d69509Smrg# ifdef RTLD_LAZY 254942d69509Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 255042d69509Smrg# else 255142d69509Smrg# ifdef DL_LAZY 255242d69509Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 255342d69509Smrg# else 255442d69509Smrg# ifdef RTLD_NOW 255542d69509Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 255642d69509Smrg# else 255742d69509Smrg# ifdef DL_NOW 255842d69509Smrg# define LT_DLLAZY_OR_NOW DL_NOW 255942d69509Smrg# else 256042d69509Smrg# define LT_DLLAZY_OR_NOW 0 256142d69509Smrg# endif 256242d69509Smrg# endif 256342d69509Smrg# endif 256442d69509Smrg# endif 256542d69509Smrg#endif 25664456fccdSmrg 256742d69509Smrg#ifdef __cplusplus 256842d69509Smrgextern "C" void exit (int); 256942d69509Smrg#endif 25704456fccdSmrg 257142d69509Smrgvoid fnord() { int i=42;} 257242d69509Smrgint main () 257342d69509Smrg{ 257442d69509Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 257542d69509Smrg int status = $lt_dlunknown; 25764456fccdSmrg 257742d69509Smrg if (self) 257842d69509Smrg { 257942d69509Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 258042d69509Smrg else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 258142d69509Smrg /* dlclose (self); */ 258242d69509Smrg } 258342d69509Smrg else 258442d69509Smrg puts (dlerror ()); 25854456fccdSmrg 258642d69509Smrg exit (status); 258742d69509Smrg}] 258842d69509SmrgEOF 258942d69509Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 259042d69509Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 259142d69509Smrg lt_status=$? 259242d69509Smrg case x$lt_status in 259342d69509Smrg x$lt_dlno_uscore) $1 ;; 259442d69509Smrg x$lt_dlneed_uscore) $2 ;; 259542d69509Smrg x$lt_dlunknown|x*) $3 ;; 259642d69509Smrg esac 259742d69509Smrg else : 259842d69509Smrg # compilation failed 259942d69509Smrg $3 260042d69509Smrg fi 26014456fccdSmrgfi 260242d69509Smrgrm -fr conftest* 260342d69509Smrg])# _LT_AC_TRY_DLOPEN_SELF 26044456fccdSmrg 26054456fccdSmrg 260642d69509Smrg# AC_LIBTOOL_DLOPEN_SELF 260742d69509Smrg# ---------------------- 260842d69509SmrgAC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], 260942d69509Smrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl 261042d69509Smrgif test "x$enable_dlopen" != xyes; then 261142d69509Smrg enable_dlopen=unknown 261242d69509Smrg enable_dlopen_self=unknown 261342d69509Smrg enable_dlopen_self_static=unknown 261442d69509Smrgelse 261542d69509Smrg lt_cv_dlopen=no 261642d69509Smrg lt_cv_dlopen_libs= 26174456fccdSmrg 261842d69509Smrg case $host_os in 261942d69509Smrg beos*) 262042d69509Smrg lt_cv_dlopen="load_add_on" 262142d69509Smrg lt_cv_dlopen_libs= 262242d69509Smrg lt_cv_dlopen_self=yes 262342d69509Smrg ;; 26244456fccdSmrg 262542d69509Smrg mingw* | pw32*) 262642d69509Smrg lt_cv_dlopen="LoadLibrary" 262742d69509Smrg lt_cv_dlopen_libs= 262842d69509Smrg ;; 26294456fccdSmrg 263042d69509Smrg cygwin*) 263142d69509Smrg lt_cv_dlopen="dlopen" 263242d69509Smrg lt_cv_dlopen_libs= 263342d69509Smrg ;; 26344456fccdSmrg 263542d69509Smrg darwin*) 263642d69509Smrg # if libdl is installed we need to link against it 263742d69509Smrg AC_CHECK_LIB([dl], [dlopen], 263842d69509Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 263942d69509Smrg lt_cv_dlopen="dyld" 264042d69509Smrg lt_cv_dlopen_libs= 264142d69509Smrg lt_cv_dlopen_self=yes 264242d69509Smrg ]) 264342d69509Smrg ;; 26444456fccdSmrg 264542d69509Smrg *) 264642d69509Smrg AC_CHECK_FUNC([shl_load], 264742d69509Smrg [lt_cv_dlopen="shl_load"], 264842d69509Smrg [AC_CHECK_LIB([dld], [shl_load], 264942d69509Smrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 265042d69509Smrg [AC_CHECK_FUNC([dlopen], 265142d69509Smrg [lt_cv_dlopen="dlopen"], 265242d69509Smrg [AC_CHECK_LIB([dl], [dlopen], 265342d69509Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 265442d69509Smrg [AC_CHECK_LIB([svld], [dlopen], 265542d69509Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 265642d69509Smrg [AC_CHECK_LIB([dld], [dld_link], 265742d69509Smrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 265842d69509Smrg ]) 265942d69509Smrg ]) 266042d69509Smrg ]) 266142d69509Smrg ]) 266242d69509Smrg ]) 266342d69509Smrg ;; 266442d69509Smrg esac 26654456fccdSmrg 266642d69509Smrg if test "x$lt_cv_dlopen" != xno; then 266742d69509Smrg enable_dlopen=yes 266842d69509Smrg else 266942d69509Smrg enable_dlopen=no 267042d69509Smrg fi 26714456fccdSmrg 267242d69509Smrg case $lt_cv_dlopen in 267342d69509Smrg dlopen) 267442d69509Smrg save_CPPFLAGS="$CPPFLAGS" 267542d69509Smrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 26764456fccdSmrg 267742d69509Smrg save_LDFLAGS="$LDFLAGS" 267842d69509Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 26794456fccdSmrg 268042d69509Smrg save_LIBS="$LIBS" 268142d69509Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 26824456fccdSmrg 268342d69509Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 268442d69509Smrg lt_cv_dlopen_self, [dnl 268542d69509Smrg _LT_AC_TRY_DLOPEN_SELF( 268642d69509Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 268742d69509Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 268842d69509Smrg ]) 26894456fccdSmrg 269042d69509Smrg if test "x$lt_cv_dlopen_self" = xyes; then 269142d69509Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 269242d69509Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 269342d69509Smrg lt_cv_dlopen_self_static, [dnl 269442d69509Smrg _LT_AC_TRY_DLOPEN_SELF( 269542d69509Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 269642d69509Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 269742d69509Smrg ]) 269842d69509Smrg fi 26994456fccdSmrg 270042d69509Smrg CPPFLAGS="$save_CPPFLAGS" 270142d69509Smrg LDFLAGS="$save_LDFLAGS" 270242d69509Smrg LIBS="$save_LIBS" 270342d69509Smrg ;; 270442d69509Smrg esac 27054456fccdSmrg 270642d69509Smrg case $lt_cv_dlopen_self in 270742d69509Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 270842d69509Smrg *) enable_dlopen_self=unknown ;; 270942d69509Smrg esac 27104456fccdSmrg 271142d69509Smrg case $lt_cv_dlopen_self_static in 271242d69509Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 271342d69509Smrg *) enable_dlopen_self_static=unknown ;; 271442d69509Smrg esac 271542d69509Smrgfi 271642d69509Smrg])# AC_LIBTOOL_DLOPEN_SELF 27174456fccdSmrg 27184456fccdSmrg 271942d69509Smrg# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) 272042d69509Smrg# --------------------------------- 272142d69509Smrg# Check to see if options -c and -o are simultaneously supported by compiler 272242d69509SmrgAC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], 272342d69509Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 272442d69509SmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 272542d69509SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 272642d69509Smrg [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 272742d69509Smrg [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 272842d69509Smrg $rm -r conftest 2>/dev/null 272942d69509Smrg mkdir conftest 273042d69509Smrg cd conftest 273142d69509Smrg mkdir out 273242d69509Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 27334456fccdSmrg 273442d69509Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 273542d69509Smrg # Insert the option either (1) after the last *FLAGS variable, or 273642d69509Smrg # (2) before a word containing "conftest.", or (3) at the end. 273742d69509Smrg # Note that $ac_compile itself does not contain backslashes and begins 273842d69509Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 273942d69509Smrg lt_compile=`echo "$ac_compile" | $SED \ 274042d69509Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 274142d69509Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 274242d69509Smrg -e 's:$: $lt_compiler_flag:'` 274342d69509Smrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 274442d69509Smrg (eval "$lt_compile" 2>out/conftest.err) 274542d69509Smrg ac_status=$? 274642d69509Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 274742d69509Smrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 274842d69509Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 274942d69509Smrg then 275042d69509Smrg # The compiler can only warn and ignore the option if not recognized 275142d69509Smrg # So say no if there are warnings 275242d69509Smrg $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp 275342d69509Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 275442d69509Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 275542d69509Smrg _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 275642d69509Smrg fi 275742d69509Smrg fi 275842d69509Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 275942d69509Smrg $rm conftest* 276042d69509Smrg # SGI C++ compiler will create directory out/ii_files/ for 276142d69509Smrg # template instantiation 276242d69509Smrg test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files 276342d69509Smrg $rm out/* && rmdir out 276442d69509Smrg cd .. 276542d69509Smrg rmdir conftest 276642d69509Smrg $rm conftest* 276742d69509Smrg]) 276842d69509Smrg])# AC_LIBTOOL_PROG_CC_C_O 27694456fccdSmrg 27704456fccdSmrg 277142d69509Smrg# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) 277242d69509Smrg# ----------------------------------------- 277342d69509Smrg# Check to see if we can do hard links to lock some files if needed 277442d69509SmrgAC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], 277542d69509Smrg[AC_REQUIRE([_LT_AC_LOCK])dnl 27764456fccdSmrg 277742d69509Smrghard_links="nottested" 277842d69509Smrgif test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 277942d69509Smrg # do not overwrite the value of need_locks provided by the user 278042d69509Smrg AC_MSG_CHECKING([if we can lock with hard links]) 278142d69509Smrg hard_links=yes 278242d69509Smrg $rm conftest* 278342d69509Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 278442d69509Smrg touch conftest.a 278542d69509Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 278642d69509Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 278742d69509Smrg AC_MSG_RESULT([$hard_links]) 278842d69509Smrg if test "$hard_links" = no; then 278942d69509Smrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 279042d69509Smrg need_locks=warn 279142d69509Smrg fi 279242d69509Smrgelse 279342d69509Smrg need_locks=no 279442d69509Smrgfi 279542d69509Smrg])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS 27964456fccdSmrg 27974456fccdSmrg 279842d69509Smrg# AC_LIBTOOL_OBJDIR 279942d69509Smrg# ----------------- 280042d69509SmrgAC_DEFUN([AC_LIBTOOL_OBJDIR], 280142d69509Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 280242d69509Smrg[rm -f .libs 2>/dev/null 280342d69509Smrgmkdir .libs 2>/dev/null 280442d69509Smrgif test -d .libs; then 280542d69509Smrg lt_cv_objdir=.libs 280642d69509Smrgelse 280742d69509Smrg # MS-DOS does not allow filenames that begin with a dot. 280842d69509Smrg lt_cv_objdir=_libs 280942d69509Smrgfi 281042d69509Smrgrmdir .libs 2>/dev/null]) 281142d69509Smrgobjdir=$lt_cv_objdir 281242d69509Smrg])# AC_LIBTOOL_OBJDIR 28134456fccdSmrg 28144456fccdSmrg 281542d69509Smrg# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) 281642d69509Smrg# ---------------------------------------------- 281742d69509Smrg# Check hardcoding attributes. 281842d69509SmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], 281942d69509Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 282042d69509Smrg_LT_AC_TAGVAR(hardcode_action, $1)= 282142d69509Smrgif test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ 282242d69509Smrg test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ 282342d69509Smrg test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 28244456fccdSmrg 282542d69509Smrg # We can hardcode non-existant directories. 282642d69509Smrg if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && 282742d69509Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 282842d69509Smrg # have to relink, otherwise we might link with an installed library 282942d69509Smrg # when we should be linking with a yet-to-be-installed one 283042d69509Smrg ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && 283142d69509Smrg test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then 283242d69509Smrg # Linking always hardcodes the temporary library directory. 283342d69509Smrg _LT_AC_TAGVAR(hardcode_action, $1)=relink 283442d69509Smrg else 283542d69509Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 283642d69509Smrg _LT_AC_TAGVAR(hardcode_action, $1)=immediate 283742d69509Smrg fi 28384456fccdSmrgelse 283942d69509Smrg # We cannot hardcode anything, or else we can only hardcode existing 284042d69509Smrg # directories. 284142d69509Smrg _LT_AC_TAGVAR(hardcode_action, $1)=unsupported 28424456fccdSmrgfi 284342d69509SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) 284442d69509Smrg 284542d69509Smrgif test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then 284642d69509Smrg # Fast installation is not supported 284742d69509Smrg enable_fast_install=no 284842d69509Smrgelif test "$shlibpath_overrides_runpath" = yes || 284942d69509Smrg test "$enable_shared" = no; then 285042d69509Smrg # Fast installation is not necessary 285142d69509Smrg enable_fast_install=needless 28524456fccdSmrgfi 285342d69509Smrg])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH 28544456fccdSmrg 285542d69509Smrg 285642d69509Smrg# AC_LIBTOOL_SYS_LIB_STRIP 285742d69509Smrg# ------------------------ 285842d69509SmrgAC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], 285942d69509Smrg[striplib= 286042d69509Smrgold_striplib= 286142d69509SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 286242d69509Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then 286342d69509Smrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 286442d69509Smrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 286542d69509Smrg AC_MSG_RESULT([yes]) 28664456fccdSmrgelse 286742d69509Smrg# FIXME - insert some real tests, host_os isn't really good enough 286842d69509Smrg case $host_os in 286942d69509Smrg darwin*) 287042d69509Smrg if test -n "$STRIP" ; then 287142d69509Smrg striplib="$STRIP -x" 287242d69509Smrg old_striplib="$STRIP -S" 287342d69509Smrg AC_MSG_RESULT([yes]) 287442d69509Smrg else 287542d69509Smrg AC_MSG_RESULT([no]) 287642d69509Smrgfi 287742d69509Smrg ;; 287842d69509Smrg *) 287942d69509Smrg AC_MSG_RESULT([no]) 288042d69509Smrg ;; 288142d69509Smrg esac 28824456fccdSmrgfi 288342d69509Smrg])# AC_LIBTOOL_SYS_LIB_STRIP 28844456fccdSmrg 28854456fccdSmrg 288642d69509Smrg# AC_LIBTOOL_SYS_DYNAMIC_LINKER 288742d69509Smrg# ----------------------------- 288842d69509Smrg# PORTME Fill in your ld.so characteristics 288942d69509SmrgAC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], 289042d69509Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 289142d69509SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 289242d69509Smrglibrary_names_spec= 289342d69509Smrglibname_spec='lib$name' 289442d69509Smrgsoname_spec= 289542d69509Smrgshrext_cmds=".so" 289642d69509Smrgpostinstall_cmds= 289742d69509Smrgpostuninstall_cmds= 289842d69509Smrgfinish_cmds= 289942d69509Smrgfinish_eval= 290042d69509Smrgshlibpath_var= 290142d69509Smrgshlibpath_overrides_runpath=unknown 290242d69509Smrgversion_type=none 290342d69509Smrgdynamic_linker="$host_os ld.so" 290442d69509Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 290542d69509Smrgm4_if($1,[],[ 290642d69509Smrgif test "$GCC" = yes; then 290742d69509Smrg case $host_os in 290842d69509Smrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 290942d69509Smrg *) lt_awk_arg="/^libraries:/" ;; 291042d69509Smrg esac 291142d69509Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` 291242d69509Smrg if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then 291342d69509Smrg # if the path contains ";" then we assume it to be the separator 291442d69509Smrg # otherwise default to the standard path separator (i.e. ":") - it is 291542d69509Smrg # assumed that no part of a normal pathname contains ";" but that should 291642d69509Smrg # okay in the real world where ";" in dirpaths is itself problematic. 291742d69509Smrg lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` 291842d69509Smrg else 291942d69509Smrg lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 292042d69509Smrg fi 292142d69509Smrg # Ok, now we have the path, separated by spaces, we can step through it 292242d69509Smrg # and add multilib dir if necessary. 292342d69509Smrg lt_tmp_lt_search_path_spec= 292442d69509Smrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 292542d69509Smrg for lt_sys_path in $lt_search_path_spec; do 292642d69509Smrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 292742d69509Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 292842d69509Smrg else 292942d69509Smrg test -d "$lt_sys_path" && \ 293042d69509Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 293142d69509Smrg fi 293242d69509Smrg done 293342d69509Smrg lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' 293442d69509SmrgBEGIN {RS=" "; FS="/|\n";} { 293542d69509Smrg lt_foo=""; 293642d69509Smrg lt_count=0; 293742d69509Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 293842d69509Smrg if ($lt_i != "" && $lt_i != ".") { 293942d69509Smrg if ($lt_i == "..") { 294042d69509Smrg lt_count++; 294142d69509Smrg } else { 294242d69509Smrg if (lt_count == 0) { 294342d69509Smrg lt_foo="/" $lt_i lt_foo; 294442d69509Smrg } else { 294542d69509Smrg lt_count--; 294642d69509Smrg } 294742d69509Smrg } 294842d69509Smrg } 294942d69509Smrg } 295042d69509Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 295142d69509Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 295242d69509Smrg}'` 295342d69509Smrg sys_lib_search_path_spec=`echo $lt_search_path_spec` 295442d69509Smrgelse 295542d69509Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 295642d69509Smrgfi]) 295742d69509Smrgneed_lib_prefix=unknown 295842d69509Smrghardcode_into_libs=no 29594456fccdSmrg 296042d69509Smrg# when you set need_version to no, make sure it does not cause -set_version 296142d69509Smrg# flags to be left without arguments 296242d69509Smrgneed_version=unknown 29634456fccdSmrg 296442d69509Smrgcase $host_os in 296542d69509Smrgaix3*) 296642d69509Smrg version_type=linux 296742d69509Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 296842d69509Smrg shlibpath_var=LIBPATH 29694456fccdSmrg 297042d69509Smrg # AIX 3 has no versioning support, so we append a major version to the name. 297142d69509Smrg soname_spec='${libname}${release}${shared_ext}$major' 297242d69509Smrg ;; 29734456fccdSmrg 297442d69509Smrgaix[[4-9]]*) 297542d69509Smrg version_type=linux 297642d69509Smrg need_lib_prefix=no 297742d69509Smrg need_version=no 297842d69509Smrg hardcode_into_libs=yes 297942d69509Smrg if test "$host_cpu" = ia64; then 298042d69509Smrg # AIX 5 supports IA64 298142d69509Smrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 298242d69509Smrg shlibpath_var=LD_LIBRARY_PATH 298342d69509Smrg else 298442d69509Smrg # With GCC up to 2.95.x, collect2 would create an import file 298542d69509Smrg # for dependence libraries. The import file would start with 298642d69509Smrg # the line `#! .'. This would cause the generated library to 298742d69509Smrg # depend on `.', always an invalid library. This was fixed in 298842d69509Smrg # development snapshots of GCC prior to 3.0. 298942d69509Smrg case $host_os in 299042d69509Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 299142d69509Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 299242d69509Smrg echo ' yes ' 299342d69509Smrg echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then 299442d69509Smrg : 299542d69509Smrg else 299642d69509Smrg can_build_shared=no 299742d69509Smrg fi 299842d69509Smrg ;; 299942d69509Smrg esac 300042d69509Smrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 300142d69509Smrg # soname into executable. Probably we can add versioning support to 300242d69509Smrg # collect2, so additional links can be useful in future. 300342d69509Smrg if test "$aix_use_runtimelinking" = yes; then 300442d69509Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 300542d69509Smrg # instead of lib<name>.a to let people know that these are not 300642d69509Smrg # typical AIX shared libraries. 300742d69509Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 30084456fccdSmrg else 300942d69509Smrg # We preserve .a as extension for shared libraries through AIX4.2 301042d69509Smrg # and later when we are not doing run time linking. 301142d69509Smrg library_names_spec='${libname}${release}.a $libname.a' 301242d69509Smrg soname_spec='${libname}${release}${shared_ext}$major' 30134456fccdSmrg fi 301442d69509Smrg shlibpath_var=LIBPATH 30154456fccdSmrg fi 301642d69509Smrg ;; 30174456fccdSmrg 301842d69509Smrgamigaos*) 301942d69509Smrg library_names_spec='$libname.ixlibrary $libname.a' 302042d69509Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 302142d69509Smrg 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' 302242d69509Smrg ;; 30234456fccdSmrg 302442d69509Smrgbeos*) 302542d69509Smrg library_names_spec='${libname}${shared_ext}' 302642d69509Smrg dynamic_linker="$host_os ld.so" 302742d69509Smrg shlibpath_var=LIBRARY_PATH 302842d69509Smrg ;; 30294456fccdSmrg 303042d69509Smrgbsdi[[45]]*) 303142d69509Smrg version_type=linux 303242d69509Smrg need_version=no 303342d69509Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 303442d69509Smrg soname_spec='${libname}${release}${shared_ext}$major' 303542d69509Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 303642d69509Smrg shlibpath_var=LD_LIBRARY_PATH 303742d69509Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 303842d69509Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 303942d69509Smrg # the default ld.so.conf also contains /usr/contrib/lib and 304042d69509Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 304142d69509Smrg # libtool to hard-code these into programs 304242d69509Smrg ;; 30434456fccdSmrg 304442d69509Smrgcygwin* | mingw* | pw32*) 304542d69509Smrg version_type=windows 304642d69509Smrg shrext_cmds=".dll" 304742d69509Smrg need_version=no 304842d69509Smrg need_lib_prefix=no 30494456fccdSmrg 305042d69509Smrg case $GCC,$host_os in 305142d69509Smrg yes,cygwin* | yes,mingw* | yes,pw32*) 305242d69509Smrg library_names_spec='$libname.dll.a' 305342d69509Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 305442d69509Smrg postinstall_cmds='base_file=`basename \${file}`~ 305542d69509Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ 305642d69509Smrg dldir=$destdir/`dirname \$dlpath`~ 305742d69509Smrg test -d \$dldir || mkdir -p \$dldir~ 305842d69509Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 305942d69509Smrg chmod a+x \$dldir/$dlname' 306042d69509Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 306142d69509Smrg dlpath=$dir/\$dldll~ 306242d69509Smrg $rm \$dlpath' 306342d69509Smrg shlibpath_overrides_runpath=yes 30644456fccdSmrg 306542d69509Smrg case $host_os in 306642d69509Smrg cygwin*) 306742d69509Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 306842d69509Smrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 306942d69509Smrg sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" 307042d69509Smrg ;; 307142d69509Smrg mingw*) 307242d69509Smrg # MinGW DLLs use traditional 'lib' prefix 307342d69509Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 307442d69509Smrg sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 307542d69509Smrg if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then 307642d69509Smrg # It is most probably a Windows format PATH printed by 307742d69509Smrg # mingw gcc, but we are running on Cygwin. Gcc prints its search 307842d69509Smrg # path with ; separators, and with drive letters. We can handle the 307942d69509Smrg # drive letters (cygwin fileutils understands them), so leave them, 308042d69509Smrg # especially as we might pass files found there to a mingw objdump, 308142d69509Smrg # which wouldn't understand a cygwinified path. Ahh. 308242d69509Smrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 308342d69509Smrg else 308442d69509Smrg sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 308542d69509Smrg fi 308642d69509Smrg ;; 308742d69509Smrg pw32*) 308842d69509Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 308942d69509Smrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 309042d69509Smrg ;; 309142d69509Smrg esac 309242d69509Smrg ;; 30934456fccdSmrg 309442d69509Smrg *) 309542d69509Smrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 309642d69509Smrg ;; 309742d69509Smrg esac 309842d69509Smrg dynamic_linker='Win32 ld.exe' 309942d69509Smrg # FIXME: first we should search . and the directory the executable is in 310042d69509Smrg shlibpath_var=PATH 310142d69509Smrg ;; 31024456fccdSmrg 310342d69509Smrgdarwin* | rhapsody*) 310442d69509Smrg dynamic_linker="$host_os dyld" 310542d69509Smrg version_type=darwin 310642d69509Smrg need_lib_prefix=no 310742d69509Smrg need_version=no 310842d69509Smrg library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' 310942d69509Smrg soname_spec='${libname}${release}${major}$shared_ext' 311042d69509Smrg shlibpath_overrides_runpath=yes 311142d69509Smrg shlibpath_var=DYLD_LIBRARY_PATH 311242d69509Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 311342d69509Smrg m4_if([$1], [],[ 311442d69509Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 311542d69509Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 311642d69509Smrg ;; 31174456fccdSmrg 311842d69509Smrgdgux*) 311942d69509Smrg version_type=linux 312042d69509Smrg need_lib_prefix=no 312142d69509Smrg need_version=no 312242d69509Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 312342d69509Smrg soname_spec='${libname}${release}${shared_ext}$major' 312442d69509Smrg shlibpath_var=LD_LIBRARY_PATH 312542d69509Smrg ;; 31264456fccdSmrg 312742d69509Smrgfreebsd1*) 312842d69509Smrg dynamic_linker=no 312942d69509Smrg ;; 313042d69509Smrg 313142d69509Smrgfreebsd* | dragonfly*) 313242d69509Smrg # DragonFly does not have aout. When/if they implement a new 313342d69509Smrg # versioning mechanism, adjust this. 313442d69509Smrg if test -x /usr/bin/objformat; then 313542d69509Smrg objformat=`/usr/bin/objformat` 313642d69509Smrg else 313742d69509Smrg case $host_os in 313842d69509Smrg freebsd[[123]]*) objformat=aout ;; 313942d69509Smrg *) objformat=elf ;; 314042d69509Smrg esac 314142d69509Smrg fi 314242d69509Smrg version_type=freebsd-$objformat 314342d69509Smrg case $version_type in 314442d69509Smrg freebsd-elf*) 314542d69509Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 314642d69509Smrg need_version=no 314742d69509Smrg need_lib_prefix=no 314842d69509Smrg ;; 314942d69509Smrg freebsd-*) 315042d69509Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 315142d69509Smrg need_version=yes 315242d69509Smrg ;; 315342d69509Smrg esac 315442d69509Smrg shlibpath_var=LD_LIBRARY_PATH 315542d69509Smrg case $host_os in 315642d69509Smrg freebsd2*) 315742d69509Smrg shlibpath_overrides_runpath=yes 315842d69509Smrg ;; 315942d69509Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 316042d69509Smrg shlibpath_overrides_runpath=yes 316142d69509Smrg hardcode_into_libs=yes 31624456fccdSmrg ;; 316342d69509Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 316442d69509Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 316542d69509Smrg shlibpath_overrides_runpath=no 316642d69509Smrg hardcode_into_libs=yes 316742d69509Smrg ;; 316842d69509Smrg *) # from 4.6 on, and DragonFly 316942d69509Smrg shlibpath_overrides_runpath=yes 317042d69509Smrg hardcode_into_libs=yes 317142d69509Smrg ;; 317242d69509Smrg esac 317342d69509Smrg ;; 31744456fccdSmrg 317542d69509Smrggnu*) 317642d69509Smrg version_type=linux 317742d69509Smrg need_lib_prefix=no 317842d69509Smrg need_version=no 317942d69509Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 318042d69509Smrg soname_spec='${libname}${release}${shared_ext}$major' 318142d69509Smrg shlibpath_var=LD_LIBRARY_PATH 318242d69509Smrg hardcode_into_libs=yes 318342d69509Smrg ;; 318442d69509Smrg 318542d69509Smrghpux9* | hpux10* | hpux11*) 318642d69509Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 318742d69509Smrg # link against other versions. 318842d69509Smrg version_type=sunos 318942d69509Smrg need_lib_prefix=no 319042d69509Smrg need_version=no 319142d69509Smrg case $host_cpu in 319242d69509Smrg ia64*) 319342d69509Smrg shrext_cmds='.so' 319442d69509Smrg hardcode_into_libs=yes 319542d69509Smrg dynamic_linker="$host_os dld.so" 319642d69509Smrg shlibpath_var=LD_LIBRARY_PATH 319742d69509Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 319842d69509Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 319942d69509Smrg soname_spec='${libname}${release}${shared_ext}$major' 320042d69509Smrg if test "X$HPUX_IA64_MODE" = X32; then 320142d69509Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 32024456fccdSmrg else 320342d69509Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 32044456fccdSmrg fi 320542d69509Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 320642d69509Smrg ;; 320742d69509Smrg hppa*64*) 320842d69509Smrg shrext_cmds='.sl' 320942d69509Smrg hardcode_into_libs=yes 321042d69509Smrg dynamic_linker="$host_os dld.sl" 321142d69509Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 321242d69509Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 321342d69509Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 321442d69509Smrg soname_spec='${libname}${release}${shared_ext}$major' 321542d69509Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 321642d69509Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 321742d69509Smrg ;; 321842d69509Smrg *) 321942d69509Smrg shrext_cmds='.sl' 322042d69509Smrg dynamic_linker="$host_os dld.sl" 322142d69509Smrg shlibpath_var=SHLIB_PATH 322242d69509Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 322342d69509Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 322442d69509Smrg soname_spec='${libname}${release}${shared_ext}$major' 32254456fccdSmrg ;; 322642d69509Smrg esac 322742d69509Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555. 322842d69509Smrg postinstall_cmds='chmod 555 $lib' 322942d69509Smrg ;; 32304456fccdSmrg 323142d69509Smrginterix[[3-9]]*) 323242d69509Smrg version_type=linux 323342d69509Smrg need_lib_prefix=no 323442d69509Smrg need_version=no 323542d69509Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 323642d69509Smrg soname_spec='${libname}${release}${shared_ext}$major' 323742d69509Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 323842d69509Smrg shlibpath_var=LD_LIBRARY_PATH 323942d69509Smrg shlibpath_overrides_runpath=no 324042d69509Smrg hardcode_into_libs=yes 324142d69509Smrg ;; 324242d69509Smrg 324342d69509Smrgirix5* | irix6* | nonstopux*) 324442d69509Smrg case $host_os in 324542d69509Smrg nonstopux*) version_type=nonstopux ;; 324642d69509Smrg *) 324742d69509Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 324842d69509Smrg version_type=linux 324942d69509Smrg else 325042d69509Smrg version_type=irix 325142d69509Smrg fi ;; 325242d69509Smrg esac 325342d69509Smrg need_lib_prefix=no 325442d69509Smrg need_version=no 325542d69509Smrg soname_spec='${libname}${release}${shared_ext}$major' 325642d69509Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 325742d69509Smrg case $host_os in 325842d69509Smrg irix5* | nonstopux*) 325942d69509Smrg libsuff= shlibsuff= 326042d69509Smrg ;; 326142d69509Smrg *) 326242d69509Smrg case $LD in # libtool.m4 will add one of these switches to LD 326342d69509Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 326442d69509Smrg libsuff= shlibsuff= libmagic=32-bit;; 326542d69509Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 326642d69509Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 326742d69509Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 326842d69509Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 326942d69509Smrg *) libsuff= shlibsuff= libmagic=never-match;; 32704456fccdSmrg esac 32714456fccdSmrg ;; 327242d69509Smrg esac 327342d69509Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 327442d69509Smrg shlibpath_overrides_runpath=no 327542d69509Smrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 327642d69509Smrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 327742d69509Smrg hardcode_into_libs=yes 327842d69509Smrg ;; 32794456fccdSmrg 328042d69509Smrg# No shared lib support for Linux oldld, aout, or coff. 328142d69509Smrglinux*oldld* | linux*aout* | linux*coff*) 328242d69509Smrg dynamic_linker=no 328342d69509Smrg ;; 32844456fccdSmrg 328542d69509Smrg# This must be Linux ELF. 328642d69509Smrglinux* | k*bsd*-gnu) 328742d69509Smrg version_type=linux 328842d69509Smrg need_lib_prefix=no 328942d69509Smrg need_version=no 329042d69509Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 329142d69509Smrg soname_spec='${libname}${release}${shared_ext}$major' 329242d69509Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 329342d69509Smrg shlibpath_var=LD_LIBRARY_PATH 329442d69509Smrg shlibpath_overrides_runpath=no 329542d69509Smrg # This implies no fast_install, which is unacceptable. 329642d69509Smrg # Some rework will be needed to allow for fast_install 329742d69509Smrg # before this can be enabled. 329842d69509Smrg hardcode_into_libs=yes 329942d69509Smrg 330042d69509Smrg # Append ld.so.conf contents to the search path 330142d69509Smrg if test -f /etc/ld.so.conf; then 330242d69509Smrg 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' ' '` 330342d69509Smrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 330442d69509Smrg fi 330542d69509Smrg 330642d69509Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 330742d69509Smrg # powerpc, because MkLinux only supported shared libraries with the 330842d69509Smrg # GNU dynamic linker. Since this was broken with cross compilers, 330942d69509Smrg # most powerpc-linux boxes support dynamic linking these days and 331042d69509Smrg # people can always --disable-shared, the test was removed, and we 331142d69509Smrg # assume the GNU/Linux dynamic linker is in use. 331242d69509Smrg dynamic_linker='GNU/Linux ld.so' 33134456fccdSmrg ;; 33144456fccdSmrg 331542d69509Smrgnetbsd*) 331642d69509Smrg version_type=sunos 331742d69509Smrg need_lib_prefix=no 331842d69509Smrg need_version=no 331942d69509Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 332042d69509Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 332142d69509Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 332242d69509Smrg dynamic_linker='NetBSD (a.out) ld.so' 332342d69509Smrg else 332442d69509Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 332542d69509Smrg soname_spec='${libname}${release}${shared_ext}$major' 332642d69509Smrg dynamic_linker='NetBSD ld.elf_so' 332742d69509Smrg fi 332842d69509Smrg shlibpath_var=LD_LIBRARY_PATH 332942d69509Smrg shlibpath_overrides_runpath=yes 333042d69509Smrg hardcode_into_libs=yes 333142d69509Smrg ;; 33324456fccdSmrg 333342d69509Smrgnewsos6) 333442d69509Smrg version_type=linux 333542d69509Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 333642d69509Smrg shlibpath_var=LD_LIBRARY_PATH 333742d69509Smrg shlibpath_overrides_runpath=yes 333842d69509Smrg ;; 333942d69509Smrg 334042d69509Smrgnto-qnx*) 334142d69509Smrg version_type=linux 334242d69509Smrg need_lib_prefix=no 334342d69509Smrg need_version=no 334442d69509Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 334542d69509Smrg soname_spec='${libname}${release}${shared_ext}$major' 334642d69509Smrg shlibpath_var=LD_LIBRARY_PATH 334742d69509Smrg shlibpath_overrides_runpath=yes 334842d69509Smrg ;; 334942d69509Smrg 335042d69509Smrgopenbsd*) 335142d69509Smrg version_type=sunos 335242d69509Smrg sys_lib_dlsearch_path_spec="/usr/lib" 335342d69509Smrg need_lib_prefix=no 335442d69509Smrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 335542d69509Smrg case $host_os in 335642d69509Smrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 335742d69509Smrg *) need_version=no ;; 335842d69509Smrg esac 335942d69509Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 336042d69509Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 336142d69509Smrg shlibpath_var=LD_LIBRARY_PATH 336242d69509Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 336342d69509Smrg case $host_os in 336442d69509Smrg openbsd2.[[89]] | openbsd2.[[89]].*) 336542d69509Smrg shlibpath_overrides_runpath=no 33664456fccdSmrg ;; 33674456fccdSmrg *) 336842d69509Smrg shlibpath_overrides_runpath=yes 33694456fccdSmrg ;; 337042d69509Smrg esac 337142d69509Smrg else 337242d69509Smrg shlibpath_overrides_runpath=yes 337342d69509Smrg fi 337442d69509Smrg ;; 33754456fccdSmrg 337642d69509Smrgos2*) 337742d69509Smrg libname_spec='$name' 337842d69509Smrg shrext_cmds=".dll" 337942d69509Smrg need_lib_prefix=no 338042d69509Smrg library_names_spec='$libname${shared_ext} $libname.a' 338142d69509Smrg dynamic_linker='OS/2 ld.exe' 338242d69509Smrg shlibpath_var=LIBPATH 338342d69509Smrg ;; 338442d69509Smrg 338542d69509Smrgosf3* | osf4* | osf5*) 338642d69509Smrg version_type=osf 338742d69509Smrg need_lib_prefix=no 338842d69509Smrg need_version=no 338942d69509Smrg soname_spec='${libname}${release}${shared_ext}$major' 339042d69509Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 339142d69509Smrg shlibpath_var=LD_LIBRARY_PATH 339242d69509Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 339342d69509Smrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 339442d69509Smrg ;; 339542d69509Smrg 339642d69509Smrgrdos*) 339742d69509Smrg dynamic_linker=no 339842d69509Smrg ;; 339942d69509Smrg 340042d69509Smrgsolaris*) 340142d69509Smrg version_type=linux 340242d69509Smrg need_lib_prefix=no 340342d69509Smrg need_version=no 340442d69509Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 340542d69509Smrg soname_spec='${libname}${release}${shared_ext}$major' 340642d69509Smrg shlibpath_var=LD_LIBRARY_PATH 340742d69509Smrg shlibpath_overrides_runpath=yes 340842d69509Smrg hardcode_into_libs=yes 340942d69509Smrg # ldd complains unless libraries are executable 341042d69509Smrg postinstall_cmds='chmod +x $lib' 341142d69509Smrg ;; 341242d69509Smrg 341342d69509Smrgsunos4*) 341442d69509Smrg version_type=sunos 341542d69509Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 341642d69509Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 341742d69509Smrg shlibpath_var=LD_LIBRARY_PATH 341842d69509Smrg shlibpath_overrides_runpath=yes 341942d69509Smrg if test "$with_gnu_ld" = yes; then 342042d69509Smrg need_lib_prefix=no 342142d69509Smrg fi 342242d69509Smrg need_version=yes 342342d69509Smrg ;; 342442d69509Smrg 342542d69509Smrgsysv4 | sysv4.3*) 342642d69509Smrg version_type=linux 342742d69509Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 342842d69509Smrg soname_spec='${libname}${release}${shared_ext}$major' 342942d69509Smrg shlibpath_var=LD_LIBRARY_PATH 343042d69509Smrg case $host_vendor in 343142d69509Smrg sni) 343242d69509Smrg shlibpath_overrides_runpath=no 343342d69509Smrg need_lib_prefix=no 343442d69509Smrg export_dynamic_flag_spec='${wl}-Blargedynsym' 343542d69509Smrg runpath_var=LD_RUN_PATH 34364456fccdSmrg ;; 343742d69509Smrg siemens) 343842d69509Smrg need_lib_prefix=no 34394456fccdSmrg ;; 344042d69509Smrg motorola) 344142d69509Smrg need_lib_prefix=no 344242d69509Smrg need_version=no 344342d69509Smrg shlibpath_overrides_runpath=no 344442d69509Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 34454456fccdSmrg ;; 344642d69509Smrg esac 344742d69509Smrg ;; 34484456fccdSmrg 344942d69509Smrgsysv4*MP*) 345042d69509Smrg if test -d /usr/nec ;then 345142d69509Smrg version_type=linux 345242d69509Smrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 345342d69509Smrg soname_spec='$libname${shared_ext}.$major' 345442d69509Smrg shlibpath_var=LD_LIBRARY_PATH 345542d69509Smrg fi 345642d69509Smrg ;; 345742d69509Smrg 345842d69509Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 345942d69509Smrg version_type=freebsd-elf 346042d69509Smrg need_lib_prefix=no 346142d69509Smrg need_version=no 346242d69509Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 346342d69509Smrg soname_spec='${libname}${release}${shared_ext}$major' 346442d69509Smrg shlibpath_var=LD_LIBRARY_PATH 346542d69509Smrg hardcode_into_libs=yes 346642d69509Smrg if test "$with_gnu_ld" = yes; then 346742d69509Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 346842d69509Smrg shlibpath_overrides_runpath=no 346942d69509Smrg else 347042d69509Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 347142d69509Smrg shlibpath_overrides_runpath=yes 347242d69509Smrg case $host_os in 347342d69509Smrg sco3.2v5*) 347442d69509Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 347542d69509Smrg ;; 347642d69509Smrg esac 347742d69509Smrg fi 347842d69509Smrg sys_lib_dlsearch_path_spec='/usr/lib' 347942d69509Smrg ;; 348042d69509Smrg 348142d69509Smrguts4*) 348242d69509Smrg version_type=linux 348342d69509Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 348442d69509Smrg soname_spec='${libname}${release}${shared_ext}$major' 348542d69509Smrg shlibpath_var=LD_LIBRARY_PATH 348642d69509Smrg ;; 348742d69509Smrg 348842d69509Smrg*) 348942d69509Smrg dynamic_linker=no 349042d69509Smrg ;; 349142d69509Smrgesac 349242d69509SmrgAC_MSG_RESULT([$dynamic_linker]) 349342d69509Smrgtest "$dynamic_linker" = no && can_build_shared=no 349442d69509Smrg 349542d69509SmrgAC_CACHE_VAL([lt_cv_sys_lib_search_path_spec], 349642d69509Smrg[lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"]) 349742d69509Smrgsys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 349842d69509SmrgAC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec], 349942d69509Smrg[lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"]) 350042d69509Smrgsys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 350142d69509Smrg 350242d69509Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 350342d69509Smrgif test "$GCC" = yes; then 350442d69509Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 350542d69509Smrgfi 350642d69509Smrg])# AC_LIBTOOL_SYS_DYNAMIC_LINKER 350742d69509Smrg 350842d69509Smrg 350942d69509Smrg# _LT_AC_TAGCONFIG 351042d69509Smrg# ---------------- 351142d69509SmrgAC_DEFUN([_LT_AC_TAGCONFIG], 351242d69509Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 351342d69509SmrgAC_ARG_WITH([tags], 351442d69509Smrg [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], 351542d69509Smrg [include additional configurations @<:@automatic@:>@])], 351642d69509Smrg [tagnames="$withval"]) 351742d69509Smrg 351842d69509Smrgif test -f "$ltmain" && test -n "$tagnames"; then 351942d69509Smrg if test ! -f "${ofile}"; then 352042d69509Smrg AC_MSG_WARN([output file `$ofile' does not exist]) 352142d69509Smrg fi 352242d69509Smrg 352342d69509Smrg if test -z "$LTCC"; then 352442d69509Smrg eval "`$SHELL ${ofile} --config | grep '^LTCC='`" 352542d69509Smrg if test -z "$LTCC"; then 352642d69509Smrg AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) 352742d69509Smrg else 352842d69509Smrg AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) 35294456fccdSmrg fi 353042d69509Smrg fi 353142d69509Smrg if test -z "$LTCFLAGS"; then 353242d69509Smrg eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" 353342d69509Smrg fi 353442d69509Smrg 353542d69509Smrg # Extract list of available tagged configurations in $ofile. 353642d69509Smrg # Note that this assumes the entire list is on one line. 353742d69509Smrg available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` 353842d69509Smrg 353942d69509Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 354042d69509Smrg for tagname in $tagnames; do 354142d69509Smrg IFS="$lt_save_ifs" 354242d69509Smrg # Check whether tagname contains only valid characters 354342d69509Smrg case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in 354442d69509Smrg "") ;; 354542d69509Smrg *) AC_MSG_ERROR([invalid tag name: $tagname]) 354642d69509Smrg ;; 35474456fccdSmrg esac 35484456fccdSmrg 354942d69509Smrg if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null 355042d69509Smrg then 355142d69509Smrg AC_MSG_ERROR([tag name \"$tagname\" already exists]) 355242d69509Smrg fi 355342d69509Smrg 355442d69509Smrg # Update the list of available tags. 355542d69509Smrg if test -n "$tagname"; then 355642d69509Smrg echo appending configuration tag \"$tagname\" to $ofile 355742d69509Smrg 355842d69509Smrg case $tagname in 355942d69509Smrg CXX) 356042d69509Smrg if test -n "$CXX" && ( test "X$CXX" != "Xno" && 356142d69509Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 356242d69509Smrg (test "X$CXX" != "Xg++"))) ; then 356342d69509Smrg AC_LIBTOOL_LANG_CXX_CONFIG 356442d69509Smrg else 356542d69509Smrg tagname="" 356642d69509Smrg fi 35674456fccdSmrg ;; 356842d69509Smrg 356942d69509Smrg F77) 357042d69509Smrg if test -n "$F77" && test "X$F77" != "Xno"; then 357142d69509Smrg AC_LIBTOOL_LANG_F77_CONFIG 357242d69509Smrg else 357342d69509Smrg tagname="" 357442d69509Smrg fi 35754456fccdSmrg ;; 357642d69509Smrg 357742d69509Smrg GCJ) 357842d69509Smrg if test -n "$GCJ" && test "X$GCJ" != "Xno"; then 357942d69509Smrg AC_LIBTOOL_LANG_GCJ_CONFIG 35804456fccdSmrg else 358142d69509Smrg tagname="" 35824456fccdSmrg fi 35834456fccdSmrg ;; 35844456fccdSmrg 358542d69509Smrg RC) 358642d69509Smrg AC_LIBTOOL_LANG_RC_CONFIG 35874456fccdSmrg ;; 358842d69509Smrg 35894456fccdSmrg *) 359042d69509Smrg AC_MSG_ERROR([Unsupported tag name: $tagname]) 35914456fccdSmrg ;; 359242d69509Smrg esac 35934456fccdSmrg 359442d69509Smrg # Append the new tag name to the list of available tags. 359542d69509Smrg if test -n "$tagname" ; then 359642d69509Smrg available_tags="$available_tags $tagname" 359742d69509Smrg fi 359842d69509Smrg fi 359942d69509Smrg done 360042d69509Smrg IFS="$lt_save_ifs" 36014456fccdSmrg 360242d69509Smrg # Now substitute the updated list of available tags. 360342d69509Smrg if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then 360442d69509Smrg mv "${ofile}T" "$ofile" 360542d69509Smrg chmod +x "$ofile" 360642d69509Smrg else 360742d69509Smrg rm -f "${ofile}T" 360842d69509Smrg AC_MSG_ERROR([unable to update list of available tagged configurations.]) 360942d69509Smrg fi 361042d69509Smrgfi 361142d69509Smrg])# _LT_AC_TAGCONFIG 36124456fccdSmrg 36134456fccdSmrg 361442d69509Smrg# AC_LIBTOOL_DLOPEN 361542d69509Smrg# ----------------- 361642d69509Smrg# enable checks for dlopen support 361742d69509SmrgAC_DEFUN([AC_LIBTOOL_DLOPEN], 361842d69509Smrg [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) 361942d69509Smrg])# AC_LIBTOOL_DLOPEN 36204456fccdSmrg 36214456fccdSmrg 362242d69509Smrg# AC_LIBTOOL_WIN32_DLL 362342d69509Smrg# -------------------- 362442d69509Smrg# declare package support for building win32 DLLs 362542d69509SmrgAC_DEFUN([AC_LIBTOOL_WIN32_DLL], 362642d69509Smrg[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) 362742d69509Smrg])# AC_LIBTOOL_WIN32_DLL 36284456fccdSmrg 36294456fccdSmrg 363042d69509Smrg# AC_ENABLE_SHARED([DEFAULT]) 363142d69509Smrg# --------------------------- 363242d69509Smrg# implement the --enable-shared flag 363342d69509Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 363442d69509SmrgAC_DEFUN([AC_ENABLE_SHARED], 363542d69509Smrg[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl 363642d69509SmrgAC_ARG_ENABLE([shared], 363742d69509Smrg [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 363842d69509Smrg [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], 363942d69509Smrg [p=${PACKAGE-default} 364042d69509Smrg case $enableval in 364142d69509Smrg yes) enable_shared=yes ;; 364242d69509Smrg no) enable_shared=no ;; 364342d69509Smrg *) 364442d69509Smrg enable_shared=no 364542d69509Smrg # Look at the argument we got. We use all the common list separators. 364642d69509Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 364742d69509Smrg for pkg in $enableval; do 364842d69509Smrg IFS="$lt_save_ifs" 364942d69509Smrg if test "X$pkg" = "X$p"; then 365042d69509Smrg enable_shared=yes 365142d69509Smrg fi 365242d69509Smrg done 365342d69509Smrg IFS="$lt_save_ifs" 365442d69509Smrg ;; 365542d69509Smrg esac], 365642d69509Smrg [enable_shared=]AC_ENABLE_SHARED_DEFAULT) 365742d69509Smrg])# AC_ENABLE_SHARED 36584456fccdSmrg 36594456fccdSmrg 366042d69509Smrg# AC_DISABLE_SHARED 366142d69509Smrg# ----------------- 366242d69509Smrg# set the default shared flag to --disable-shared 366342d69509SmrgAC_DEFUN([AC_DISABLE_SHARED], 366442d69509Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 366542d69509SmrgAC_ENABLE_SHARED(no) 366642d69509Smrg])# AC_DISABLE_SHARED 36674456fccdSmrg 36684456fccdSmrg 366942d69509Smrg# AC_ENABLE_STATIC([DEFAULT]) 367042d69509Smrg# --------------------------- 367142d69509Smrg# implement the --enable-static flag 367242d69509Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 367342d69509SmrgAC_DEFUN([AC_ENABLE_STATIC], 367442d69509Smrg[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl 367542d69509SmrgAC_ARG_ENABLE([static], 367642d69509Smrg [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], 367742d69509Smrg [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], 367842d69509Smrg [p=${PACKAGE-default} 367942d69509Smrg case $enableval in 368042d69509Smrg yes) enable_static=yes ;; 368142d69509Smrg no) enable_static=no ;; 368242d69509Smrg *) 368342d69509Smrg enable_static=no 368442d69509Smrg # Look at the argument we got. We use all the common list separators. 368542d69509Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 368642d69509Smrg for pkg in $enableval; do 368742d69509Smrg IFS="$lt_save_ifs" 368842d69509Smrg if test "X$pkg" = "X$p"; then 368942d69509Smrg enable_static=yes 36904456fccdSmrg fi 369142d69509Smrg done 369242d69509Smrg IFS="$lt_save_ifs" 369342d69509Smrg ;; 369442d69509Smrg esac], 369542d69509Smrg [enable_static=]AC_ENABLE_STATIC_DEFAULT) 369642d69509Smrg])# AC_ENABLE_STATIC 36974456fccdSmrg 36984456fccdSmrg 369942d69509Smrg# AC_DISABLE_STATIC 370042d69509Smrg# ----------------- 370142d69509Smrg# set the default static flag to --disable-static 370242d69509SmrgAC_DEFUN([AC_DISABLE_STATIC], 370342d69509Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 370442d69509SmrgAC_ENABLE_STATIC(no) 370542d69509Smrg])# AC_DISABLE_STATIC 37064456fccdSmrg 37074456fccdSmrg 370842d69509Smrg# AC_ENABLE_FAST_INSTALL([DEFAULT]) 370942d69509Smrg# --------------------------------- 371042d69509Smrg# implement the --enable-fast-install flag 371142d69509Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 371242d69509SmrgAC_DEFUN([AC_ENABLE_FAST_INSTALL], 371342d69509Smrg[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl 371442d69509SmrgAC_ARG_ENABLE([fast-install], 371542d69509Smrg [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 371642d69509Smrg [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 371742d69509Smrg [p=${PACKAGE-default} 371842d69509Smrg case $enableval in 371942d69509Smrg yes) enable_fast_install=yes ;; 372042d69509Smrg no) enable_fast_install=no ;; 372142d69509Smrg *) 372242d69509Smrg enable_fast_install=no 372342d69509Smrg # Look at the argument we got. We use all the common list separators. 372442d69509Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 372542d69509Smrg for pkg in $enableval; do 372642d69509Smrg IFS="$lt_save_ifs" 372742d69509Smrg if test "X$pkg" = "X$p"; then 372842d69509Smrg enable_fast_install=yes 372942d69509Smrg fi 373042d69509Smrg done 373142d69509Smrg IFS="$lt_save_ifs" 373242d69509Smrg ;; 373342d69509Smrg esac], 373442d69509Smrg [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) 373542d69509Smrg])# AC_ENABLE_FAST_INSTALL 37364456fccdSmrg 37374456fccdSmrg 373842d69509Smrg# AC_DISABLE_FAST_INSTALL 373942d69509Smrg# ----------------------- 374042d69509Smrg# set the default to --disable-fast-install 374142d69509SmrgAC_DEFUN([AC_DISABLE_FAST_INSTALL], 374242d69509Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 374342d69509SmrgAC_ENABLE_FAST_INSTALL(no) 374442d69509Smrg])# AC_DISABLE_FAST_INSTALL 37454456fccdSmrg 37464456fccdSmrg 374742d69509Smrg# AC_LIBTOOL_PICMODE([MODE]) 374842d69509Smrg# -------------------------- 374942d69509Smrg# implement the --with-pic flag 375042d69509Smrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 375142d69509SmrgAC_DEFUN([AC_LIBTOOL_PICMODE], 375242d69509Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 375342d69509Smrgpic_mode=ifelse($#,1,$1,default) 375442d69509Smrg])# AC_LIBTOOL_PICMODE 37554456fccdSmrg 37564456fccdSmrg 375742d69509Smrg# AC_PROG_EGREP 375842d69509Smrg# ------------- 375942d69509Smrg# This is predefined starting with Autoconf 2.54, so this conditional 376042d69509Smrg# definition can be removed once we require Autoconf 2.54 or later. 376142d69509Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], 376242d69509Smrg[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], 376342d69509Smrg [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 376442d69509Smrg then ac_cv_prog_egrep='grep -E' 376542d69509Smrg else ac_cv_prog_egrep='egrep' 376642d69509Smrg fi]) 376742d69509Smrg EGREP=$ac_cv_prog_egrep 376842d69509Smrg AC_SUBST([EGREP]) 376942d69509Smrg])]) 37704456fccdSmrg 37714456fccdSmrg 377242d69509Smrg# AC_PATH_TOOL_PREFIX 377342d69509Smrg# ------------------- 377442d69509Smrg# find a file program which can recognize shared library 377542d69509SmrgAC_DEFUN([AC_PATH_TOOL_PREFIX], 377642d69509Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 377742d69509SmrgAC_MSG_CHECKING([for $1]) 377842d69509SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 377942d69509Smrg[case $MAGIC_CMD in 378042d69509Smrg[[\\/*] | ?:[\\/]*]) 378142d69509Smrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 378242d69509Smrg ;; 378342d69509Smrg*) 378442d69509Smrg lt_save_MAGIC_CMD="$MAGIC_CMD" 378542d69509Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 378642d69509Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 378742d69509Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 378842d69509Smrgdnl not every word. This closes a longstanding sh security hole. 378942d69509Smrg ac_dummy="ifelse([$2], , $PATH, [$2])" 379042d69509Smrg for ac_dir in $ac_dummy; do 379142d69509Smrg IFS="$lt_save_ifs" 379242d69509Smrg test -z "$ac_dir" && ac_dir=. 379342d69509Smrg if test -f $ac_dir/$1; then 379442d69509Smrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 379542d69509Smrg if test -n "$file_magic_test_file"; then 379642d69509Smrg case $deplibs_check_method in 379742d69509Smrg "file_magic "*) 379842d69509Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 379942d69509Smrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 380042d69509Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 380142d69509Smrg $EGREP "$file_magic_regex" > /dev/null; then 380242d69509Smrg : 38034456fccdSmrg else 380442d69509Smrg cat <<EOF 1>&2 38054456fccdSmrg 380642d69509Smrg*** Warning: the command libtool uses to detect shared libraries, 380742d69509Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 380842d69509Smrg*** The result is that libtool may fail to recognize shared libraries 380942d69509Smrg*** as such. This will affect the creation of libtool libraries that 381042d69509Smrg*** depend on shared libraries, but programs linked with such libtool 381142d69509Smrg*** libraries will work regardless of this problem. Nevertheless, you 381242d69509Smrg*** may want to report the problem to your system manager and/or to 381342d69509Smrg*** bug-libtool@gnu.org 38144456fccdSmrg 381542d69509SmrgEOF 381642d69509Smrg fi ;; 381742d69509Smrg esac 381842d69509Smrg fi 381942d69509Smrg break 382042d69509Smrg fi 382142d69509Smrg done 382242d69509Smrg IFS="$lt_save_ifs" 382342d69509Smrg MAGIC_CMD="$lt_save_MAGIC_CMD" 382442d69509Smrg ;; 382542d69509Smrgesac]) 382642d69509SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 382742d69509Smrgif test -n "$MAGIC_CMD"; then 382842d69509Smrg AC_MSG_RESULT($MAGIC_CMD) 382942d69509Smrgelse 383042d69509Smrg AC_MSG_RESULT(no) 383142d69509Smrgfi 383242d69509Smrg])# AC_PATH_TOOL_PREFIX 38334456fccdSmrg 38344456fccdSmrg 383542d69509Smrg# AC_PATH_MAGIC 383642d69509Smrg# ------------- 383742d69509Smrg# find a file program which can recognize a shared library 383842d69509SmrgAC_DEFUN([AC_PATH_MAGIC], 383942d69509Smrg[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 384042d69509Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 384142d69509Smrg if test -n "$ac_tool_prefix"; then 384242d69509Smrg AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 384342d69509Smrg else 384442d69509Smrg MAGIC_CMD=: 384542d69509Smrg fi 384642d69509Smrgfi 384742d69509Smrg])# AC_PATH_MAGIC 384842d69509Smrg 384942d69509Smrg 385042d69509Smrg# AC_PROG_LD 385142d69509Smrg# ---------- 385242d69509Smrg# find the pathname to the GNU or non-GNU linker 385342d69509SmrgAC_DEFUN([AC_PROG_LD], 385442d69509Smrg[AC_ARG_WITH([gnu-ld], 385542d69509Smrg [AC_HELP_STRING([--with-gnu-ld], 385642d69509Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 385742d69509Smrg [test "$withval" = no || with_gnu_ld=yes], 385842d69509Smrg [with_gnu_ld=no]) 385942d69509SmrgAC_REQUIRE([LT_AC_PROG_SED])dnl 386042d69509SmrgAC_REQUIRE([AC_PROG_CC])dnl 386142d69509SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 386242d69509SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 386342d69509Smrgac_prog=ld 386442d69509Smrgif test "$GCC" = yes; then 386542d69509Smrg # Check if gcc -print-prog-name=ld gives a path. 386642d69509Smrg AC_MSG_CHECKING([for ld used by $CC]) 386742d69509Smrg case $host in 386842d69509Smrg *-*-mingw*) 386942d69509Smrg # gcc leaves a trailing carriage return which upsets mingw 387042d69509Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 387142d69509Smrg *) 387242d69509Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 387342d69509Smrg esac 387442d69509Smrg case $ac_prog in 387542d69509Smrg # Accept absolute paths. 387642d69509Smrg [[\\/]]* | ?:[[\\/]]*) 387742d69509Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 387842d69509Smrg # Canonicalize the pathname of ld 387942d69509Smrg ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` 388042d69509Smrg while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do 388142d69509Smrg ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` 388242d69509Smrg done 388342d69509Smrg test -z "$LD" && LD="$ac_prog" 388442d69509Smrg ;; 388542d69509Smrg "") 388642d69509Smrg # If it fails, then pretend we aren't using GCC. 388742d69509Smrg ac_prog=ld 38884456fccdSmrg ;; 388942d69509Smrg *) 389042d69509Smrg # If it is relative, then search for the first ld in PATH. 389142d69509Smrg with_gnu_ld=unknown 389242d69509Smrg ;; 389342d69509Smrg esac 389442d69509Smrgelif test "$with_gnu_ld" = yes; then 389542d69509Smrg AC_MSG_CHECKING([for GNU ld]) 389642d69509Smrgelse 389742d69509Smrg AC_MSG_CHECKING([for non-GNU ld]) 389842d69509Smrgfi 389942d69509SmrgAC_CACHE_VAL(lt_cv_path_LD, 390042d69509Smrg[if test -z "$LD"; then 390142d69509Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 390242d69509Smrg for ac_dir in $PATH; do 390342d69509Smrg IFS="$lt_save_ifs" 390442d69509Smrg test -z "$ac_dir" && ac_dir=. 390542d69509Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 390642d69509Smrg lt_cv_path_LD="$ac_dir/$ac_prog" 390742d69509Smrg # Check to see if the program is GNU ld. I'd rather use --version, 390842d69509Smrg # but apparently some variants of GNU ld only accept -v. 390942d69509Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 391042d69509Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 391142d69509Smrg *GNU* | *'with BFD'*) 391242d69509Smrg test "$with_gnu_ld" != no && break 39134456fccdSmrg ;; 39144456fccdSmrg *) 391542d69509Smrg test "$with_gnu_ld" != yes && break 39164456fccdSmrg ;; 391742d69509Smrg esac 391842d69509Smrg fi 391942d69509Smrg done 392042d69509Smrg IFS="$lt_save_ifs" 392142d69509Smrgelse 392242d69509Smrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 392342d69509Smrgfi]) 392442d69509SmrgLD="$lt_cv_path_LD" 392542d69509Smrgif test -n "$LD"; then 392642d69509Smrg AC_MSG_RESULT($LD) 392742d69509Smrgelse 392842d69509Smrg AC_MSG_RESULT(no) 392942d69509Smrgfi 393042d69509Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 393142d69509SmrgAC_PROG_LD_GNU 393242d69509Smrg])# AC_PROG_LD 393342d69509Smrg 393442d69509Smrg 393542d69509Smrg# AC_PROG_LD_GNU 393642d69509Smrg# -------------- 393742d69509SmrgAC_DEFUN([AC_PROG_LD_GNU], 393842d69509Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 393942d69509SmrgAC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 394042d69509Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 394142d69509Smrgcase `$LD -v 2>&1 </dev/null` in 394242d69509Smrg*GNU* | *'with BFD'*) 394342d69509Smrg lt_cv_prog_gnu_ld=yes 394442d69509Smrg ;; 394542d69509Smrg*) 394642d69509Smrg lt_cv_prog_gnu_ld=no 394742d69509Smrg ;; 394842d69509Smrgesac]) 394942d69509Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 395042d69509Smrg])# AC_PROG_LD_GNU 395142d69509Smrg 395242d69509Smrg 395342d69509Smrg# AC_PROG_LD_RELOAD_FLAG 395442d69509Smrg# ---------------------- 395542d69509Smrg# find reload flag for linker 395642d69509Smrg# -- PORTME Some linkers may need a different reload flag. 395742d69509SmrgAC_DEFUN([AC_PROG_LD_RELOAD_FLAG], 395842d69509Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 395942d69509Smrg lt_cv_ld_reload_flag, 396042d69509Smrg [lt_cv_ld_reload_flag='-r']) 396142d69509Smrgreload_flag=$lt_cv_ld_reload_flag 396242d69509Smrgcase $reload_flag in 396342d69509Smrg"" | " "*) ;; 396442d69509Smrg*) reload_flag=" $reload_flag" ;; 396542d69509Smrgesac 396642d69509Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 396742d69509Smrgcase $host_os in 396842d69509Smrg darwin*) 396942d69509Smrg if test "$GCC" = yes; then 397042d69509Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 397142d69509Smrg else 397242d69509Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 397342d69509Smrg fi 39744456fccdSmrg ;; 39754456fccdSmrgesac 397642d69509Smrg])# AC_PROG_LD_RELOAD_FLAG 39774456fccdSmrg 39784456fccdSmrg 397942d69509Smrg# AC_DEPLIBS_CHECK_METHOD 398042d69509Smrg# ----------------------- 398142d69509Smrg# how to check for library dependencies 398242d69509Smrg# -- PORTME fill in with the dynamic library characteristics 398342d69509SmrgAC_DEFUN([AC_DEPLIBS_CHECK_METHOD], 398442d69509Smrg[AC_CACHE_CHECK([how to recognize dependent libraries], 398542d69509Smrglt_cv_deplibs_check_method, 398642d69509Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 398742d69509Smrglt_cv_file_magic_test_file= 398842d69509Smrglt_cv_deplibs_check_method='unknown' 398942d69509Smrg# Need to set the preceding variable on all platforms that support 399042d69509Smrg# interlibrary dependencies. 399142d69509Smrg# 'none' -- dependencies not supported. 399242d69509Smrg# `unknown' -- same as none, but documents that we really don't know. 399342d69509Smrg# 'pass_all' -- all dependencies passed with no checks. 399442d69509Smrg# 'test_compile' -- check by making test program. 399542d69509Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 399642d69509Smrg# which responds to the $file_magic_cmd with a given extended regex. 399742d69509Smrg# If you have `file' or equivalent on your system and you're not sure 399842d69509Smrg# whether `pass_all' will *always* work, you probably want this one. 39994456fccdSmrg 400042d69509Smrgcase $host_os in 400142d69509Smrgaix[[4-9]]*) 400242d69509Smrg lt_cv_deplibs_check_method=pass_all 400342d69509Smrg ;; 40044456fccdSmrg 400542d69509Smrgbeos*) 400642d69509Smrg lt_cv_deplibs_check_method=pass_all 400742d69509Smrg ;; 40084456fccdSmrg 400942d69509Smrgbsdi[[45]]*) 401042d69509Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 401142d69509Smrg lt_cv_file_magic_cmd='/usr/bin/file -L' 401242d69509Smrg lt_cv_file_magic_test_file=/shlib/libc.so 401342d69509Smrg ;; 40144456fccdSmrg 401542d69509Smrgcygwin*) 401642d69509Smrg # func_win32_libid is a shell function defined in ltmain.sh 401742d69509Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 401842d69509Smrg lt_cv_file_magic_cmd='func_win32_libid' 401942d69509Smrg ;; 40204456fccdSmrg 402142d69509Smrgmingw* | pw32*) 402242d69509Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 402342d69509Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 402442d69509Smrg # unless we find 'file', for example because we are cross-compiling. 402542d69509Smrg if ( file / ) >/dev/null 2>&1; then 402642d69509Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 402742d69509Smrg lt_cv_file_magic_cmd='func_win32_libid' 402842d69509Smrg else 402942d69509Smrg lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' 403042d69509Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 403142d69509Smrg fi 403242d69509Smrg ;; 40334456fccdSmrg 403442d69509Smrgdarwin* | rhapsody*) 403542d69509Smrg lt_cv_deplibs_check_method=pass_all 403642d69509Smrg ;; 40374456fccdSmrg 403842d69509Smrgfreebsd* | dragonfly*) 403942d69509Smrg if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 404042d69509Smrg case $host_cpu in 404142d69509Smrg i*86 ) 404242d69509Smrg # Not sure whether the presence of OpenBSD here was a mistake. 404342d69509Smrg # Let's accept both of them until this is cleared up. 404442d69509Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 404542d69509Smrg lt_cv_file_magic_cmd=/usr/bin/file 404642d69509Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 404742d69509Smrg ;; 40484456fccdSmrg esac 404942d69509Smrg else 405042d69509Smrg lt_cv_deplibs_check_method=pass_all 405142d69509Smrg fi 405242d69509Smrg ;; 40534456fccdSmrg 405442d69509Smrggnu*) 405542d69509Smrg lt_cv_deplibs_check_method=pass_all 40564456fccdSmrg ;; 40574456fccdSmrg 405842d69509Smrghpux10.20* | hpux11*) 405942d69509Smrg lt_cv_file_magic_cmd=/usr/bin/file 406042d69509Smrg case $host_cpu in 406142d69509Smrg ia64*) 406242d69509Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 406342d69509Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 406442d69509Smrg ;; 406542d69509Smrg hppa*64*) 406642d69509Smrg [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]'] 406742d69509Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 406842d69509Smrg ;; 406942d69509Smrg *) 407042d69509Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' 407142d69509Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 40724456fccdSmrg ;; 40734456fccdSmrg esac 40744456fccdSmrg ;; 40754456fccdSmrg 407642d69509Smrginterix[[3-9]]*) 407742d69509Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 407842d69509Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 407942d69509Smrg ;; 40804456fccdSmrg 408142d69509Smrgirix5* | irix6* | nonstopux*) 408242d69509Smrg case $LD in 408342d69509Smrg *-32|*"-32 ") libmagic=32-bit;; 408442d69509Smrg *-n32|*"-n32 ") libmagic=N32;; 408542d69509Smrg *-64|*"-64 ") libmagic=64-bit;; 408642d69509Smrg *) libmagic=never-match;; 408742d69509Smrg esac 408842d69509Smrg lt_cv_deplibs_check_method=pass_all 408942d69509Smrg ;; 40904456fccdSmrg 409142d69509Smrg# This must be Linux ELF. 409242d69509Smrglinux* | k*bsd*-gnu) 409342d69509Smrg lt_cv_deplibs_check_method=pass_all 409442d69509Smrg ;; 40954456fccdSmrg 409642d69509Smrgnetbsd*) 409742d69509Smrg if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 409842d69509Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 409942d69509Smrg else 410042d69509Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 410142d69509Smrg fi 410242d69509Smrg ;; 41034456fccdSmrg 410442d69509Smrgnewos6*) 410542d69509Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 410642d69509Smrg lt_cv_file_magic_cmd=/usr/bin/file 410742d69509Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 410842d69509Smrg ;; 41094456fccdSmrg 411042d69509Smrgnto-qnx*) 411142d69509Smrg lt_cv_deplibs_check_method=unknown 411242d69509Smrg ;; 41134456fccdSmrg 411442d69509Smrgopenbsd*) 411542d69509Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 411642d69509Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 411742d69509Smrg else 411842d69509Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 411942d69509Smrg fi 412042d69509Smrg ;; 41214456fccdSmrg 412242d69509Smrgosf3* | osf4* | osf5*) 412342d69509Smrg lt_cv_deplibs_check_method=pass_all 412442d69509Smrg ;; 41254456fccdSmrg 412642d69509Smrgrdos*) 412742d69509Smrg lt_cv_deplibs_check_method=pass_all 412842d69509Smrg ;; 41294456fccdSmrg 413042d69509Smrgsolaris*) 413142d69509Smrg lt_cv_deplibs_check_method=pass_all 413242d69509Smrg ;; 41334456fccdSmrg 413442d69509Smrgsysv4 | sysv4.3*) 413542d69509Smrg case $host_vendor in 413642d69509Smrg motorola) 413742d69509Smrg 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]]' 413842d69509Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 413942d69509Smrg ;; 414042d69509Smrg ncr) 414142d69509Smrg lt_cv_deplibs_check_method=pass_all 414242d69509Smrg ;; 414342d69509Smrg sequent) 414442d69509Smrg lt_cv_file_magic_cmd='/bin/file' 414542d69509Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 414642d69509Smrg ;; 414742d69509Smrg sni) 414842d69509Smrg lt_cv_file_magic_cmd='/bin/file' 414942d69509Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 415042d69509Smrg lt_cv_file_magic_test_file=/lib/libc.so 415142d69509Smrg ;; 415242d69509Smrg siemens) 415342d69509Smrg lt_cv_deplibs_check_method=pass_all 415442d69509Smrg ;; 415542d69509Smrg pc) 415642d69509Smrg lt_cv_deplibs_check_method=pass_all 415742d69509Smrg ;; 415842d69509Smrg esac 41594456fccdSmrg ;; 416042d69509Smrg 416142d69509Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 416242d69509Smrg lt_cv_deplibs_check_method=pass_all 41634456fccdSmrg ;; 41644456fccdSmrgesac 416542d69509Smrg]) 416642d69509Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 416742d69509Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 416842d69509Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 416942d69509Smrg])# AC_DEPLIBS_CHECK_METHOD 41704456fccdSmrg 41714456fccdSmrg 417242d69509Smrg# AC_PROG_NM 417342d69509Smrg# ---------- 417442d69509Smrg# find the pathname to a BSD-compatible name lister 417542d69509SmrgAC_DEFUN([AC_PROG_NM], 417642d69509Smrg[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, 417742d69509Smrg[if test -n "$NM"; then 417842d69509Smrg # Let the user override the test. 417942d69509Smrg lt_cv_path_NM="$NM" 418042d69509Smrgelse 418142d69509Smrg lt_nm_to_check="${ac_tool_prefix}nm" 418242d69509Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 418342d69509Smrg lt_nm_to_check="$lt_nm_to_check nm" 418442d69509Smrg fi 418542d69509Smrg for lt_tmp_nm in $lt_nm_to_check; do 418642d69509Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 418742d69509Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 418842d69509Smrg IFS="$lt_save_ifs" 418942d69509Smrg test -z "$ac_dir" && ac_dir=. 419042d69509Smrg tmp_nm="$ac_dir/$lt_tmp_nm" 419142d69509Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 419242d69509Smrg # Check to see if the nm accepts a BSD-compat flag. 419342d69509Smrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 419442d69509Smrg # nm: unknown option "B" ignored 419542d69509Smrg # Tru64's nm complains that /dev/null is an invalid object file 419642d69509Smrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 419742d69509Smrg */dev/null* | *'Invalid file or object type'*) 419842d69509Smrg lt_cv_path_NM="$tmp_nm -B" 419942d69509Smrg break 420042d69509Smrg ;; 420142d69509Smrg *) 420242d69509Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 420342d69509Smrg */dev/null*) 420442d69509Smrg lt_cv_path_NM="$tmp_nm -p" 420542d69509Smrg break 420642d69509Smrg ;; 420742d69509Smrg *) 420842d69509Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 420942d69509Smrg continue # so that we can try to find one that supports BSD flags 421042d69509Smrg ;; 421142d69509Smrg esac 421242d69509Smrg ;; 421342d69509Smrg esac 421442d69509Smrg fi 421542d69509Smrg done 421642d69509Smrg IFS="$lt_save_ifs" 421742d69509Smrg done 421842d69509Smrg test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm 421942d69509Smrgfi]) 422042d69509SmrgNM="$lt_cv_path_NM" 422142d69509Smrg])# AC_PROG_NM 42224456fccdSmrg 42234456fccdSmrg 422442d69509Smrg# AC_CHECK_LIBM 422542d69509Smrg# ------------- 422642d69509Smrg# check for math library 422742d69509SmrgAC_DEFUN([AC_CHECK_LIBM], 422842d69509Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 422942d69509SmrgLIBM= 423042d69509Smrgcase $host in 423142d69509Smrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) 423242d69509Smrg # These system don't have libm, or don't need it 423342d69509Smrg ;; 423442d69509Smrg*-ncr-sysv4.3*) 423542d69509Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 423642d69509Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 423742d69509Smrg ;; 423842d69509Smrg*) 423942d69509Smrg AC_CHECK_LIB(m, cos, LIBM="-lm") 424042d69509Smrg ;; 424142d69509Smrgesac 424242d69509Smrg])# AC_CHECK_LIBM 42434456fccdSmrg 42444456fccdSmrg 424542d69509Smrg# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) 424642d69509Smrg# ----------------------------------- 424742d69509Smrg# sets LIBLTDL to the link flags for the libltdl convenience library and 424842d69509Smrg# LTDLINCL to the include flags for the libltdl header and adds 424942d69509Smrg# --enable-ltdl-convenience to the configure arguments. Note that 425042d69509Smrg# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 425142d69509Smrg# it is assumed to be `libltdl'. LIBLTDL will be prefixed with 425242d69509Smrg# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' 425342d69509Smrg# (note the single quotes!). If your package is not flat and you're not 425442d69509Smrg# using automake, define top_builddir and top_srcdir appropriately in 425542d69509Smrg# the Makefiles. 425642d69509SmrgAC_DEFUN([AC_LIBLTDL_CONVENIENCE], 425742d69509Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 425842d69509Smrg case $enable_ltdl_convenience in 425942d69509Smrg no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; 426042d69509Smrg "") enable_ltdl_convenience=yes 426142d69509Smrg ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; 426242d69509Smrg esac 426342d69509Smrg LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la 426442d69509Smrg LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 426542d69509Smrg # For backwards non-gettext consistent compatibility... 426642d69509Smrg INCLTDL="$LTDLINCL" 426742d69509Smrg])# AC_LIBLTDL_CONVENIENCE 42684456fccdSmrg 42694456fccdSmrg 427042d69509Smrg# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) 427142d69509Smrg# ----------------------------------- 427242d69509Smrg# sets LIBLTDL to the link flags for the libltdl installable library and 427342d69509Smrg# LTDLINCL to the include flags for the libltdl header and adds 427442d69509Smrg# --enable-ltdl-install to the configure arguments. Note that 427542d69509Smrg# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, 427642d69509Smrg# and an installed libltdl is not found, it is assumed to be `libltdl'. 427742d69509Smrg# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with 427842d69509Smrg# '${top_srcdir}/' (note the single quotes!). If your package is not 427942d69509Smrg# flat and you're not using automake, define top_builddir and top_srcdir 428042d69509Smrg# appropriately in the Makefiles. 428142d69509Smrg# In the future, this macro may have to be called after AC_PROG_LIBTOOL. 428242d69509SmrgAC_DEFUN([AC_LIBLTDL_INSTALLABLE], 428342d69509Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 428442d69509Smrg AC_CHECK_LIB(ltdl, lt_dlinit, 428542d69509Smrg [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], 428642d69509Smrg [if test x"$enable_ltdl_install" = xno; then 428742d69509Smrg AC_MSG_WARN([libltdl not installed, but installation disabled]) 428842d69509Smrg else 428942d69509Smrg enable_ltdl_install=yes 429042d69509Smrg fi 429142d69509Smrg ]) 429242d69509Smrg if test x"$enable_ltdl_install" = x"yes"; then 429342d69509Smrg ac_configure_args="$ac_configure_args --enable-ltdl-install" 429442d69509Smrg LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la 429542d69509Smrg LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 429642d69509Smrg else 429742d69509Smrg ac_configure_args="$ac_configure_args --enable-ltdl-install=no" 429842d69509Smrg LIBLTDL="-lltdl" 429942d69509Smrg LTDLINCL= 430042d69509Smrg fi 430142d69509Smrg # For backwards non-gettext consistent compatibility... 430242d69509Smrg INCLTDL="$LTDLINCL" 430342d69509Smrg])# AC_LIBLTDL_INSTALLABLE 43044456fccdSmrg 43054456fccdSmrg 430642d69509Smrg# AC_LIBTOOL_CXX 430742d69509Smrg# -------------- 430842d69509Smrg# enable support for C++ libraries 430942d69509SmrgAC_DEFUN([AC_LIBTOOL_CXX], 431042d69509Smrg[AC_REQUIRE([_LT_AC_LANG_CXX]) 431142d69509Smrg])# AC_LIBTOOL_CXX 43124456fccdSmrg 43134456fccdSmrg 431442d69509Smrg# _LT_AC_LANG_CXX 431542d69509Smrg# --------------- 431642d69509SmrgAC_DEFUN([_LT_AC_LANG_CXX], 431742d69509Smrg[AC_REQUIRE([AC_PROG_CXX]) 431842d69509SmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 431942d69509Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) 432042d69509Smrg])# _LT_AC_LANG_CXX 43214456fccdSmrg 432242d69509Smrg# _LT_AC_PROG_CXXCPP 432342d69509Smrg# ------------------ 432442d69509SmrgAC_DEFUN([_LT_AC_PROG_CXXCPP], 432542d69509Smrg[ 432642d69509SmrgAC_REQUIRE([AC_PROG_CXX]) 432742d69509Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 432842d69509Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 432942d69509Smrg (test "X$CXX" != "Xg++"))) ; then 433042d69509Smrg AC_PROG_CXXCPP 433142d69509Smrgfi 433242d69509Smrg])# _LT_AC_PROG_CXXCPP 43334456fccdSmrg 433442d69509Smrg# AC_LIBTOOL_F77 433542d69509Smrg# -------------- 433642d69509Smrg# enable support for Fortran 77 libraries 433742d69509SmrgAC_DEFUN([AC_LIBTOOL_F77], 433842d69509Smrg[AC_REQUIRE([_LT_AC_LANG_F77]) 433942d69509Smrg])# AC_LIBTOOL_F77 43404456fccdSmrg 43414456fccdSmrg 434242d69509Smrg# _LT_AC_LANG_F77 434342d69509Smrg# --------------- 434442d69509SmrgAC_DEFUN([_LT_AC_LANG_F77], 434542d69509Smrg[AC_REQUIRE([AC_PROG_F77]) 434642d69509Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) 434742d69509Smrg])# _LT_AC_LANG_F77 43484456fccdSmrg 434942d69509Smrg 435042d69509Smrg# AC_LIBTOOL_GCJ 435142d69509Smrg# -------------- 435242d69509Smrg# enable support for GCJ libraries 435342d69509SmrgAC_DEFUN([AC_LIBTOOL_GCJ], 435442d69509Smrg[AC_REQUIRE([_LT_AC_LANG_GCJ]) 435542d69509Smrg])# AC_LIBTOOL_GCJ 435642d69509Smrg 435742d69509Smrg 435842d69509Smrg# _LT_AC_LANG_GCJ 435942d69509Smrg# --------------- 436042d69509SmrgAC_DEFUN([_LT_AC_LANG_GCJ], 436142d69509Smrg[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], 436242d69509Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], 436342d69509Smrg [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], 436442d69509Smrg [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], 436542d69509Smrg [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], 436642d69509Smrg [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) 436742d69509Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) 436842d69509Smrg])# _LT_AC_LANG_GCJ 436942d69509Smrg 437042d69509Smrg 437142d69509Smrg# AC_LIBTOOL_RC 437242d69509Smrg# ------------- 437342d69509Smrg# enable support for Windows resource files 437442d69509SmrgAC_DEFUN([AC_LIBTOOL_RC], 437542d69509Smrg[AC_REQUIRE([LT_AC_PROG_RC]) 437642d69509Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) 437742d69509Smrg])# AC_LIBTOOL_RC 437842d69509Smrg 437942d69509Smrg 438042d69509Smrg# AC_LIBTOOL_LANG_C_CONFIG 438142d69509Smrg# ------------------------ 438242d69509Smrg# Ensure that the configuration vars for the C compiler are 438342d69509Smrg# suitably defined. Those variables are subsequently used by 438442d69509Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 438542d69509SmrgAC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) 438642d69509SmrgAC_DEFUN([_LT_AC_LANG_C_CONFIG], 438742d69509Smrg[lt_save_CC="$CC" 438842d69509SmrgAC_LANG_PUSH(C) 438942d69509Smrg 439042d69509Smrg# Source file extension for C test sources. 439142d69509Smrgac_ext=c 439242d69509Smrg 439342d69509Smrg# Object file extension for compiled C test sources. 439442d69509Smrgobjext=o 439542d69509Smrg_LT_AC_TAGVAR(objext, $1)=$objext 439642d69509Smrg 439742d69509Smrg# Code to be used in simple compile tests 439842d69509Smrglt_simple_compile_test_code="int some_variable = 0;" 439942d69509Smrg 440042d69509Smrg# Code to be used in simple link tests 440142d69509Smrglt_simple_link_test_code='int main(){return(0);}' 440242d69509Smrg 440342d69509Smrg_LT_AC_SYS_COMPILER 440442d69509Smrg 440542d69509Smrg# save warnings/boilerplate of simple test code 440642d69509Smrg_LT_COMPILER_BOILERPLATE 440742d69509Smrg_LT_LINKER_BOILERPLATE 440842d69509Smrg 440942d69509SmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 441042d69509SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 441142d69509SmrgAC_LIBTOOL_PROG_CC_C_O($1) 44124456fccdSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 44134456fccdSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 44144456fccdSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 44154456fccdSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 441642d69509SmrgAC_LIBTOOL_SYS_LIB_STRIP 441742d69509SmrgAC_LIBTOOL_DLOPEN_SELF 441842d69509Smrg 441942d69509Smrg# Report which library types will actually be built 442042d69509SmrgAC_MSG_CHECKING([if libtool supports shared libraries]) 442142d69509SmrgAC_MSG_RESULT([$can_build_shared]) 442242d69509Smrg 442342d69509SmrgAC_MSG_CHECKING([whether to build shared libraries]) 442442d69509Smrgtest "$can_build_shared" = "no" && enable_shared=no 442542d69509Smrg 442642d69509Smrg# On AIX, shared libraries and static libraries use the same namespace, and 442742d69509Smrg# are all built from PIC. 442842d69509Smrgcase $host_os in 442942d69509Smrgaix3*) 443042d69509Smrg test "$enable_shared" = yes && enable_static=no 443142d69509Smrg if test -n "$RANLIB"; then 443242d69509Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 443342d69509Smrg postinstall_cmds='$RANLIB $lib' 443442d69509Smrg fi 443542d69509Smrg ;; 443642d69509Smrg 443742d69509Smrgaix[[4-9]]*) 443842d69509Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 443942d69509Smrg test "$enable_shared" = yes && enable_static=no 444042d69509Smrg fi 444142d69509Smrg ;; 444242d69509Smrgesac 444342d69509SmrgAC_MSG_RESULT([$enable_shared]) 444442d69509Smrg 444542d69509SmrgAC_MSG_CHECKING([whether to build static libraries]) 444642d69509Smrg# Make sure either enable_shared or enable_static is yes. 444742d69509Smrgtest "$enable_shared" = yes || enable_static=yes 444842d69509SmrgAC_MSG_RESULT([$enable_static]) 44494456fccdSmrg 44504456fccdSmrgAC_LIBTOOL_CONFIG($1) 44514456fccdSmrg 445242d69509SmrgAC_LANG_POP 44534456fccdSmrgCC="$lt_save_CC" 445442d69509Smrg])# AC_LIBTOOL_LANG_C_CONFIG 44554456fccdSmrg 44564456fccdSmrg 445742d69509Smrg# AC_LIBTOOL_LANG_CXX_CONFIG 445842d69509Smrg# -------------------------- 445942d69509Smrg# Ensure that the configuration vars for the C compiler are 44604456fccdSmrg# suitably defined. Those variables are subsequently used by 44614456fccdSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 446242d69509SmrgAC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) 446342d69509SmrgAC_DEFUN([_LT_AC_LANG_CXX_CONFIG], 446442d69509Smrg[AC_LANG_PUSH(C++) 446542d69509SmrgAC_REQUIRE([AC_PROG_CXX]) 446642d69509SmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP]) 44674456fccdSmrg 446842d69509Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 446942d69509Smrg_LT_AC_TAGVAR(allow_undefined_flag, $1)= 447042d69509Smrg_LT_AC_TAGVAR(always_export_symbols, $1)=no 447142d69509Smrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 447242d69509Smrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 447342d69509Smrg_LT_AC_TAGVAR(hardcode_direct, $1)=no 447442d69509Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 447542d69509Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 447642d69509Smrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 447742d69509Smrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 447842d69509Smrg_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 447942d69509Smrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no 448042d69509Smrg_LT_AC_TAGVAR(module_cmds, $1)= 448142d69509Smrg_LT_AC_TAGVAR(module_expsym_cmds, $1)= 448242d69509Smrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 448342d69509Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 448442d69509Smrg_LT_AC_TAGVAR(no_undefined_flag, $1)= 448542d69509Smrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 448642d69509Smrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 44874456fccdSmrg 448842d69509Smrg# Dependencies to place before and after the object being linked: 448942d69509Smrg_LT_AC_TAGVAR(predep_objects, $1)= 449042d69509Smrg_LT_AC_TAGVAR(postdep_objects, $1)= 449142d69509Smrg_LT_AC_TAGVAR(predeps, $1)= 449242d69509Smrg_LT_AC_TAGVAR(postdeps, $1)= 449342d69509Smrg_LT_AC_TAGVAR(compiler_lib_search_path, $1)= 449442d69509Smrg_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)= 449542d69509Smrg 449642d69509Smrg# Source file extension for C++ test sources. 449742d69509Smrgac_ext=cpp 449842d69509Smrg 449942d69509Smrg# Object file extension for compiled C++ test sources. 45004456fccdSmrgobjext=o 45014456fccdSmrg_LT_AC_TAGVAR(objext, $1)=$objext 45024456fccdSmrg 45034456fccdSmrg# Code to be used in simple compile tests 450442d69509Smrglt_simple_compile_test_code="int some_variable = 0;" 45054456fccdSmrg 45064456fccdSmrg# Code to be used in simple link tests 450742d69509Smrglt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 45084456fccdSmrg 45094456fccdSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 45104456fccdSmrg_LT_AC_SYS_COMPILER 45114456fccdSmrg 45124456fccdSmrg# save warnings/boilerplate of simple test code 45134456fccdSmrg_LT_COMPILER_BOILERPLATE 45144456fccdSmrg_LT_LINKER_BOILERPLATE 45154456fccdSmrg 45164456fccdSmrg# Allow CC to be a program name with arguments. 451742d69509Smrglt_save_CC=$CC 451842d69509Smrglt_save_LD=$LD 451942d69509Smrglt_save_GCC=$GCC 452042d69509SmrgGCC=$GXX 452142d69509Smrglt_save_with_gnu_ld=$with_gnu_ld 452242d69509Smrglt_save_path_LD=$lt_cv_path_LD 452342d69509Smrgif test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 452442d69509Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 452542d69509Smrgelse 452642d69509Smrg $as_unset lt_cv_prog_gnu_ld 452742d69509Smrgfi 452842d69509Smrgif test -n "${lt_cv_path_LDCXX+set}"; then 452942d69509Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 453042d69509Smrgelse 453142d69509Smrg $as_unset lt_cv_path_LD 453242d69509Smrgfi 453342d69509Smrgtest -z "${LDCXX+set}" || LD=$LDCXX 453442d69509SmrgCC=${CXX-"c++"} 45354456fccdSmrgcompiler=$CC 45364456fccdSmrg_LT_AC_TAGVAR(compiler, $1)=$CC 45374456fccdSmrg_LT_CC_BASENAME([$compiler]) 45384456fccdSmrg 453942d69509Smrg# We don't want -fno-exception wen compiling C++ code, so set the 454042d69509Smrg# no_builtin_flag separately 454142d69509Smrgif test "$GXX" = yes; then 454242d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 454342d69509Smrgelse 454442d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 454542d69509Smrgfi 45464456fccdSmrg 454742d69509Smrgif test "$GXX" = yes; then 454842d69509Smrg # Set up default GNU C++ configuration 45494456fccdSmrg 455042d69509Smrg AC_PROG_LD 45514456fccdSmrg 455242d69509Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 455342d69509Smrg # archiving commands below assume that GNU ld is being used. 455442d69509Smrg if test "$with_gnu_ld" = yes; then 455542d69509Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 455642d69509Smrg _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' 45574456fccdSmrg 455842d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 455942d69509Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 45604456fccdSmrg 456142d69509Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 456242d69509Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 456342d69509Smrg # investigate it a little bit more. (MM) 456442d69509Smrg wlarc='${wl}' 45654456fccdSmrg 456642d69509Smrg # ancient GNU ld didn't support --whole-archive et. al. 456742d69509Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ 456842d69509Smrg grep 'no-whole-archive' > /dev/null; then 456942d69509Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 457042d69509Smrg else 457142d69509Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 457242d69509Smrg fi 457342d69509Smrg else 457442d69509Smrg with_gnu_ld=no 457542d69509Smrg wlarc= 45764456fccdSmrg 457742d69509Smrg # A generic and very simple default shared library creation 457842d69509Smrg # command for GNU C++ for the case where it uses the native 457942d69509Smrg # linker, instead of GNU ld. If possible, this setting should 458042d69509Smrg # overridden to take advantage of the native linker features on 458142d69509Smrg # the platform it is being used on. 458242d69509Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 458342d69509Smrg fi 45844456fccdSmrg 458542d69509Smrg # Commands to make compiler produce verbose output that lists 458642d69509Smrg # what "hidden" libraries, object files and flags are used when 458742d69509Smrg # linking a shared library. 458842d69509Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 45894456fccdSmrg 459042d69509Smrgelse 459142d69509Smrg GXX=no 459242d69509Smrg with_gnu_ld=no 459342d69509Smrg wlarc= 459442d69509Smrgfi 45954456fccdSmrg 459642d69509Smrg# PORTME: fill in a description of your system's C++ link characteristics 459742d69509SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 459842d69509Smrg_LT_AC_TAGVAR(ld_shlibs, $1)=yes 459942d69509Smrgcase $host_os in 460042d69509Smrg aix3*) 460142d69509Smrg # FIXME: insert proper C++ library support 460242d69509Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 460342d69509Smrg ;; 460442d69509Smrg aix[[4-9]]*) 460542d69509Smrg if test "$host_cpu" = ia64; then 460642d69509Smrg # On IA64, the linker does run time linking by default, so we don't 460742d69509Smrg # have to do anything special. 460842d69509Smrg aix_use_runtimelinking=no 460942d69509Smrg exp_sym_flag='-Bexport' 461042d69509Smrg no_entry_flag="" 461142d69509Smrg else 461242d69509Smrg aix_use_runtimelinking=no 46134456fccdSmrg 461442d69509Smrg # Test if we are trying to use run time linking or normal 461542d69509Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 461642d69509Smrg # need to do runtime linking. 461742d69509Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 461842d69509Smrg for ld_flag in $LDFLAGS; do 461942d69509Smrg case $ld_flag in 462042d69509Smrg *-brtl*) 462142d69509Smrg aix_use_runtimelinking=yes 462242d69509Smrg break 462342d69509Smrg ;; 462442d69509Smrg esac 462542d69509Smrg done 462642d69509Smrg ;; 462742d69509Smrg esac 46284456fccdSmrg 462942d69509Smrg exp_sym_flag='-bexport' 463042d69509Smrg no_entry_flag='-bnoentry' 463142d69509Smrg fi 46324456fccdSmrg 463342d69509Smrg # When large executables or shared objects are built, AIX ld can 463442d69509Smrg # have problems creating the table of contents. If linking a library 463542d69509Smrg # or program results in "error TOC overflow" add -mminimal-toc to 463642d69509Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 463742d69509Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 46384456fccdSmrg 463942d69509Smrg _LT_AC_TAGVAR(archive_cmds, $1)='' 464042d69509Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 464142d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 464242d69509Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 46434456fccdSmrg 464442d69509Smrg if test "$GXX" = yes; then 464542d69509Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 464642d69509Smrg # We only want to do this on AIX 4.2 and lower, the check 464742d69509Smrg # below for broken collect2 doesn't work under 4.3+ 464842d69509Smrg collect2name=`${CC} -print-prog-name=collect2` 464942d69509Smrg if test -f "$collect2name" && \ 465042d69509Smrg strings "$collect2name" | grep resolve_lib_name >/dev/null 465142d69509Smrg then 465242d69509Smrg # We have reworked collect2 465342d69509Smrg : 465442d69509Smrg else 465542d69509Smrg # We have old collect2 465642d69509Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 465742d69509Smrg # It fails to find uninstalled libraries when the uninstalled 465842d69509Smrg # path is not listed in the libpath. Setting hardcode_minus_L 465942d69509Smrg # to unsupported forces relinking 466042d69509Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 466142d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 466242d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 466342d69509Smrg fi 466442d69509Smrg ;; 466542d69509Smrg esac 466642d69509Smrg shared_flag='-shared' 466742d69509Smrg if test "$aix_use_runtimelinking" = yes; then 466842d69509Smrg shared_flag="$shared_flag "'${wl}-G' 466942d69509Smrg fi 467042d69509Smrg else 467142d69509Smrg # not using gcc 467242d69509Smrg if test "$host_cpu" = ia64; then 467342d69509Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 467442d69509Smrg # chokes on -Wl,-G. The following line is correct: 467542d69509Smrg shared_flag='-G' 467642d69509Smrg else 467742d69509Smrg if test "$aix_use_runtimelinking" = yes; then 467842d69509Smrg shared_flag='${wl}-G' 467942d69509Smrg else 468042d69509Smrg shared_flag='${wl}-bM:SRE' 468142d69509Smrg fi 468242d69509Smrg fi 468342d69509Smrg fi 46844456fccdSmrg 468542d69509Smrg # It seems that -bexpall does not export symbols beginning with 468642d69509Smrg # underscore (_), so it is better to generate a list of symbols to export. 468742d69509Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 468842d69509Smrg if test "$aix_use_runtimelinking" = yes; then 468942d69509Smrg # Warning - without using the other runtime loading flags (-brtl), 469042d69509Smrg # -berok will link without error, but may produce a broken library. 469142d69509Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 469242d69509Smrg # Determine the default libpath from the value encoded in an empty executable. 469342d69509Smrg _LT_AC_SYS_LIBPATH_AIX 469442d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 46954456fccdSmrg 469642d69509Smrg _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" 469742d69509Smrg else 469842d69509Smrg if test "$host_cpu" = ia64; then 469942d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 470042d69509Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 470142d69509Smrg _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" 470242d69509Smrg else 470342d69509Smrg # Determine the default libpath from the value encoded in an empty executable. 470442d69509Smrg _LT_AC_SYS_LIBPATH_AIX 470542d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 470642d69509Smrg # Warning - without using the other run time loading flags, 470742d69509Smrg # -berok will link without error, but may produce a broken library. 470842d69509Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 470942d69509Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 471042d69509Smrg # Exported symbols can be pulled into shared objects from archives 471142d69509Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 471242d69509Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 471342d69509Smrg # This is similar to how AIX traditionally builds its shared libraries. 471442d69509Smrg _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' 471542d69509Smrg fi 471642d69509Smrg fi 471742d69509Smrg ;; 47184456fccdSmrg 471942d69509Smrg beos*) 472042d69509Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 472142d69509Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 472242d69509Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 472342d69509Smrg # support --undefined. This deserves some investigation. FIXME 472442d69509Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 472542d69509Smrg else 472642d69509Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 472742d69509Smrg fi 472842d69509Smrg ;; 47294456fccdSmrg 473042d69509Smrg chorus*) 473142d69509Smrg case $cc_basename in 473242d69509Smrg *) 473342d69509Smrg # FIXME: insert proper C++ library support 473442d69509Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 473542d69509Smrg ;; 473642d69509Smrg esac 473742d69509Smrg ;; 47384456fccdSmrg 473942d69509Smrg cygwin* | mingw* | pw32*) 474042d69509Smrg # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 474142d69509Smrg # as there is no search path for DLLs. 474242d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 474342d69509Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 474442d69509Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 474542d69509Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 47464456fccdSmrg 474742d69509Smrg if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 474842d69509Smrg _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' 474942d69509Smrg # If the export-symbols file already is a .def file (1st line 475042d69509Smrg # is EXPORTS), use it as is; otherwise, prepend... 475142d69509Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 475242d69509Smrg cp $export_symbols $output_objdir/$soname.def; 475342d69509Smrg else 475442d69509Smrg echo EXPORTS > $output_objdir/$soname.def; 475542d69509Smrg cat $export_symbols >> $output_objdir/$soname.def; 475642d69509Smrg fi~ 475742d69509Smrg $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' 475842d69509Smrg else 475942d69509Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 476042d69509Smrg fi 476142d69509Smrg ;; 476242d69509Smrg darwin* | rhapsody*) 476342d69509Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 476442d69509Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 476542d69509Smrg _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 476642d69509Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 476742d69509Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 476842d69509Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 476942d69509Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 477042d69509Smrg if test "$GXX" = yes ; then 477142d69509Smrg output_verbose_link_cmd='echo' 477242d69509Smrg _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}" 477342d69509Smrg _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 477442d69509Smrg _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}" 477542d69509Smrg _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}" 477642d69509Smrg if test "$lt_cv_apple_cc_single_mod" != "yes"; then 477742d69509Smrg _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}" 477842d69509Smrg _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}" 477942d69509Smrg fi 478042d69509Smrg else 478142d69509Smrg case $cc_basename in 478242d69509Smrg xlc*) 478342d69509Smrg output_verbose_link_cmd='echo' 478442d69509Smrg _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' 478542d69509Smrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 478642d69509Smrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 478742d69509Smrg _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}' 478842d69509Smrg _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}' 478942d69509Smrg ;; 479042d69509Smrg *) 479142d69509Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 479242d69509Smrg ;; 479342d69509Smrg esac 479442d69509Smrg fi 479542d69509Smrg ;; 47964456fccdSmrg 479742d69509Smrg dgux*) 479842d69509Smrg case $cc_basename in 479942d69509Smrg ec++*) 480042d69509Smrg # FIXME: insert proper C++ library support 480142d69509Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 480242d69509Smrg ;; 480342d69509Smrg ghcx*) 480442d69509Smrg # Green Hills C++ Compiler 480542d69509Smrg # FIXME: insert proper C++ library support 480642d69509Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 480742d69509Smrg ;; 480842d69509Smrg *) 480942d69509Smrg # FIXME: insert proper C++ library support 481042d69509Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 481142d69509Smrg ;; 481242d69509Smrg esac 481342d69509Smrg ;; 481442d69509Smrg freebsd[[12]]*) 481542d69509Smrg # C++ shared libraries reported to be fairly broken before switch to ELF 481642d69509Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 481742d69509Smrg ;; 481842d69509Smrg freebsd-elf*) 481942d69509Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 482042d69509Smrg ;; 482142d69509Smrg freebsd* | dragonfly*) 482242d69509Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 482342d69509Smrg # conventions 482442d69509Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 482542d69509Smrg ;; 482642d69509Smrg gnu*) 482742d69509Smrg ;; 482842d69509Smrg hpux9*) 482942d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 483042d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 483142d69509Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 483242d69509Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 483342d69509Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 483442d69509Smrg # but as the default 483542d69509Smrg # location of the library. 48364456fccdSmrg 483742d69509Smrg case $cc_basename in 483842d69509Smrg CC*) 483942d69509Smrg # FIXME: insert proper C++ library support 484042d69509Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 484142d69509Smrg ;; 484242d69509Smrg aCC*) 484342d69509Smrg _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' 484442d69509Smrg # Commands to make compiler produce verbose output that lists 484542d69509Smrg # what "hidden" libraries, object files and flags are used when 484642d69509Smrg # linking a shared library. 484742d69509Smrg # 484842d69509Smrg # There doesn't appear to be a way to prevent this compiler from 484942d69509Smrg # explicitly linking system object files so we need to strip them 485042d69509Smrg # from the output so that they don't get included in the library 485142d69509Smrg # dependencies. 485242d69509Smrg 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' 485342d69509Smrg ;; 485442d69509Smrg *) 485542d69509Smrg if test "$GXX" = yes; then 485642d69509Smrg _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' 485742d69509Smrg else 485842d69509Smrg # FIXME: insert proper C++ library support 485942d69509Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 486042d69509Smrg fi 486142d69509Smrg ;; 486242d69509Smrg esac 486342d69509Smrg ;; 486442d69509Smrg hpux10*|hpux11*) 486542d69509Smrg if test $with_gnu_ld = no; then 486642d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 486742d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 48684456fccdSmrg 486942d69509Smrg case $host_cpu in 487042d69509Smrg hppa*64*|ia64*) ;; 487142d69509Smrg *) 487242d69509Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 487342d69509Smrg ;; 487442d69509Smrg esac 487542d69509Smrg fi 487642d69509Smrg case $host_cpu in 487742d69509Smrg hppa*64*|ia64*) 487842d69509Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 487942d69509Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 488042d69509Smrg ;; 488142d69509Smrg *) 488242d69509Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 488342d69509Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 488442d69509Smrg # but as the default 488542d69509Smrg # location of the library. 488642d69509Smrg ;; 488742d69509Smrg esac 48884456fccdSmrg 488942d69509Smrg case $cc_basename in 489042d69509Smrg CC*) 489142d69509Smrg # FIXME: insert proper C++ library support 489242d69509Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 489342d69509Smrg ;; 489442d69509Smrg aCC*) 489542d69509Smrg case $host_cpu in 489642d69509Smrg hppa*64*) 489742d69509Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 489842d69509Smrg ;; 489942d69509Smrg ia64*) 490042d69509Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 490142d69509Smrg ;; 490242d69509Smrg *) 490342d69509Smrg _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' 490442d69509Smrg ;; 490542d69509Smrg esac 490642d69509Smrg # Commands to make compiler produce verbose output that lists 490742d69509Smrg # what "hidden" libraries, object files and flags are used when 490842d69509Smrg # linking a shared library. 490942d69509Smrg # 491042d69509Smrg # There doesn't appear to be a way to prevent this compiler from 491142d69509Smrg # explicitly linking system object files so we need to strip them 491242d69509Smrg # from the output so that they don't get included in the library 491342d69509Smrg # dependencies. 491442d69509Smrg 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' 491542d69509Smrg ;; 491642d69509Smrg *) 491742d69509Smrg if test "$GXX" = yes; then 491842d69509Smrg if test $with_gnu_ld = no; then 491942d69509Smrg case $host_cpu in 492042d69509Smrg hppa*64*) 492142d69509Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 492242d69509Smrg ;; 492342d69509Smrg ia64*) 492442d69509Smrg _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' 492542d69509Smrg ;; 492642d69509Smrg *) 492742d69509Smrg _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' 492842d69509Smrg ;; 492942d69509Smrg esac 493042d69509Smrg fi 493142d69509Smrg else 493242d69509Smrg # FIXME: insert proper C++ library support 493342d69509Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 493442d69509Smrg fi 493542d69509Smrg ;; 493642d69509Smrg esac 493742d69509Smrg ;; 493842d69509Smrg interix[[3-9]]*) 493942d69509Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 494042d69509Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 494142d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 494242d69509Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 494342d69509Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 494442d69509Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 494542d69509Smrg # default) and relocated if they conflict, which is a slow very memory 494642d69509Smrg # consuming and fragmenting process. To avoid this, we pick a random, 494742d69509Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 494842d69509Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 494942d69509Smrg _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' 495042d69509Smrg _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' 495142d69509Smrg ;; 495242d69509Smrg irix5* | irix6*) 495342d69509Smrg case $cc_basename in 495442d69509Smrg CC*) 495542d69509Smrg # SGI C++ 495642d69509Smrg _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' 49574456fccdSmrg 495842d69509Smrg # Archives containing C++ object files must be created using 495942d69509Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 496042d69509Smrg # necessary to make sure instantiated templates are included 496142d69509Smrg # in the archive. 496242d69509Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 496342d69509Smrg ;; 496442d69509Smrg *) 496542d69509Smrg if test "$GXX" = yes; then 496642d69509Smrg if test "$with_gnu_ld" = no; then 496742d69509Smrg _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' 496842d69509Smrg else 496942d69509Smrg _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' 497042d69509Smrg fi 497142d69509Smrg fi 497242d69509Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 497342d69509Smrg ;; 497442d69509Smrg esac 497542d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 497642d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 497742d69509Smrg ;; 497842d69509Smrg linux* | k*bsd*-gnu) 497942d69509Smrg case $cc_basename in 498042d69509Smrg KCC*) 498142d69509Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 49824456fccdSmrg 498342d69509Smrg # KCC will only create a shared library if the output file 498442d69509Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 498542d69509Smrg # to its proper name (with version) after linking. 498642d69509Smrg _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' 498742d69509Smrg _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' 498842d69509Smrg # Commands to make compiler produce verbose output that lists 498942d69509Smrg # what "hidden" libraries, object files and flags are used when 499042d69509Smrg # linking a shared library. 499142d69509Smrg # 499242d69509Smrg # There doesn't appear to be a way to prevent this compiler from 499342d69509Smrg # explicitly linking system object files so we need to strip them 499442d69509Smrg # from the output so that they don't get included in the library 499542d69509Smrg # dependencies. 499642d69509Smrg 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' 49974456fccdSmrg 499842d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' 499942d69509Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 50004456fccdSmrg 500142d69509Smrg # Archives containing C++ object files must be created using 500242d69509Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 500342d69509Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 500442d69509Smrg ;; 500542d69509Smrg icpc*) 500642d69509Smrg # Intel C++ 500742d69509Smrg with_gnu_ld=yes 500842d69509Smrg # version 8.0 and above of icpc choke on multiply defined symbols 500942d69509Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 501042d69509Smrg # earlier do not add the objects themselves. 501142d69509Smrg case `$CC -V 2>&1` in 501242d69509Smrg *"Version 7."*) 501342d69509Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 501442d69509Smrg _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' 501542d69509Smrg ;; 501642d69509Smrg *) # Version 8.0 or newer 501742d69509Smrg tmp_idyn= 501842d69509Smrg case $host_cpu in 501942d69509Smrg ia64*) tmp_idyn=' -i_dynamic';; 502042d69509Smrg esac 502142d69509Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 502242d69509Smrg _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' 502342d69509Smrg ;; 502442d69509Smrg esac 502542d69509Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 502642d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 502742d69509Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 502842d69509Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 502942d69509Smrg ;; 503042d69509Smrg pgCC* | pgcpp*) 503142d69509Smrg # Portland Group C++ compiler 503242d69509Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 503342d69509Smrg _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' 50344456fccdSmrg 503542d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 503642d69509Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 503742d69509Smrg _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' 503842d69509Smrg ;; 503942d69509Smrg cxx*) 504042d69509Smrg # Compaq C++ 504142d69509Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 504242d69509Smrg _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' 50434456fccdSmrg 504442d69509Smrg runpath_var=LD_RUN_PATH 504542d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 504642d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 50474456fccdSmrg 504842d69509Smrg # Commands to make compiler produce verbose output that lists 504942d69509Smrg # what "hidden" libraries, object files and flags are used when 505042d69509Smrg # linking a shared library. 505142d69509Smrg # 505242d69509Smrg # There doesn't appear to be a way to prevent this compiler from 505342d69509Smrg # explicitly linking system object files so we need to strip them 505442d69509Smrg # from the output so that they don't get included in the library 505542d69509Smrg # dependencies. 505642d69509Smrg 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' 505742d69509Smrg ;; 505842d69509Smrg *) 505942d69509Smrg case `$CC -V 2>&1 | sed 5q` in 506042d69509Smrg *Sun\ C*) 506142d69509Smrg # Sun C++ 5.9 506242d69509Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' 506342d69509Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 506442d69509Smrg _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' 506542d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 506642d69509Smrg _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' 506742d69509Smrg 506842d69509Smrg # Not sure whether something based on 506942d69509Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 507042d69509Smrg # would be better. 507142d69509Smrg output_verbose_link_cmd='echo' 507242d69509Smrg 507342d69509Smrg # Archives containing C++ object files must be created using 507442d69509Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 507542d69509Smrg # necessary to make sure instantiated templates are included 507642d69509Smrg # in the archive. 507742d69509Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 507842d69509Smrg ;; 507942d69509Smrg esac 508042d69509Smrg ;; 508142d69509Smrg esac 508242d69509Smrg ;; 508342d69509Smrg lynxos*) 508442d69509Smrg # FIXME: insert proper C++ library support 508542d69509Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 508642d69509Smrg ;; 508742d69509Smrg m88k*) 508842d69509Smrg # FIXME: insert proper C++ library support 508942d69509Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 509042d69509Smrg ;; 509142d69509Smrg mvs*) 509242d69509Smrg case $cc_basename in 509342d69509Smrg cxx*) 509442d69509Smrg # FIXME: insert proper C++ library support 509542d69509Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 509642d69509Smrg ;; 509742d69509Smrg *) 509842d69509Smrg # FIXME: insert proper C++ library support 509942d69509Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 510042d69509Smrg ;; 510142d69509Smrg esac 510242d69509Smrg ;; 510342d69509Smrg netbsd*) 510442d69509Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 510542d69509Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 510642d69509Smrg wlarc= 510742d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 510842d69509Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 510942d69509Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 511042d69509Smrg fi 511142d69509Smrg # Workaround some broken pre-1.5 toolchains 511242d69509Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 511342d69509Smrg ;; 511442d69509Smrg openbsd2*) 511542d69509Smrg # C++ shared libraries are fairly broken 511642d69509Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 511742d69509Smrg ;; 511842d69509Smrg openbsd*) 511942d69509Smrg if test -f /usr/libexec/ld.so; then 512042d69509Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 512142d69509Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 512242d69509Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 512342d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 512442d69509Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 512542d69509Smrg _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' 512642d69509Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 512742d69509Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 512842d69509Smrg fi 512942d69509Smrg output_verbose_link_cmd='echo' 513042d69509Smrg else 513142d69509Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 513242d69509Smrg fi 513342d69509Smrg ;; 513442d69509Smrg osf3*) 513542d69509Smrg case $cc_basename in 513642d69509Smrg KCC*) 513742d69509Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 51384456fccdSmrg 513942d69509Smrg # KCC will only create a shared library if the output file 514042d69509Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 514142d69509Smrg # to its proper name (with version) after linking. 514242d69509Smrg _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' 51434456fccdSmrg 514442d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 514542d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 51464456fccdSmrg 514742d69509Smrg # Archives containing C++ object files must be created using 514842d69509Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 514942d69509Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 51504456fccdSmrg 515142d69509Smrg ;; 515242d69509Smrg RCC*) 515342d69509Smrg # Rational C++ 2.4.1 515442d69509Smrg # FIXME: insert proper C++ library support 515542d69509Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 515642d69509Smrg ;; 515742d69509Smrg cxx*) 515842d69509Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 515942d69509Smrg _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' 51604456fccdSmrg 516142d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 516242d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 51634456fccdSmrg 516442d69509Smrg # Commands to make compiler produce verbose output that lists 516542d69509Smrg # what "hidden" libraries, object files and flags are used when 516642d69509Smrg # linking a shared library. 516742d69509Smrg # 516842d69509Smrg # There doesn't appear to be a way to prevent this compiler from 516942d69509Smrg # explicitly linking system object files so we need to strip them 517042d69509Smrg # from the output so that they don't get included in the library 517142d69509Smrg # dependencies. 517242d69509Smrg 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' 517342d69509Smrg ;; 517442d69509Smrg *) 517542d69509Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 517642d69509Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 517742d69509Smrg _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' 51784456fccdSmrg 517942d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 518042d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 51814456fccdSmrg 518242d69509Smrg # Commands to make compiler produce verbose output that lists 518342d69509Smrg # what "hidden" libraries, object files and flags are used when 518442d69509Smrg # linking a shared library. 518542d69509Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 51864456fccdSmrg 518742d69509Smrg else 518842d69509Smrg # FIXME: insert proper C++ library support 518942d69509Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 519042d69509Smrg fi 519142d69509Smrg ;; 519242d69509Smrg esac 519342d69509Smrg ;; 519442d69509Smrg osf4* | osf5*) 519542d69509Smrg case $cc_basename in 519642d69509Smrg KCC*) 519742d69509Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 51984456fccdSmrg 519942d69509Smrg # KCC will only create a shared library if the output file 520042d69509Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 520142d69509Smrg # to its proper name (with version) after linking. 520242d69509Smrg _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' 52034456fccdSmrg 520442d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 520542d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 52064456fccdSmrg 520742d69509Smrg # Archives containing C++ object files must be created using 520842d69509Smrg # the KAI C++ compiler. 520942d69509Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' 521042d69509Smrg ;; 521142d69509Smrg RCC*) 521242d69509Smrg # Rational C++ 2.4.1 521342d69509Smrg # FIXME: insert proper C++ library support 521442d69509Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 521542d69509Smrg ;; 521642d69509Smrg cxx*) 521742d69509Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 521842d69509Smrg _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' 521942d69509Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 522042d69509Smrg echo "-hidden">> $lib.exp~ 522142d69509Smrg $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~ 522242d69509Smrg $rm $lib.exp' 52234456fccdSmrg 522442d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 522542d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 52264456fccdSmrg 522742d69509Smrg # Commands to make compiler produce verbose output that lists 522842d69509Smrg # what "hidden" libraries, object files and flags are used when 522942d69509Smrg # linking a shared library. 523042d69509Smrg # 523142d69509Smrg # There doesn't appear to be a way to prevent this compiler from 523242d69509Smrg # explicitly linking system object files so we need to strip them 523342d69509Smrg # from the output so that they don't get included in the library 523442d69509Smrg # dependencies. 523542d69509Smrg 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' 523642d69509Smrg ;; 523742d69509Smrg *) 523842d69509Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 523942d69509Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 524042d69509Smrg _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' 52414456fccdSmrg 524242d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 524342d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 52444456fccdSmrg 524542d69509Smrg # Commands to make compiler produce verbose output that lists 524642d69509Smrg # what "hidden" libraries, object files and flags are used when 524742d69509Smrg # linking a shared library. 524842d69509Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' 52494456fccdSmrg 525042d69509Smrg else 525142d69509Smrg # FIXME: insert proper C++ library support 525242d69509Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 525342d69509Smrg fi 525442d69509Smrg ;; 525542d69509Smrg esac 525642d69509Smrg ;; 525742d69509Smrg psos*) 525842d69509Smrg # FIXME: insert proper C++ library support 525942d69509Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 526042d69509Smrg ;; 526142d69509Smrg sunos4*) 526242d69509Smrg case $cc_basename in 526342d69509Smrg CC*) 526442d69509Smrg # Sun C++ 4.x 526542d69509Smrg # FIXME: insert proper C++ library support 526642d69509Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 526742d69509Smrg ;; 526842d69509Smrg lcc*) 526942d69509Smrg # Lucid 527042d69509Smrg # FIXME: insert proper C++ library support 527142d69509Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 527242d69509Smrg ;; 527342d69509Smrg *) 527442d69509Smrg # FIXME: insert proper C++ library support 527542d69509Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 527642d69509Smrg ;; 527742d69509Smrg esac 527842d69509Smrg ;; 527942d69509Smrg solaris*) 528042d69509Smrg case $cc_basename in 528142d69509Smrg CC*) 528242d69509Smrg # Sun C++ 4.2, 5.x and Centerline C++ 528342d69509Smrg _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes 528442d69509Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' 528542d69509Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 528642d69509Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 528742d69509Smrg $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' 52884456fccdSmrg 528942d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 529042d69509Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 529142d69509Smrg case $host_os in 529242d69509Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 529342d69509Smrg *) 529442d69509Smrg # The compiler driver will combine and reorder linker options, 529542d69509Smrg # but understands `-z linker_flag'. 529642d69509Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 529742d69509Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 529842d69509Smrg ;; 529942d69509Smrg esac 530042d69509Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 53014456fccdSmrg 530242d69509Smrg output_verbose_link_cmd='echo' 53034456fccdSmrg 530442d69509Smrg # Archives containing C++ object files must be created using 530542d69509Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 530642d69509Smrg # necessary to make sure instantiated templates are included 530742d69509Smrg # in the archive. 530842d69509Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 530942d69509Smrg ;; 531042d69509Smrg gcx*) 531142d69509Smrg # Green Hills C++ Compiler 531242d69509Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 53134456fccdSmrg 531442d69509Smrg # The C++ compiler must be used to create the archive. 531542d69509Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 531642d69509Smrg ;; 531742d69509Smrg *) 531842d69509Smrg # GNU C++ compiler with Solaris linker 531942d69509Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 532042d69509Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 532142d69509Smrg if $CC --version | grep -v '^2\.7' > /dev/null; then 532242d69509Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 532342d69509Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 532442d69509Smrg $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 53254456fccdSmrg 532642d69509Smrg # Commands to make compiler produce verbose output that lists 532742d69509Smrg # what "hidden" libraries, object files and flags are used when 532842d69509Smrg # linking a shared library. 532942d69509Smrg output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 533042d69509Smrg else 533142d69509Smrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 533242d69509Smrg # platform. 533342d69509Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 533442d69509Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 533542d69509Smrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' 53364456fccdSmrg 533742d69509Smrg # Commands to make compiler produce verbose output that lists 533842d69509Smrg # what "hidden" libraries, object files and flags are used when 533942d69509Smrg # linking a shared library. 534042d69509Smrg output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" 534142d69509Smrg fi 53424456fccdSmrg 534342d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 534442d69509Smrg case $host_os in 534542d69509Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 534642d69509Smrg *) 534742d69509Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 534842d69509Smrg ;; 534942d69509Smrg esac 535042d69509Smrg fi 535142d69509Smrg ;; 535242d69509Smrg esac 535342d69509Smrg ;; 535442d69509Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 535542d69509Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 535642d69509Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 535742d69509Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 535842d69509Smrg runpath_var='LD_RUN_PATH' 53594456fccdSmrg 536042d69509Smrg case $cc_basename in 536142d69509Smrg CC*) 536242d69509Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 536342d69509Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 536442d69509Smrg ;; 536542d69509Smrg *) 536642d69509Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 536742d69509Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 536842d69509Smrg ;; 536942d69509Smrg esac 537042d69509Smrg ;; 537142d69509Smrg sysv5* | sco3.2v5* | sco5v6*) 537242d69509Smrg # Note: We can NOT use -z defs as we might desire, because we do not 537342d69509Smrg # link with -lc, and that would cause any symbols used from libc to 537442d69509Smrg # always be unresolved, which means just about no library would 537542d69509Smrg # ever link correctly. If we're not using GNU ld we use -z text 537642d69509Smrg # though, which does catch some bad symbols but isn't as heavy-handed 537742d69509Smrg # as -z defs. 537842d69509Smrg # For security reasons, it is highly recommended that you always 537942d69509Smrg # use absolute paths for naming shared libraries, and exclude the 538042d69509Smrg # DT_RUNPATH tag from executables and libraries. But doing so 538142d69509Smrg # requires that you compile everything twice, which is a pain. 538242d69509Smrg # So that behaviour is only enabled if SCOABSPATH is set to a 538342d69509Smrg # non-empty value in the environment. Most likely only useful for 538442d69509Smrg # creating official distributions of packages. 538542d69509Smrg # This is a hack until libtool officially supports absolute path 538642d69509Smrg # names for shared libraries. 538742d69509Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 538842d69509Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 538942d69509Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 539042d69509Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 539142d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 539242d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 539342d69509Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 539442d69509Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 539542d69509Smrg runpath_var='LD_RUN_PATH' 53964456fccdSmrg 539742d69509Smrg case $cc_basename in 539842d69509Smrg CC*) 539942d69509Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 540042d69509Smrg _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' 540142d69509Smrg ;; 540242d69509Smrg *) 540342d69509Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 540442d69509Smrg _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' 540542d69509Smrg ;; 540642d69509Smrg esac 540742d69509Smrg ;; 540842d69509Smrg tandem*) 540942d69509Smrg case $cc_basename in 541042d69509Smrg NCC*) 541142d69509Smrg # NonStop-UX NCC 3.20 541242d69509Smrg # FIXME: insert proper C++ library support 541342d69509Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 541442d69509Smrg ;; 541542d69509Smrg *) 541642d69509Smrg # FIXME: insert proper C++ library support 541742d69509Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 541842d69509Smrg ;; 541942d69509Smrg esac 542042d69509Smrg ;; 542142d69509Smrg vxworks*) 542242d69509Smrg # FIXME: insert proper C++ library support 542342d69509Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 542442d69509Smrg ;; 542542d69509Smrg *) 542642d69509Smrg # FIXME: insert proper C++ library support 542742d69509Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 542842d69509Smrg ;; 542942d69509Smrgesac 543042d69509SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 543142d69509Smrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 54324456fccdSmrg 543342d69509Smrg_LT_AC_TAGVAR(GCC, $1)="$GXX" 543442d69509Smrg_LT_AC_TAGVAR(LD, $1)="$LD" 54354456fccdSmrg 543642d69509SmrgAC_LIBTOOL_POSTDEP_PREDEP($1) 543742d69509SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 543842d69509SmrgAC_LIBTOOL_PROG_CC_C_O($1) 543942d69509SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 544042d69509SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 544142d69509SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 544242d69509SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 54434456fccdSmrg 544442d69509SmrgAC_LIBTOOL_CONFIG($1) 54454456fccdSmrg 544642d69509SmrgAC_LANG_POP 544742d69509SmrgCC=$lt_save_CC 544842d69509SmrgLDCXX=$LD 544942d69509SmrgLD=$lt_save_LD 545042d69509SmrgGCC=$lt_save_GCC 545142d69509Smrgwith_gnu_ldcxx=$with_gnu_ld 545242d69509Smrgwith_gnu_ld=$lt_save_with_gnu_ld 545342d69509Smrglt_cv_path_LDCXX=$lt_cv_path_LD 545442d69509Smrglt_cv_path_LD=$lt_save_path_LD 545542d69509Smrglt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 545642d69509Smrglt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 545742d69509Smrg])# AC_LIBTOOL_LANG_CXX_CONFIG 54584456fccdSmrg 545942d69509Smrg# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) 546042d69509Smrg# ------------------------------------ 546142d69509Smrg# Figure out "hidden" library dependencies from verbose 546242d69509Smrg# compiler output when linking a shared library. 546342d69509Smrg# Parse the compiler output and extract the necessary 546442d69509Smrg# objects, libraries and library flags. 546542d69509SmrgAC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP], 546642d69509Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 546742d69509Smrgdnl we can't use the lt_simple_compile_test_code here, 546842d69509Smrgdnl because it contains code intended for an executable, 546942d69509Smrgdnl not a library. It's possible we should let each 547042d69509Smrgdnl tag define a new lt_????_link_test_code variable, 547142d69509Smrgdnl but it's only used here... 547242d69509Smrgifelse([$1],[],[cat > conftest.$ac_ext <<EOF 547342d69509Smrgint a; 547442d69509Smrgvoid foo (void) { a = 0; } 547542d69509SmrgEOF 547642d69509Smrg],[$1],[CXX],[cat > conftest.$ac_ext <<EOF 547742d69509Smrgclass Foo 547842d69509Smrg{ 547942d69509Smrgpublic: 548042d69509Smrg Foo (void) { a = 0; } 548142d69509Smrgprivate: 548242d69509Smrg int a; 548342d69509Smrg}; 548442d69509SmrgEOF 548542d69509Smrg],[$1],[F77],[cat > conftest.$ac_ext <<EOF 548642d69509Smrg subroutine foo 548742d69509Smrg implicit none 548842d69509Smrg integer*4 a 548942d69509Smrg a=0 549042d69509Smrg return 549142d69509Smrg end 549242d69509SmrgEOF 549342d69509Smrg],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF 549442d69509Smrgpublic class foo { 549542d69509Smrg private int a; 549642d69509Smrg public void bar (void) { 549742d69509Smrg a = 0; 549842d69509Smrg } 549942d69509Smrg}; 550042d69509SmrgEOF 550142d69509Smrg]) 550242d69509Smrgdnl Parse the compiler output and extract the necessary 550342d69509Smrgdnl objects, libraries and library flags. 550442d69509Smrgif AC_TRY_EVAL(ac_compile); then 550542d69509Smrg # Parse the compiler output and extract the necessary 550642d69509Smrg # objects, libraries and library flags. 55074456fccdSmrg 550842d69509Smrg # Sentinel used to keep track of whether or not we are before 550942d69509Smrg # the conftest object file. 551042d69509Smrg pre_test_object_deps_done=no 55114456fccdSmrg 551242d69509Smrg # The `*' in the case matches for architectures that use `case' in 551342d69509Smrg # $output_verbose_cmd can trigger glob expansion during the loop 551442d69509Smrg # eval without this substitution. 551542d69509Smrg output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` 55164456fccdSmrg 551742d69509Smrg for p in `eval $output_verbose_link_cmd`; do 551842d69509Smrg case $p in 55194456fccdSmrg 552042d69509Smrg -L* | -R* | -l*) 552142d69509Smrg # Some compilers place space between "-{L,R}" and the path. 552242d69509Smrg # Remove the space. 552342d69509Smrg if test $p = "-L" \ 552442d69509Smrg || test $p = "-R"; then 552542d69509Smrg prev=$p 552642d69509Smrg continue 552742d69509Smrg else 552842d69509Smrg prev= 552942d69509Smrg fi 55304456fccdSmrg 553142d69509Smrg if test "$pre_test_object_deps_done" = no; then 553242d69509Smrg case $p in 553342d69509Smrg -L* | -R*) 553442d69509Smrg # Internal compiler library paths should come after those 553542d69509Smrg # provided the user. The postdeps already come after the 553642d69509Smrg # user supplied libs so there is no need to process them. 553742d69509Smrg if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then 553842d69509Smrg _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 553942d69509Smrg else 554042d69509Smrg _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 554142d69509Smrg fi 554242d69509Smrg ;; 554342d69509Smrg # The "-l" case would never come before the object being 554442d69509Smrg # linked, so don't bother handling this case. 554542d69509Smrg esac 554642d69509Smrg else 554742d69509Smrg if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then 554842d69509Smrg _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}" 554942d69509Smrg else 555042d69509Smrg _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}" 555142d69509Smrg fi 555242d69509Smrg fi 555342d69509Smrg ;; 55544456fccdSmrg 555542d69509Smrg *.$objext) 555642d69509Smrg # This assumes that the test object file only shows up 555742d69509Smrg # once in the compiler output. 555842d69509Smrg if test "$p" = "conftest.$objext"; then 555942d69509Smrg pre_test_object_deps_done=yes 556042d69509Smrg continue 556142d69509Smrg fi 55624456fccdSmrg 556342d69509Smrg if test "$pre_test_object_deps_done" = no; then 556442d69509Smrg if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then 556542d69509Smrg _LT_AC_TAGVAR(predep_objects, $1)="$p" 556642d69509Smrg else 556742d69509Smrg _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p" 556842d69509Smrg fi 556942d69509Smrg else 557042d69509Smrg if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then 557142d69509Smrg _LT_AC_TAGVAR(postdep_objects, $1)="$p" 557242d69509Smrg else 557342d69509Smrg _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p" 557442d69509Smrg fi 557542d69509Smrg fi 557642d69509Smrg ;; 55774456fccdSmrg 557842d69509Smrg *) ;; # Ignore the rest. 55794456fccdSmrg 558042d69509Smrg esac 558142d69509Smrg done 55824456fccdSmrg 558342d69509Smrg # Clean up. 558442d69509Smrg rm -f a.out a.exe 558542d69509Smrgelse 558642d69509Smrg echo "libtool.m4: error: problem compiling $1 test program" 558742d69509Smrgfi 55884456fccdSmrg 558942d69509Smrg$rm -f confest.$objext 55904456fccdSmrg 559142d69509Smrg_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)= 559242d69509Smrgif test -n "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then 559342d69509Smrg _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_AC_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 559442d69509Smrgfi 55954456fccdSmrg 559642d69509Smrg# PORTME: override above test on systems where it is broken 559742d69509Smrgifelse([$1],[CXX], 559842d69509Smrg[case $host_os in 559942d69509Smrginterix[[3-9]]*) 560042d69509Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 560142d69509Smrg # hack all around it, let's just trust "g++" to DTRT. 560242d69509Smrg _LT_AC_TAGVAR(predep_objects,$1)= 560342d69509Smrg _LT_AC_TAGVAR(postdep_objects,$1)= 560442d69509Smrg _LT_AC_TAGVAR(postdeps,$1)= 560542d69509Smrg ;; 56064456fccdSmrg 560742d69509Smrglinux*) 560842d69509Smrg case `$CC -V 2>&1 | sed 5q` in 560942d69509Smrg *Sun\ C*) 561042d69509Smrg # Sun C++ 5.9 561142d69509Smrg # 561242d69509Smrg # The more standards-conforming stlport4 library is 561342d69509Smrg # incompatible with the Cstd library. Avoid specifying 561442d69509Smrg # it if it's in CXXFLAGS. Ignore libCrun as 561542d69509Smrg # -library=stlport4 depends on it. 561642d69509Smrg case " $CXX $CXXFLAGS " in 561742d69509Smrg *" -library=stlport4 "*) 561842d69509Smrg solaris_use_stlport4=yes 561942d69509Smrg ;; 562042d69509Smrg esac 562142d69509Smrg if test "$solaris_use_stlport4" != yes; then 562242d69509Smrg _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 562342d69509Smrg fi 562442d69509Smrg ;; 562542d69509Smrg esac 562642d69509Smrg ;; 56274456fccdSmrg 562842d69509Smrgsolaris*) 562942d69509Smrg case $cc_basename in 563042d69509Smrg CC*) 563142d69509Smrg # The more standards-conforming stlport4 library is 563242d69509Smrg # incompatible with the Cstd library. Avoid specifying 563342d69509Smrg # it if it's in CXXFLAGS. Ignore libCrun as 563442d69509Smrg # -library=stlport4 depends on it. 563542d69509Smrg case " $CXX $CXXFLAGS " in 563642d69509Smrg *" -library=stlport4 "*) 563742d69509Smrg solaris_use_stlport4=yes 563842d69509Smrg ;; 563942d69509Smrg esac 56404456fccdSmrg 564142d69509Smrg # Adding this requires a known-good setup of shared libraries for 564242d69509Smrg # Sun compiler versions before 5.6, else PIC objects from an old 564342d69509Smrg # archive will be linked into the output, leading to subtle bugs. 564442d69509Smrg if test "$solaris_use_stlport4" != yes; then 564542d69509Smrg _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 564642d69509Smrg fi 564742d69509Smrg ;; 564842d69509Smrg esac 564942d69509Smrg ;; 565042d69509Smrgesac 565142d69509Smrg]) 565242d69509Smrgcase " $_LT_AC_TAGVAR(postdeps, $1) " in 565342d69509Smrg*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; 565442d69509Smrgesac 565542d69509Smrg])# AC_LIBTOOL_POSTDEP_PREDEP 56564456fccdSmrg 565742d69509Smrg# AC_LIBTOOL_LANG_F77_CONFIG 565842d69509Smrg# -------------------------- 565942d69509Smrg# Ensure that the configuration vars for the C compiler are 566042d69509Smrg# suitably defined. Those variables are subsequently used by 566142d69509Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 566242d69509SmrgAC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) 566342d69509SmrgAC_DEFUN([_LT_AC_LANG_F77_CONFIG], 566442d69509Smrg[AC_REQUIRE([AC_PROG_F77]) 566542d69509SmrgAC_LANG_PUSH(Fortran 77) 56664456fccdSmrg 566742d69509Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 566842d69509Smrg_LT_AC_TAGVAR(allow_undefined_flag, $1)= 566942d69509Smrg_LT_AC_TAGVAR(always_export_symbols, $1)=no 567042d69509Smrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)= 567142d69509Smrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 567242d69509Smrg_LT_AC_TAGVAR(hardcode_direct, $1)=no 567342d69509Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 567442d69509Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 567542d69509Smrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 567642d69509Smrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no 567742d69509Smrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no 567842d69509Smrg_LT_AC_TAGVAR(module_cmds, $1)= 567942d69509Smrg_LT_AC_TAGVAR(module_expsym_cmds, $1)= 568042d69509Smrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 568142d69509Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 568242d69509Smrg_LT_AC_TAGVAR(no_undefined_flag, $1)= 568342d69509Smrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 568442d69509Smrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 56854456fccdSmrg 568642d69509Smrg# Source file extension for f77 test sources. 568742d69509Smrgac_ext=f 56884456fccdSmrg 568942d69509Smrg# Object file extension for compiled f77 test sources. 569042d69509Smrgobjext=o 569142d69509Smrg_LT_AC_TAGVAR(objext, $1)=$objext 56924456fccdSmrg 569342d69509Smrg# Code to be used in simple compile tests 569442d69509Smrglt_simple_compile_test_code="\ 569542d69509Smrg subroutine t 569642d69509Smrg return 569742d69509Smrg end 569842d69509Smrg" 56994456fccdSmrg 570042d69509Smrg# Code to be used in simple link tests 570142d69509Smrglt_simple_link_test_code="\ 570242d69509Smrg program t 570342d69509Smrg end 570442d69509Smrg" 57054456fccdSmrg 570642d69509Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 570742d69509Smrg_LT_AC_SYS_COMPILER 57084456fccdSmrg 570942d69509Smrg# save warnings/boilerplate of simple test code 571042d69509Smrg_LT_COMPILER_BOILERPLATE 571142d69509Smrg_LT_LINKER_BOILERPLATE 57124456fccdSmrg 571342d69509Smrg# Allow CC to be a program name with arguments. 571442d69509Smrglt_save_CC="$CC" 571542d69509SmrgCC=${F77-"f77"} 571642d69509Smrgcompiler=$CC 571742d69509Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 571842d69509Smrg_LT_CC_BASENAME([$compiler]) 57194456fccdSmrg 572042d69509SmrgAC_MSG_CHECKING([if libtool supports shared libraries]) 572142d69509SmrgAC_MSG_RESULT([$can_build_shared]) 57224456fccdSmrg 572342d69509SmrgAC_MSG_CHECKING([whether to build shared libraries]) 572442d69509Smrgtest "$can_build_shared" = "no" && enable_shared=no 57254456fccdSmrg 572642d69509Smrg# On AIX, shared libraries and static libraries use the same namespace, and 572742d69509Smrg# are all built from PIC. 572842d69509Smrgcase $host_os in 572942d69509Smrgaix3*) 573042d69509Smrg test "$enable_shared" = yes && enable_static=no 573142d69509Smrg if test -n "$RANLIB"; then 573242d69509Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 573342d69509Smrg postinstall_cmds='$RANLIB $lib' 573442d69509Smrg fi 573542d69509Smrg ;; 573642d69509Smrgaix[[4-9]]*) 573742d69509Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 573842d69509Smrg test "$enable_shared" = yes && enable_static=no 573942d69509Smrg fi 574042d69509Smrg ;; 574142d69509Smrgesac 574242d69509SmrgAC_MSG_RESULT([$enable_shared]) 57434456fccdSmrg 574442d69509SmrgAC_MSG_CHECKING([whether to build static libraries]) 574542d69509Smrg# Make sure either enable_shared or enable_static is yes. 574642d69509Smrgtest "$enable_shared" = yes || enable_static=yes 574742d69509SmrgAC_MSG_RESULT([$enable_static]) 57484456fccdSmrg 574942d69509Smrg_LT_AC_TAGVAR(GCC, $1)="$G77" 575042d69509Smrg_LT_AC_TAGVAR(LD, $1)="$LD" 57514456fccdSmrg 575242d69509SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 575342d69509SmrgAC_LIBTOOL_PROG_CC_C_O($1) 575442d69509SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 575542d69509SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 575642d69509SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 575742d69509SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 57584456fccdSmrg 575942d69509SmrgAC_LIBTOOL_CONFIG($1) 57604456fccdSmrg 576142d69509SmrgAC_LANG_POP 576242d69509SmrgCC="$lt_save_CC" 576342d69509Smrg])# AC_LIBTOOL_LANG_F77_CONFIG 57644456fccdSmrg 57654456fccdSmrg 576642d69509Smrg# AC_LIBTOOL_LANG_GCJ_CONFIG 576742d69509Smrg# -------------------------- 576842d69509Smrg# Ensure that the configuration vars for the C compiler are 576942d69509Smrg# suitably defined. Those variables are subsequently used by 577042d69509Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 577142d69509SmrgAC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) 577242d69509SmrgAC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], 577342d69509Smrg[AC_LANG_SAVE 57744456fccdSmrg 577542d69509Smrg# Source file extension for Java test sources. 577642d69509Smrgac_ext=java 57774456fccdSmrg 577842d69509Smrg# Object file extension for compiled Java test sources. 577942d69509Smrgobjext=o 578042d69509Smrg_LT_AC_TAGVAR(objext, $1)=$objext 57814456fccdSmrg 578242d69509Smrg# Code to be used in simple compile tests 578342d69509Smrglt_simple_compile_test_code="class foo {}" 57844456fccdSmrg 578542d69509Smrg# Code to be used in simple link tests 578642d69509Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 57874456fccdSmrg 578842d69509Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 578942d69509Smrg_LT_AC_SYS_COMPILER 57904456fccdSmrg 579142d69509Smrg# save warnings/boilerplate of simple test code 579242d69509Smrg_LT_COMPILER_BOILERPLATE 579342d69509Smrg_LT_LINKER_BOILERPLATE 57944456fccdSmrg 579542d69509Smrg# Allow CC to be a program name with arguments. 579642d69509Smrglt_save_CC="$CC" 579742d69509SmrgCC=${GCJ-"gcj"} 579842d69509Smrgcompiler=$CC 579942d69509Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 580042d69509Smrg_LT_CC_BASENAME([$compiler]) 58014456fccdSmrg 580242d69509Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 580342d69509Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 58044456fccdSmrg 580542d69509Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 58064456fccdSmrg 580742d69509SmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) 580842d69509SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1) 580942d69509SmrgAC_LIBTOOL_PROG_CC_C_O($1) 581042d69509SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) 581142d69509SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1) 581242d69509SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1) 581342d69509SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) 58144456fccdSmrg 581542d69509SmrgAC_LIBTOOL_CONFIG($1) 58164456fccdSmrg 581742d69509SmrgAC_LANG_RESTORE 581842d69509SmrgCC="$lt_save_CC" 581942d69509Smrg])# AC_LIBTOOL_LANG_GCJ_CONFIG 58204456fccdSmrg 58214456fccdSmrg 582242d69509Smrg# AC_LIBTOOL_LANG_RC_CONFIG 582342d69509Smrg# ------------------------- 582442d69509Smrg# Ensure that the configuration vars for the Windows resource compiler are 582542d69509Smrg# suitably defined. Those variables are subsequently used by 582642d69509Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. 582742d69509SmrgAC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) 582842d69509SmrgAC_DEFUN([_LT_AC_LANG_RC_CONFIG], 582942d69509Smrg[AC_LANG_SAVE 58304456fccdSmrg 583142d69509Smrg# Source file extension for RC test sources. 583242d69509Smrgac_ext=rc 58334456fccdSmrg 583442d69509Smrg# Object file extension for compiled RC test sources. 583542d69509Smrgobjext=o 583642d69509Smrg_LT_AC_TAGVAR(objext, $1)=$objext 58374456fccdSmrg 583842d69509Smrg# Code to be used in simple compile tests 583942d69509Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 58404456fccdSmrg 584142d69509Smrg# Code to be used in simple link tests 584242d69509Smrglt_simple_link_test_code="$lt_simple_compile_test_code" 58434456fccdSmrg 584442d69509Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 584542d69509Smrg_LT_AC_SYS_COMPILER 58464456fccdSmrg 584742d69509Smrg# save warnings/boilerplate of simple test code 584842d69509Smrg_LT_COMPILER_BOILERPLATE 584942d69509Smrg_LT_LINKER_BOILERPLATE 58504456fccdSmrg 585142d69509Smrg# Allow CC to be a program name with arguments. 585242d69509Smrglt_save_CC="$CC" 585342d69509SmrgCC=${RC-"windres"} 585442d69509Smrgcompiler=$CC 585542d69509Smrg_LT_AC_TAGVAR(compiler, $1)=$CC 585642d69509Smrg_LT_CC_BASENAME([$compiler]) 585742d69509Smrg_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 58584456fccdSmrg 585942d69509SmrgAC_LIBTOOL_CONFIG($1) 58604456fccdSmrg 586142d69509SmrgAC_LANG_RESTORE 586242d69509SmrgCC="$lt_save_CC" 586342d69509Smrg])# AC_LIBTOOL_LANG_RC_CONFIG 58644456fccdSmrg 58654456fccdSmrg 586642d69509Smrg# AC_LIBTOOL_CONFIG([TAGNAME]) 586742d69509Smrg# ---------------------------- 586842d69509Smrg# If TAGNAME is not passed, then create an initial libtool script 586942d69509Smrg# with a default configuration from the untagged config vars. Otherwise 587042d69509Smrg# add code to config.status for appending the configuration named by 587142d69509Smrg# TAGNAME from the matching tagged config vars. 587242d69509SmrgAC_DEFUN([AC_LIBTOOL_CONFIG], 587342d69509Smrg[# The else clause should only fire when bootstrapping the 587442d69509Smrg# libtool distribution, otherwise you forgot to ship ltmain.sh 587542d69509Smrg# with your package, and you will get complaints that there are 587642d69509Smrg# no rules to generate ltmain.sh. 587742d69509Smrgif test -f "$ltmain"; then 587842d69509Smrg # See if we are running on zsh, and set the options which allow our commands through 587942d69509Smrg # without removal of \ escapes. 588042d69509Smrg if test -n "${ZSH_VERSION+set}" ; then 588142d69509Smrg setopt NO_GLOB_SUBST 588242d69509Smrg fi 588342d69509Smrg # Now quote all the things that may contain metacharacters while being 588442d69509Smrg # careful not to overquote the AC_SUBSTed values. We take copies of the 588542d69509Smrg # variables and quote the copies for generation of the libtool script. 588642d69509Smrg for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ 588742d69509Smrg SED SHELL STRIP \ 588842d69509Smrg libname_spec library_names_spec soname_spec extract_expsyms_cmds \ 588942d69509Smrg old_striplib striplib file_magic_cmd finish_cmds finish_eval \ 589042d69509Smrg deplibs_check_method reload_flag reload_cmds need_locks \ 589142d69509Smrg lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ 589242d69509Smrg lt_cv_sys_global_symbol_to_c_name_address \ 589342d69509Smrg sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ 589442d69509Smrg old_postinstall_cmds old_postuninstall_cmds \ 589542d69509Smrg _LT_AC_TAGVAR(compiler, $1) \ 589642d69509Smrg _LT_AC_TAGVAR(CC, $1) \ 589742d69509Smrg _LT_AC_TAGVAR(LD, $1) \ 589842d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ 589942d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ 590042d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ 590142d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ 590242d69509Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ 590342d69509Smrg _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ 590442d69509Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ 590542d69509Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ 590642d69509Smrg _LT_AC_TAGVAR(old_archive_cmds, $1) \ 590742d69509Smrg _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ 590842d69509Smrg _LT_AC_TAGVAR(predep_objects, $1) \ 590942d69509Smrg _LT_AC_TAGVAR(postdep_objects, $1) \ 591042d69509Smrg _LT_AC_TAGVAR(predeps, $1) \ 591142d69509Smrg _LT_AC_TAGVAR(postdeps, $1) \ 591242d69509Smrg _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ 591342d69509Smrg _LT_AC_TAGVAR(compiler_lib_search_dirs, $1) \ 591442d69509Smrg _LT_AC_TAGVAR(archive_cmds, $1) \ 591542d69509Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ 591642d69509Smrg _LT_AC_TAGVAR(postinstall_cmds, $1) \ 591742d69509Smrg _LT_AC_TAGVAR(postuninstall_cmds, $1) \ 591842d69509Smrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ 591942d69509Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1) \ 592042d69509Smrg _LT_AC_TAGVAR(no_undefined_flag, $1) \ 592142d69509Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1) \ 592242d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ 592342d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ 592442d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ 592542d69509Smrg _LT_AC_TAGVAR(hardcode_automatic, $1) \ 592642d69509Smrg _LT_AC_TAGVAR(module_cmds, $1) \ 592742d69509Smrg _LT_AC_TAGVAR(module_expsym_cmds, $1) \ 592842d69509Smrg _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ 592942d69509Smrg _LT_AC_TAGVAR(fix_srcfile_path, $1) \ 593042d69509Smrg _LT_AC_TAGVAR(exclude_expsyms, $1) \ 593142d69509Smrg _LT_AC_TAGVAR(include_expsyms, $1); do 59324456fccdSmrg 593342d69509Smrg case $var in 593442d69509Smrg _LT_AC_TAGVAR(old_archive_cmds, $1) | \ 593542d69509Smrg _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ 593642d69509Smrg _LT_AC_TAGVAR(archive_cmds, $1) | \ 593742d69509Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ 593842d69509Smrg _LT_AC_TAGVAR(module_cmds, $1) | \ 593942d69509Smrg _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ 594042d69509Smrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ 594142d69509Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ 594242d69509Smrg extract_expsyms_cmds | reload_cmds | finish_cmds | \ 594342d69509Smrg postinstall_cmds | postuninstall_cmds | \ 594442d69509Smrg old_postinstall_cmds | old_postuninstall_cmds | \ 594542d69509Smrg sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) 594642d69509Smrg # Double-quote double-evaled strings. 594742d69509Smrg eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" 59484456fccdSmrg ;; 59494456fccdSmrg *) 595042d69509Smrg eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" 59514456fccdSmrg ;; 59524456fccdSmrg esac 595342d69509Smrg done 59544456fccdSmrg 595542d69509Smrg case $lt_echo in 595642d69509Smrg *'\[$]0 --fallback-echo"') 595742d69509Smrg lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` 595842d69509Smrg ;; 595942d69509Smrg esac 59604456fccdSmrg 596142d69509Smrgifelse([$1], [], 596242d69509Smrg [cfgfile="${ofile}T" 596342d69509Smrg trap "$rm \"$cfgfile\"; exit 1" 1 2 15 596442d69509Smrg $rm -f "$cfgfile" 596542d69509Smrg AC_MSG_NOTICE([creating $ofile])], 596642d69509Smrg [cfgfile="$ofile"]) 59674456fccdSmrg 596842d69509Smrg cat <<__EOF__ >> "$cfgfile" 596942d69509Smrgifelse([$1], [], 597042d69509Smrg[#! $SHELL 59714456fccdSmrg 597242d69509Smrg# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 597342d69509Smrg# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) 597442d69509Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 597542d69509Smrg# 597642d69509Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 597742d69509Smrg# Free Software Foundation, Inc. 597842d69509Smrg# 597942d69509Smrg# This file is part of GNU Libtool: 598042d69509Smrg# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 598142d69509Smrg# 598242d69509Smrg# This program is free software; you can redistribute it and/or modify 598342d69509Smrg# it under the terms of the GNU General Public License as published by 598442d69509Smrg# the Free Software Foundation; either version 2 of the License, or 598542d69509Smrg# (at your option) any later version. 598642d69509Smrg# 598742d69509Smrg# This program is distributed in the hope that it will be useful, but 598842d69509Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 598942d69509Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 599042d69509Smrg# General Public License for more details. 599142d69509Smrg# 599242d69509Smrg# You should have received a copy of the GNU General Public License 599342d69509Smrg# along with this program; if not, write to the Free Software 599442d69509Smrg# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 599542d69509Smrg# 599642d69509Smrg# As a special exception to the GNU General Public License, if you 599742d69509Smrg# distribute this file as part of a program that contains a 599842d69509Smrg# configuration script generated by Autoconf, you may include it under 599942d69509Smrg# the same distribution terms that you use for the rest of that program. 60004456fccdSmrg 600142d69509Smrg# A sed program that does not truncate output. 600242d69509SmrgSED=$lt_SED 60034456fccdSmrg 600442d69509Smrg# Sed that helps us avoid accidentally triggering echo(1) options like -n. 600542d69509SmrgXsed="$SED -e 1s/^X//" 60064456fccdSmrg 600742d69509Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 600842d69509Smrg# if CDPATH is set. 600942d69509Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 60104456fccdSmrg 601142d69509Smrg# The names of the tagged configurations supported by this script. 601242d69509Smrgavailable_tags= 60134456fccdSmrg 601442d69509Smrg# ### BEGIN LIBTOOL CONFIG], 601542d69509Smrg[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) 60164456fccdSmrg 601742d69509Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 60184456fccdSmrg 601942d69509Smrg# Shell to use when invoking shell scripts. 602042d69509SmrgSHELL=$lt_SHELL 60214456fccdSmrg 602242d69509Smrg# Whether or not to build shared libraries. 602342d69509Smrgbuild_libtool_libs=$enable_shared 60244456fccdSmrg 602542d69509Smrg# Whether or not to build static libraries. 602642d69509Smrgbuild_old_libs=$enable_static 60274456fccdSmrg 602842d69509Smrg# Whether or not to add -lc for building shared libraries. 602942d69509Smrgbuild_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) 60304456fccdSmrg 603142d69509Smrg# Whether or not to disallow shared libs when runtime libs are static 603242d69509Smrgallow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) 60334456fccdSmrg 603442d69509Smrg# Whether or not to optimize for fast installation. 603542d69509Smrgfast_install=$enable_fast_install 60364456fccdSmrg 603742d69509Smrg# The host system. 603842d69509Smrghost_alias=$host_alias 603942d69509Smrghost=$host 604042d69509Smrghost_os=$host_os 60414456fccdSmrg 604242d69509Smrg# The build system. 604342d69509Smrgbuild_alias=$build_alias 604442d69509Smrgbuild=$build 604542d69509Smrgbuild_os=$build_os 60464456fccdSmrg 604742d69509Smrg# An echo program that does not interpret backslashes. 604842d69509Smrgecho=$lt_echo 60494456fccdSmrg 605042d69509Smrg# The archiver. 605142d69509SmrgAR=$lt_AR 605242d69509SmrgAR_FLAGS=$lt_AR_FLAGS 60534456fccdSmrg 605442d69509Smrg# A C compiler. 605542d69509SmrgLTCC=$lt_LTCC 60564456fccdSmrg 605742d69509Smrg# LTCC compiler flags. 605842d69509SmrgLTCFLAGS=$lt_LTCFLAGS 60594456fccdSmrg 606042d69509Smrg# A language-specific compiler. 606142d69509SmrgCC=$lt_[]_LT_AC_TAGVAR(compiler, $1) 60624456fccdSmrg 606342d69509Smrg# Is the compiler the GNU C compiler? 606442d69509Smrgwith_gcc=$_LT_AC_TAGVAR(GCC, $1) 60654456fccdSmrg 606642d69509Smrg# An ERE matcher. 606742d69509SmrgEGREP=$lt_EGREP 60684456fccdSmrg 606942d69509Smrg# The linker used to build libraries. 607042d69509SmrgLD=$lt_[]_LT_AC_TAGVAR(LD, $1) 60714456fccdSmrg 607242d69509Smrg# Whether we need hard or soft links. 607342d69509SmrgLN_S=$lt_LN_S 60744456fccdSmrg 607542d69509Smrg# A BSD-compatible nm program. 607642d69509SmrgNM=$lt_NM 60774456fccdSmrg 607842d69509Smrg# A symbol stripping program 607942d69509SmrgSTRIP=$lt_STRIP 60804456fccdSmrg 608142d69509Smrg# Used to examine libraries when file_magic_cmd begins "file" 608242d69509SmrgMAGIC_CMD=$MAGIC_CMD 60834456fccdSmrg 608442d69509Smrg# Used on cygwin: DLL creation program. 608542d69509SmrgDLLTOOL="$DLLTOOL" 60864456fccdSmrg 608742d69509Smrg# Used on cygwin: object dumper. 608842d69509SmrgOBJDUMP="$OBJDUMP" 60894456fccdSmrg 609042d69509Smrg# Used on cygwin: assembler. 609142d69509SmrgAS="$AS" 60924456fccdSmrg 609342d69509Smrg# The name of the directory that contains temporary libtool files. 609442d69509Smrgobjdir=$objdir 60954456fccdSmrg 609642d69509Smrg# How to create reloadable object files. 609742d69509Smrgreload_flag=$lt_reload_flag 609842d69509Smrgreload_cmds=$lt_reload_cmds 60994456fccdSmrg 610042d69509Smrg# How to pass a linker flag through the compiler. 610142d69509Smrgwl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 61024456fccdSmrg 610342d69509Smrg# Object file suffix (normally "o"). 610442d69509Smrgobjext="$ac_objext" 61054456fccdSmrg 610642d69509Smrg# Old archive suffix (normally "a"). 610742d69509Smrglibext="$libext" 61084456fccdSmrg 610942d69509Smrg# Shared library suffix (normally ".so"). 611042d69509Smrgshrext_cmds='$shrext_cmds' 61114456fccdSmrg 611242d69509Smrg# Executable file suffix (normally ""). 611342d69509Smrgexeext="$exeext" 61144456fccdSmrg 611542d69509Smrg# Additional compiler flags for building library objects. 611642d69509Smrgpic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 611742d69509Smrgpic_mode=$pic_mode 61184456fccdSmrg 611942d69509Smrg# What is the maximum length of a command? 612042d69509Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 61214456fccdSmrg 612242d69509Smrg# Does compiler simultaneously support -c and -o options? 612342d69509Smrgcompiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) 61244456fccdSmrg 612542d69509Smrg# Must we lock files when doing compilation? 612642d69509Smrgneed_locks=$lt_need_locks 61274456fccdSmrg 612842d69509Smrg# Do we need the lib prefix for modules? 612942d69509Smrgneed_lib_prefix=$need_lib_prefix 61304456fccdSmrg 613142d69509Smrg# Do we need a version for libraries? 613242d69509Smrgneed_version=$need_version 61334456fccdSmrg 613442d69509Smrg# Whether dlopen is supported. 613542d69509Smrgdlopen_support=$enable_dlopen 61364456fccdSmrg 613742d69509Smrg# Whether dlopen of programs is supported. 613842d69509Smrgdlopen_self=$enable_dlopen_self 61394456fccdSmrg 614042d69509Smrg# Whether dlopen of statically linked programs is supported. 614142d69509Smrgdlopen_self_static=$enable_dlopen_self_static 61424456fccdSmrg 614342d69509Smrg# Compiler flag to prevent dynamic linking. 614442d69509Smrglink_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) 61454456fccdSmrg 614642d69509Smrg# Compiler flag to turn off builtin functions. 614742d69509Smrgno_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) 61484456fccdSmrg 614942d69509Smrg# Compiler flag to allow reflexive dlopens. 615042d69509Smrgexport_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) 61514456fccdSmrg 615242d69509Smrg# Compiler flag to generate shared objects directly from archives. 615342d69509Smrgwhole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) 61544456fccdSmrg 615542d69509Smrg# Compiler flag to generate thread-safe objects. 615642d69509Smrgthread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) 61574456fccdSmrg 615842d69509Smrg# Library versioning type. 615942d69509Smrgversion_type=$version_type 61604456fccdSmrg 616142d69509Smrg# Format of library name prefix. 616242d69509Smrglibname_spec=$lt_libname_spec 61634456fccdSmrg 616442d69509Smrg# List of archive names. First name is the real one, the rest are links. 616542d69509Smrg# The last name is the one that the linker finds with -lNAME. 616642d69509Smrglibrary_names_spec=$lt_library_names_spec 61674456fccdSmrg 616842d69509Smrg# The coded name of the library, if different from the real name. 616942d69509Smrgsoname_spec=$lt_soname_spec 61704456fccdSmrg 617142d69509Smrg# Commands used to build and install an old-style archive. 617242d69509SmrgRANLIB=$lt_RANLIB 617342d69509Smrgold_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) 617442d69509Smrgold_postinstall_cmds=$lt_old_postinstall_cmds 617542d69509Smrgold_postuninstall_cmds=$lt_old_postuninstall_cmds 61764456fccdSmrg 617742d69509Smrg# Create an old-style archive from a shared archive. 617842d69509Smrgold_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) 61794456fccdSmrg 618042d69509Smrg# Create a temporary old-style archive to link instead of a shared archive. 618142d69509Smrgold_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) 61824456fccdSmrg 618342d69509Smrg# Commands used to build and install a shared archive. 618442d69509Smrgarchive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) 618542d69509Smrgarchive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) 618642d69509Smrgpostinstall_cmds=$lt_postinstall_cmds 618742d69509Smrgpostuninstall_cmds=$lt_postuninstall_cmds 61884456fccdSmrg 618942d69509Smrg# Commands used to build a loadable module (assumed same as above if empty) 619042d69509Smrgmodule_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) 619142d69509Smrgmodule_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) 61924456fccdSmrg 619342d69509Smrg# Commands to strip libraries. 619442d69509Smrgold_striplib=$lt_old_striplib 619542d69509Smrgstriplib=$lt_striplib 61964456fccdSmrg 619742d69509Smrg# Dependencies to place before the objects being linked to create a 619842d69509Smrg# shared library. 619942d69509Smrgpredep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) 62004456fccdSmrg 620142d69509Smrg# Dependencies to place after the objects being linked to create a 620242d69509Smrg# shared library. 620342d69509Smrgpostdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) 62044456fccdSmrg 620542d69509Smrg# Dependencies to place before the objects being linked to create a 620642d69509Smrg# shared library. 620742d69509Smrgpredeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) 62084456fccdSmrg 620942d69509Smrg# Dependencies to place after the objects being linked to create a 621042d69509Smrg# shared library. 621142d69509Smrgpostdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) 62124456fccdSmrg 621342d69509Smrg# The directories searched by this compiler when creating a shared 621442d69509Smrg# library 621542d69509Smrgcompiler_lib_search_dirs=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_dirs, $1) 62164456fccdSmrg 621742d69509Smrg# The library search path used internally by the compiler when linking 621842d69509Smrg# a shared library. 621942d69509Smrgcompiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) 62204456fccdSmrg 622142d69509Smrg# Method to check whether dependent libraries are shared objects. 622242d69509Smrgdeplibs_check_method=$lt_deplibs_check_method 62234456fccdSmrg 622442d69509Smrg# Command to use when deplibs_check_method == file_magic. 622542d69509Smrgfile_magic_cmd=$lt_file_magic_cmd 62264456fccdSmrg 622742d69509Smrg# Flag that allows shared libraries with undefined symbols to be built. 622842d69509Smrgallow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) 62294456fccdSmrg 623042d69509Smrg# Flag that forces no undefined symbols. 623142d69509Smrgno_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) 62324456fccdSmrg 623342d69509Smrg# Commands used to finish a libtool library installation in a directory. 623442d69509Smrgfinish_cmds=$lt_finish_cmds 62354456fccdSmrg 623642d69509Smrg# Same as above, but a single script fragment to be evaled but not shown. 623742d69509Smrgfinish_eval=$lt_finish_eval 62384456fccdSmrg 623942d69509Smrg# Take the output of nm and produce a listing of raw symbols and C names. 624042d69509Smrgglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe 62414456fccdSmrg 624242d69509Smrg# Transform the output of nm in a proper C declaration 624342d69509Smrgglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl 62444456fccdSmrg 624542d69509Smrg# Transform the output of nm in a C name address pair 624642d69509Smrgglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address 62474456fccdSmrg 624842d69509Smrg# This is the shared library runtime path variable. 624942d69509Smrgrunpath_var=$runpath_var 62504456fccdSmrg 625142d69509Smrg# This is the shared library path variable. 625242d69509Smrgshlibpath_var=$shlibpath_var 62534456fccdSmrg 625442d69509Smrg# Is shlibpath searched before the hard-coded library search path? 625542d69509Smrgshlibpath_overrides_runpath=$shlibpath_overrides_runpath 62564456fccdSmrg 625742d69509Smrg# How to hardcode a shared library path into an executable. 625842d69509Smrghardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) 62594456fccdSmrg 626042d69509Smrg# Whether we should hardcode library paths into libraries. 626142d69509Smrghardcode_into_libs=$hardcode_into_libs 62624456fccdSmrg 626342d69509Smrg# Flag to hardcode \$libdir into a binary during linking. 626442d69509Smrg# This must work even if \$libdir does not exist. 626542d69509Smrghardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) 62664456fccdSmrg 626742d69509Smrg# If ld is used when linking, flag to hardcode \$libdir into 626842d69509Smrg# a binary during linking. This must work even if \$libdir does 626942d69509Smrg# not exist. 627042d69509Smrghardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) 62714456fccdSmrg 627242d69509Smrg# Whether we need a single -rpath flag with a separated argument. 627342d69509Smrghardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) 62744456fccdSmrg 627542d69509Smrg# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the 627642d69509Smrg# resulting binary. 627742d69509Smrghardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) 62784456fccdSmrg 627942d69509Smrg# Set to yes if using the -LDIR flag during linking hardcodes DIR into the 628042d69509Smrg# resulting binary. 628142d69509Smrghardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) 62824456fccdSmrg 628342d69509Smrg# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into 628442d69509Smrg# the resulting binary. 628542d69509Smrghardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) 62864456fccdSmrg 628742d69509Smrg# Set to yes if building a shared library automatically hardcodes DIR into the library 628842d69509Smrg# and all subsequent libraries and executables linked against it. 628942d69509Smrghardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) 62904456fccdSmrg 629142d69509Smrg# Variables whose values should be saved in libtool wrapper scripts and 629242d69509Smrg# restored at relink time. 629342d69509Smrgvariables_saved_for_relink="$variables_saved_for_relink" 62944456fccdSmrg 629542d69509Smrg# Whether libtool must link a program against all its dependency libraries. 629642d69509Smrglink_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) 62974456fccdSmrg 629842d69509Smrg# Compile-time system search path for libraries 629942d69509Smrgsys_lib_search_path_spec=$lt_sys_lib_search_path_spec 63004456fccdSmrg 630142d69509Smrg# Run-time system search path for libraries 630242d69509Smrgsys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec 63034456fccdSmrg 630442d69509Smrg# Fix the shell variable \$srcfile for the compiler. 630542d69509Smrgfix_srcfile_path=$lt_fix_srcfile_path 63064456fccdSmrg 630742d69509Smrg# Set to yes if exported symbols are required. 630842d69509Smrgalways_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) 63094456fccdSmrg 631042d69509Smrg# The commands to list exported symbols. 631142d69509Smrgexport_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) 63124456fccdSmrg 631342d69509Smrg# The commands to extract the exported symbol list from a shared archive. 631442d69509Smrgextract_expsyms_cmds=$lt_extract_expsyms_cmds 63154456fccdSmrg 631642d69509Smrg# Symbols that should not be listed in the preloaded symbols. 631742d69509Smrgexclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) 63184456fccdSmrg 631942d69509Smrg# Symbols that must always be exported. 632042d69509Smrginclude_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) 63214456fccdSmrg 632242d69509Smrgifelse([$1],[], 632342d69509Smrg[# ### END LIBTOOL CONFIG], 632442d69509Smrg[# ### END LIBTOOL TAG CONFIG: $tagname]) 63254456fccdSmrg 632642d69509Smrg__EOF__ 63274456fccdSmrg 632842d69509Smrgifelse([$1],[], [ 632942d69509Smrg case $host_os in 633042d69509Smrg aix3*) 633142d69509Smrg cat <<\EOF >> "$cfgfile" 63324456fccdSmrg 633342d69509Smrg# AIX sometimes has problems with the GCC collect2 program. For some 633442d69509Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 633542d69509Smrg# vanish in a puff of smoke. 633642d69509Smrgif test "X${COLLECT_NAMES+set}" != Xset; then 633742d69509Smrg COLLECT_NAMES= 633842d69509Smrg export COLLECT_NAMES 633942d69509Smrgfi 634042d69509SmrgEOF 634142d69509Smrg ;; 634242d69509Smrg esac 634342d69509Smrg 634442d69509Smrg # We use sed instead of cat because bash on DJGPP gets confused if 634542d69509Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 634642d69509Smrg # text mode, it properly converts lines to CR/LF. This bash problem 634742d69509Smrg # is reportedly fixed, but why not run on old versions too? 634842d69509Smrg sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) 634942d69509Smrg 635042d69509Smrg mv -f "$cfgfile" "$ofile" || \ 635142d69509Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 635242d69509Smrg chmod +x "$ofile" 63534456fccdSmrg]) 635442d69509Smrgelse 635542d69509Smrg # If there is no Makefile yet, we rely on a make rule to execute 635642d69509Smrg # `config.status --recheck' to rerun these tests and create the 635742d69509Smrg # libtool script then. 635842d69509Smrg ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` 635942d69509Smrg if test -f "$ltmain_in"; then 636042d69509Smrg test -f Makefile && make "$ltmain" 636142d69509Smrg fi 636242d69509Smrgfi 636342d69509Smrg])# AC_LIBTOOL_CONFIG 63644456fccdSmrg 636542d69509Smrg 636642d69509Smrg# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) 636742d69509Smrg# ------------------------------------------- 636842d69509SmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], 636942d69509Smrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl 637042d69509Smrg 637142d69509Smrg_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 637242d69509Smrg 637342d69509Smrgif test "$GCC" = yes; then 637442d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 637542d69509Smrg 637642d69509Smrg AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 637742d69509Smrg lt_cv_prog_compiler_rtti_exceptions, 637842d69509Smrg [-fno-rtti -fno-exceptions], [], 637942d69509Smrg [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 638042d69509Smrgfi 638142d69509Smrg])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI 638242d69509Smrg 638342d69509Smrg 638442d69509Smrg# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 638542d69509Smrg# --------------------------------- 638642d69509SmrgAC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], 638742d69509Smrg[AC_REQUIRE([AC_CANONICAL_HOST]) 638842d69509SmrgAC_REQUIRE([LT_AC_PROG_SED]) 638942d69509SmrgAC_REQUIRE([AC_PROG_NM]) 639042d69509SmrgAC_REQUIRE([AC_OBJEXT]) 639142d69509Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 639242d69509SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 639342d69509SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 639442d69509Smrg[ 639542d69509Smrg# These are sane defaults that work on at least a few old systems. 639642d69509Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 639742d69509Smrg 639842d69509Smrg# Character class describing NM global symbol codes. 639942d69509Smrgsymcode='[[BCDEGRST]]' 640042d69509Smrg 640142d69509Smrg# Regexp to match symbols that can be accessed directly from C. 640242d69509Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 640342d69509Smrg 640442d69509Smrg# Transform an extracted symbol line into a proper C declaration 640542d69509Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" 640642d69509Smrg 640742d69509Smrg# Transform an extracted symbol line into symbol name and symbol address 640842d69509Smrglt_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'" 640942d69509Smrg 641042d69509Smrg# Define system-specific variables. 641142d69509Smrgcase $host_os in 641242d69509Smrgaix*) 641342d69509Smrg symcode='[[BCDT]]' 641442d69509Smrg ;; 641542d69509Smrgcygwin* | mingw* | pw32*) 641642d69509Smrg symcode='[[ABCDGISTW]]' 641742d69509Smrg ;; 641842d69509Smrghpux*) # Its linker distinguishes data from code symbols 641942d69509Smrg if test "$host_cpu" = ia64; then 642042d69509Smrg symcode='[[ABCDEGRST]]' 64214456fccdSmrg fi 642242d69509Smrg lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 642342d69509Smrg 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'" 642442d69509Smrg ;; 642542d69509Smrglinux* | k*bsd*-gnu) 642642d69509Smrg if test "$host_cpu" = ia64; then 642742d69509Smrg symcode='[[ABCDGIRSTW]]' 642842d69509Smrg lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 642942d69509Smrg 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'" 643042d69509Smrg fi 643142d69509Smrg ;; 643242d69509Smrgirix* | nonstopux*) 643342d69509Smrg symcode='[[BCDEGRST]]' 643442d69509Smrg ;; 643542d69509Smrgosf*) 643642d69509Smrg symcode='[[BCDEGQRST]]' 643742d69509Smrg ;; 643842d69509Smrgsolaris*) 643942d69509Smrg symcode='[[BDRT]]' 644042d69509Smrg ;; 644142d69509Smrgsco3.2v5*) 644242d69509Smrg symcode='[[DT]]' 644342d69509Smrg ;; 644442d69509Smrgsysv4.2uw2*) 644542d69509Smrg symcode='[[DT]]' 644642d69509Smrg ;; 644742d69509Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 644842d69509Smrg symcode='[[ABDT]]' 644942d69509Smrg ;; 645042d69509Smrgsysv4) 645142d69509Smrg symcode='[[DFNSTU]]' 645242d69509Smrg ;; 645342d69509Smrgesac 64544456fccdSmrg 645542d69509Smrg# Handle CRLF in mingw tool chain 645642d69509Smrgopt_cr= 645742d69509Smrgcase $build_os in 645842d69509Smrgmingw*) 645942d69509Smrg opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp 646042d69509Smrg ;; 646142d69509Smrgesac 646242d69509Smrg 646342d69509Smrg# If we're using GNU nm, then use its standard symbol codes. 646442d69509Smrgcase `$NM -V 2>&1` in 646542d69509Smrg*GNU* | *'with BFD'*) 646642d69509Smrg symcode='[[ABCDGIRSTW]]' ;; 646742d69509Smrgesac 646842d69509Smrg 646942d69509Smrg# Try without a prefix undercore, then with it. 647042d69509Smrgfor ac_symprfx in "" "_"; do 647142d69509Smrg 647242d69509Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 647342d69509Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 647442d69509Smrg 647542d69509Smrg # Write the raw and C identifiers. 647642d69509Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 647742d69509Smrg 647842d69509Smrg # Check to see that the pipe works correctly. 647942d69509Smrg pipe_works=no 648042d69509Smrg 648142d69509Smrg rm -f conftest* 648242d69509Smrg cat > conftest.$ac_ext <<EOF 648342d69509Smrg#ifdef __cplusplus 648442d69509Smrgextern "C" { 648542d69509Smrg#endif 648642d69509Smrgchar nm_test_var; 648742d69509Smrgvoid nm_test_func(){} 648842d69509Smrg#ifdef __cplusplus 648942d69509Smrg} 649042d69509Smrg#endif 649142d69509Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 649242d69509SmrgEOF 649342d69509Smrg 649442d69509Smrg if AC_TRY_EVAL(ac_compile); then 649542d69509Smrg # Now try to grab the symbols. 649642d69509Smrg nlist=conftest.nm 649742d69509Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then 649842d69509Smrg # Try sorting and uniquifying the output. 649942d69509Smrg if sort "$nlist" | uniq > "$nlist"T; then 650042d69509Smrg mv -f "$nlist"T "$nlist" 650142d69509Smrg else 650242d69509Smrg rm -f "$nlist"T 650342d69509Smrg fi 650442d69509Smrg 650542d69509Smrg # Make sure that we snagged all the symbols we need. 650642d69509Smrg if grep ' nm_test_var$' "$nlist" >/dev/null; then 650742d69509Smrg if grep ' nm_test_func$' "$nlist" >/dev/null; then 650842d69509Smrg cat <<EOF > conftest.$ac_ext 650942d69509Smrg#ifdef __cplusplus 651042d69509Smrgextern "C" { 651142d69509Smrg#endif 651242d69509Smrg 651342d69509SmrgEOF 651442d69509Smrg # Now generate the symbol file. 651542d69509Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' 651642d69509Smrg 651742d69509Smrg cat <<EOF >> conftest.$ac_ext 651842d69509Smrg#if defined (__STDC__) && __STDC__ 651942d69509Smrg# define lt_ptr_t void * 652042d69509Smrg#else 652142d69509Smrg# define lt_ptr_t char * 652242d69509Smrg# define const 652342d69509Smrg#endif 652442d69509Smrg 652542d69509Smrg/* The mapping between symbol names and symbols. */ 652642d69509Smrgconst struct { 652742d69509Smrg const char *name; 652842d69509Smrg lt_ptr_t address; 652942d69509Smrg} 653042d69509Smrglt_preloaded_symbols[[]] = 653142d69509Smrg{ 653242d69509SmrgEOF 653342d69509Smrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext 653442d69509Smrg cat <<\EOF >> conftest.$ac_ext 653542d69509Smrg {0, (lt_ptr_t) 0} 653642d69509Smrg}; 653742d69509Smrg 653842d69509Smrg#ifdef __cplusplus 653942d69509Smrg} 654042d69509Smrg#endif 654142d69509SmrgEOF 654242d69509Smrg # Now try linking the two files. 654342d69509Smrg mv conftest.$ac_objext conftstm.$ac_objext 654442d69509Smrg lt_save_LIBS="$LIBS" 654542d69509Smrg lt_save_CFLAGS="$CFLAGS" 654642d69509Smrg LIBS="conftstm.$ac_objext" 654742d69509Smrg CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 654842d69509Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 654942d69509Smrg pipe_works=yes 655042d69509Smrg fi 655142d69509Smrg LIBS="$lt_save_LIBS" 655242d69509Smrg CFLAGS="$lt_save_CFLAGS" 655342d69509Smrg else 655442d69509Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 655542d69509Smrg fi 655642d69509Smrg else 655742d69509Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 655842d69509Smrg fi 655942d69509Smrg else 656042d69509Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 656142d69509Smrg fi 656242d69509Smrg else 656342d69509Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 656442d69509Smrg cat conftest.$ac_ext >&5 656542d69509Smrg fi 656642d69509Smrg rm -rf conftest* conftst* 656742d69509Smrg 656842d69509Smrg # Do not use the global_symbol_pipe unless it works. 656942d69509Smrg if test "$pipe_works" = yes; then 657042d69509Smrg break 657142d69509Smrg else 657242d69509Smrg lt_cv_sys_global_symbol_pipe= 657342d69509Smrg fi 657442d69509Smrgdone 657542d69509Smrg]) 657642d69509Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 657742d69509Smrg lt_cv_sys_global_symbol_to_cdecl= 657842d69509Smrgfi 657942d69509Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 658042d69509Smrg AC_MSG_RESULT(failed) 658142d69509Smrgelse 658242d69509Smrg AC_MSG_RESULT(ok) 658342d69509Smrgfi 658442d69509Smrg]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE 658542d69509Smrg 658642d69509Smrg 658742d69509Smrg# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) 658842d69509Smrg# --------------------------------------- 658942d69509SmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], 659042d69509Smrg[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= 659142d69509Smrg_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 659242d69509Smrg_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= 659342d69509Smrg 659442d69509SmrgAC_MSG_CHECKING([for $compiler option to produce PIC]) 659542d69509Smrg ifelse([$1],[CXX],[ 659642d69509Smrg # C++ specific cases for pic, static, wl, etc. 659742d69509Smrg if test "$GXX" = yes; then 659842d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 659942d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 660042d69509Smrg 660142d69509Smrg case $host_os in 660242d69509Smrg aix*) 660342d69509Smrg # All AIX code is PIC. 660442d69509Smrg if test "$host_cpu" = ia64; then 660542d69509Smrg # AIX 5 now supports IA64 processor 660642d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 660742d69509Smrg fi 660842d69509Smrg ;; 660942d69509Smrg amigaos*) 661042d69509Smrg # FIXME: we need at least 68020 code to build shared libraries, but 661142d69509Smrg # adding the `-m68020' flag to GCC prevents building anything better, 661242d69509Smrg # like `-m68040'. 661342d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 661442d69509Smrg ;; 661542d69509Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 661642d69509Smrg # PIC is the default for these OSes. 661742d69509Smrg ;; 661842d69509Smrg mingw* | cygwin* | os2* | pw32*) 661942d69509Smrg # This hack is so that the source file can tell whether it is being 662042d69509Smrg # built for inclusion in a dll (and should export symbols for example). 662142d69509Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 662242d69509Smrg # (--disable-auto-import) libraries 662342d69509Smrg m4_if([$1], [GCJ], [], 662442d69509Smrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 662542d69509Smrg ;; 662642d69509Smrg darwin* | rhapsody*) 662742d69509Smrg # PIC is the default on this platform 662842d69509Smrg # Common symbols not allowed in MH_DYLIB files 662942d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 663042d69509Smrg ;; 663142d69509Smrg *djgpp*) 663242d69509Smrg # DJGPP does not support shared libraries at all 663342d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 663442d69509Smrg ;; 663542d69509Smrg interix[[3-9]]*) 663642d69509Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 663742d69509Smrg # Instead, we relocate shared libraries at runtime. 663842d69509Smrg ;; 663942d69509Smrg sysv4*MP*) 664042d69509Smrg if test -d /usr/nec; then 664142d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 664242d69509Smrg fi 664342d69509Smrg ;; 664442d69509Smrg hpux*) 664542d69509Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 664642d69509Smrg # not for PA HP-UX. 664742d69509Smrg case $host_cpu in 664842d69509Smrg hppa*64*|ia64*) 664942d69509Smrg ;; 665042d69509Smrg *) 665142d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 665242d69509Smrg ;; 665342d69509Smrg esac 665442d69509Smrg ;; 665542d69509Smrg *) 665642d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 665742d69509Smrg ;; 665842d69509Smrg esac 665942d69509Smrg else 666042d69509Smrg case $host_os in 666142d69509Smrg aix[[4-9]]*) 666242d69509Smrg # All AIX code is PIC. 666342d69509Smrg if test "$host_cpu" = ia64; then 666442d69509Smrg # AIX 5 now supports IA64 processor 666542d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 666642d69509Smrg else 666742d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 666842d69509Smrg fi 666942d69509Smrg ;; 667042d69509Smrg chorus*) 667142d69509Smrg case $cc_basename in 667242d69509Smrg cxch68*) 667342d69509Smrg # Green Hills C++ Compiler 667442d69509Smrg # _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" 667542d69509Smrg ;; 667642d69509Smrg esac 667742d69509Smrg ;; 667842d69509Smrg darwin*) 667942d69509Smrg # PIC is the default on this platform 668042d69509Smrg # Common symbols not allowed in MH_DYLIB files 668142d69509Smrg case $cc_basename in 668242d69509Smrg xlc*) 668342d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 668442d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 668542d69509Smrg ;; 668642d69509Smrg esac 668742d69509Smrg ;; 668842d69509Smrg dgux*) 668942d69509Smrg case $cc_basename in 669042d69509Smrg ec++*) 669142d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 669242d69509Smrg ;; 669342d69509Smrg ghcx*) 669442d69509Smrg # Green Hills C++ Compiler 669542d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 669642d69509Smrg ;; 669742d69509Smrg *) 669842d69509Smrg ;; 669942d69509Smrg esac 670042d69509Smrg ;; 670142d69509Smrg freebsd* | dragonfly*) 670242d69509Smrg # FreeBSD uses GNU C++ 670342d69509Smrg ;; 670442d69509Smrg hpux9* | hpux10* | hpux11*) 670542d69509Smrg case $cc_basename in 670642d69509Smrg CC*) 670742d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 670842d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 670942d69509Smrg if test "$host_cpu" != ia64; then 671042d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 671142d69509Smrg fi 671242d69509Smrg ;; 671342d69509Smrg aCC*) 671442d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 671542d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 671642d69509Smrg case $host_cpu in 671742d69509Smrg hppa*64*|ia64*) 671842d69509Smrg # +Z the default 671942d69509Smrg ;; 672042d69509Smrg *) 672142d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 672242d69509Smrg ;; 672342d69509Smrg esac 672442d69509Smrg ;; 672542d69509Smrg *) 672642d69509Smrg ;; 672742d69509Smrg esac 672842d69509Smrg ;; 672942d69509Smrg interix*) 673042d69509Smrg # This is c89, which is MS Visual C++ (no shared libs) 673142d69509Smrg # Anyone wants to do a port? 673242d69509Smrg ;; 673342d69509Smrg irix5* | irix6* | nonstopux*) 673442d69509Smrg case $cc_basename in 673542d69509Smrg CC*) 673642d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 673742d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 673842d69509Smrg # CC pic flag -KPIC is the default. 673942d69509Smrg ;; 674042d69509Smrg *) 674142d69509Smrg ;; 674242d69509Smrg esac 674342d69509Smrg ;; 674442d69509Smrg linux* | k*bsd*-gnu) 674542d69509Smrg case $cc_basename in 674642d69509Smrg KCC*) 674742d69509Smrg # KAI C++ Compiler 674842d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 674942d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 675042d69509Smrg ;; 675142d69509Smrg icpc* | ecpc*) 675242d69509Smrg # Intel C++ 675342d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 675442d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 675542d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 675642d69509Smrg ;; 675742d69509Smrg pgCC* | pgcpp*) 675842d69509Smrg # Portland Group C++ compiler. 675942d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 676042d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 676142d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 676242d69509Smrg ;; 676342d69509Smrg cxx*) 676442d69509Smrg # Compaq C++ 676542d69509Smrg # Make sure the PIC flag is empty. It appears that all Alpha 676642d69509Smrg # Linux and Compaq Tru64 Unix objects are PIC. 676742d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 676842d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 676942d69509Smrg ;; 677042d69509Smrg *) 677142d69509Smrg case `$CC -V 2>&1 | sed 5q` in 677242d69509Smrg *Sun\ C*) 677342d69509Smrg # Sun C++ 5.9 677442d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 677542d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 677642d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 677742d69509Smrg ;; 677842d69509Smrg esac 677942d69509Smrg ;; 678042d69509Smrg esac 678142d69509Smrg ;; 678242d69509Smrg lynxos*) 678342d69509Smrg ;; 678442d69509Smrg m88k*) 678542d69509Smrg ;; 678642d69509Smrg mvs*) 678742d69509Smrg case $cc_basename in 678842d69509Smrg cxx*) 678942d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 679042d69509Smrg ;; 679142d69509Smrg *) 679242d69509Smrg ;; 679342d69509Smrg esac 679442d69509Smrg ;; 679542d69509Smrg netbsd*) 679642d69509Smrg ;; 679742d69509Smrg osf3* | osf4* | osf5*) 679842d69509Smrg case $cc_basename in 679942d69509Smrg KCC*) 680042d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 680142d69509Smrg ;; 680242d69509Smrg RCC*) 680342d69509Smrg # Rational C++ 2.4.1 680442d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 680542d69509Smrg ;; 680642d69509Smrg cxx*) 680742d69509Smrg # Digital/Compaq C++ 680842d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 680942d69509Smrg # Make sure the PIC flag is empty. It appears that all Alpha 681042d69509Smrg # Linux and Compaq Tru64 Unix objects are PIC. 681142d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 681242d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 681342d69509Smrg ;; 681442d69509Smrg *) 681542d69509Smrg ;; 681642d69509Smrg esac 681742d69509Smrg ;; 681842d69509Smrg psos*) 681942d69509Smrg ;; 682042d69509Smrg solaris*) 682142d69509Smrg case $cc_basename in 682242d69509Smrg CC*) 682342d69509Smrg # Sun C++ 4.2, 5.x and Centerline C++ 682442d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 682542d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 682642d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 682742d69509Smrg ;; 682842d69509Smrg gcx*) 682942d69509Smrg # Green Hills C++ Compiler 683042d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 683142d69509Smrg ;; 683242d69509Smrg *) 683342d69509Smrg ;; 683442d69509Smrg esac 683542d69509Smrg ;; 683642d69509Smrg sunos4*) 683742d69509Smrg case $cc_basename in 683842d69509Smrg CC*) 683942d69509Smrg # Sun C++ 4.x 684042d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 684142d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 684242d69509Smrg ;; 684342d69509Smrg lcc*) 684442d69509Smrg # Lucid 684542d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 684642d69509Smrg ;; 684742d69509Smrg *) 684842d69509Smrg ;; 684942d69509Smrg esac 685042d69509Smrg ;; 685142d69509Smrg tandem*) 685242d69509Smrg case $cc_basename in 685342d69509Smrg NCC*) 685442d69509Smrg # NonStop-UX NCC 3.20 685542d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 685642d69509Smrg ;; 685742d69509Smrg *) 685842d69509Smrg ;; 685942d69509Smrg esac 686042d69509Smrg ;; 686142d69509Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 686242d69509Smrg case $cc_basename in 686342d69509Smrg CC*) 686442d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 686542d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 686642d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 686742d69509Smrg ;; 686842d69509Smrg esac 686942d69509Smrg ;; 687042d69509Smrg vxworks*) 687142d69509Smrg ;; 687242d69509Smrg *) 687342d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 687442d69509Smrg ;; 687542d69509Smrg esac 687642d69509Smrg fi 687742d69509Smrg], 687842d69509Smrg[ 687942d69509Smrg if test "$GCC" = yes; then 688042d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 688142d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 68824456fccdSmrg 688342d69509Smrg case $host_os in 688442d69509Smrg aix*) 688542d69509Smrg # All AIX code is PIC. 688642d69509Smrg if test "$host_cpu" = ia64; then 688742d69509Smrg # AIX 5 now supports IA64 processor 688842d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 688942d69509Smrg fi 689042d69509Smrg ;; 68914456fccdSmrg 689242d69509Smrg amigaos*) 689342d69509Smrg # FIXME: we need at least 68020 code to build shared libraries, but 689442d69509Smrg # adding the `-m68020' flag to GCC prevents building anything better, 689542d69509Smrg # like `-m68040'. 689642d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 689742d69509Smrg ;; 68984456fccdSmrg 689942d69509Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 690042d69509Smrg # PIC is the default for these OSes. 690142d69509Smrg ;; 69024456fccdSmrg 690342d69509Smrg mingw* | cygwin* | pw32* | os2*) 690442d69509Smrg # This hack is so that the source file can tell whether it is being 690542d69509Smrg # built for inclusion in a dll (and should export symbols for example). 690642d69509Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 690742d69509Smrg # (--disable-auto-import) libraries 690842d69509Smrg m4_if([$1], [GCJ], [], 690942d69509Smrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 691042d69509Smrg ;; 69114456fccdSmrg 691242d69509Smrg darwin* | rhapsody*) 691342d69509Smrg # PIC is the default on this platform 691442d69509Smrg # Common symbols not allowed in MH_DYLIB files 691542d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 691642d69509Smrg ;; 69174456fccdSmrg 691842d69509Smrg interix[[3-9]]*) 691942d69509Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 692042d69509Smrg # Instead, we relocate shared libraries at runtime. 692142d69509Smrg ;; 69224456fccdSmrg 692342d69509Smrg msdosdjgpp*) 692442d69509Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 692542d69509Smrg # on systems that don't support them. 692642d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 692742d69509Smrg enable_shared=no 692842d69509Smrg ;; 69294456fccdSmrg 693042d69509Smrg sysv4*MP*) 693142d69509Smrg if test -d /usr/nec; then 693242d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 693342d69509Smrg fi 693442d69509Smrg ;; 69354456fccdSmrg 693642d69509Smrg hpux*) 693742d69509Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 693842d69509Smrg # not for PA HP-UX. 693942d69509Smrg case $host_cpu in 694042d69509Smrg hppa*64*|ia64*) 694142d69509Smrg # +Z the default 694242d69509Smrg ;; 694342d69509Smrg *) 694442d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 694542d69509Smrg ;; 694642d69509Smrg esac 694742d69509Smrg ;; 69484456fccdSmrg 694942d69509Smrg *) 695042d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 695142d69509Smrg ;; 695242d69509Smrg esac 695342d69509Smrg else 695442d69509Smrg # PORTME Check for flag to pass linker flags through the system compiler. 695542d69509Smrg case $host_os in 695642d69509Smrg aix*) 695742d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 695842d69509Smrg if test "$host_cpu" = ia64; then 695942d69509Smrg # AIX 5 now supports IA64 processor 696042d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 696142d69509Smrg else 696242d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 696342d69509Smrg fi 696442d69509Smrg ;; 696542d69509Smrg darwin*) 696642d69509Smrg # PIC is the default on this platform 696742d69509Smrg # Common symbols not allowed in MH_DYLIB files 696842d69509Smrg case $cc_basename in 696942d69509Smrg xlc*) 697042d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' 697142d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 697242d69509Smrg ;; 697342d69509Smrg esac 697442d69509Smrg ;; 69754456fccdSmrg 697642d69509Smrg mingw* | cygwin* | pw32* | os2*) 697742d69509Smrg # This hack is so that the source file can tell whether it is being 697842d69509Smrg # built for inclusion in a dll (and should export symbols for example). 697942d69509Smrg m4_if([$1], [GCJ], [], 698042d69509Smrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 698142d69509Smrg ;; 69824456fccdSmrg 698342d69509Smrg hpux9* | hpux10* | hpux11*) 698442d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 698542d69509Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 698642d69509Smrg # not for PA HP-UX. 698742d69509Smrg case $host_cpu in 698842d69509Smrg hppa*64*|ia64*) 698942d69509Smrg # +Z the default 699042d69509Smrg ;; 699142d69509Smrg *) 699242d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 699342d69509Smrg ;; 699442d69509Smrg esac 699542d69509Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 699642d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 699742d69509Smrg ;; 69984456fccdSmrg 699942d69509Smrg irix5* | irix6* | nonstopux*) 700042d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 700142d69509Smrg # PIC (with -KPIC) is the default. 700242d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 700342d69509Smrg ;; 70044456fccdSmrg 700542d69509Smrg newsos6) 700642d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 700742d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 700842d69509Smrg ;; 70094456fccdSmrg 701042d69509Smrg linux* | k*bsd*-gnu) 701142d69509Smrg case $cc_basename in 701242d69509Smrg icc* | ecc*) 701342d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 701442d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 701542d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' 701642d69509Smrg ;; 701742d69509Smrg pgcc* | pgf77* | pgf90* | pgf95*) 701842d69509Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 701942d69509Smrg # which looks to be a dead project) 702042d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 702142d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 702242d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 702342d69509Smrg ;; 702442d69509Smrg ccc*) 702542d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 702642d69509Smrg # All Alpha code is PIC. 702742d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 702842d69509Smrg ;; 702942d69509Smrg *) 703042d69509Smrg case `$CC -V 2>&1 | sed 5q` in 703142d69509Smrg *Sun\ C*) 703242d69509Smrg # Sun C 5.9 703342d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 703442d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 703542d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 703642d69509Smrg ;; 703742d69509Smrg *Sun\ F*) 703842d69509Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 703942d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 704042d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 704142d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='' 704242d69509Smrg ;; 704342d69509Smrg esac 704442d69509Smrg ;; 704542d69509Smrg esac 704642d69509Smrg ;; 70474456fccdSmrg 704842d69509Smrg osf3* | osf4* | osf5*) 704942d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 705042d69509Smrg # All OSF/1 code is PIC. 705142d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 705242d69509Smrg ;; 70534456fccdSmrg 705442d69509Smrg rdos*) 705542d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 705642d69509Smrg ;; 70574456fccdSmrg 705842d69509Smrg solaris*) 705942d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 706042d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 706142d69509Smrg case $cc_basename in 706242d69509Smrg f77* | f90* | f95*) 706342d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 706442d69509Smrg *) 706542d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 706642d69509Smrg esac 706742d69509Smrg ;; 70684456fccdSmrg 706942d69509Smrg sunos4*) 707042d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 707142d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 707242d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 707342d69509Smrg ;; 70744456fccdSmrg 707542d69509Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 707642d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 707742d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 707842d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 707942d69509Smrg ;; 70804456fccdSmrg 708142d69509Smrg sysv4*MP*) 708242d69509Smrg if test -d /usr/nec ;then 708342d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 708442d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 708542d69509Smrg fi 708642d69509Smrg ;; 70874456fccdSmrg 708842d69509Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 708942d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 709042d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 709142d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 709242d69509Smrg ;; 70934456fccdSmrg 709442d69509Smrg unicos*) 709542d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 709642d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 709742d69509Smrg ;; 70984456fccdSmrg 709942d69509Smrg uts4*) 710042d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 710142d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 710242d69509Smrg ;; 71034456fccdSmrg 710442d69509Smrg *) 710542d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 710642d69509Smrg ;; 71074456fccdSmrg esac 710842d69509Smrg fi 710942d69509Smrg]) 711042d69509SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) 71114456fccdSmrg 711242d69509Smrg# 711342d69509Smrg# Check to make sure the PIC flag actually works. 711442d69509Smrg# 711542d69509Smrgif test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then 711642d69509Smrg AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], 711742d69509Smrg _LT_AC_TAGVAR(lt_cv_prog_compiler_pic_works, $1), 711842d69509Smrg [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], 711942d69509Smrg [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in 712042d69509Smrg "" | " "*) ;; 712142d69509Smrg *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; 712242d69509Smrg esac], 712342d69509Smrg [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 712442d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 71254456fccdSmrgfi 712642d69509Smrgcase $host_os in 712742d69509Smrg # For platforms which do not support PIC, -DPIC is meaningless: 712842d69509Smrg *djgpp*) 712942d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= 713042d69509Smrg ;; 713142d69509Smrg *) 713242d69509Smrg _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" 713342d69509Smrg ;; 713442d69509Smrgesac 713542d69509Smrg 713642d69509Smrg# 713742d69509Smrg# Check to make sure the static flag actually works. 713842d69509Smrg# 713942d69509Smrgwl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" 714042d69509SmrgAC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 714142d69509Smrg _LT_AC_TAGVAR(lt_cv_prog_compiler_static_works, $1), 714242d69509Smrg $lt_tmp_static_flag, 714342d69509Smrg [], 714442d69509Smrg [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) 714542d69509Smrg]) 714642d69509Smrg 714742d69509Smrg 714842d69509Smrg# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) 714942d69509Smrg# ------------------------------------ 715042d69509Smrg# See if the linker supports building shared libraries. 715142d69509SmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], 715242d69509Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl 715342d69509SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 715442d69509Smrgifelse([$1],[CXX],[ 715542d69509Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 715642d69509Smrg case $host_os in 715742d69509Smrg aix[[4-9]]*) 715842d69509Smrg # If we're using GNU nm, then we don't want the "-C" option. 715942d69509Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 716042d69509Smrg if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 716142d69509Smrg _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' 716242d69509Smrg else 716342d69509Smrg _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' 716442d69509Smrg fi 716542d69509Smrg ;; 716642d69509Smrg pw32*) 716742d69509Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 716842d69509Smrg ;; 716942d69509Smrg cygwin* | mingw*) 717042d69509Smrg _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' 717142d69509Smrg ;; 717242d69509Smrg *) 717342d69509Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 717442d69509Smrg ;; 717542d69509Smrg esac 717642d69509Smrg _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 717742d69509Smrg],[ 717842d69509Smrg runpath_var= 717942d69509Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)= 718042d69509Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no 718142d69509Smrg _LT_AC_TAGVAR(archive_cmds, $1)= 718242d69509Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)= 718342d69509Smrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= 718442d69509Smrg _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= 718542d69509Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 718642d69509Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 718742d69509Smrg _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= 718842d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 718942d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 719042d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 719142d69509Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 719242d69509Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=no 719342d69509Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 719442d69509Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown 719542d69509Smrg _LT_AC_TAGVAR(hardcode_automatic, $1)=no 719642d69509Smrg _LT_AC_TAGVAR(module_cmds, $1)= 719742d69509Smrg _LT_AC_TAGVAR(module_expsym_cmds, $1)= 719842d69509Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 719942d69509Smrg _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 720042d69509Smrg # include_expsyms should be a list of space-separated symbols to be *always* 720142d69509Smrg # included in the symbol list 720242d69509Smrg _LT_AC_TAGVAR(include_expsyms, $1)= 720342d69509Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 720442d69509Smrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 720542d69509Smrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 720642d69509Smrg # as well as any symbol that contains `d'. 720742d69509Smrg _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 720842d69509Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 720942d69509Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 721042d69509Smrg # the symbol is explicitly referenced. Since portable code cannot 721142d69509Smrg # rely on this symbol name, it's probably fine to never include it in 721242d69509Smrg # preloaded symbol tables. 721342d69509Smrg # Exclude shared library initialization/finalization symbols. 721442d69509Smrgdnl Note also adjust exclude_expsyms for C++ above. 721542d69509Smrg extract_expsyms_cmds= 721642d69509Smrg # Just being paranoid about ensuring that cc_basename is set. 721742d69509Smrg _LT_CC_BASENAME([$compiler]) 721842d69509Smrg case $host_os in 721942d69509Smrg cygwin* | mingw* | pw32*) 722042d69509Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 722142d69509Smrg # When not using gcc, we currently assume that we are using 722242d69509Smrg # Microsoft Visual C++. 722342d69509Smrg if test "$GCC" != yes; then 722442d69509Smrg with_gnu_ld=no 722542d69509Smrg fi 722642d69509Smrg ;; 722742d69509Smrg interix*) 722842d69509Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 722942d69509Smrg with_gnu_ld=yes 723042d69509Smrg ;; 723142d69509Smrg openbsd*) 723242d69509Smrg with_gnu_ld=no 723342d69509Smrg ;; 723442d69509Smrg esac 72354456fccdSmrg 723642d69509Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 723742d69509Smrg if test "$with_gnu_ld" = yes; then 723842d69509Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 723942d69509Smrg wlarc='${wl}' 72404456fccdSmrg 724142d69509Smrg # Set some defaults for GNU ld with shared library support. These 724242d69509Smrg # are reset later if shared libraries are not supported. Putting them 724342d69509Smrg # here allows them to be overridden if necessary. 724442d69509Smrg runpath_var=LD_RUN_PATH 724542d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 724642d69509Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 724742d69509Smrg # ancient GNU ld didn't support --whole-archive et. al. 724842d69509Smrg if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then 724942d69509Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 725042d69509Smrg else 725142d69509Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 725242d69509Smrg fi 725342d69509Smrg supports_anon_versioning=no 725442d69509Smrg case `$LD -v 2>/dev/null` in 725542d69509Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 725642d69509Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 725742d69509Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 725842d69509Smrg *\ 2.11.*) ;; # other 2.11 versions 725942d69509Smrg *) supports_anon_versioning=yes ;; 72604456fccdSmrg esac 72614456fccdSmrg 726242d69509Smrg # See if GNU ld supports shared libraries. 72634456fccdSmrg case $host_os in 726442d69509Smrg aix[[3-9]]*) 726542d69509Smrg # On AIX/PPC, the GNU linker is very broken 726642d69509Smrg if test "$host_cpu" != ia64; then 726742d69509Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 726842d69509Smrg cat <<EOF 1>&2 72694456fccdSmrg 727042d69509Smrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported 727142d69509Smrg*** to be unable to reliably create shared libraries on AIX. 727242d69509Smrg*** Therefore, libtool is disabling shared libraries support. If you 727342d69509Smrg*** really care for shared libraries, you may want to modify your PATH 727442d69509Smrg*** so that a non-GNU linker is found, and then restart. 72754456fccdSmrg 727642d69509SmrgEOF 727742d69509Smrg fi 727842d69509Smrg ;; 72794456fccdSmrg 728042d69509Smrg amigaos*) 728142d69509Smrg _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)' 728242d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 728342d69509Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 72844456fccdSmrg 728542d69509Smrg # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports 728642d69509Smrg # that the semantics of dynamic libraries on AmigaOS, at least up 728742d69509Smrg # to version 4, is to share data among multiple programs linked 728842d69509Smrg # with the same dynamic library. Since this doesn't match the 728942d69509Smrg # behavior of shared libraries on other platforms, we can't use 729042d69509Smrg # them. 729142d69509Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 729242d69509Smrg ;; 72934456fccdSmrg 729442d69509Smrg beos*) 729542d69509Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 729642d69509Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 729742d69509Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 729842d69509Smrg # support --undefined. This deserves some investigation. FIXME 729942d69509Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 730042d69509Smrg else 730142d69509Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 730242d69509Smrg fi 730342d69509Smrg ;; 73044456fccdSmrg 730542d69509Smrg cygwin* | mingw* | pw32*) 730642d69509Smrg # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 730742d69509Smrg # as there is no search path for DLLs. 730842d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 730942d69509Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 731042d69509Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=no 731142d69509Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 731242d69509Smrg _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' 73134456fccdSmrg 731442d69509Smrg if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 731542d69509Smrg _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' 731642d69509Smrg # If the export-symbols file already is a .def file (1st line 731742d69509Smrg # is EXPORTS), use it as is; otherwise, prepend... 731842d69509Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 731942d69509Smrg cp $export_symbols $output_objdir/$soname.def; 732042d69509Smrg else 732142d69509Smrg echo EXPORTS > $output_objdir/$soname.def; 732242d69509Smrg cat $export_symbols >> $output_objdir/$soname.def; 732342d69509Smrg fi~ 732442d69509Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 732542d69509Smrg else 732642d69509Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 732742d69509Smrg fi 732842d69509Smrg ;; 73294456fccdSmrg 733042d69509Smrg interix[[3-9]]*) 733142d69509Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 733242d69509Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 733342d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 733442d69509Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 733542d69509Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 733642d69509Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 733742d69509Smrg # default) and relocated if they conflict, which is a slow very memory 733842d69509Smrg # consuming and fragmenting process. To avoid this, we pick a random, 733942d69509Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 734042d69509Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 734142d69509Smrg _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' 734242d69509Smrg _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' 734342d69509Smrg ;; 73444456fccdSmrg 734542d69509Smrg gnu* | linux* | k*bsd*-gnu) 734642d69509Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 734742d69509Smrg tmp_addflag= 734842d69509Smrg case $cc_basename,$host_cpu in 734942d69509Smrg pgcc*) # Portland Group C compiler 735042d69509Smrg _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' 735142d69509Smrg tmp_addflag=' $pic_flag' 735242d69509Smrg ;; 735342d69509Smrg pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers 735442d69509Smrg _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' 735542d69509Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 735642d69509Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 735742d69509Smrg tmp_addflag=' -i_dynamic' ;; 735842d69509Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 735942d69509Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 736042d69509Smrg ifc* | ifort*) # Intel Fortran compiler 736142d69509Smrg tmp_addflag=' -nofor_main' ;; 736242d69509Smrg esac 736342d69509Smrg case `$CC -V 2>&1 | sed 5q` in 736442d69509Smrg *Sun\ C*) # Sun C 5.9 736542d69509Smrg _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' 736642d69509Smrg tmp_sharedflag='-G' ;; 736742d69509Smrg *Sun\ F*) # Sun Fortran 8.3 736842d69509Smrg tmp_sharedflag='-G' ;; 736942d69509Smrg *) 737042d69509Smrg tmp_sharedflag='-shared' ;; 737142d69509Smrg esac 737242d69509Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 73734456fccdSmrg 737442d69509Smrg if test $supports_anon_versioning = yes; then 737542d69509Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ 737642d69509Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 737742d69509Smrg $echo "local: *; };" >> $output_objdir/$libname.ver~ 737842d69509Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 737942d69509Smrg fi 738042d69509Smrg else 738142d69509Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 738242d69509Smrg fi 738342d69509Smrg ;; 73844456fccdSmrg 738542d69509Smrg netbsd*) 738642d69509Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 738742d69509Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 738842d69509Smrg wlarc= 738942d69509Smrg else 739042d69509Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 739142d69509Smrg _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' 739242d69509Smrg fi 739342d69509Smrg ;; 73944456fccdSmrg 739542d69509Smrg solaris*) 739642d69509Smrg if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then 739742d69509Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 739842d69509Smrg cat <<EOF 1>&2 73994456fccdSmrg 740042d69509Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 740142d69509Smrg*** create shared libraries on Solaris systems. Therefore, libtool 740242d69509Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 740342d69509Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 740442d69509Smrg*** your PATH or compiler configuration so that the native linker is 740542d69509Smrg*** used, and then restart. 74064456fccdSmrg 740742d69509SmrgEOF 740842d69509Smrg elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 740942d69509Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 741042d69509Smrg _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' 741142d69509Smrg else 741242d69509Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 741342d69509Smrg fi 741442d69509Smrg ;; 74154456fccdSmrg 741642d69509Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 741742d69509Smrg case `$LD -v 2>&1` in 741842d69509Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 741942d69509Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 742042d69509Smrg cat <<_LT_EOF 1>&2 74214456fccdSmrg 742242d69509Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 742342d69509Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 742442d69509Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 742542d69509Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 742642d69509Smrg*** your PATH or compiler configuration so that the native linker is 742742d69509Smrg*** used, and then restart. 74284456fccdSmrg 742942d69509Smrg_LT_EOF 743042d69509Smrg ;; 743142d69509Smrg *) 743242d69509Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 743342d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' 743442d69509Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' 743542d69509Smrg _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' 743642d69509Smrg else 743742d69509Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 743842d69509Smrg fi 743942d69509Smrg ;; 744042d69509Smrg esac 744142d69509Smrg ;; 74424456fccdSmrg 744342d69509Smrg sunos4*) 744442d69509Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 744542d69509Smrg wlarc= 744642d69509Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 744742d69509Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 744842d69509Smrg ;; 74494456fccdSmrg 745042d69509Smrg *) 745142d69509Smrg if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 745242d69509Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 745342d69509Smrg _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' 745442d69509Smrg else 745542d69509Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 745642d69509Smrg fi 745742d69509Smrg ;; 745842d69509Smrg esac 74594456fccdSmrg 746042d69509Smrg if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then 746142d69509Smrg runpath_var= 746242d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= 746342d69509Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= 746442d69509Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= 746542d69509Smrg fi 746642d69509Smrg else 746742d69509Smrg # PORTME fill in a description of your system's linker (not GNU ld) 746842d69509Smrg case $host_os in 746942d69509Smrg aix3*) 747042d69509Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 747142d69509Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 747242d69509Smrg _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' 747342d69509Smrg # Note: this linker hardcodes the directories in LIBPATH if there 747442d69509Smrg # are no directories specified by -L. 747542d69509Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 747642d69509Smrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 747742d69509Smrg # Neither direct hardcoding nor static linking is supported with a 747842d69509Smrg # broken collect2. 747942d69509Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 748042d69509Smrg fi 748142d69509Smrg ;; 74824456fccdSmrg 748342d69509Smrg aix[[4-9]]*) 748442d69509Smrg if test "$host_cpu" = ia64; then 748542d69509Smrg # On IA64, the linker does run time linking by default, so we don't 748642d69509Smrg # have to do anything special. 748742d69509Smrg aix_use_runtimelinking=no 748842d69509Smrg exp_sym_flag='-Bexport' 748942d69509Smrg no_entry_flag="" 749042d69509Smrg else 749142d69509Smrg # If we're using GNU nm, then we don't want the "-C" option. 749242d69509Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 749342d69509Smrg if $NM -V 2>&1 | grep 'GNU' > /dev/null; then 749442d69509Smrg _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' 749542d69509Smrg else 749642d69509Smrg _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' 749742d69509Smrg fi 749842d69509Smrg aix_use_runtimelinking=no 74994456fccdSmrg 750042d69509Smrg # Test if we are trying to use run time linking or normal 750142d69509Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 750242d69509Smrg # need to do runtime linking. 750342d69509Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 750442d69509Smrg for ld_flag in $LDFLAGS; do 750542d69509Smrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 750642d69509Smrg aix_use_runtimelinking=yes 750742d69509Smrg break 750842d69509Smrg fi 750942d69509Smrg done 751042d69509Smrg ;; 751142d69509Smrg esac 75124456fccdSmrg 751342d69509Smrg exp_sym_flag='-bexport' 751442d69509Smrg no_entry_flag='-bnoentry' 751542d69509Smrg fi 751642d69509Smrg 751742d69509Smrg # When large executables or shared objects are built, AIX ld can 751842d69509Smrg # have problems creating the table of contents. If linking a library 751942d69509Smrg # or program results in "error TOC overflow" add -mminimal-toc to 752042d69509Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 752142d69509Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 75224456fccdSmrg 752342d69509Smrg _LT_AC_TAGVAR(archive_cmds, $1)='' 752442d69509Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 752542d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 752642d69509Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 752742d69509Smrg 752842d69509Smrg if test "$GCC" = yes; then 752942d69509Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 753042d69509Smrg # We only want to do this on AIX 4.2 and lower, the check 753142d69509Smrg # below for broken collect2 doesn't work under 4.3+ 753242d69509Smrg collect2name=`${CC} -print-prog-name=collect2` 753342d69509Smrg if test -f "$collect2name" && \ 753442d69509Smrg strings "$collect2name" | grep resolve_lib_name >/dev/null 753542d69509Smrg then 753642d69509Smrg # We have reworked collect2 753742d69509Smrg : 753842d69509Smrg else 753942d69509Smrg # We have old collect2 754042d69509Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported 754142d69509Smrg # It fails to find uninstalled libraries when the uninstalled 754242d69509Smrg # path is not listed in the libpath. Setting hardcode_minus_L 754342d69509Smrg # to unsupported forces relinking 754442d69509Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 754542d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 754642d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= 754742d69509Smrg fi 754842d69509Smrg ;; 754942d69509Smrg esac 755042d69509Smrg shared_flag='-shared' 755142d69509Smrg if test "$aix_use_runtimelinking" = yes; then 755242d69509Smrg shared_flag="$shared_flag "'${wl}-G' 755342d69509Smrg fi 755442d69509Smrg else 755542d69509Smrg # not using gcc 755642d69509Smrg if test "$host_cpu" = ia64; then 755742d69509Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 755842d69509Smrg # chokes on -Wl,-G. The following line is correct: 755942d69509Smrg shared_flag='-G' 756042d69509Smrg else 756142d69509Smrg if test "$aix_use_runtimelinking" = yes; then 756242d69509Smrg shared_flag='${wl}-G' 756342d69509Smrg else 756442d69509Smrg shared_flag='${wl}-bM:SRE' 756542d69509Smrg fi 756642d69509Smrg fi 756742d69509Smrg fi 75684456fccdSmrg 756942d69509Smrg # It seems that -bexpall does not export symbols beginning with 757042d69509Smrg # underscore (_), so it is better to generate a list of symbols to export. 757142d69509Smrg _LT_AC_TAGVAR(always_export_symbols, $1)=yes 757242d69509Smrg if test "$aix_use_runtimelinking" = yes; then 757342d69509Smrg # Warning - without using the other runtime loading flags (-brtl), 757442d69509Smrg # -berok will link without error, but may produce a broken library. 757542d69509Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' 757642d69509Smrg # Determine the default libpath from the value encoded in an empty executable. 757742d69509Smrg _LT_AC_SYS_LIBPATH_AIX 757842d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 757942d69509Smrg _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" 758042d69509Smrg else 758142d69509Smrg if test "$host_cpu" = ia64; then 758242d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 758342d69509Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 758442d69509Smrg _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" 758542d69509Smrg else 758642d69509Smrg # Determine the default libpath from the value encoded in an empty executable. 758742d69509Smrg _LT_AC_SYS_LIBPATH_AIX 758842d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 758942d69509Smrg # Warning - without using the other run time loading flags, 759042d69509Smrg # -berok will link without error, but may produce a broken library. 759142d69509Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 759242d69509Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 759342d69509Smrg # Exported symbols can be pulled into shared objects from archives 759442d69509Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 759542d69509Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 759642d69509Smrg # This is similar to how AIX traditionally builds its shared libraries. 759742d69509Smrg _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' 759842d69509Smrg fi 759942d69509Smrg fi 760042d69509Smrg ;; 76014456fccdSmrg 760242d69509Smrg amigaos*) 760342d69509Smrg _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)' 760442d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 760542d69509Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 760642d69509Smrg # see comment about different semantics on the GNU ld section 760742d69509Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 760842d69509Smrg ;; 76094456fccdSmrg 761042d69509Smrg bsdi[[45]]*) 761142d69509Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 761242d69509Smrg ;; 76134456fccdSmrg 761442d69509Smrg cygwin* | mingw* | pw32*) 761542d69509Smrg # When not using gcc, we currently assume that we are using 761642d69509Smrg # Microsoft Visual C++. 761742d69509Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 761842d69509Smrg # no search path for DLLs. 761942d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 762042d69509Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 762142d69509Smrg # Tell ltmain to make .lib files, not .a files. 762242d69509Smrg libext=lib 762342d69509Smrg # Tell ltmain to make .dll files, not .so files. 762442d69509Smrg shrext_cmds=".dll" 762542d69509Smrg # FIXME: Setting linknames here is a bad hack. 762642d69509Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' 762742d69509Smrg # The linker will automatically build a .lib file if we build a DLL. 762842d69509Smrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' 762942d69509Smrg # FIXME: Should let the user specify the lib program. 763042d69509Smrg _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 763142d69509Smrg _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' 763242d69509Smrg _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 763342d69509Smrg ;; 76344456fccdSmrg 763542d69509Smrg darwin* | rhapsody*) 763642d69509Smrg case $host_os in 763742d69509Smrg rhapsody* | darwin1.[[012]]) 763842d69509Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' 763942d69509Smrg ;; 764042d69509Smrg *) # Darwin 1.3 on 764142d69509Smrg if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then 764242d69509Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 764342d69509Smrg else 764442d69509Smrg case ${MACOSX_DEPLOYMENT_TARGET} in 764542d69509Smrg 10.[[012]]) 764642d69509Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' 764742d69509Smrg ;; 764842d69509Smrg 10.*) 764942d69509Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' 765042d69509Smrg ;; 765142d69509Smrg esac 765242d69509Smrg fi 765342d69509Smrg ;; 765442d69509Smrg esac 765542d69509Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 765642d69509Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 765742d69509Smrg _LT_AC_TAGVAR(hardcode_automatic, $1)=yes 765842d69509Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 765942d69509Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' 766042d69509Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 766142d69509Smrg if test "$GCC" = yes ; then 766242d69509Smrg output_verbose_link_cmd='echo' 766342d69509Smrg _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}" 766442d69509Smrg _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 766542d69509Smrg _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}" 766642d69509Smrg _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}" 766742d69509Smrg else 766842d69509Smrg case $cc_basename in 766942d69509Smrg xlc*) 767042d69509Smrg output_verbose_link_cmd='echo' 767142d69509Smrg _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' 767242d69509Smrg _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' 767342d69509Smrg # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds 767442d69509Smrg _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}' 767542d69509Smrg _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}' 767642d69509Smrg ;; 767742d69509Smrg *) 767842d69509Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 767942d69509Smrg ;; 768042d69509Smrg esac 768142d69509Smrg fi 768242d69509Smrg ;; 76834456fccdSmrg 768442d69509Smrg dgux*) 768542d69509Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 768642d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 768742d69509Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 768842d69509Smrg ;; 76894456fccdSmrg 769042d69509Smrg freebsd1*) 769142d69509Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 769242d69509Smrg ;; 76934456fccdSmrg 769442d69509Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 769542d69509Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 769642d69509Smrg # does not break anything, and helps significantly (at the cost of a little 769742d69509Smrg # extra space). 769842d69509Smrg freebsd2.2*) 769942d69509Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 770042d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 770142d69509Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 770242d69509Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 770342d69509Smrg ;; 77044456fccdSmrg 770542d69509Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 770642d69509Smrg freebsd2*) 770742d69509Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 770842d69509Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 770942d69509Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 771042d69509Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 771142d69509Smrg ;; 77124456fccdSmrg 771342d69509Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 771442d69509Smrg freebsd* | dragonfly*) 771542d69509Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' 771642d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 771742d69509Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 771842d69509Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 771942d69509Smrg ;; 77204456fccdSmrg 772142d69509Smrg hpux9*) 772242d69509Smrg if test "$GCC" = yes; then 772342d69509Smrg _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' 77244456fccdSmrg else 772542d69509Smrg _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' 77264456fccdSmrg fi 772742d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 772842d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 772942d69509Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 773042d69509Smrg 773142d69509Smrg # hardcode_minus_L: Not really in the search PATH, 773242d69509Smrg # but as the default location of the library. 773342d69509Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 773442d69509Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 77354456fccdSmrg ;; 773642d69509Smrg 773742d69509Smrg hpux10*) 773842d69509Smrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 773942d69509Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 774042d69509Smrg else 774142d69509Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 77424456fccdSmrg fi 774342d69509Smrg if test "$with_gnu_ld" = no; then 774442d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 774542d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 77464456fccdSmrg 774742d69509Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 774842d69509Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 77494456fccdSmrg 775042d69509Smrg # hardcode_minus_L: Not really in the search PATH, 775142d69509Smrg # but as the default location of the library. 775242d69509Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 775342d69509Smrg fi 775442d69509Smrg ;; 77554456fccdSmrg 775642d69509Smrg hpux11*) 775742d69509Smrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 775842d69509Smrg case $host_cpu in 775942d69509Smrg hppa*64*) 776042d69509Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 776142d69509Smrg ;; 776242d69509Smrg ia64*) 776342d69509Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 776442d69509Smrg ;; 776542d69509Smrg *) 776642d69509Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 776742d69509Smrg ;; 776842d69509Smrg esac 776942d69509Smrg else 777042d69509Smrg case $host_cpu in 777142d69509Smrg hppa*64*) 777242d69509Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 777342d69509Smrg ;; 777442d69509Smrg ia64*) 777542d69509Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 777642d69509Smrg ;; 777742d69509Smrg *) 777842d69509Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 777942d69509Smrg ;; 778042d69509Smrg esac 778142d69509Smrg fi 778242d69509Smrg if test "$with_gnu_ld" = no; then 778342d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 778442d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 77854456fccdSmrg 778642d69509Smrg case $host_cpu in 778742d69509Smrg hppa*64*|ia64*) 778842d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 778942d69509Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 779042d69509Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 779142d69509Smrg ;; 779242d69509Smrg *) 779342d69509Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 779442d69509Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 77954456fccdSmrg 779642d69509Smrg # hardcode_minus_L: Not really in the search PATH, 779742d69509Smrg # but as the default location of the library. 779842d69509Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 779942d69509Smrg ;; 780042d69509Smrg esac 780142d69509Smrg fi 780242d69509Smrg ;; 78034456fccdSmrg 780442d69509Smrg irix5* | irix6* | nonstopux*) 780542d69509Smrg if test "$GCC" = yes; then 780642d69509Smrg _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' 780742d69509Smrg else 780842d69509Smrg _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' 780942d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 781042d69509Smrg fi 781142d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 781242d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 781342d69509Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 781442d69509Smrg ;; 78154456fccdSmrg 781642d69509Smrg netbsd*) 781742d69509Smrg if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then 781842d69509Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 781942d69509Smrg else 782042d69509Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 782142d69509Smrg fi 782242d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 782342d69509Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 782442d69509Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 782542d69509Smrg ;; 78264456fccdSmrg 782742d69509Smrg newsos6) 782842d69509Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 782942d69509Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 783042d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 783142d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 783242d69509Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 783342d69509Smrg ;; 78344456fccdSmrg 783542d69509Smrg openbsd*) 783642d69509Smrg if test -f /usr/libexec/ld.so; then 783742d69509Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 783842d69509Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 783942d69509Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 784042d69509Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 784142d69509Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 784242d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 784342d69509Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 784442d69509Smrg else 784542d69509Smrg case $host_os in 784642d69509Smrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 784742d69509Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 784842d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 784942d69509Smrg ;; 785042d69509Smrg *) 785142d69509Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 785242d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 785342d69509Smrg ;; 785442d69509Smrg esac 785542d69509Smrg fi 785642d69509Smrg else 785742d69509Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 785842d69509Smrg fi 785942d69509Smrg ;; 78604456fccdSmrg 786142d69509Smrg os2*) 786242d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 786342d69509Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 786442d69509Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported 786542d69509Smrg _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' 786642d69509Smrg _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 786742d69509Smrg ;; 78684456fccdSmrg 786942d69509Smrg osf3*) 787042d69509Smrg if test "$GCC" = yes; then 787142d69509Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 787242d69509Smrg _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' 787342d69509Smrg else 787442d69509Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 787542d69509Smrg _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' 787642d69509Smrg fi 787742d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 787842d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 787942d69509Smrg ;; 78804456fccdSmrg 788142d69509Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 788242d69509Smrg if test "$GCC" = yes; then 788342d69509Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 788442d69509Smrg _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' 788542d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 788642d69509Smrg else 788742d69509Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 788842d69509Smrg _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' 788942d69509Smrg _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~ 789042d69509Smrg $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' 78914456fccdSmrg 789242d69509Smrg # Both c and cxx compiler support -rpath directly 789342d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 789442d69509Smrg fi 789542d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: 789642d69509Smrg ;; 78974456fccdSmrg 789842d69509Smrg solaris*) 789942d69509Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' 790042d69509Smrg if test "$GCC" = yes; then 790142d69509Smrg wlarc='${wl}' 790242d69509Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 790342d69509Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 790442d69509Smrg $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' 790542d69509Smrg else 790642d69509Smrg wlarc='' 790742d69509Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 790842d69509Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ 790942d69509Smrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' 791042d69509Smrg fi 791142d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 791242d69509Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 791342d69509Smrg case $host_os in 791442d69509Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 791542d69509Smrg *) 791642d69509Smrg # The compiler driver will combine and reorder linker options, 791742d69509Smrg # but understands `-z linker_flag'. GCC discards it without `$wl', 791842d69509Smrg # but is careful enough not to reorder. 791942d69509Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 792042d69509Smrg if test "$GCC" = yes; then 792142d69509Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 792242d69509Smrg else 792342d69509Smrg _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 792442d69509Smrg fi 792542d69509Smrg ;; 792642d69509Smrg esac 792742d69509Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 792842d69509Smrg ;; 792942d69509Smrg 793042d69509Smrg sunos4*) 793142d69509Smrg if test "x$host_vendor" = xsequent; then 793242d69509Smrg # Use $CC to link under sequent, because it throws in some extra .o 793342d69509Smrg # files that make .init and .fini sections work. 793442d69509Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 793542d69509Smrg else 793642d69509Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 793742d69509Smrg fi 793842d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 793942d69509Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes 794042d69509Smrg _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes 794142d69509Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 794242d69509Smrg ;; 79434456fccdSmrg 794442d69509Smrg sysv4) 794542d69509Smrg case $host_vendor in 794642d69509Smrg sni) 794742d69509Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 794842d69509Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 794942d69509Smrg ;; 795042d69509Smrg siemens) 795142d69509Smrg ## LD is ld it makes a PLAMLIB 795242d69509Smrg ## CC just makes a GrossModule. 795342d69509Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 795442d69509Smrg _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 795542d69509Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no 795642d69509Smrg ;; 795742d69509Smrg motorola) 795842d69509Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 795942d69509Smrg _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 796042d69509Smrg ;; 796142d69509Smrg esac 796242d69509Smrg runpath_var='LD_RUN_PATH' 796342d69509Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 796442d69509Smrg ;; 79654456fccdSmrg 796642d69509Smrg sysv4.3*) 796742d69509Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 796842d69509Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 796942d69509Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 797042d69509Smrg ;; 79714456fccdSmrg 797242d69509Smrg sysv4*MP*) 797342d69509Smrg if test -d /usr/nec; then 797442d69509Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 797542d69509Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 797642d69509Smrg runpath_var=LD_RUN_PATH 797742d69509Smrg hardcode_runpath_var=yes 797842d69509Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=yes 797942d69509Smrg fi 798042d69509Smrg ;; 79814456fccdSmrg 798242d69509Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 798342d69509Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 798442d69509Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 798542d69509Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 798642d69509Smrg runpath_var='LD_RUN_PATH' 79874456fccdSmrg 798842d69509Smrg if test "$GCC" = yes; then 798942d69509Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 799042d69509Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 799142d69509Smrg else 799242d69509Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 799342d69509Smrg _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 799442d69509Smrg fi 799542d69509Smrg ;; 79964456fccdSmrg 799742d69509Smrg sysv5* | sco3.2v5* | sco5v6*) 799842d69509Smrg # Note: We can NOT use -z defs as we might desire, because we do not 799942d69509Smrg # link with -lc, and that would cause any symbols used from libc to 800042d69509Smrg # always be unresolved, which means just about no library would 800142d69509Smrg # ever link correctly. If we're not using GNU ld we use -z text 800242d69509Smrg # though, which does catch some bad symbols but isn't as heavy-handed 800342d69509Smrg # as -z defs. 800442d69509Smrg _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 800542d69509Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 800642d69509Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 800742d69509Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 800842d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' 800942d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' 801042d69509Smrg _LT_AC_TAGVAR(link_all_deplibs, $1)=yes 801142d69509Smrg _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 801242d69509Smrg runpath_var='LD_RUN_PATH' 80134456fccdSmrg 801442d69509Smrg if test "$GCC" = yes; then 801542d69509Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 801642d69509Smrg _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' 801742d69509Smrg else 801842d69509Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' 801942d69509Smrg _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' 802042d69509Smrg fi 802142d69509Smrg ;; 80224456fccdSmrg 802342d69509Smrg uts4*) 802442d69509Smrg _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 802542d69509Smrg _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 802642d69509Smrg _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no 802742d69509Smrg ;; 80284456fccdSmrg 802942d69509Smrg *) 803042d69509Smrg _LT_AC_TAGVAR(ld_shlibs, $1)=no 803142d69509Smrg ;; 803242d69509Smrg esac 803342d69509Smrg fi 80344456fccdSmrg]) 803542d69509SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) 803642d69509Smrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 80374456fccdSmrg 80384456fccdSmrg# 803942d69509Smrg# Do we need to explicitly link libc? 80404456fccdSmrg# 804142d69509Smrgcase "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in 804242d69509Smrgx|xyes) 804342d69509Smrg # Assume -lc should be added 804442d69509Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 80454456fccdSmrg 804642d69509Smrg if test "$enable_shared" = yes && test "$GCC" = yes; then 804742d69509Smrg case $_LT_AC_TAGVAR(archive_cmds, $1) in 804842d69509Smrg *'~'*) 804942d69509Smrg # FIXME: we may have to deal with multi-command sequences. 805042d69509Smrg ;; 805142d69509Smrg '$CC '*) 805242d69509Smrg # Test whether the compiler implicitly links with -lc since on some 805342d69509Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 805442d69509Smrg # to ld, don't add -lc before -lgcc. 805542d69509Smrg AC_MSG_CHECKING([whether -lc should be explicitly linked in]) 805642d69509Smrg $rm conftest* 805742d69509Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 80584456fccdSmrg 805942d69509Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 806042d69509Smrg soname=conftest 806142d69509Smrg lib=conftest 806242d69509Smrg libobjs=conftest.$ac_objext 806342d69509Smrg deplibs= 806442d69509Smrg wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) 806542d69509Smrg pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) 806642d69509Smrg compiler_flags=-v 806742d69509Smrg linker_flags=-v 806842d69509Smrg verstring= 806942d69509Smrg output_objdir=. 807042d69509Smrg libname=conftest 807142d69509Smrg lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) 807242d69509Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)= 807342d69509Smrg if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 807442d69509Smrg then 807542d69509Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no 807642d69509Smrg else 807742d69509Smrg _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes 807842d69509Smrg fi 807942d69509Smrg _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 808042d69509Smrg else 808142d69509Smrg cat conftest.err 1>&5 808242d69509Smrg fi 808342d69509Smrg $rm conftest* 808442d69509Smrg AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) 808542d69509Smrg ;; 808642d69509Smrg esac 808742d69509Smrg fi 808842d69509Smrg ;; 808942d69509Smrgesac 809042d69509Smrg])# AC_LIBTOOL_PROG_LD_SHLIBS 80914456fccdSmrg 80924456fccdSmrg 809342d69509Smrg# _LT_AC_FILE_LTDLL_C 809442d69509Smrg# ------------------- 809542d69509Smrg# Be careful that the start marker always follows a newline. 809642d69509SmrgAC_DEFUN([_LT_AC_FILE_LTDLL_C], [ 809742d69509Smrg# /* ltdll.c starts here */ 809842d69509Smrg# #define WIN32_LEAN_AND_MEAN 809942d69509Smrg# #include <windows.h> 810042d69509Smrg# #undef WIN32_LEAN_AND_MEAN 810142d69509Smrg# #include <stdio.h> 81024456fccdSmrg# 810342d69509Smrg# #ifndef __CYGWIN__ 810442d69509Smrg# # ifdef __CYGWIN32__ 810542d69509Smrg# # define __CYGWIN__ __CYGWIN32__ 810642d69509Smrg# # endif 810742d69509Smrg# #endif 810842d69509Smrg# 810942d69509Smrg# #ifdef __cplusplus 811042d69509Smrg# extern "C" { 811142d69509Smrg# #endif 811242d69509Smrg# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); 811342d69509Smrg# #ifdef __cplusplus 811442d69509Smrg# } 811542d69509Smrg# #endif 811642d69509Smrg# 811742d69509Smrg# #ifdef __CYGWIN__ 811842d69509Smrg# #include <cygwin/cygwin_dll.h> 811942d69509Smrg# DECLARE_CYGWIN_DLL( DllMain ); 812042d69509Smrg# #endif 812142d69509Smrg# HINSTANCE __hDllInstance_base; 812242d69509Smrg# 812342d69509Smrg# BOOL APIENTRY 812442d69509Smrg# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) 812542d69509Smrg# { 812642d69509Smrg# __hDllInstance_base = hInst; 812742d69509Smrg# return TRUE; 812842d69509Smrg# } 812942d69509Smrg# /* ltdll.c ends here */ 813042d69509Smrg])# _LT_AC_FILE_LTDLL_C 81314456fccdSmrg 81324456fccdSmrg 813342d69509Smrg# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) 813442d69509Smrg# --------------------------------- 813542d69509SmrgAC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) 81364456fccdSmrg 81374456fccdSmrg 813842d69509Smrg# old names 813942d69509SmrgAC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) 814042d69509SmrgAC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 814142d69509SmrgAC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 814242d69509SmrgAC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 814342d69509SmrgAC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 814442d69509SmrgAC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) 814542d69509SmrgAC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) 81464456fccdSmrg 814742d69509Smrg# This is just to silence aclocal about the macro not being used 814842d69509Smrgifelse([AC_DISABLE_FAST_INSTALL]) 81494456fccdSmrg 815042d69509SmrgAC_DEFUN([LT_AC_PROG_GCJ], 815142d69509Smrg[AC_CHECK_TOOL(GCJ, gcj, no) 815242d69509Smrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 815342d69509Smrg AC_SUBST(GCJFLAGS) 81544456fccdSmrg]) 81554456fccdSmrg 815642d69509SmrgAC_DEFUN([LT_AC_PROG_RC], 815742d69509Smrg[AC_CHECK_TOOL(RC, windres, no) 815842d69509Smrg]) 81594456fccdSmrg 81604456fccdSmrg 816142d69509Smrg# Cheap backport of AS_EXECUTABLE_P and required macros 816242d69509Smrg# from Autoconf 2.59; we should not use $as_executable_p directly. 81634456fccdSmrg 816442d69509Smrg# _AS_TEST_PREPARE 816542d69509Smrg# ---------------- 816642d69509Smrgm4_ifndef([_AS_TEST_PREPARE], 816742d69509Smrg[m4_defun([_AS_TEST_PREPARE], 816842d69509Smrg[if test -x / >/dev/null 2>&1; then 816942d69509Smrg as_executable_p='test -x' 81704456fccdSmrgelse 817142d69509Smrg as_executable_p='test -f' 81724456fccdSmrgfi 817342d69509Smrg])])# _AS_TEST_PREPARE 81744456fccdSmrg 817542d69509Smrg# AS_EXECUTABLE_P 81764456fccdSmrg# --------------- 817742d69509Smrg# Check whether a file is executable. 817842d69509Smrgm4_ifndef([AS_EXECUTABLE_P], 817942d69509Smrg[m4_defun([AS_EXECUTABLE_P], 818042d69509Smrg[AS_REQUIRE([_AS_TEST_PREPARE])dnl 818142d69509Smrg$as_executable_p $1[]dnl 818242d69509Smrg])])# AS_EXECUTABLE_P 818342d69509Smrg 818442d69509Smrg# NOTE: This macro has been submitted for inclusion into # 818542d69509Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 818642d69509Smrg# a released version of Autoconf we should remove this # 818742d69509Smrg# macro and use it instead. # 818842d69509Smrg# LT_AC_PROG_SED 818942d69509Smrg# -------------- 819042d69509Smrg# Check for a fully-functional sed program, that truncates 819142d69509Smrg# as few characters as possible. Prefer GNU sed if found. 819242d69509SmrgAC_DEFUN([LT_AC_PROG_SED], 819342d69509Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 819442d69509SmrgAC_CACHE_VAL(lt_cv_path_SED, 819542d69509Smrg[# Loop through the user's path and test for sed and gsed. 819642d69509Smrg# Then use that list of sed's as ones to test for truncation. 819742d69509Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 819842d69509Smrgfor as_dir in $PATH 819942d69509Smrgdo 820042d69509Smrg IFS=$as_save_IFS 820142d69509Smrg test -z "$as_dir" && as_dir=. 820242d69509Smrg for lt_ac_prog in sed gsed; do 820342d69509Smrg for ac_exec_ext in '' $ac_executable_extensions; do 820442d69509Smrg if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then 820542d69509Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 820642d69509Smrg fi 820742d69509Smrg done 82084456fccdSmrg done 820942d69509Smrgdone 821042d69509SmrgIFS=$as_save_IFS 821142d69509Smrglt_ac_max=0 821242d69509Smrglt_ac_count=0 821342d69509Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 821442d69509Smrg# along with /bin/sed that truncates output. 821542d69509Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 821642d69509Smrg test ! -f $lt_ac_sed && continue 821742d69509Smrg cat /dev/null > conftest.in 821842d69509Smrg lt_ac_count=0 821942d69509Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 822042d69509Smrg # Check for GNU sed and select it if it is found. 822142d69509Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 822242d69509Smrg lt_cv_path_SED=$lt_ac_sed 822342d69509Smrg break 82244456fccdSmrg fi 822542d69509Smrg while true; do 822642d69509Smrg cat conftest.in conftest.in >conftest.tmp 822742d69509Smrg mv conftest.tmp conftest.in 822842d69509Smrg cp conftest.in conftest.nl 822942d69509Smrg echo >>conftest.nl 823042d69509Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 823142d69509Smrg cmp -s conftest.out conftest.nl || break 823242d69509Smrg # 10000 chars as input seems more than enough 823342d69509Smrg test $lt_ac_count -gt 10 && break 823442d69509Smrg lt_ac_count=`expr $lt_ac_count + 1` 823542d69509Smrg if test $lt_ac_count -gt $lt_ac_max; then 823642d69509Smrg lt_ac_max=$lt_ac_count 823742d69509Smrg lt_cv_path_SED=$lt_ac_sed 823842d69509Smrg fi 823942d69509Smrg done 824042d69509Smrgdone 824142d69509Smrg]) 824242d69509SmrgSED=$lt_cv_path_SED 824342d69509SmrgAC_SUBST([SED]) 824442d69509SmrgAC_MSG_RESULT([$SED]) 824542d69509Smrg]) 82464456fccdSmrg 824742d69509Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 824842d69509Smrg# 824942d69509Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 82504456fccdSmrg# 825142d69509Smrg# This program is free software; you can redistribute it and/or modify 825242d69509Smrg# it under the terms of the GNU General Public License as published by 825342d69509Smrg# the Free Software Foundation; either version 2 of the License, or 825442d69509Smrg# (at your option) any later version. 825542d69509Smrg# 825642d69509Smrg# This program is distributed in the hope that it will be useful, but 825742d69509Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 825842d69509Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 825942d69509Smrg# General Public License for more details. 826042d69509Smrg# 826142d69509Smrg# You should have received a copy of the GNU General Public License 826242d69509Smrg# along with this program; if not, write to the Free Software 826342d69509Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 826442d69509Smrg# 826542d69509Smrg# As a special exception to the GNU General Public License, if you 826642d69509Smrg# distribute this file as part of a program that contains a 826742d69509Smrg# configuration script generated by Autoconf, you may include it under 826842d69509Smrg# the same distribution terms that you use for the rest of that program. 82694456fccdSmrg 827042d69509Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 82714456fccdSmrg# ---------------------------------- 827242d69509SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 827342d69509Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 827442d69509Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 827542d69509SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 827642d69509Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 827742d69509Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 827842d69509Smrgfi 827942d69509Smrgif test -n "$PKG_CONFIG"; then 828042d69509Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 828142d69509Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 828242d69509Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 828342d69509Smrg AC_MSG_RESULT([yes]) 828442d69509Smrg else 828542d69509Smrg AC_MSG_RESULT([no]) 828642d69509Smrg PKG_CONFIG="" 828742d69509Smrg fi 828842d69509Smrg 828942d69509Smrgfi[]dnl 829042d69509Smrg])# PKG_PROG_PKG_CONFIG 82914456fccdSmrg 829242d69509Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 82934456fccdSmrg# 829442d69509Smrg# Check to see whether a particular set of modules exists. Similar 829542d69509Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 829642d69509Smrg# 829742d69509Smrg# 829842d69509Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 829942d69509Smrg# this or PKG_CHECK_MODULES is called, or make sure to call 830042d69509Smrg# PKG_CHECK_EXISTS manually 830142d69509Smrg# -------------------------------------------------------------- 830242d69509SmrgAC_DEFUN([PKG_CHECK_EXISTS], 830342d69509Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 830442d69509Smrgif test -n "$PKG_CONFIG" && \ 830542d69509Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 830642d69509Smrg m4_ifval([$2], [$2], [:]) 830742d69509Smrgm4_ifvaln([$3], [else 830842d69509Smrg $3])dnl 830942d69509Smrgfi]) 83104456fccdSmrg 83114456fccdSmrg 831242d69509Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 831342d69509Smrg# --------------------------------------------- 831442d69509Smrgm4_define([_PKG_CONFIG], 831542d69509Smrg[if test -n "$$1"; then 831642d69509Smrg pkg_cv_[]$1="$$1" 831742d69509Smrg elif test -n "$PKG_CONFIG"; then 831842d69509Smrg PKG_CHECK_EXISTS([$3], 831942d69509Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 832042d69509Smrg [pkg_failed=yes]) 832142d69509Smrg else 832242d69509Smrg pkg_failed=untried 832342d69509Smrgfi[]dnl 832442d69509Smrg])# _PKG_CONFIG 83254456fccdSmrg 832642d69509Smrg# _PKG_SHORT_ERRORS_SUPPORTED 832742d69509Smrg# ----------------------------- 832842d69509SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 832942d69509Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 833042d69509Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 833142d69509Smrg _pkg_short_errors_supported=yes 833242d69509Smrgelse 833342d69509Smrg _pkg_short_errors_supported=no 833442d69509Smrgfi[]dnl 833542d69509Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 83364456fccdSmrg 83374456fccdSmrg 833842d69509Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 833942d69509Smrg# [ACTION-IF-NOT-FOUND]) 83404456fccdSmrg# 834142d69509Smrg# 834242d69509Smrg# Note that if there is a possibility the first call to 834342d69509Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 834442d69509Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 834542d69509Smrg# 834642d69509Smrg# 834742d69509Smrg# -------------------------------------------------------------- 834842d69509SmrgAC_DEFUN([PKG_CHECK_MODULES], 834942d69509Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 835042d69509SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 835142d69509SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 83524456fccdSmrg 835342d69509Smrgpkg_failed=no 835442d69509SmrgAC_MSG_CHECKING([for $1]) 83554456fccdSmrg 835642d69509Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 835742d69509Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 83584456fccdSmrg 835942d69509Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 836042d69509Smrgand $1[]_LIBS to avoid the need to call pkg-config. 836142d69509SmrgSee the pkg-config man page for more details.]) 83624456fccdSmrg 836342d69509Smrgif test $pkg_failed = yes; then 836442d69509Smrg _PKG_SHORT_ERRORS_SUPPORTED 836542d69509Smrg if test $_pkg_short_errors_supported = yes; then 836642d69509Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 836742d69509Smrg else 836842d69509Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 836942d69509Smrg fi 837042d69509Smrg # Put the nasty error message in config.log where it belongs 837142d69509Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 83724456fccdSmrg 837342d69509Smrg ifelse([$4], , [AC_MSG_ERROR(dnl 837442d69509Smrg[Package requirements ($2) were not met: 83754456fccdSmrg 837642d69509Smrg$$1_PKG_ERRORS 83774456fccdSmrg 837842d69509SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 837942d69509Smrginstalled software in a non-standard prefix. 83804456fccdSmrg 838142d69509Smrg_PKG_TEXT 838242d69509Smrg])], 838342d69509Smrg [AC_MSG_RESULT([no]) 838442d69509Smrg $4]) 838542d69509Smrgelif test $pkg_failed = untried; then 838642d69509Smrg ifelse([$4], , [AC_MSG_FAILURE(dnl 838742d69509Smrg[The pkg-config script could not be found or is too old. Make sure it 838842d69509Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 838942d69509Smrgpath to pkg-config. 83904456fccdSmrg 839142d69509Smrg_PKG_TEXT 83924456fccdSmrg 839342d69509SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 839442d69509Smrg [$4]) 839542d69509Smrgelse 839642d69509Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 839742d69509Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 839842d69509Smrg AC_MSG_RESULT([yes]) 839942d69509Smrg ifelse([$3], , :, [$3]) 840042d69509Smrgfi[]dnl 840142d69509Smrg])# PKG_CHECK_MODULES 84024456fccdSmrg 8403